/* ==========================================================================
   Hyttebok — "the cabin logbook"
   A cosy, wood-and-pine journal. Warm lamp-glow on a forest-night ground;
   a serif for the writing, a grotesque for the chrome, monospace for the
   little weather facts. One pine-green accent, one ember warm.
   ========================================================================== */

:root {
  --bg:        #12140f;
  --bg-elev:   #171a12;
  --surface:   #1c2017;
  --surface-2: #232819;
  --hair:      rgba(255,250,235,.07);
  --hair-2:    rgba(255,250,235,.13);
  --ink:       #ece7d8;
  --muted:     #9aa088;
  --faint:     #6a6f5b;
  --accent:    #86b562;          /* pine green */
  --accent-2:  #9ecb78;
  --accent-dim:rgba(134,181,98,.14);
  --accent-ink:#0f1408;
  --ember:     #e0995a;          /* warm lamp glow */
  --ember-dim: rgba(224,153,90,.14);
  --danger:    #e2705c;
  --good:      #86b562;
  --ring:      0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  --shadow:    0 18px 50px -20px rgba(0,0,0,.72);

  --font-display: "Iowan Old Style", Georgia, "Palatino Linotype", ui-serif, serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, monospace;

  --topbar-h: 60px;
  --r: 14px;
}

:root[data-theme="light"] {
  --bg:        #efeadd;
  --bg-elev:   #f5f1e7;
  --surface:   #fffdf7;
  --surface-2: #f1ecdd;
  --hair:      rgba(38,32,18,.10);
  --hair-2:    rgba(38,32,18,.16);
  --ink:       #221f15;
  --muted:     #635f4e;
  --faint:     #948f79;
  --accent:    #4f7a3a;
  --accent-2:  #416630;
  --accent-dim:rgba(79,122,58,.13);
  --accent-ink:#f4f8ec;
  --ember:     #b5702e;
  --ember-dim: rgba(181,112,46,.14);
  --shadow:    0 18px 44px -22px rgba(50,40,18,.4);
}

:root[data-theme="dark"]  { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* ambient lamp glow, top — the warmth of a cabin window at dusk */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(70vw 46vh at 50% -12%, var(--ember-dim), transparent 62%),
    radial-gradient(46vw 40vh at 100% 0%, var(--accent-dim), transparent 58%);
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---- reusable atoms ---------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--faint);
}
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-display); }
.muted { color: var(--muted); }

button { font: inherit; cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--hair-2); background: var(--surface); color: var(--ink);
  border-radius: 10px; padding: 9px 15px; font-size: 14px; font-weight: 500;
  transition: border-color .15s, background .15s, transform .05s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.small { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn.block { width: 100%; justify-content: center; padding: 11px; font-size: 15px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.ghost-btn { background: transparent; border: none; color: var(--muted); display: grid; place-items: center; padding: 7px; border-radius: 9px; }
.ghost-btn:hover { color: var(--ink); background: var(--surface-2); }
.linkbtn { background: none; border: none; color: var(--accent); padding: 2px 4px; font-size: 13.5px; }
.linkbtn:hover { text-decoration: underline; }

svg.ic { width: 1em; height: 1em; display: block; }
i[data-icon] { display: inline-grid; place-items: center; font-size: 18px; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 9px; }

/* form controls */
input, textarea, select {
  font: inherit; width: 100%; color: var(--ink);
  background: var(--bg-elev); border: 1px solid var(--hair-2); border-radius: 10px;
  padding: 10px 12px; transition: border-color .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 150px; line-height: 1.65; font-family: var(--font-display); font-size: 16px; }
label.fld { display: block; }
label.fld > span {
  display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 5px 2px;
}

.chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px;
  padding: 3px 11px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--hair); color: var(--muted); font-family: var(--font-mono);
}
.chip.accent { color: var(--accent); border-color: var(--accent-dim); background: var(--accent-dim); }
.chip.ember  { color: var(--ember);  border-color: var(--ember-dim);  background: var(--ember-dim); }

