/* =========================================================
   Poshlye Mini App — пастельная серо-розовая тема
   ========================================================= */
:root {
  --bg: #F4EEF0;
  --bg-2: #EFE6E9;
  --card: #FFFFFF;
  --card-2: #FBF7F8;
  --line: #ECE1E5;
  --line-2: #E2D4DA;

  --ink: #2E272B;
  --ink-2: #6E6368;
  --ink-3: #A0949A;

  --pink-50: #FCF1F5;
  --pink-100: #F8E1EA;
  --pink-200: #F2C7D7;
  --pink-300: #EAA5BF;
  --pink-400: #DF85A7;
  --pink-500: #CF6A92;
  --pink-600: #B4527A;

  --mint: #8CCFB0;
  --lilac: #B7A6E0;
  --peach: #F2B99A;
  --sky: #9DBFE6;

  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --shadow-1: 0 1px 2px rgba(78, 40, 56, .05), 0 4px 14px rgba(120, 60, 86, .06);
  --shadow-2: 0 2px 6px rgba(78, 40, 56, .06), 0 14px 36px rgba(150, 70, 104, .14);
  --ease: cubic-bezier(.2, .8, .2, 1);

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", var(--font);

  /* Семантические токены (переопределяются в тёмной теме) */
  --inverse: #2E272B;          /* тёмные плашки: баннеры, тост */
  --on-inverse: #FFFFFF;
  --on-inverse-2: rgba(255, 255, 255, .62);
  --inverse-tile: rgba(255, 255, 255, .1);
  --inverse-line: rgba(255, 255, 255, .13);
  --glass: rgba(244, 238, 240, .78);
  --glass-2: rgba(255, 255, 255, .82);
  --glass-line: rgba(226, 212, 218, .7);
  --glass-hi: rgba(255, 255, 255, .8);
  --chip-bg: rgba(255, 255, 255, .75);
  --tape: rgba(255, 255, 255, .65);
  --glow: rgba(255, 255, 255, .8);
  --blob: rgba(242, 199, 215, .55);
  --blob-2: rgba(234, 165, 191, .25);
  --marks-opacity: .5;
  --hero-1: #FFE6EF; --hero-2: #FFFFFF; --hero-3: #FAEFF3; --hero-4: #F4DFE7; --hero-line: #F0D9E2;
  --btn-1: #DF85A7; --btn-2: #CF6A92; --btn-glow: rgba(207, 106, 146, .35);
  --mix-bg: #FFFFFF;           /* база для подмешивания цвета редкости */
  --mix-ink: #000000;
  --skel-hi: #F8F2F4;
  --backdrop: rgba(60, 38, 48, .32);
  --ok-bg: #E7F5EE; --ok-ink: #3E8B67;
  --warn-bg: #FFF3E6; --warn-ink: #B7742F;
  --err-bg: #FCE8EC; --err-ink: #B4475F;
  --rare-bg: #EAF1FA; --rare-ink: #5D7FA8;
  --epic-bg: #F0ECFA; --epic-ink: #7A68B4;

  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

/* =========================================================
   Тёмная тема — графитово-сливовая, те же пастельные акценты
   ========================================================= */
:root[data-theme="dark"] {
  --bg: #141113;
  --bg-2: #1F1A1D;
  --card: #1D181B;
  --card-2: #241E22;
  --line: #2F272C;
  --line-2: #3D3339;

  --ink: #F3EAEE;
  --ink-2: #B9A9B1;
  --ink-3: #85767E;

  --pink-50: #2A1C23;
  --pink-100: #3A2430;
  --pink-200: #5C3549;
  --pink-300: #C77796;
  --pink-400: #E08CAE;
  --pink-500: #EA9BBA;
  --pink-600: #F3B3CB;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .22);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 14px 36px rgba(0, 0, 0, .4);

  --inverse: #2B2127;
  --on-inverse: #F7EEF2;
  --on-inverse-2: rgba(247, 238, 242, .6);
  --inverse-tile: rgba(255, 255, 255, .07);
  --inverse-line: rgba(255, 255, 255, .1);
  --glass: rgba(20, 17, 19, .8);
  --glass-2: rgba(32, 26, 30, .86);
  --glass-line: rgba(61, 51, 57, .8);
  --glass-hi: rgba(255, 255, 255, .05);
  --chip-bg: rgba(255, 255, 255, .06);
  --tape: rgba(255, 255, 255, .07);
  --glow: rgba(234, 165, 191, .06);
  --blob: rgba(199, 119, 150, .16);
  --blob-2: rgba(183, 166, 224, .08);
  --marks-opacity: .16;
  --hero-1: #3A2230; --hero-2: #221B1F; --hero-3: #251C21; --hero-4: #2E1F28; --hero-line: #3B2A33;
  --btn-1: #D27499; --btn-2: #B95A82; --btn-glow: rgba(185, 90, 130, .28);
  --mix-bg: #1D181B;
  --mix-ink: #FFFFFF;
  --skel-hi: #2A2327;
  --backdrop: rgba(0, 0, 0, .55);
  --ok-bg: rgba(140, 207, 176, .14); --ok-ink: #9ADBBC;
  --warn-bg: rgba(242, 185, 154, .14); --warn-ink: #F2B99A;
  --err-bg: rgba(229, 138, 158, .15); --err-ink: #F0A3B4;
  --rare-bg: rgba(157, 191, 230, .14); --rare-ink: #A9C8EE;
  --epic-bg: rgba(183, 166, 224, .15); --epic-ink: #C6B8EC;
  color-scheme: dark;
}
/* Плавная смена темы (класс ставится на время переключения) */
:root.theme-anim, :root.theme-anim * { transition: background-color .35s ease, border-color .35s ease, color .35s ease !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }  /* иначе display у классов (например .icon-btn) перебивает hidden */
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; display: block; flex: none; }

