/* FleetingURL — shared styles.
   White paper, graphite ink, one electric accent. The recurring motif is a
   tick-rule: a measured scale, because everything here is on a clock. */
:root {
  --paper: #FFFFFF;
  --paper-2: #F3F4F6;
  --card: #FFFFFF;
  --ink: #101114;
  --ink-soft: #4C525C;
  --faint: #8A909A;
  --line: rgba(16, 17, 20, 0.11);
  --line-strong: rgba(16, 17, 20, 0.26);
  --accent: #2E2BEB;
  --accent-bg: rgba(46, 43, 235, 0.06);
  --live: #0B7A4B;
  --live-bg: rgba(11, 122, 75, 0.07);
  --stamp: #E0342A;
  --stamp-bg: rgba(224, 52, 42, 0.07);
  --shadow: 0 1px 2px rgba(16, 17, 20, 0.05), 0 1px 1px rgba(16, 17, 20, 0.03);
  --display: "Bricolage Grotesque", "Inter Tight", system-ui, sans-serif;
  --body: "Inter Tight", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--body);
  font-size: 15.5px; line-height: 1.6; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- shell ---------- */
.shell { max-width: 1060px; margin: 0 auto; padding: 26px 22px 90px; }
.topbar { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.2rem; text-decoration: none; letter-spacing: -0.035em; }
.wordmark .tld { color: var(--faint); }
.topnav { display: flex; gap: 18px; font-size: 0.84rem; align-items: baseline; }
.topnav a { color: var(--ink-soft); text-decoration: none; }
.topnav a:hover { color: var(--ink); }
.topnav a.pill { border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 14px; color: var(--ink); }
.topnav a.pill:hover { background: var(--ink); color: var(--paper); }

/* ---------- type ---------- */
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.05; letter-spacing: -0.035em; }
.lead { color: var(--ink-soft); max-width: 56ch; margin-top: 10px; }
.eyebrow { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--faint); }
.label { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-soft); margin-bottom: 10px; }
.label .opt { color: var(--faint); letter-spacing: 0.02em; text-transform: none; }
.sub { font-size: 0.8rem; color: var(--faint); margin-top: 8px; }
.mono { font-family: var(--mono); }

/* ---------- tick-rule (signature) ----------
   A ruler, not a decoration: everything on this site is measured against a
   clock, so the divider is a scale with a marked origin. */
