/* ===== Тайный Санта — праздничная тема ===== */
:root {
  --night-1: #071433;
  --night-2: #0e2a66;
  --night-3: #1b4fa8;
  --red: #e5383b;
  --red-2: #c1121f;
  --gold: #ffc94a;
  --gold-2: #f4a700;
  --green: #2a9d63;
  --green-2: #1b7a4b;
  --ink: #1d2340;
  --muted: #6b7191;
  --line: #e6e9f5;
  --card: #ffffff;
  --card-2: #f6f8ff;
  --shadow: 0 18px 40px -18px rgba(3, 10, 40, .55), 0 2px 6px rgba(3, 10, 40, .12);
  --radius: 22px;
  --font: "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-title: "Lobster", "Nunito", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--night-1);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(80, 140, 255, .35), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(140, 90, 255, .25), transparent 60%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 55%, var(--night-3) 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: var(--red-2); }
img { max-width: 100%; }

/* звёзды */
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 120px 80px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 200px 150px, #cfe3ff, transparent),
    radial-gradient(1px 1px at 300px 40px, #fff, transparent),
    radial-gradient(2px 2px at 380px 120px, #fff7cf, transparent),
    radial-gradient(1px 1px at 460px 200px, #fff, transparent);
  background-size: 500px 260px;
  opacity: .55;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: .7; } }
#snow { position: fixed; inset: 0; pointer-events: none; z-index: 1; }

/* ===== гирлянда ===== */
.garland {
  position: relative; z-index: 3; height: 34px; overflow: hidden;
  display: flex; justify-content: space-around; padding: 0 10px;
}
.garland::before {
  content: ""; position: absolute; left: -5%; right: -5%; top: -22px; height: 40px;
  border-bottom: 2px solid #2b3556; border-radius: 50%;
}
.garland i {
  position: relative; top: 12px; width: 12px; height: 18px; border-radius: 50%;
  background: var(--c); box-shadow: 0 4px 18px 3px var(--c);
  animation: blink 1.6s ease-in-out infinite; animation-delay: var(--d);
}
.garland i::before {
  content: ""; position: absolute; top: -5px; left: 3px; width: 6px; height: 6px;
  background: #2b3556; border-radius: 2px;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; box-shadow: none; } }

/* ===== шапка ===== */
.topbar {
  position: relative; z-index: 3;
  max-width: 1180px; width: 100%; margin: 0 auto; padding: 6px 20px 0;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff;
  font-family: var(--font-title); font-size: 30px; letter-spacing: .5px;
  text-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.brand .hat { font-size: 34px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav a, .nav button.linklike {
  color: #dfe8ff; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 9px 14px; border-radius: 999px; transition: background .2s, color .2s;
  background: transparent; border: 0; cursor: pointer; font-family: inherit;
}
.nav a:hover, .nav button.linklike:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav a.active { background: #fff; color: var(--night-2); }
.nav .me { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; padding-left: 8px; }

/* ===== основное ===== */
main {
  position: relative; z-index: 2; flex: 1;
  max-width: 1180px; width: 100%; margin: 0 auto; padding: 24px 20px 40px;
}
.page-title {
  font-family: var(--font-title); color: #fff; font-weight: 400;
  font-size: clamp(34px, 5vw, 54px); margin: 10px 0 6px;
  text-shadow: 0 4px 0 rgba(0,0,0,.2), 0 0 30px rgba(120,170,255,.45);
}
.page-sub { color: #c9d6ff; font-size: 18px; margin: 0 0 26px; max-width: 760px; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px; position: relative;
}
.card + .card { margin-top: 22px; }
.card h2 { margin: 0 0 14px; font-size: 24px; }
.card h3 { margin: 0 0 10px; font-size: 19px; }
.card.snowcap { margin-top: 16px; }
.card.snowcap::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: -12px; height: 26px;
  background:
    radial-gradient(circle at 12px 18px, #fff 12px, transparent 13px) 0 0 / 38px 26px repeat-x;
  filter: drop-shadow(0 -2px 2px rgba(0,0,0,.08));
  pointer-events: none;
}
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-main { grid-template-columns: 1fr; }
}

/* ===== кнопки и поля ===== */
.btn {
  --b: var(--red); --b2: var(--red-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; text-decoration: none; font-family: inherit;
  font-weight: 800; font-size: 16px; color: #fff;
  padding: 13px 24px; border-radius: 999px;
  background: linear-gradient(180deg, var(--b), var(--b2));
  box-shadow: 0 6px 0 rgba(0,0,0,.18), 0 10px 22px -8px var(--b2);
  transition: transform .12s, box-shadow .12s, filter .2s;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.btn.green { --b: #34b574; --b2: var(--green-2); }
.btn.gold { --b: var(--gold); --b2: var(--gold-2); color: #4a2d00; }
.btn.blue { --b: #3f7ee8; --b2: #2155b8; }
.btn.ghost {
  background: var(--card-2); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line);
}
.btn.ghost:hover { box-shadow: inset 0 0 0 2px #c8cfe8; }
.btn.small { padding: 8px 14px; font-size: 14px; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.btn.big { padding: 17px 34px; font-size: 19px; }
.btn.block { width: 100%; }
.btn.danger { --b: #f05454; --b2: #b3261e; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

label.lbl { display: block; font-weight: 800; margin: 0 0 7px; }
.field { margin-bottom: 18px; }
input[type=text], input[type=password], input[type=number], input[type=url], textarea, select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 13px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--card-2);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: #7aa2ff; background: #fff; box-shadow: 0 0 0 4px rgba(122,162,255,.22);
}
textarea { resize: vertical; min-height: 84px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.inline-form { display: inline; }

/* ===== уведомления ===== */
.flashes { display: grid; gap: 10px; margin-bottom: 20px; }
.flash {
  padding: 14px 18px; border-radius: 16px; font-weight: 700; background: #e8fff1; color: #145c37;
  box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center;
  animation: drop .45s cubic-bezier(.2,1.4,.4,1);
}
.flash.error { background: #ffe9e9; color: #8f1d1d; }
.flash.warn { background: #fff6dc; color: #6a4a00; }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } }

/* ===== аватарки ===== */
.ava {
  --s: 56px; position: relative; flex: none;
  width: var(--s); height: var(--s); border-radius: 50%;
  display: inline-grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff8, transparent 55%), var(--bg, #e9eefc);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.08), 0 4px 10px -4px rgba(0,0,0,.35);
  font-size: calc(var(--s) * .58); line-height: 1;
}
.ava .hat-svg {
  position: absolute; width: 62%; top: -24%; right: -14%; transform: rotate(18deg);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.25));
}
.ava.empty { color: #9aa3c7; font-size: calc(var(--s) * .45); font-weight: 900; }
.ava.xs { --s: 32px; } .ava.sm { --s: 42px; } .ava.lg { --s: 96px; } .ava.xl { --s: 140px; }

.avatar-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px;
}
.avatar-option { position: relative; cursor: pointer; }
.avatar-option input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-option .tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 18px 8px 12px; border-radius: 20px; background: var(--card-2);
  border: 3px solid transparent; transition: transform .18s, border-color .18s, background .18s;
  font-weight: 700; font-size: 13px; color: var(--muted); min-height: 140px;
}
.avatar-option:hover .tile { transform: translateY(-4px) rotate(-1deg); background: #fff; }
.avatar-option input:checked + .tile {
  border-color: var(--red); background: #fff5f5; color: var(--ink);
  box-shadow: 0 10px 24px -12px var(--red);
}
.avatar-option input:checked + .tile .ava { animation: wiggle .6s; }
.avatar-option input:focus-visible + .tile { outline: 3px solid #7aa2ff; }
@keyframes wiggle { 25% { transform: rotate(-10deg) scale(1.08); } 75% { transform: rotate(10deg) scale(1.08); } }

/* ===== главная участника ===== */
.hero {
  display: flex; gap: 22px; align-items: center; color: #fff; margin: 6px 0 26px; flex-wrap: wrap;
}
.hero h1 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: clamp(32px, 4.5vw, 50px); }
.hero p { margin: 4px 0 0; color: #c9d6ff; font-size: 17px; }

.countdown { display: flex; gap: 10px; margin-left: auto; }
.countdown .cell {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(6px);
  border-radius: 16px; padding: 10px 12px; min-width: 70px; text-align: center; color: #fff;
}
.countdown .num { font-size: 30px; font-weight: 900; line-height: 1; }
.countdown .unit { font-size: 12px; color: #c9d6ff; margin-top: 4px; }
.countdown-caption { color: #c9d6ff; font-size: 13px; text-align: right; margin-top: 6px; }

.steps { display: grid; gap: 12px; }
.step {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 18px;
  background: var(--card-2); text-decoration: none; color: var(--ink);
  border: 2px solid transparent; transition: transform .15s, border-color .15s;
}
.step:hover { transform: translateX(4px); border-color: var(--line); }
.step .num {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 900; font-size: 18px; background: #fff; box-shadow: inset 0 0 0 3px var(--line); color: var(--muted);
}
.step.done .num { background: var(--green); color: #fff; box-shadow: none; }
.step .t { font-weight: 800; font-size: 17px; }
.step .d { color: var(--muted); font-size: 14px; }
.step .go { margin-left: auto; font-weight: 800; color: var(--red-2); white-space: nowrap; }
.step.done .go { color: var(--green-2); }

.progress { height: 14px; border-radius: 999px; background: #edf0fa; overflow: hidden; }
.progress > span {
  display: block; height: 100%; border-radius: inherit;
  background: repeating-linear-gradient(45deg, var(--red) 0 12px, #ff6b6b 12px 24px);
  animation: candy 1.2s linear infinite; background-size: 34px 34px;
  transition: width .6s;
}
@keyframes candy { to { background-position: 34px 0; } }

.status-banner {
  border-radius: var(--radius); padding: 26px; color: #fff; box-shadow: var(--shadow);
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap; position: relative; overflow: hidden;
}
.status-banner.red { background: linear-gradient(135deg, #ff5a5f, #b3122a); }
.status-banner.green { background: linear-gradient(135deg, #34c17f, #157347); }
.status-banner.blue { background: linear-gradient(135deg, #4b8bff, #2346a8); }
.status-banner .big-emoji { font-size: 64px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.3)); }
.status-banner h2 { margin: 0 0 6px; font-size: 26px; }
.status-banner p { margin: 0; opacity: .92; }
.status-banner .btn { margin-left: auto; }
.status-banner::after {
  content: "❄"; position: absolute; right: -10px; bottom: -40px; font-size: 160px; opacity: .1;
}

.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.info-list li { display: flex; gap: 12px; align-items: center; }
.info-list .ic {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
  background: #fff3e0; flex: none;
}
.info-list b { display: block; }

.people { display: flex; flex-wrap: wrap; gap: 14px; }
.person { display: flex; flex-direction: column; align-items: center; width: 76px; text-align: center; gap: 6px; }
.person .nm { font-size: 12px; font-weight: 700; line-height: 1.2; color: var(--ink); word-break: break-word; }
.person.pending { opacity: .45; filter: grayscale(.7); }

/* ===== анкета ===== */
.q-card { padding: 18px 20px; border-radius: 18px; background: var(--card-2); margin-bottom: 14px; }
.q-card .q { font-weight: 800; margin-bottom: 10px; display: flex; gap: 10px; }
.q-card .q .n {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff;
  display: grid; place-items: center; font-size: 14px;
}
.answers { display: grid; gap: 12px; }
.answer { padding: 14px 16px; border-radius: 16px; background: var(--card-2); }
.answer .q { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.answer .a { font-size: 16px; white-space: pre-wrap; word-break: break-word; }

/* ===== вишлист ===== */
.wishes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wish {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px;
  background: var(--card-2); border-left: 6px solid var(--c, var(--red));
}
.wish:nth-child(4n+2) { --c: var(--green); }
.wish:nth-child(4n+3) { --c: var(--gold-2); }
.wish:nth-child(4n+4) { --c: #3f7ee8; }
.wish .ico { font-size: 26px; line-height: 1; }
.wish .body { flex: 1; min-width: 0; }
.wish .txt { font-weight: 700; font-size: 16px; word-break: break-word; }
.wish a.lnk { font-size: 14px; word-break: break-all; }
.wish form.edit { display: grid; gap: 8px; }
.wish .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick label { cursor: pointer; }
.icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.icon-pick span {
  width: 40px; height: 40px; display: grid; place-items: center; font-size: 22px;
  border-radius: 12px; background: #fff; border: 2px solid var(--line);
  transition: transform .12s, border-color .12s, background .12s;
}
.icon-pick label:hover span { transform: translateY(-2px); }
.icon-pick input:checked + span { border-color: var(--red); background: #fff5f5; box-shadow: 0 4px 10px -4px var(--red); }
.icon-pick input:focus-visible + span { outline: 3px solid #7aa2ff; }
.lock-note {
  display: flex; gap: 12px; align-items: flex-start; max-width: 820px;
  background: #fff6dc; color: #5c4100; border-radius: 18px; padding: 16px 18px; margin-bottom: 20px;
  box-shadow: var(--shadow); font-size: 15px; line-height: 1.45;
}
.lock-note > :first-child { font-size: 22px; }
.empty-state { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty-state .e { font-size: 54px; }

/* ===== подопечный: подарок-раскрытие ===== */
.reveal-stage { display: grid; place-items: center; padding: 30px 0 10px; text-align: center; color: #fff; }
.giftbox {
  position: relative; width: 220px; height: 210px; cursor: pointer; border: 0; background: none;
  animation: shake 2.4s ease-in-out infinite; padding: 0;
}
.giftbox:focus-visible { outline: 3px solid var(--gold); outline-offset: 10px; border-radius: 16px; }
.giftbox .box {
  position: absolute; bottom: 0; left: 15px; width: 190px; height: 140px; border-radius: 12px;
  background: linear-gradient(90deg, transparent 80px, var(--gold) 80px 110px, transparent 110px),
              linear-gradient(180deg, #ff5a5f, #c1121f);
  box-shadow: inset 0 -12px 0 rgba(0,0,0,.12), 0 20px 40px -10px rgba(0,0,0,.6);
}
.giftbox .lid {
  position: absolute; top: 34px; left: 0; width: 220px; height: 46px; border-radius: 12px;
  background: linear-gradient(90deg, transparent 95px, var(--gold-2) 95px 125px, transparent 125px),
              linear-gradient(180deg, #ff6b6f, #d62832);
  box-shadow: 0 8px 0 rgba(0,0,0,.12);
  transition: transform .7s cubic-bezier(.3,1.6,.5,1);
  transform-origin: 20% 100%;
}
.giftbox .bow {
  position: absolute; top: -6px; left: 70px; width: 80px; height: 44px;
}
.giftbox .bow::before, .giftbox .bow::after {
  content: ""; position: absolute; top: 0; width: 40px; height: 40px; border: 10px solid var(--gold);
  border-radius: 50% 50% 0 50%;
}
.giftbox .bow::before { left: 0; transform: rotate(-20deg); }
.giftbox .bow::after { right: 0; transform: rotate(110deg); }
.giftbox.open { animation: none; }
.giftbox.open .lid { transform: translate(-40px, -120px) rotate(-35deg); opacity: 0; transition: transform .8s, opacity .8s .3s; }
@keyframes shake {
  0%, 70%, 100% { transform: rotate(0); }
  75% { transform: rotate(-5deg); } 80% { transform: rotate(5deg); }
  85% { transform: rotate(-4deg); } 90% { transform: rotate(3deg); }
}
.reveal-hint { margin-top: 22px; font-size: 20px; font-weight: 800; }
.reveal-hint small { display: block; font-weight: 600; color: #c9d6ff; font-size: 15px; margin-top: 4px; }

.recipient-hero {
  display: flex; gap: 26px; align-items: center; flex-wrap: wrap;
  animation: pop .7s cubic-bezier(.2,1.5,.4,1);
}
.recipient-hero .label { color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: 13px; }
.recipient-hero .name { font-family: var(--font-title); font-size: clamp(34px, 5vw, 50px); color: var(--red-2); line-height: 1.1; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.hidden { display: none !important; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: 13px; font-weight: 800; background: #edf0fa; color: var(--muted); white-space: nowrap;
}
.badge.ok { background: #dff7ea; color: var(--green-2); }
.badge.no { background: #ffe6e6; color: #b3261e; }
.badge.wait { background: #fff3d6; color: #8a5a00; }

/* ===== переписка ===== */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a {
  padding: 11px 18px; border-radius: 999px; text-decoration: none; font-weight: 800;
  background: rgba(255,255,255,.12); color: #fff;
}
.tabs a.active { background: #fff; color: var(--night-2); }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 6px 4px 10px; }
.msg { max-width: 78%; padding: 12px 16px; border-radius: 20px; white-space: pre-wrap; word-break: break-word; }
.msg .meta { font-size: 12px; opacity: .7; margin-top: 4px; }
.msg.mine { align-self: flex-end; background: linear-gradient(180deg, #ff5a5f, #d62832); color: #fff; border-bottom-right-radius: 6px; }
.msg.theirs { align-self: flex-start; background: var(--card-2); border-bottom-left-radius: 6px; }
.chat-form { display: flex; gap: 10px; margin-top: 14px; align-items: flex-end; }
.chat-form textarea { min-height: 56px; }

/* ===== таблицы (админ) ===== */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.tbl th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 800; padding: 4px 12px; white-space: nowrap; }
.tbl td { background: var(--card-2); padding: 12px; vertical-align: middle; }
.tbl td:first-child { border-radius: 14px 0 0 14px; }
.tbl td:last-child { border-radius: 0 14px 14px 0; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: #eef2ff; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.who a { color: inherit; text-decoration: none; }
.who a:hover { text-decoration: underline; }
.who .lg { font-size: 12px; color: var(--muted); font-weight: 600; }
.checks { display: flex; gap: 6px; }
.chk {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 15px;
  background: #ffe6e6;
}
.chk.on { background: #dff7ea; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--card); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat .v { font-size: 34px; font-weight: 900; line-height: 1; }
.stat .k { color: var(--muted); font-weight: 700; font-size: 14px; margin-top: 6px; }
.stat .e { position: absolute; right: 12px; top: 10px; font-size: 30px; opacity: .9; }

.chain { display: grid; gap: 10px; }
.link-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto; gap: 14px; align-items: center;
  padding: 12px 16px; background: var(--card-2); border-radius: 18px;
}
.link-row .arrow { font-size: 22px; color: var(--red); font-weight: 900; }
.link-row .st { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) {
  .link-row { grid-template-columns: 1fr; }
  .link-row .arrow { transform: rotate(90deg); justify-self: start; margin-left: 12px; }
  .link-row .st { justify-content: flex-start; }
}

details.fold > summary { cursor: pointer; font-weight: 800; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "＋ "; color: var(--red); }
details.fold[open] > summary::before { content: "－ "; }

/* учётные данные / печать */
.cred-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cred {
  border: 3px dashed #f1b8b8; border-radius: 22px; padding: 22px; text-align: center; background:
    radial-gradient(circle at 100% 0, #fff2c4 0 60px, transparent 61px), #fffafa;
  break-inside: avoid;
}
.cred .t { font-family: var(--font-title); font-size: 28px; color: var(--red-2); }
.cred .nm { font-weight: 900; font-size: 18px; margin: 6px 0 12px; }
.cred .kv { display: grid; gap: 6px; text-align: left; background: #fff; border-radius: 14px; padding: 12px 14px; }
.cred code { font-size: 17px; font-weight: 800; color: var(--ink); background: #f1f4ff; padding: 2px 8px; border-radius: 8px; }
.cred .url { font-size: 13px; color: var(--muted); margin-top: 10px; word-break: break-all; }

/* ===== вход ===== */
.login-wrap { min-height: calc(100vh - 220px); display: grid; place-items: center; }
.login-card { width: 100%; max-width: 440px; text-align: center; }
.login-card .santa { font-size: 84px; line-height: 1; margin-top: -76px; filter: drop-shadow(0 10px 14px rgba(0,0,0,.35)); animation: bob 3s ease-in-out infinite; }
.login-card h1 { font-family: var(--font-title); font-weight: 400; color: var(--red-2); font-size: 40px; margin: 10px 0 4px; }
.login-card form { text-align: left; margin-top: 20px; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }

/* ===== подвал с сугробами ===== */
.footer { position: relative; z-index: 2; margin-top: 40px; }
.footer svg { display: block; width: 100%; height: 120px; }
.footer .copy {
  background: #fff; text-align: center; color: var(--muted); font-size: 13px; padding: 4px 16px 18px;
}

/* ===== кусочки ===== */
.tree-deco { position: absolute; right: 22px; top: -30px; font-size: 54px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.kbd { font-family: ui-monospace, Consolas, monospace; background: #f1f4ff; padding: 2px 7px; border-radius: 7px; }
hr.sep { border: 0; border-top: 2px dashed var(--line); margin: 22px 0; }

@media (max-width: 640px) {
  main { padding: 14px 16px 30px; }
  .card { padding: 20px 18px; }
  .brand { font-size: 24px; }
  .nav { margin-left: 0; width: 100%; gap: 2px; }
  .nav a, .nav button.linklike { padding: 7px 10px; font-size: 14px; }
  .nav .me span:last-child { display: none; }
  .hero .ava.xl { --s: 96px; }
  .hero { gap: 14px; }
  .countdown { margin-left: 0; }
  .countdown .cell { min-width: 58px; padding: 8px; }
  .countdown .num { font-size: 24px; }
  .status-banner .btn { margin-left: 0; width: 100%; }
  .msg { max-width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #snow { display: none; }
}

@media print {
  body { background: #fff !important; }
  .garland, .topbar, .footer, #snow, .stars, .no-print, .flashes, .page-title, .page-sub { display: none !important; }
  main { padding: 0; }
  .card { box-shadow: none; padding: 0; }
  .card.snowcap::before { display: none; }
}