/* Фон: мягкие пятна + «крестики» из логотипа */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 40% at 100% 0%, var(--blob), transparent 70%),
    radial-gradient(50% 35% at 0% 35%, var(--glow), transparent 70%),
    radial-gradient(70% 40% at 50% 110%, var(--blob-2), transparent 70%);
}
.bg-marks {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--marks-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='220'%3E%3Cg stroke='%23E7B9CA' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M20 30l8 8M28 30l-8 8'/%3E%3Cpath d='M140 120l6 6M146 120l-6 6'/%3E%3Cpath d='M70 190l5 5M75 190l-5 5'/%3E%3C/g%3E%3Cg fill='%23EBC6D3'%3E%3Ccircle cx='110' cy='40' r='1.6'/%3E%3Ccircle cx='40' cy='130' r='1.2'/%3E%3Ccircle cx='160' cy='200' r='1.4'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------------- Topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px 10px 12px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--glass-line);
}
.topbar__logo { height: 34px; width: auto; transform: rotate(-3deg); filter: drop-shadow(0 3px 6px rgba(150, 70, 104, .18)); }
.topbar__right { display: flex; align-items: center; gap: 6px; }

.pill {
  height: 36px; padding: 0 12px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line);
  font-weight: 800; font-size: 14px; box-shadow: var(--shadow-1);
}
.pill b { font-family: var(--display); font-weight: 600; font-size: 13px; }
.pill--online { padding: 0 10px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(140, 207, 176, .25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(140, 207, 176, .08); } }

.icon-btn {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2);
  font-size: 18px; box-shadow: var(--shadow-1); transition: .2s var(--ease);
}
.icon-btn:active { transform: scale(.94); }
.icon-btn.is-active { background: var(--btn-2); border-color: var(--btn-2); color: #fff; }

.gem { display: inline-block; width: 18px; height: 18px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23FFD3E2'/%3E%3Cstop offset='.55' stop-color='%23EC8FB2'/%3E%3Cstop offset='1' stop-color='%23C55A84'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M12 2 4.5 9.2 12 22l7.5-12.8z' fill='url(%23a)'/%3E%3Cpath d='M12 2 8.6 9.2h6.8z' fill='%23fff' opacity='.55'/%3E%3Cpath d='M12 22 8.6 9.2 4.5 9.2z' fill='%23B9507A' opacity='.35'/%3E%3Cpath d='M12 2 4.5 9.2 12 22l7.5-12.8z' fill='none' stroke='%239E3E66' stroke-opacity='.35' stroke-width='.8' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.gem--sm { width: 15px; height: 15px; }
.gem--lg { width: 34px; height: 34px; }
.gem--xl { width: 64px; height: 64px; }

/* ---------------- View ---------------- */
.view {
  padding: 14px 14px calc(108px + var(--safe-b));
  display: flex; flex-direction: column; gap: 12px;
  max-width: 560px; margin: 0 auto;
}
.view > * { animation: rise .45s var(--ease) both; }
.view > *:nth-child(2) { animation-delay: .04s; }
.view > *:nth-child(3) { animation-delay: .08s; }
.view > *:nth-child(4) { animation-delay: .12s; }
.view > *:nth-child(5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-1);
  position: relative;
}
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.card__title { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.card__text { color: var(--ink-2); font-size: 14px; line-height: 1.45; margin: 0; }
.section-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 6px 4px -2px; }

.tile-ic {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  display: grid; place-items: center; font-size: 22px;
  background: var(--pink-50); color: var(--pink-500); border: 1px solid var(--pink-100);
}
.tile-ic--grey { background: var(--bg-2); color: var(--ink-2); border-color: var(--line); }
.tile-ic--sm { width: 34px; height: 34px; border-radius: 11px; font-size: 18px; }

/* ---------------- Buttons ---------------- */
.btn {
  height: 48px; padding: 0 18px; border-radius: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 800; font-size: 15px; letter-spacing: -.005em;
  transition: transform .15s var(--ease), box-shadow .2s, opacity .2s, background .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn svg { font-size: 18px; }
.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--btn-1), var(--btn-2));
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 8px 20px var(--btn-glow);
}
.btn--dark { color: var(--on-inverse); background: var(--inverse); box-shadow: 0 8px 18px rgba(46, 39, 43, .2), 0 0 0 1px var(--inverse-line) inset; }
.btn--soft { background: var(--pink-50); color: var(--pink-600); border: 1px solid var(--pink-100); }
.btn--ghost { background: var(--card-2); color: var(--ink-2); border: 1px solid var(--line); }
.btn--block { width: 100%; }
.btn--sm { height: 40px; border-radius: 12px; font-size: 14px; padding: 0 14px; }
.btn[disabled], .btn.is-wait { opacity: 1; cursor: default; background: var(--bg-2); color: var(--ink-3); box-shadow: none; border: 1px solid var(--line); }
.btn.is-loading { pointer-events: none; opacity: .7; }

