/* ---------- tokens ---------- */
:root {
  --bg: #f6f3ec;
  --paper: #ffffff;
  --paper-2: #fbf9f4;
  --ink: #2b2a26;
  --ink-2: #55524a;
  --muted: #8a857a;
  --line: #e8e2d6;
  --line-2: #f0ece2;
  --brand: #2f7d68;
  --brand-soft: #e4f1ec;

  --keep: #2f9e73;    --keep-soft: #e3f4ea;
  --adapt: #cf932a;   --adapt-soft: #fbf0db;
  --rethink: #d2675f; --rethink-soft: #fbe9e7;

  --lang: #4a7fc1;    --lang-soft: #e9f1fb;
  --cog: #8a6bc1;     --cog-soft: #f0eafa;
  --motor: #2f9e73;   --motor-soft: #e3f4ea;
  --creative: #d9842b;--creative-soft: #fbeedb;
  --social: #cf6a86;  --social-soft: #fbe9ef;
  --school: #6b7280;  --school-soft: #eef0f2;

  --shadow-sm: 0 1px 2px rgba(40, 35, 25, .05), 0 4px 12px rgba(40, 35, 25, .04);
  --shadow-lg: 0 18px 50px rgba(40, 35, 25, .18);
  --radius: 16px;
  --font: "Nunito", "Avenir Next", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input { font-family: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; flex: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ---------- shell ---------- */
.app { height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 64px; flex: 0 0 64px; display: flex; align-items: center; gap: 14px;
  padding: 0 18px; background: var(--paper); border-bottom: 1px solid var(--line);
  position: relative; z-index: 40;
}
.topbar-spacer { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; border: 1px solid var(--line); background: var(--paper);
  border-radius: 11px; color: var(--ink-2); display: grid; place-items: center;
  transition: background .18s, border-color .18s, color .18s;
}
.icon-btn:hover { background: var(--brand-soft); border-color: #c9e2d7; color: var(--brand); }
.hamburger { background: var(--brand); border-color: var(--brand); color: #fff; }
.hamburger:hover { background: #276a58; color: #fff; }

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; letter-spacing: -.2px; }
.brand-text small { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; }

.search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--paper-2); color: var(--muted);
  transition: border-color .18s, box-shadow .18s;
}
.search:focus-within { border-color: #a9d3c1; box-shadow: 0 0 0 3px var(--brand-soft); }
.search input { border: 0; outline: 0; background: transparent; width: 170px; font-size: 13px; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { border: 0; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; padding: 0 2px; }
.search-clear:hover { color: var(--ink); }

.btn-ghost {
  height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--paper);
  color: var(--ink-2); font-size: 12.5px; font-weight: 700;
  transition: background .18s, border-color .18s;
}
.btn-ghost:hover { background: var(--brand-soft); border-color: #c9e2d7; color: var(--brand); }
.badge-count { background: var(--brand-soft); color: var(--brand); border-radius: 20px; padding: 1px 7px; font-size: 11px; }

.live-badge { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 20px; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; border: 1px solid var(--line); background: var(--paper-2); color: var(--muted); flex: none; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.live-badge[data-status="live"] { background: var(--keep-soft); color: var(--keep); border-color: #bfe4d0; }
.live-badge[data-status="live"] i { animation: livePulse 2s infinite; }
.live-badge[data-status="connecting"], .live-badge[data-status="reconnecting"] { background: var(--adapt-soft); color: #a9761c; border-color: #efd9ad; }
.live-badge[data-status="restarting"] { background: var(--rethink-soft); color: var(--rethink); border-color: #efc7c3; }
@keyframes livePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 158, 115, .5); } 50% { box-shadow: 0 0 0 5px rgba(47, 158, 115, 0); } }

.live-toast { position: fixed; right: 20px; bottom: 20px; z-index: 120; background: var(--ink); color: #fff; padding: 10px 15px; border-radius: 11px; font-size: 12px; font-weight: 700; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.live-toast.show { opacity: 1; transform: none; }

.body { flex: 1; display: flex; min-height: 0; position: relative; }

/* ---------- sidebar ---------- */
.sidebar {
  width: 288px; flex: 0 0 288px; background: var(--paper-2);
  border-right: 1px solid var(--line); overflow: hidden;
  transition: width .26s ease, flex-basis .26s ease, transform .26s ease;
}
.sidebar-inner { width: 288px; height: 100%; display: flex; flex-direction: column; }
.app.sidebar-collapsed .sidebar { width: 0; flex-basis: 0; border-right: 0; }
.tree { flex: 1; overflow-y: auto; padding: 16px 12px 20px; }

.tree-root, .month-row, .strand-row { display: flex; align-items: center; width: 100%; border: 0; background: transparent; text-align: left; color: var(--ink-2); }
.tree-root { gap: 9px; padding: 10px 10px; border-radius: 12px; font-size: 14px; font-weight: 800; }
.tree-root:hover { background: var(--line-2); }
.tree-root .root-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.tree-root .root-count { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); }
.tree-caret { width: 18px; height: 18px; display: grid; place-items: center; color: var(--muted); transition: transform .2s ease; flex: none; border: 0; background: transparent; padding: 0; }
.tree-caret:hover { color: var(--brand); }
.tree-caret.open { transform: rotate(90deg); }

.tree-children { margin: 4px 0 0 21px; padding-left: 12px; border-left: 1.5px dashed var(--line); }
.node { margin: 2px 0; }
.month-line { display: flex; align-items: center; }
.month-line > .tree-caret { margin-left: -2px; }
.month-row { gap: 7px; padding: 9px 9px; border-radius: 10px; font-size: 13px; font-weight: 700; position: relative; }
.month-row:hover { background: var(--line-2); }
.month-row.active { background: var(--brand-soft); color: var(--brand); }
.month-row.active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--brand); }
.month-row .m-name { flex: 1; }
.month-row .m-count { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.mini-bar { width: 34px; height: 6px; border-radius: 4px; overflow: hidden; display: flex; background: var(--line-2); flex: none; }
.mini-bar i { display: block; height: 100%; }

.strand-children { margin: 3px 0 7px 20px; padding-left: 11px; border-left: 1.5px solid var(--line-2); }
.strand-row { gap: 8px; padding: 5px 8px; border-radius: 8px; font-size: 11.5px; color: var(--muted); }
.strand-row:hover { background: var(--line-2); color: var(--ink); }
.strand-row .s-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.strand-row .s-n { margin-left: auto; font-size: 10px; opacity: .75; }

.overview-row { gap: 9px; padding: 9px 10px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.overview-row:hover { background: var(--line-2); }
.overview-row.active { background: var(--brand-soft); color: var(--brand); }

.sidebar-foot { border-top: 1px solid var(--line); padding: 14px 18px 18px; }
.foot-title { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.legend-row { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: 11.5px; color: var(--ink-2); }
.legend-dot { width: 20px; height: 20px; border-radius: 7px; display: grid; place-items: center; flex: none; }

.scrim { display: none; position: absolute; inset: 0; background: rgba(30, 28, 22, .35); z-index: 20; }

/* ---------- main ---------- */
.main { flex: 1; min-width: 0; overflow-y: auto; padding: 26px 32px 70px; scroll-behavior: smooth; }
.wrap { max-width: 1240px; margin: 0 auto; }
.eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--brand); }
h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.8px; margin: 8px 0 0; }
h2 { font-size: 17px; letter-spacing: -.3px; margin: 0; }
h1 em { font-style: normal; color: var(--brand); }

/* hero */
.hero { display: flex; gap: 28px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 26px 30px; box-shadow: var(--shadow-sm); }
.hero-copy { flex: 1; min-width: 0; }
.hero-copy p { color: var(--ink-2); font-size: 14px; line-height: 1.6; max-width: 480px; margin: 12px 0 18px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary { height: 38px; padding: 0 16px; border: 0; border-radius: 11px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.btn-primary:hover { background: #276a58; }
.hero-art { width: 340px; max-width: 42%; height: auto; border-radius: 18px; }

.section { margin-top: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head .sub { font-size: 12px; color: var(--muted); }

/* timeline */
.timeline { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.tl-col { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px; text-align: center; border: 0; transition: transform .16s, box-shadow .16s; box-shadow: var(--shadow-sm); }
.tl-col:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(40,35,25,.10); }
.tl-col .tl-name { font-size: 12px; font-weight: 800; }
.tl-col .tl-total { font-size: 10px; color: var(--muted); margin: 2px 0 10px; }
.tl-bar { height: 74px; width: 22px; margin: 0 auto; border-radius: 6px; overflow: hidden; display: flex; flex-direction: column-reverse; background: var(--line-2); }
.tl-bar i { display: block; width: 100%; }
.tl-col .tl-legend { display: flex; justify-content: center; gap: 6px; margin-top: 9px; font-size: 10px; color: var(--muted); font-weight: 700; }

/* matrix */
.matrix { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.mx-head, .mx-row { display: grid; grid-template-columns: 34px 190px 1fr 1fr 132px; gap: 14px; align-items: center; padding: 11px 18px; }
.mx-head { background: var(--paper-2); border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mx-row { border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.mx-row:last-child { border-bottom: 0; }
.mx-row:hover { background: #fcfbf7; }
.mx-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--line-2); color: var(--ink-2); }
.mx-dim { font-weight: 800; font-size: 12.5px; }
.mx-cell { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2); line-height: 1.4; }
.mx-cell .v-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; flex: none; }
.mx-cites { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }

/* framework cards */
.frameworks { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.fw-card { display: flex; flex-direction: column; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 15px; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .16s, border-color .16s; }
.fw-card:hover { transform: translateY(-2px); border-color: #b9dbc9; }
.fw-top { display: flex; align-items: center; gap: 8px; }
.fw-tag { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; color: var(--brand); background: var(--brand-soft); padding: 2px 7px; border-radius: 6px; }
.fw-name { font-size: 13px; font-weight: 800; }
.fw-line { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.fw-link { margin-top: auto; display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; color: var(--brand); }

/* ---------- month view ---------- */
.month-head { display: flex; gap: 24px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 22px 26px; box-shadow: var(--shadow-sm); }
.month-head-copy { flex: 1; min-width: 0; }
.month-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.season-chip { font-size: 11px; font-weight: 800; color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: 20px; }
.tldr { font-size: 13px; color: var(--ink-2); line-height: 1.55; margin: 10px 0 16px; max-width: 720px; }
.stat-row { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.stat-pill { display: flex; align-items: center; gap: 7px; border-radius: 10px; padding: 7px 12px; font-size: 12px; font-weight: 800; }
.stat-pill b { font-size: 15px; }
.vbar { display: flex; height: 9px; border-radius: 6px; overflow: hidden; max-width: 520px; background: var(--line-2); }
.vbar i { display: block; height: 100%; }
.vbar-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 10.5px; color: var(--muted); font-weight: 700; flex-wrap: wrap; }
.vbar-legend span { display: flex; align-items: center; gap: 5px; }
.vbar-legend i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.head-actions { display: flex; gap: 9px; margin-top: 16px; flex-wrap: wrap; }
.btn-soft { height: 34px; padding: 0 13px; border: 1px solid var(--line); background: var(--paper-2); border-radius: 10px; font-size: 12px; font-weight: 800; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.btn-soft:hover { background: var(--brand-soft); border-color: #c9e2d7; color: var(--brand); }
.season-art { flex: none; }
.head-media { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: none; }
.source-thumb { width: 112px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); text-align: left; transition: border-color .16s, transform .16s; }
.source-thumb:hover { border-color: #b9dbc9; transform: translateY(-2px); }
.source-thumb img { width: 100%; height: 78px; object-fit: cover; object-position: top center; display: block; background: #eee; }
.source-thumb span { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 10px; font-weight: 800; color: var(--brand); padding: 6px 4px; }

.filters { display: flex; align-items: center; gap: 8px; margin: 22px 0 14px; flex-wrap: wrap; }
.filters .f-label { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.chip { height: 32px; padding: 0 13px; border: 1px solid var(--line); background: var(--paper); border-radius: 20px; font-size: 12px; font-weight: 800; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.chip:hover { border-color: #c9e2d7; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .chip-n { font-size: 10px; opacity: .7; }
.result-note { margin-left: auto; font-size: 11.5px; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 11px; scroll-margin-top: 20px; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 10px 26px rgba(40,35,25,.09); transform: translateY(-1px); }
.card.pulse { animation: pulse 1.4s ease; }
@keyframes pulse { 0%,100% { box-shadow: var(--shadow-sm); } 30% { box-shadow: 0 0 0 4px var(--brand-soft), 0 10px 26px rgba(40,35,25,.12); } }
.card-top { display: flex; align-items: center; gap: 11px; }
.tile { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.tile.cat-lang { background: var(--lang-soft); color: var(--lang); }
.tile.cat-cog { background: var(--cog-soft); color: var(--cog); }
.tile.cat-motor { background: var(--motor-soft); color: var(--motor); }
.tile.cat-creative { background: var(--creative-soft); color: var(--creative); }
.tile.cat-social { background: var(--social-soft); color: var(--social); }
.tile.cat-school { background: var(--school-soft); color: var(--school); }
.card-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.strand-label { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.verdict-pill { display: inline-flex; align-items: center; gap: 5px; width: fit-content; font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 20px; }
.verdict-pill svg { width: 12px; height: 12px; }
.v-keep { background: var(--keep-soft); color: var(--keep); }
.v-adapt { background: var(--adapt-soft); color: #a9761c; }
.v-rethink { background: var(--rethink-soft); color: var(--rethink); }
.objective { margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.42; color: var(--ink); }
.rec { display: flex; gap: 9px; align-items: flex-start; border-left: 3px solid; border-radius: 0 9px 9px 0; padding: 9px 11px; }
.rec.v-keep { background: var(--keep-soft); border-color: var(--keep); }
.rec.v-adapt { background: var(--adapt-soft); border-color: var(--adapt); }
.rec.v-rethink { background: var(--rethink-soft); border-color: var(--rethink); }
.rec-mark { flex: none; width: 19px; height: 19px; border-radius: 6px; display: grid; place-items: center; color: #fff; margin-top: 1px; }
.rec.v-keep .rec-mark { background: var(--keep); }
.rec.v-adapt .rec-mark { background: var(--adapt); }
.rec.v-rethink .rec-mark { background: var(--rethink); }
.rec-mark svg { width: 13px; height: 13px; }
.rec-text { font-size: 12px; line-height: 1.45; color: var(--ink-2); font-weight: 600; }
.rec-label { display: block; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; }
.cites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.cite { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; text-decoration: none; padding: 4px 8px; border-radius: 7px; background: var(--paper-2); border: 1px solid var(--line); color: var(--brand); transition: background .16s, border-color .16s; }
.cite:hover { background: var(--brand-soft); border-color: #b9dbc9; }
.cite svg { width: 11px; height: 11px; }

.empty { grid-column: 1 / -1; text-align: center; padding: 50px 20px; color: var(--muted); font-size: 13px; }

/* ---------- modal + lightbox ---------- */
.modal, .lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden], .lightbox[hidden] { display: none; }
.modal-backdrop, .lightbox-backdrop { position: absolute; inset: 0; background: rgba(28, 26, 20, .5); backdrop-filter: blur(2px); }
.modal-card { position: relative; width: min(700px, 100%); max-height: min(80vh, 760px); background: var(--paper); border-radius: 20px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; }
.modal-body { overflow-y: auto; padding: 20px 22px 26px; }
.src-group { margin-bottom: 20px; }
.src-group h3 { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.src-item { margin-bottom: 8px; }
.src-row { display: flex; align-items: flex-start; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px 11px 0 0; text-decoration: none; }
.src-item:not(:has(.src-alt)) .src-row { border-radius: 11px; }
.src-row:hover { background: var(--brand-soft); border-color: #c9e2d7; }
.src-alt { display: flex; align-items: center; gap: 5px; padding: 6px 12px; font-size: 10.5px; font-weight: 700; color: var(--brand); text-decoration: none; background: var(--paper-2); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; }
.src-alt:hover { background: var(--brand-soft); }
.src-tag { font-size: 9.5px; font-weight: 800; color: var(--brand); background: var(--brand-soft); padding: 3px 7px; border-radius: 6px; flex: none; margin-top: 2px; }
.src-info { flex: 1; min-width: 0; }
.src-label { display: block; font-size: 13px; font-weight: 800; }
.src-title { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.src-row > svg { color: var(--brand); margin-top: 4px; }
.legend-big { display: flex; flex-direction: column; gap: 10px; }
.legend-big .lb-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.legend-big .lb-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.legend-big .lb-name { font-size: 13px; font-weight: 800; }
.legend-big .lb-hint { font-size: 12px; color: var(--ink-2); margin-top: 3px; line-height: 1.45; }
.legend-note { font-size: 12px; color: var(--ink-2); line-height: 1.6; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 14px; }

.lightbox-figure { position: relative; margin: 0; max-width: min(760px, 92vw); max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox-figure img { max-width: 100%; max-height: 80vh; border-radius: 12px; box-shadow: var(--shadow-lg); background: #fff; }
.lightbox-figure figcaption { font-size: 12px; color: #fff; opacity: .9; }
.lightbox-close { position: absolute; top: -14px; right: -14px; background: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .mx-head, .mx-row { grid-template-columns: 30px 160px 1fr 1fr 110px; gap: 10px; padding: 10px 14px; }
  .hero-art { max-width: 36%; }
}
@media (max-width: 980px) {
  .sidebar { position: absolute; top: 0; bottom: 0; left: 0; z-index: 26; box-shadow: var(--shadow-lg); }
  .app.sidebar-collapsed .sidebar { width: 288px; flex-basis: 288px; transform: translateX(-100%); }
  .scrim.show { display: block; }
  .main { padding: 22px 22px 60px; }
  .mx-head { display: none; }
  .mx-row { grid-template-columns: 30px 1fr; gap: 8px 12px; padding: 13px 16px; }
  .mx-ico { grid-row: span 2; }
  .mx-dim { align-self: center; }
  .mx-cell { grid-column: 2; font-size: 12px; }
  .mx-cell::before { content: attr(data-label) " · "; font-weight: 800; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
  .mx-cites { grid-column: 2; justify-content: flex-start; }
  .timeline { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 700px) {
  .topbar { gap: 9px; padding: 0 12px; }
  .brand-text small { display: none; }
  .search { display: none; }
  .live-label { display: none; }
  .live-badge { padding: 0 8px; }
  .btn-label { display: none; }
  .btn-ghost { padding: 0 10px; }
  .hero { flex-direction: column; padding: 20px; }
  .hero-art { max-width: 100%; width: 100%; }
  .month-head { flex-direction: column-reverse; align-items: flex-start; padding: 18px; }
  .season-art { width: 92px; height: 92px; align-self: flex-end; }
  .cards { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