/* ==========================================================================
   Top bar
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 22px; padding: 0 26px;
  background: color-mix(in srgb, var(--bg-elev) 86%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--hair);
}
.topbar[hidden] { display: none; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-size: 19px; background: linear-gradient(155deg, var(--surface-2), var(--surface));
  border: 1px solid var(--hair-2); box-shadow: inset 0 1px 0 var(--hair);
}
.brand-word { font-family: var(--font-display); font-size: 21px; letter-spacing: .2px; }

.nav { display: flex; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 10px;
  color: var(--muted); font-size: 14px; font-weight: 500;
}
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a.active { background: var(--surface); color: var(--ink); }
.nav a.active i { color: var(--accent); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.usermenu { position: relative; }
.userchip {
  display: flex; align-items: center; gap: 9px; padding: 5px 9px 5px 6px;
  border-radius: 999px; border: 1px solid var(--hair-2); background: var(--surface); color: var(--ink);
}
.userchip:hover { border-color: var(--accent); }
.uavatar {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 13px; color: var(--accent-ink);
  background: linear-gradient(150deg, var(--accent-2), var(--accent));
}
.uname { font-size: 13.5px; font-weight: 500; }
.userchip i { color: var(--faint); font-size: 15px; }
.usermenu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  background: var(--bg-elev); border: 1px solid var(--hair-2); border-radius: 13px;
  box-shadow: var(--shadow); padding: 7px; z-index: 40; animation: pop .14s ease;
}
.usermenu-pop[hidden] { display: none; }
.um-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--hair); margin-bottom: 6px; }
.um-head .n { font-weight: 600; }
.um-head .u { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.um-head .badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.um-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border: none; background: none; color: var(--ink); border-radius: 9px; font-size: 14px; text-align: left;
}
.um-item:hover { background: var(--surface); }
.um-item i { color: var(--muted); }

/* ==========================================================================
   Content scaffold
   ========================================================================== */
.content { position: relative; z-index: 1; padding: 0 26px 100px; }
.page { max-width: 760px; margin: 0 auto; }
.page.wide { max-width: 940px; }

.pagehead {
  padding: 34px 0 20px; display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.pagehead h1 { font-family: var(--font-display); font-size: 33px; font-weight: 600; letter-spacing: -.3px; }
.pagehead .sub { color: var(--muted); font-size: 14px; margin-top: 3px; }
.head-actions { display: flex; gap: 9px; align-items: center; }

.card {
  background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r);
  padding: 22px 24px; margin-bottom: 16px;
}
.empty { text-align: center; color: var(--muted); padding: 80px 20px; }
.empty .big { font-family: var(--font-display); font-size: 24px; color: var(--ink); margin-bottom: 8px; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 22px; }
.searchbox { position: relative; flex: 1; }
.searchbox > .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 18px; pointer-events: none; }
.searchbox input { padding-left: 40px; }

/* ==========================================================================
   Date overview (mini calendars of which days have entries)
   ========================================================================== */
.overview { margin: 6px 0 22px; }
.ov-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.ov-nav { display: flex; align-items: center; gap: 6px; }
.ov-nav .icon-btn { border: 1px solid var(--hair-2); background: var(--surface); }
.ov-nav .icon-btn:hover { border-color: var(--accent); color: var(--ink); }
.ov-range { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); min-width: 168px; text-align: center; }
.ov-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ov-month {
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: var(--r); padding: 13px 15px; min-width: 0;
}
.ov-title { font-family: var(--font-display); font-size: 15.5px; margin-bottom: 9px; }
.ov-wd, .ov-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ov-wd { margin-bottom: 5px; }
.ov-wd span { text-align: center; font-family: var(--font-mono); font-size: 10px; color: var(--faint); }
.ov-day {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 7px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--faint);
  border: none; background: transparent; padding: 0;
}
.ov-day.empty { visibility: hidden; }
.ov-day.today { box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--ink); }
.ov-day.has { background: var(--accent); color: var(--accent-ink); font-weight: 600; cursor: pointer; }
.ov-day.has.today { box-shadow: inset 0 0 0 2px var(--ink); }
.ov-day.has:hover { background: var(--accent-2); }
@media (max-width: 680px) {
  .ov-strip { grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; padding-bottom: 6px; }
}

/* ==========================================================================
   Feed of posts
   ========================================================================== */