/* ---------------- Hero ---------------- */
.hero {
  border-radius: var(--r-lg); padding: 18px; overflow: hidden; position: relative;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--hero-1) 0%, transparent 60%),
    linear-gradient(160deg, var(--hero-2) 0%, var(--hero-3) 55%, var(--hero-4) 100%);
  border: 1px solid var(--hero-line); box-shadow: var(--shadow-2);
}
.hero::after { /* «скотч» стикера */
  content: ""; position: absolute; top: -8px; right: 46px; width: 70px; height: 24px;
  background: var(--tape); transform: rotate(8deg);
  border: 1px solid var(--glass-line); border-radius: 3px;
}
.hero__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hero__hi { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.hero__name { font-family: var(--display); font-weight: 700; font-size: 20px; margin-top: 2px; letter-spacing: -.02em; }
.hero__bal { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.hero__num { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: -.04em; }
.hero__unit { color: var(--ink-2); font-weight: 700; font-size: 14px; align-self: flex-end; margin-bottom: 5px; }
.hero__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 999px;
  background: var(--chip-bg); border: 1px solid var(--line); font-weight: 800; font-size: 13px; color: var(--ink-2);
}
.chip svg { font-size: 14px; }
.hero__logo { position: absolute; right: -24px; top: 64px; width: 150px; opacity: .14; transform: rotate(-12deg); pointer-events: none; }

/* ---------------- Rows / list cards ---------------- */
.row { display: flex; align-items: center; gap: 12px; }
.row__body { flex: 1; min-width: 0; }
.row__title { font-weight: 800; font-size: 15px; }
.row__sub { color: var(--ink-2); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.stack > * + * { border-top: 1px dashed var(--line-2); margin-top: 14px; padding-top: 14px; }

.progress { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin-top: 14px; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink-300), var(--pink-500)); transition: width .6s var(--ease); }
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--ink-3); margin-top: 6px; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick button {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 4px 10px; font-size: 12px !important;
  display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: var(--shadow-1);
  font-weight: 800; font-size: 13px; transition: transform .15s var(--ease);
}
.quick button:active { transform: scale(.96); }

.banner {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r);
  background: var(--inverse); color: var(--on-inverse); box-shadow: 0 0 0 1px var(--inverse-line) inset; text-decoration: none; position: relative; overflow: hidden;
}
.banner::before { content: ""; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(234,165,191,.5), transparent 70%); }
.banner .tile-ic { background: var(--inverse-tile); border-color: var(--inverse-line); color: #F2C7D7; }
.banner .row__sub { color: var(--on-inverse-2); }

/* ---------------- Stat header ---------------- */
.stat { display: flex; align-items: center; gap: 14px; }
.stat__num { font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -.03em; line-height: 1.05; }
.stat__label { color: var(--ink-2); font-size: 13px; font-weight: 600; }

/* ---------------- Cases ---------------- */
.case-hero { display: flex; gap: 14px; align-items: center; }
.case-art { width: 100px; height: 100px; flex: none; position: relative; }
.case-art svg { width: 100%; height: 100%; filter: drop-shadow(0 12px 16px rgba(180, 82, 122, .25)); }
.case-art.is-ready svg { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-2deg); } }
.case-title { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.2; letter-spacing: -.02em; }
.rewards { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.rw {
  display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 8px 0 6px; border-radius: 8px;
  font-size: 12px; font-weight: 800; background: var(--bg-2); color: var(--ink-2);
}
.rw .gem { width: 11px; height: 11px; }
.r-common { --rc: #B7AAB0; } .r-rare { --rc: var(--sky); } .r-epic { --rc: var(--lilac); } .r-legend { --rc: var(--pink-400); }
.rw.r-rare { background: var(--rare-bg); color: var(--rare-ink); }
.rw.r-epic { background: var(--epic-bg); color: var(--epic-ink); }
.rw.r-legend { background: var(--pink-100); color: var(--pink-600); }

.servers { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px -4px; padding: 0 16px 4px; scrollbar-width: none; }
.servers::-webkit-scrollbar { display: none; }
.server {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px;
  border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); font-weight: 800; font-size: 13px;
  transition: .15s var(--ease);
}
.server i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.server.is-off { color: var(--ink-3); } .server.is-off i { background: var(--line-2); }
.server.is-sel { background: var(--pink-50); border-color: var(--pink-300); color: var(--pink-600); }

.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 15px; background: var(--bg-2); border: 1px solid var(--line); }
.seg button { height: 38px; border-radius: 11px; font-weight: 800; font-size: 14px; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 7px; transition: .2s var(--ease); }
.seg button.is-active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }
.seg svg { font-size: 16px; }

.items { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.item__ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--rc) 18%, var(--mix-bg)); border: 1px solid color-mix(in srgb, var(--rc) 35%, var(--mix-bg)); color: color-mix(in srgb, var(--rc) 80%, var(--mix-ink)); font-size: 18px; }
.item__title { font-weight: 800; font-size: 14px; }
.item__sub { color: var(--ink-3); font-size: 12px; font-weight: 600; margin-top: 1px; }
.item__val { margin-left: auto; font-family: var(--display); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 4px; }

.empty { text-align: center; padding: 28px 16px; color: var(--ink-3); font-weight: 600; font-size: 14px; }
.empty b { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }

