/* stage3b.css — экраны волны 3б веб-приложения (на токенах kit.css).
 * Блоки: ПОДТВЕРЖДЕНИЕ · ОШЕЙНИК · РАЗДЕЛЫ · РЫБНЫЙ ДВОР · КАПСУЛА ·
 * ШОП · БАРАХОЛКА · РУЛЕТКА.
 * Правила (как stage3.css): цвета — только var(--…), currentColor,
 * transparent и color-mix(… var(--…) …); длительности — var(--dur-*);
 * всё интерактивное не выделяется долгим нажатием (user-select +
 * -webkit-user-select + -webkit-touch-callout — иначе iPhone выделяет текст
 * под пальцем); тап-цели ≥ 44 px; prefers-reduced-motion гасит движения. */

:root {
  --t-rare: #7fb4ff; --t-epic: #c77bff; --t-legendary: #ffd75e; --t-mythic: #ff6ad5;
  /* Превью тем в «Оформлении» рисуют СВОЮ тему при любой текущей (= kit.css --bg/--lav). */
  --pv-dark-bg: #130e21; --pv-dark-ink: #c7b2ff; --pv-light-bg: #fdfaf5; --pv-light-ink: #584099;
}
:root[data-theme="light"] {
  --t-rare: #2f6fc9; --t-epic: #8a3fc9; --t-legendary: #8a6a00; --t-mythic: #b0218f;
}
.t-rare { --tier: var(--t-rare); }
.t-epic { --tier: var(--t-epic); }
.t-legendary { --tier: var(--t-legendary); }
.t-mythic { --tier: var(--t-mythic); }

/* == ПОДТВЕРЖДЕНИЕ «Нет | Да» (ui/askrow.js) ============================== */
.ask-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%;
  animation: ask-in var(--dur-base) var(--ease-out);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.ask-q { flex: 1 1 160px; min-width: 0; color: var(--panel-fg); font-size: 14px; font-weight: 800; line-height: 1.35; }
.ask-bs { display: flex; gap: 8px; flex: 1 1 160px; }
.ask-bs .btn { flex: 1 1 0; min-width: 0; }
.ask-row.is-danger .ask-q { color: var(--danger-ink); }
.btn.is-danger { background: var(--danger-ink); color: var(--ink-on-accent); }
@keyframes ask-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* == ОШЕЙНИК: главный экран (screens/collar.js) =========================== */
.osh-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 4px var(--gutter) 24px; }
.osh-chev { display: grid; place-items: center; flex: none; width: 20px; color: var(--ink-dim); transform: scaleX(-1); }
.osh-chev svg { width: 18px; height: 18px; }
.osh-card, .osh-fish, .osh-row, .osh-door, .osh-cta, .ryb-row {
  display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 56px;
  padding: 10px 12px; border-radius: var(--r-4); color: var(--panel-fg);
  background: var(--raise); box-shadow: inset 0 0 0 1px var(--line);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: background-color var(--dur-press) linear;
}
.osh-card:active, .osh-fish:active, .osh-row:active, .osh-door:active, .osh-cta:active, .ryb-row:active { background: var(--accent-wash-2); }
.osh-card { padding: 14px; border-radius: var(--r-5); }
.osh-card-av { flex: none; display: grid; place-items: center; width: 64px; height: 64px; }
.osh-card-tx { display: grid; flex: 1; min-width: 0; gap: 2px; }
.osh-card-name { font-size: 19px; font-weight: 900; overflow-wrap: anywhere; }
.osh-card-h, .osh-card-meta { color: var(--ink-dim); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.osh-pro {
  flex: none; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 900;
  color: var(--gold-ink); box-shadow: inset 0 0 0 1px currentColor;
}
.osh-fish {
  background: color-mix(in srgb, var(--gold-ink) 10%, var(--raise));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold-ink) 35%, transparent);
}
.osh-fish-ic { flex: none; font-size: 26px; color: var(--gold-ink); }
.osh-fish-tx, .ryb-row > span:not(.osh-chev) { display: grid; flex: 1; min-width: 0; }
.osh-fish-tx b, .ryb-row b { font-size: 15px; font-weight: 900; }
.osh-fish-tx small, .ryb-row small { color: var(--ink-dim); font-size: 13px; font-weight: 700; }
.osh-fish-n { display: flex; align-items: center; gap: 4px; flex: none; color: var(--gold-ink); font-size: 18px; font-weight: 900; }
.osh-list { display: grid; gap: 12px; }
.osh-group {
  display: grid; overflow: hidden; border-radius: var(--r-4);
  background: var(--raise); box-shadow: inset 0 0 0 1px var(--line);
}
.osh-group .osh-row { border-radius: 0; background: transparent; box-shadow: none; }
.osh-group .osh-row + .osh-row { box-shadow: inset 0 1px 0 var(--line); }
.osh-ic {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r-3);
  background: var(--accent-wash); color: var(--lav); font-size: 20px;
}
.osh-row-t { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 800; }
.osh-sum {
  flex: 0 1 auto; min-width: 0; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink-dim); font-size: 13px; font-weight: 700; text-align: right;
}
.osh-foot, .osh-note { margin: 0; color: var(--ink-dim); font-size: 13px; font-weight: 700; line-height: 1.45; }
.osh-foot { text-align: center; }
.osh-note a { color: var(--lav); }
.osh-line { margin: 0; color: var(--ink-mid); font-size: 14px; font-weight: 700; line-height: 1.45; }
.osh-skel { display: grid; gap: 10px; }