.perf {
  border: none; height: 9px; margin: 26px 0; position: relative;
  background-image:
    linear-gradient(to right, var(--line-strong) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 12px 5px, 100% 1px;
  background-position: 0 4px, 0 0;
  background-repeat: repeat-x, no-repeat;
}
.perf::before {
  content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 9px; background: var(--accent);
}
.tickrule {
  height: 9px; margin: 18px 0 0;
  background-image: linear-gradient(to right, var(--line-strong) 1px, transparent 1px);
  background-size: 12px 5px; background-position: 0 2px; background-repeat: repeat-x;
}

/* ---------- composer ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; margin-top: 34px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; gap: 30px; } }
.section { margin-bottom: 24px; }

.tabs { display: flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; width: max-content; margin-bottom: 16px; }
.tab { background: transparent; border: none; padding: 9px 20px; font-size: 0.86rem; color: var(--ink-soft); cursor: pointer; }
.tab + .tab { border-left: 1px solid var(--line-strong); }
.tab.active { background: var(--ink); color: var(--paper); }

.drop { border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 34px 22px; text-align: center; cursor: pointer; background: var(--paper-2); transition: border-color 0.15s, background 0.15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-bg); }
.drop svg { width: 28px; height: 28px; stroke: var(--ink-soft); fill: none; stroke-width: 1.5; margin-bottom: 8px; }
.drop-label { font-size: 0.85rem; color: var(--ink-soft); }
.drop-hint { font-family: var(--mono); font-size: 0.68rem; color: var(--faint); margin-top: 6px; }

.preview { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; position: relative; background: var(--card); }
.preview img, .preview video { width: 100%; display: block; max-height: 260px; object-fit: contain; background: var(--paper-2); }
.preview .filecard { display: flex; gap: 12px; align-items: center; padding: 14px 16px; font-size: 0.85rem; }
.preview .filecard .mono { color: var(--ink-soft); }
.preview-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); cursor: pointer; font-size: 0.95rem; line-height: 1; }
.preview-x:hover { background: var(--stamp); border-color: var(--stamp); color: #fff; }

textarea {
  width: 100%; min-height: 150px; resize: vertical; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px;
  font-family: var(--mono); font-size: 0.86rem; color: var(--ink); line-height: 1.55;
}
input[type=text], input[type=password], input[type=email], input[type=number] {
  width: 100%; background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; color: var(--ink); font-family: inherit; font-size: 0.92rem;
}
textarea:focus, input:focus { outline: none; border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 3px var(--accent-bg); }

.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset { background: var(--paper-2); border: 1px solid transparent; border-radius: 999px; padding: 8px 15px; color: var(--ink-soft); font-size: 0.83rem; cursor: pointer; transition: background 0.14s, color 0.14s; }
.preset:hover { color: var(--ink); background: #E9EAEE; }
.preset.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.preset.locked { opacity: 0.45; cursor: not-allowed; }
.preset .lock { font-size: 0.7em; margin-left: 4px; }

.slugrow { display: flex; align-items: center; gap: 0; }
.slugrow .prefix { font-family: var(--mono); font-size: 0.84rem; color: var(--faint); border: 1px solid var(--line-strong); border-right: none; border-radius: 10px 0 0 10px; padding: 11px 4px 11px 14px; background: var(--paper-2); white-space: nowrap; }
.slugrow input { border-radius: 0 10px 10px 0; font-family: var(--mono); font-size: 0.84rem; }

.go { width: 100%; margin-top: 6px; padding: 15px; border: none; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 0.95rem; font-weight: 600; cursor: pointer; letter-spacing: 0.01em; }
.go:hover { background: #000; }
.go:disabled { opacity: 0.45; cursor: default; }
.status { font-size: 0.8rem; color: var(--stamp); margin-top: 10px; min-height: 1.2em; }

/* ---------- face blur ---------- */
.blur-sliders { display: grid; gap: 11px; }
.blur-sliders label { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); display: block; }
.blur-sliders label span { color: var(--faint); float: right; letter-spacing: 0.02em; }
.blur-sliders input[type=range] { width: 100%; margin-top: 5px; accent-color: var(--ink); }
.blur-status { font-size: 0.8rem; color: var(--ink-soft); margin-top: 10px; min-height: 1.2em; }
.blur-status.busy { color: var(--ink-soft); }
.blur-status.ok { color: var(--live); }
.blur-status.bad { color: var(--stamp); }
.prog { height: 6px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: 9px; }
.prog span { display: block; height: 100%; width: 0; background: var(--live); transition: width 0.25s ease; }

/* ---------- stub (result) ---------- */
.stub { display: none; background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; box-shadow: 0 6px 22px rgba(16,17,20,0.08); }
.stub.show { display: block; }
.stub-head { padding: 14px 18px 12px; display: flex; justify-content: space-between; align-items: baseline; }
.stub-tear { border: none; border-top: 2px dashed var(--line-strong); margin: 0 10px; }
.stub-body { padding: 16px 18px 18px; }
.stub-url { font-family: var(--mono); font-size: 0.86rem; word-break: break-all; background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.stub-actions { display: flex; gap: 8px; margin-top: 12px; }
.stub-actions button { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--paper); cursor: pointer; font-size: 0.84rem; }
.stub-actions button.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stub-actions button:hover { border-color: var(--ink); }
.stub-meta { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); margin-top: 12px; line-height: 1.8; }
.stamp-mark { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--stamp); border: 1.5px solid var(--stamp); border-radius: 3px; padding: 3px 8px; display: inline-block; }
#qr { margin-top: 14px; display: flex; justify-content: center; }
#qr img, #qr canvas { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }

