/* styles.css */
:root {
  --bg: #080e16;
  --surface: #101925;
  --surface-2: #151f2d;
  --line: #29364a;
  --text: #f4f7fb;
  --muted: #96a5ba;
  --purple: #8d46ff;
  --purple-2: #bd64ff;
  --cyan: #26c7f4;
  --gold: #ffc62c;
  --danger: #ff5470;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 78% 13%, rgba(75, 89, 220, .11), transparent 29rem),
    radial-gradient(circle at 22% 55%, rgba(139, 52, 226, .07), transparent 32rem),
    var(--bg);
  overflow-x: hidden;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; }

.topbar {
  height: 62px;
  padding: 0 29px;
  display: grid;
  grid-template-columns: auto minmax(430px, 1fr) minmax(190px, .9fr) auto auto auto auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #273143;
  background: rgba(8, 14, 23, .94);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; border: 0; background: transparent; padding: 0; cursor: pointer; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; font-size: 29px; filter: drop-shadow(0 0 10px rgba(143, 79, 255, .55)); }
.top-mark { position: relative; overflow: hidden; }
.top-mark img { position: absolute; width: 42px; max-width: none; left: 0; top: 0; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -.045em; }
.beta { font-size: 11px; color: #bdc9db; background: #252e3d; border: 1px solid #354052; padding: 3px 7px; border-radius: 5px; }

.nav { height: 100%; display: flex; justify-content: center; gap: 25px; }
.nav-link { position: relative; display: flex; align-items: center; color: #c7cfdb; background: none; border: 0; padding: 0; font-size: 13px; cursor: pointer; white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: #c381ff; }
.nav-link.active::after { content: ""; height: 2px; background: #8d58ff; left: 0; right: 0; bottom: 0; position: absolute; box-shadow: 0 0 10px #7b44ff; }

.search { height: 38px; border: 1px solid #2c3749; border-radius: 9px; display: flex; align-items: center; gap: 10px; background: #111925; padding: 0 12px; min-width: 190px; }
.search svg, .topbar svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.search svg { color: #7f90a9; }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; color: #dce4f0; background: transparent; font-size: 13px; }
.search input::placeholder { color: #748198; }

.mini-profile { border: 0; background: transparent; display: flex; align-items: center; gap: 10px; padding: 0 12px; cursor: pointer; border-right: 1px solid #273143; }
.mini-profile strong, .mini-profile small { display: block; text-align: left; }
.mini-profile strong { font-size: 12px; }.mini-profile small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.avatar { width: 39px; height: 39px; border-radius: 50%; border: 2px solid #e8ad44; overflow: hidden; display: block; flex: 0 0 auto; }
.balance { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; background: #131c29; border: 1px solid #2a3547; border-radius: 9px; white-space: nowrap; }
.coin, .price i { width: 18px; height: 18px; border-radius: 50%; background: #e6a51b; color: #fff2a8; display: inline-grid; place-items: center; font-style: normal; box-shadow: inset 0 0 0 2px #ffc83c; }
.balance strong { font-size: 14px; }.balance button { border: 0; background: #2a3547; color: #cbd5e4; width: 23px; height: 23px; border-radius: 50%; cursor: pointer; }

.primary, .secondary { border-radius: 8px; font-weight: 700; cursor: pointer; border: 1px solid transparent; transition: transform .18s ease, filter .18s ease, box-shadow .18s ease; }
.primary { color: white; background: linear-gradient(100deg, #9138ed, #743dff 60%, #315ff0); box-shadow: 0 7px 22px rgba(118, 60, 255, .25); }
.secondary { color: #eef2f8; border-color: #35445a; background: linear-gradient(180deg, #1b2636, #121a27); }
.primary:hover, .secondary:hover { transform: translateY(-1px); filter: brightness(1.1); }
.primary:active, .secondary:active { transform: translateY(0); }

main { width: min(1489px, calc(100% - 40px)); margin: 0 auto; }

.view { display: none; min-height: 700px; }.view.active { display: block; animation: viewIn .25s ease; }
@keyframes viewIn { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: none; } }
body:not([data-view="wall"]) main { padding-top: 34px; }

.wall-card { grid-area: wall; }
.wall-viewport { aspect-ratio: 1035 / 675; border: 1px solid #2b3c54; border-radius: 9px; overflow: hidden; position: relative; background: #0c1420; box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.wall-viewport::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 55% 35%, rgba(71, 104, 170, .12), transparent 42%), linear-gradient(rgba(255,255,255,.018), rgba(255,255,255,0)); z-index: 1; }

.wall-topline { position: absolute; z-index: 7; top: 15px; left: 75px; right: 16px; height: 42px; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; color: #bac6d8; background: rgba(12,19,30,.82); border: 1px solid #334158; border-radius: 6px; padding: 7px 9px; font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #40e6a0; box-shadow: 0 0 10px #40e6a0; }
.wall-controls { position: absolute; z-index: 8; top: 14px; left: 12px; width: 43px; overflow: hidden; border: 1px solid #354055; border-radius: 9px; background: rgba(10, 15, 24, .92); box-shadow: 0 6px 20px rgba(0,0,0,.38); }
.wall-controls button { display: grid; place-items: center; width: 100%; height: 38px; border: 0; border-bottom: 1px solid #313d50; background: transparent; cursor: pointer; font-size: 27px; }
.wall-controls button:last-child { margin-top: 8px; border: 0; border-top: 1px solid #313d50; }.wall-controls button:hover { background: #253147; }
.wall-controls svg { width: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sidebar { grid-area: side; display: flex; flex-direction: column; gap: 14px; }
.panel, .collection-card, .case-card { background: linear-gradient(135deg, rgba(18, 27, 39, .98), rgba(13, 21, 31, .98)); border: 1px solid #253144; border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.13); }
.panel { padding: 16px 15px; }.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }.panel-heading h2 { font-size: 16px; margin: 0; letter-spacing: -.02em; }.panel-heading button { border: 0; background: transparent; color: #b66bff; font-size: 11px; cursor: pointer; }
.case-feature { display: grid; grid-template-columns: 48% 1fr; align-items: center; gap: 10px; min-height: 160px; overflow: hidden; }
.case-render { height: 160px; position: relative; overflow: hidden; border-radius: 8px; background: radial-gradient(circle, rgba(128,54,245,.22), transparent 68%); }
.case-render img { position: absolute; width: 1640px; max-width: none; left: -1162px; top: -253px; filter: saturate(1.12) contrast(1.04); }
.case-copy { min-width: 0; }.case-copy h3 { margin: 0 0 8px; font-size: 14px; }.case-copy p { margin: 0 0 16px; color: #9eacc0; font-size: 12px; line-height: 1.45; }.case-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }.case-actions .primary { padding: 11px 13px; font-size: 12px; white-space: nowrap; }
.price { height: 41px; padding: 0 12px; border: 1px solid #344157; background: #192332; border-radius: 7px; display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 13px; white-space: nowrap; }.price i { width: 17px; height: 17px; font-size: 11px; }
.subheading { font-size: 13px; margin: 3px 0 11px; }.odds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.odds article { min-width: 0; text-align: center; }
.rarity { display: block; margin: -18px auto 7px; position: relative; width: fit-content; border: 1px solid; padding: 2px 7px; border-radius: 5px; font-size: 9px; background: #172131; }.common { color: #dce5f1; border-color: #718097; }.rare { color: #68bfff; border-color: #3b8ee6; }.epic { color: #e16aff; border-color: #a13ed1; }.legendary { color: #ffd33e; border-color: #d39b16; }.mythic { color: #ff5bb5; border-color: #c42a7e; }
.odds strong, .odds small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.odds strong { font-size: 10px; font-weight: 500; }.odds small { color: #8898ad; font-size: 10px; margin-top: 6px; }

.favorite-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }.favorite-card { padding: 4px; border: 1px solid #344158; border-radius: 7px; background: #101824; overflow: hidden; }.favorite-art { height: 84px; display: grid; place-items: center; border-radius: 5px; background: radial-gradient(circle, #293c56, #0b131d 72%); }.favorite-art img { width: 90%; height: 90%; object-fit: contain; }.favorite-card h3 { margin: 7px 2px 3px; font-size: 11px; }.favorite-card p { margin: 0 2px 7px; color: #8e9cb0; font-size: 10px; }.favorite-card > div:last-child { padding: 0 2px 3px; display: flex; justify-content: space-between; color: #8492a7; font-size: 9px; }

.activity-panel { padding-bottom: 12px; }

.page-heading { min-height: 126px; display: flex; justify-content: space-between; align-items: center; gap: 30px; }.eyebrow { color: #ad6eff; font-size: 10px; font-weight: 800; letter-spacing: .16em; }.page-heading h1 { margin: 6px 0 7px; font-size: 36px; letter-spacing: -.04em; }.page-heading p { margin: 0; color: #94a4b8; font-size: 13px; }.collection-actions { display: flex; align-items: center; gap: 18px; color: #94a4b8; font-size: 13px; }.collection-actions b { color: white; }.collection-actions .primary { padding: 13px 18px; }
.collection-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; padding-bottom: 34px; }.collection-card { padding: 8px; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; position: relative; overflow: hidden; }.collection-card:hover { transform: translateY(-3px); border-color: #685099; }.collection-art { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; background: radial-gradient(circle, #26374f, #0d1521 74%); border: 1px solid #2a3c56; }.collection-art img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(0,0,0,.5)); }.collection-card h3 { margin: 10px 3px 4px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.collection-card p { margin: 0 3px 7px; color: #8494a9; font-size: 10px; }.collection-card footer { width: auto; min-height: 0; margin: 0 3px 2px; display: flex; justify-content: space-between; gap: 5px; font-size: 9px; color: #8d9aae; }.collection-card .rarity { position: absolute; top: 15px; left: 14px; margin: 0; z-index: 2; backdrop-filter: blur(6px); }.copy-count { position: absolute; top: 15px; right: 14px; padding: 3px 6px; border-radius: 5px; background: rgba(8,13,21,.76); border: 1px solid #38475c; font-size: 9px; }

.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding-bottom: 38px; }.case-card { min-height: 330px; padding: 18px; position: relative; overflow: hidden; }.case-card::before { content: ""; position: absolute; width: 240px; height: 240px; top: -100px; right: -80px; border-radius: 50%; background: var(--case-glow); filter: blur(55px); opacity: .35; }.case-card h2 { position: relative; margin: 3px 0 5px; font-size: 20px; }.case-card > p { position: relative; margin: 0; color: #92a2b7; font-size: 11px; }.case-card .case-render { width: 230px; height: 165px; margin: 5px auto 3px; }.case-card .case-render img { filter: var(--case-filter) saturate(1.15); }.case-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.case-card-bottom .primary { padding: 12px 15px; }.drop-miniatures { display: flex; margin-top: 9px; }.drop-miniatures img { width: 27px; height: 27px; object-fit: contain; background: #172131; border: 1px solid #36435a; border-radius: 50%; margin-left: -5px; }.drop-miniatures img:first-child { margin-left: 0; }

.case-dialog { width: min(900px, calc(100% - 32px)); border: 1px solid #43516a; border-radius: 16px; padding: 0 0 24px; color: white; background: linear-gradient(145deg, #151f2f, #0b121d); box-shadow: 0 30px 100px #000; overflow: hidden; }.case-dialog::backdrop { background: rgba(3, 7, 13, .86); backdrop-filter: blur(8px); }.dialog-head { padding: 22px 24px 17px; display: flex; align-items: flex-start; justify-content: space-between; }.dialog-head h2 { margin: 5px 0 0; font-size: 24px; }.dialog-close { border: 0; background: transparent; color: #aab7c8; font-size: 28px; cursor: pointer; }.roulette-shell { height: 194px; position: relative; overflow: hidden; border-block: 1px solid #344157; background: radial-gradient(circle at center, rgba(123,66,216,.16), transparent 32%), #080e17; box-shadow: inset 0 0 34px #000; }.roulette-shell::before, .roulette-shell::after { content: ""; position: absolute; top: 0; bottom: 0; width: 150px; z-index: 3; pointer-events: none; }.roulette-shell::before { left: 0; background: linear-gradient(90deg, #080e17, transparent); }.roulette-shell::after { right: 0; background: linear-gradient(-90deg, #080e17, transparent); }.roulette-marker { position: absolute; z-index: 5; left: 50%; top: 0; bottom: 0; width: 2px; background: #b66cff; box-shadow: 0 0 12px #b66cff; }.roulette-marker::before, .roulette-marker::after { content: ""; position: absolute; left: -7px; border-left: 8px solid transparent; border-right: 8px solid transparent; }.roulette-marker::before { top: 0; border-top: 12px solid #c67aff; }.roulette-marker::after { bottom: 0; border-bottom: 12px solid #c67aff; }.reel-track { display: flex; align-items: center; gap: 10px; height: 100%; width: max-content; padding-left: calc(50% - 64px); transform: translateX(0); will-change: transform; }.reel-item { width: 128px; height: 148px; flex: 0 0 128px; padding: 7px; border: 1px solid #354258; border-bottom: 3px solid var(--rarity-color); border-radius: 9px; background: linear-gradient(160deg, #1a2535, #0d151f); display: flex; flex-direction: column; align-items: center; justify-content: space-between; }.reel-item img { width: 102px; height: 102px; object-fit: contain; filter: drop-shadow(0 7px 7px rgba(0,0,0,.5)); }.reel-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: #c7d1df; }.case-result { min-height: 50px; padding: 14px 24px 0; text-align: center; }.case-result p { margin: 0; color: #99a8bb; font-size: 12px; }.case-result strong { color: white; font-size: 16px; }.dialog-action { display: block; min-width: 190px; margin: 8px auto 0; padding: 13px 24px; }.dialog-action:disabled { opacity: .55; cursor: wait; }

.toast { position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #1d2736; border: 1px solid #3a4860; border-radius: 10px; padding: 12px 17px; box-shadow: 0 15px 45px rgba(0,0,0,.45); color: #eaf0f8; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s ease; }.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1260px) {
  .topbar { grid-template-columns: auto 1fr minmax(170px, .8fr) auto auto; padding: 0 18px; }.mini-profile, .balance { display: none; }.nav { gap: 18px; }
  .collection-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
  .topbar { grid-template-columns: auto 1fr auto; }.nav { display: none; }.search { margin-left: auto; max-width: 320px; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }.activity-panel { grid-column: 1 / -1; }
  .case-feature { grid-template-columns: minmax(210px, 38%) 1fr; }.case-render { min-width: 0; }
  .collection-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }.cases-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar { height: 58px; padding: 0 12px; gap: 8px; }.brand-name { font-size: 17px; }.brand-mark { width: 34px; height: 34px; font-size: 25px; }.top-mark img { left: -4px; top: -3px; }.beta { display: none; }.search { height: 36px; }
  main { width: min(100% - 20px, 1490px); }
  .wall-viewport { aspect-ratio: 1 / 1.08; }.wall-topline { left: 66px; }.sidebar { display: flex; }.panel { padding: 14px 12px; }.case-feature { grid-template-columns: 44% 1fr; min-height: 150px; }.case-render { height: 145px; }.odds { overflow-x: auto; grid-template-columns: repeat(5, 82px); padding-bottom: 6px; }
  .page-heading { min-height: 150px; align-items: flex-start; padding-top: 10px; flex-direction: column; justify-content: center; gap: 16px; }.page-heading h1 { font-size: 30px; }.collection-actions { width: 100%; justify-content: space-between; }.collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }.cases-grid { grid-template-columns: 1fr; }.case-card { min-height: 315px; }.favorite-grid { gap: 5px; }
  .case-dialog { width: calc(100% - 18px); }.roulette-shell { height: 176px; }.reel-item { width: 112px; height: 134px; flex-basis: 112px; }.reel-item img { width: 90px; height: 90px; }.reel-track { padding-left: calc(50% - 56px); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
/* game.css */
[hidden]{display:none!important}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:3px solid #b78aff;outline-offset:3px}button:disabled{opacity:.45;cursor:not-allowed}.topbar{grid-template-columns:auto 1fr auto;height:72px}.nav{display:flex!important;gap:30px}.nav-link{font-size:14px}.balance{display:flex!important;gap:10px;height:42px}.balance small{font-size:11px;color:#91a1b6}.view{min-height:75vh}main{width:min(1680px,calc(100% - 40px))}.eyebrow{font-size:11px;letter-spacing:.13em}.play-layout{display:grid;grid-template-columns:minmax(0,1fr) 345px;gap:20px;align-items:start}.wall-card{min-width:0;overflow:hidden}.wall-viewport{aspect-ratio:auto;height:min(69vh,780px);min-height:480px;background:#fff!important;position:relative;overflow:hidden;border-radius:12px;border:1px solid #d9e0e9;isolation:isolate}.wall-viewport:fullscreen{width:100vw;height:100vh;max-height:none}.wall-viewport::before,.wall-viewport::after{display:none}#wallCanvas{width:100%;height:100%;display:block;touch-action:none;cursor:grab}#wallCanvas.armed{cursor:crosshair}#wallCanvas.panning{cursor:grabbing}.wall-topline{top:14px;height:auto;left:70px;right:15px;gap:12px}.live-pill{background:#f4f0ff;color:#7544ca;border-color:#dfd2fa;font-size:11px;box-shadow:0 4px 16px #192a4d0b}.wall-controls{background:#fff;border:1px solid #dbe1e9;box-shadow:0 5px 20px #101c321a;top:14px;width:40px}.wall-controls button{color:#344055;border-color:#edf0f5;font-size:24px;height:38px}.wall-controls button:hover{background:#f1ebfc}.wall-controls button:last-child{margin:0;border-color:#edf0f5}.minimap-wrap{position:absolute;right:12px;bottom:12px;border:1px solid #dce2eb;background:#fff;padding:5px;border-radius:8px;box-shadow:0 4px 20px #1e2e4912}.minimap-wrap canvas{width:132px;height:98px;display:block;cursor:crosshair}.minimap-wrap span{display:block;font-size:10px;color:#7c889a;text-align:center;padding:2px}.placement-tools{position:absolute;left:50%;bottom:65px;transform:translateX(-50%);display:flex;align-items:center;gap:12px;background:#131a2cec;backdrop-filter:blur(12px);color:#fff;padding:9px 12px;border:1px solid #9061d8;border-radius:12px;max-width:85%;box-shadow:0 10px 30px #17132425}.placement-tools img{width:44px;height:44px;object-fit:contain}.placement-tools strong,.placement-tools small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:210px}.placement-tools strong{font-size:13px}.placement-tools small{font-size:11px;color:#bcabd8;margin-top:4px}.placement-tools button{background:#ffffff10;border:0;border-radius:6px;width:31px;height:33px;font-size:21px;cursor:pointer}.target-info{position:absolute;right:14px;top:64px;width:218px;border-radius:10px;background:#fffefef5;border:1px solid #dce2eb;padding:14px;box-shadow:0 7px 30px #273a5014;color:#222e42;font-size:12px;pointer-events:none}.target-info strong{display:block;font-size:14px;margin-bottom:6px}.target-info p{margin:5px 0;color:#718096;line-height:1.4}.hp-track{background:#e7ecf1;height:5px;border-radius:3px;overflow:hidden;margin:9px 0}.hp-track i{display:block;height:100%;background:var(--rarity-color,#9250e8)}.text-button{background:transparent;color:#b97aff;border:0;padding:0;cursor:pointer;font-size:12px;white-space:nowrap}.sidebar{gap:15px}.panel{padding:19px;border-radius:12px}.panel h2{font-size:16px}.featured-case h3{font-size:20px;letter-spacing:-.02em;margin:10px 0}.featured-case>p{font-size:12px;color:#97a7bb;line-height:1.6;margin:7px 0}.featured-case .primary{width:100%;padding:13px;font-size:14px;margin:12px 0 7px}.featured-case .text-button{width:100%;padding-top:8px}.event-log{padding:0;list-style:none;display:grid;gap:13px;font-size:12px;line-height:1.5;color:#9aaabe}.event-log li{border-left:2px solid #8f58d2;padding-left:10px}.page-heading p{font-size:14px;line-height:1.5}.page-heading{padding:26px 0}.page-heading .primary{padding:14px 20px}.catalog-filters{display:flex;gap:10px;margin:8px 0 24px;align-items:center;flex-wrap:wrap}.catalog-filters input,.catalog-filters select{border:1px solid #334156;background:#111a29;color:#c9d5e6;padding:12px 15px;border-radius:8px;font-size:14px;min-width:150px;max-width:100%}.catalog-filters input{flex:1;min-width:200px}.catalog-filters span{font-size:13px;color:#94a5bd}.collection-grid{grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:15px}.collection-card{padding:9px;text-align:left;display:flex;flex-direction:column}.collection-card .collection-art{background:radial-gradient(ellipse at 50% 65%,var(--card-glow,#353344),#121a28 78%);position:relative}.collection-card h3{font-size:14px;margin:11px 2px 5px}.collection-card p{font-size:11px;line-height:1.5;margin:0 2px 8px}.collection-card .rarity{font-size:10px}.collection-art img{filter:drop-shadow(0 8px 9px #0004)}.sticker-stats{display:flex;gap:10px;padding:8px 2px;color:#c0c9d7;font-size:11px;border-top:1px solid #2a3546;flex-wrap:wrap}.card-action{margin-top:auto;border:1px solid #574273;background:#352143;color:#ddc9ff;border-radius:6px;padding:9px;text-align:center;font-size:12px;cursor:pointer;width:100%}.catalog-card{cursor:default}.catalog-card:hover{transform:none}.source-link{display:block;margin-top:8px;font-size:10px;color:#8d9db3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pagination{display:flex;gap:15px;justify-content:center;align-items:center;padding:5px 0 32px;font-size:13px;color:#95a8c0}.pagination button{border:1px solid #37465d;background:#192435;padding:10px 16px;border-radius:7px;cursor:pointer}.empty-state{grid-column:1/-1;padding:50px;text-align:center;color:#97a7bd;border:1px dashed #334159;border-radius:12px}.cases-grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr)));gap:18px}.case-card{display:flex;flex-direction:column;min-height:380px;border-radius:12px;padding:20px}.case-card .eyebrow{color:var(--case-glow)}.case-card h2{margin:8px 0 6px;font-size:21px}.case-card>p{font-size:12px;color:#9ba9bf}.case-card .case-art{height:145px;display:flex;align-items:center;justify-content:center;margin:15px 0}.case-art img{max-width:90%;height:135px;object-fit:contain;filter:drop-shadow(0 7px 24px var(--case-glow))}.case-card .drop-miniatures{gap:6px;margin-bottom:18px}.drop-miniatures img{width:33px;height:33px;margin:0;border-radius:6px;border-color:#475065}.case-card-bottom{margin-top:auto}.case-card-bottom .price{background:none;border:0;padding:0;font-size:21px}.case-card>.text-button{margin-top:15px;text-align:left;font-size:12px}.case-tier{font-size:11px;color:#a89ab8;margin-top:10px}.source-note{color:#72839a;font-size:12px;line-height:1.6}.source-note a{color:#b88aef}.rules-dialog{max-width:720px;width:calc(100% - 28px);background:#111a29;color:#d8e1ef;border:1px solid #43516a;border-radius:15px;padding:0}.rules-dialog::backdrop{background:#030712dd;backdrop-filter:blur(6px)}.rules-dialog h2{font-size:22px}.rules-content{padding:0 24px 24px;font-size:14px;line-height:1.7;color:#aebbd0}.rules-content p{margin:0 0 17px}.table-scroll{overflow-x:auto;margin-bottom:20px}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}th,td{padding:10px;border-bottom:1px solid #2b384d;font-size:13px}th{font-size:11px;color:#7f94af}.case-dialog{width:min(990px,calc(100% - 24px));border-color:#664189;box-shadow:0 0 100px #7a40d122,0 40px 100px #0008;--drop-color:#b56dff;max-height:95vh;overflow-y:auto}.dialog-head p{font-size:12px;color:#95a4b9;margin:7px 0 0}.case-stage{height:180px;display:grid;place-items:center;position:relative;overflow:hidden;transition:height .45s,opacity .45s}.case-stage .case-render{width:225px;height:163px;z-index:1;animation:chestFloat 3s ease-in-out infinite}.stage-halo{position:absolute;width:300px;height:170px;border-radius:50%;background:radial-gradient(ellipse,#923cf755,transparent 65%);filter:blur(14px)}.stage-sparks{position:absolute;inset:0;background:radial-gradient(circle at 20% 45%,#c6a0ff 0 1px,transparent 2px),radial-gradient(circle at 70% 26%,#d4a1ff 0 2px,transparent 3px),radial-gradient(circle at 62% 78%,#9d60ff 0 1px,transparent 2px);animation:sparksFloat 3s ease-in-out infinite}.case-dialog.spinning .case-stage{opacity:1}.case-dialog.spinning .case-stage .case-render{animation:chestCharge .18s linear infinite}.case-dialog.won .case-stage{height:0;opacity:0}.roulette-shell{height:230px;background:radial-gradient(ellipse at center,#522b7144,transparent 65%),#090e19;border-block:1px solid #473158}.roulette-marker{background:#f0bcff;box-shadow:0 0 14px #c573ff;width:2px}.roulette-marker::before{border-top-color:#edbeff}.roulette-marker::after{border-bottom-color:#edbeff}.reel-track{gap:12px;padding:0 0 0 30px}.reel-item{width:154px;flex-basis:154px;height:185px;border-radius:10px;background:radial-gradient(ellipse at 50% 75%,color-mix(in srgb,var(--rarity-color) 17%,#111b2c),#121b2a);padding:12px;transition:filter .3s,opacity .3s;box-shadow:inset 0 -12px 24px #0002}.reel-item img{width:120px;height:125px;object-fit:contain}.reel-item span{font-size:12px}.reel-item small{font-size:10px;color:var(--rarity-color)}.case-dialog.spinning .reel-item{filter:blur(.3px)}.case-dialog.won .reel-item{opacity:.4}.case-dialog.won .reel-item.winning{opacity:1;box-shadow:0 0 30px color-mix(in srgb,var(--rarity-color) 30%,transparent);border-color:var(--rarity-color);transform:scale(1.04)}.case-dialog.won .roulette-marker{background:var(--drop-color);box-shadow:0 0 25px var(--drop-color)}.winner-reveal{display:flex;align-items:center;justify-content:center;gap:22px;padding:18px 25px 8px;animation:rewardIn .6s cubic-bezier(.2,.9,.2,1)}.winner-reveal img{width:105px;height:105px;object-fit:contain;filter:drop-shadow(0 0 24px var(--drop-color))}.winner-reveal strong{display:block;font-size:26px;letter-spacing:-.02em;margin:4px 0 7px}.winner-reveal small{font-size:12px;color:#a7b4c6}.winner-reveal .eyebrow{color:var(--drop-color)}.case-result{font-size:13px;color:#abb9cc;padding:15px 20px 6px;min-height:37px}.dialog-actions{display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap;padding:4px 22px 12px}.dialog-actions .dialog-action{margin:0;min-width:190px}.dialog-actions>.secondary{padding:13px 17px;font-size:12px}.sound-toggle{background:none;border:0;color:#899bb3;font-size:11px;cursor:pointer}.toast{font-size:14px;max-width:90vw;line-height:1.5}.loading{opacity:.5;pointer-events:none}@keyframes chestFloat{50%{transform:translateY(-5px)}}@keyframes chestCharge{50%{transform:translateX(2px) rotate(1deg)}}@keyframes sparksFloat{50%{transform:translateY(-8px);opacity:.4}}@keyframes rewardIn{from{opacity:0;transform:translateY(18px) scale(.92)}to{opacity:1;transform:none}}
@media(min-width:1700px){.play-layout{grid-template-columns:minmax(0,1fr) 385px}}
@media(max-width:1150px){.topbar{padding:0 20px;gap:20px}.nav{gap:20px}.balance small{display:none}.play-layout{grid-template-columns:minmax(0,1fr) 305px}}
@media(max-width:900px){.topbar{grid-template-columns:1fr auto;height:auto;min-height:70px;padding-top:10px}.topbar .nav{grid-column:1/-1;grid-row:2;height:42px;justify-content:flex-start;overflow:auto;gap:25px}.brand-name{font-size:20px}.play-layout{grid-template-columns:1fr}.sidebar{display:grid;grid-template-columns:1fr 1fr}.sidebar>.panel:last-child{grid-column:1/-1}.wall-viewport{height:63vh;min-height:420px}.cases-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.target-info{width:180px}.collection-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:600px){main{width:calc(100% - 20px)}.topbar{padding:10px 12px 0;gap:8px}.nav-link{font-size:13px}.topbar .nav{gap:23px}.brand-name{font-size:19px}.balance{padding:7px 10px;height:35px}.balance strong{font-size:12px}.wall-viewport{min-height:450px;height:62vh}.minimap-wrap canvas{width:96px;height:72px}.placement-tools{bottom:115px;max-width:95%;gap:8px}.placement-tools strong,.placement-tools small{max-width:150px}.placement-tools strong{font-size:12px}.placement-tools small{font-size:10px}.target-info{top:60px;right:10px;width:170px;font-size:11px}.target-info strong{font-size:12px}.sidebar{display:flex}.cases-grid{grid-template-columns:1fr}.collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.page-heading{gap:14px;min-height:auto;padding:25px 0}.page-heading p{font-size:13px}.page-heading h1{font-size:27px}.catalog-filters{gap:8px}.catalog-filters input{flex-basis:100%}.catalog-filters select{min-width:0;flex:1;width:45%;font-size:12px;padding:11px}.collection-actions{font-size:12px}.collection-actions .primary{font-size:12px;padding:12px}.case-dialog .dialog-head{padding:17px}.case-dialog h2{font-size:20px}.case-stage{height:180px}.case-stage .case-render{transform:scale(.8)}.roulette-shell{height:190px}.reel-item{width:130px;flex-basis:130px;height:157px}.reel-item img{width:100px;height:105px}.reel-item span{font-size:11px}.reel-item small{font-size:9px}.dialog-actions{padding:6px 12px 14px}.dialog-actions .primary{font-size:12px;min-width:150px;padding:13px}.dialog-actions>.secondary{font-size:11px;padding:12px}.winner-reveal strong{font-size:20px;max-width:210px;overflow-wrap:anywhere}.winner-reveal img{width:75px;height:75px}.rules-content{padding:0 17px 17px;font-size:13px}.rules-dialog h2{font-size:18px}}
.play-layout>.wall-card,.play-layout>.sidebar{grid-area:auto}.cases-grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
@media(max-width:600px){.cases-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.case-stage *{animation:none!important}.winner-reveal{animation:none!important}}
/* home.css */
/* The home dashboard keeps the original reference composition around the white wall. */
.topbar{height:62px;grid-template-columns:auto minmax(360px,1fr) minmax(160px,210px) 32px auto auto auto;gap:14px}
.topbar .nav{display:flex!important;gap:24px;justify-content:flex-start}
.topbar .search{display:flex;min-width:0;margin:0}
.topbar .mini-profile,.topbar .balance{display:flex!important}
.topbar .mini-profile{padding:0 12px 0 4px}
.mini-profile .avatar img{position:static;width:100%;height:100%;object-fit:cover;max-width:100%}
.topbar .brand-name{font-size:21px}
.topbar .balance{height:38px}
main{width:min(1489px,calc(100% - 40px))}
.play-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(390px,430px);gap:16px;align-items:start}
.play-layout>.wall-card,.play-layout>.sidebar{grid-area:auto}
.wall-viewport{height:min(63vh,675px);min-height:520px;border-radius:9px}
.wall-card{overflow:visible}
.wall-topline{right:12px}
.sidebar{display:flex;flex-direction:column;gap:14px}
.sidebar .panel{padding:16px 15px}
.featured-case{min-height:396px}
.featured-case .panel-heading{margin-bottom:11px}
.featured-case .panel-heading h2{font-size:16px}
.case-feature{display:grid;grid-template-columns:49% 1fr;gap:8px;align-items:center;min-height:166px}
.featured-case .case-render{height:162px;min-width:0;margin:0;position:relative;overflow:hidden;background:radial-gradient(circle,#7148b229,transparent 65%)}
.featured-case .case-render img{position:absolute;width:1640px;max-width:none;left:-1162px;top:-253px;filter:saturate(1.12) contrast(1.04)}
.featured-case .case-copy{min-width:0}
.featured-case .case-copy h3{margin:0 0 6px;font-size:15px}
.featured-case .case-copy p{margin:0 0 12px;color:#9eacc0;font-size:11px;line-height:1.45}
.featured-case .case-actions{display:flex;align-items:center;gap:7px;flex-wrap:nowrap}
.featured-case .case-actions .price{flex:0 0 auto;font-size:12px;white-space:nowrap}
.featured-case .case-actions .primary{width:auto;margin:0;padding:10px 8px;font-size:11px;white-space:nowrap}
.featured-case .subheading{font-size:13px;margin:14px 0 10px}
.odds{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.odds article{min-width:0;text-align:center}
.odds-art{position:relative;height:92px;display:grid;place-items:center;border:1px solid #34425a;border-radius:7px;background:radial-gradient(circle at 50% 55%,color-mix(in srgb,var(--rarity-color) 24%,transparent),#111925 72%);overflow:hidden}
.odds-art img{width:100%;height:76px;object-fit:contain}
.odds-art span{position:absolute;bottom:2px;left:3px;right:3px;border:1px solid var(--rarity-color);color:var(--rarity-color);background:#101722df;border-radius:4px;font-size:8px;line-height:1.2;padding:2px 0}
.odds article strong{font-size:10px;margin-top:6px}
.odds article small{font-size:9px;margin-top:2px}
.favorites-panel{min-height:221px}
.favorite-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.favorite-card{min-width:0;width:100%;text-align:left;cursor:pointer;font:inherit;color:inherit;padding:4px;border-color:#364157}
.favorite-card:hover{border-color:var(--rarity-color);transform:translateY(-1px)}
.favorite-art{height:92px;background:radial-gradient(circle,var(--rarity-glow),#0b131d 75%)}
.favorite-art img{width:90%;height:90%;object-fit:contain}
.favorite-card h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
.favorite-card p{font-size:9px}
.favorite-card .favorite-meta{display:flex;justify-content:space-between;padding:0 2px 3px;color:#9aaabc;font-size:9px}
.favorite-card .favorite-meta b{color:var(--rarity-color)}
.empty-favorites{grid-column:1/-1;display:grid;place-items:center;min-height:150px;text-align:center;color:#93a2b8;font-size:12px;line-height:1.5;padding:20px}
.activity-panel{min-height:132px;padding:12px 15px!important}
.activity-panel .panel-heading{margin-bottom:8px}
.activity-panel .panel-heading h2{font-size:13px}
.event-log{gap:5px;font-size:10px}
.event-log li{padding-left:7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:1350px){.topbar{grid-template-columns:auto minmax(300px,1fr) minmax(140px,190px) auto;gap:10px}}
@media(max-width:1080px){.topbar .search{display:none}.topbar{grid-template-columns:auto 1fr auto}.play-layout{grid-template-columns:minmax(0,1fr) minmax(310px,36%)}.sidebar .panel{padding:13px}.featured-case .case-feature{grid-template-columns:1fr 1fr}.featured-case .case-render{height:130px}.featured-case .case-copy p{font-size:10px}.featured-case .case-actions{flex-wrap:wrap}.odds-art{height:75px}.odds-art img{height:59px}}
@media(max-width:900px){.topbar{grid-template-columns:1fr auto;height:auto;min-height:70px;padding:10px 16px 0}.topbar .nav{grid-column:1/-1;grid-row:2;height:42px;overflow-x:auto;gap:23px}.topbar .balance{grid-column:2;grid-row:1}.play-layout{grid-template-columns:1fr}.sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.featured-case{min-height:370px}.favorites-panel{min-height:370px}}
@media(max-width:650px){main{width:calc(100% - 20px)}.topbar{padding:8px 10px 0}.topbar .nav{gap:20px}.nav-link{font-size:12px}.wall-viewport{height:60vh;min-height:430px}.sidebar{display:flex}.featured-case{min-height:0}.featured-case .case-feature{grid-template-columns:47% 1fr}.featured-case .case-render{height:150px}.odds-art{height:86px}.odds-art img{height:68px}.favorites-panel{min-height:0}.activity-panel{min-height:100px}}

/* The wall is one screen on desktop; only the sticker picker scrolls. */
.topbar{grid-template-columns:auto minmax(360px,1fr) minmax(160px,210px) auto auto}
main{width:calc(100% - 24px)}
.view{min-height:0}
.play-layout{grid-template-columns:minmax(0,1fr) minmax(350px,384px);gap:12px}
.wall-viewport{height:calc(100dvh - 190px);min-height:520px}
.sidebar{height:calc(100dvh - 190px);min-height:520px;overflow:hidden}
.featured-case{flex:0 0 min(390px,calc(100% - 165px));min-height:0;overflow-y:auto;scrollbar-width:thin}
.featured-case .panel-heading{margin-bottom:5px}
.featured-case .case-feature{min-height:145px}
.featured-case .case-render{height:145px}
.featured-case .subheading{margin:8px 0 7px}
.featured-case .odds-art{height:76px}
.featured-case .odds-art img{height:61px}
.featured-case .odds article strong{margin-top:3px}
.favorites-panel{display:flex;flex-direction:column;min-height:0;flex:1;overflow:hidden}
.favorites-panel .panel-heading{flex:0 0 auto}
.favorite-grid{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;align-content:start;padding:2px 5px 5px 0;scrollbar-color:#7951aa #172131;scrollbar-width:thin}
.favorite-grid:has(.empty-favorites){overflow:hidden}
.empty-favorites{min-height:0;height:100%}
.favorite-card.active{outline:2px solid #b879ff;border-color:#b879ff}
.favorite-card img{display:block}
.activity-panel{min-height:100px;max-height:100px}
.case-dialog{overflow-x:hidden}
.reel-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.winner-reveal{min-width:0;max-width:100%}
.winner-reveal>div{min-width:0;max-width:min(100%,500px)}
.winner-reveal strong{font-size:clamp(18px,2.5vw,26px);max-width:100%;overflow-wrap:anywhere;word-break:break-word;max-height:3.2em;overflow:hidden}
.report-button{display:block;margin-top:8px;padding:4px 0;border:0;background:none;color:#8593aa;font-size:10px;text-align:left;cursor:pointer}
.report-button:hover{color:#d5a8ff}
.report-dialog{max-width:480px}
.report-dialog .rules-content label{display:block;margin:4px 0 6px;color:#d8e1ef}
.report-dialog select{width:100%;padding:12px;border:1px solid #40506a;border-radius:8px;background:#182337;color:#edf3fb}
.report-dialog .primary{margin-top:2px;padding:11px 18px}
@media(min-width:1000px) and (min-height:720px){body[data-view="wall"]{height:auto;overflow-y:auto}}
@media(max-width:1350px){.topbar{grid-template-columns:auto minmax(300px,1fr) minmax(140px,190px) auto}}
@media(max-width:1080px){.topbar{grid-template-columns:auto 1fr auto}.play-layout{grid-template-columns:minmax(0,1fr) minmax(310px,36%)}}
@media(max-width:900px){.topbar{grid-template-columns:1fr auto}.play-layout{grid-template-columns:1fr}.wall-viewport{height:64vh;min-height:430px}.sidebar{height:auto;min-height:0;overflow:visible}.featured-case{flex:auto}.favorites-panel{height:310px}.activity-panel{min-height:100px;max-height:none}}
@media(max-width:650px){main{width:calc(100% - 20px)}.wall-viewport{height:60vh;min-height:430px}.sidebar{display:flex}.favorites-panel{height:340px}}

/* Restore the reference's case / finds / activity / profile composition. */
main{width:min(1680px,calc(100% - 40px))}
.play-layout{grid-template-columns:minmax(0,1fr) minmax(390px,430px);gap:16px}
.wall-viewport{height:clamp(510px,calc(100dvh - 385px),690px);min-height:0}
.sidebar{height:clamp(510px,calc(100dvh - 385px),690px);min-height:0;overflow:visible;gap:14px}
.featured-case{flex:0 0 390px;min-height:0;overflow:visible}
.featured-case .panel-heading{margin-bottom:11px}
.featured-case .case-feature{min-height:166px}
.featured-case .case-render{height:162px}
.featured-case .subheading{margin:14px 0 10px}
.featured-case .odds-art{height:92px}
.featured-case .odds-art img{height:76px}
.featured-case .odds article strong{margin-top:6px}
.featured-case .odds:has(article:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr))}
.favorites-panel{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.favorite-grid{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;align-content:start;grid-template-columns:repeat(3,minmax(0,1fr))}
.favorite-card{padding:6px}
.favorite-art{height:clamp(100px,11vh,142px)}
.favorite-card h3{font-size:12px;margin:7px 3px 4px}
.favorite-card p{font-size:10px;margin-bottom:5px}
.favorite-card .favorite-meta{font-size:9px}
.activity-panel{min-height:116px;max-height:none}
.activity-panel{padding:15px!important}
.activity-panel .panel-heading h2{font-size:14px}
.event-log{margin:0;gap:6px}
.event-log li{font-size:11px;white-space:normal;line-height:1.35}
@media(max-height:850px) and (min-width:901px){.featured-case{flex-basis:340px}.featured-case .case-feature{min-height:130px}.featured-case .case-render{height:128px}.featured-case .odds-art{height:72px}.featured-case .odds-art img{height:58px}.featured-case .subheading{margin:7px 0}}
@media(max-height:800px) and (min-width:901px){.wall-viewport,.sidebar{height:clamp(390px,calc(100dvh - 278px),510px)}.featured-case{flex-basis:300px}.featured-case .case-feature{min-height:111px}.featured-case .case-render{height:111px}.featured-case .odds-art{height:60px}.featured-case .odds-art img{height:47px}.featured-case .panel-heading{margin-bottom:4px}.featured-case .subheading{margin:5px 0}.favorite-card{padding:3px}.favorite-art{height:34px}.favorite-card h3{font-size:9px;margin:2px 1px 0}.favorite-card p,.favorite-card .favorite-meta{display:none}.activity-panel{min-height:98px}}
@media(max-width:1080px){.play-layout{grid-template-columns:minmax(0,1fr) minmax(310px,36%)}}
@media(max-width:900px){main{width:calc(100% - 24px)}.play-layout{grid-template-columns:1fr}.sidebar{height:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.featured-case{flex:auto}.favorites-panel{height:390px;min-height:0}.wall-viewport{height:64vh;min-height:430px}}
@media(max-width:650px){main{width:calc(100% - 20px)}.sidebar{display:flex}.favorites-panel{height:340px}.wall-viewport{height:60vh;min-height:430px}}

/* Keep decoration quiet; put the owned sticker picker directly under the wall. */
body{background:var(--bg)}
.brand-mark{filter:none}
.featured-case .case-render{background:none}
.mini-profile .avatar{border-color:#536078;box-shadow:none}
.wall-viewport{height:clamp(360px,calc(100dvh - 460px),690px)}
.sidebar{height:auto;min-height:0}
.sidebar .featured-case{flex:0 0 auto}
.sidebar .activity-panel{flex:0 0 auto;grid-column:auto}
.favorites-panel .panel-heading{margin-bottom:10px}
.favorite-grid{display:grid;flex:none;grid-template-columns:none;grid-template-rows:auto;grid-auto-flow:column;grid-auto-columns:clamp(104px,10vw,132px);gap:10px;overflow-x:auto;overflow-y:hidden;align-content:start;scroll-snap-type:x proximity;padding:3px 3px 8px;overscroll-behavior-x:contain}
.favorite-card{padding:6px;scroll-snap-align:start}
.favorite-art{height:72px;background:#0d1621;grid-template-rows:minmax(0,1fr);overflow:hidden}
.favorite-art img{width:100%;height:100%;min-width:0;min-height:0;object-fit:contain}
.favorite-card h3{font-size:11px;margin:6px 2px 4px}
.favorite-card p{display:block;font-size:10px;margin:0 2px 4px}
.favorite-card .favorite-meta{display:flex;font-size:9px}
.favorite-grid:has(.empty-favorites){grid-auto-flow:row;grid-template-columns:1fr;overflow:hidden}
.favorite-grid .empty-favorites{min-height:82px;height:auto;gap:8px}
@media(max-width:900px){.wall-viewport{height:60vh;min-height:390px}.sidebar{height:auto;min-height:0}.favorite-grid{grid-auto-columns:120px}}
@media(max-width:650px){.favorite-grid{grid-auto-columns:104px;gap:8px}}
/* theme.css */
/* Radix Colors: Slate surfaces / Indigo actions. Rarity colors remain semantic.
   https://www.radix-ui.com/colors/docs/palette-composition/understanding-the-scale */
:root {
  --bg: #111113;
  --surface: #18191b;
  --surface-2: #212225;
  --surface-hover: #272a2d;
  --line: #363a3f;
  --control-line: #43484e;
  --text: #edeef0;
  --muted: #b0b4ba;
  --accent: #3e63dd;
  --accent-hover: #5472e4;
  --accent-text: #9eb1ff;
  --accent-soft: #182449;
}

body { background: var(--bg); }
.topbar { background: var(--bg); border-color: var(--line); }
.nav-link { color: var(--muted); }
.nav-link:hover, .nav-link.active { color: var(--accent-text); }
.nav-link.active::after { background: var(--accent); box-shadow: none; }
.brand-mark { filter: none; }
.mini-profile, .balance, .search { border-color: var(--line); }
.mini-profile .avatar { border-color: var(--control-line); }
.search, .balance, .balance button, .price { background: var(--surface-2); }
.search input { color: var(--text); }
.primary { background: var(--accent); box-shadow: none; }
.primary:hover { background: var(--accent-hover); filter: none; }
.secondary { background: var(--surface-2); border-color: var(--control-line); box-shadow: none; }
.secondary:hover { background: var(--surface-hover); filter: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}
.panel, .collection-card, .case-card {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}
.panel-heading button, .text-button, .source-note a { color: var(--accent-text); }
.eyebrow { color: var(--accent-text); }
.event-log { color: var(--muted); }
.event-log li { border-color: var(--control-line); }
.favorite-card { background: var(--surface-2); border-color: var(--control-line); }
.favorite-art, .collection-card .collection-art { background: var(--surface); }
.favorite-card.active { border-color: var(--accent-text); outline-color: var(--accent-text); }
.favorite-card p, .favorite-card .favorite-meta, .empty-favorites { color: var(--muted); }
.favorite-grid { scrollbar-color: var(--control-line) var(--surface); }
.collection-card:hover { border-color: var(--control-line); }
.collection-art img, .case-art img, .winner-reveal img { filter: none; }
.card-action { background: var(--accent-soft); border-color: #304384; color: #d6e1ff; }
.catalog-filters input, .catalog-filters select, .report-dialog select {
  background: var(--surface-2); border-color: var(--control-line); color: var(--text);
}
.pagination button { background: var(--surface-2); border-color: var(--control-line); }
.source-link, .source-note, .report-button { color: var(--muted); }
.report-button:hover { color: var(--accent-text); }
.case-card::before, .stage-halo, .stage-sparks { display: none; }
.featured-case .case-render { background: none; }
.featured-case .case-copy p { color: var(--muted); }
.odds-art { background: var(--surface-2); border-color: var(--control-line); }
.case-dialog, .rules-dialog { background: var(--surface); border-color: var(--control-line); box-shadow: 0 24px 80px #0008; }
.case-wallet { display: flex; justify-content: center; gap: 7px; padding: 4px 20px 12px; color: var(--muted); font-size: 13px; }
.case-wallet strong { color: #ffcf61; font-variant-numeric: tabular-nums; }
.case-dialog.won #revealButton { background: var(--surface-2); border: 1px solid var(--control-line); }
.rules-content { color: var(--muted); }
.placement-tools { background: #18191bf5; border-color: var(--accent); box-shadow: 0 6px 20px #0002; }
.placement-tools small { color: #d6e1ff; }
.live-pill { background: #eaf7ef; border-color: #c8e8d2; color: #24683d; box-shadow: none; }

/* No extra dashboard row above the wall. The picker spans BOTH columns. */
#view-wall.active { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
.play-layout { align-items: stretch; min-width: 0; }
.sidebar { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) auto; height: 100%; min-height: 0; gap: 12px; }
.sidebar .featured-case { display: flex; flex-direction: column; min-height: 0; height: auto; }
.featured-case .case-feature { flex: 1; }
.sidebar .activity-panel { min-height: 86px; }
#view-wall>.favorites-panel { height: auto; min-height: 0; max-height: none; padding: 12px 16px; }
.favorites-panel .panel-heading { margin-bottom: 8px; }
.favorite-grid { grid-auto-columns: 120px; }

/* Self-contained case picker. Controls stay mounted when the slide changes. */
.case-carousel-heading { min-height: 22px; }
.case-carousel-status { display: flex; align-items: center; gap: 8px; }
.case-carousel-heading .case-carousel-auto { width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: 10px; cursor: pointer; }
.case-carousel-auto:hover { color: var(--text); }
.case-carousel-progress-track { width: 38px; height: 2px; background: var(--line); overflow: hidden; }
#featuredCaseProgress { display: block; height: 100%; background: var(--accent-text); transform-origin: left; transform: scaleX(0); }
#featuredCaseProgress[data-playing="false"] { background: var(--muted); }
.case-render .case-illustration,
.featured-case .case-render .case-illustration,
.case-art .case-illustration {
  display: block;
  position: static;
  width: 100%;
  height: 100%;
  max-width: 100%;
  left: auto;
  top: auto;
  object-fit: contain;
  object-position: center;
  filter: none;
}
.case-stage .case-render { background: none; }
.case-art .case-illustration { width: 100%; max-width: 100%; height: 100%; }
#featuredCasePosition { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.case-carousel { position: relative; flex: 1; min-height: 0; display: flex; }
.case-carousel-window { position: relative; flex: 1; min-width: 0; display: flex; overflow: hidden; }
.case-carousel-slide { min-width: 0; width: 100%; display: flex; flex-direction: column; }
.case-carousel-outgoing { position: absolute; inset: 0; pointer-events: none; }
.case-carousel-arrow { position: absolute; top: 42%; transform: translateY(-50%); width: 30px; height: 44px; padding: 0; border: 1px solid var(--control-line); border-radius: 7px; background: var(--surface-2); color: var(--text); font-size: 28px; line-height: 1; cursor: pointer; z-index: 1; }
.case-carousel-arrow:hover { background: var(--surface-hover); }
.case-carousel-arrow.previous { left: -29px; }
.case-carousel-arrow.next { right: -29px; }
.case-carousel:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
@media (max-width: 900px) {
 .case-carousel-arrow.previous { left: -14px; }
 .case-carousel-arrow.next { right: -14px; }
}

@media (min-width: 1081px) {
  body[data-view="wall"] main { height: calc(100dvh - 62px); min-height: 760px; display: flex; flex-direction: column; }
  #view-wall.active { flex: 1; min-height: 0; grid-template-rows: minmax(420px,1fr) auto; padding-bottom: 14px; }
  .play-layout { min-height: 0; }
  .play-layout { grid-template-rows: minmax(0,1fr); }
  .wall-card { height: 100%; min-height: 0; }
  .wall-viewport { height: 100%; min-height: 0; }
}
@media (max-width: 1080px) {
  .wall-viewport { height: clamp(480px,65vh,740px); min-height: 0; }
  .sidebar { height: auto; }
}
@media (max-width: 900px) {
  .sidebar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto; align-items: start; }
  .sidebar .activity-panel { grid-column: auto; }
  .play-layout { display: contents; }
  .play-layout>.wall-card { grid-row: 1; }
  #view-wall>.favorites-panel { grid-row: 2; }
  .play-layout>.sidebar { grid-row: 3; }
}
@media (max-width: 650px) {
  .wall-viewport { height: 65vh; min-height: 430px; }
  .sidebar { grid-template-columns: minmax(0,1fr); }
  #view-wall>.favorites-panel { padding: 12px; }
  .favorite-grid { grid-auto-columns: 104px; }
}

/* Open-case series: identical dark stage, metal-inspired card trim. */
.cases-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.case-card { --case-accent: #dfc7a5; --case-art-bg: #141619; background: #141619; border: 1px solid color-mix(in srgb,var(--case-accent) 26%,#24282e); border-radius: 12px; padding: 14px; min-width: 0; box-shadow: inset 0 1px 0 #ffffff08,0 8px 24px #0002; }
.case-card .eyebrow { color: var(--case-accent); }
.case-card h2 { color: #f0f0ee; font-size: 18px; line-height: 1.25; min-height: 2.5em; overflow-wrap: anywhere; }
.case-card > p, .case-tier { color: #b0b4ba; font-size: 11px; }
.case-card .case-art { height: auto; aspect-ratio: 1; width: 100%; margin: 12px 0; border-radius: 10px; background: none; }
/* Case art blends into its surface: transparent PNG areas show the panel, and any baked-in black (e.g. classic-4) is lifted to the same colour by `lighten`. */
.case-image-frame { display: block; position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--case-art-bg,var(--surface)); isolation: isolate; }
.case-image-frame img.case-illustration { position: absolute; width: var(--art-size,100%); height: var(--art-size,100%); max-width: none; left: var(--art-left,0%); top: var(--art-top,0%); object-fit: contain; filter: none; mix-blend-mode: lighten; }
.case-card .drop-miniatures { gap: 5px; margin-bottom: 12px; }
.case-card .drop-miniatures img { width: 27px; height: 27px; background: #101114; border-color: #393e45; border-radius: 6px; }
.case-card .case-card-bottom { gap: 8px; padding-top: 10px; border-top: 1px solid #30343a; }
.case-card .case-card-bottom .price { color: #f0ece5; font-size: 20px; white-space: nowrap; }
.case-card .primary { background: #e7d2ae; color: #191713; border: 1px solid #f2e3c6; border-radius: 8px; padding: 10px 12px; font-size: 12px; white-space: nowrap; box-shadow: inset 0 1px 0 #fff4; }
.case-card .primary:hover { background: #f3dfba; }
.case-card > .text-button { color: var(--case-accent); font-size: 11px; margin-top: 12px; white-space: normal; }
.featured-case .case-render, .case-stage .case-render { background: none; }
@media (max-width: 1199px) { .cases-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 979px) { .cases-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 759px) { .cases-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 479px) { .cases-grid { grid-template-columns: minmax(0,1fr); } .case-card { padding: 16px; } }
/* wallfirst.css */
/* Home: the wall is the page. It fills the window under the header, and the case card, the activity log
   and the sticker strip float over it. Narrow screens keep the stacked layout, except a phone on its side
   (wider than 560px and no taller than 520px): there the stacked wall was taller than the window and a finger
   on it scrolls nothing, so the bar of the sticker in hand, the map and the strip could not be reached. */
#view-wall .favorite-grid{scrollbar-width:none}
#view-wall .favorite-grid::-webkit-scrollbar{display:none}
/* «Все» is its own fixed cell at the right; the strip scrolls and is clipped before it */
#view-wall .favorite-row{display:flex;gap:10px;min-height:0;flex:1}
#view-wall .favorite-row .favorite-grid{flex:1;min-width:0}
#view-wall .favorite-all{flex:none;width:82px;border:1px solid #364157;border-radius:10px;background:#161b24;color:var(--accent-text,#b8c4ff);font:inherit;font-weight:700;font-size:14px;cursor:pointer}
#view-wall .favorite-all:hover{color:#fff;border-color:#5b6b8c}
/* The strip has no scrollbar, so two arrows say that there is more and turn it. They lie over its two ends, in the
   look of «Все», as tall as a card: no card moves when one shows or goes, and the card under one keeps most of
   itself to be pressed. The script shows an arrow only while a card is out of sight that way. One that is needed no
   more right after its own press fades at once but takes presses a moment longer (.spent): the next click of a
   quick series must not land on the card under it and take that sticker in hand.
   The button's own box is a plain patch of the panel's colour, a little wider than itself (the shadow), so the card
   under it ends in a clean gap; the rounded face is drawn inside it (::before, under the chevron).
   The strip stops with a card's edge one gap clear of the left arrow (scroll-padding), so the first card in sight is
   whole and the one before it is wholly under the arrow.
   Under a finger an arrow is wider and lets touches through to the strip: a swipe that starts on it drags the strip
   as anywhere else, and the script takes a tap by the place where it fell. */
#view-wall .favorite-strip{--arrow:26px;position:relative;display:flex;flex:1;min-width:0;min-height:0}
#view-wall .favorite-strip .favorite-grid{scroll-padding-inline:calc(var(--arrow) + 8px)}
#view-wall .strip-arrow{position:absolute;z-index:2;top:3px;bottom:8px;width:var(--arrow);padding:0 0 3px;border:0;background:var(--surface,#18191b);box-shadow:0 0 0 3px var(--surface,#18191b);color:var(--accent-text,#b8c4ff);font:inherit;font-weight:700;font-size:22px;line-height:1;cursor:pointer;touch-action:manipulation;transition:opacity .15s}
#view-wall .strip-arrow::before{content:"";position:absolute;z-index:-1;inset:0;border:1px solid #364157;border-radius:10px;background:#161b24}
#view-wall .strip-arrow.previous{left:0}
#view-wall .strip-arrow.next{right:0}
#view-wall .strip-arrow:hover{color:#fff}
#view-wall .strip-arrow:hover::before{border-color:#5b6b8c}
#view-wall .strip-arrow.spent{opacity:0;cursor:default}
@media(pointer:coarse){#view-wall .favorite-strip{--arrow:32px}#view-wall .strip-arrow{pointer-events:none}}
/* A phone held upright. The strip there is two cards wide (one, on the narrowest phones), and the two arrows took a
   third of it: between them one card fits whole, so a press could bring one new card and no more (39 stickers were
   38 presses), while a finger swipes the strip many cards at a time. There the arrows did not earn their place and
   are not shown. That the strip goes on is said by its edge instead: it fades on the side where stickers are out of
   sight. Which side that is the script still says, by the arrows' own `hidden`. A mouse in a window this narrow has
   no swipe and keeps the arrows. */
@media(max-width:559px) and (pointer:coarse){
  #view-wall .strip-arrow{display:none}
  #view-wall .favorite-strip .favorite-grid{scroll-padding-inline:0}
  #view-wall .favorite-strip:has(.strip-arrow.next:not([hidden])) .favorite-grid{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 36px),#0000);mask-image:linear-gradient(90deg,#000 calc(100% - 36px),#0000)}
  #view-wall .favorite-strip:has(.strip-arrow.previous:not([hidden])) .favorite-grid{-webkit-mask-image:linear-gradient(90deg,#0000,#000 36px);mask-image:linear-gradient(90deg,#0000,#000 36px)}
  #view-wall .favorite-strip:has(.strip-arrow.previous:not([hidden])):has(.strip-arrow.next:not([hidden])) .favorite-grid{-webkit-mask-image:linear-gradient(90deg,#0000,#000 36px,#000 calc(100% - 36px),#0000);mask-image:linear-gradient(90deg,#0000,#000 36px,#000 calc(100% - 36px),#0000)}
}

/* carousel arrows: bare chevrons inside the card, same click area as before */
/* centred on the whole card, not on the carousel inside it */
#view-wall .featured-case{position:relative}
#view-wall .case-carousel{position:static}
#view-wall .case-carousel-arrow{top:50%;width:26px;height:44px;border:0;background:none;color:#8f9bb0;text-shadow:0 1px 6px #000c;transition:color .15s,transform .15s}
#view-wall .case-carousel-arrow:hover{background:none;color:#fff}
#view-wall .case-carousel-arrow.previous{left:0}
#view-wall .case-carousel-arrow.next{right:0}
#view-wall .case-carousel-arrow.previous:hover{transform:translateY(-50%) translateX(-2px)}
#view-wall .case-carousel-arrow.next:hover{transform:translateY(-50%) translateX(2px)}

@media (min-width:901px),(min-width:560px) and (max-height:520px){
  body[data-view=wall]{overflow:hidden;--strip:132px;--side:306px}
  body[data-view=wall] main{width:100%;max-width:none;margin:0;padding:0}
  #view-wall{position:fixed;inset:var(--head,62px) 0 0 0;min-height:0;animation:none}
  #view-wall .play-layout{display:block;position:absolute;inset:0}
  #view-wall .wall-card{position:absolute;inset:0;margin:0;padding:0;border:0;border-radius:0;background:none;overflow:hidden}
  #view-wall .wall-viewport{height:100%;min-height:0;border:0;border-radius:0}

  /* what used to sit on the canvas edges moves clear of the floating panels */
  #view-wall .wall-topline{right:calc(var(--side) + 28px)}
  #view-wall .target-info{left:66px;right:auto;top:64px}
  #view-wall .placement-tools{bottom:calc(var(--strip) + 26px)}

  /* case card: same card, about 300px wide */
  /* never taller than the room above the strip: on a low window the chest shrinks, and what still does not fit scrolls inside the card */
  #view-wall .sidebar{position:absolute;right:14px;top:14px;z-index:8;width:var(--side);display:flex;flex-direction:column;gap:10px;height:auto;max-height:calc(100% - var(--strip) - 50px);pointer-events:none}
  #view-wall .sidebar .featured-case{flex:0 1 auto;min-height:0}
  #view-wall .case-carousel-window{overflow:hidden auto;overscroll-behavior:contain;scrollbar-width:thin}
  #view-wall .sidebar>*{pointer-events:auto}
  #view-wall .sidebar .panel{padding:11px 12px;box-shadow:0 10px 30px #0007}
  #view-wall .featured-case .panel-heading{margin-bottom:4px;font-size:11px}
  /* one case, shown large: chest, name, price, button. The contents live behind «Состав коллекции». */
  #view-wall .featured-case .case-feature{grid-template-columns:minmax(0,1fr);gap:4px;min-height:0;overflow:visible;text-align:center}
  #view-wall .featured-case .case-render{height:clamp(56px,calc(100dvh - 520px),176px)}
  #view-wall .featured-case .case-copy h3{font-size:19px;line-height:1.15;margin:0 0 4px}
  #view-wall .featured-case .case-copy p{font-size:13px;margin:0 0 12px}
  #view-wall .featured-case .case-actions{display:flex;gap:8px;align-items:stretch;justify-content:center}
  #view-wall .featured-case .case-actions .price{font-size:17px;padding:0 14px;min-height:44px}
  #view-wall .featured-case .case-actions .primary{flex:1;font-size:15px;padding:0 14px;min-height:44px}
  #view-wall .featured-case .subheading,#view-wall .featured-case .odds{display:none}
  #view-wall .sidebar .activity-panel{min-height:0;font-size:11px}
  #view-wall .activity-panel h2{font-size:12px}
  /* the map sits bottom-left: the right column belongs to the case card and the activity log, whatever their height */
  #view-wall .minimap-wrap{left:12px;right:auto;bottom:calc(var(--strip) + 26px)}

  /* sticker strip: one row of small tiles along the bottom */
  #view-wall .favorites-panel{position:absolute;left:12px;right:12px;bottom:12px;z-index:8;height:var(--strip);min-height:0;margin:0;padding:9px 12px 10px;box-shadow:0 10px 30px #0007}
  /* The heading is as low as its words and the two buttons in it are no taller than it: with buttons of their own
     height (25 and 27px) the heading took the room of the tiles, and the row under it cut 5 to 7px off their bottom. */
  #view-wall .favorites-panel .panel-heading{height:20px;margin:0 0 7px;font-size:11px}
  #view-wall .charge-button,#view-wall .quests-chip{box-sizing:border-box;height:20px;padding-top:0;padding-bottom:0}
  #view-wall .favorites-panel h2{font-size:12px;margin:0}
  #view-wall .favorite-grid{grid-auto-columns:calc((100% - (var(--fit,12) - 1)*8px)/var(--fit,12));gap:8px;padding:1px 0;scroll-snap-type:x mandatory}
  #view-wall .favorite-card{scroll-snap-align:start}
  #view-wall .favorite-card{position:relative;height:82px;padding:5px;border-bottom:3px solid var(--rarity-color)}
  #view-wall .favorite-art{height:100%}
  #view-wall .favorite-card h3,#view-wall .favorite-card p,#view-wall .favorite-meta b{display:none}
  #view-wall .favorite-meta{position:absolute;right:3px;top:3px;margin:0;padding:0;border:0}
  #view-wall .favorite-all{height:82px;margin-top:1px}
  #view-wall .strip-arrow{top:1px;bottom:auto;height:82px}
  body[data-view=wall] .toast{bottom:calc(var(--strip) + 28px);max-width:min(640px,calc(100vw - 2*var(--side) - 56px))}
  /* with a sticker in hand the bar of that sticker stands on the same spot: the toast goes above it */
  body[data-view=wall]:has(#placementTools:not([hidden])) .toast{bottom:calc(var(--strip) + 100px)}
  #view-wall .favorite-meta span{display:block;padding:1px 6px;border-radius:99px;background:#0b111aeb;color:#fff;font-size:10px;font-weight:700}
  /* the wall on the whole screen has no strip under it: the bar of the sticker in hand and the map go down to the edge */
  #view-wall .wall-viewport:fullscreen .placement-tools,#view-wall .wall-viewport:fullscreen .fullscreen-leave{bottom:24px}
  #view-wall .wall-viewport:fullscreen .minimap-wrap{bottom:12px}
  #view-wall .wall-viewport:fullscreen .toast{bottom:104px!important}
}
@media (min-width:901px) and (max-height:790px){
  #view-wall .sidebar .activity-panel{display:none}
}

/* Header nickname: the name is a button, one click turns it into an input in the same place. */
.mini-profile{cursor:default}
.mini-profile-avatar,.nick-button{border:0;background:none;padding:0;color:inherit;font:inherit;cursor:pointer;display:flex;align-items:center;gap:6px}
.nick-button strong{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nick-button span{color:var(--muted);font-size:12px}
.nick-button:hover:not(:disabled) strong{text-decoration:underline}
.nick-button:disabled{cursor:default}.nick-button:disabled span{display:none}
.nick-form{display:flex;margin:0}
.nick-form input{width:150px;height:28px;padding:0 8px;border:1px solid var(--control-line);border-radius:6px;background:var(--surface);color:var(--text);font:inherit;font-size:12px;font-weight:600}
.target-info p{overflow-wrap:anywhere}
/* Saving progress: a small quiet entry after the nickname; on narrow headers only its sign stays. */
.save-button{border:0;background:none;padding:0 0 0 4px;color:var(--muted);font:inherit;font-size:11px;cursor:pointer;display:flex;align-items:center;gap:5px;white-space:nowrap}
.save-button b{font-weight:600}.save-button:hover b{text-decoration:underline}.save-button.saved{color:#58b97a}
.save-dialog{width:min(440px,calc(100% - 32px))}
.save-panel{display:grid;gap:12px;justify-items:start}.save-panel p{margin:0}.save-panel .save-note{color:var(--muted);font-size:11px}
.save-panel .save-google{min-height:44px;color-scheme:light}.save-panel .save-error{color:#ff8f8f}.save-panel .save-done{color:#58b97a}
.save-panel .save-actions{display:flex;flex-wrap:wrap;gap:8px}
.save-panel button{height:34px;padding:0 14px;border:1px solid var(--control-line);border-radius:8px;background:var(--surface);color:var(--text);font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.save-panel .save-go,.save-panel .save-close{background:#8d46ff;border-color:#8d46ff;color:#fff}
.save-panel .save-close{min-width:120px}
.pay-dialog{width:min(540px,calc(100% - 32px))}
.pay-panel{display:grid;gap:12px}.pay-panel p{margin:0}.pay-panel .pay-note{color:var(--muted);font-size:11px}.pay-panel .pay-error{color:#ff8f8f}.pay-panel .pay-test{color:#ffc745}.pay-panel .pay-heading{margin:4px 0 0;font-size:13px}
.pay-packs{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.pay-pack{display:grid;gap:3px;align-content:start;padding:12px;border:1px solid var(--control-line);border-radius:12px;background:var(--surface);color:var(--text);font:inherit;text-align:left;cursor:pointer}
.pay-pack b{font-size:18px}.pay-pack span{font-size:12px;color:var(--muted)}.pay-pack em{font-style:normal;font-weight:700;font-size:15px;color:#ffc745}.pay-pack small{font-size:11px;color:var(--muted);line-height:1.3}
.pay-pack.starter{border-color:#ffc745;grid-column:1/-1}.pay-pack:not(:disabled):hover{border-color:#8d46ff}.pay-pack:disabled{opacity:.5;cursor:default}
.pay-list{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:12px}.pay-list li{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.pay-list .st-paid{color:#58b97a}.pay-list .st-failed,.pay-list .st-refunded{color:#ff8f8f}.pay-list .st-pending{color:var(--muted)}
.pay-panel .pay-actions{display:flex;flex-wrap:wrap;gap:8px}
.pay-panel .pay-action,.pay-panel .pay-quiet{height:34px;padding:0 14px;border:1px solid var(--control-line);border-radius:8px;background:var(--surface);color:var(--text);font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.pay-panel .pay-action{background:#8d46ff;border-color:#8d46ff;color:#fff}.pay-panel .pay-action:disabled,.pay-panel .pay-quiet:disabled{opacity:.5;cursor:default}
.pay-panel .pay-link{border:0;background:none;color:#b78aff;font:inherit;font-size:12px;text-decoration:underline;cursor:pointer;padding:0}
.toast.action.show{pointer-events:auto;cursor:pointer}
/* Retention: collection progress and the free daily case on the case cards. */
.case-progress{display:block;margin:0;color:var(--muted);font-size:11px}.featured-case .case-progress{margin-top:8px}
.daily-entry{display:block;width:100%;margin-top:4px;padding:0;border:0;background:none;color:var(--muted);font:inherit;font-size:12px;text-align:inherit;cursor:pointer}
.daily-entry.ready{color:#58b97a;font-weight:700;text-decoration:underline}.case-card .daily-entry{margin-top:10px;text-align:left}
@media(max-width:1500px){.save-button b{display:none}.save-button{font-size:15px}}
/* The short words of that entry, «Войти» and «Выйти» (the script marks the button: brief), are drawn in the sign's
   place wherever the header has room for them: on a wide phone, on a tablet and a phone held sideways, and on a
   desktop from 1081 up. A word is 25 points wider than the sign. Where it is drawn, a nick longer than any the game
   gives by itself yields those points (it had 120 or 150 to itself; 6 where it had 96), the search field the rest;
   no nick the game gives is cut for it, nothing runs into its neighbour and the menu keeps its last entry in sight.
   Where the row has nothing to give the sign stays: below 410 and at 481–559 (the first row of a phone's header is
   full: logo, avatar, nick, balance) and at 901–1080 (a word there pushed «XP» out of the menu's sight). The words
   are the button's name for a screen reader at every width (aria-label, set by the script). */
@media(min-width:410px) and (max-width:480px),(min-width:560px) and (max-width:900px),(min-width:1081px) and (max-width:1500px){.save-button.brief b{display:inline;font-size:12px}.save-button.brief span{display:none}}
@media(min-width:651px) and (max-width:900px),(min-width:1221px) and (max-width:1500px){.mini-profile:has(.save-button.brief:not([hidden])) .nick-button strong{max-width:124px}}
@media(min-width:1151px) and (max-width:1220px){.mini-profile:has(.save-button.brief:not([hidden])) .nick-button strong{max-width:94px}}
@media(min-width:1081px) and (max-width:1150px){.mini-profile:has(.save-button.brief:not([hidden])) .nick-button strong{max-width:90px}}
/* Header columns. The menu column is never narrower than the menu, or the search would lie over its last item. */
.topbar{grid-template-columns:auto minmax(max-content,1fr) minmax(120px,210px) auto auto}
/* Narrow header: the avatar and the nickname both stay, so each can be seen and changed at any width. The avatar is
   the way to the player's own picture (avatar.css makes it smaller here); it used to go, and the search gives it room. */
@media(max-width:1350px){.topbar{grid-template-columns:auto minmax(max-content,1fr) minmax(0,190px) auto auto}.topbar .mini-profile{padding:0 10px 0 0}}
@media(max-width:1080px){.topbar{grid-template-columns:auto 1fr auto auto}}
@media(max-width:900px){.topbar{grid-template-columns:1fr auto auto}.topbar .mini-profile{grid-column:2;grid-row:1}.topbar .balance{grid-column:3}}
@media(max-width:650px){.topbar .mini-profile{padding:0 6px 0 0;border-right:0}.nick-button strong{max-width:96px}.nick-form input{width:110px}}
@media(max-width:480px){.topbar .brand-name{display:none}}

/* shield extension in the sticker card, the list of the longest-standing stickers */
.target-info{pointer-events:auto}
.extend-button{display:block;width:100%;margin-top:8px;padding:7px 10px;border:1px solid #c9a227;border-radius:8px;background:#fff8e1;color:#5c4300;font:600 12px/1.2 inherit;cursor:pointer}
.extend-button:hover{background:#ffefb8}
.leaders{list-style:none;margin:0;padding:0;display:grid;gap:6px;counter-reset:leader}
.leaders li{counter-increment:leader}
.leaders button{display:grid;grid-template-columns:22px 44px 1fr auto;align-items:center;gap:10px;width:100%;padding:6px 10px;border:1px solid #ffffff14;border-radius:10px;background:#ffffff08;color:inherit;text-align:left;cursor:pointer}
.leaders button::before{content:counter(leader);color:#8f9bb0;font-size:12px;text-align:right}
.leaders button:hover{background:#ffffff14}
.leaders img{width:44px;height:44px;object-fit:contain}
.leaders span{display:grid;min-width:0}
.leaders strong,.leaders small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.leaders small{color:#8f9bb0;font-size:12px}
.leaders b{font-size:13px;white-space:nowrap}

/* the charge button and the lists of the day */
.favorites-panel .panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.charge-button{padding:6px 12px;border:1px solid #ffffff1f;border-radius:999px;background:#ffffff0a;color:#8f9bb0;font:600 12px/1.2 inherit;white-space:nowrap}
.charge-button.ready{border-color:#57c98a;background:#57c98a26;color:#bff3d6;cursor:pointer}
.charge-button.ready:hover{background:#57c98a40}
.leaders-title{margin:14px 0 6px;font-size:13px;color:#8f9bb0;font-weight:600}
.leaders-title:first-child{margin-top:0}
.leaders.day div{display:grid;grid-template-columns:22px 1fr auto;align-items:center;gap:10px;padding:6px 10px;border:1px solid #ffffff14;border-radius:10px;background:#ffffff08}
.leaders.day div::before{content:counter(leader);color:#8f9bb0;font-size:12px;text-align:right}
.leaders .none{color:#8f9bb0;font-size:13px;counter-increment:none}

/* Desktop header, with the columns set above: nothing leaves the window or runs into its neighbour, whatever the
   nickname and the balance. On a narrower window the menu tightens its gaps, then the search gives way, then the
   «beta» mark and a part of a long nickname. The last resort is a menu that scrolls. */
@media(min-width:901px) and (max-width:1350px){.topbar .nav{justify-content:space-between;gap:14px;max-width:470px;min-width:0;overflow-x:auto;scrollbar-width:none}.topbar .nav::-webkit-scrollbar{display:none}.topbar .search{overflow:hidden}}
@media(min-width:901px) and (max-width:1220px){.topbar .beta{display:none}.nick-button strong{max-width:120px}.nick-form input{width:120px}}
@media(min-width:901px) and (max-width:1150px){.nick-button strong{max-width:96px}.nick-form input{width:110px}}
@media(min-width:901px) and (max-width:1000px){.topbar .nav{gap:6px;max-width:445px}.nav-link{font-size:13px}}

/* Phone header: all six menu items fit in one row from 360px up. */
@media(max-width:480px){.topbar .nav{gap:6px;justify-content:space-between}}
@media(max-width:380px){.nav-link{font-size:11.5px}}

/* The «×N» of an owned card is painted over the picture, not under it. */
.copy-count{z-index:2}

/* A toast is as wide as its text, up to the screen; it used to be squeezed into the half right of the centre. */
.toast{width:max-content;max-width:min(640px,calc(100vw - 24px))}

/* Dialogs. Rules and leaders are long: the head with the close button stays in view while they scroll.
   The case dialog keeps its buttons in view on a short screen, and its chest takes less of one. */
.rules-dialog .dialog-head{position:sticky;top:0;z-index:2;background:var(--surface)}
.case-dialog{max-height:95dvh}
.case-dialog .dialog-actions{position:sticky;bottom:0;z-index:6;background:var(--surface)}
@media(max-height:700px){.case-stage{height:112px}.case-stage .case-render{width:150px;height:100px}}
@media(max-height:640px){.case-stage{height:64px}.case-stage .case-render{width:96px;height:64px}}
@media(max-width:600px){.rules-dialog .dialog-head{padding:16px 17px 12px}}

/* Narrow screens: the filters wrap two in a row so their labels are whole; the rules table fits without a sideways scroll. */
@media(max-width:600px){
  .catalog-filters select{flex:1 1 150px;width:auto;padding:11px 8px}
  .rules-dialog th{white-space:normal}
  .rules-dialog th,.rules-dialog td{padding:8px 5px}
  .rules-dialog td{font-size:12px}
}
/* Leaders of the day: a long nickname wraps instead of running into the number. */
.leaders.day div{grid-template-columns:22px minmax(0,1fr) auto}
.leaders.day span{display:block;overflow-wrap:anywhere}

/* Touch: fields at 16px (iOS zooms the page into anything smaller) and tap areas of at least 36px.
   Where a bigger box would move the layout, the area grows invisibly around the control instead. */
@media(pointer:coarse){
  .catalog-filters input,.catalog-filters select,.report-dialog select,.nick-form input,.search input{font-size:16px}
  .nick-button,.daily-entry,.extend-button,.report-button,.case-carousel-heading>button{min-height:36px}
  .save-button,.balance button,.charge-button{position:relative}
  .save-button::after{content:"";position:absolute;inset:-8px -9px}
  .balance button::after{content:"";position:absolute;inset:-7px}
  .charge-button::after{content:"";position:absolute;inset:-6px 0}
  .case-carousel-heading .case-carousel-auto{width:36px;height:36px;font-size:12px}
  .sound-toggle{min-height:36px;padding:0 10px}
  .collection-card a.source-link{margin-top:4px;line-height:36px}
  .report-button{margin-top:4px;padding:0}
}

/* What a careless player ran into: messages seen everywhere, long names, dialogs that keep their scroll, short screens. */

/* A long name without spaces (the catalog has 100-character ones) wraps inside its card instead of running out of it. */
.target-info strong,#reportName,.event-log li{overflow-wrap:anywhere}
.report-dialog{overflow-x:hidden}

/* The sign over the wall. «Нет соединения» was red on mint; the script sets that red itself (tests pin it), so the
   readable pair is forced here. The second sign speaks of pictures that are late or missing. */
#connectionState{background:#fdecec;border-color:#f0b9b9;color:#9c2b2b!important}
#picturesState{background:#fff7df;border-color:#ecd9a0;color:#6b4e00}
.wall-topline{flex-wrap:wrap}

/* The toast lives inside whatever is on top (toastHome in app.js): in a dialog and on the whole-screen wall it stands
   at the bottom of the screen and in its middle, whatever the page under it would have said about the strip and the
   case card (on a phone held sideways the wall's toast is moved left, clear of that card: inside a dialog that put
   the start of the message off the screen). */
dialog .toast,.wall-viewport:fullscreen .toast{bottom:24px!important;left:50%!important;max-width:min(640px,calc(100vw - 24px))!important}

/* On the whole screen the toast stands above the bar of the sticker in hand. With an empty hand the way back to the
   strip stands where that bar would be (the bar's own places: 65px, 115px on a phone, see game.css). */
.wall-viewport:fullscreen .toast{bottom:144px!important}
.fullscreen-leave{position:absolute;z-index:8;left:50%;bottom:65px;transform:translateX(-50%);max-width:calc(100% - 24px);padding:11px 16px;border:1px solid var(--accent);border-radius:12px;background:#18191bf5;color:#fff;font:inherit;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 6px 20px #0003}
.fullscreen-leave:hover{background:#272a2d}
@media(max-width:600px){.fullscreen-leave{bottom:115px}.wall-viewport:fullscreen .toast{bottom:194px!important}}

/* The bar of the sticker in hand while a paste waits for its second tap (app.js: pin). It gets one more row under the
   name, as wide as the bar, that says what the paste will do and how to make it: that is said here, in the bar, and
   nothing is written over the wall. On a phone held sideways the bar is narrow and stands beside the map: for as long
   as it says this it takes the map's place and room (the low layout below). */
.placement-plan{flex:1 1 100%;margin:0;font-size:12px;line-height:1.4;color:#fff;overflow-wrap:anywhere}
.placement-tools.pinned{flex-wrap:wrap;width:420px}
/* The taller bar must not lie over the sticker it speaks of: when it would, the script moves it to the top of the wall
   (aloft). In the stacked layout of a phone held upright the wall's buttons stand in that corner: the bar keeps right of them. */
#view-wall .placement-tools.pinned.aloft{top:10px;bottom:auto!important}
@media(max-width:559px),(max-width:900px) and (min-height:521px){#view-wall .placement-tools.pinned.aloft{left:62px;right:8px;width:auto;max-width:none;transform:none}}

/* Leaders: one plain line while there is nothing to list (still loading, a guest before the «не робот» step, an error). */
.leaders-dialog.plain .leaders-title,.leaders-dialog.plain .day{display:none}

/* A dialog scrolled to its end does not go on to scroll the page behind it, and the page behind an open dialog does not
   scroll at all (the script marks the body while any dialog is open). */
dialog{overscroll-behavior:contain}
body.modal-open{overflow:hidden}

/* The narrowest phones (320px): the six menu items still fit in one row. Narrower than that (a browser zoomed to
   500%) the page no longer insists on 320px, the nickname gives way, and nothing scrolls sideways. */
@media(max-width:359px){.topbar .nav{gap:4px}.nav-link{font-size:10.5px}}
@media(max-width:319px){body{min-width:0}.nick-button strong{max-width:56px}.topbar .balance{gap:5px;padding:0 6px 0 8px}}

/* A low window in the wall-first layout (a phone on its side, a short browser window): everything a player presses
   stays in sight at once. The strip is one low row with the charge at its left; the case card loses its chest and
   scrolls inside itself; the map is small and stands beside the wall buttons, the bar of the sticker in hand beside
   the map, both clear of the case card. Below 901px the header is one row (--head) instead of two. */
@media (min-width:560px) and (max-height:520px){
  body[data-view=wall]{--strip:78px}
  /* 7px above and below, not 8: the row is then 62px, the 60 of a tile and the 1px the strip keeps on either side
     of it (with 8 the last pixel of every tile was cut). */
  #view-wall .favorites-panel{display:flex;flex-direction:row;align-items:stretch;gap:10px;padding:7px 10px}
  #view-wall .favorites-panel .panel-heading{flex:none;height:auto;margin:0;align-items:center}
  #view-wall .favorites-panel h2{display:none}
  #view-wall .charge-button{max-width:116px;height:auto;padding:5px 9px;border-radius:10px;font-size:11px;line-height:1.25;white-space:normal;text-align:center}
  #view-wall .favorite-card,#view-wall .favorite-all,#view-wall .strip-arrow{height:60px}
  #view-wall .favorite-all{width:58px;margin-top:1px}
  #view-wall .sidebar{top:10px;right:10px;max-height:calc(100% - var(--strip) - 34px)}
  #view-wall .sidebar .activity-panel{display:none}
  #view-wall .favorite-row{min-width:0}
  #view-wall .featured-case .case-render,#view-wall .featured-case .case-copy p,#view-wall .case-carousel-progress-track{display:none}
  #view-wall .featured-case .case-copy h3{font-size:16px}
  #view-wall .featured-case .case-actions .price,#view-wall .featured-case .case-actions .primary{min-height:38px}
  /* the arrows stand beside the name, in the row, not over the button */
  #view-wall .case-carousel-arrow{position:static;flex:none;align-self:flex-start;width:24px;height:30px;transform:none}
  #view-wall .case-carousel-arrow.previous:hover,#view-wall .case-carousel-arrow.next:hover{transform:none}
  #view-wall .wall-controls{top:10px}
  #view-wall .wall-topline{top:10px;left:62px}
  #view-wall .minimap-wrap{left:62px;bottom:calc(var(--strip) + 22px)}
  #view-wall .minimap-wrap canvas{width:96px;height:72px}
  #view-wall .minimap-wrap span{display:none}
  #view-wall .placement-tools{left:178px;transform:none;bottom:calc(var(--strip) + 22px);max-width:calc(100% - var(--side) - 202px)}
  #view-wall .placement-tools>div{min-width:0}
  /* a paste waits for its second tap: the wall here is too low for a taller bar, so the bar grows sideways, into the
     map's place, and holds one row: what the paste will do, then the button that puts the sticker down. The name of
     the sticker gives its room to that: the sticker itself is on the wall. */
  #view-wall .wall-viewport:has(.placement-tools.pinned) .minimap-wrap{display:none}
  #view-wall .placement-tools.pinned{left:62px;max-width:calc(100% - var(--side) - 86px);width:auto;flex-wrap:nowrap}
  #view-wall .placement-tools.pinned>div,#view-wall .placement-tools.pinned>img{display:none}
  #view-wall .placement-tools.pinned .placement-plan{flex:1 1 0;min-width:0;order:-1}
  #view-wall .fullscreen-leave{bottom:calc(var(--strip) + 22px)}
  #view-wall .target-info{top:10px;left:62px;width:170px;max-height:calc(100% - var(--strip) - 34px);overflow-y:auto}
  body[data-view=wall] .toast{left:calc((100vw - var(--side))/2);max-width:calc(100vw - var(--side) - 40px)}
  #view-wall .wall-viewport:fullscreen .placement-tools,#view-wall .wall-viewport:fullscreen .fullscreen-leave{bottom:12px}
  #view-wall .wall-viewport:fullscreen .toast{max-width:calc(100vw - 24px)!important}
}
@media (min-width:560px) and (max-width:900px) and (max-height:520px){
  body{--head:50px}
  body[data-view=wall]{--side:204px}
  .topbar{grid-template-columns:auto minmax(0,1fr) auto auto;height:50px;min-height:0;padding:0 12px;gap:10px}
  .topbar .nav{grid-column:2;grid-row:1;height:100%;gap:14px;justify-content:flex-start;overflow-x:auto;scrollbar-width:none}
  .topbar .nav::-webkit-scrollbar{display:none}
  .topbar .mini-profile{grid-column:3;grid-row:1}
  .topbar .balance{grid-column:4;grid-row:1}
  .topbar .brand-name,.topbar .beta{display:none}
  .nav-link{font-size:12px}
  #view-wall .featured-case .case-actions{flex-wrap:wrap}
  #view-wall .sidebar .panel{padding:8px 10px}
  #view-wall .featured-case .case-copy h3{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #view-wall .featured-case .case-actions .price{flex:1 1 100%;justify-content:center;font-size:15px;min-height:26px}
  #view-wall .featured-case .case-actions .primary{font-size:13px;padding:0 8px}
}
@media (min-width:560px) and (max-width:700px) and (max-height:520px){
  #view-wall .placement-tools{gap:6px;padding:6px 8px}
  #view-wall .placement-tools img{display:none}
}
/* Over the catalog's title. With one collection on screen the way back to all of them is a button and looks like one:
   a bordered pill in the action colour, tall enough for a finger. With the whole catalog it is the plain label, on a
   line of the same height, so the title does not jump when one gives way to the other. */
.catalog-all{display:inline-flex;align-items:center;min-height:36px;padding:0 14px;border:1px solid var(--control-line,#43484e);border-radius:999px;background:var(--surface-2,#212225);color:var(--accent-text,#9eb1ff);font:inherit;font-size:13px;font-weight:700;letter-spacing:.02em;cursor:pointer}
.catalog-all:hover{background:var(--surface-hover,#272a2d);border-color:var(--accent-text,#9eb1ff);color:#fff}
#catalogEyebrow{display:inline-flex;align-items:center;min-height:36px}
/* The way to the other version of the game is the last entry of the menu row, an ordinary link. On a wide header a
   thin line sets it apart from the game's own pages. The row was full with six entries, so it gives way for the
   seventh in the order the header already follows: tighter gaps and a narrower search first; and where the row still
   has no room for the whole name (the one-row header up to 1000px, a phone held upright) the entry reads «XP», with
   the whole name left to its label and hint. Only the rows that scrolled before (a phone on its side) scroll now.
   Below 340px the menu's letters are 10px: that is the width of the smallest phones only. */
@media(min-width:1151px){.topbar .nav .nav-other::before{content:"";width:1px;height:14px;margin-right:12px;background:var(--control-line,#43484e)}}
@media(min-width:1351px) and (max-width:1440px){.topbar .nav{gap:16px}}
@media(min-width:901px) and (max-width:1350px){.topbar .nav{max-width:520px}}
@media(min-width:1001px) and (max-width:1150px){.topbar .nav{gap:6px}}
@media(min-width:901px) and (max-width:1000px){.topbar .nav{max-width:445px}}
@media(min-width:901px) and (max-width:1000px),(max-width:480px){.nav-other span{display:none}}
@media(min-width:481px) and (max-width:540px){.topbar .nav{gap:12px}}
@media(max-width:380px){.topbar .nav{gap:5px}}
@media(max-width:359px){.topbar .nav{gap:3px}}
@media(max-width:339px){.nav-link{font-size:10px}}
/* The line that says the sticker in hand will burn here (showBurn): a strip of the bar standing on its top edge, over
   the wall, so the bar keeps its height while the pointer moves. A quiet red, the bar's own dark ground. */
.placement-tools>div{display:flex;flex-direction:column;justify-content:center;min-height:50px}
.placement-tools .armed-burn{margin-top:3px;color:#ff7b7f;font-size:12px;font-weight:700;line-height:14px;white-space:nowrap}
/* The shop's two ways of paying (public/pay.js): the cashier in rubles and Telegram Stars. */
.pay-ways{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:0 0 10px;padding:3px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}
.pay-way{min-height:34px;border:0;border-radius:8px;background:transparent;color:var(--muted);font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.pay-way:disabled{opacity:.45;cursor:default}
.pay-way[aria-pressed="true"]{background:var(--surface);color:var(--text);box-shadow:0 0 0 1px var(--control-line)}
.pay-panel a.pay-action{display:inline-flex;align-items:center;text-decoration:none;border-color:#2aabee;background:#2aabee;color:#fff}
/* «Войти через Telegram» in the save window (public/save.js): Telegram's own blue. */
.save-panel .save-telegram{display:inline-flex;align-items:center;justify-content:center;min-height:40px;margin-top:8px;padding:0 18px;border-radius:6px;background:#2aabee;color:#fff;font-weight:600;font-size:14px;text-decoration:none}
.save-panel .save-telegram:hover{background:#229ed9}
/* cases.css */
/* Cases: the card of a case on the «Кейсы» page, the dialog that opens a case, and the reel in it. This sheet comes
   after the older ones and has the last word on these three. */

/* ---- The card ---------------------------------------------------------------------------------------------------
   Top to bottom: the name; the picture and one sticker of each rarity (a click on either opens the case); how much is
   gathered, which is the link to the whole collection, and the shield mark; the price and the button. Where the
   browser can (subgrid), the four rows of the cards standing side by side are the same height, so pictures, prices
   and buttons line up whatever the length of a name, and a short name leaves no hole under itself. */
.case-card{display:flex;flex-direction:column;gap:14px;min-height:0;padding:14px}
.case-card h2{margin:0;min-height:2.5em}
@supports (grid-template-rows:subgrid){
  .case-card{display:grid;grid-template-columns:minmax(0,1fr);grid-row:span 4;grid-template-rows:subgrid}
  .case-card h2{grid-row:1;min-height:0}
  .case-open{grid-row:2;grid-column:1}
  .case-meta{grid-row:3}
  .case-card .case-card-bottom{grid-row:4}
  /* the free entry lies on the corner of the picture and adds no row */
  .case-card .daily-entry{grid-row:2;grid-column:1;z-index:1;align-self:start;justify-self:start;margin:6px;max-width:calc(100% - 12px)}
}
.case-open{display:grid;gap:8px;min-width:0;border-radius:10px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.case-card .case-art{margin:0;transition:transform .18s ease-out}
.case-open:hover .case-art{transform:translateY(-3px) scale(1.03)}
.case-open:active .case-art{transform:scale(.985)}
.case-card .drop-miniatures{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:0}
.case-card .drop-miniatures img{box-sizing:border-box;width:100%;height:auto;aspect-ratio:1;margin:0;padding:3px;object-fit:contain;background:#0f1012;border:1px solid #32363d;border-bottom:2px solid var(--rarity-color,#32363d);border-radius:7px;transition:transform .15s ease-out,background .15s}
.case-open:hover .drop-miniatures img{background:#17191d;border-color:#4a4f58 #4a4f58 var(--rarity-color,#4a4f58)}
.case-card .drop-miniatures img:hover{transform:translateY(-2px)}
/* The button under a hovered picture answers too, and the picture is ringed while the button has the keyboard's focus:
   the three are one control with one stop for the Tab key. */
.case-card:has(.case-open:hover) .primary{background:#f3dfba}
.case-card:has(.primary:focus-visible) .case-open{outline:2px solid #b78aff;outline-offset:3px}
.case-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.case-card .case-meta .text-button{flex:0 1 auto;width:auto;min-width:0;margin:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-size:12px;color:var(--case-accent)}
.case-card .case-meta .text-button::after{content:" →"}
.case-card .case-meta .text-button:hover{text-decoration:underline}
.case-shield{flex:none;display:inline-flex;align-items:center;gap:4px;padding:4px 8px 4px 6px;border:1px solid #3a3f47;border-radius:999px;background:#1b1d21;color:#eceef1;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1;white-space:nowrap;cursor:help}
.case-shield svg{flex:none;width:12px;height:12px;fill:var(--case-accent)}
.case-card .case-card-bottom{align-self:start;width:100%;margin:0;box-sizing:border-box}
/* The free case of the day: a label on the card of today's case. Green while the free opening waits to be taken. */
.case-card .daily-entry{align-self:flex-start;width:auto;margin:0;padding:5px 9px;border:1px solid #3a3f47;border-radius:999px;background:#101214eb;color:#cfd3d9;font-size:11px;font-weight:600;line-height:1.3;text-align:left;text-decoration:none}
.case-card .daily-entry.ready{border-color:#3fae6d;background:#103a25f2;color:#c9f5da;font-weight:700}
.case-card .daily-entry:hover{border-color:#6b7280}
.case-card .daily-entry.ready:hover{border-color:#62d391;background:#14492ff2}
@media(pointer:coarse){.case-card .case-meta .text-button{min-height:36px}}
/* The picture of the home slide opens its case as well. */
.featured-case .case-render[data-case]{cursor:pointer}

/* ---- The dialog -------------------------------------------------------------------------------------------------
   Little is written in it. The head: the case's name, the sound switch and the cross; under the name the case's marks
   (its shield, and how much of it is gathered, which is the way to the whole collection, both as on its card) and, at
   the right, the balance. Under the reel, three short lines at most: the prize, once there is one; the caption of
   the guarantee and, under it, its bar (all that is said about chances, here and nowhere else). Then the buttons. A
   notice (a refusal, a lost connection, the reminder to save) is one more line under the reel, only while there is one.
   What a line used to say in a sentence is the tooltip of the mark that took its place, and is said to a screen reader. */
.case-dialog{--drop-color:#e7d2ae;--case-accent:#e7d2ae;padding-bottom:8px}
.case-dialog .sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.case-dialog .dialog-head{flex-wrap:wrap;align-items:center;gap:6px 10px;padding:14px 12px 12px 22px}
.case-dialog .dialog-head h2{flex:1;min-width:0;margin:0;font-size:22px;line-height:1.2;overflow-wrap:anywhere;text-wrap:balance}
.case-tools{flex:none;display:flex;align-items:center;gap:2px}
.case-dialog .dialog-close{display:grid;place-items:center;width:36px;height:36px;padding:0;line-height:1}
.case-dialog .sound-toggle{display:grid;place-items:center;width:36px;height:36px;min-height:0;padding:0;border:0;border-radius:8px;background:none;color:#8a93a0;cursor:pointer}
.case-dialog .sound-toggle:hover{background:#ffffff12;color:#fff}
.case-dialog .sound-toggle[aria-pressed=true]{color:#ffe9b0}
.sound-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.sound-toggle .horn{fill:currentColor;stroke-width:1}
.sound-toggle .waves,.sound-toggle[aria-pressed=true] .mute{display:none}
.sound-toggle[aria-pressed=true] .waves{display:inline}
.case-dialog .case-marks{flex:1 0 100%;display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;min-width:0;margin:0;padding-right:10px}
.case-marks .text-button{width:auto;margin:0;padding:0;font-size:12px;line-height:1.3;text-align:left;white-space:nowrap}
.case-marks .text-button::after{content:" →"}
.case-marks .text-button:hover:enabled{text-decoration:underline}
/* under a finger the link is 36px high without making its row any higher */
@media(pointer:coarse){.case-marks .text-button{position:relative}.case-marks .text-button::before{content:"";position:absolute;inset:-10px -6px}}
.case-dialog .case-wallet{display:inline;margin-left:auto;padding:0;color:#ffcf61;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
/* the prize: its rarity as a mark, its name, «новый» or how many there are now, the shield and the strength */
.winner-reveal{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 14px;padding:12px 16px 0;animation:none}
.case-dialog.won .winner-reveal{animation:rewardIn .5s cubic-bezier(.2,.9,.2,1)}
.prize-name{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%}
.winner-reveal strong{display:inline;min-width:0;max-height:none;margin:0;overflow:visible;font-size:22px;line-height:1.2;letter-spacing:-.01em;overflow-wrap:anywhere}
.prize-badge{flex:none;padding:2px 8px;border:1px solid #3a3f47;border-radius:999px;background:#1b1d21;color:#cfd3d9;font-size:11px;font-weight:700;line-height:1.35;white-space:nowrap;cursor:help}
.prize-badge.new{border-color:#3fae6d;background:#103a25;color:#bff0d3}
.prize-marks{display:inline-flex;gap:6px}
.prize-marks .case-shield:last-child svg{fill:#ff8a94}
/* «Открыть ещё»: the dialog keeps its shape while the reel runs again. The chest stays away and the line of the last
   prize keeps its room, unseen, so the reel and the buttons stand where they stood. */
.case-dialog.again .case-stage{height:0;opacity:0}
.case-dialog.again.spinning .winner-reveal{visibility:hidden}
.case-dialog .case-result{min-height:0;padding:10px 20px 0;text-align:center;text-wrap:balance}
.case-dialog .case-result:empty{padding:0}
/* the guarantee: a caption and a bar in the legendary's gold, filled by the script through --fill (0 to 1) and moved
   by `transform` alone, like everything that moves in this dialog. It moves when a win is shown and stands still
   (.still) when the dialog opens on another case. The whole line is one image for a screen reader, and its tooltip
   says how many cases are left. */
.case-luck{display:grid;justify-items:center;gap:7px;margin:0;padding:13px 16px 13px;font-size:11px;line-height:1.3;color:#9aa2ad;text-align:center;cursor:help}
.luck-bar{display:block;width:min(280px,100%);height:6px;border-radius:3px;background:#ffffff1f;overflow:hidden}
.luck-bar i{display:block;height:100%;background:linear-gradient(90deg,#c9971c,#ffc745 60%,#ffe9a3);transform-origin:0 50%;transform:scaleX(var(--fill,0));transition:transform .6s cubic-bezier(.2,.8,.2,1)}
.case-luck.still .luck-bar i{transition:none}
/* the buttons: the one that opens, and after a win «Забрать» beside it; words too long for a button wrap inside it */
.case-dialog .dialog-actions{flex-wrap:nowrap;gap:8px;padding:2px 14px 12px}
.case-dialog .dialog-actions .dialog-action{flex:0 1 auto;max-width:100%;line-height:20px;white-space:normal}
.case-dialog:is(.won,.again) #revealButton{min-width:0;padding-inline:22px}
.case-dialog.again.spinning #revealButton{background:var(--surface-2);border:1px solid var(--control-line)}

/* ---- The reel ---------------------------------------------------------------------------------------------------
   The strip's left end stands under the marker and the script moves the strip by shares of its own length (app.js,
   «The reel»). That holds while every sticker is the same width with the same margin on both sides and the strip is
   nothing but its stickers: no gap, no padding. Only `transform` and `opacity` change while it runs. */
.roulette-shell{position:relative;isolation:isolate;height:214px;overflow:hidden;border-block:1px solid #2c3037;background:linear-gradient(180deg,#08090b,#111215 50%,#08090b);box-shadow:inset 0 14px 18px -14px #000,inset 0 -14px 18px -14px #000}
/* both ends fade out */
.roulette-shell::before,.roulette-shell::after{content:"";position:absolute;top:0;bottom:0;z-index:3;width:24%;pointer-events:none}
.roulette-shell::before{left:0;background:linear-gradient(90deg,#0a0b0d 6%,transparent)}
.roulette-shell::after{right:0;background:linear-gradient(-90deg,#0a0b0d 6%,transparent)}
.reel-track{position:absolute;z-index:1;left:50%;top:0;display:flex;align-items:center;gap:0;width:max-content;height:100%;margin:0;padding:0;will-change:transform}
.reel-item{position:relative;flex:none;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:150px;height:176px;margin:0 5px;padding:12px 10px 0;overflow:hidden;border:1px solid #2a2d33;border-radius:8px;background:linear-gradient(180deg,#24272c,#16181b 60%,color-mix(in srgb,var(--rarity-color) 28%,#15171a));box-shadow:none;filter:none;transition:none}
/* the bar in the rarity's colour */
.reel-item::after{content:"";position:absolute;left:0;right:0;bottom:0;height:4px;background:var(--rarity-color)}
.reel-item img{flex:none;width:118px;height:102px;object-fit:contain;filter:none;pointer-events:none;-webkit-user-drag:none}
.reel-item span{display:block;max-width:100%;margin-top:9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;line-height:1.2;color:#e3e6ea}
.reel-item small{display:block;margin-top:4px;font-size:9px;font-weight:700;line-height:1;letter-spacing:.12em;text-transform:uppercase;color:var(--rarity-color)}
/* the two rarest are their own metal, as on the cards of the collection: gold, and an opal of pink, violet and cyan */
.reel-item[data-rarity=legendary]{border-color:#6d5514;background:linear-gradient(180deg,#2c2715,#1c180b 56%,#62480a)}
.reel-item[data-rarity=legendary]::after{background:linear-gradient(90deg,#c9971c,#ffe9a3 30%,#ffc745 55%,#fff3c4 78%,#c9971c)}
.reel-item[data-rarity=legendary] small{color:#ffe08a}
.reel-item[data-rarity=mythic]{border-color:#7c2f6c;background:linear-gradient(180deg,#2b1a2e,#1a1027 56%,#5d1f5a)}
.reel-item[data-rarity=mythic]::after{background:linear-gradient(90deg,#ff5fba,#9b8cff 35%,#5fe1ff 60%,#ff5fba)}
.reel-item[data-rarity=mythic] small{color:#ff9bd3}
.case-dialog.spinning .reel-item{filter:none}
/* the marker: a thin line with a point at each end; the script makes it twitch at every sticker that passes */
.roulette-marker{position:absolute;z-index:5;left:50%;top:0;bottom:0;width:2px;margin-left:-1px;background:#ffe9b0;box-shadow:0 0 10px #ffcf6acc;pointer-events:none;transition:opacity .3s}
.roulette-marker::before,.roulette-marker::after{content:"";position:absolute;left:-6px;border-left:7px solid transparent;border-right:7px solid transparent}
.roulette-marker::before{top:0;border-top:10px solid #ffe9b0}
.roulette-marker::after{bottom:0;border-bottom:10px solid #ffe9b0}

/* The stop. The prize is lifted out and brought to the middle, the rest of the strip dims, the marker steps aside, and
   light in the rarity's colour comes up behind the prize: a little for a common sticker, a ring from an epic one up,
   turning rays and a sheen for a legendary and a mythic one. */
.case-dialog.won .reel-track{transition:transform .5s cubic-bezier(.2,.8,.2,1)}
.case-dialog.won .reel-item{opacity:.2;transition:opacity .35s,transform .5s cubic-bezier(.2,1.5,.35,1)}
.case-dialog.won .reel-item.winning span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow-wrap:anywhere}
.case-dialog.won .reel-item.winning{z-index:2;opacity:1;transform:translateY(-3px) scale(1.12);border-color:var(--rarity-color);box-shadow:0 0 0 1px var(--rarity-color),0 12px 36px -8px var(--rarity-color)}
.case-dialog.won .roulette-marker{opacity:0}
/* the running reel can be tapped (app.js, hurryReel) */
.case-dialog.spinning .roulette-shell{cursor:pointer}
.reel-burst{position:absolute;z-index:0;left:50%;top:50%;width:440px;height:440px;margin:-220px 0 0 -220px;border-radius:50%;background:radial-gradient(closest-side,color-mix(in srgb,var(--drop-color) 62%,transparent),color-mix(in srgb,var(--drop-color) 16%,transparent) 55%,transparent);opacity:0;pointer-events:none;--glow:.3}
.case-dialog.won .reel-burst{animation:reelGlow .9s cubic-bezier(.2,.8,.2,1) forwards}
.case-dialog.won[data-drop=rare] .reel-burst{--glow:.45}
.case-dialog.won[data-drop=epic] .reel-burst{--glow:.6}
.case-dialog.won[data-drop=legendary] .reel-burst{--glow:.8}
.case-dialog.won[data-drop=mythic] .reel-burst{--glow:.85;background:radial-gradient(closest-side,#ff5fba9e,#9b8cff40 50%,#5fe1ff1f 70%,transparent)}
@keyframes reelGlow{from{opacity:0;transform:scale(.35)}40%{opacity:1;transform:scale(1.08)}to{opacity:var(--glow);transform:scale(1)}}
/* a ring that runs out from the prize */
.reel-burst::after{content:"";position:absolute;inset:28%;border:2px solid var(--drop-color);border-radius:50%;opacity:0}
.case-dialog.won:is([data-drop=epic],[data-drop=legendary],[data-drop=mythic]) .reel-burst::after{animation:reelRing .9s ease-out .1s}
@keyframes reelRing{from{opacity:.9;transform:scale(.5)}to{opacity:0;transform:scale(2.6)}}
/* rays that turn slowly behind the prize */
.reel-burst::before{content:"";position:absolute;inset:-18%;border-radius:50%;background:repeating-conic-gradient(color-mix(in srgb,var(--drop-color) 46%,transparent) 0 5deg,transparent 5deg 20deg);-webkit-mask:radial-gradient(closest-side,#000 22%,transparent 78%);mask:radial-gradient(closest-side,#000 22%,transparent 78%);opacity:0}
.case-dialog.won:is([data-drop=legendary],[data-drop=mythic]) .reel-burst::before{opacity:.75;animation:reelRays 16s linear infinite}
.case-dialog.won[data-drop=mythic] .reel-burst::before{background:repeating-conic-gradient(#ff5fba70 0 5deg,transparent 5deg 20deg,#9b8cff70 20deg 25deg,transparent 25deg 40deg,#5fe1ff66 40deg 45deg,transparent 45deg 60deg)}
@keyframes reelRays{to{transform:rotate(360deg)}}
/* a sheen that crosses the prize */
.case-dialog.won .reel-item.winning:is([data-rarity=legendary],[data-rarity=mythic])::before{content:"";position:absolute;z-index:1;inset:0;background:linear-gradient(115deg,transparent 36%,#ffffff59 50%,transparent 64%);transform:translateX(-130%);animation:reelSheen 2.6s ease-in-out .5s infinite;pointer-events:none}
@keyframes reelSheen{0%,30%{transform:translateX(-130%)}70%,100%{transform:translateX(130%)}}

/* A phone: smaller stickers, so three of them are in sight at once. */
@media(max-width:600px){
  .roulette-shell{height:168px}
  .reel-item{width:108px;height:138px;margin:0 4px;padding:9px 7px 0}
  .reel-item img{width:88px;height:78px}
  .reel-item span{margin-top:7px;font-size:11px}
  .reel-item small{margin-top:3px;font-size:8px}
  .reel-burst{width:320px;height:320px;margin:-160px 0 0 -160px}
  .case-dialog .dialog-head{padding:12px 8px 10px 16px}
  .case-dialog .dialog-head h2{font-size:19px}
  .winner-reveal strong{font-size:18px}
  .winner-reveal{gap:6px 10px;padding-top:10px}
}
/* A narrow phone: every line stays one line. The prize's name and rarity are read on its sticker, right over the line
   (the name takes two lines there if it needs them), and the line keeps the three marks. The buttons share the row. */
@media(max-width:480px){
  .winner-reveal{flex-wrap:nowrap}
  .prize-name strong{display:none}
  .case-luck{padding:11px 12px 12px}
  .case-dialog .dialog-actions{padding-inline:12px}
  .case-dialog .dialog-actions .dialog-action{flex:1 1 auto;padding-inline:10px}
  .case-dialog:is(.won,.again) #revealButton{flex:0 0 auto;padding-inline:16px}
}
/* The narrowest (320px): the case's shield mark steps aside, so that its line stays one line. */
@media(max-width:340px){
  #caseShield{display:none}
  .case-dialog .dialog-head h2{font-size:18px}
  .case-marks .text-button{font-size:11.5px}
}
/* A low window (a phone on its side, a short browser window): the head is one row, the chest goes, the reel is the
   low one of a phone, and the lines close up, so that the prize, the guarantee's bar and the buttons are all in
   sight at once. */
@media(max-height:520px){
  .case-dialog .dialog-head{flex-wrap:nowrap;padding-top:6px;padding-bottom:6px}
  .case-dialog .dialog-head h2{flex:0 1 auto;font-size:18px}
  .case-dialog .case-marks{flex:1 1 auto;order:1;flex-wrap:nowrap}
  .case-tools{order:2}
  .case-dialog .case-stage{display:none}
  .case-dialog .roulette-shell{height:146px}
  .case-dialog .reel-item{width:108px;height:124px;margin:0 4px;padding:8px 7px 0}
  .case-dialog .reel-item img{width:88px;height:68px}
  .case-dialog .reel-item span{margin-top:6px;font-size:11px}
  .case-dialog .reel-item small{margin-top:3px;font-size:8px}
  .case-dialog .reel-burst{width:320px;height:320px;margin:-160px 0 0 -160px}
  .case-dialog .winner-reveal{padding-top:8px}
  .case-dialog .winner-reveal strong{font-size:18px}
  .case-dialog.won .reel-item.winning{transform:translateY(-2px) scale(1.07)}
  .case-luck{gap:5px;padding:8px 16px 8px}
  .case-dialog .dialog-actions{padding-bottom:8px}
  .case-dialog .dialog-actions .dialog-action{padding-top:10px;padding-bottom:10px}
}
/* Reduced motion: the prize is simply shown; nothing is lifted, turned or swept. */
@media(prefers-reduced-motion:reduce){
  .case-open .case-art,.case-card .drop-miniatures img,.case-dialog.won .reel-track,.case-dialog.won .reel-item{transition:none}
  .luck-bar i{transition:none}
  .case-open:hover .case-art,.case-open:active .case-art,.case-card .drop-miniatures img:hover{transform:none}
  .case-dialog.won .reel-item.winning{transform:none}
  .case-dialog.won .reel-burst{animation:none;opacity:var(--glow)}
  .case-dialog.won .winner-reveal,.case-dialog.won .reel-burst::before,.case-dialog.won .reel-burst::after,.case-dialog.won .reel-item.winning::before{animation:none!important}
  .case-dialog.won .reel-burst::before{opacity:0!important}
  .case-dialog.won .reel-item.winning::before{content:none!important}
}
/* rarity.css */
/* The two rarest tiers get their own surface: legendary is brushed gold with a travelling sheen,
   mythic is an opal that drifts between pink, violet and cyan. Only the card and the hover popup change;
   the sticker image itself is left alone. */
@keyframes rarity-sheen{to{background-position:-250% 0,0 0}}
@keyframes rarity-metal{to{background-position:100% 0}}
@keyframes rarity-twinkle{50%{opacity:.55}}

/* cards: inventory, catalog, quick strip */
.collection-card[data-rarity=legendary],.favorite-card[data-rarity=legendary]{
  border-color:#c9971c;box-shadow:0 0 0 1px #ffd76640,0 8px 26px #ffc74524;
  background:linear-gradient(115deg,#ffd76600 32%,#ffe9a366 46%,#fff7d91f 50%,#ffd76600 62%) 0 0/250% 100% no-repeat,linear-gradient(160deg,#5a4109,#211803 52%,#473207);
  animation:rarity-sheen 5s linear infinite}
.collection-card[data-rarity=mythic],.favorite-card[data-rarity=mythic]{
  border-color:#ff5fba;box-shadow:0 0 0 1px #ff5fba59,0 8px 30px #ff5fba33;
  background:linear-gradient(115deg,#ff5fba00 24%,#ff5fba73 38%,#9b8cff73 48%,#5fe1ff66 58%,#ff5fba00 74%) 0 0/250% 100% no-repeat,linear-gradient(160deg,#4a1140,#180a2b 50%,#0f2140);
  animation:rarity-sheen 3.6s linear infinite}
.collection-card[data-rarity=legendary] .collection-art,.favorite-card[data-rarity=legendary] .favorite-art{background:radial-gradient(ellipse at 50% 60%,#ffd7664d,transparent 72%)}
.collection-card[data-rarity=mythic] .collection-art,.favorite-card[data-rarity=mythic] .favorite-art{background:radial-gradient(ellipse at 50% 60%,#ff5fba47,#7a6bff1f 55%,transparent 75%)}
.collection-card[data-rarity=legendary] h3{color:#ffe9a3}
.collection-card[data-rarity=mythic] h3{color:#ffc4e6}

/* hover popup on the wall */
.target-info[data-rarity=legendary],.target-info[data-rarity=mythic]{overflow:hidden;border-width:1px;border-style:solid}
.target-info[data-rarity=legendary]{
  color:#2a1c00;border-color:#fff3c4;box-shadow:0 0 0 1px #b8860b,0 10px 34px #b8860b73,inset 0 1px 0 #fffbe6;
  background:linear-gradient(115deg,#c9971c,#ffe9a3 30%,#d4a017 55%,#fff6d0 78%,#c9971c) 0 0/220% 100%;
  animation:rarity-metal 9.3s ease-in-out infinite alternate}
.target-info[data-rarity=legendary] p{color:#5c4300}
.target-info[data-rarity=legendary] .hp-track{background:#0000002e}
.target-info[data-rarity=legendary] .hp-track i{background:#3d2a00}
.target-info[data-rarity=mythic]{
  color:#22062c;border-color:#fff0fa;box-shadow:0 0 0 1px #ff5fba,0 10px 38px #ff5fba80,inset 0 1px 0 #fff;
  background:linear-gradient(115deg,#ff8fcf,#c79bff 28%,#9be9ff 52%,#ffd9f0 76%,#ff8fcf) 0 0/220% 100%;
  animation:rarity-metal 8s ease-in-out infinite alternate}
.target-info[data-rarity=mythic]::after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(#fff 1px,transparent 1.6px) 3px 5px/19px 23px,radial-gradient(#fff 1px,transparent 1.4px) 12px 15px/31px 27px;animation:rarity-twinkle 3.3s ease-in-out infinite}
.target-info[data-rarity=mythic] p{color:#5b1d57}
.target-info[data-rarity=mythic] .hp-track{background:#ffffff73}
.target-info[data-rarity=mythic] .hp-track i{background:#6a1263}
@media(prefers-reduced-motion:reduce){[data-rarity=legendary],[data-rarity=mythic],.target-info[data-rarity=mythic]::after{animation:none}}
/* avatar.css */
/* The player's own avatar (avatar.js): the small picture by a nick, the picture in the header, and the dialog where it
   is chosen. A player's own picture is 32 by 32 points; where it is shown larger than that its points stay sharp. */

/* By a nick: a square as tall as the line it stands in, never taller. Its box is there before the picture is, and
   stays when no picture comes, so the line never moves. */
.nick-avatar,.leaders img.nick-avatar{display:inline-block;box-sizing:border-box;width:1.3em;height:1.3em;margin:-.2em .4em -.2em 0;vertical-align:-.25em;border-radius:3px;background:#8f9bb033;object-fit:cover}

/* In the header the avatar is the way into the dialog, so it is there at every width: smaller on a narrow screen. */
.mini-profile-avatar{flex:none;border-radius:50%}
.mini-profile-avatar .avatar{background:var(--surface-2,#1b2636)}
.avatar img[data-avatar=own],.avatar canvas{image-rendering:pixelated}
.mini-profile-avatar:hover .avatar,.mini-profile-avatar:focus-visible .avatar{border-color:#b78aff}
@media(max-width:1350px){.mini-profile .avatar{width:30px;height:30px}}
@media(max-width:650px){.mini-profile .avatar{width:28px;height:28px}}
/* A phone 360 points wide or less: the nick gives the avatar its room. At 345 and less (the narrowest phone is 320)
   the first row of the header has no room to spare at all: the gaps around the avatar close up, and the balance is
   drawn as tightly as it already was below 320. */
@media(max-width:360px){.mini-profile .avatar{width:26px;height:26px}.nick-button strong{max-width:62px}.mini-profile-avatar,.nick-button{gap:4px}}
@media(max-width:345px){.mini-profile .avatar{width:24px;height:24px}.topbar .mini-profile{gap:6px}.nick-button strong{max-width:56px}.topbar .balance{gap:5px;padding:0 6px 0 8px}}
@media(pointer:coarse){.mini-profile-avatar{position:relative}.mini-profile-avatar::after{content:"";position:absolute;inset:-9px -5px}}

/* The dialog. */
.avatar-dialog{width:min(460px,calc(100% - 24px))}
.avatar-panel{display:grid;gap:12px;justify-items:start}
.avatar-panel p{margin:0}
.avatar-stage{display:flex;flex-wrap:wrap;align-items:center;gap:16px;width:100%}
.avatar-large{flex:none;width:160px;height:160px;border:1px solid var(--control-line,#43516a);border-radius:10px;overflow:hidden;background:#fff}
.avatar-large .avatar-pic{display:block;width:100%;height:100%;object-fit:cover}
.avatar-large [data-avatar=own]{image-rendering:pixelated}
.avatar-seen{flex:1 1 150px;min-width:0;display:grid;gap:10px}
.avatar-caption{color:var(--text,#d8e1ef);font-weight:600}
.avatar-sample{display:flex;align-items:center;flex-wrap:wrap;gap:0 8px;min-width:0;font-size:13px;color:var(--text,#d8e1ef)}
.avatar-sample small{flex-basis:100%;color:var(--muted,#8f9bb0);font-size:11px}
.avatar-sample .avatar{border-color:var(--control-line,#536078);background:#fff}
.avatar-sample .avatar>*{display:block;width:100%;height:100%;object-fit:cover}
.avatar-sample-nick{gap:0}.avatar-sample-nick span{white-space:pre}.avatar-sample-nick b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400}
.avatar-text{font-size:12px}
.avatar-price{color:var(--text,#d8e1ef);font-weight:700}.avatar-price.owned{color:#58b97a;font-weight:600}
.avatar-short{color:#ffb86b;font-size:12px}
/* The foot (what was said last, and the buttons) stays in sight when the screen is too low for the whole dialog: the
   rest scrolls under it. */
.avatar-foot{position:sticky;bottom:0;z-index:1;justify-self:stretch;display:grid;gap:8px;margin-bottom:-12px;padding:10px 0 12px;background:var(--surface,#111a29)}
.avatar-actions{display:flex;flex-wrap:wrap;gap:8px}
.avatar-panel button{min-height:36px;padding:0 14px;border:1px solid var(--control-line,#43516a);border-radius:8px;background:var(--surface,#111a29);color:var(--text,#d8e1ef);font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.avatar-panel button.main{background:#8d46ff;border-color:#8d46ff;color:#fff}
.avatar-note{font-size:12px;color:var(--muted,#8f9bb0)}.avatar-note.bad{color:#ff8f8f}
@media(pointer:coarse){.avatar-panel button{min-height:44px}}
/* A narrow phone: the picture is smaller and what others see stays beside it. */
@media(max-width:380px){.avatar-large{width:104px;height:104px}.avatar-stage{gap:12px}.avatar-seen{flex-basis:120px;gap:8px}.avatar-text{font-size:11px;line-height:1.45}}
/* A phone on its side: the picture gives its height to the rest. */
@media(max-height:520px){.avatar-large{width:96px;height:96px}.avatar-panel{gap:8px}.avatar-dialog .dialog-head{padding-top:12px;padding-bottom:8px}.avatar-foot{padding-top:8px}}
/* quests.css */
/* Tasks of the day, the streak of days and achievements (quests.js): the chip in the heading of the sticker strip,
   the dialog, the mark by a nick, and the label of the streak's free opening on a case. */

/* The chip stands next to «Забрать стикеры», at every width: a sheet with lines of text (the mark of the tasks, drawn
   like the header's icons), how many of today's tasks are done, and a gold dot on the sheet's corner while something
   waits to be taken. On a narrow phone the heading's words give it their room (they stay for a screen reader). */
.favorites-panel .panel-heading .quests-chip{position:relative;display:inline-flex;align-items:center;gap:6px;flex:none;margin-left:auto;padding:6px 12px;border:1px solid #ffffff1f;border-radius:999px;background:#ffffff0a;color:var(--text,#edeef0);font:600 12px/1.2 inherit;white-space:nowrap;cursor:pointer}
.favorites-panel .panel-heading .quests-chip:hover{background:#ffffff17}
.favorites-panel .panel-heading .quests-chip.ready{border-color:#e0a23c}
.quests-sheet{position:relative;display:flex;flex:none}
.quests-sheet svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.quests-chip.ready .quests-sheet::after{content:"";position:absolute;right:-3px;top:-3px;width:7px;height:7px;border-radius:50%;background:#ffb84d;box-shadow:0 0 0 2px #1b1d22}
@media(max-width:480px){
  .favorites-panel .panel-heading{gap:8px}
  .favorites-panel .panel-heading:has(.quests-chip:not([hidden])) h2{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .favorites-panel .panel-heading .quests-chip{margin-left:0}
  .favorites-panel .panel-heading:has(.quests-chip:not([hidden])){justify-content:flex-start}
  .favorites-panel .panel-heading:has(.quests-chip:not([hidden])) .charge-button{margin-left:auto}
}
@media(pointer:coarse){.quests-chip::before{content:"";position:absolute;inset:-6px 0}}
/* A phone on its side: the strip is one low row with its buttons at the left; the chip is one more of them. */
@media (min-width:560px) and (max-height:520px){
  #view-wall .favorites-panel .panel-heading{gap:6px}
  #view-wall .favorites-panel .panel-heading .quests-chip{max-width:96px;height:auto;padding:5px 9px;border-radius:10px;font-size:11px;line-height:1.25;white-space:normal;text-align:center}
}

/* The mark by a nick: a sign and the number of achievements taken. */
.nick-badge{display:inline-block;margin-left:.4em;padding:0 .45em;border-radius:999px;background:#e0a23c2b;color:#ffcf61;font-size:.86em;font-weight:700;line-height:1.5;white-space:nowrap;vertical-align:baseline}

/* The streak's free opening on a case it can open: the corner of the card's picture that the case of the day does
   not use; on the home slide a line of its own. */
.case-card .streak-entry{justify-self:end}

/* The dialog: a wide sheet (the owner's word of 13 October 2026: a horizontal rectangle, bars, tabs), on a phone as
   wide as the screen with the same things stacked. Two tabs stand where the dialog's title would (the title itself is
   kept for a screen reader, and for a sheet that has no tabs yet): «Задания» and «Достижения», each with the number
   of things in it that wait. Both panes lie one over the other, so the sheet keeps one size. A row is ONE rectangle:
   its words, a bar, how far it is, and at its end what it pays, the button that takes it, or a tick; nothing in a row
   is a box of its own. Colour is where progress and reward are: blue for what is on its way, the gold of the
   guarantee bar for what waits to be taken and for coins, green for what is taken. */
.quests-dialog{width:min(780px,calc(100% - 20px));max-width:none;max-height:calc(100dvh - 12px)}
.quests-dialog .dialog-head{align-items:center;gap:10px;padding:14px 12px 4px 24px}
.quests-dialog .dialog-head h2{flex:1;min-width:0;margin:0;font-size:20px}
.quests-dialog .dialog-close{display:grid;place-items:center;flex:none;width:36px;height:36px;margin-left:auto;padding:0;line-height:1}
.quests-dialog:has(.quest-tabs) .dialog-head{position:absolute;top:0;right:0;z-index:4;padding:12px 12px 0 0;background:none}
.quests-dialog:has(.quest-tabs) .dialog-head h2{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* The sheet is exactly as wide as its rows (the dialog's margins are outside it): the note is laid out inside it. */
.quests-panel.rules-content{position:relative;margin:0 24px;padding:0 0 22px;color:var(--text,#edeef0);font-size:14px;line-height:1.3}
.quests-panel p{margin:0}
.quests-none,.quests-doubt{padding:6px 0 10px;color:var(--muted,#b0b4ba);font-size:13px;line-height:1.4}
.quests-doubt{color:#ffb86b}
.quest-tabs{display:flex;gap:22px;min-height:60px;margin-right:36px;padding-top:6px}
.quests-panel .quest-tab{position:relative;display:flex;align-items:center;gap:8px;padding:0;border:0;background:none;color:#8b9099;font:inherit;font-size:20px;font-weight:700;letter-spacing:-.01em;cursor:pointer}
.quests-panel .quest-tab:hover{color:var(--text,#edeef0)}
.quests-panel .quest-tab.on{color:var(--text,#edeef0);cursor:default}
.quest-tab.on::after{content:"";position:absolute;left:0;right:0;bottom:8px;height:3px;border-radius:2px;background:linear-gradient(90deg,#c9971c,#ffc745 60%,#ffe9a3)}
.quest-tab b{min-width:20px;padding:0 6px;border-radius:999px;background:#ffc745;color:#1b1300;font-size:12px;font-weight:800;line-height:20px;text-align:center;font-variant-numeric:tabular-nums}
.quest-panes{display:grid}
.quest-pane{grid-area:1/1;min-width:0}
.quest-pane.off{visibility:hidden}
.quests-part+.quests-part{margin-top:14px}
.quests-title{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:34px;padding:0 2px}
.quests-title h3{margin:0;color:var(--text,#edeef0);font-size:14px;font-weight:700}
.quests-title small{color:var(--muted,#b0b4ba);font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
.quest-rows{display:grid;gap:6px;list-style:none;margin:0;padding:0}
.quest-row{display:grid;grid-template-columns:minmax(0,210px) minmax(0,1fr) 84px 136px;align-items:center;gap:0 16px;min-height:52px;padding:0 10px 0 18px;border-radius:12px;background:#ffffff0a}
.quest-row.done{background:linear-gradient(90deg,#ffc74524,#ffc7450a 70%)}
.quest-name{min-width:0;font-weight:600}
.quest-row.claimed .quest-name,.quest-row.claimed .quest-count,.quest-got{color:#8b9099}
.quest-row.claimed .quest-name{font-weight:400}
.quest-bar{display:flex;gap:4px;min-width:0;height:8px}
.quest-bar i{flex:1;border-radius:4px;--c:#ffc745;background:linear-gradient(90deg,var(--c) calc(var(--fill,0)*100%),#ffffff1c calc(var(--fill,0)*100%))}
.quest-bar .ready{--c:#ffc745}
.quest-bar .got{--c:#ffc74580}
.quest-count{color:var(--muted,#b0b4ba);font-size:13px;font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.quest-pay{justify-self:end;padding-right:8px;color:#ffcf61;font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.quest-got{justify-self:end;display:grid;place-items:center;width:20px;height:20px;margin-right:6px}
.quest-got svg,.streak-mark svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
/* The one strong button, in the legendary's gold: «Забрать», and the way to a free case that waits. It keeps one width
   whatever it says, «Секунду…» too, so a press moves nothing. */
.quests-panel .quest-free{justify-self:end;min-width:136px;height:36px;padding:0 14px;border:0;border-radius:10px;background:linear-gradient(180deg,#ffd768,#f0b429);color:#1b1300;font:inherit;font-size:13px;font-weight:800;white-space:nowrap;cursor:pointer}
.quests-panel .quest-free:hover:enabled{background:linear-gradient(180deg,#ffe28c,#f7c148)}
/* A row whose reward waits is itself what is pressed (quests.js): it is gold, lighter under the pointer, a touch
   smaller while pressed, and where a button would stand it says «Забрать 10 ◎» in a quiet gold pill of one width
   («Секунду…» too). The day of the week whose prize waits is pressed the same way. */
.quest-claim{justify-self:end;box-sizing:border-box;min-width:128px;padding:0 14px;border-radius:999px;background:#ffc7452e;color:#ffd768;font-size:13px;font-weight:800;line-height:32px;text-align:center;white-space:nowrap}
.quests-panel .press[tabindex]{cursor:pointer;transition:transform .08s}
.quest-row.press{box-shadow:inset 0 0 0 1px #ffc74559}
.quest-row.press:active,.streak-mark.press:active{transform:scale(.985)}
.streak-mark.press{box-shadow:inset 0 0 0 2px #ffc745}
.streak-mark.going{opacity:.5}
.quests-panel .press[aria-disabled=true]{cursor:default;opacity:.6;transform:none}
@media(hover:hover){.quest-row.press:not([aria-disabled=true]):hover{background:linear-gradient(90deg,#ffc7453d,#ffc7451f 70%)}.quest-row.press:not([aria-disabled=true]):hover .quest-claim{background:#ffc74552}.streak-mark.press:not([aria-disabled=true]):hover{background:#ffc74540}}
.quests-panel .quest-link{justify-self:end;min-height:32px;padding:0 8px 0 0;border:0;background:none;color:var(--accent-text,#9eb1ff);font:inherit;font-size:13px;font-weight:600;white-space:nowrap;cursor:pointer}
.quests-panel .quest-link:hover:enabled{text-decoration:underline}
.quests-panel button:disabled{opacity:.5;cursor:default}

/* The week of the streak: seven cells, each with what its day gives. A day paid is green and ticked, one whose prize
   waits is gold, today's has a ring, the seventh is a case. Under them, only while there is something to take, the button. */
.streak-marks{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;list-style:none;margin:0;padding:0}
.streak-mark{position:relative;display:grid;place-items:center;height:52px;border-radius:12px;background:#ffffff0a;color:#8b9099;font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.streak-mark.case{color:#ffcf61}
.streak-mark.paid{background:#57c98a1f;color:#8fe0b4}
.streak-mark.paid::after{content:"✓";position:absolute;top:4px;right:8px;font-size:11px}
.streak-mark.due{background:#ffc74526;color:#ffcf61}
.streak-mark.next{color:var(--text,#edeef0)}
.streak-mark.today{box-shadow:inset 0 0 0 2px var(--accent-text,#9eb1ff)}
.streak-mark.today.due{box-shadow:inset 0 0 0 2px #ffc745}
.quest-acts{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:10px}

/* A thing that has more to say has a note (quests.js shows it, and gives the thing a place for the keyboard): the pointer over it is
   the one that asks, a row under it is a shade lighter, and stays so while its note shows. The note lies over the
   rows by the thing pressed, under it or over it, with a tail that points at it (--at, from the script); empty, it
   is nothing at all. */
.quests-panel [tabindex]{cursor:help;-webkit-tap-highlight-color:transparent}
.quests-panel [tabindex]:focus-visible,.quests-panel .quest-tab:focus-visible{outline:2px solid var(--accent-text,#9eb1ff);outline-offset:2px}
.quests-panel .quest-row:focus-visible,.quests-panel .streak-mark:focus-visible{outline-offset:-2px}
.quest-row.noted:not(.done){background:#ffffff14}
/* (a pointer that hovers passes through the note to the rows under it, so that leaving a row is leaving it) */
@media(hover:hover){.quest-row[tabindex]:not(.done):hover{background:#ffffff14}.quest-note{pointer-events:none}}
.quest-note{position:absolute;z-index:5;left:0;top:0;box-sizing:border-box;width:max-content;max-width:100%;padding:8px 11px;border:1px solid var(--control-line,#43484e);border-radius:8px;background:#2a2c30;box-shadow:0 8px 24px #000a;color:var(--text,#edeef0);font-size:13px;line-height:1.4;white-space:pre-line;cursor:default}
.quest-note::before{content:"";position:absolute;left:var(--at,20px);top:-5px;width:8px;height:8px;margin-left:-5px;border:solid var(--control-line,#43484e);border-width:1px 0 0 1px;background:inherit;transform:rotate(45deg)}
.quest-note.up::before{top:auto;bottom:-5px;border-width:0 1px 1px 0}
.quest-note:empty{display:block;padding:0;border:0;box-shadow:none}
.quest-note:empty::before{content:none}

/* A phone: a row is two lines, its words and what it pays over its bar and its count. */
@media(max-width:620px){
  .quests-dialog{width:calc(100% - 12px)}
  .quests-panel.rules-content{margin:0 12px;padding:0 0 14px}
  .quest-tabs{gap:18px;min-height:54px}
  .quests-panel .quest-tab{font-size:18px}
  .quest-row{grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;min-height:64px;padding:8px 8px 10px 14px}
  .quest-row>:nth-child(1){grid-area:1/1}.quest-row>:nth-child(2){grid-area:2/1/3/3;margin-right:96px}.quest-row>:nth-child(3){grid-area:2/2}.quest-row>:nth-child(4){grid-area:1/2;min-height:30px}
  .quests-panel .quest-free{min-width:0;height:32px;padding:0 12px}
  .quest-claim{min-width:0;padding:0 12px;line-height:30px}
  .quest-pay,.quest-got,.quests-panel .quest-link{margin-right:0;padding-right:2px}
  .streak-marks{gap:4px}.streak-mark{height:46px;border-radius:10px;font-size:12px}
  .streak-mark.paid::after{top:2px;right:5px;font-size:9px}
}