/* == РАЗДЕЛЫ: поля, переключатели, двери ================================== */
.osh-h { margin: 6px 2px 0; font-size: 15px; font-weight: 900; }
.osh-form { display: grid; gap: 14px; }
.osh-fld { display: grid; gap: 6px; min-width: 0; }
.osh-fld-l { display: flex; align-items: center; gap: 6px; color: var(--ink-mid); font-size: 13px; font-weight: 800; }
.osh-tick {
  display: inline-grid; place-items: center; color: var(--ok-ink); font-size: 15px;
  opacity: 0; transform: scale(.6); transition: opacity var(--dur-fast) linear, transform var(--dur-fast) var(--ease-pop);
}
.is-saved .osh-tick { opacity: 1; transform: none; }
.is-saving .osh-tick { opacity: .45; transform: none; color: var(--ink-dim); }
.osh-in {
  width: 100%; min-width: 0; min-height: var(--tap); padding: 10px 12px; border: 0; border-radius: var(--r-3);
  background: var(--sink); color: var(--panel-fg); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 16px; font-weight: 700; line-height: 1.4; resize: vertical;
  transition: box-shadow var(--dur-fast) linear;
}
.osh-in:focus { outline: none; box-shadow: inset 0 0 0 2px var(--lav); }
.is-failed .osh-in { box-shadow: inset 0 0 0 2px var(--danger-ink); }
.osh-in-wrap { position: relative; display: block; }
.osh-in-wrap .osh-in { padding-left: 30px; }
.osh-prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-dim); font-weight: 900; pointer-events: none; }
.osh-fld-h { color: var(--ink-dim); font-size: 12px; font-weight: 700; line-height: 1.4; }
.osh-msg { color: var(--danger-ink); font-size: 13px; font-weight: 800; line-height: 1.4; }
.is-failed .osh-fld-h { display: none; }          /* ошибка заменяет подсказку, а не дублирует её */
.osh-doors { display: grid; gap: 8px; margin-top: 4px; }
.osh-door .ki { flex: none; font-size: 22px; color: var(--lav); }
.osh-door span:not(.osh-chev) { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; }
.osh-act { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.osh-act > .btn { flex: 1 1 auto; }
.osh-empty { display: grid; justify-items: center; gap: 10px; padding: 18px 12px; text-align: center; }
.osh-empty p { margin: 0; color: var(--ink-mid); font-size: 14px; font-weight: 700; }
.osh-look { display: flex; align-items: center; gap: 14px; }
.osh-look-av { flex: none; display: grid; place-items: center; width: 120px; height: 120px; }
.osh-look-tx { margin: 0; color: var(--ink-mid); font-size: 14px; font-weight: 700; line-height: 1.45; }
.osh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.osh-wear, .ryb-tile2 {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; min-width: 0;
  padding: 10px 6px; border: 0; border-radius: var(--r-4); cursor: pointer;
  background: var(--raise); color: var(--panel-fg); box-shadow: inset 0 0 0 1px var(--line);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: box-shadow var(--dur-fast) linear, background-color var(--dur-press) linear;
}
.osh-wear:active, .ryb-tile2:active { background: var(--accent-wash-2); }
.osh-wear.is-on { box-shadow: inset 0 0 0 2px var(--lav); background: var(--accent-wash); }
.osh-wear-av, .ryb-tile2-av { display: grid; place-items: center; width: 64px; height: 64px; }
.ryb-tile2-av { width: 72px; height: 72px; }
.osh-wear-n, .ryb-tile2-n { font-size: 13px; font-weight: 800; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.osh-wear-st { color: var(--ink-dim); font-size: 12px; font-weight: 800; }
.osh-wear.is-on .osh-wear-st { color: var(--lav); }
.is-busy .osh-wear { pointer-events: none; opacity: .7; }
.osh-redeem { display: grid; }
.osh-in-row { display: flex; gap: 8px; min-width: 0; }
.osh-in-row .osh-in { flex: 1; }
.osh-in-row .btn { flex: none; }
.osh-hero {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-4);
  background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--line);
}
.osh-hero p { margin: 0; color: var(--ink-soft); font-size: 14px; font-weight: 700; line-height: 1.45; }
.osh-hero b { color: var(--panel-fg); }
.osh-hero-ic { flex: none; font-size: 28px; color: var(--lav); }
.osh-link {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 8px 8px 14px;
  border-radius: var(--r-4); background: var(--sink); box-shadow: inset 0 0 0 1px var(--line);
}
.osh-link-u { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 800; color: var(--lav); }
.osh-cta { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold-ink) 40%, transparent); }
.osh-cta > .ki { flex: none; font-size: 26px; color: var(--gold-ink); }
.osh-cta > span:not(.osh-chev) { display: grid; flex: 1; min-width: 0; }
.osh-cta small { color: var(--ink-dim); font-size: 13px; font-weight: 700; }
.osh-codes { display: grid; gap: 8px; }
.osh-code { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: var(--r-4); background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
.osh-code-tx { display: grid; flex: 1; min-width: 0; }
.osh-code-tx b { font-size: 15px; font-weight: 900; letter-spacing: .04em; overflow-wrap: anywhere; }
.osh-code-tx small { color: var(--ink-dim); font-size: 13px; font-weight: 700; }
.osh-rub {
  border-radius: var(--r-4); background: var(--raise); box-shadow: inset 0 0 0 1px var(--line);
}
.osh-rub > summary {
  display: flex; align-items: center; min-height: var(--tap); padding: 0 14px; cursor: pointer;
  color: var(--ink-mid); font-size: 14px; font-weight: 800; list-style: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.osh-rub > summary::-webkit-details-marker { display: none; }
.osh-rub > summary::after { content: "›"; margin-left: auto; font-size: 20px; transition: transform var(--dur-fast) var(--ease-out); }
.osh-rub[open] > summary::after { transform: rotate(90deg); }
.osh-rub > :not(summary) { margin: 0 12px 12px; }
.osh-buy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; padding: 10px 0; box-shadow: inset 0 1px 0 var(--line); }
.osh-buy-tx { display: grid; min-width: 0; }
.osh-buy-tx b { font-size: 14px; font-weight: 900; }
.osh-buy-tx small { color: var(--ink-dim); font-size: 12px; font-weight: 700; line-height: 1.4; }
.osh-buy .osh-in { grid-column: 1 / -1; grid-row: 2; }
.osh-buy .btn { grid-column: 2; grid-row: 1; }
.osh-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.osh-theme {
  display: grid; justify-items: center; gap: 8px; padding: 12px 6px; border-radius: var(--r-4); cursor: pointer;
  background: var(--raise); box-shadow: inset 0 0 0 1px var(--line);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: box-shadow var(--dur-fast) linear;
}
.osh-theme:has(input:checked) { box-shadow: inset 0 0 0 2px var(--lav); background: var(--accent-wash); }
.osh-theme:has(input:focus-visible) { outline: 2px solid var(--lav); outline-offset: 2px; }
.osh-theme-pv { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 64px; height: 44px; padding: 5px; border-radius: var(--r-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.osh-theme-pv i { border-radius: 3px; }
.osh-theme-pv i:first-child { grid-column: 1 / -1; }
.osh-theme[data-mode="light"] .osh-theme-pv { background: var(--pv-light-bg); }
.osh-theme[data-mode="light"] .osh-theme-pv i { background: color-mix(in srgb, var(--pv-light-ink) 28%, transparent); }
.osh-theme[data-mode="dark"] .osh-theme-pv { background: var(--pv-dark-bg); }
.osh-theme[data-mode="dark"] .osh-theme-pv i { background: color-mix(in srgb, var(--pv-dark-ink) 40%, transparent); }
.osh-theme[data-mode="system"] .osh-theme-pv { background: linear-gradient(135deg, var(--pv-light-bg) 50%, var(--pv-dark-bg) 50%); }
.osh-theme[data-mode="system"] .osh-theme-pv i { background: color-mix(in srgb, var(--pv-dark-ink) 45%, transparent); }
.osh-theme-n { font-size: 13px; font-weight: 800; text-align: center; }
.osh-srow {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 6px 10px 12px;
  border-radius: var(--r-4); background: var(--raise); box-shadow: inset 0 0 0 1px var(--line);
}
.osh-srow.is-failed { box-shadow: inset 0 0 0 1px var(--danger-ink); }
.osh-srow-tx { display: grid; flex: 1; min-width: 0; gap: 2px; }
.osh-srow-tx b { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 900; }
.osh-srow-sub { color: var(--ink-dim); font-size: 13px; font-weight: 700; line-height: 1.35; }
.osh-sw {
  display: grid; place-items: center; flex: none; width: 60px; height: var(--tap); cursor: pointer;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.osh-sw-track { position: relative; width: 46px; height: 28px; border-radius: 14px; background: var(--line-strong); transition: background-color var(--dur-fast) linear; }
.osh-sw-dot {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--panel-fg); box-shadow: var(--e2); transition: transform var(--dur-base) var(--ease-out);
}
.osh-sw-in:checked + .osh-sw-track { background: var(--accent-grad); }
.osh-sw-in:checked + .osh-sw-track .osh-sw-dot { transform: translateX(18px); background: var(--ink-on-accent); }
.osh-sw-in:focus-visible + .osh-sw-track { outline: 2px solid var(--lav); outline-offset: 2px; }
.osh-sw-in:disabled + .osh-sw-track { opacity: .6; }
.osh-blocks { display: grid; gap: 8px; }
.osh-blk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; padding: 8px 12px; border-radius: var(--r-4); background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
.osh-blk-av { flex: none; display: grid; place-items: center; width: 40px; height: 40px; }
.osh-blk-tx { display: grid; flex: 1; min-width: 0; }
.osh-blk-tx b { font-size: 15px; font-weight: 900; overflow-wrap: anywhere; }
.osh-blk-tx small { color: var(--ink-dim); font-size: 13px; font-weight: 700; }
.osh-blk .osh-act { flex: 0 1 auto; }
.osh-out { margin-top: 6px; }
.osh-danger {
  display: grid; gap: 10px; margin-top: 12px; padding: 14px; border-radius: var(--r-4);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--danger-ink) 60%, transparent);
}
.osh-danger h2 { margin: 0; color: var(--danger-ink); font-size: 15px; font-weight: 900; }
.osh-danger p { margin: 0; color: var(--ink-mid); font-size: 14px; font-weight: 700; line-height: 1.45; }
.osh-danger .btn { color: var(--danger-ink); }
.osh-delbox { display: grid; gap: 12px; padding-bottom: 8px; }
.osh-delbox p { margin: 0; color: var(--ink-soft); font-size: 15px; font-weight: 700; line-height: 1.45; }

@media (prefers-reduced-motion: reduce) {
  .ask-row { animation: none; }
  .osh-tick, .osh-sw-dot, .osh-sw-track, .osh-rub > summary::after { transition: none; }
}

/* == РЫБНЫЙ ДВОР: кошелёк (screens/fish.js) =============================== */
.ryb-bal-pill { display: flex; align-items: center; gap: 4px; margin-left: auto; color: var(--gold-ink); font-size: 16px; font-weight: 900; }
.scr-fish .sub-title { flex: 1 1 auto; }
.ryb-seg { top: calc(var(--hdr-h) + var(--safe-t) + 52px); }
.ryb-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 4px var(--gutter) 24px; }
.ryb-hero { display: grid; justify-items: center; gap: 4px; padding: 12px 0 6px; text-align: center; }
.ryb-hero small { color: var(--ink-dim); font-size: 13px; font-weight: 700; }
.ryb-hero-n { display: flex; align-items: center; gap: 10px; color: var(--gold-ink); font-size: 44px; font-weight: 900; line-height: 1.1; }
.ryb-hero-n .ki { font-size: 40px; }
.ryb-card { display: grid; gap: 10px; min-width: 0; padding: 14px; border-radius: var(--r-4); background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
.ryb-card h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 16px; font-weight: 900; }
.ryb-card > small { color: var(--ink-dim); font-size: 12px; font-weight: 700; line-height: 1.45; }
.ryb-card-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.ryb-card-h small { color: var(--ink-dim); font-size: 13px; font-weight: 800; }
.ryb-bar { display: block; height: 8px; border-radius: 999px; background: var(--sink); overflow: hidden; }
.ryb-bar.is-thin { height: 5px; margin-top: 4px; }
.ryb-bar i { display: block; width: var(--p, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lav), var(--gold-ink)); transition: width var(--dur-slow) var(--ease-out); }
.ryb-task { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ryb-task-ic { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r-3); background: var(--accent-wash); color: var(--lav); font-size: 20px; }
.ryb-task.is-done .ryb-task-ic { color: var(--ok-ink); }
.ryb-task.is-done .ryb-bar i { background: var(--ok-ink); }
.ryb-task-tx { display: grid; flex: 1; min-width: 0; }
.ryb-task-tx b { font-size: 14px; font-weight: 900; }
.ryb-task-tx small { color: var(--ink-dim); font-size: 12px; font-weight: 700; }
.ryb-task-r { flex: none; max-width: 34%; color: var(--gold-ink); font-size: 13px; font-weight: 900; text-align: right; }
.ryb-task.is-done .ryb-task-r { color: var(--ok-ink); }
.ryb-row > .ki { flex: none; font-size: 24px; color: var(--lav); }
.ryb-card .ryb-row { padding: 8px 0; min-height: var(--tap); background: transparent; box-shadow: none; }
.ryb-day { margin: 6px 0 0; color: var(--ink-mid); font-size: 13px; font-weight: 900; }
.ryb-h { display: flex; align-items: center; gap: 10px; min-height: 40px; box-shadow: inset 0 -1px 0 var(--line); }
.ryb-h-tx { display: grid; flex: 1; min-width: 0; }
.ryb-h-tx b { font-size: 14px; font-weight: 800; }
.ryb-h-tx .ts { color: var(--ink-dim); font-size: 12px; font-weight: 700; }
.ryb-h-d { flex: none; font-size: 15px; font-weight: 900; }
.ryb-h-d.is-plus { color: var(--ok-ink); }
.ryb-h-d.is-minus { color: var(--danger-ink); }