.feed { display: flex; flex-direction: column; gap: 20px; }
.post-card {
  background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r);
  overflow: hidden; cursor: pointer; transition: border-color .15s, transform .12s;
}
.post-card:hover { border-color: var(--hair-2); transform: translateY(-2px); }
.post-card .cover { position: relative; aspect-ratio: 16 / 8; background: var(--surface-2); overflow: hidden; }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .cover .count {
  position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 6px;
  background: rgba(10,12,8,.62); color: #f2eeddff; padding: 4px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 12px; backdrop-filter: blur(3px);
}
.post-card .cover .count .ic { font-size: 14px; }
.post-card .pc-body { padding: 18px 22px 20px; }
.post-card .pc-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); letter-spacing: .03em;
  margin-bottom: 9px;
}
.post-card .pc-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.post-card h2 { font-family: var(--font-display); font-size: 24px; line-height: 1.2; letter-spacing: -.2px; }
.post-card .pc-excerpt { color: var(--muted); font-size: 14.5px; margin-top: 8px; line-height: 1.6; }
.post-card .pc-foot { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* weather / conditions chips */
.conds { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.cond { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.cond .em { font-size: 14px; font-family: var(--font-ui); }
.cond b { color: var(--ink); font-weight: 500; }

.byline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.byline .uavatar { width: 22px; height: 22px; font-size: 11px; }

/* ==========================================================================
   Single post
   ========================================================================== */
.post-back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13.5px; margin: 26px 0 10px; }
.post-back:hover { color: var(--ink); }
.post-hero { border-radius: var(--r); overflow: hidden; border: 1px solid var(--hair); margin-bottom: 24px; }
.post-hero img { width: 100%; max-height: 60vh; object-fit: cover; display: block; }

.post-header { margin-bottom: 20px; }
.post-header h1 { font-family: var(--font-display); font-size: 40px; line-height: 1.08; letter-spacing: -.5px; }
.post-header .post-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px;
  padding-bottom: 20px; border-bottom: 1px solid var(--hair);
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.post-meta .when { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12.5px; color: var(--faint); }
.post-meta .when .ic { font-size: 14px; }

.conds.big { gap: 14px; margin: 4px 0 22px; }
.conds.big .cond { font-size: 13.5px; }
.conds.big .cond .em { font-size: 17px; }

.post-body {
  font-family: var(--font-display); font-size: 18px; line-height: 1.75; color: var(--ink);
  white-space: pre-wrap; margin-bottom: 28px;
}

.post-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.post-gallery figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--hair); background: var(--surface-2); cursor: pointer; }
.post-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.post-gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 20px 10px 8px;
  background: linear-gradient(180deg, transparent, rgba(8,10,6,.82)); color: #f2eedd;
  font-size: 12px; opacity: 0; transition: opacity .15s;
}
.post-gallery figure:hover figcaption { opacity: 1; }

/* ==========================================================================
   Compose / edit form
   ========================================================================== */
.compose { display: flex; flex-direction: column; gap: 18px; }

/* Norwegian date field: dd.mm.åååå text + a native-picker button */
.datefield { position: relative; }
.datefield input[data-date] { padding-right: 44px; }
.datefield .date-pick {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px;
  border: none; background: transparent; color: var(--muted);
}
.datefield .date-pick:hover { color: var(--accent); background: var(--surface-2); }
.datefield .date-pick .ic { font-size: 18px; }
.datefield .date-native {
  position: absolute; right: 14px; bottom: 4px; width: 1px; height: 1px;
  padding: 0; margin: 0; border: 0; opacity: 0; pointer-events: none;
}
.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.field-grid.two { grid-template-columns: 1fr 1fr; }
.section-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }

.title-input { font-family: var(--font-display); font-size: 26px; padding: 12px 14px; }

.weatherpick { display: flex; gap: 7px; flex-wrap: wrap; }
.wbtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--hair-2); background: var(--bg-elev); color: var(--muted); font-size: 13px;
}
.wbtn .em { font-size: 15px; }
.wbtn:hover { border-color: var(--accent); color: var(--ink); }
.wbtn.on { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* dropzone + thumbs */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: 1.5px dashed var(--hair-2); border-radius: var(--r); padding: 26px 20px; text-align: center;
  color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; background: var(--bg-elev);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-dim); color: var(--ink); }
.dropzone .ic { font-size: 28px; color: var(--accent); }
.dropzone .hint { font-size: 13px; }