/* ---------------- Rating ---------------- */
.me-rank {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r);
  background: linear-gradient(135deg, var(--card), var(--pink-50)); border: 1px solid var(--pink-100); box-shadow: var(--shadow-1);
}
.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 8px; align-items: end; }
.pod { text-align: center; padding: 14px 8px 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); position: relative; }
.pod--1 { padding-top: 22px; background: linear-gradient(180deg, var(--pink-50), var(--card)); border-color: var(--pink-200); }
.pod .ava { margin: 0 auto 8px; }
.pod__place { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-family: var(--display); font-size: 12px; font-weight: 700; color: #fff; background: var(--ink-3); box-shadow: 0 4px 10px rgba(0,0,0,.08); }
.pod--1 .pod__place { background: var(--pink-500); }
.pod--2 .pod__place { background: #A9A0B8; }
.pod--3 .pod__place { background: #D7A38A; }
.pod__name { font-weight: 800; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; justify-content: center; gap: 3px; }
.pod__val { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--pink-600); }

.lb { display: flex; flex-direction: column; }
.lb__row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
.lb__row + .lb__row { border-top: 1px solid var(--line); }
.lb__row.is-me { background: var(--pink-50); }
.lb__pos { width: 26px; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--ink-3); text-align: center; }
.lb__name { flex: 1; min-width: 0; font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 4px; }
.lb__name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb__val { display: flex; align-items: center; gap: 5px; font-family: var(--display); font-weight: 600; font-size: 14px; }
.verified { color: var(--pink-400); font-size: 15px; }

.ava { width: 40px; height: 40px; border-radius: 13px; flex: none; display: grid; place-items: center; overflow: hidden; font-weight: 800; font-size: 15px; color: #fff; background: var(--ava, var(--pink-300)); }
.ava { position: relative; }
.ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--ava, var(--pink-300)); }
.ava--lg { width: 52px; height: 52px; border-radius: 17px; font-size: 19px; }
.ava--xl { width: 92px; height: 92px; border-radius: 28px; font-size: 32px; border: 4px solid var(--card); box-shadow: var(--shadow-2); }

/* ---------------- Profile ---------------- */
.profile-head { text-align: center; padding: 26px 16px 18px; border-radius: var(--r-lg); position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--pink-100) 0%, var(--card) 70%); border: 1px solid var(--pink-100); box-shadow: var(--shadow-1); }
.profile-head .ava { margin: 0 auto 12px; transform: rotate(-3deg); }
.profile-name { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.profile-id { color: var(--ink-3); font-size: 13px; font-weight: 700; margin-top: 4px; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv__k { color: var(--ink-2); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.kv__k svg { font-size: 18px; color: var(--ink-3); }
.kv__v { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 6px; text-align: right; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 600; letter-spacing: .01em; }
.copy { color: var(--ink-3); font-size: 16px; padding: 4px; margin: -4px; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 800; background: var(--ok-bg); color: var(--ok-ink); }
.badge--off { background: var(--bg-2); color: var(--ink-3); }

/* ---------------- Forms / FAQ ---------------- */
.page-head { text-align: center; padding: 24px 18px 20px; }
.page-head .tile-ic { margin: 0 auto 12px; width: 60px; height: 60px; border-radius: 20px; font-size: 28px; }
.page-head h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.page-head p { margin: 8px auto 0; max-width: 300px; }
.field { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-radius: 15px; background: var(--card-2); border: 1.5px solid var(--line); transition: border-color .2s, box-shadow .2s; margin: 10px 0 12px; }
.field:focus-within { border-color: var(--pink-300); box-shadow: 0 0 0 4px var(--pink-50); }
.field svg { color: var(--ink-3); font-size: 18px; }
.field input { flex: 1; border: 0; outline: 0; background: none; font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; min-width: 0; }
.field input::placeholder { text-transform: none; letter-spacing: 0; color: var(--ink-3); font-weight: 600; }
.label { font-weight: 800; font-size: 14px; }

.faq details { border-top: 1px solid var(--line); }
.faq details:first-of-type { border-top: 0; }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; font-weight: 800; font-size: 14px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { color: var(--ink-3); transition: transform .25s var(--ease); font-size: 18px; }
.faq details[open] summary { color: var(--pink-500); }
.faq details[open] summary svg { transform: rotate(180deg); color: var(--pink-500); }
.faq details p { margin: -4px 0 15px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }

.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; color: var(--ink-2); margin: -2px 0 -4px 2px; align-self: flex-start; }
.back svg { transform: rotate(180deg); font-size: 16px; }

/* ---------------- Tabbar ---------------- */
.tabbar {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b));
  max-width: 536px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px;
  background: var(--glass-2); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--glass-line); border-radius: 24px;
  box-shadow: var(--shadow-2), 0 1px 0 var(--glass-hi) inset;
}
.tabbar button { height: 54px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); font-weight: 800; font-size: 10.5px; transition: color .2s, background .25s var(--ease); }
.tabbar svg { font-size: 22px; transition: transform .3s var(--ease); }
.tabbar button.is-active { color: var(--pink-600); background: var(--pink-50); }
.tabbar button.is-active svg { transform: translateY(-1px) scale(1.06); }

/* ---------------- Modal / roulette ---------------- */
.modal { --dim: 1; position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: color-mix(in srgb, var(--backdrop) calc(var(--dim) * 100%), transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s both; }
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; background: var(--bg); border-radius: 30px 30px 0 0; padding: 10px 16px calc(20px + var(--safe-b)); animation: up .4s var(--ease) both; box-shadow: 0 -10px 40px rgba(0,0,0,.12); }
@keyframes up { from { transform: translateY(100%); } }
.sheet__grab { display: block; width: 100%; height: 26px; margin: -10px 0 6px; position: relative; cursor: grab; background: none; touch-action: none; }
.sheet__grab::before { content: ""; position: absolute; left: 50%; top: 11px; width: 40px; height: 5px; margin-left: -20px; border-radius: 9px; background: var(--line-2); transition: background .2s, width .2s; }
.sheet__grab:hover::before { background: var(--ink-3); width: 48px; margin-left: -24px; }
.sheet__grab.is-static { cursor: default; }
.sheet__grab.is-static:hover::before { background: var(--line-2); width: 40px; margin-left: -20px; }
.sheet__title { text-align: center; font-family: var(--display); font-weight: 700; font-size: 18px; margin-bottom: 14px; }