/* == КАПСУЛА ============================================================== */
.ryb-cap { display: grid; justify-items: center; gap: 8px; padding: 8px 4px 4px; text-align: center; }
.ryb-cap-art {
  display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--lav) 30%, transparent), transparent 70%);
  color: var(--lav); font-size: 76px;
}
.ryb-cap h2 { margin: 0; font-size: 20px; font-weight: 900; }
.ryb-cap p { margin: 0; max-width: 34ch; color: var(--ink-mid); font-size: 14px; font-weight: 700; line-height: 1.45; }
.ryb-open-wrap { width: min(100%, 360px); margin-top: 6px; }
.ryb-open { flex: 1 1 auto; min-height: 52px; font-size: 17px; }
.ryb-more { color: var(--lav); font-size: 14px; font-weight: 800; min-height: var(--tap); display: inline-flex; align-items: center; }
.ryb-pips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ryb-pips i { height: 8px; border-radius: 999px; background: var(--sink); box-shadow: inset 0 0 0 1px var(--line); }
.ryb-pips i.on { background: var(--gold-ink); box-shadow: none; }
.ryb-odd { display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 14px; font-weight: 800; }
.ryb-odd span:not(.ryb-odd-dot) { flex: 1; }
.ryb-odd b { color: var(--tier); font-size: 15px; font-weight: 900; }
.ryb-odd-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--tier); }