/* ---------- rail ---------- */
.rail { position: sticky; top: 24px; align-self: start; }
@media (max-width: 860px) { .rail { position: static; } }
.pitch { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--paper-2); margin-top: 20px; }
.pitch h2 { font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; margin-bottom: 6px; }
.pitch p { font-size: 0.83rem; color: var(--ink-soft); margin-bottom: 14px; }
.pitch ul { list-style: none; display: grid; gap: 9px; margin-bottom: 16px; }
.pitch li { display: flex; gap: 9px; font-size: 0.83rem; color: var(--ink-soft); line-height: 1.45; }
.pitch li::before { content: "→"; font-family: var(--mono); color: var(--accent); flex: 0 0 auto; }
.pitch li b { color: var(--ink); }
.pitch .cta { display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; font-size: 0.84rem; font-weight: 600; padding: 10px 18px; border-radius: 8px; }
.pitch .alt { display: block; margin-top: 10px; font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- viewer ---------- */
.viewer { max-width: 640px; margin: 0 auto; padding: 30px 22px 90px; }
.viewer-card { background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px; padding: 26px 24px; margin-top: 26px; }
.viewer-card img, .viewer-card video { max-width: 100%; border-radius: 8px; display: block; margin: 0 auto; }
.viewer-card audio { width: 100%; }
.viewer-text { font-family: var(--mono); font-size: 0.88rem; white-space: pre-wrap; word-break: break-word; line-height: 1.65; }

/* protected media — best-effort deterrent against casual saving */
.shielded { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.media-frame { position: relative; display: block; line-height: 0; }
.media-frame img { pointer-events: none; -webkit-user-drag: none; user-drag: none; }
.media-frame .shield { position: absolute; inset: 0; z-index: 2; background: transparent; cursor: default; }
.media-frame video { position: relative; z-index: 1; max-width: 100%; }
.media-frame video::-internal-media-controls-download-button { display: none; }
.media-frame video::-webkit-media-controls-enclosure { overflow: hidden; }
.shielded audio::-internal-media-controls-download-button { display: none; }
.shielded img[src=""] { min-height: 120px; }
.countdown { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stamp); text-align: center; margin-bottom: 14px; }
.label-block { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.link-title { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.15; letter-spacing: -0.03em; word-break: break-word; }
.link-desc { font-size: 0.9rem; color: var(--ink-soft); margin-top: 6px; word-break: break-word; }
.label-block + .preview-flag {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--live); background: var(--live-bg); border: 1px solid var(--live);
  border-radius: 6px; padding: 6px 11px; text-align: center; margin-bottom: 14px;
}
.viewmeter { margin-top: -4px; }
.linkrow .row-title, .linkcard .row-title { font-family: var(--display); font-weight: 600; font-size: 0.96rem; letter-spacing: -0.02em; margin-top: 2px; word-break: break-word; }

.preview-flag {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--live); background: var(--live-bg); border: 1px solid var(--live);
  border-radius: 6px; padding: 6px 11px; text-align: center; margin-bottom: 14px;
}
.viewmeter { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); text-align: center; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.gone { text-align: center; padding: 40px 0 20px; }
.gone .stamp-mark { font-size: 0.8rem; padding: 5px 12px; }
.gone p { color: var(--ink-soft); margin-top: 16px; font-size: 0.9rem; }
.dl { display: inline-block; margin-top: 14px; font-size: 0.84rem; }