.roulette { position: relative; height: 112px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow-1) inset; }
.roulette::before, .roulette::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none; }
.roulette::before { left: 0; background: linear-gradient(90deg, var(--card), transparent); }
.roulette::after { right: 0; background: linear-gradient(270deg, var(--card), transparent); }
.roulette__needle { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; transform: translateX(-50%); background: var(--pink-500); z-index: 3; border-radius: 3px; }
.roulette__needle::before, .roulette__needle::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 7px solid transparent; }
.roulette__needle::before { top: 0; border-top-color: var(--pink-500); }
.roulette__needle::after { bottom: 0; border-bottom-color: var(--pink-500); }
.roulette__strip { display: flex; gap: 8px; padding: 12px 0; position: absolute; left: 0; top: 0; will-change: transform; }
.rtile { width: 84px; height: 88px; flex: none; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: color-mix(in srgb, var(--rc) 14%, var(--mix-bg)); border: 1px solid color-mix(in srgb, var(--rc) 40%, var(--mix-bg));
  font-family: var(--display); font-weight: 700; font-size: 16px; color: color-mix(in srgb, var(--rc) 75%, var(--mix-ink)); position: relative; }
.rtile::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 3px; border-radius: 3px; background: var(--rc); }
.rtile .gem { width: 26px; height: 26px; }
.rtile { transition: transform .35s var(--ease), box-shadow .35s; }
.rtile.is-win { transform: scale(1.08); box-shadow: 0 0 0 3px var(--rc), 0 10px 22px rgba(207,106,146,.25); }

.win { text-align: center; padding: 18px 0 6px; animation: rise .4s var(--ease) both; }
.win__big { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 40px; letter-spacing: -.03em; }
.win__sub { color: var(--ink-2); font-weight: 700; margin-top: 4px; }
.burst { position: fixed; pointer-events: none; z-index: 60; width: 10px; height: 10px; border-radius: 2px; }

/* ---------------- Toast ---------------- */
.toast { position: fixed; z-index: 70; left: 50%; top: 14px; transform: translate(-50%, calc(-100% - 40px)); visibility: hidden; max-width: calc(100% - 28px);
  background: var(--inverse); color: var(--on-inverse); padding: 12px 16px; border-radius: 16px; font-weight: 700; font-size: 14px;
  box-shadow: 0 12px 30px rgba(46, 39, 43, .25); transition: transform .35s var(--ease), visibility .35s; display: flex; align-items: center; gap: 8px; }
.toast.is-show { transform: translate(-50%, 0); visibility: visible; }
.toast.is-ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); flex: none; }
.toast.is-err::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pink-300); flex: none; }

