/* Prize menu: one long list in the festive look (reference: Tim's gift-menu mockup 27.11).
   Two modes for everyone: light lavender (default) and dark - deep red-black New Year (html[data-mode="dark"]). */
:root {
  --bg-a: #e9e4ff; --bg-b: #ddd5ff;
  --surface: #fff; --surface-soft: rgba(255, 255, 255, .55); --field: #faf8ff; --sheet-bg: #fff;
  --tools-a: rgba(233, 228, 255, .96); --tools-b: rgba(233, 228, 255, 0);
  --line: rgba(124, 92, 242, .14);
  --pu: #6a3df0; --pu-2: #8d5cff; --pu-glow: rgba(106, 61, 240, .42);
  --pu-soft: #efe9ff; --pu-line: rgba(124, 92, 242, .28);
  --accent-text: #4b2fc0; --accent-border: #9a7cf5;
  --chip-text: #3b2b86; --chip-n: #6a4fd0; --stock-text: #4a3a8c;
  --ink-d: #22195a; --ink-m: #6d64a0;
  --gold: #ffc21a; --cost-text: #7a5200;
  --ph-a: #f3eeff; --ph-b: #ffe6f3; --ph-ico: #8d6bf5;
  --off-bg: #e4dff5; --off-ink: #8a82b0;
  --card-shadow: 0 8px 22px rgba(80, 60, 180, .16), 0 1px 3px rgba(80, 60, 180, .12);
  --bar-bg: rgba(255, 255, 255, .97); --bar-shadow: 0 10px 30px rgba(60, 40, 150, .28);
  --backdrop: rgba(27, 22, 70, .55);
  --hero-a: #141a52; --hero-b: #2a2b86; --hero-c: #3b35a6; --hero-glow: rgba(255, 196, 70, .28);
  --fw-1: #ff7ad9; --fw-2: #c49bff;
  --switch-off: #cfc6ef; --grip: #9a8fd0;
  --notice-bg: #fff4cf; --notice-ink: #6a4a00; --notice-line: #f2c64b;
  --gone-bg: #ffe5e8; --gone-ink: #9a3040; --taken-bg: #ddf6e7; --taken-ink: #1f7a45;
  --ok: #1f9a52; --err: #c8162c;
  --pic-tag-bg: #fff; --pic-tag-ink: #c8162c; --x-bg: rgba(255, 255, 255, .92); --tag-bg: rgba(34, 25, 90, .75);
  background: var(--bg-a);
  color-scheme: light;
}
:root[data-mode="dark"] {
  --bg-a: #1c0508; --bg-b: #0e0204;
  --surface: #2a0a10; --surface-soft: rgba(255, 220, 180, .04); --field: #1a0508; --sheet-bg: #24080d;
  --tools-a: rgba(28, 5, 8, .95); --tools-b: rgba(28, 5, 8, 0);
  --line: rgba(255, 200, 120, .14);
  --pu: #b3121f; --pu-2: #ea3a4c; --pu-glow: rgba(234, 58, 76, .45);
  --pu-soft: #3d0f16; --pu-line: rgba(255, 190, 120, .26);
  --accent-text: #ffd27a; --accent-border: rgba(255, 200, 110, .55);
  --chip-text: #fbe3d4; --chip-n: #ffcf7a; --stock-text: #f3cdb8;
  --ink-d: #fff1e6; --ink-m: #c9a094;
  --cost-text: #ffd27a;
  --ph-a: #3d0e16; --ph-b: #22060b; --ph-ico: #e9a85a;
  --off-bg: #3b171d; --off-ink: #a07a72;
  --card-shadow: 0 8px 22px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .4);
  --bar-bg: rgba(38, 9, 14, .97); --bar-shadow: 0 10px 30px rgba(0, 0, 0, .6);
  --backdrop: rgba(8, 0, 2, .72);
  --hero-a: #0b0103; --hero-b: #3a0710; --hero-c: #5c0c18; --hero-glow: rgba(255, 196, 70, .32);
  --fw-1: #ffcf4a; --fw-2: #ff5a5a;
  --switch-off: #4a2027; --grip: #b07f78;
  --notice-bg: #33250a; --notice-ink: #ffd98a; --notice-line: rgba(242, 198, 75, .55);
  --gone-bg: #4a1018; --gone-ink: #ff9aa5; --taken-bg: #123d24; --taken-ink: #7fe0a8;
  --ok: #6fdc9a; --err: #ff8a95;
  --pic-tag-bg: #1a0508; --pic-tag-ink: #ffcf6a; --x-bg: rgba(46, 12, 17, .92); --tag-bg: rgba(0, 0, 0, .7);
  color-scheme: dark;
}
body.shop {
  color: var(--ink-d);
  background: linear-gradient(180deg, var(--bg-a) 0%, var(--bg-b) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
.shop .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.shop .ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 50px 16px 44px;
  background:
    radial-gradient(500px 220px at 50% 115%, var(--hero-glow), transparent 70%),
    linear-gradient(180deg, var(--hero-a) 0%, var(--hero-b) 70%, var(--hero-c) 100%);
  box-shadow: 0 10px 30px rgba(30, 20, 90, .35);
}
.hero-sky {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 8% 18%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 30% 10%, #fffc 50%, transparent 51%),
    radial-gradient(3px 3px at 44% 34%, #fff9 50%, transparent 51%),
    radial-gradient(2px 2px at 62% 12%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 74% 40%, #fffa 50%, transparent 51%),
    radial-gradient(3px 3px at 92% 16%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 18% 52%, #fff8 50%, transparent 51%),
    radial-gradient(2px 2px at 86% 60%, #fff8 50%, transparent 51%);
}
.hero-sky::before, .hero-sky::after {
  content: ""; position: absolute; border-radius: 50%;
  -webkit-mask: radial-gradient(circle, transparent 16%, #000 19%, #000 45%, transparent 50%);
  mask: radial-gradient(circle, transparent 16%, #000 19%, #000 45%, transparent 50%);
}
.hero-sky::before {
  width: 170px; height: 170px; left: calc(50% - 250px); top: -40px;
  background: repeating-conic-gradient(var(--fw-1) 0 2.5deg, transparent 2.5deg 15deg);
  filter: drop-shadow(0 0 8px var(--fw-1));
}
.hero-sky::after {
  width: 150px; height: 150px; left: calc(50% + 110px); top: -30px;
  background: repeating-conic-gradient(var(--fw-2) 0 2.5deg, transparent 2.5deg 18deg);
  filter: drop-shadow(0 0 8px var(--fw-2));
}
.hero-mascot {
  position: absolute; bottom: 10px; width: clamp(92px, 22vw, 170px); z-index: 2;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45));
}
.hero-mascot-l { left: max(-6px, calc(50% - 470px)); transform: rotate(-6deg); }
.hero-mascot-r { right: max(-6px, calc(50% - 470px)); transform: rotate(6deg); }
.hero-back, .mode-btn {
  position: absolute; top: 10px; z-index: 4; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 14px/1.2 "Oswald", sans-serif; letter-spacing: .02em;
  color: #fff; text-decoration: none; background: rgba(255, 255, 255, .14); box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.hero-back { left: 12px; }
.mode-btn { right: 12px; padding-left: 9px; }
.hero-back:hover, .mode-btn:hover { background: rgba(255, 255, 255, .24); }
.mode-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mode-btn:focus-visible, .hero-back:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
:root[data-mode="dark"] .mode-to-dark, :root:not([data-mode="dark"]) .mode-to-light { display: none; }
.hero-squad {
  position: relative; z-index: 1; margin: 0;
  font: 700 italic clamp(40px, 11vw, 72px)/1 "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .02em;
  transform: skewX(-6deg);
  background: linear-gradient(180deg, #fff27a 0%, #ffc021 50%, #ff8a00 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px #7a2c00; paint-order: stroke fill;
  filter: drop-shadow(0 4px 0 #5a1f00) drop-shadow(0 0 16px rgba(255, 180, 40, .55));
}
/* Ribbon: a face with a gold edge and two notched tails folded behind it */
.hero-ribbon {
  position: relative; z-index: 3; display: inline-block; margin: 12px auto 0;
  max-width: min(70vw, 560px);
  font: 700 clamp(17px, 4.4vw, 30px)/1.15 "Segoe UI", Roboto, Arial, sans-serif;
}
.rb-face {
  position: relative; z-index: 1; display: block;
  padding: 8px clamp(16px, 4vw, 34px) 10px;
  color: #fff; text-shadow: 0 2px 0 #7d0f1c, 0 3px 8px rgba(0, 0, 0, .4);
  background: linear-gradient(180deg, #f2394b 0%, #c8162c 100%);
  border-radius: 10px;
  box-shadow: 0 0 0 3px #ffd35a, 0 10px 22px rgba(0, 0, 0, .45);
}
.rb-tail { position: absolute; z-index: 0; top: 14px; bottom: -14px; width: clamp(40px, 8vw, 56px); }
.rb-l { left: calc(-1 * clamp(28px, 6vw, 42px)); }
.rb-r { right: calc(-1 * clamp(28px, 6vw, 42px)); transform: scaleX(-1); }
.rb-tail::before, .rb-tail::after {
  content: ""; position: absolute; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 32% 50%);
}
.rb-tail::before { inset: 0; background: #ffd35a; }
.rb-tail::after { inset: 3px 0 3px 4px; background: linear-gradient(90deg, #d51c31 0%, #a3101f 55%, #5e0712 100%); }
.hero-snow {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 16px; z-index: 1;
  background: radial-gradient(20px 16px at 50% 100%, var(--bg-a) 96%, transparent 100%) 0 100% / 36px 16px repeat-x;
}

/* ---------- search and categories ---------- */
.tools {
  position: sticky; top: 0; z-index: 10;
  max-width: 980px; margin: 0 auto; padding: 12px 16px 10px;
  background: linear-gradient(180deg, var(--tools-a) 70%, var(--tools-b));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.search {
  display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 46px;
  background: var(--surface); border-radius: 999px; box-shadow: var(--card-shadow); color: var(--ink-m);
}
.search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink-d);
  font: 16px/1.2 "Segoe UI", Roboto, Arial, sans-serif;
}
.search input::placeholder { color: var(--ink-m); }
.search:focus-within { box-shadow: 0 0 0 2px var(--pu-2), var(--card-shadow); }
.cats {
  display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding: 2px 2px 4px;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  font: 700 14px/1.2 "Segoe UI", Roboto, Arial, sans-serif; color: var(--chip-text); cursor: pointer;
  background: var(--surface); border: 1px solid var(--pu-line); border-radius: 999px;
  box-shadow: var(--card-shadow);
}
.cat .ico { color: var(--pu-2); }
.cat-n { padding: 1px 7px; border-radius: 999px; font-size: 12px; background: var(--pu-soft); color: var(--chip-n); }
.cat.on { color: #fff; border-color: transparent; background: linear-gradient(180deg, var(--pu-2), var(--pu)); box-shadow: 0 6px 16px var(--pu-glow); }
.cat.on .ico { color: #fff; }
.cat.on .cat-n { background: rgba(255, 255, 255, .25); color: #fff; }
.cat:focus-visible, .more:focus-visible, .plus:focus-visible, .bar-btn:focus-visible, .btn-take:focus-visible { outline: 2px solid var(--pu-2); outline-offset: 2px; }

/* ---------- list ---------- */
.shop-main { max-width: 980px; margin: 0 auto; padding: 4px 16px 120px; }
.notice {
  margin: 4px 0 12px; padding: 10px 14px; border-radius: 16px; text-align: center;
  font-weight: 600; color: var(--notice-ink); background: var(--notice-bg); box-shadow: 0 0 0 1px var(--notice-line), 0 4px 12px rgba(160, 110, 0, .12);
}
.items { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .items { grid-template-columns: 1fr 1fr; gap: 14px; } }
.item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px; background: var(--surface); border-radius: 20px;
  border: 1px solid var(--line); box-shadow: var(--card-shadow);
}
.item.mine { border: 2px solid #2fbf71; }
.item.off .item-pic { filter: grayscale(.55); opacity: .8; }
.item-pic, .sheet-img {
  position: relative; overflow: hidden; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, var(--ph-a) 0%, var(--ph-b) 100%);
  box-shadow: inset 0 0 0 1px var(--line);
}
.item-pic { width: clamp(96px, 27vw, 172px); aspect-ratio: 4 / 3; }
.item-pic img, .sheet-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { display: grid; place-items: center; }
.ph-ico { width: 46%; height: 46%; fill: none; stroke: var(--ph-ico); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.pic-tag {
  position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 9px; background: var(--pic-tag-bg); color: var(--pic-tag-ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.pic-tag .ico { width: 16px; height: 16px; }
.item-main { min-width: 0; }
.item-main h3 { margin: 0 0 8px; font: 800 clamp(15px, 4vw, 18px)/1.2 "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink-d); overflow-wrap: anywhere; }
.item-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stock {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font: 600 13px/1.2 "Segoe UI", Roboto, Arial, sans-serif; color: var(--stock-text); background: var(--pu-soft);
}
.stock.gone { color: var(--gone-ink); background: var(--gone-bg); }
.more {
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
  font: 600 13px/1.2 "Segoe UI", Roboto, Arial, sans-serif; color: var(--accent-text);
  background: var(--surface); border: 1.5px solid var(--accent-border);
}
.more::after { content: " \203A"; font-weight: 800; }
.more:hover { background: var(--pu-soft); }
.item-why { margin: 6px 0 0; font-size: 12.5px; line-height: 1.3; color: var(--ink-m); }
.item-why.ok { color: var(--ok); font-weight: 700; }
.item-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cost {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font: 700 14px/1 "Oswald", sans-serif; color: var(--cost-text);
}
.cost svg { width: 24px; height: 24px; fill: var(--gold); stroke: #e08a00; stroke-width: 1.2; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgba(200, 120, 0, .4)); }
.plus {
  width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 15px; cursor: pointer;
  color: #fff; background: linear-gradient(180deg, var(--pu-2), var(--pu));
  box-shadow: 0 6px 14px var(--pu-glow), inset 0 2px 0 rgba(255, 255, 255, .25);
}
.plus .ico { width: 24px; height: 24px; stroke-width: 2.6; }
.plus:hover:not(:disabled) { filter: brightness(1.08); }
.plus:active:not(:disabled) { transform: translateY(1px); }
.plus:disabled { cursor: default; color: var(--off-ink); background: var(--off-bg); box-shadow: inset 0 0 0 1px var(--pu-line); }
.plus.is-mine:disabled { color: #fff; background: linear-gradient(180deg, #45d487, #23a85e); box-shadow: 0 4px 10px rgba(35, 168, 94, .35); }
.empty { margin: 30px 0; text-align: center; color: var(--ink-m); font-weight: 600; }

/* ---------- bottom bar ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); pointer-events: none; }
.bar-in {
  max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 10px; min-height: 60px;
  padding: 8px 10px 8px 18px; border-radius: 22px; pointer-events: auto;
  background: var(--bar-bg); box-shadow: var(--bar-shadow), 0 0 0 1px var(--line);
}
.bar-wallet span { display: block; font-size: 12px; color: var(--ink-m); }
.bar-wallet b { font: 700 22px/1.1 "Oswald", sans-serif; color: var(--pu-2); }
.bar-login {
  flex: 1; text-align: center; padding: 12px 16px; border-radius: 999px; text-decoration: none;
  font-weight: 800; color: #fff; background: #9146ff; box-shadow: 0 6px 14px rgba(145, 70, 255, .4);
}
.bar-btn {
  margin-left: auto; position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 15px/1.2 "Segoe UI", Roboto, Arial, sans-serif; color: var(--accent-text); background: var(--pu-soft);
}
.bar-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.badge {
  position: absolute; top: -5px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: #e8283c;
  box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- sheets (card, my prizes, editor) ---------- */
.sheet {
  position: fixed;
  width: min(94vw, 520px); max-height: calc(100dvh - 24px); overflow: auto;
  padding: 16px 18px 20px; border: 0; border-radius: 26px; color: var(--ink-d); background: var(--sheet-bg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 0 0 1px var(--line);
}
.sheet::backdrop, .shop .prize-dialog::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet-x {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%;
  font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink-d); background: var(--x-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.sheet-img { width: 100%; aspect-ratio: 16 / 10; cursor: default; }
.sheet-img .pic-tag { display: none; }
.sheet-cat {
  display: inline-flex; align-items: center; gap: 6px; margin: 14px 0 4px; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--accent-text); background: var(--pu-soft);
}
.sheet h2 { margin: 4px 0 6px; font: 800 22px/1.2 "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink-d); padding-right: 30px; }
.sheet-desc { margin: 0 0 8px; color: var(--ink-m); }
.sheet-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0; }
.sheet-meta .cost { flex-direction: row; gap: 6px; font-size: 22px; }
#card-cost::before {
  content: ""; width: 22px; height: 22px; display: inline-block;
  background: radial-gradient(circle at 50% 45%, #ffe27a, #ffb000); border-radius: 50%;
  box-shadow: 0 0 0 2px #e08a00;
}
.sheet-why { margin: 0 0 10px; color: var(--ink-m); font-weight: 600; }
.btn-take {
  display: block; width: 100%; padding: 14px 18px; border: 0; border-radius: 999px; cursor: pointer;
  font: 800 17px/1.2 "Segoe UI", Roboto, Arial, sans-serif; color: #fff;
  background: linear-gradient(180deg, var(--pu-2), var(--pu)); box-shadow: 0 8px 18px var(--pu-glow);
}
.btn-take:disabled { cursor: default; color: var(--off-ink); background: var(--off-bg); box-shadow: none; }
.btn-take.is-mine:disabled { color: #fff; background: linear-gradient(180deg, #45d487, #23a85e); }
#mine h2 { margin-top: 2px; }
.shop .mine-list { list-style: none; margin: 8px 0 14px; padding: 0; display: grid; gap: 8px; }
.shop .mine-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--pu-soft); }
.shop .mine-list li span { color: var(--ink-m); white-space: nowrap; }
.shop .mine-list li.none { color: var(--ink-m); }

/* confirm + "Приз в студию" */
.shop .prize-dialog { background: var(--sheet-bg); color: var(--ink-d); box-shadow: 0 0 0 3px var(--pu-2), 0 24px 60px rgba(0, 0, 0, .45); }
.shop .prize-dialog h2 { color: var(--pu-2); }
.shop .prize-dialog .btn-ghost { background: var(--pu-soft); color: var(--accent-text); box-shadow: none; }
.shop .prize-dialog .msg.err { color: var(--err); }
.shop .studio { color: #ff9500; -webkit-text-stroke: 1.5px #7a2c00; paint-order: stroke fill; text-shadow: 0 3px 0 #7a2c00, 0 0 16px rgba(255, 170, 30, .5); }

/* ---------- prize editor (admin only) ---------- */
.editbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 2px 0 12px; }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--chip-text); user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span {
  position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--switch-off);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .25); transition: background .15s;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); transition: transform .15s;
}
.switch input:checked + span { background: linear-gradient(180deg, var(--pu-2), var(--pu)); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--pu-2); outline-offset: 2px; }
.eb-btn {
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font: 700 13px/1.2 "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--accent-text); background: var(--surface); border: 1.5px solid var(--accent-border); box-shadow: var(--card-shadow);
}
.eb-btn:hover { background: var(--pu-soft); }
.eb-hint { font-size: 12.5px; color: var(--ink-m); }
.item.is-edit { grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; padding-left: 4px; }
.item.is-edit .item-pic { width: clamp(84px, 24vw, 160px); }
.grip {
  align-self: stretch; width: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px;
  cursor: grab; touch-action: none; color: var(--grip); background: transparent;
}
.grip:hover { background: var(--pu-soft); color: var(--pu-2); }
.grip .ico { width: 22px; height: 22px; }
.item.dragging { position: relative; z-index: 5; transform: scale(1.02); box-shadow: 0 0 0 2px var(--pu-2), 0 18px 36px rgba(0, 0, 0, .35); }
.item.dragging .grip { cursor: grabbing; color: var(--pu-2); }
.items.editing .item { transition: box-shadow .15s; }
.item.hidden-prize { background: var(--surface-soft); border-style: dashed; border-color: var(--pu-line); }
.item.hidden-prize .item-pic, .item.hidden-prize h3 { opacity: .6; }
.hid-tag {
  position: absolute; right: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px;
  font: 700 12px/1.3 "Segoe UI", Roboto, Arial, sans-serif; color: #fff; background: var(--tag-bg);
}
.stock.taken { color: var(--taken-ink); background: var(--taken-bg); }
.add-item {
  display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 76px; width: 100%; cursor: pointer;
  font: 800 17px/1.2 "Segoe UI", Roboto, Arial, sans-serif; color: var(--pu-2);
  background: var(--surface-soft); border: 2px dashed var(--accent-border); box-shadow: none;
}
.add-item:hover { background: var(--surface); }
.add-plus {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: #fff;
  background: linear-gradient(180deg, var(--pu-2), var(--pu)); box-shadow: 0 6px 14px var(--pu-glow);
}
.add-plus .ico { width: 24px; height: 24px; stroke-width: 2.6; }
@media (min-width: 900px) { .items .add-item { grid-column: 1 / -1; } }

.editor form { display: grid; gap: 10px; }
.ed-pic { display: grid; place-items: center; cursor: pointer; margin-top: 0; }
.ed-pic img { position: absolute; inset: 0; }
.ed-pic .ph-ico { width: 34%; height: 34%; }
.ed-pic-hint {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); white-space: nowrap;
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: var(--tag-bg);
}
.ed-pic:hover .ed-pic-hint { background: var(--pu); }
.ed-pic:focus-within { outline: 2px solid var(--pu-2); outline-offset: 2px; }
.ed-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ed-cats .cat { padding: 6px 12px; font-size: 13px; }
.ed-title, .ed-desc, .ed-field input {
  width: 100%; border: 1.5px solid var(--pu-line); border-radius: 14px; background: var(--field); color: var(--ink-d);
  font-family: "Segoe UI", Roboto, Arial, sans-serif; outline: 0;
}
.ed-title::placeholder, .ed-desc::placeholder { color: var(--ink-m); }
.ed-title { padding: 10px 14px; font-size: 20px; font-weight: 800; }
.ed-desc { padding: 10px 14px; font-size: 15px; resize: vertical; min-height: 64px; }
.ed-title:focus, .ed-desc:focus, .ed-field input:focus { border-color: var(--pu-2); background: var(--surface); box-shadow: 0 0 0 3px var(--pu-line); }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ed-field { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-m); }
.ed-field input { padding: 9px 12px; font-size: 18px; font-weight: 700; }
.ed-field input:disabled { opacity: .45; }
.ed-msg { margin: 0; min-height: 1.3em; font-size: 14px; color: var(--ink-m); }
.ed-msg.err { color: var(--err); font-weight: 700; }
.ed-del {
  justify-self: center; padding: 6px 12px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 14px/1.2 "Segoe UI", Roboto, Arial, sans-serif; color: var(--err); background: transparent;
}
.ed-del:hover:not(:disabled) { background: var(--gone-bg); }
.ed-del:disabled { cursor: default; color: var(--ink-m); font-weight: 600; }

@media (max-width: 420px) {
  .hero { padding: 48px 10px 38px; }
  .item { gap: 10px; padding: 9px; }
  .plus { width: 44px; height: 44px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) { .plus:active:not(:disabled) { transform: none; } }
