/* Мы · наши подарки. Two skins on one layout:
   soft    — milk-pink paper, plum ink, pastel pills, two cats (white Alisa with a bow, black Gleb with amber eyes);
   lootkis — LootKis Obsidian Atelier: obsidian facets, bordeaux medal, fine gold, Onest display.
   Mobile first: tiles, polaroid cards, bottom sheets; desktop widens to a three-column feed. */

@font-face { font-family: Nunito; src: url('fonts/nunito-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Nunito; src: url('fonts/nunito-latin-wght-normal.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Caveat; src: url('fonts/caveat-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Caveat; src: url('fonts/caveat-latin-wght-normal.woff2') format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Onest; src: url('fonts/onest-cyrillic.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0400-052F; }
@font-face { font-family: Onest; src: url('fonts/onest-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root, :root[data-skin="soft"] {
  color-scheme: light;
  --bg: #fff4f8;
  --bg-glow-a: rgb(255 199 222 / .55);
  --bg-glow-b: rgb(205 191 255 / .45);
  --surface: #ffffff;
  --surface-2: #fdeef5;
  --line: #f1dbe6;
  --line-strong: #c9a9bb;
  --text: #3f2c48;
  --text-soft: #5c4766;
  --muted: #7f6888;
  --accent: #3f2c48;
  --on-accent: #fff7fb;
  --accent-hover: #2c1e33;
  --highlight: #e2588b;
  --alisa: #f2669a;
  --alisa-ink: #8a2452;
  --alisa-soft: #ffe0ec;
  --alisa-fill: #ffd1e2;
  --gleb: #4f8ff0;
  --gleb-ink: #1f4785;
  --gleb-soft: #e2edff;
  --gleb-fill: #cfe1ff;
  --danger: #c4325f;
  --success: #2f7a55;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --pill: 999px;
  --shadow: 0 1px 2px rgb(120 60 90 / .06), 0 14px 34px -20px rgb(196 92 142 / .45);
  --shadow-hover: 0 1px 2px rgb(120 60 90 / .08), 0 22px 44px -22px rgb(196 92 142 / .55);
  --shadow-pop: 0 30px 80px -30px rgb(90 40 80 / .45);
  --font-body: Nunito, "Segoe UI", system-ui, sans-serif;
  --font-display: Nunito, "Segoe UI", system-ui, sans-serif;
  --font-hand: Caveat, Nunito, cursive;
  --display-weight: 850;
  --display-tracking: -0.02em;
  --eyebrow-case: none;
  --eyebrow-tracking: 0;
  --scrim: rgb(63 44 72 / .38);
  --focus: #e2588b;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
}

:root[data-skin="lootkis"] {
  color-scheme: dark;
  --bg: #0f0f11;
  --bg-glow-a: rgb(110 31 42 / .55);
  --bg-glow-b: rgb(212 175 106 / .06);
  --surface: #17171a;
  --surface-2: #212125;
  --line: #2b2b30;
  --line-strong: #7d6f66;
  --text: #f4e4d0;
  --text-soft: #dccdbd;
  --muted: #b1a398;
  --accent: #d4af6a;
  --on-accent: #1d1517;
  --accent-hover: #f0d9a8;
  --highlight: #d4af6a;
  --alisa: #e9a3ae;
  --alisa-ink: #2a0d12;
  --alisa-soft: rgb(233 163 174 / .1);
  --alisa-fill: #e9a3ae;
  --gleb: #d4af6a;
  --gleb-ink: #1d1517;
  --gleb-soft: rgb(212 175 106 / .1);
  --gleb-fill: #d4af6a;
  --danger: #f59aa5;
  --success: #a2bfa7;
  --radius-xl: 6px;
  --radius-lg: 4px;
  --radius: 4px;
  --radius-sm: 3px;
  --pill: 4px;
  --shadow: inset 0 1px 0 rgb(255 255 255 / .03);
  --shadow-hover: inset 0 1px 0 rgb(255 255 255 / .05), 0 26px 50px -30px rgb(0 0 0 / .95);
  --shadow-pop: 0 40px 100px -30px rgb(0 0 0 / .9);
  --font-body: Onest, Arial, sans-serif;
  --font-display: Onest, Arial, sans-serif;
  --font-hand: Onest, Arial, sans-serif;
  --display-weight: 820;
  --display-tracking: -0.045em;
  --eyebrow-case: uppercase;
  --eyebrow-tracking: .16em;
  --scrim: rgb(5 4 6 / .72);
  --focus: #d4af6a;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column; position: relative; isolation: isolate;
  background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
body::before { /* soft: paw-print paper; lootkis: obsidian facets */
  content: ''; position: absolute; inset: 0 0 auto; height: 900px; z-index: -1; pointer-events: none;
  background: url('art/paws.svg') 0 0 / 220px auto repeat; opacity: .5;
  -webkit-mask-image: linear-gradient(#000 10%, transparent 90%); mask-image: linear-gradient(#000 10%, transparent 90%);
}
body::after {
  content: ''; position: absolute; inset: 0 0 auto; height: 980px; z-index: -2; pointer-events: none;
  background: radial-gradient(42% 46% at 12% 8%, var(--bg-glow-a), transparent 70%), radial-gradient(40% 44% at 88% 22%, var(--bg-glow-b), transparent 72%);
}
[data-skin="lootkis"] body::before { background: url('art/facet-field.svg') center top / max(1600px, 100%) auto no-repeat; opacity: .375; }
[data-skin="lootkis"] body::after { background: radial-gradient(38% 44% at 77% 22%, var(--bg-glow-a), transparent 72%); }

::selection { background: var(--highlight); color: var(--on-accent); }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, input, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
svg { fill: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
:root[data-skin="soft"] .lootkis-only, :root[data-skin="lootkis"] .soft-only { display: none !important; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: var(--pill); background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 700; }
.skip-link:focus { top: 12px; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: var(--eyebrow-case); letter-spacing: var(--eyebrow-tracking); }
[data-skin="lootkis"] .eyebrow { font-size: 11px; font-weight: 600; }
.eyebrow-mark { width: 7px; height: 7px; background: var(--highlight); transform: rotate(45deg); }
[data-skin="soft"] .eyebrow-mark { width: 9px; height: 9px; border-radius: 50%; background: var(--alisa); box-shadow: 12px 0 0 var(--gleb); margin-right: 12px; transform: none; }
.brand-dot { color: var(--highlight); }

/* ---------- buttons & fields ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: var(--pill); font-weight: 750; font-size: 15px; text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .35s var(--ease), box-shadow .3s;
}
.button svg { width: 19px; height: 19px; flex: none; }
.button.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 12px 26px -16px var(--accent); }
.button.primary:hover { background: var(--accent-hover); }
.button.primary:active { transform: scale(.97); }
.button.ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.button.ghost:hover { border-color: var(--line-strong); }
.button.ghost.danger { color: var(--danger); }
.button.wide { width: 100%; }
[data-skin="lootkis"] .button { font-weight: 650; letter-spacing: -.01em; }
[data-skin="lootkis"] .button.ghost { background: transparent; }

.icon-button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0;
  border: 1.5px solid var(--line); border-radius: var(--pill); background: var(--surface); color: var(--text);
  transition: border-color .2s, background-color .2s, transform .3s var(--ease);
}
.icon-button:hover { border-color: var(--line-strong); }
.icon-button svg { width: 20px; height: 20px; }
[data-skin="lootkis"] .icon-button { background: transparent; }

.field { display: grid; gap: 7px; }
.field > span, .field > label, .field-label, .giver-switch legend { font-size: 14px; font-weight: 750; color: var(--text-soft); }
[data-skin="lootkis"] .field > span, [data-skin="lootkis"] .field > label, [data-skin="lootkis"] .field-label, [data-skin="lootkis"] .giver-switch legend { font-weight: 600; font-size: 13px; }
input:not([type="checkbox"], [type="radio"], [type="file"]), textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-size: 16px; line-height: 1.4; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 110px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, textarea:focus { border-color: var(--highlight); box-shadow: 0 0 0 4px color-mix(in srgb, var(--highlight) 16%, transparent); }
[data-skin="lootkis"] input:not([type="checkbox"], [type="radio"], [type="file"]), [data-skin="lootkis"] textarea { background: #121214; border-color: #3a3a40; }
input[type="date"] { appearance: none; -webkit-appearance: none; min-width: 0; display: block; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.form-error { padding: 12px 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); font-weight: 650; font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); }

/* ---------- top bar ---------- */
.topbar {
  width: min(1180px, 100%); margin: 0 auto; padding-block: max(14px, env(safe-area-inset-top)) 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: flex; align-items: center; }
.brand-mark svg { width: 40px; height: 38px; }
.brand-mark .brand-mark-second { margin-left: -14px; }
.brand-mark img { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #86293a, #55161f); padding: 5px; box-shadow: 0 0 0 1px rgb(212 175 106 / .6); }
.brand-word { font-family: var(--font-display); font-weight: 900; font-size: 28px; letter-spacing: -.04em; line-height: 1; }
[data-skin="lootkis"] .brand-word { font-weight: 800; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.skin-switch { display: inline-flex; padding: 4px; gap: 2px; border: 1.5px solid var(--line); border-radius: var(--pill); background: var(--surface); }
.skin-switch button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--pill);
  background: transparent; font-size: 14px; font-weight: 750; color: var(--muted);
}
.skin-switch button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
[data-skin="lootkis"] .skin-switch { background: #121214; }
[data-skin="lootkis"] .skin-switch button { font-weight: 600; }
.swatch { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.swatch-soft { background: conic-gradient(#ffb3cb 0 50%, #b9a6ff 0); box-shadow: inset 0 0 0 1.5px rgb(63 44 72 / .25); }
.swatch-lootkis { background: conic-gradient(#d4af6a 0 50%, #6e1f2a 0); box-shadow: inset 0 0 0 1.5px rgb(0 0 0 / .3); }

main { flex: 1; width: min(1180px, 100%); margin: 0 auto; padding-block: 0 120px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); outline: none; }

/* ---------- boot & login ---------- */
.boot { min-height: 50vh; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); font-weight: 700; }
.boot-paw { width: 36px; height: 36px; color: var(--highlight); animation: paw 1.2s var(--ease) infinite alternate; }
@keyframes paw { from { transform: translateY(0) rotate(-8deg); opacity: .5; } to { transform: translateY(-6px) rotate(8deg); opacity: 1; } }

.login { min-height: calc(100dvh - 180px); display: grid; place-items: center; padding: 70px 0 40px; }
.login-card {
  position: relative; width: min(420px, 100%); padding: 40px 24px 26px; display: grid; gap: 10px; text-align: center;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow);
}
.login-card h1 { font-size: 40px; }
.login-form { display: grid; gap: 14px; margin-top: 14px; text-align: left; }
.login-peek { position: absolute; left: 50%; top: 0; transform: translate(-50%, -78%); display: flex; gap: 0; }
.login-peek svg { width: 92px; height: 86px; }
.login-peek svg + svg { margin-left: -10px; }
.login-medal { justify-self: center; width: 104px; height: 104px; margin: -94px 0 4px; border-radius: 50%; padding: 14px; background: radial-gradient(circle at 40% 35%, #86293a, #55161f); box-shadow: 0 0 0 1px rgb(212 175 106 / .55), 0 0 0 10px var(--bg), 0 0 0 11px rgb(212 175 106 / .2); }
[data-skin="lootkis"] .login-card { padding-top: 34px; background: rgb(23 23 26 / .92); }

/* ---------- hero ---------- */
.hero { display: grid; gap: 8px; padding: 8px 0 26px; }
.hero-art { order: -1; display: grid; place-items: center; }
.soft-scene { width: min(330px, 86vw); height: auto; overflow: visible; }
.hero h1 { font-size: clamp(36px, 10.4vw, 72px); margin-top: 10px; }
.h1-accent { color: var(--highlight); }
[data-skin="soft"] .h1-accent { font-family: var(--font-hand); font-weight: 700; font-size: 1.24em; letter-spacing: 0; line-height: .8; }
.lead { margin-top: 14px; font-size: 17px; color: var(--text-soft); max-width: 34em; }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }

.add-tile {
  position: relative; display: grid; justify-items: start; align-content: start; gap: 10px; min-height: 132px; padding: 14px;
  border: 1.5px solid transparent; border-radius: var(--radius-lg); text-align: left; overflow: hidden;
  transition: transform .35s var(--bounce), box-shadow .3s, background-color .2s;
}
.add-tile.giver-alisa { background: var(--alisa-fill); color: var(--alisa-ink); }
.add-tile.giver-gleb { background: var(--gleb-fill); color: var(--gleb-ink); }
.add-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.add-tile:active { transform: scale(.97); }
.add-tile .avatar { width: 52px; height: 48px; }
.add-text { display: grid; line-height: 1.15; }
.add-text small { font-size: 13px; font-weight: 700; opacity: .8; }
.add-text strong { font-size: 19px; font-weight: 850; letter-spacing: -.01em; }
.add-plus { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: rgb(255 255 255 / .7); color: currentColor; }
[data-skin="lootkis"] .add-tile { border-color: rgb(255 255 255 / .06); box-shadow: 0 14px 34px -18px var(--accent); }
[data-skin="lootkis"] .add-tile.giver-alisa { box-shadow: 0 14px 34px -18px var(--alisa); }
[data-skin="lootkis"] .add-plus { background: rgb(0 0 0 / .14); border-radius: var(--radius-sm); }
[data-skin="lootkis"] .add-text strong { font-weight: 780; letter-spacing: -.03em; }
[data-skin="lootkis"] .add-tile .avatar { width: 48px; height: 48px; }
.avatar svg { width: 100%; height: 100%; }

/* soft scene life: blinking Gleb, swaying tails, rising hearts */
.soft-scene .head-gleb .cat-eyes, .soft-scene .cat-eyes { transform-box: fill-box; transform-origin: center; }
.soft-scene .tail { transform-box: fill-box; }
.soft-scene .tail-alisa { transform-origin: 0% 100%; animation: tail 3.6s ease-in-out infinite; }
.soft-scene .tail-gleb { transform-origin: 100% 100%; animation: tail 3.2s ease-in-out infinite reverse; }
.soft-scene .head { transform-box: fill-box; transform-origin: 50% 90%; animation: nod 5s ease-in-out infinite; }
.soft-scene .head-gleb { animation-delay: -2.5s; }
.soft-scene .fh { transform-box: fill-box; transform-origin: center; animation: rise 4.2s ease-in infinite; opacity: 0; }
.soft-scene .fh-2 { animation-delay: 1.4s; }
.soft-scene .fh-3 { animation-delay: 2.8s; }
@keyframes tail { 50% { transform: rotate(9deg); } }
@keyframes nod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-3deg); } 60% { transform: rotate(2deg); } }
@keyframes rise { 0% { transform: translateY(14px) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-46px) scale(1.05); opacity: 0; } }

/* lootkis medal */
.medal-scene { position: relative; width: min(240px, 62vw); aspect-ratio: 1; display: grid; place-items: center; }
.medallion {
  width: 72%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: url('art/facet-medal.svg') center / cover, #6e1f2a;
  box-shadow: 0 0 0 1.5px #d4af6a, 0 0 0 9px rgb(15 15 17 / .9), 0 0 0 10px rgb(212 175 106 / .26), 0 44px 80px -36px rgb(20 6 9 / .85);
}
.medallion img { width: 84%; margin-top: 8%; }
.orbit { position: absolute; inset: 0; border: 1px solid rgb(212 175 106 / .24); border-radius: 50%; animation: orbit 60s linear infinite; }
.orbit i { position: absolute; width: 6px; height: 6px; background: #d4af6a; transform: rotate(45deg); }
.orbit i:first-child { left: 9%; top: 22%; }
.orbit i:last-child { right: 6%; bottom: 30%; width: 5px; height: 5px; background: #e9a3ae; }
@keyframes orbit { to { transform: rotate(360deg); } }
.medal-caption { position: absolute; bottom: -2px; font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* ---------- scoreboard ---------- */
.scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px 10px; padding: 16px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.score { display: grid; justify-items: center; text-align: center; gap: 2px; }
.score-num { font-family: var(--font-display); font-weight: 900; font-size: 44px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score.giver-alisa .score-num { color: var(--alisa); }
.score.giver-gleb .score-num { color: var(--gleb); }
.score-label { font-size: 13px; font-weight: 700; color: var(--muted); line-height: 1.25; }
.score-heart svg { width: 26px; height: 26px; color: var(--highlight); animation: beat 2.4s var(--ease) infinite; }
@keyframes beat { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.22); } 90% { transform: scale(.96); } }
.memory {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; margin-top: 8px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--text); text-align: left;
  transition: background-color .2s, border-color .2s;
}
.memory:hover { background: var(--surface-2); border-style: solid; }
.memory svg { width: 26px; height: 26px; color: var(--highlight); transition: transform .5s var(--bounce); }
.memory:hover svg { transform: rotate(90deg); }
.memory span { display: grid; line-height: 1.15; }
.memory strong { font-weight: 850; }
.memory small { color: var(--muted); font-size: 13px; font-weight: 600; }
[data-skin="soft"] .memory strong { font-family: var(--font-hand); font-size: 24px; font-weight: 700; }
[data-skin="lootkis"] .score-num { font-weight: 800; }
[data-skin="lootkis"] .scoreboard { background: rgb(23 23 26 / .9); }

/* ---------- toolbar ---------- */
.toolbar { display: grid; gap: 12px; margin: 26px 0 18px; }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: var(--pill); background: var(--surface); font-weight: 750; font-size: 15px; color: var(--text-soft);
  transition: background-color .2s, color .2s, border-color .2s;
}
.filter svg { width: 16px; height: 16px; color: var(--highlight); }
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filter[aria-pressed="true"] svg { color: currentColor; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.giver-alisa { background: var(--alisa); }
.dot.giver-gleb { background: var(--gleb); }
[data-skin="lootkis"] .filter { font-weight: 600; background: transparent; }
[data-skin="lootkis"] .dot { border-radius: 0; transform: rotate(45deg); width: 7px; height: 7px; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 15px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 46px !important; border-radius: var(--pill) !important; }
[data-skin="lootkis"] .search input { border-radius: var(--radius) !important; }

.notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); font-weight: 650; }

/* ---------- feed ---------- */
.feed { display: grid; gap: 30px; }
.year { display: grid; gap: 14px; }
.year-head { display: flex; align-items: baseline; gap: 12px; }
.year-head h2 { font-size: 30px; }
.year-head span { color: var(--muted); font-weight: 700; font-size: 14px; }
[data-skin="soft"] .year-head h2 { font-family: var(--font-hand); font-size: 40px; font-weight: 700; letter-spacing: 0; }
[data-skin="lootkis"] .year-head { border-top: 1px solid var(--line); padding-top: 14px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 18px; }

.gift-card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .3s, border-color .2s;
}
.gift-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-cover { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.gift-card:hover .card-cover img { transform: scale(1.03); }
.card-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line-strong); }
.card-placeholder svg { width: 54px; height: 54px; }
.giver-alisa .card-placeholder { background: var(--alisa-soft); color: var(--alisa); }
.giver-gleb .card-placeholder { background: var(--gleb-soft); color: var(--gleb); }
.card-from {
  position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px;
  border-radius: var(--pill); background: rgb(255 255 255 / .92); color: var(--text); font-size: 13px; font-weight: 800;
  box-shadow: 0 6px 16px -10px rgb(0 0 0 / .4);
}
.card-from .avatar { width: 26px; height: 24px; }
.card-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; gap: 10px; padding: 5px 10px; border-radius: var(--pill); background: rgb(20 14 24 / .6); color: #fff; font-size: 13px; font-weight: 750; backdrop-filter: blur(6px); }
.card-count span { display: inline-flex; align-items: center; gap: 4px; }
.card-count svg { width: 15px; height: 15px; }
.card-body { display: grid; gap: 6px; padding: 14px 16px 18px; }
.card-meta { font-size: 13px; font-weight: 750; color: var(--muted); }
.card-meta b { color: var(--text-soft); font-weight: 800; }
.card-title { font-size: 21px; line-height: 1.15; }
.card-open { all: unset; cursor: pointer; }
.card-open::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-open:focus-visible::after { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.card-text { font-size: 15px; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-fav {
  position: absolute; right: 10px; top: 10px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: rgb(255 255 255 / .92); color: var(--muted); box-shadow: 0 6px 16px -10px rgb(0 0 0 / .4);
  transition: transform .4s var(--bounce), color .2s;
}
.card-fav svg { width: 21px; height: 21px; }
.card-fav[aria-pressed="true"] { color: var(--highlight); }
.card-fav:active { transform: scale(.85); }
.card-fav.pop { animation: pop .5s var(--bounce); }
@keyframes pop { 40% { transform: scale(1.35); } }

/* soft: polaroid frames with a handwritten "from" and a gentle tilt */
[data-skin="soft"] .gift-card { padding: 10px 10px 0; border-radius: 22px; }
[data-skin="soft"] .card-cover { border-radius: 14px; }
[data-skin="soft"] .card-body { padding: 12px 6px 16px; }
[data-skin="soft"] .card-from { font-family: var(--font-hand); font-size: 19px; font-weight: 700; padding-top: 1px; padding-bottom: 1px; }
[data-skin="soft"] .grid > .gift-card:nth-child(3n+1) { rotate: -0.6deg; }
[data-skin="soft"] .grid > .gift-card:nth-child(3n+2) { rotate: 0.5deg; }
[data-skin="soft"] .gift-card:hover { rotate: 0deg; }
[data-skin="soft"] .gift-card.giver-alisa { border-color: color-mix(in srgb, var(--alisa) 22%, var(--line)); }
[data-skin="soft"] .gift-card.giver-gleb { border-color: color-mix(in srgb, var(--gleb) 22%, var(--line)); }

/* lootkis: flat obsidian panels, giver as an eyebrow, gold hairline for favourites */
[data-skin="lootkis"] .gift-card { background: rgb(23 23 26 / .94); }
[data-skin="lootkis"] .gift-card.is-favorite { border-top-color: #d4af6a; }
[data-skin="lootkis"] .card-from { left: 0; top: 0; border-radius: 0 0 var(--radius) 0; background: rgb(15 15 17 / .86); color: var(--text); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 7px 12px 7px 8px; }
[data-skin="lootkis"] .card-from .avatar { width: 20px; height: 20px; }
[data-skin="lootkis"] .card-fav { border-radius: var(--radius); background: rgb(15 15 17 / .86); }
[data-skin="lootkis"] .card-count { border-radius: var(--radius); }
[data-skin="lootkis"] .card-title { font-size: 20px; letter-spacing: -.03em; }
[data-skin="lootkis"] .card-meta { font-weight: 600; }

/* ---------- empty ---------- */
.empty { display: grid; justify-items: center; gap: 10px; padding: 36px 16px 20px; text-align: center; }
.empty h2 { font-size: 26px; }
.sleepy { width: 220px; }
.sleepy .zzz { animation: zzz 2.6s ease-in-out infinite; }
@keyframes zzz { 50% { transform: translateY(-5px); opacity: .5; } }
.empty-cat { width: 96px; padding: 12px; border-radius: 50%; background: #6e1f2a; box-shadow: 0 0 0 1px #d4af6a; opacity: .85; }

/* ---------- quick add (phones, once the hero tiles scroll away) ---------- */
.quick-add {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 20; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 6px; border-radius: var(--pill); background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1.5px solid var(--line); box-shadow: var(--shadow-pop); backdrop-filter: blur(12px); animation: up .45s var(--ease);
}
.quick { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 16px 0 6px; border: 0; border-radius: var(--pill); font-weight: 850; font-size: 15px; white-space: nowrap; }
.quick.giver-alisa { background: var(--alisa-fill); color: var(--alisa-ink); }
.quick.giver-gleb { background: var(--gleb-fill); color: var(--gleb-ink); }
.quick .avatar { width: 36px; height: 34px; }
[data-skin="lootkis"] .quick { font-weight: 650; }
@keyframes up { from { transform: translate(-50%, 30px); opacity: 0; } }

/* ---------- footer ---------- */
.footer { width: min(1180px, 100%); margin: 0 auto; padding-block: 20px max(28px, env(safe-area-inset-bottom)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 650; }
.relisa-link { text-decoration: none; }
.relisa-link:hover { color: var(--text); }
.seal { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 4px; border-radius: 3px; background: #c8352a; color: #fbf6ec; font-size: 12px; font-weight: 700; rotate: -4deg; vertical-align: -3px; }

/* ---------- sheets (dialogs) ---------- */
dialog { color: var(--text); }
.sheet {
  width: 100%; max-width: 100%; max-height: calc(100dvh - 18px); margin: auto auto 0; padding: 0; border: 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0; background: var(--bg); box-shadow: var(--shadow-pop); overflow: hidden;
}
.sheet[open] { animation: sheet-up .45s var(--ease); }
.sheet::backdrop { background: var(--scrim); backdrop-filter: blur(3px); animation: fade .3s ease; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
[data-skin="lootkis"] .sheet { background: #131315; border-top: 1px solid #3a3a40; }

/* editor */
.sheet-editor form { display: flex; flex-direction: column; max-height: calc(100dvh - 18px); }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 18px 16px 14px; border-bottom: 1.5px solid var(--line); }
.sheet-head > div { flex: 1; min-width: 0; }
.sheet-head h2 { font-size: 24px; }
.editor-avatar { width: 50px; height: 46px; flex: none; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 18px; padding: 18px 16px 22px; }
.sheet-foot { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); border-top: 1.5px solid var(--line); background: var(--surface); }
[data-skin="lootkis"] .sheet-foot { background: #17171a; }
.giver-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; }
.giver-switch legend { margin-bottom: 7px; padding: 0; }
.giver-switch label { position: relative; }
.giver-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.giver-switch span { display: grid; place-items: center; min-height: 48px; border: 1.5px solid var(--line); border-radius: var(--pill); background: var(--surface); font-weight: 800; transition: background-color .2s, border-color .2s, color .2s; }
.giver-switch .giver-alisa input:checked + span { background: var(--alisa-fill); border-color: var(--alisa); color: var(--alisa-ink); }
.giver-switch .giver-gleb input:checked + span { background: var(--gleb-fill); border-color: var(--gleb); color: var(--gleb-ink); }
.giver-switch input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 34px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--pill); background: var(--surface); font-size: 14px; font-weight: 700; color: var(--text-soft); }
.chip:hover, .chip[aria-pressed="true"] { border-color: var(--highlight); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--surface-2); }
[data-skin="lootkis"] .chip { background: transparent; font-weight: 600; }

.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.media-item, .media-add { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; }
.media-item { background: var(--surface-2); border: 0; padding: 0; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item .media-kind { position: absolute; left: 6px; bottom: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgb(20 14 24 / .6); color: #fff; }
.media-item .media-kind svg { width: 14px; height: 14px; }
.media-item .media-cover { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: var(--pill); background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; }
.media-item .media-remove { position: absolute; right: 5px; top: 5px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgb(20 14 24 / .66); color: #fff; z-index: 1; }
.media-item .media-remove svg { width: 15px; height: 15px; }
.media-item .media-fallback { position: absolute; inset: 0; display: grid; place-items: center; gap: 4px; align-content: center; color: var(--muted); font-size: 11px; font-weight: 700; padding: 6px; text-align: center; overflow-wrap: anywhere; }
.media-item .media-fallback svg { width: 26px; height: 26px; }
.media-add { display: grid; place-content: center; justify-items: center; gap: 4px; border: 2px dashed var(--line-strong); background: transparent; color: var(--text-soft); font-size: 13px; font-weight: 800; text-align: center; padding: 6px; }
.media-add svg { width: 26px; height: 26px; color: var(--highlight); }
.media-add:hover { background: var(--surface-2); }
.favorite-toggle { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); font-weight: 750; cursor: pointer; }
.favorite-toggle input { width: 22px; height: 22px; accent-color: var(--highlight); margin: 0; flex: none; }
.favorite-toggle span { display: inline-flex; align-items: center; gap: 8px; }
.favorite-toggle svg { width: 18px; height: 18px; color: var(--highlight); }
.upload-progress { display: grid; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text-soft); }
.upload-progress .bar { height: 10px; border-radius: var(--pill); background: var(--surface-2); overflow: hidden; }
.upload-progress .bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--alisa), var(--gleb)); transition: width .2s; }
[data-skin="lootkis"] .upload-progress .bar i { background: #d4af6a; }

/* detail */
.sheet-detail { height: calc(100dvh - 18px); }
.detail-layout { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.detail-media { position: relative; background: #0e0b10; }
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; height: min(62vh, 520px); display: grid; place-items: center; position: relative; }
.slide img, .slide video { width: 100%; height: 100%; object-fit: contain; }
.slide-open { position: absolute; inset: 0; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.slide-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); }
.slide-placeholder svg { width: 64px; height: 64px; }
.carousel-count { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: var(--pill); background: rgb(20 14 24 / .6); color: #fff; font-size: 13px; font-weight: 800; pointer-events: none; }
.carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: none; place-items: center; border: 0; border-radius: 50%; background: rgb(255 255 255 / .9); color: #241a2a; padding: 0; }
.carousel-nav svg { width: 22px; height: 22px; }
.carousel-nav.prev { left: 12px; }
.carousel-nav.next { right: 12px; }
.carousel-dots { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; pointer-events: none; }
.carousel-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / .5); transition: width .3s var(--ease), background-color .2s; }
.carousel-dots i.on { width: 20px; border-radius: 4px; background: #fff; }
.detail-info { display: grid; gap: 10px; align-content: start; padding: 16px 16px max(28px, env(safe-area-inset-bottom)); }
.sheet-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-info h2 { font-size: 30px; }
.detail-text { white-space: pre-wrap; font-size: 17px; color: var(--text-soft); overflow-wrap: anywhere; }
.detail-text:empty { display: none; }
.detail-ago { font-size: 14px; font-weight: 650; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.detail-actions .button { min-height: 44px; padding: 0 16px; }
#detail-fav[aria-pressed="true"] { color: var(--highlight); border-color: var(--highlight); }
.giver-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: var(--pill); font-weight: 800; font-size: 15px; }
.giver-chip .avatar { width: 34px; height: 32px; }
.giver-chip.giver-alisa { background: var(--alisa-fill); color: var(--alisa-ink); }
.giver-chip.giver-gleb { background: var(--gleb-fill); color: var(--gleb-ink); }
[data-skin="soft"] .giver-chip { font-family: var(--font-hand); font-size: 22px; font-weight: 700; }
[data-skin="lootkis"] .giver-chip { font-weight: 650; font-size: 14px; }

/* confirm */
.sheet-confirm { height: auto; }
.sheet-confirm form { display: grid; gap: 10px; padding: 24px 18px max(18px, env(safe-area-inset-bottom)); }
.sheet-confirm h2 { font-size: 24px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
#confirm-ok.danger { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: none; }

/* viewer */
.viewer { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: #060507; color: #fff; overflow: hidden; }
.viewer::backdrop { background: #060507; }
.viewer-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-track > * { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; }
.viewer-track img, .viewer-track video { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-bar { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; padding: max(12px, env(safe-area-inset-top)) 12px 12px 18px; background: linear-gradient(rgb(0 0 0 / .55), transparent); font-weight: 800; pointer-events: none; }
.viewer-bar .icon-button { pointer-events: auto; background: rgb(255 255 255 / .12); border-color: transparent; color: #fff; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; display: none; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / .12); color: #fff; }
.viewer-nav svg { width: 24px; height: 24px; }
.viewer-nav.prev { left: 16px; }
.viewer-nav.next { right: 16px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: max(84px, calc(env(safe-area-inset-bottom) + 76px)); z-index: 60; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: var(--pill); background: var(--accent); color: var(--on-accent); font-weight: 750; box-shadow: var(--shadow-pop); animation: up .4s var(--ease); }

/* ---------- wider screens ---------- */
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .add-tile { min-height: 150px; padding: 18px; }
  .add-text strong { font-size: 22px; }
  .scoreboard { grid-template-columns: 1fr auto 1fr auto; padding: 18px 22px; }
  .memory { grid-column: auto; margin: 0 0 0 12px; padding: 0 20px; }
  .media-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 760px) {
  .topbar, .footer, main { padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); }
  main { padding-bottom: 100px; }
  .filters { margin: 0; padding: 2px; }
  .toolbar { grid-template-columns: 1fr minmax(260px, 360px); align-items: center; }
  .sheet { width: min(640px, calc(100% - 48px)); margin: auto; border-radius: var(--radius-xl); max-height: calc(100dvh - 64px); }
  .sheet[open] { animation: pop-in .4s var(--ease); }
  @keyframes pop-in { from { transform: translateY(18px) scale(.98); opacity: 0; } }
  .sheet-editor form { max-height: calc(100dvh - 64px); }
  .sheet-head, .sheet-body, .sheet-foot { padding-left: 24px; padding-right: 24px; }
  .sheet-confirm { width: min(440px, calc(100% - 48px)); }
  .sheet-detail { width: min(1080px, calc(100% - 48px)); height: min(720px, calc(100dvh - 64px)); }
  .detail-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); overflow: hidden; }
  .detail-media { height: 100%; }
  .detail-media .carousel { height: 100%; }
  .slide { height: 100%; }
  .detail-info { overflow-y: auto; padding: 22px 26px 28px; }
  .carousel-nav, .viewer-nav { display: grid; }
  .quick-add { display: none !important; }
  [data-skin="lootkis"] .sheet { border: 1px solid #3a3a40; }
}

@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: 40px; padding: 36px 0 44px; }
  .hero-art { order: 0; }
  .soft-scene { width: 100%; max-width: 440px; }
  .medal-scene { width: 380px; }
  .hero-actions { max-width: 600px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .login-card { padding: 46px 34px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* late additions: cover picker, highlight after save, static hearts without motion */
.media-pick { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.media-pick:disabled { cursor: default; opacity: 1; }
.media-pick img { width: 100%; height: 100%; object-fit: cover; }
.gift-card.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 35% { box-shadow: 0 0 0 4px var(--highlight), var(--shadow-hover); } }
@media (prefers-reduced-motion: reduce) { .soft-scene .fh { opacity: 1; } }

/* ---------- occasion kinds: tabs over the feed, the switch in the form ---------- */
:root, :root[data-skin="soft"] { --kind-date: #e8508a; --kind-holiday: #e0901f; --kind-fun: #7d63e8; }
:root[data-skin="lootkis"] { --kind-date: #e9a3ae; --kind-holiday: #d4af6a; --kind-fun: #c9b6f0; }

.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 26px; }
.tab {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; row-gap: 1px;
  min-height: 60px; padding: 9px 12px; text-align: left;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text);
  font-weight: 800; font-size: 15px; line-height: 1.15; box-shadow: var(--shadow);
  transition: background-color .2s, color .2s, border-color .2s, transform .3s var(--bounce);
}
.tab:active { transform: scale(.97); }
.tab svg { grid-row: span 2; width: 22px; height: 22px; color: var(--highlight); }
.tab[data-kind="date"] svg { color: var(--kind-date); }
.tab[data-kind="holiday"] svg { color: var(--kind-holiday); }
.tab[data-kind="fun"] svg { color: var(--kind-fun); }
.tab span { overflow-wrap: anywhere; }
.tab b { color: var(--muted); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tab[aria-pressed="true"] svg { color: currentColor; }
.tab[aria-pressed="true"] b { color: inherit; opacity: .78; }
[data-skin="lootkis"] .tab { background: rgb(23 23 26 / .9); font-weight: 650; }
[data-skin="lootkis"] .tab[aria-pressed="true"], [data-skin="lootkis"] .filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.toolbar { margin-top: 14px; }

.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0 5px; }
.card-meta svg, #detail-meta svg { width: 16px; height: 16px; flex: none; }
.kind-date svg { color: var(--kind-date); }
.kind-holiday svg { color: var(--kind-holiday); }
.kind-fun svg { color: var(--kind-fun); }
#detail-meta svg { color: var(--highlight); }
.by-occasion .year-head h2 { font-size: 30px; }
[data-skin="soft"] .by-occasion .year-head h2 { font-size: 36px; }

.kind-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 0; border: 0; }
.kind-switch legend { margin-bottom: 7px; padding: 0; font-size: 14px; font-weight: 750; color: var(--text-soft); }
[data-skin="lootkis"] .kind-switch legend { font-weight: 600; font-size: 13px; }
.kind-switch label { position: relative; }
.kind-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.kind-switch span {
  display: grid; justify-items: start; align-content: start; gap: 3px; height: 100%; min-height: 96px; padding: 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); line-height: 1.15;
  transition: background-color .2s, border-color .2s;
}
.kind-switch svg { width: 24px; height: 24px; margin-bottom: 4px; }
.kind-switch label:nth-of-type(1) svg { color: var(--kind-date); }
.kind-switch label:nth-of-type(2) svg { color: var(--kind-holiday); }
.kind-switch label:nth-of-type(3) svg { color: var(--kind-fun); }
.kind-switch b { font-weight: 850; font-size: 15px; }
.kind-switch small { color: var(--muted); font-size: 12px; font-weight: 650; }
.kind-switch input:checked + span { border-color: var(--highlight); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--highlight); }
.kind-switch input:focus-visible + span { outline: 2.5px solid var(--focus); outline-offset: 3px; }
[data-skin="lootkis"] .kind-switch span { background: transparent; }
[data-skin="lootkis"] .kind-switch b { font-weight: 650; }
.occasion-field .chips { margin-bottom: 2px; }

.login-card .eyebrow { justify-self: center; }

@media (min-width: 760px) {
  .tabs { grid-template-columns: repeat(4, 1fr); }
}

/* detail on phones: the close button floats over the photo, soft letterbox stays pastel */
.sheet-detail .sheet-tools [data-close] {
  position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; z-index: 4;
  background: rgb(255 255 255 / .92); border-color: transparent; color: #241a2a; box-shadow: 0 6px 16px -10px rgb(0 0 0 / .5);
}
[data-skin="lootkis"] .sheet-detail .sheet-tools [data-close] { background: rgb(15 15 17 / .86); color: var(--text); }
[data-skin="soft"] .detail-media { background: var(--surface-2); }
.slide-placeholder.giver-alisa { background: var(--alisa-soft); color: var(--alisa); height: 180px; }
.slide-placeholder.giver-gleb { background: var(--gleb-soft); color: var(--gleb); height: 180px; }
@media (min-width: 760px) {
  .sheet-detail .sheet-tools [data-close] { position: static; background: var(--surface); border-color: var(--line); color: var(--text); box-shadow: none; }
  [data-skin="lootkis"] .sheet-detail .sheet-tools [data-close] { background: transparent; }
  .slide-placeholder.giver-alisa, .slide-placeholder.giver-gleb { height: 100%; }
}

/* ---------- «Тестовые подарки»: switch in the footer, banner over the feed ---------- */
.footer { align-items: center; flex-wrap: wrap; }
.footer-links { display: inline-flex; align-items: center; gap: 14px; margin-left: auto; }
.demo-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 14px; font-weight: 750; color: var(--text-soft); }
.demo-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.switch-track { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line-strong); transition: background-color .2s; }
.switch-track i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .3s var(--bounce); }
.demo-switch input:checked + .switch-track { background: var(--highlight); }
.demo-switch input:checked + .switch-track i { transform: translateX(18px); }
.demo-switch input:focus-visible + .switch-track { outline: 2.5px solid var(--focus); outline-offset: 3px; }
[data-skin="lootkis"] .demo-switch { font-weight: 600; }
[data-skin="lootkis"] .switch-track { background: #3a3a40; }
[data-skin="lootkis"] .demo-switch input:checked + .switch-track { background: var(--accent); }

.demo-banner {
  position: sticky; top: max(8px, env(safe-area-inset-top, 0px)); z-index: 15; display: flex; align-items: center; gap: 12px;
  margin: 4px 0 10px; padding: 10px 10px 10px 14px; border: 1.5px dashed var(--highlight); border-radius: var(--radius);
  background: color-mix(in srgb, var(--highlight) 9%, var(--surface)); box-shadow: var(--shadow);
}
.demo-banner svg { width: 22px; height: 22px; flex: none; color: var(--highlight); }
.demo-banner p { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; color: var(--text-soft); }
.demo-banner strong { color: var(--text); }
.demo-banner .button { min-height: 40px; padding: 0 14px; font-size: 14px; flex: none; }

/* phones: keep the footer switch clear of the floating add bar */
@media (max-width: 759px) {
  main { padding-bottom: 48px; }
  .footer { padding-bottom: calc(max(28px, env(safe-area-inset-bottom)) + 76px); }
}