.header-preview { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--hair); }
.header-preview img { width: 100%; max-height: 300px; object-fit: cover; display: block; }
.header-preview .rm { position: absolute; top: 10px; right: 10px; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.thumb { position: relative; border-radius: 11px; overflow: hidden; border: 1px solid var(--hair); aspect-ratio: 1; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .rm {
  position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 8px;
  background: rgba(10,12,8,.66); color: #fff; border: none; display: grid; place-items: center; backdrop-filter: blur(3px);
}
.thumb .rm:hover { background: var(--danger); }
.thumb .set-header {
  position: absolute; left: 5px; bottom: 5px; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 7px;
  background: rgba(10,12,8,.66); color: #fff; border: none; backdrop-filter: blur(3px);
}
.thumb .set-header:hover { background: var(--accent); color: var(--accent-ink); }
.thumb.is-header { box-shadow: inset 0 0 0 2px var(--accent); }
.thumb.is-header .set-header { background: var(--accent); color: var(--accent-ink); }

.compose-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }

/* ==========================================================================
   Admin management
   ========================================================================== */
.card > h2 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.card > h2 .ic { font-size: 15px; color: var(--accent); }
.adm-note { font-size: 13px; margin: -6px 0 14px; }
.adm-form { display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
.adm-inviteform { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.adm-inviteform input[name=note] { flex: 1; min-width: 160px; }
.adm-inviteform input[name=max_uses] { width: 92px; flex: none; }

.adm-list { display: flex; flex-direction: column; }
.adm-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 2px;
  border-top: 1px solid var(--hair);
}
.adm-row:first-child { border-top: none; }
.adm-row.off { opacity: .55; }
.adm-main { flex: 1; min-width: 0; }
.adm-name { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.adm-name .uavatar { width: 26px; height: 26px; font-size: 12px; }
.adm-sub { font-family: var(--font-mono); font-size: 12px; color: var(--faint); margin-top: 3px; }
.adm-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.adm-empty { color: var(--muted); font-size: 14px; padding: 8px 2px; }

.code {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: 16px; letter-spacing: .12em; font-weight: 600; color: var(--ink);
  background: var(--bg-elev); border: 1px solid var(--hair-2); border-radius: 9px; padding: 6px 12px;
}
.code:hover { border-color: var(--accent); color: var(--accent); }
.code .ic { font-size: 15px; color: var(--faint); }
.code:hover .ic { color: var(--accent); }

@media (max-width: 680px) {
  .adm-row { flex-wrap: wrap; }
  .adm-actions { width: 100%; }
}

/* ==========================================================================
   Auth gate (login / signup)
   ========================================================================== */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.gate-card {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--hair);
  border-radius: 20px; padding: 34px 32px; box-shadow: var(--shadow);
}
.gate-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 26px; text-align: center; }
.gate-brand .mark { font-size: 46px; line-height: 1; }
.gate-brand h1 { font-family: var(--font-display); font-size: 30px; }
.gate-brand p { color: var(--muted); font-size: 14px; }
.gate form { display: flex; flex-direction: column; gap: 14px; }
.gate .err { color: var(--danger); font-size: 13.5px; min-height: 1.2em; text-align: center; }
.gate-switch { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.gate-switch button { color: var(--accent); background: none; border: none; font-size: 13.5px; }
.gate-switch button:hover { text-decoration: underline; }

/* ==========================================================================
   Lightbox + toasts
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 70; background: rgba(4,5,3,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 5vh;
  animation: fade .12s ease;
}
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 12px; box-shadow: var(--shadow); }
.lightbox-cap { color: #d9d4c4; font-size: 14px; font-family: var(--font-mono); }
.lightbox[hidden] { display: none; }

.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--surface); border: 1px solid var(--hair-2); color: var(--ink);
  padding: 11px 17px; border-radius: 11px; font-size: 13.5px; box-shadow: var(--shadow); animation: pop .16s ease;
}
.toast.err { border-color: var(--danger); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 680px) {
  .topbar { gap: 12px; padding: 0 14px; }
  .nav a span { display: none; }
  .nav a { padding: 8px 11px; }
  .brand-word { display: none; }
  .uname { display: none; }
  .content { padding: 0 14px 100px; }
  .post-header h1 { font-size: 30px; }
  .field-grid, .field-grid.two { grid-template-columns: 1fr; }
}
