/* ============================================================ home */
.hero { padding: 56px 0 40px; }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { margin: 14px 0 18px; }
.hero .lead { font-size: 18px; color: var(--text-2); max-width: 540px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-wheel { position: relative; max-width: 480px; width: 100%; justify-self: center; }
@media (max-width: 900px) {
  .hero { padding-top: 32px; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-wheel { max-width: 340px; order: -1; }
}

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { padding: 22px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; margin-bottom: 16px;
  font-family: var(--font-display); font-weight: 800; background: var(--accent-grad); color: #fff;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.odds { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.odds > * { min-width: 0; }
@media (max-width: 900px) { .odds { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .table th, .table td { padding: 10px 8px; font-size: 14px; }
  .table th { font-size: 11px; letter-spacing: .04em; }
}
.formula {
  padding: 22px; font-size: 15px; color: var(--text-2);
}
.formula .math {
  font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 24px); color: var(--text); padding: 18px; margin: 14px 0;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; text-align: center; letter-spacing: .02em;
}
.formula .math small { display: block; font-family: var(--font); font-size: 13px; color: var(--muted); margin-top: 6px; letter-spacing: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .name { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.table-card { overflow: hidden; }
.table-scroll, .table-card .table-scroll { overflow-x: auto; } /* широкая таблица прокручивается сама, а не раздвигает страницу на телефоне */

.calc { padding: 22px; margin-top: 16px; }
.calc h3 { margin-bottom: 4px; }
.calc-inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.calc-inputs label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--rc); }
.calc-inputs .input { padding: 10px 12px; }
@media (max-width: 560px) { .calc-inputs { grid-template-columns: 1fr 1fr; } }

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rules .card { padding: 24px; }
.rules h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rules ul { margin: 0; padding-left: 20px; color: var(--text-2); }
.rules li { margin: 8px 0; }
.rules li::marker { color: var(--accent); }
@media (max-width: 900px) { .rules { grid-template-columns: 1fr; } }

/* ============================================================ chat */
.rooms-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.rooms-layout .chat-slot { position: sticky; top: calc(var(--header-h) + 16px); height: calc(100vh - var(--header-h) - 32px); max-height: 760px; margin-top: 36px; }
.side-stack .chat-slot { height: 480px; }
.chat { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.chat-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.chat-title b { font-family: var(--font-display); font-size: 16px; white-space: nowrap; }
.chat-online { font-size: 13px; font-weight: 700; color: var(--ok); white-space: nowrap; }
.chat-online:not(:empty)::before { content: "●"; margin-right: 5px; font-size: 10px; vertical-align: 1px; }
.chat-hide { display: none; }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.chat-empty { margin: auto; color: var(--muted); font-size: 14px; text-align: center; }
.msg { font-size: 14px; line-height: 1.45; }
.msg-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.msg-head b { font-weight: 800; }
.msg-head time { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.msg-tag { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.msg-host { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px; border-radius: 999px; color: #1a1300; background: var(--r-legendary); }
.msg-text { color: var(--text-2); overflow-wrap: anywhere; }
.msg.mine .msg-text { color: var(--text); }
.chat-status { min-height: 0; padding: 0 16px; font-size: 13px; color: var(--muted); }
.chat-status:not(:empty) { padding: 6px 16px; }
.chat-status.flash { color: #fbbf24; }
.chat-form { padding: 10px 12px 12px; border-top: 1px solid var(--border); }
.chat-row { display: flex; gap: 8px; }
.chat-row .input { padding: 10px 14px; border-radius: 999px; }
.chat-row .btn-icon { border-radius: 50%; flex: none; width: 42px; height: 42px; padding: 0; }
.chat-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.chat-nick { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 2px 0; color: var(--muted); font-size: 12px; min-width: 0; }
.chat-nick b { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.chat-nick .icon { width: 12px; height: 12px; }
.chat-nick:hover b { color: var(--text); }
.chat-counter { font-variant-numeric: tabular-nums; }
.chat-fab { display: none; }

@media (max-width: 980px) {
  .rooms-layout { grid-template-columns: minmax(0, 1fr); }
  .rooms-layout .chat-slot, .side-stack .chat-slot, .chat-slot {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 80; margin: 0;
    height: min(78vh, 640px); max-height: none;
    transform: translateY(105%); transition: transform .25s ease; pointer-events: none;
  }
  .chat-slot.open { transform: none; pointer-events: auto; }
  .chat-slot .chat { border-radius: 20px 20px 0 0; border-bottom: 0; box-shadow: 0 -20px 50px rgba(0, 0, 0, .5); }
  .chat-hide { display: inline-flex; }
  .chat-fab {
    display: inline-flex; position: fixed; right: 16px; bottom: 16px; z-index: 75;
    box-shadow: 0 10px 30px rgba(255, 61, 129, .4);
  }
  .chat-fab.hidden { display: none; }
  body:has(.chat-fab) .site-footer { padding-bottom: 88px; }
  .chat-badge {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--accent);
    font-size: 12px; line-height: 20px; font-weight: 800;
  }
}

/* ============================================================ room list (chatpic-style) */
.page-head { padding: 36px 0 20px; }
.page-head p { color: var(--muted); margin-top: 8px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 42px; border-radius: 999px; }
.toolbar .total { margin-left: auto; color: var(--muted); font-size: 14px; }

.room-list { display: flex; flex-direction: column; gap: 10px; }
.room-row {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center;
  padding: 12px 16px 12px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s, background .15s, transform .15s;
}
.room-row:hover { border-color: var(--border-2); background: var(--surface-2); }
.room-cover {
  width: 72px; height: 72px; border-radius: 12px; overflow: hidden; position: relative; flex: none;
  background: linear-gradient(135deg, #3b2140, #1d1f3f);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: rgba(255, 255, 255, .8);
}
.room-cover img { width: 100%; height: 100%; object-fit: cover; }
.room-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
/* метки («Колесо дня» и т. п.) не помещаются рядом с именем — переносятся под него, а не сжимают имя и не раздвигают страницу */
.room-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.room-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; max-width: 100%; }
.room-title b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-title span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.room-title .room-author { flex: none; max-width: 50%; overflow: hidden; text-overflow: ellipsis; }
.room-desc { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-main .rarity-bar { max-width: 360px; }
.room-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.room-stats { display: flex; gap: 14px; color: var(--text-2); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.room-stats span { display: inline-flex; align-items: center; gap: 5px; }
.room-stats .icon { width: 15px; height: 15px; color: var(--muted); }
@media (max-width: 640px) {
  .room-row { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 10px 12px 10px 10px; }
  .room-cover { width: 56px; height: 56px; font-size: 18px; }
  /* счётчики и время не помещаются в строку — время переносится вниз, а не раздвигает страницу вбок */
  .room-side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; row-gap: 8px; }
  .room-side .room-pills { margin-left: auto; }
  .room-stats { gap: 10px; font-size: 13px; }
}
.room-skeleton { height: 98px; }
.load-more { display: flex; justify-content: center; margin-top: 18px; }

/* страницы списка комнат */
.pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.pager button {
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text-2); font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.pager button:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.pager button[aria-current="page"] { background: var(--accent-grad); border-color: transparent; color: #fff; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager .icon { width: 18px; height: 18px; }
.pager .icon.prev { transform: rotate(90deg); }
.pager .icon.next { transform: rotate(-90deg); }
.pager-gap { color: var(--muted); padding: 0 2px; }

/* ============================================================ create */
.create-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; padding-bottom: 40px; }
.create-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.create-side { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 980px) {
  .create-layout { grid-template-columns: 1fr; }
  .create-side { position: static; }
}
.panel { padding: 22px; }
.panel > h3 { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  padding: 36px 20px; border: 2px dashed var(--border-2); border-radius: var(--radius); background: rgba(255, 255, 255, .015);
  color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over, .dropzone:focus-within { border-color: var(--accent); background: rgba(255, 61, 129, .06); color: var(--text-2); }
.dropzone .big { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); }
.dropzone .big .icon { width: 26px; height: 26px; }
.dropzone b { color: var(--text); font-size: 17px; }

.optimize-toggle { margin-top: 14px; }
.optimize-toggle b, .check-block b { display: block; color: var(--text); font-weight: 700; }
.optimize-toggle .hint, .check-block .hint { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.check-block + .input { margin-top: 4px; }
.bulk { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0 12px; }
.bulk .label { margin-right: 4px; }
.bulk .spacer { flex: 1; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--rc, var(--border-2)) 45%, transparent); background: transparent; color: var(--text-2);
}
.chip-btn:hover { background: color-mix(in srgb, var(--rc, #fff) 12%, transparent); color: var(--text); }

.up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.up-card {
  position: relative; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border);
  overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.up-card:not(.r-common) { border-color: color-mix(in srgb, var(--rc) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 25%, transparent), 0 6px 22px color-mix(in srgb, var(--rc) 18%, transparent); }
.up-thumb { position: relative; aspect-ratio: 1; background: #0d0d14; display: grid; place-items: center; color: var(--muted); }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-thumb .spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.up-badge {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, .7); font-size: 12px; font-weight: 700; color: #fff;
}
.up-badge .icon { width: 13px; height: 13px; }
.up-tool {
  position: absolute; top: 6px; width: 30px; height: 30px; border-radius: 10px; border: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, .6); color: #fff; opacity: .85; transition: opacity .15s, background .15s;
}
.up-tool:hover { opacity: 1; background: rgba(0, 0, 0, .85); }
.up-tool .icon { width: 16px; height: 16px; }
.up-tool.remove { right: 6px; }
.up-tool.cover { left: 6px; }
.up-tool.cover[aria-pressed="true"] { background: #f5b301; color: #1a1300; opacity: 1; }
.up-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.up-rarity { display: flex; gap: 6px; }
.up-rarity button {
  flex: 1; height: 22px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--rc) 50%, transparent);
  background: color-mix(in srgb, var(--rc) 10%, transparent); padding: 0;
}
.up-rarity button[aria-pressed="true"] { background: var(--rc); border-color: var(--rc); box-shadow: 0 0 12px color-mix(in srgb, var(--rc) 55%, transparent); }
.up-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 12px; }
.up-meta .rname { font-weight: 800; color: var(--rc); }
.up-meta .chance { color: var(--text-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.up-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .5); }
.up-progress i { display: block; height: 100%; width: 0; background: var(--accent-grad); transition: width .2s; }
.up-card.done .up-progress i { background: var(--ok); }
.up-card.error { border-color: var(--danger); }
.up-card .err { font-size: 12px; color: var(--danger); font-weight: 700; }

.summary-wheel { max-width: 260px; margin: 0 auto 14px; }
.summary-rows { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.summary-rows .row { display: flex; align-items: center; gap: 10px; }
.summary-rows .row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.summary-rows .row small { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.summary-total { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.summary-total b { color: var(--text); }

.progress-overlay .modal { max-width: 440px; text-align: center; }
.progress-track { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 20px 0 10px; }
.progress-track i { display: block; height: 100%; width: 0; background: var(--accent-grad); transition: width .25s; }

/* ============================================================ room */
.room-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; padding: 28px 0 40px; }
@media (max-width: 980px) { .room-layout { grid-template-columns: 1fr; } }
.room-layout > * { min-width: 0; } /* широкая таблица или кнопка не раздвигает колонку шире экрана — у таблиц своя прокрутка */
.room-hero h1 { font-size: clamp(26px, 4vw, 40px); word-break: break-word; }
.room-hero .by { color: var(--muted); margin-top: 6px; }
.room-hero .desc { color: var(--text-2); margin-top: 12px; max-width: 640px; word-break: break-word; }
.room-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.room-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.wheel-block { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.spin-btn { min-width: 240px; font-size: 18px; padding: 17px 34px; font-family: var(--font-display); letter-spacing: .04em; }
.spins-left { color: var(--muted); font-size: 14px; font-weight: 700; }
.spin-row { display: flex; align-items: center; gap: 12px; max-width: 100%; }
/* на телефоне длинная надпись («Вращения закончились») переносится, а не раздвигает страницу */
@media (max-width: 480px) {
  .spin-btn { min-width: 0; flex: 1 1 auto; white-space: normal; text-align: center; padding: 15px 20px; font-size: 16px; }
}
.sound-btn { width: 52px; height: 52px; border-radius: 50%; flex: none; }
.sound-btn .icon { width: 22px; height: 22px; }
.sound-btn[aria-pressed="false"] { color: var(--muted); }
.spins-left b { color: var(--text); }
.side-stack { display: flex; flex-direction: column; gap: 16px; }
.side-stack .panel h3 { margin-bottom: 12px; }
.wins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.win {
  position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 2px solid var(--rc); background: #0d0d14;
  padding: 0; display: grid; place-items: center; color: var(--muted);
}
.win img { width: 100%; height: 100%; object-fit: cover; }
.win .saved { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #04130d; display: grid; place-items: center; }
.win .saved .icon { width: 13px; height: 13px; }
.new-banner {
  display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 16px 18px; margin-top: 24px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 61, 129, .14), rgba(255, 138, 61, .10)); border: 1px solid rgba(255, 61, 129, .35);
}
.cover-lock { display: grid; place-items: center; width: 100%; height: 100%; color: #fbbf24; background: linear-gradient(135deg, #2c2438, #1b1d33); }
.cover-lock .icon { width: 26px; height: 26px; }
.title-lock { display: inline-flex; align-self: center; color: #fbbf24; }
.title-lock .icon { width: 15px; height: 15px; }
.lock-screen { max-width: 440px; margin: 56px auto; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.lock-screen h2 { font-size: clamp(22px, 4vw, 30px); word-break: break-word; }
.lock-screen .by { color: var(--muted); margin: -6px 0 0; }
.lock-screen .desc { color: var(--text-2); word-break: break-word; }
.lock-badge { width: 64px; height: 64px; margin: 0 auto 4px; border-radius: 20px; display: grid; place-items: center; background: rgba(251, 191, 36, .12); color: #fbbf24; }
.lock-badge .icon { width: 30px; height: 30px; }
.optimized-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--ok); font-weight: 700; }
.optimized-note .icon { width: 15px; height: 15px; }
.optimized-note.locked-note { color: #fbbf24; }
.new-banner code { font-size: 14px; color: var(--text); word-break: break-all; }
.report-reasons { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.report-reasons label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-2); cursor: pointer; }
.report-reasons label:has(input:checked) { border-color: var(--accent); background: rgba(255, 61, 129, .07); }

/* ============================================================ admin */
.admin-login { max-width: 460px; margin: 48px auto; display: flex; flex-direction: column; gap: 14px; }
.admin-login h2 { font-size: 24px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.admin-head-actions { display: flex; gap: 8px; }
.admin-disk { margin-top: 6px; font-size: 13px; color: var(--muted); }
.admin-disk.low { color: var(--danger); font-weight: 600; }
.admin-tabs button { display: inline-flex; align-items: center; gap: 8px; }
.tab-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.ticket-list { display: flex; flex-direction: column; gap: 12px; }
.ticket { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
.ticket.with-media { grid-template-columns: 132px minmax(0, 1fr); }
.ticket.urgent { border-color: rgba(251, 113, 133, .6); box-shadow: 0 0 0 1px rgba(251, 113, 133, .25); }
.ticket-media {
  position: relative; width: 132px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 2px solid var(--rc, var(--border-2));
  background: #0d0d14; padding: 0; display: grid; place-items: center; color: var(--muted);
}
.ticket-media img { width: 100%; height: 100%; object-fit: cover; }
.ticket-media.gone { border-style: dashed; font-size: 12px; padding: 10px; text-align: center; }
.ticket-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ticket-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ticket-top time { margin-left: auto; font-size: 13px; color: var(--muted); }
.reason-tag { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(251, 191, 36, .1); color: #fbbf24; border: 1px solid rgba(251, 191, 36, .35); }
.reason-tag.urgent { background: rgba(251, 113, 133, .12); color: var(--danger); border-color: rgba(251, 113, 133, .45); }
.ticket-target { font-size: 14px; color: var(--text-2); }
.ticket-target a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.ticket-msg { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.ticket-meta b { color: var(--text-2); overflow-wrap: anywhere; }
.ticket-meta code { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.ticket-meta .same { color: #fbbf24; font-weight: 700; }
.ticket-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.resolution { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ok); }
.resolution .icon { width: 15px; height: 15px; }
@media (max-width: 560px) {
  .ticket.with-media { grid-template-columns: 1fr; }
  .ticket-media { width: 100%; max-width: 220px; }
}
.mod-options { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text-2); }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.mod-options .check-row { margin-top: 0; }
.select-sm { width: auto; padding: 8px 12px; font-size: 14px; }
.select-sm:disabled { opacity: .5; }
.hint-local { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .3); color: #fbbf24; font-size: 13px; }
.banned-tag { margin-left: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; background: rgba(251, 113, 133, .12); color: var(--danger); }
.tab-count.muted-count { background: var(--surface-3); color: var(--text-2); }
.list-title { margin: 12px 0 0; font-size: 16px; }
.list-hint { margin: -4px 0 4px; font-size: 13px; }
.ban-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; flex-wrap: wrap; }
.ban-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; flex-wrap: wrap; }
.ban-ip { font-variant-numeric: tabular-nums; }
.ban-when { font-size: 13px; }
.review-modal { max-width: 860px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; max-height: 60vh; overflow-y: auto; padding: 2px; }
.review-item { position: relative; border-radius: 12px; overflow: hidden; border: 2px solid var(--rc); background: #0d0d14; }
.review-thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: none; color: var(--muted); }
.review-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================ collection */
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.col-card { overflow: hidden; border-color: color-mix(in srgb, var(--rc) 45%, var(--border)); display: flex; flex-direction: column; }
.col-thumb { position: relative; aspect-ratio: 1; background: #0d0d14; border: 0; padding: 0; display: grid; place-items: center; color: var(--muted); width: 100%; }
.col-thumb img { width: 100%; height: 100%; object-fit: cover; }
.col-thumb .rarity-tag { position: absolute; left: 8px; top: 8px; background: rgba(0, 0, 0, .7); }
.col-body { padding: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.col-body b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-actions { display: flex; gap: 6px; padding: 0 12px 12px; margin-top: auto; }
.col-actions .btn { flex: 1; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 14px; margin-bottom: 18px; }
.notice .icon { color: var(--accent); margin-top: 2px; }

/* ---------- правила и правовая информация ---------- */
.legal-page { max-width: 880px; }
.legal-note { margin-bottom: 16px; }
.legal-toc { padding: 18px 22px; margin-bottom: 16px; }
.legal-toc h2 { font-size: 18px; margin-bottom: 10px; }
.legal-toc ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.legal-doc { padding: 24px; margin-bottom: 16px; scroll-margin-top: 84px; }
.legal-doc > h2 { font-size: 22px; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.legal-anchor { color: var(--muted); font-size: 16px; text-decoration: none; opacity: 0; transition: opacity .15s; }
.legal-doc:hover .legal-anchor, .legal-anchor:focus { opacity: 1; }
.legal-body { color: var(--text-2); line-height: 1.65; font-size: 15px; }
.legal-body h3 { color: var(--text); font-size: 16px; margin: 20px 0 8px; }
.legal-body p { margin: 0 0 10px; }
.legal-body ul, .legal-body ol { margin: 0 0 10px; padding-left: 22px; display: grid; gap: 6px; }
.legal-body a, .legal-toc a, .rules-more a, .age-legal a { color: var(--accent); }
.rules-more { margin-top: 16px; text-align: center; }
.age-legal { margin-top: -4px; font-size: 14px; }

/* ---------- технические работы ---------- */
.maintenance { max-width: 460px; margin: 12vh auto 48px; padding: 32px 24px; text-align: center; }
.maintenance-logo { display: block; margin: 0 auto 12px; }
.maintenance h1 { font-size: 26px; margin-bottom: 8px; }
.maintenance-form { margin-top: 24px; }
.maintenance-row { display: flex; gap: 8px; }
.maintenance-row .input { flex: 1; min-width: 0; }
.mt-hint { margin-bottom: 10px; font-size: 14px; color: var(--text-2); }
.mt-error { margin-top: 10px; font-size: 14px; color: var(--danger); }
.mt-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
  padding: 12px 16px; border: 1px solid rgba(245, 179, 1, .45); border-radius: 14px; background: rgba(245, 179, 1, .1); }
.mt-bar-text { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.mt-bar-text .icon { flex: none; color: #f5b301; }
.mt-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.odds-note { margin-top: 10px; font-size: 13px; line-height: 1.45; }

/* ------------------------------------------------------------ режимы колеса и бонусные ячейки */
.room-title .room-tag {
  flex: none; align-self: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); background: var(--surface-3); border: 1px solid var(--border-2);
}
.room-title .room-tag.shared { color: #fda4c4; border-color: rgba(255, 61, 129, .4); background: rgba(255, 61, 129, .1); }
.room-title .room-tag.bonus { color: #6ee7b7; border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .1); }
.room-title .room-tag.day { display: inline-flex; align-items: center; gap: 4px; color: #ffd666; border-color: rgba(245, 179, 1, .45); background: rgba(245, 179, 1, .12); }
.room-title .room-tag.day .icon { width: 12px; height: 12px; }
.pill.accent { color: #fda4c4; border-color: rgba(255, 61, 129, .35); background: rgba(255, 61, 129, .08); }
.pill.bonus { color: #6ee7b7; border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.speed-btn { font-family: var(--font-display); font-size: 15px; font-weight: 800; }
.odds-table th, .odds-table td { padding-left: 10px; padding-right: 10px; }
.odds-table td.won { color: var(--text); font-weight: 800; }
.odds-table .bonus-row .name { color: var(--text-2); }
.bonus-mark {
  width: 22px; height: 16px; border-radius: 5px; display: inline-grid; place-items: center; flex: none;
  font-size: 10px; font-weight: 800; background: #0b0b12; border: 1px solid #3f3f55; color: var(--muted);
}
.b-double .bonus-mark { background: #047857; border-color: #6ee7b7; color: #ecfdf5; }
.btn .icon.next { transform: rotate(-90deg); }
.double-modal { max-width: 420px; text-align: center; }
.double-modal h2 { margin: 6px 0 14px; }
.mini-wheel { max-width: 260px; }
.double-result { min-height: 26px; margin-top: 14px; font-weight: 800; font-size: 18px; }
.double-result.ok { color: var(--ok); }
.double-result.bad { color: var(--muted); }
.nothing-modal { max-width: 400px; text-align: center; }
.nothing-mark {
  width: 72px; height: 72px; margin: 4px auto 14px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--muted);
  background: #0b0b12; border: 2px solid #3f3f55;
}

/* ------------------------------------------------------------ панель хоста */
.btn-host { color: var(--accent); border-color: rgba(255, 61, 129, .4); }
.btn-host:hover { background: rgba(255, 61, 129, .1); border-color: rgba(255, 61, 129, .6); }
a.btn.disabled { opacity: .45; pointer-events: none; }
.host-modal { max-width: 720px; }
.host-modal > h2 { display: flex; align-items: center; gap: 10px; }
.host-modal > h2 .icon { width: 24px; height: 24px; color: var(--accent); }
.host-section { padding: 16px 0; border-top: 1px solid var(--border); }
.host-section:first-of-type { border-top: 0; }
.host-section h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 6px; }
.host-section h3 .icon { width: 18px; height: 18px; color: var(--muted); }
.host-section > p { font-size: 14px; margin-bottom: 10px; }
.host-section .segmented { margin-top: 4px; }
.host-link { display: flex; gap: 8px; align-items: center; }
.host-link .input { flex: 1; min-width: 0; font-size: 14px; }
.host-section > .btn-danger { margin-top: 8px; }
.host-stats { max-height: 380px; overflow-y: auto; margin: 0 -8px; }
.host-stats .table th, .host-stats .table td { padding: 8px 10px; }
.host-stats thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.host-thumb {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; overflow: hidden;
  border: 2px solid var(--rc); background: #0d0d14; color: var(--muted);
}
.host-thumb img { width: 100%; height: 100%; object-fit: cover; }
.host-thumb .icon { width: 18px; height: 18px; }
.host-note .host-copy { color: var(--accent); font-weight: 800; }
.prize-downloads { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; }
.prize-downloads .icon { width: 14px; height: 14px; }
@media (max-width: 560px) {
  .host-link { flex-direction: column; align-items: stretch; }
  .prize-downloads { margin-left: 0; margin-top: 4px; display: flex; justify-content: center; }
}

/* ------------------------------------------------------------ обмен призов */
.wins-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.side-stack .panel .wins-head h3 { margin-bottom: 0; }
.btn-trade { color: var(--r-epic); border-color: rgba(168, 85, 247, .45); }
.btn-trade:hover { background: rgba(168, 85, 247, .12); border-color: rgba(168, 85, 247, .7); }
.trade-modal { max-width: 560px; }
.trade-tabs { margin: 14px 0 8px; }
.trade-tabs button small { color: inherit; opacity: .7; font-weight: 600; }
.trade-status { font-size: 14px; margin-bottom: 10px; }
.trade-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); max-height: 46vh; overflow-y: auto; padding: 2px; }
.trade-grid .win { opacity: .55; transition: opacity .15s, transform .15s; }
.trade-grid .win.picked { opacity: 1; transform: scale(.96); box-shadow: 0 0 0 3px var(--rc); }

/* ------------------------------------------------------------ администратор: закреплённые комнаты, метка в чате */
.room-row.pinned { border-color: rgba(255, 61, 129, .45); background: linear-gradient(90deg, rgba(255, 61, 129, .08), transparent 60%), var(--surface); }
.room-title .title-pin { flex: none; align-self: center; color: var(--accent); display: inline-flex; }
.room-title .title-pin .icon { width: 15px; height: 15px; }
.pill.pinned { color: #fda4c4; border-color: rgba(255, 61, 129, .45); background: rgba(255, 61, 129, .1); }
.host-section.admin-section { background: rgba(255, 61, 129, .07); border: 1px solid rgba(255, 61, 129, .3); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.msg-admin {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--accent-grad);
}
.msg-admin .icon { width: 12px; height: 12px; }
.msg b.admin-name { color: var(--accent); }
.msg.from-admin { background: rgba(255, 61, 129, .08); border-radius: 10px; padding: 6px 8px; margin: 0 -8px; }
.msg-del {
  margin-left: 2px; border: 0; background: none; padding: 2px; color: var(--muted); opacity: .6; display: inline-flex;
}
.msg-del:hover { color: var(--danger); opacity: 1; }
.msg-del .icon { width: 14px; height: 14px; }
.msg-pin:hover { color: var(--accent); }
.msg-text a, .chat-pin-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* закреплённое админом сообщение — полоса над сообщениями чата */
.chat-pin {
  padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 14px;
  background: linear-gradient(90deg, rgba(255, 61, 129, .14), rgba(255, 138, 61, .08));
}
.chat-pin-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; font-size: 13px; }
.chat-pin-label { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--accent); }
.chat-pin-label .icon { width: 13px; height: 13px; }
.chat-unpin { margin-left: auto; }
.chat-pin-text {
  color: var(--text); overflow-wrap: anywhere; white-space: pre-line; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.chat-pin.open .chat-pin-text { display: block; max-height: 40vh; overflow-y: auto; }
.chat-nick .msg-admin { font-size: 10px; }
.admin-search { max-width: 280px; margin-left: auto; }
.admin-room { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; }
.admin-room.pinned { border-color: rgba(255, 61, 129, .45); }
.admin-room .room-cover { width: 64px; height: 64px; }
.admin-room-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.admin-room-stats { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.admin-room-stats > span { display: inline-flex; align-items: center; gap: 4px; }
.admin-room-stats .icon { width: 14px; height: 14px; }
.admin-room-stats .room-size.heavy { color: #fbbf24; font-weight: 700; }
.admin-sort { width: auto; }
.admin-room-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .admin-room { grid-template-columns: 52px 1fr; }
  .admin-room .room-cover { width: 52px; height: 52px; }
  .admin-room-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .admin-search { max-width: none; margin-left: 0; width: 100%; }
}

/* ============================================================ реклама */
.ad-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 100%; }
.ad-slot::before { content: attr(data-label); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ad-frame { max-width: 100%; overflow: hidden; border-radius: 8px; background: rgba(255, 255, 255, .02); }
/* color-scheme как у страницы места: иначе при тёмной теме сайта Chrome подкладывает под окно белый фон */
.ad-frame iframe { display: block; border: 0; color-scheme: normal; }
.ad-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 8px; text-align: center;
  border: 1px dashed var(--border-2); border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 700;
}
.wheel-block .ad-slot { margin-top: 4px; }
.ad-rooms_top { margin-bottom: 16px; }
.ad-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; justify-content: center;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); background: rgba(9, 9, 15, .94); border-top: 1px solid var(--border);
}
.ad-bar .ad-slot::before { display: none; }
.ad-bar-close {
  position: absolute; right: 8px; top: -27px; width: 34px; height: 27px; padding: 0; border: 1px solid var(--border); border-bottom: 0;
  border-radius: 10px 10px 0 0; background: rgba(9, 9, 15, .94); color: var(--text-2); font-size: 20px; line-height: 1;
}
/* места создаются под ширину экрана при загрузке; если окно потом изменили — прячем лишние */
@media (max-width: 760px) {
  body.has-ad-bar { padding-bottom: 118px; }
  body.has-ad-bar .chat-fab { bottom: 140px; }
  body.has-ad-bar .toasts { bottom: 136px; }
}
@media (min-width: 761px) { .ad-bar { display: none; } }
@media (max-width: 980px) { .ad-room_side { display: none; } }
@media (max-width: 759px), (min-width: 981px) and (max-width: 1143px) { .ad-rooms_top { display: none; } }
.ads-form { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.ads-form .label .pill { margin-left: 4px; font-size: 11px; padding: 2px 8px; }
.ad-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; min-height: 64px; }
/* ============================================================ промокоды */
.promo-btn { background: rgba(255, 61, 129, .12); border-color: rgba(255, 61, 129, .5); color: #ffb3cc; font-weight: 800; }
.promo-btn:hover { background: rgba(255, 61, 129, .22); border-color: var(--accent); color: #fff; }
.promo-btn .icon { width: 19px; height: 19px; color: var(--accent); }
.promo-btn.promo-hot { background: var(--accent-grad); border-color: transparent; color: #fff; animation: promo-pulse 2s ease-in-out infinite; }
.promo-btn.promo-hot .icon { color: #fff; }
@keyframes promo-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 61, 129, .5); } 60% { box-shadow: 0 0 0 12px rgba(255, 61, 129, 0); } }
@media (prefers-reduced-motion: reduce) { .promo-btn.promo-hot { animation: none; } }
.promo-modal { max-width: 400px; text-align: center; }
.promo-form { display: flex; flex-direction: column; gap: 12px; }
.promo-form .modal-actions { justify-content: center; }
.promo-badge { width: 60px; height: 60px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 61, 129, .12); color: var(--accent); }
.promo-badge .icon { width: 28px; height: 28px; }
.promo-input, .promo-code-input { text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.promo-input { text-align: center; font-size: 18px; }
.promo-input::placeholder, .promo-code-input::placeholder { text-transform: none; letter-spacing: normal; font-weight: 500; }
.promo-admin { display: flex; flex-direction: column; gap: 14px; }
.promo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 760px) { .promo-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .promo-grid { grid-template-columns: 1fr; } }
.promo-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; flex-wrap: wrap; }
.promo-row.promo-dim { opacity: .6; }
.promo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.promo-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.promo-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 16px; letter-spacing: .06em; }
.promo-status.active { color: var(--ok); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.promo-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.promo-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.promo-meta .icon { width: 14px; height: 14px; }
.promo-meta a { color: var(--text-2); text-decoration: underline; }
.promo-note { font-size: 13px; }
.promo-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ------------------------------------------------------------ аккаунт, магазин, оплата */
.header-acc { width: 40px; height: 40px; border-radius: 50%; }
.header-acc.active { border-color: var(--accent); color: var(--accent); }
@media (max-width: 760px) { .header-acc { width: 36px; height: 36px; } }
.msg-nick { display: inline-flex; align-items: center; gap: 4px; }
.msg-nick .icon { width: 12px; height: 12px; opacity: .8; }

.auth-panel { max-width: 460px; margin: 0 auto 28px; display: flex; flex-direction: column; gap: 14px; }
.auth-panel > h3 { margin-bottom: 0; }
.auth-intro { margin: 0; }
.auth-tabs button { flex: 1; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form .modal-actions { margin-top: 6px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-tg { background: #2aabee; border-color: transparent; color: #fff; }
.btn-tg:hover { background: #229ed9; border-color: transparent; }
.tg-box { display: flex; flex-direction: column; gap: 10px; }
.tg-status { margin: 0; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; min-width: 0; }
.input.mono, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.input-sm { padding: 7px 10px; font-size: 13px; width: 130px; }

.shop-balance { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 22px; }
.shop-balance .btn { margin-left: auto; }
.shop-balance .btn + .btn { margin-left: 0; }
.bal-item { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.bal-item .icon { width: 18px; height: 18px; color: var(--accent); }
.bal-item b { color: var(--text); font-size: 18px; }
.bal-item.legend .icon { color: var(--r-legendary); }
.shop-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; padding-bottom: 40px; }
@media (max-width: 980px) { .shop-layout { grid-template-columns: 1fr; } }
.shop-section { margin-bottom: 26px; }
.shop-section h3 { margin-bottom: 4px; }
.shop-section > p { margin: 0 0 14px; font-size: 14px; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pack {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px 14px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s;
}
.pack.in-cart { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 61, 129, .15); }
.pack-count { display: flex; flex-direction: column; line-height: 1.1; }
.pack-count b { font-family: var(--font-display); font-size: 34px; }
.pack-count span { font-size: 13px; color: var(--muted); font-weight: 700; }
.pack-legend .pack-count b { color: var(--r-legendary); }
.pack-legend.in-cart { border-color: var(--r-legendary); box-shadow: 0 0 0 3px rgba(245, 179, 1, .15); }
.pack-epic .pack-count b { color: var(--r-epic); }
.pack-epic.in-cart { border-color: var(--r-epic); box-shadow: 0 0 0 3px rgba(168, 85, 247, .15); }
.pack-bundle .pack-count b { font-size: 20px; line-height: 1.25; }
.pack-bundle .pack-count b .gold { color: var(--r-legendary); }
.pack-save { font-size: 12px; font-weight: 800; color: var(--ok); }
.bal-item.epic .icon { color: var(--r-epic); }
.pack-price { font-size: 20px; font-weight: 800; }
.pack-per { font-size: 12px; margin-bottom: 6px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper .btn-icon { width: 32px; height: 32px; padding: 0; font-size: 18px; }
.shop-pin-hint { display: flex; gap: 8px; align-items: flex-start; }
.shop-pin-hint .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.cart { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 12px; }
.cart > h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 0; }
.cart-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.cart-lines li { display: flex; justify-content: space-between; gap: 10px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--border); }
.cart-total b { font-size: 24px; font-family: var(--font-display); }
.cart .hint { margin: 0; }
.pay-methods { display: grid; gap: 8px; }
.pay-method {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2); font-size: 14px; text-align: left;
}
.pay-method b { color: var(--text); }
.pay-method[aria-checked="true"] { border-color: var(--accent); background: rgba(255, 61, 129, .1); }

.pay-modal { max-width: 560px; }
.pay-modal h2 { padding-right: 40px; word-break: break-word; }
.pay-sum { color: var(--text-2); margin: 0 0 16px; }
.pay-sum b { color: var(--text); font-size: 18px; }
.pay-how { display: flex; flex-direction: column; gap: 14px; }
.pay-grid { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: start; }
@media (max-width: 560px) { .pay-grid { grid-template-columns: 1fr; } .pay-qr { justify-self: center; } }
.pay-qr { width: 180px; height: 180px; border-radius: 12px; background: #fff; }
.pay-rows { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pay-row { display: flex; flex-direction: column; gap: 4px; }
.pay-value { display: flex; align-items: center; gap: 6px; }
.pay-value code {
  flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; word-break: break-all; user-select: all;
}
.pay-row-big code { font-size: 18px; font-weight: 800; color: var(--text); }
.pay-notes { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.pay-status { margin-top: 14px; }
.pay-wait { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.pay-wait .pay-timer { margin-left: auto; font-variant-numeric: tabular-nums; }
.pay-wait .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
.pay-late { margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .3); color: #fbbf24; font-size: 14px; }
.pay-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pay-foot .hint { flex: 1; min-width: 200px; }
.pay-done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0; }
.pay-done-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(52, 211, 153, .12); color: var(--ok); }
.pay-done-icon .icon { width: 32px; height: 32px; }

.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; padding-bottom: 40px; }
@media (max-width: 860px) { .acc-grid { grid-template-columns: 1fr; } }
.acc-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.acc-col .panel > h3 { display: flex; align-items: center; gap: 8px; }
.acc-balance .bal-row { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 8px; }
.acc-balance > .btn { margin-top: 12px; }
/* ============================================================ статистика (админка) */
.st-view { display: flex; flex-direction: column; gap: 26px; padding-bottom: 30px; }
.st-auto { margin: 0; font-size: 13px; }
.st-section > h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.st-section > .hint { margin: -6px 0 12px; font-size: 13px; color: var(--muted); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.st-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.st-tile.warn { border-color: rgba(251, 191, 36, .45); }
.st-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.st-value { font-size: 26px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.15; }
.st-hero .st-value { font-size: 48px; }
.st-hero { grid-row: span 2; justify-content: center; }
.st-hint { font-size: 12px; color: var(--muted); }
.st-meter { margin: 6px 0 0; height: 6px; }
.st-rooms, .st-methods { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; font-size: 14px; }
.st-room { display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); max-width: 100%; }
.st-room span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.st-room b, .st-method b { color: var(--text); font-variant-numeric: tabular-nums; }
.st-method { display: inline-flex; gap: 6px; color: var(--text-2); }
.st-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.st-chart { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.st-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.st-chart-head h4 { margin: 0; font-size: 15px; }
.st-chart-head .muted { font-size: 12px; }
.st-bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; border-bottom: 1px solid var(--border); }
.st-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline: none; }
.st-col i { display: block; width: 100%; max-width: 24px; background: var(--accent); border-radius: 4px 4px 0 0; }
.st-col.partial i { opacity: .45; }
.st-col:hover i, .st-col:focus-visible i { filter: brightness(1.25); }
.st-axis { position: relative; height: 14px; font-size: 11px; color: var(--muted); }
.st-axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.st-axis span.start { left: 0; transform: none; }
.st-axis span.end { right: 0; transform: none; }
.st-tip { position: absolute; z-index: 60; display: none; pointer-events: none; padding: 6px 10px; border-radius: 8px;
  background: var(--surface-3); border: 1px solid var(--border-2); color: var(--text); font-size: 13px; font-weight: 600;
  white-space: nowrap; box-shadow: var(--shadow); }
.st-table { margin-top: 14px; }
.st-table summary { cursor: pointer; color: var(--text-2); font-weight: 700; }
.st-table .table-scroll { overflow-x: auto; margin-top: 10px; }
.st-day-table th, .st-day-table td { padding: 8px 10px; }
@media (max-width: 560px) {
  .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .st-tile { padding: 12px; }
  .st-value { font-size: 22px; }
  .st-hero { grid-row: auto; grid-column: 1 / -1; }
  .st-hero .st-value { font-size: 40px; }
  .st-charts { grid-template-columns: 1fr; }
}

.ref-admin { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.ref-admin > h3, .ref-admin > p { margin: 0; }
.ref-admin-row { display: flex; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.pin-plans.ext-plans { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) { .pin-plans.ext-plans { grid-template-columns: repeat(2, 1fr); } }
.invite-card { display: flex; flex-direction: column; gap: 12px; }
.invite-card > h3, .invite-card > p { margin: 0; }
.invite-card .ref-link { font-size: 13px; }
.invite-card .ref-share { align-self: flex-start; }
.ref-progress-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.ref-progress .progress-track { margin: 8px 0 0; }
.ref-reward { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); }
.ref-reward-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-promo { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.promo-kind.legend .icon { color: var(--r-legendary); }
.auth-modal .auth-panel { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.acc-ok { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 700; margin: 0; }
.acc-danger .modal-actions { margin-top: 12px; }
.orders { display: flex; flex-direction: column; gap: 10px; }
.order-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.order-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.order-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-what { font-size: 14px; }
.order-status.paid { color: var(--ok); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.order-status.pending { color: #fbbf24; border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); }
.order-status.review { color: #fda4c4; border-color: rgba(255, 61, 129, .35); background: rgba(255, 61, 129, .08); }

.pin-section .pin-body { display: flex; flex-direction: column; gap: 10px; }
.pin-status { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-2); }
.pin-status .icon { width: 16px; height: 16px; }
.pin-status.on { color: var(--ok); font-weight: 700; }
.pin-full { margin: 0; color: #fbbf24; font-size: 14px; }
.pin-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .pin-plans { grid-template-columns: 1fr; } }
.pin-plan {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; border-radius: 12px; text-align: left;
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text);
}
.pin-plan:hover:not(:disabled) { border-color: var(--accent); }
.pin-plan:disabled { opacity: .45; cursor: not-allowed; }
.pin-plan span { font-size: 13px; }
.pin-plan .pin-price { font-size: 18px; font-weight: 800; color: var(--text); margin-top: 4px; }

.shop-stats { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-bottom: 16px; }
.shop-stat { display: flex; flex-direction: column; gap: 2px; }
.shop-stat b { font-size: 18px; }
.cart .hint, .pay-foot .hint, .auth-panel .hint, .acc-col .hint, .pin-section .hint, .shop-pin-hint, .tg-status {
  font-size: 13px; color: var(--muted);
}
.cart .hint a, .auth-panel .check a { color: var(--text-2); text-decoration: underline; }
.legend-btn { background: rgba(245, 179, 1, .12); border-color: rgba(245, 179, 1, .55); color: #ffd666; font-weight: 800; }
.legend-btn:hover { background: rgba(245, 179, 1, .22); border-color: var(--r-legendary); color: #fff; }
.legend-btn .icon { color: var(--r-legendary); }
.epic-btn { background: rgba(168, 85, 247, .12); border-color: rgba(168, 85, 247, .55); color: #d8b4fe; font-weight: 800; }
.epic-btn:hover { background: rgba(168, 85, 247, .22); border-color: var(--r-epic); color: #fff; }
.epic-btn .icon { color: var(--r-epic); }
.buy-btn .icon { width: 15px; height: 15px; }
.msg-event {
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; text-align: center;
  padding: 6px 10px; border-radius: 10px; background: rgba(245, 179, 1, .08); color: #ffd666; font-size: 13px; font-weight: 700;
}
.msg-event .icon { width: 14px; height: 14px; color: var(--r-legendary); }
.msg-event time { font-size: 11px; color: var(--muted); font-weight: 500; }

/* ------------------------------------------------------------ список комнат: остаток вращений, «Мои», поднять наверх */
.room-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.spins-pill.ok { color: #6ee7b7; border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.spins-pill.out { color: #fda4af; border-color: rgba(251, 113, 133, .35); background: rgba(251, 113, 133, .08); }
.room-row.spent { opacity: .6; }
.room-row.spent:hover { opacity: 1; }
.my-room { display: flex; flex-direction: column; gap: 6px; }
.my-room-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 4px; }
.bump-btn:disabled { opacity: .6; }
.room-actions .bump-btn:not(:disabled) { color: #6ee7b7; border-color: rgba(52, 211, 153, .4); }

/* плашка со статистикой (главная, список комнат, предпросмотр в админке) */
.pulse {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 0 0 16px; padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px;
}
.hero .pulse { margin: 18px 0 0; max-width: 640px; gap: 8px 14px; }
.pulse-item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }
.pulse-item b { color: var(--text); font-variant-numeric: tabular-nums; }
.pulse-icon { display: inline-flex; color: var(--muted); }
.pulse-icon .icon { width: 15px; height: 15px; }
.live-dot { width: 8px; height: 8px; margin: 0 3px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
@media (max-width: 640px) { .pulse { gap: 6px 14px; padding: 9px 12px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* шапка: точка «есть свежая новость», личные сообщения */
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(255, 61, 129, .7); }
.header-dm { position: relative; }
.header-dm.active { background: var(--surface-3); }
.dm-count {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; line-height: 19px; text-align: center;
}
@media (max-width: 760px) { .header-dm { padding: 7px; } }

/* ------------------------------------------------------------ новости */
.news-page { max-width: 760px; }
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-post { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.news-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.news-head time { font-weight: 800; color: var(--accent); }
.news-actions { margin-left: auto; display: flex; gap: 6px; }
.news-text { white-space: pre-line; overflow-wrap: anywhere; color: var(--text-2); font-size: 16px; }
.news-text a { color: #fda4c4; text-decoration: underline; text-underline-offset: 2px; }
.news-images { display: grid; gap: 8px; }
.news-images.n2, .news-images.n3 { grid-template-columns: 1fr 1fr; }
.news-image { padding: 0; border: 0; background: var(--surface-2); border-radius: 12px; overflow: hidden; cursor: zoom-in; }
.news-image img { width: 100%; height: auto; }
.news-images.n1 .news-image img { max-height: min(70vh, 640px); object-fit: contain; }
.news-images.n2 .news-image img, .news-images.n3 .news-image img { aspect-ratio: 1; object-fit: cover; }
.news-zoom-modal { max-width: min(1100px, 96vw); padding: 12px; }
.news-zoom img { max-height: 86vh; margin: 0 auto; border-radius: 10px; }
.news-editor { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.news-editor h3, .st-pulse h3 { display: flex; align-items: center; gap: 8px; }
.news-editor-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.news-editor-row > :last-child { margin-left: auto; }
.news-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.news-thumbs:empty { display: none; }
.news-thumb { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-thumb .btn { position: absolute; top: 4px; right: 4px; padding: 4px; background: rgba(9, 9, 15, .75); }
.news-list-title { margin: 6px 0 12px; }
.news-editor .modal-actions { margin-top: 0; justify-content: flex-end; }
.news-editor .modal-actions .btn { flex: 0 0 auto; }

/* ------------------------------------------------------------ личные сообщения */
.dm-layout { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; margin-bottom: 32px; }
.dm-side { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.dm-new { display: flex; gap: 6px; }
.dm-new .input { min-width: 0; padding: 8px 12px; font-size: 14px; }
.dm-threads { list-style: none; margin: 0 -6px; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 52vh; overflow-y: auto; }
.dm-none { padding: 8px 6px; font-size: 14px; }
.dm-thread {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 12px;
  background: transparent; text-align: left; color: var(--text-2);
}
.dm-thread:hover { background: var(--surface-2); }
.dm-thread.active { background: var(--surface-3); color: var(--text); }
.dm-thread.unread b { color: var(--text); }
.dm-avatar {
  width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #3b2140, #1d1f3f); font-weight: 800; color: #fff;
}
.dm-thread-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.dm-thread-top { display: flex; justify-content: space-between; gap: 8px; }
.dm-thread-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-thread-top time { font-size: 12px; color: var(--muted); flex: none; }
.dm-snippet { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; }
.dm-open { font-size: 13px; }
.dm-keep { font-size: 12px; }
.acc-dm .btn { margin-top: 12px; }
.dm-blocked summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.dm-blocked ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.dm-blocked li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.dm-warn { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--danger); }
.dm-main { display: flex; flex-direction: column; min-height: 440px; height: min(72vh, 680px); overflow: hidden; }
.dm-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); padding: 24px; text-align: center; }
.dm-empty-icon .icon { width: 36px; height: 36px; }
.dm-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.dm-head .dm-avatar { width: 32px; height: 32px; }
.dm-nick { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-back { display: none; }
.dm-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.dm-first { margin: auto; text-align: center; font-size: 14px; }
.dm-msg { max-width: 78%; align-self: flex-start; padding: 8px 12px; border-radius: 16px 16px 16px 6px; background: var(--surface-2); border: 1px solid var(--border); }
.dm-msg.mine { align-self: flex-end; border-radius: 16px 16px 6px 16px; background: rgba(255, 61, 129, .12); border-color: rgba(255, 61, 129, .3); }
.dm-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.dm-meta { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 2px; font-size: 11px; color: var(--muted); }
.dm-tick .icon { width: 13px; height: 13px; opacity: .5; }
.dm-msg.read .dm-tick .icon { opacity: 1; color: var(--ok); }
.dm-report { display: inline-flex; padding: 2px; border: 0; background: transparent; color: var(--muted); opacity: .6; }
.dm-report:hover { opacity: 1; color: var(--danger); }
.dm-report .icon { width: 13px; height: 13px; }
.dm-status { padding: 12px 14px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.dm-form { padding: 10px 14px 12px; border-top: 1px solid var(--border); }
.dm-row { display: flex; gap: 8px; align-items: flex-end; }
.dm-input { min-height: 44px; max-height: 160px; resize: vertical; }
.dm-quote { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--border-2); background: var(--surface-2); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); max-height: 160px; overflow-y: auto; }
@media (max-width: 760px) {
  .dm-layout { grid-template-columns: 1fr; }
  .dm-layout.with-thread .dm-side, .dm-layout:not(.with-thread) .dm-main { display: none; }
  .dm-page-thread .page-head { display: none; } /* переписка на весь экран: поле ввода сразу видно */
  .dm-page-thread .dm-layout { margin-top: 12px; }
  .dm-back { display: inline-flex; }
  .dm-main { height: calc(100dvh - 160px); min-height: 360px; }
  .dm-msg { max-width: 88%; }
}

/* чат: ник игрока с аккаунтом — ссылка «написать в личку» */
.msg-dm { display: inline-flex; align-items: center; gap: 4px; }
.msg-dm:hover b { text-decoration: underline; }

/* аккаунт: мои колёса */
.my-wheels { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.my-wheel { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.my-wheel-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-wheel-name:hover b { text-decoration: underline; }

/* админка: плашка для игроков */
.st-pulse { margin-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.st-pulse-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.st-pulse-switch { font-weight: 700; }
.st-pulse-switch.on { color: var(--ok); }
.st-pulse-preview { margin: 0; }
.st-alerts .hint { display: flex; align-items: center; gap: 6px; margin: 0; }
.st-alerts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.st-alerts-list li { display: flex; gap: 8px; flex-wrap: wrap; }
.st-alerts-list li.bad { color: var(--danger); }
.st-alerts-actions { display: flex; justify-content: flex-end; }

/* проверка «человек ли это» (Turnstile) под «Крутить»: видна, только когда Cloudflare просит нажать галочку */
.human-check { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.human-hint { font-size: 13px; color: var(--muted); text-align: center; max-width: 320px; }

/* ============================================================ баланс и промокоды хоста */
.warn-text, .hint.warn-text, .cart .hint.warn-text { color: #fbbf24; }
.bal-item.money .icon { color: var(--ok); }
a.bal-item.money:hover b { text-decoration: underline; }
.acc-money .money-sum { font-size: 30px; font-weight: 800; margin: 2px 0 6px; }
.acc-money > .btn { margin: 4px 0 6px; }
.money-log-title { font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
.money-log { display: flex; flex-direction: column; }
.money-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.money-row:first-child { border-top: 0; }
.money-what { display: flex; flex-direction: column; min-width: 0; }
.money-what > a, .money-what > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.money-what > a:hover { text-decoration: underline; }
.money-amount { white-space: nowrap; }
.money-amount.plus { color: var(--ok); }
.earn-total { margin: 0 0 6px; }
.earn-total b { font-size: 18px; }
.earn-section > div > p { font-size: 14px; margin-bottom: 8px; }
.codes-section > div > p { font-size: 14px; margin-bottom: 10px; }
.hp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
@media (max-width: 480px) { .hp-form { grid-template-columns: 1fr; } }
.hp-total { margin: 10px 0 2px; }
.hp-total b { font-size: 18px; }
.codes-section .pin-methods { margin: 8px 0; }
.codes-section .btn-primary { margin-top: 4px; }
.hp-codes { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.hp-code { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.hp-code.promo-dim { opacity: .6; }
.shop-bal-top { flex-basis: 100%; margin: 0; }

/* ---------- ежедневный подарок (daily.js): «горящий» значок профиля, календарь на 30 дней ---------- */
.header-acc { position: relative; }
.acc-gift { display: none; }
.header-acc.hot { border-color: var(--accent); color: var(--accent); animation: promo-pulse 2s ease-in-out infinite; }
.header-acc.hot .acc-gift {
  display: grid; place-items: center; position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--accent-grad); color: #fff; box-shadow: 0 0 0 2px var(--bg);
}
.header-acc.hot .acc-gift .icon { width: 12px; height: 12px; }
@media (prefers-reduced-motion: reduce) { .header-acc.hot { animation: none; } }
.daily-modal { max-width: 460px; text-align: center; }
.daily-badge { width: 60px; height: 60px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 61, 129, .12); color: var(--accent); }
.daily-badge .icon { width: 28px; height: 28px; }
.daily-lead { font-size: 14px; margin: 6px 0 14px; }
.daily-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-bottom: 16px; }
.daily-cell {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 5px; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted);
}
.daily-n { font-size: 11px; font-weight: 700; }
.daily-ic .icon { width: 16px; height: 16px; }
.daily-what { font-size: 12px; font-weight: 800; color: var(--text-2); }
.daily-cell.special { border-color: rgba(245, 179, 1, .45); }
.daily-cell.special .daily-ic, .daily-cell.special .daily-what { color: var(--r-legendary); }
.daily-cell.done { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .35); }
.daily-cell.done .daily-ic { color: var(--ok); }
.daily-cell.today { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255, 61, 129, .25); color: var(--text); }
.daily-cell.today.done { border-color: var(--ok); box-shadow: 0 0 0 2px rgba(52, 211, 153, .25); }
.daily-action { display: flex; flex-direction: column; gap: 8px; }
.daily-action .hint { margin: 0; }
.daily-claim { animation: promo-pulse 2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .daily-claim { animation: none; } }
.daily-next { margin: 0; font-size: 15px; }
.daily-next b { font-variant-numeric: tabular-nums; }
.daily-acc { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--muted); }
.acc-daily.ready { border-color: rgba(255, 61, 129, .45); }
.acc-daily h3 { display: flex; align-items: center; gap: 8px; }
.acc-daily h3 .icon { color: var(--accent); }
.acc-daily .btn { align-self: flex-start; }

/* ---------- покупка прямо в колесе (quickbuy.js) ---------- */
.qb-modal { max-width: 460px; text-align: center; }
.qb-badge { width: 60px; height: 60px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 61, 129, .12); color: var(--accent); }
.qb-badge .icon { width: 28px; height: 28px; }
.qb-lead { font-size: 14px; margin: 6px 0 14px; }
.qb-packs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
@media (max-width: 520px) { .qb-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qb-pack { cursor: pointer; padding: 14px 6px 12px; color: var(--text); font: inherit; }
.qb-pack .pack-count b { font-size: 28px; }
.qb-pack .pack-price { font-size: 17px; }
.qb-stars { font-size: 12px; }
.qb-actions { display: flex; flex-direction: column; gap: 8px; }
.qb-actions .hint { margin: 0; }
.qb-more { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ---------- выбор темы колеса (themepick.js) и «Большое колесо» (bigwheel.js) ---------- */
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.theme-opt {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-2); font: inherit;
}
.theme-opt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255, 61, 129, .25); color: var(--text); }
.theme-swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(0, 0, 0, .35); }
.theme-name { font-size: 12px; font-weight: 700; }
.big-on { display: flex; align-items: center; gap: 8px; color: var(--ok); }
.big-on .icon { width: 18px; height: 18px; }
.create-theme { margin-top: 6px; }

/* ---------- рейтинги (top.js) и колесо дня на главной ---------- */
.top-page { padding-bottom: 48px; }
.top-wheel { margin-bottom: 18px; }
.top-wheel h3, .day-wheel-head .eyebrow { display: flex; align-items: center; gap: 8px; }
.top-wheel h3 .icon, .day-wheel-head .icon { color: var(--r-legendary); }
.top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .top-grid { grid-template-columns: 1fr; } }
.top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.top-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); min-width: 0; }
.top-place { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 13px; background: var(--surface-3); color: var(--text-2); }
.top-1 .top-place { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #1a1205; }
.top-2 .top-place { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #111; }
.top-3 .top-place { background: linear-gradient(135deg, #fdba74, #c2410c); color: #1a0d05; }
.top-nick { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--text); }
.top-legend { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; color: var(--r-legendary); }
.top-legend .icon { width: 13px; height: 13px; }
.top-n { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.top-foot { margin-top: 16px; }
.day-wheel { margin-bottom: 14px; }
.day-wheel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.acc-top-hide { margin-top: 12px; }

/* ---------- вкладка «Продажи» (admin-sales.js) ---------- */
.sl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.sl-head p { margin: 0; max-width: 640px; }
.sl-funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .sl-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sl-step { position: relative; display: flex; flex-direction: column; }
.sl-step .st-tile { flex: 1; }
.sl-conv {
  position: absolute; top: -9px; left: -8px; z-index: 1; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 800;
  background: var(--accent-grad); color: #fff;
}
.sl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 860px) { .sl-grid { grid-template-columns: 1fr; } }
.sl-share h4 { margin: 0 0 10px; }
.sl-rows { display: flex; flex-direction: column; gap: 8px; }
.sl-row { display: grid; grid-template-columns: minmax(90px, 1.2fr) 2fr auto auto; align-items: center; gap: 10px; font-size: 14px; }
.sl-row:not(:has(.sl-bar)) { grid-template-columns: 1fr auto auto; }
.sl-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.sl-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent-grad); }
.sl-sum { white-space: nowrap; }
.sl-n { font-size: 12px; white-space: nowrap; }

/* ============================================================ страница для рекламодателей (/advertise) */
.adv-page { display: flex; flex-direction: column; gap: 22px; padding-top: 22px; padding-bottom: 40px; }
.adv-hero {
  position: relative; overflow: hidden; padding: 44px 36px; border-radius: 24px; border: 1px solid var(--border-2);
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 61, 129, .28), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(255, 138, 61, .22), transparent 60%), var(--surface);
}
.adv-kicker {
  display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; background: var(--accent-grad);
}
.adv-hero h1 { font-family: var(--font-display); font-size: clamp(26px, 4.2vw, 44px); line-height: 1.12; margin: 16px 0 12px; max-width: 820px; }
.adv-sub { color: var(--text-2); font-size: 17px; max-width: 700px; margin: 0 0 24px; }
.adv-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.adv-bigs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.adv-big {
  padding: 22px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.adv-big b {
  font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 40px); line-height: 1; letter-spacing: -.01em;
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.adv-big span { color: var(--text-2); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.adv-big.live { border-color: rgba(52, 211, 153, .45); }
.adv-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: adv-pulse 1.8s infinite; }
@keyframes adv-pulse { 70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.adv-smalls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.adv-small {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
}
.adv-small .icon { grid-row: 1 / 3; width: 26px; height: 26px; color: var(--accent); }
.adv-small b { font-size: 22px; font-weight: 800; }
.adv-small span { color: var(--muted); font-size: 14px; }
.adv-updated { margin: -8px 0 0; }
.adv-audience h3, .adv-format h3 { margin: 0 0 6px; }
.adv-audience h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.adv-audience h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.adv-aud-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; }
.adv-countries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.adv-countries li { display: grid; grid-template-columns: 150px 1fr 54px; gap: 10px; align-items: center; }
.adv-cc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.adv-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent-grad); }
.adv-countries b { text-align: right; }
.adv-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.adv-facts li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.adv-facts .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.adv-formats h2 { font-family: var(--font-display); margin: 6px 0 14px; }
.adv-format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.adv-format { padding: 20px; display: flex; flex-direction: column; gap: 6px; transition: transform .15s, border-color .15s; }
.adv-format:hover { transform: translateY(-2px); border-color: rgba(255, 61, 129, .5); }
.adv-format-icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 6px;
  background: rgba(255, 61, 129, .14); color: var(--accent);
}
.adv-format-icon .icon { width: 22px; height: 22px; }
.adv-format p { margin: 0; color: var(--text-2); }
.adv-contact { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 22px; }
.adv-contact h2 { font-family: var(--font-display); margin: 0; }
.adv-contact p { margin: 0; max-width: 620px; color: var(--text-2); }
.adv-contact .btn { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .adv-bigs { grid-template-columns: repeat(2, 1fr); }
  .adv-smalls, .adv-format-grid { grid-template-columns: repeat(2, 1fr); }
  .adv-aud-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .adv-hero { padding: 28px 18px; }
  .adv-smalls, .adv-format-grid { grid-template-columns: 1fr; }
  .adv-countries li { grid-template-columns: 110px 1fr 48px; }
  .adv-actions .btn { flex: 1 1 100%; justify-content: center; }
}
