/* Стиль альбома «BelSU-1876»: ночной изумруд, золото, кремовый текст с засечками.
   Layout: шапка со звёздной картой, ряд из восьми шляпных коробок-недель, под ним карточка открытой недели. */
:root {
  --bg: #002d28; --bg-hi: #0b4a3e; --bg-lo: #001f1b;
  --surface: #073a33; --surface-hi: #0c463d; --sunk: #022a24;
  --line: rgba(228, 199, 126, .24); --line-strong: rgba(228, 199, 126, .5);
  --ink: #f6e8bc; --muted: #d3c8a0; --faint: #93ab9f;
  --gold: #e4c77e; --gold-deep: #c9a24a; --gold-soft: rgba(228, 199, 126, .13); --on-gold: #0d2a23;
  --copper: #c98a5a; --lilac: #c3a6e0; --lid-off: #22574b;
  --ok: #a7dcb8; --ok-soft: rgba(167, 220, 184, .14); --err: #f2a48c;
  --piece: #e4c77e; --piece-ink: #0d2a23; --piece-edge: #073a33;
  --p1: #e4c77e; --p2: #c98a5a; --p3: #7fc4a4; --p4: #b49ad8; --p5: #e39bb0; --p6: #7fb0d9; --p7: #cfc47e;
  --f-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --f-body: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; position: relative; overflow-x: hidden;
  color: var(--ink); font: 15px/1.6 var(--f-body);
  background:
    url("/static/img/stars.svg") 0 0 / 640px 640px repeat,
    radial-gradient(1100px 620px at 12% -8%, var(--bg-hi), transparent 70%),
    radial-gradient(900px 700px at 105% 18%, #06463b, transparent 70%),
    radial-gradient(1200px 900px at 50% 120%, var(--bg-lo), transparent 70%),
    var(--bg);
}
/* золотые линии со вспышками в верхних углах, как на развороте альбома */
body::before, body::after {
  content: ""; position: absolute; top: 0; width: min(520px, 70vw); height: min(320px, 43vw);
  background: url("/static/img/swoosh.svg") 0 0 / 100% 100% no-repeat; pointer-events: none; z-index: 0;
}
body::before { left: 0; }
body::after { right: 0; transform: scaleX(-1); opacity: .32; }
h1, h2, h3, p, ul, figure, dl, dd, blockquote { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: rgba(228, 199, 126, .35); }

.wrap {
  position: relative; z-index: 1;
  max-width: 1040px; margin: 0 auto;
  padding-block: 48px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 28px;
}
.wrap.wide { max-width: 1240px; }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* Шапка: слева название, справа звезда BelSU-1876 на тонком контуре Пегаса — как разворот альбома */
.top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); grid-template-areas: "text sky" "status status" "user user"; gap: 18px 48px; align-items: center; }
.top-text { grid-area: text; display: flex; flex-direction: column; gap: 18px; padding-block: 12px; }
.top .status-row { grid-area: status; }
.top .userbar { grid-area: user; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
h1 {
  font-family: var(--f-display); font-weight: 500; font-size: clamp(48px, 8.2vw, 88px); line-height: .98; letter-spacing: -.005em;
  color: var(--ink); text-shadow: 0 0 34px rgba(246, 232, 188, .18); text-wrap: balance;
}
.subtitle { display: flex; align-items: center; gap: 14px; font-family: var(--f-display); font-style: italic; font-size: clamp(19px, 2.4vw, 24px); line-height: 1.3; color: var(--gold); }
.subtitle::before { content: ""; flex: none; width: 44px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }

.sky { grid-area: sky; width: 100%; }
.sky-map { display: block; width: 100%; height: auto; overflow: visible; }
.sky-dust circle { fill: #f6e8bc; }
/* При открытии сайта: Пегас прорисовывается линия за линией, последней загорается звезда BelSU-1876 */
.sky-lines line {
  stroke: var(--gold); stroke-width: .13; stroke-linecap: round; opacity: .42;
  stroke-dasharray: var(--len); animation: draw .9s ease-out both; animation-delay: calc(var(--i) * 110ms + 300ms);
}
.sky-stars circle { fill: #fff4d2; opacity: .9; animation: appear .7s ease-out both; animation-delay: calc(var(--i) * 80ms + 150ms); }
.sky-halo { animation: appear 1.4s ease-out 1.9s both, breathe 5s ease-in-out 3.3s infinite; }
.sky-star { fill: #b89549; transform-box: fill-box; transform-origin: center; animation: ignite 1.3s cubic-bezier(.2, .8, .2, 1) 1.75s both; } /* матовое золото звезды из альбома */
.sky-name { font-family: var(--f-body); font-size: 1.3px; font-weight: 600; letter-spacing: .3px; fill: var(--gold); animation: appear .9s ease-out 2.6s both; }
@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; } }
@keyframes ignite { 0% { opacity: 0; transform: scale(.15) rotate(-60deg); } 55% { opacity: 1; transform: scale(1.18) rotate(6deg); } 100% { transform: none; } }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.top-text > * { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.top-text > :nth-child(2) { animation-delay: .12s; }
.top-text > :nth-child(3) { animation-delay: .3s; }
.sky { animation: appear 1s ease-out both; }
/* снег, мерцание и падающие звёзды рисует fx.js на этом холсте позади страницы */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-top: 6px; }
.status { font-weight: 500; }
.progress { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.progress-icons { display: flex; gap: 6px; }
.progress-icons svg { width: 22px; height: 22px; }
.userbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--muted); font-size: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.userbar b { color: var(--ink); font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
.link-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.banner { background: var(--gold-soft); border: 1px solid var(--line); color: var(--ink); border-radius: 12px; padding: 12px 16px; font-size: 14px; }

/* Вход */
.login { max-width: 520px; }
.login form, .confirm { display: flex; flex-direction: column; gap: 12px; }
.confirm { padding-top: 16px; border-top: 1px solid var(--line); }
.msg { font-size: 14px; min-height: 1.5em; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }

/* Шляпные коробки */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.box {
  position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 156px;
  padding: 30px 16px 14px; text-align: left; cursor: pointer; color: var(--ink);
  background: linear-gradient(180deg, var(--surface-hi), var(--surface));
  border: 1px solid var(--line); border-radius: 10px 10px 18px 18px;
  box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease;
}
/* Крышка — отдельный элемент, чтобы её можно было приподнять; лента посередине едет вместе с ней */
.box-lid {
  position: absolute; inset: 0 0 auto; height: 14px; border-radius: 9px 9px 0 0; overflow: hidden;
  background: var(--lid-off); transform-origin: 6% 100%; transition: transform .35s cubic-bezier(.3, .9, .3, 1.2);
}
.box-lid::after { content: ""; position: absolute; top: 0; height: 14px; left: 50%; width: 22px; margin-left: -11px; background: var(--bg); opacity: .55; }
.box.is-open .box-lid { background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep)); }
.box.is-done .box-lid { background: linear-gradient(90deg, #a8673d, var(--copper), #a8673d); }
.box.is-open:hover .box-lid, .box.is-done:hover .box-lid { transform: translateY(-3px) rotate(-1.5deg); }
.box.is-open[aria-pressed="true"] .box-lid, .box.is-done[aria-pressed="true"] .box-lid { transform: translateY(-5px) rotate(-2.5deg); }
.box.opening .box-lid { animation: lid-open .75s cubic-bezier(.2, .9, .25, 1.15); }
.box.rattle { animation: rattle .45s ease-in-out; }
/* блик пробегает по крышке текущей недели */
.box.is-current .box-lid::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 250, 226, .8) 50%, transparent 65%) no-repeat;
  background-size: 300% 100%; animation: shine 6s ease-in-out 2.5s infinite;
}
.grid.intro .box { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 70ms + 200ms); }
.detail.enter { animation: rise .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes lid-open { 0% { transform: none; } 40% { transform: translateY(-16px) rotate(-9deg); } 100% { transform: translateY(-5px) rotate(-2.5deg); } }
@keyframes rattle { 20% { transform: rotate(-1.4deg); } 45% { transform: rotate(1.2deg); } 70% { transform: rotate(-.6deg); } }
@keyframes shine { 0% { background-position: 120% 0; } 30%, 100% { background-position: -20% 0; } }
/* золотые искры: появляются при открытии коробки, получении фигуры и сложенном финале */
.spark {
  position: fixed; z-index: 60; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff7da 0, #e4c77e 45%, transparent 72%); animation: spark var(--t, .9s) cubic-bezier(.15, .7, .3, 1) forwards;
}
.spark.star { width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 0; background: #f0d48c;
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); }
@keyframes spark { 0% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3) rotate(140deg); } }
.box:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.box:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.box[aria-pressed="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold), 0 0 26px -6px rgba(228, 199, 126, .45); }
.box-n { font-family: var(--f-display); font-weight: 500; font-size: 40px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; color: var(--gold); }
.box.is-locked .box-n { color: var(--faint); }
.box-title { font-family: var(--f-display); font-size: 17px; line-height: 1.25; }
.box.is-locked .box-title { color: var(--faint); font-style: italic; }
.box-date { font-size: 13px; color: var(--muted); }
.box-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.box-foot svg { width: 26px; height: 26px; flex: none; }

.chip { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: rgba(246, 232, 188, .08); color: var(--muted); white-space: nowrap; }
.chip.open { background: var(--gold); color: var(--on-gold); }
.chip.done { background: var(--ok-soft); color: var(--ok); }

/* Карточки */
.detail, .card {
  position: relative; background: linear-gradient(180deg, rgba(12, 70, 61, .92), rgba(7, 58, 51, .92));
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: 30px; display: flex; flex-direction: column; gap: 18px; min-width: 0;
}
.d-head { display: flex; flex-direction: column; gap: 6px; }
.d-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
h2 { font-family: var(--f-display); font-weight: 500; font-size: clamp(28px, 4.4vw, 40px); line-height: 1.1; text-wrap: balance; }
h3 { font-size: 17px; font-weight: 600; }
.task { font-size: 17px; max-width: 62ch; }
.note { color: var(--muted); font-size: 14px; max-width: 62ch; }
.party { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; max-width: 70ch; }
.label { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.reward { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.reward svg { width: 28px; height: 28px; flex: none; }
.reward.got { color: var(--ink); padding: 12px 16px; border-radius: 12px; background: var(--gold-soft); border: 1px solid var(--line-strong); max-width: 70ch; }
.reward.got svg { width: 40px; height: 40px; filter: drop-shadow(0 0 8px rgba(228, 199, 126, .6)); animation: pop .5s ease-out; }
@keyframes pop { 0% { transform: scale(.4) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: none; opacity: 1; } }
.ideas { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.ideas b { color: var(--ink); font-weight: 500; }

/* Неделя 1: приглашение ректора */
.invite { display: flex; flex-direction: column; gap: 18px; }
.invite-quote {
  font-family: var(--f-display); font-style: italic; font-size: clamp(20px, 2.8vw, 26px); line-height: 1.35; color: var(--ink);
  padding-left: 18px; border-left: 2px solid var(--gold); max-width: 40ch;
}
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.facts > div { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--sunk); min-width: 0; }
.facts dd { font-family: var(--f-display); font-size: 21px; line-height: 1.3; }
.facts .wide { grid-column: 1 / -1; }
.facts ul { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-family: var(--f-body); font-size: 15px; }
.invite-photo { display: flex; flex-direction: column; gap: 6px; }
.invite-photo img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--sunk); box-shadow: var(--shadow); }
.invite-photo figcaption { font-size: 12px; color: var(--faint); }
.caption { font-size: 12px; color: var(--faint); }

.field { display: flex; flex-direction: column; gap: 6px; max-width: 640px; min-width: 0; }
.field.full { max-width: none; }
.field label { font-weight: 500; font-size: 14px; }
textarea, input[type="text"], input[type="password"] {
  width: 100%; background: rgba(0, 31, 27, .7); border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 13px; color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 96px; resize: vertical; }
textarea:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
input[type="file"] { font-size: 14px; }
input[type="checkbox"] { accent-color: var(--gold); width: 16px; height: 16px; }
input[readonly], textarea[readonly] { color: var(--muted); font-size: 14px; }
.photo-preview { max-width: 280px; border-radius: 12px; display: block; }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font-weight: 500; font-size: 14px; line-height: 1.4;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover:not(:disabled) { border-color: var(--gold); background-color: rgba(228, 199, 126, .08); }
.btn-primary { background: linear-gradient(180deg, #ecd28f, var(--gold) 55%, #d6b264); border-color: var(--gold); color: var(--on-gold); font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #f3dca0, #e9cd86 55%, #dcb96c); }
.btn-quiet { border-color: var(--line); }
.btn-danger { border-color: var(--err); color: var(--err); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 8px; }

/* Танграм */
.board-wrap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.board { display: block; width: 100%; max-width: 100%; height: auto; background: var(--sunk); border: 1px solid var(--line); border-radius: 14px; touch-action: none; user-select: none; -webkit-user-select: none; }
.board .dot { fill: rgba(228, 199, 126, .22); }
.board .target { fill: none; stroke: var(--gold); stroke-opacity: .6; stroke-width: .06; stroke-dasharray: .3 .2; }
.pc { cursor: grab; outline: none; }
.pc:active { cursor: grabbing; }
.shape { stroke: var(--piece-edge); stroke-width: .07; stroke-linejoin: round; }
.shape.k0 { fill: var(--p1); } .shape.k1 { fill: var(--p2); } .shape.k2 { fill: var(--p3); } .shape.k3 { fill: var(--p4); }
.shape.k4 { fill: var(--p5); } .shape.k5 { fill: var(--p6); } .shape.k6 { fill: var(--p7); }
.shape.puz { fill: var(--piece); stroke: none; }
.edge { fill: none; stroke: var(--piece-edge); stroke-width: .07; stroke-linejoin: round; }
.pc.sel .shape, .pc.sel .edge, .pc:focus-visible .shape, .pc:focus-visible .edge { stroke: #fff6da; stroke-width: .15; }
.hint-text { font-family: var(--f-body); font-weight: 600; font-size: 1.12px; fill: var(--piece-ink); text-anchor: middle; dominant-baseline: central; letter-spacing: .03px; }
.figure { display: block; width: 100%; max-width: 340px; height: auto; }
.icon-on { fill: var(--gold); }
.icon-off { fill: none; stroke: var(--faint); stroke-width: .35; stroke-dasharray: .6 .4; }
.solved { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 14px; background: var(--gold-soft); border: 1px solid var(--line-strong); }
.solved-text { font-family: var(--f-display); font-style: italic; font-size: 30px; line-height: 1.2; }
.santa-fig { display: flex; justify-content: center; padding: 16px; background: var(--sunk); border: 1px solid var(--line); border-radius: 14px; }
.santa-title { font-family: var(--f-display); font-style: italic; font-size: 22px; color: var(--gold); }
.rules { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; max-width: 62ch; }
.final { display: flex; flex-direction: column; gap: 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.final-title { font-family: var(--f-display); font-weight: 500; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; }

/* Пульт организатора */
.section { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: rgba(7, 58, 51, .9); }
table.people { border-collapse: collapse; width: 100%; min-width: 680px; font-size: 14px; }
.people th, .people td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.people th { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); background: var(--sunk); }
.people th.wk, .people td.wk { text-align: center; padding-inline: 4px; }
.people tr:last-child td { border-bottom: 0; }
.people tr.is-sel td { background: var(--gold-soft); }
.people .who { background: none; border: 0; padding: 0; font-weight: 600; cursor: pointer; text-align: left; color: var(--ink); }
.people .who:hover { color: var(--gold); }
.people .who:focus-visible, .cell:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.people .seen { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.cell { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; padding: 0; display: inline-grid; place-items: center; }
.cell:hover:not([disabled]) { background: rgba(246, 232, 188, .08); }
.dot-mark { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; }
.st-none { border: 2px solid var(--line-strong); background: transparent; }
.st-open { background: var(--gold); }
.st-done { background: var(--ok); }
.st-locked { background: transparent; border: 2px dashed var(--line); width: 12px; height: 12px; }
.cell[disabled] { cursor: default; }
.person-weeks { display: flex; flex-direction: column; gap: 0; }
.pw { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.pw.is-focus { background: var(--gold-soft); border-radius: 10px; padding-inline: 10px; margin-inline: -10px; }
.pw-n { font-family: var(--f-display); font-size: 24px; line-height: 1.1; color: var(--gold); }
.pw-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pw-meta { font-size: 13px; color: var(--muted); }
.pw-answer { white-space: pre-wrap; overflow-wrap: anywhere; }
.pw .figure { max-width: 180px; }
.answers { display: flex; flex-direction: column; gap: 0; }
.answers > .row { padding-bottom: 12px; }
.ans { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.answers b { font-weight: 600; overflow-wrap: anywhere; }
.answers p { white-space: pre-wrap; overflow-wrap: anywhere; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs .btn[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.gallery figure { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--sunk); }
.pairs { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.share code { font-size: 15px; padding: 8px 12px; border-radius: 10px; background: var(--sunk); border: 1px solid var(--line); overflow-wrap: anywhere; }

/* Лента действий */
.feed { list-style: none; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: rgba(7, 58, 51, .9); overflow: hidden; }
.feed li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 2px 14px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.feed li:first-child { border-top: 0; }
.feed time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed .who { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.feed .who:hover { color: var(--gold); }
.feed .who:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.feed .what { color: var(--muted); }
.feed .what.key { color: var(--ok); }
.feed.compact { border: 0; background: none; border-radius: 0; }
.feed.compact li { padding-inline: 0; }

footer { color: var(--faint); font-size: 13px; max-width: 70ch; display: flex; flex-direction: column; gap: 6px; padding-top: 18px; border-top: 1px solid var(--line); }
footer .coords { font-size: 11px; letter-spacing: .12em; color: var(--gold); opacity: .8; }

@media (max-width: 760px) {
  .wrap { padding-top: 28px; gap: 22px; }
  .top { grid-template-columns: minmax(0, 1fr); grid-template-areas: "sky" "text" "status" "user"; gap: 14px; }
  .top-text { padding-block: 0; gap: 14px; }
  .sky { width: min(250px, 70vw); justify-self: center; }
  .subtitle::before { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .detail, .card { padding: 22px 18px; }
  .task { font-size: 16px; }
  .ans { grid-template-columns: minmax(0, 1fr); }
  .feed li { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .box, .btn, .box-lid { transition: none; }
  .box:hover, .box .box-lid { transform: none !important; }
  .sky-lines line, .sky-stars circle, .sky-halo, .sky-star, .sky-name, .top-text > *, .sky, .grid.intro .box,
  .detail.enter, .box.opening .box-lid, .box.rattle, .box.is-current .box-lid::before, .reward.got svg { animation: none; }
  #fx, .spark { display: none; }
}