/* ---------------- Skeleton ---------------- */
.skel { border-radius: var(--r); background: linear-gradient(90deg, var(--bg-2) 0%, var(--skel-hi) 50%, var(--bg-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

.muted { color: var(--ink-3); }
.pink { color: var(--pink-500); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; }
.foot-note { text-align: center; color: var(--ink-3); font-size: 12px; font-weight: 700; padding: 6px 0 0; }


/* ---------------- Admin ---------------- */
.adm-top { display: flex; align-items: center; gap: 10px; margin-bottom: -2px; }
.adm-top__title { flex: 1; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.adm-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.adm-tabs button { height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 6px;
  font-weight: 800; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; min-width: 0; transition: .2s var(--ease); }
.adm-tabs button span { overflow: hidden; text-overflow: ellipsis; }
.adm-tabs svg { font-size: 16px; flex: none; }
.adm-tabs button.is-active { background: var(--card); color: var(--pink-600); box-shadow: var(--shadow-1); }
.adm-body { display: flex; flex-direction: column; animation: rise .35s var(--ease) both; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 13px 14px; box-shadow: var(--shadow-1); min-width: 0; }
.stat-tile__k { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.stat-tile__v { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -.03em; margin-top: 6px; }
.stat-tile__sub { font-size: 11.5px; font-weight: 700; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-tile:first-child { background: linear-gradient(150deg, var(--card), var(--pink-50)); border-color: var(--pink-100); }
.stat-tile:first-child .stat-tile__v { color: var(--pink-600); }

.log-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.log-row + .log-row { border-top: 1px solid var(--line); }
.log-row__meta { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-align: right; flex: none; line-height: 1.4; }
.log-row .item__sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

.field--plain input { text-transform: none; letter-spacing: 0; font-weight: 700; }
.field input[type=number] { -moz-appearance: textfield; }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 2px; }
.chip--btn, .chips .chip { cursor: pointer; background: var(--card); transition: .15s var(--ease); }
.chips .chip:active { transform: scale(.95); background: var(--pink-50); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.two > * { min-width: 0; }
.field input { width: 100%; }
.item.is-dim { opacity: .55; }
.vcopy { font-size: 14px; font-weight: 700; color: var(--ink); }

.textarea { width: 100%; resize: vertical; min-height: 120px; margin: 12px 0 10px; padding: 12px 14px; border-radius: 15px;
  background: var(--card-2); border: 1.5px solid var(--line); outline: 0; font-weight: 600; font-size: 15px; line-height: 1.45; transition: border-color .2s, box-shadow .2s; }
.textarea:focus { border-color: var(--pink-300); box-shadow: 0 0 0 4px var(--pink-50); }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch i { width: 44px; height: 26px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: transform .25s var(--ease); }
.switch input:checked + i { background: var(--btn-2); }
.switch input:checked + i::after { transform: translateX(18px); }

.sheet__scroll { max-height: 78vh; overflow-y: auto; margin: 0 -16px; padding: 0 16px 4px; overscroll-behavior: contain; }
.sheet .card { box-shadow: none; }


/* ---------------- Cases v2 ---------------- */
.server small { font-size: 11px; color: var(--ink-3); font-weight: 800; margin-left: 2px; }
.link-btn { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; font-size: 13px; font-weight: 800; color: var(--pink-500); }
.link-btn svg { font-size: 14px; }
.link-inline { font-weight: 800; color: var(--pink-600); font-size: inherit; }
.rw--item { padding: 0 8px 0 6px; }
.rw svg { font-size: 12px; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.case-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 12px 12px 14px; box-shadow: var(--shadow-1); text-align: left; display: flex; flex-direction: column; transition: transform .15s var(--ease); }
.case-card:active { transform: scale(.97); }
.case-card__art { height: 96px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(160deg, var(--pink-50), var(--card)); margin-bottom: 10px; }
.case-card__art svg { width: 86px; height: 86px; filter: drop-shadow(0 8px 12px rgba(180, 82, 122, .2)); }
.case-tint { --tint: var(--pink-200); }
.case-tint svg [fill="url(#cb)"], .case-tint svg [fill="url(#cl)"] { fill: var(--tint); }
.case-card__title { font-weight: 800; font-size: 15px; }
.case-card__meta { font-size: 12px; color: var(--ink-3); font-weight: 700; display: flex; align-items: center; gap: 3px; margin-top: 2px; }
.case-card__meta svg { color: var(--pink-400); font-size: 13px; }
.case-card__price { margin-top: 10px; align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 10px; background: var(--inverse); color: var(--on-inverse); font-family: var(--display); font-weight: 600; font-size: 13px; }
.chance { font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--ink-2); }
.rtile--item span { font-family: var(--font); font-size: 11px; font-weight: 800; text-align: center; line-height: 1.15; padding: 0 6px; }
.rtile svg { font-size: 24px; }
.win__big svg { font-size: .9em; color: var(--pink-500); }
.dstatus { flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; }
.dstatus--wait { background: var(--warn-bg); color: var(--warn-ink); }
.dstatus--ok { background: var(--ok-bg); color: var(--ok-ink); }
.dstatus--err { background: var(--err-bg); color: var(--err-ink); }
.dstatus--off { background: var(--bg-2); color: var(--ink-3); }

/* ---------------- Giveaways ---------------- */
.gw-teaser { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); text-align: left;
  background: linear-gradient(135deg, var(--card) 0%, var(--pink-50) 60%, var(--pink-100) 100%); border: 1px solid var(--pink-200); box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.gw-teaser::after { content: ""; position: absolute; right: -14px; top: -14px; width: 70px; height: 70px; border-radius: 50%; border: 10px solid var(--tape); }
.gw-teaser__ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--pink-200); color: var(--pink-500); font-size: 24px; flex: none; }
.gw-teaser__k { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pink-500); }
.gw-teaser .row__sub { display: flex; align-items: center; gap: 4px; }
.gw-teaser .row__sub svg { font-size: 13px; }
.gw-teaser .btn, .gw-teaser .badge { position: relative; z-index: 1; }
.gw-hero { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--inverse); color: var(--on-inverse); box-shadow: 0 0 0 1px var(--inverse-line) inset; position: relative; overflow: hidden; }
.gw-hero::after { content: ""; position: absolute; right: -30px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(234,165,191,.5), transparent 70%); }
.gw-hero .tile-ic { background: var(--inverse-tile); border-color: var(--inverse-line); color: #F2C7D7; }
.gw-hero .row__sub { color: var(--on-inverse-2); }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.gw__top { display: flex; gap: 14px; align-items: center; }
.gw__prize { width: 64px; height: 64px; border-radius: 20px; flex: none; display: grid; place-items: center; font-size: 30px;
  background: color-mix(in srgb, var(--rc) 16%, var(--mix-bg)); border: 1px solid color-mix(in srgb, var(--rc) 40%, var(--mix-bg)); color: color-mix(in srgb, var(--rc) 80%, var(--mix-ink)); transform: rotate(-4deg); }
.gw__label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.gw__prize-title { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--pink-600); margin-top: 2px; }
.gw__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.gw__meta .chip { background: var(--card-2); height: 28px; font-size: 12px; }
.gw__reqs { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.gw__reqs span { display: flex; align-items: center; gap: 6px; }
.gw__reqs svg { color: var(--mint); font-size: 15px; }
.gw--fin { background: var(--card-2); }
.gw__won { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--pink-100); color: var(--pink-600); font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.gw__winners { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.gw__winner { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; text-align: left; }
.gw__winner .ava { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }

/* ---------------- Admin forms ---------------- */
.inp { color: var(--ink); width: 100%; min-width: 0; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--card-2); border: 1.5px solid var(--line); outline: 0; font-weight: 700; font-size: 15px; transition: border-color .2s, box-shadow .2s; }
textarea.inp { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.4; }
select.inp { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23A0949A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; }
.inp:focus { border-color: var(--pink-300); box-shadow: 0 0 0 4px var(--pink-50); }
.inp.mono { font-size: 13px; }
.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--ink-2); margin-top: 10px; }
.lbl:first-child { margin-top: 0; }
.seg--3 { grid-template-columns: repeat(3, 1fr); }
.seg .cnt { font-family: var(--display); font-size: 11px; font-weight: 600; color: var(--ink-3); }
.chip--on { background: var(--btn-2) !important; border-color: var(--btn-2) !important; color: #fff !important; }
.icon-btn--sm { width: 32px; height: 32px; border-radius: 10px; font-size: 16px; box-shadow: none; flex: none; }
.switch--sm { font-size: 13px; }
.switch--sm i { width: 38px; height: 22px; } .switch--sm i::after { width: 16px; height: 16px; }
.switch--sm input:checked + i::after { transform: translateX(16px); }
.switch input:disabled + i { opacity: .6; }

.ed-items { display: flex; flex-direction: column; gap: 10px; }
.ed-item { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--rc); border-radius: 16px; padding: 12px; }
.ed-item__head { display: flex; align-items: center; gap: 8px; }
.ed-item__n { width: 24px; height: 24px; border-radius: 8px; flex: none; display: grid; place-items: center; font-family: var(--display); font-size: 11px; font-weight: 700; background: color-mix(in srgb, var(--rc) 20%, var(--mix-bg)); color: color-mix(in srgb, var(--rc) 70%, var(--mix-ink)); }
.ed-item__head .inp { height: 40px; }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ed-grid label, .ed-cmd { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 800; color: var(--ink-3); min-width: 0; }
.ed-grid .inp { height: 40px; font-size: 14px; }
.ed-cmd { margin: 8px 0 10px; }
.ed-item__chance { font-size: 12.5px; font-weight: 700; color: var(--ink-3); margin-top: 8px; }
.ed-item__chance b { color: var(--pink-600); font-family: var(--display); font-weight: 600; }
.ed-help { font-size: 13px; color: var(--ink-2); }
.ed-help summary { font-weight: 800; cursor: pointer; color: var(--pink-500); }
.ed-help p { line-height: 1.6; margin: 8px 0 0; }
.ed-help code, .dlv__cmd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; background: var(--bg-2); padding: 1px 5px; border-radius: 6px; }