/* ---------- theater mode ---------- */
.theater-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.theater-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 8px 16px; font-size: 0.82rem; color: var(--ink);
}
.theater-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.theater-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.theater-hint { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

body.theater-open { overflow: hidden; }
.theater {
  position: fixed; inset: 0; z-index: 9999; background: #0A0B0D;
  display: flex; align-items: center; justify-content: center;
}
.theater-bg {
  position: absolute; inset: -6%; background-size: cover; background-position: center;
  filter: blur(34px) saturate(1.15) brightness(0.5); transform: scale(1.08);
}
.theater-bg-dark { background: radial-gradient(120% 90% at 50% 40%, #1B1D22 0%, #0A0B0D 70%); filter: none; }
.theater-stage {
  position: relative; z-index: 1; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; padding: 3vmin;
}
.theater-stage img, .theater-stage video {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; display: block; border-radius: 4px;
  box-shadow: 0 20px 70px rgba(0,0,0,0.6);
}
.theater-stage img { pointer-events: none; -webkit-user-drag: none; }
.theater-exit {
  position: absolute; top: 18px; right: 20px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
  color: #FFFFFF; font-size: 1rem; line-height: 1;
}
.theater-exit:hover { background: rgba(255,255,255,0.22); }
.theater-cd {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 3;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: #E8B4A8; background: rgba(0,0,0,0.45); border: 1px solid rgba(232,180,168,0.4);
  border-radius: 6px; padding: 5px 12px;
}
@media (max-width: 560px) { .theater-exit { top: 12px; right: 12px; } .theater-stage { padding: 0; } }

/* ---------- hearts & comments ---------- */
.social { max-width: 640px; margin: 20px auto 0; }
.social-bar { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }

/* bare glyph — no chrome, the heart is the button */
.heart {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; padding: 2px 0; cursor: pointer;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em;
  color: var(--faint); line-height: 1;
}
.heart .glyph { font-size: 1.45rem; line-height: 1; color: var(--line-strong); transition: color 0.18s ease, transform 0.18s ease; }
.heart:hover { color: var(--stamp); }
.heart:hover .glyph { color: var(--stamp); transform: scale(1.14); }
.heart.on, .heart.on .glyph { color: var(--stamp); }
.heart:disabled { opacity: 0.5; cursor: default; }
.heart:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
.social-count { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }

.comments { display: grid; gap: 16px; margin: 18px 0 20px; }
.no-comments { font-size: 0.86rem; color: var(--faint); margin: 2px 0 0; }
.comment { border-left: 2px solid var(--line); padding-left: 14px; }
.comment-head { display: flex; gap: 10px; align-items: baseline; }
.comment-head b { font-size: 0.87rem; font-weight: 600; }
.comment-head span { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.comment-body { font-size: 0.89rem; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; margin-top: 3px; line-height: 1.55; }

/* one composer card: byline on top, body below, actions in the footer */
.composer {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; transition: border-color 0.16s ease;
}
.composer:focus-within { border-color: var(--line-strong); }
.composer .cf-name,
.composer .cf-body {
  width: 100%; background: transparent; border: none; border-radius: 0;
  color: var(--ink); padding: 11px 15px; font-size: 0.89rem;
}
.composer .cf-name {
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.06em;
  border-bottom: 1px dashed var(--line); padding-bottom: 10px;
}
.composer .cf-name::placeholder { color: var(--faint); letter-spacing: 0.06em; }
.composer .cf-body {
  font-family: var(--body); line-height: 1.55; resize: none; min-height: 62px;
  display: block; overflow-y: auto;
}
.composer .cf-name:focus, .composer .cf-body:focus { outline: none; }
.cf-foot { display: flex; align-items: center; gap: 12px; padding: 9px 11px 11px 15px; }
.cf-note { flex: 1; font-size: 0.78rem; color: var(--stamp); }
.cf-count { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; color: var(--faint); }
.cf-send {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ink); color: var(--paper); border: none; border-radius: 999px;
  padding: 8px 16px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: opacity 0.16s ease, background 0.16s ease;
}
.cf-send .arw { transition: transform 0.16s ease; }
.cf-send:hover:not(:disabled) { background: #000; }
.cf-send:hover:not(:disabled) .arw { transform: translateX(3px); }
.cf-send:disabled { background: var(--paper-2); color: var(--faint); cursor: default; }

@media (prefers-reduced-motion: no-preference) {
  .heart.pop .glyph { animation: pop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1); }
  @keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.5); } 100% { transform: scale(1); } }
  .comment { animation: fadeUp 0.25s ease-out; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* ---------- auth ---------- */
.auth { max-width: 400px; margin: 0 auto; padding: 40px 22px 90px; }
.auth form { margin-top: 22px; display: grid; gap: 14px; }
.auth .swap { margin-top: 18px; font-size: 0.84rem; color: var(--ink-soft); }
.auth .swap a { color: var(--ink); }

/* ---------- dashboard ---------- */
.dash { max-width: 1160px; margin: 0 auto; padding: 26px 22px 90px; }
/* header row + layout switch */
.dash-head { margin-top: 30px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.dash-tools { display: flex; align-items: center; gap: 10px; }
.viewswitch { display: flex; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; }
.vs { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: none; padding: 7px 13px; font-size: 0.8rem; color: var(--ink-soft); cursor: pointer; }
.vs + .vs { border-left: 1px solid var(--line-strong); }
.vs svg { width: 13px; height: 13px; fill: currentColor; }
.vs:hover { color: var(--ink); }
.vs.on { background: var(--ink); color: var(--paper); }
@media (max-width: 520px) { .vs span { display: none; } .vs { padding: 8px 12px; } }
.newlink { text-decoration: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 16px; font-size: 0.82rem; color: var(--ink); }
.newlink:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* card grid — three up on desktop, two on tablet, one on phone */
.cardgrid { margin-top: 22px; display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
@media (max-width: 1000px) { .cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 660px)  { .cardgrid { grid-template-columns: 1fr; } }

/* the card is a frame: preview and info both sit inside it */
.linkcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.linkcard:hover { border-color: var(--line-strong); box-shadow: 0 4px 14px rgba(16,17,20,0.07); }
.card-body { padding: 12px 6px 4px; }
.card-body .linkrow-top { margin-bottom: 2px; }

/* preview sits in its own inset frame */
.thumb {
  position: relative; aspect-ratio: 4 / 3; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 9px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-badge {
  position: absolute; bottom: 7px; left: 7px; font-family: var(--mono); font-size: 0.58rem;
  letter-spacing: 0.12em; text-transform: uppercase; background: rgba(38,37,31,0.8);
  color: var(--paper); border-radius: 4px; padding: 3px 7px;
}
.thumb-text { padding: 14px 15px; align-items: flex-start; }
.thumb-text span {
  font-family: var(--mono); font-size: 0.72rem; line-height: 1.55; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word;
}
.thumb-icon { flex-direction: column; gap: 8px; padding: 14px; }
.thumb-icon .ico { font-size: 1.7rem; color: var(--faint); line-height: 1; }
.thumb-icon .fname { font-family: var(--mono); font-size: 0.66rem; color: var(--ink-soft); text-align: center; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-retired img { opacity: 0.42; filter: grayscale(0.5); }
.thumb-retired { background: var(--paper-2); }
.thumb-dead { background: repeating-linear-gradient(45deg, var(--paper-2), var(--paper-2) 9px, var(--card) 9px, var(--card) 18px); }

.linkcard .row-title { font-size: 1.02rem; margin-top: 4px; line-height: 1.25; }
.linkcard .desc { font-size: 0.82rem; margin-top: 3px; }
.desc.dim { color: var(--faint); font-size: 0.75rem; }
.linkcard .facts { border-top: 1px dashed var(--line); padding-top: 9px; }
.linkcard .rowactions { gap: 6px; margin-top: 11px; }
.linkcard .rowactions button { padding: 5px 10px; font-size: 0.73rem; border-radius: 6px; }
.logscroll { overflow-x: auto; }
.logscroll table { min-width: 440px; }

.linklist { margin-top: 24px; display: grid; gap: 12px; }
.linkrow { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px; }
.linkrow-top { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }
.linkrow .slug, .linkcard .slug { font-family: var(--mono); font-size: 0.86rem; font-weight: 500; text-decoration: none; color: var(--accent); }
.linkrow .slug:hover { text-decoration: underline; }
.badge { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; border-radius: 4px; padding: 2px 7px; }
.badge.live { color: var(--live); background: var(--live-bg); border: 1px solid var(--live); }
.badge.work { color: #8a6d1f; background: rgba(138,109,31,0.1); border: 1px solid #8a6d1f; margin-left: 6px; }
.badge.dead { color: var(--stamp); background: var(--stamp-bg); border: 1px solid var(--stamp); }
.linkrow .desc { font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; word-break: break-word; }
.facts { font-family: var(--mono); font-size: 0.68rem; color: var(--faint); margin-top: 9px; display: flex; flex-wrap: wrap; gap: 4px 14px; line-height: 1.5; }
.rowactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rowactions button { border: 1px solid var(--line-strong); background: var(--paper); border-radius: 7px; padding: 6px 12px; font-size: 0.78rem; cursor: pointer; color: var(--ink); }
.rowactions button:hover { border-color: var(--ink); }
.rowactions button.danger:hover { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.viewlog { margin-top: 12px; border-top: 1px dashed var(--line-strong); padding-top: 10px; display: none; }
.viewlog.show { display: block; }
.viewlog table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.72rem; }
.viewlog td { padding: 4px 8px 4px 0; color: var(--ink-soft); vertical-align: top; }
.viewlog .loghead td { color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.62rem; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.viewlog .ip { color: var(--ink); }
.places { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.place { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--ink-soft); background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.place b { color: var(--ink); font-weight: 500; }
.logsum { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.empty { border: 2px dashed var(--line-strong); border-radius: 14px; padding: 46px 20px; text-align: center; color: var(--ink-soft); margin-top: 26px; }
.empty a { color: var(--ink); }

.footer-nav { margin-top: 60px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.78rem; display: flex; gap: 22px; flex-wrap: wrap; color: var(--faint); }
.footer-nav a { color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .stub.show { animation: tearIn 0.35s ease-out; }
  @keyframes tearIn { from { opacity: 0; transform: translateY(6px) rotate(-0.5deg); } to { opacity: 1; transform: none; } }
}