/* == ШОП ================================================================== */
.ryb-pro { background: color-mix(in srgb, var(--lav) 8%, var(--raise)); }
.ryb-pro.is-on { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold-ink) 55%, transparent); }
.ryb-pro h2 .ki { color: var(--gold-ink); }
.ryb-perks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ryb-perks li { display: flex; gap: 10px; align-items: flex-start; }
.ryb-perks li > .ki { flex: none; margin-top: 2px; color: var(--ok-ink); }
.ryb-perks li span { display: grid; min-width: 0; }
.ryb-perks b { font-size: 14px; font-weight: 900; }
.ryb-perks small { color: var(--ink-dim); font-size: 12px; font-weight: 700; line-height: 1.4; }
.ryb-chips, .ryb-mseg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.ryb-chips::-webkit-scrollbar, .ryb-mseg::-webkit-scrollbar { display: none; }
.ryb-chip {
  flex: none; min-height: var(--tap); padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--raise-2); color: var(--ink-mid); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; font-weight: 800;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: background-color var(--dur-press) linear, color var(--dur-press) linear;
}
.ryb-chip[aria-pressed="true"] { background: var(--accent-wash-3); color: var(--panel-fg); box-shadow: none; }
.ryb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .ryb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ryb-grid > .osh-line { grid-column: 1 / -1; }
.ryb-tile2 { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tier) 45%, transparent); }
.ryb-tile2-m { color: var(--tier); font-size: 12px; font-weight: 800; text-align: center; }
.ryb-own {
  position: absolute; top: 6px; right: 6px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 999px; background: color-mix(in srgb, var(--ok-ink) 18%, var(--bg)); color: var(--ok-ink); font-size: 12px; font-weight: 900;
}
.ryb-item { display: grid; justify-items: center; gap: 10px; padding-bottom: 8px; text-align: center; }
.ryb-item-av { display: grid; place-items: center; width: 160px; height: 160px; }
.ryb-item-m { margin: 0; color: var(--tier); font-size: 14px; font-weight: 900; }
.ryb-item-bs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: 100%; }
.ryb-item-bs .osh-act > .btn { flex: 1 1 auto; }