.adm-gw .gw__meta { margin-top: 10px; }
.srv-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); flex: none; }
.srv-dot.is-on { background: var(--mint); box-shadow: 0 0 0 3px rgba(140,207,176,.25); }
.srv-dot.is-off { background: #E58A9E; }
.rcon-console summary { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.rcon-console summary::-webkit-details-marker { display: none; }
.rcon-out { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--inverse); color: var(--on-inverse); font-size: 11.5px; line-height: 1.45; max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.dlv { padding: 12px 14px; }
.dlv__cmd { display: block; margin-top: 8px; padding: 8px 10px; word-break: break-all; white-space: pre-wrap; }
.dlv__err { margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--err-ink); }

/* ---------------- Theme picker ---------------- */
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-pick button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 6px 10px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card-2); font-weight: 800; font-size: 13px; color: var(--ink-2); transition: .2s var(--ease); }
.theme-pick button.is-active { border-color: var(--pink-300); color: var(--pink-600); background: var(--pink-50); }
.theme-pick__sw { width: 100%; height: 46px; border-radius: 10px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.theme-pick__sw::before, .theme-pick__sw::after { content: ""; position: absolute; left: 8px; right: 8px; height: 8px; border-radius: 4px; }
.theme-pick__sw::before { top: 10px; } .theme-pick__sw::after { top: 24px; right: 30px; }
.sw-light { background: #F4EEF0; } .sw-light::before { background: #fff; } .sw-light::after { background: #EAA5BF; }
.sw-dark { background: #141113; } .sw-dark::before { background: #241E22; } .sw-dark::after { background: #D27499; }
.sw-auto { background: linear-gradient(135deg, #F4EEF0 50%, #141113 50%); } .sw-auto::before { background: linear-gradient(90deg, #fff 50%, #241E22 50%); } .sw-auto::after { background: #DF85A7; }


/* ---------------- Tasks ---------------- */
.task .card__head { align-items: flex-start; }
.task .card__head .rw { flex: none; margin-top: 4px; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task__repeat { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 11.5px; font-weight: 800; color: var(--pink-500); }
.task__repeat svg { font-size: 12px; }
.task__done { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--ok-bg); color: var(--ok-ink); font-weight: 800; font-size: 13.5px; }
.task--done { opacity: .78; }
.task--done .card__text { display: none; }
.task--ready { border-color: var(--pink-200); box-shadow: var(--shadow-1), 0 0 0 3px var(--pink-50); }
.hint-box { padding: 12px; border-radius: 14px; background: var(--card-2); border: 1px dashed var(--line-2); }
.hint-text { font-size: 12.5px; font-weight: 600; color: var(--ink-3); line-height: 1.45; margin: 8px 2px 0; }
.kind-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.kind-pick button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); font-size: 11.5px; font-weight: 800; color: var(--ink-2); text-align: center; line-height: 1.2; transition: .15s var(--ease); }
.kind-pick svg { font-size: 20px; }
.kind-pick button.is-active { border-color: var(--pink-300); background: var(--pink-50); color: var(--pink-600); }
.adm-task { padding: 12px 14px; }
.adm-task__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.adm-task__foot b { color: var(--ink); }
.adm-task__ctl { display: flex; align-items: center; gap: 6px; }
.adm-task__ctl .icon-btn:disabled { opacity: .35; }
.adm-task .rw { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-badge { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; }
.role-badge svg { font-size: 13px; }
.role-badge--owner { background: var(--warn-bg); color: var(--warn-ink); }
.role-badge--admin { background: var(--pink-50); color: var(--pink-600); }

/* Пока открыта страница поверх вкладок (админка, ваучер, FAQ, розыгрыши) — не подсвечиваем вкладку внизу */
body.on-page .tabbar button.is-active { background: none; color: var(--ink-3); }
body.on-page .tabbar button.is-active svg { transform: none; }

/* Узкие телефоны: шапка в одну строку без обрезания */
@media (max-width: 389px) {
  .topbar { padding: 8px 10px; gap: 6px; }
  .topbar__logo { height: 28px; }
  .topbar__right { gap: 4px; }
  .pill { height: 32px; padding: 0 9px; gap: 5px; }
  .pill--online { padding: 0 8px; }
  .icon-btn { width: 32px; height: 32px; border-radius: 10px; font-size: 16px; }
  .adm-tabs button { font-size: 11.5px; gap: 4px; padding: 0 3px; }
  .adm-tabs svg { font-size: 14px; }
}
@media (max-width: 340px) { .pill--online { display: none; } }

.modal.is-closing { opacity: 0; transition: opacity .23s ease .05s; pointer-events: none; }


/* ---------------- Карточка игрока ---------------- */
.user-sheet__top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.user-sheet__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 800; font-size: 16px; line-height: 1.25; }
.user-sheet__name > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.user-sheet__top .row__sub svg { display: inline-block; vertical-align: -2px; font-size: 13px; }
.ucards { display: flex; flex-direction: column; gap: 12px; }
.ustats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ustats > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 9px 8px; min-width: 0; text-align: center; }
.ustats span { display: block; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.ustats b { display: flex; align-items: center; justify-content: center; gap: 3px; margin-top: 3px; font-family: var(--display); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; }
.ustats .gem { width: 12px; height: 12px; }
.ucard__head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ucard__ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--pink-50); color: var(--pink-500); font-size: 15px; flex: none; }
.ucard__title { font-weight: 800; font-size: 14.5px; }
.ucard .field { margin: 0 0 10px; }
.ucard .chips { margin: -2px 0 10px; }
.reset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.reset-grid .btn { padding: 0 4px; gap: 4px; font-size: 13px; }
.reset-grid .btn svg { font-size: 14px; }
/* Подписи разделов внутри шторок — с отступами, не прилипают к блокам */
.sheet__scroll > .section-label { margin: 18px 4px 8px; }
.sheet__scroll > .section-label:first-child { margin-top: 0; }


/* ---------------- Админ-панель: главный экран ---------------- */
.adm-top .row__body { min-width: 0; }
.adm-top__crumb { font-size: 12px; font-weight: 700; color: var(--ink-3); margin-top: 1px; }
.adm-top__ic { width: 36px; height: 36px; border-radius: 12px; font-size: 18px; }
.kpis { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 8px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: var(--shadow-1); min-width: 0; }
.kpi span { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.kpi b { display: block; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.03em; margin-top: 4px; }
.kpi em { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi--main { background: linear-gradient(150deg, var(--card), var(--pink-50)); border-color: var(--pink-100); }
.kpi--main b { color: var(--pink-600); }
.adm-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adm-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 12px 11px; text-align: left; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1); transition: transform .15s var(--ease), border-color .2s; }
.adm-tile:active { transform: scale(.97); }
.adm-tile:hover { border-color: var(--pink-200); }
.adm-tile__ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; margin-bottom: 8px;
  background: var(--pink-50); color: var(--pink-500); border: 1px solid var(--pink-100); }