/* == БАРАХОЛКА ============================================================ */
.ryb-lots, .ryb-salvage { display: grid; gap: 8px; }
.ryb-lot, .ryb-sv {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px;
  border-radius: var(--r-4); background: var(--raise); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tier, var(--line)) 40%, transparent);
}
.ryb-salvage .ryb-sv { padding: 6px 0; background: transparent; box-shadow: inset 0 -1px 0 var(--line); border-radius: 0; }
.ryb-lot-av { flex: none; display: grid; place-items: center; width: 52px; height: 52px; }
.ryb-sv .ryb-lot-av { width: 44px; height: 44px; }
.ryb-lot-tx { display: grid; flex: 1 1 140px; min-width: 0; }
.ryb-lot-tx b { font-size: 14px; font-weight: 900; overflow-wrap: anywhere; }
.ryb-lot-tx small { color: var(--ink-dim); font-size: 12px; font-weight: 700; }
.ryb-lot-r { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ryb-lot-r b { color: var(--gold-ink); font-size: 16px; font-weight: 900; }
.ryb-sell-f { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
.ryb-sell-f .osh-act { grid-column: 1 / -1; }
.ryb-sell-f .osh-act > .btn { flex: 1 1 auto; }

/* == РУЛЕТКА (ui/roulette.js) ============================================= */
.ryb-roll {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  background: var(--scrim-2); animation: ryb-fade var(--dur-base) var(--ease-out);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
@keyframes ryb-fade { from { opacity: 0; } to { opacity: 1; } }
.ryb-roll-in { display: grid; gap: 16px; width: min(100%, 520px); }
.ryb-roll-h { margin: 0; font-size: 20px; font-weight: 900; text-align: center; }
.ryb-roll.is-legendary .ryb-roll-h { color: var(--t-legendary); }
.ryb-roll.is-mythic .ryb-roll-h { color: var(--t-mythic); }
.ryb-win {
  position: relative; overflow: hidden; height: 108px; border-radius: var(--r-4);
  background: var(--sink); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.ryb-strip { display: flex; gap: 8px; padding: 12px 0; will-change: transform; }
.ryb-tile {
  flex: none; display: grid; place-items: center; width: 84px; height: 84px; border-radius: var(--r-3);
  background: var(--raise); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tier) 70%, transparent);
}
.ryb-mark {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px;
  background: var(--gold-ink); box-shadow: 0 0 12px var(--gold-ink); pointer-events: none;
}
.ryb-res { display: grid; gap: 10px; animation: ask-in var(--dur-slow) var(--ease-out); }
.ryb-got { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-4); background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
.ryb-got-av { flex: none; display: grid; place-items: center; width: 72px; height: 72px; }
.ryb-got-tx { display: grid; flex: 1; min-width: 0; }
.ryb-got-tx b { font-size: 16px; font-weight: 900; overflow-wrap: anywhere; }
.ryb-got-tx small { color: var(--ink-dim); font-size: 13px; font-weight: 700; }
.ryb-got-n { color: var(--lav); }
.ryb-res-bs { display: flex; flex-wrap: wrap; gap: 8px; }
.ryb-res-bs .btn { flex: 1 1 100px; }

@media (prefers-reduced-motion: reduce) {
  .ryb-roll, .ryb-res { animation: none; }
  .ryb-bar i { transition: none; }
  .ryb-strip { transition: none !important; }
}

/* «Девять жизней» в Ошейнике — кнопка-строка с артом двора игры на фоне
   (затемнение запечено в картинку), эмблемой и золотой рамкой: выделяется
   среди строк, но остаётся кнопкой. Текст на тёмном арте — светлый в обеих темах. */
.osh-nl { display: flex; align-items: center; gap: 12px; min-height: 72px; margin: 12px 0; padding: 10px 14px;
  border-radius: var(--r-lg, 18px); text-decoration: none; color: var(--ink-on-accent);
  background: url(/assets/cards-btn-v1.webp) center / cover no-repeat, var(--bg-2);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold-ink) 70%, transparent),
    0 0 18px color-mix(in srgb, var(--gold-ink) 18%, transparent);
  -webkit-tap-highlight-color: transparent; }
.osh-nl:active { filter: brightness(1.12); }
.osh-nl-ic { flex: none; width: 42px; height: 48px;
  background: url(/assets/cards-emblem-v1.webp) center / contain no-repeat; }
.osh-nl-tx { display: grid; flex: 1; min-width: 0; }
.osh-nl-tx b { font-weight: 900; font-size: 17px; }
.osh-nl-tx small { opacity: .8; }
.osh-nl-go { flex: none; font-weight: 800; font-size: 14px; color: var(--bg); background: var(--gold-ink);
  border-radius: 999px; padding: 6px 14px; }
.osh-nl .osh-chev { color: var(--ink-on-accent); opacity: .7; }