.adm-tile__title { font-weight: 800; font-size: 14.5px; }
.adm-tile__sub { font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.adm-tile__alert { position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; background: var(--err-bg); color: var(--err-ink); }
.adm-more { padding: 0; overflow: hidden; }
.adm-more summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-weight: 800; font-size: 14px; cursor: pointer; }
.adm-more summary::-webkit-details-marker { display: none; }
.adm-more summary svg:last-child { margin-left: auto; color: var(--ink-3); transition: transform .25s var(--ease); }
.adm-more[open] summary svg:last-child { transform: rotate(180deg); }
.adm-more .kv:first-of-type { border-top: 1px solid var(--line); }
.log-more { width: 100%; padding: 12px; border-top: 1px solid var(--line); font-weight: 800; font-size: 13px; color: var(--pink-500); }
.adm-body { gap: 12px; }
.adm-body > .section-label { margin: 4px 4px -4px; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.section-head .link-btn svg { font-size: 13px; }
.srv-dot.is-wait { background: var(--peach); animation: pulse 1.2s infinite; }
.mode-card { margin-bottom: 0; }
@media (max-width: 389px) {
  .kpi { padding: 10px; } .kpi b { font-size: 19px; }
  .adm-tile { padding: 11px 10px 10px; }
}

/* ---------------- Обязательная подписка ---------------- */
body.gated .tabbar, body.gated .topbar__right { display: none; }
body.gated .view { padding-bottom: calc(24px + var(--safe-b)); }
.gate { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 24px 18px 20px; margin-top: 4vh; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.gate__logo { width: 190px; max-width: 70%; margin: 0 auto 2px; transform: rotate(-4deg); filter: drop-shadow(0 6px 12px rgba(150, 70, 104, .2)); }
.gate__title { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.gate__text { margin: -6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.gate__list { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.gate__chat { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); }
.gate__chat.is-ok { background: var(--ok-bg); border-color: transparent; }
.gate__chat.is-ok .tile-ic { background: var(--card); color: var(--ok-ink); border-color: transparent; }
.gate .foot-note { padding: 0; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
