/* Cases room + shared item visuals (cases/cases.js, cases/items.js). */

.r-common { --r: #b9b0d6; } .r-rare { --r: #22e4d9; } .r-epic { --r: #b77bff; } .r-legendary { --r: #ffd23f; }
.item-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.item-svg .glow { filter: drop-shadow(0 0 3px rgba(255, 255, 255, .9)); }

/* ---------- Room ---------- */
.cases { width: min(1120px, 100%); margin-top: 14px; text-align: left; }
.cases-demo {
  display: flex; align-items: center; gap: 10px; width: fit-content; margin: 0 auto 22px;
  padding: 8px 14px; border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 999px;
  background: rgba(10, 6, 22, .6); color: var(--muted); font-size: 13px;
}
.cases-demo b {
  padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #14081f;
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
}
.case-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.case-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 16px 16px 18px; border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line));
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%),
    rgba(16, 10, 34, .88);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.case-card:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 18px 40px -18px var(--c); }
.case-art { aspect-ratio: 200 / 150; margin: -4px -6px 2px; }
.case-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.case-lid { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); transform-box: fill-box; transform-origin: 15% 100%; }
.case-card:hover .case-lid { transform: translateY(-8px) rotate(-5deg); }
/* Royale chests are drawn at half scale, so the lid lifts further in its own units. */
.case-card:hover .royale .case-lid { transform: translateY(-18px) rotate(-6deg); }
.case-seam { animation: seam 2.4s ease-in-out infinite; }
@keyframes seam { 50% { opacity: .25; } }
.case-card h3 { font: 400 20px/1.15 Cinzel, Georgia, serif; color: #fff; letter-spacing: .5px; }
.case-card p { color: var(--muted); font-size: 14px; min-height: 2.6em; }
.odds-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; background: rgba(0, 0, 0, .3); }
.odds-bar i { background: var(--r); min-width: 4px; }
.odds-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; font-weight: 600; }
.odds-legend span { color: var(--r); }
.case-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 6px; }
.case-actions .btn-primary { background: var(--c); }
.case-actions .btn-ghost { --accent: var(--c); }

.case-drops { margin-top: 30px; }
.case-drops header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.case-drops h3 { font-size: 16px; font-weight: 700; }
.case-drops header span { color: var(--muted); font-size: 13px; }
.drop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.drop, .bag-item, .reel-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 14px; border: 1px solid color-mix(in srgb, var(--r) 45%, transparent);
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--r) 30%, transparent), rgba(12, 7, 25, .9) 70%);
}
.drop { padding: 12px 8px 10px; }
.drop .item-svg { width: 54px; height: 54px; }
.drop span { font-size: 11.5px; font-weight: 600; text-align: center; color: var(--text); line-height: 1.25; }
.drop i, .bag-item i {
  position: absolute; top: 5px; right: 6px; font-style: normal; font-size: 10px; font-weight: 800;
  padding: 1px 5px; border-radius: 6px; background: var(--r); color: #14081f;
}

/* ---------- Backpack + Character (filled by items.js) ---------- */
.bag-item { aspect-ratio: 1; padding: 7px; cursor: pointer; color: inherit; }
.bag-item:hover { border-color: var(--r); box-shadow: 0 0 0 1px var(--r); }
.equip .slot.filled {
  border: 1px solid var(--r); cursor: pointer; padding: 6px 4px 4px; color: var(--text);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--r) 28%, transparent), rgba(31, 21, 64, .7) 70%);
}
.equip .slot.filled .item-svg { width: 34px; height: 34px; }
.equip .slot.filled span { font-size: 9.5px; text-align: center; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mannequin path, .mannequin rect, .mannequin circle { transition: fill .3s ease; }
.mannequin .man-wear * { stroke-width: inherit; }
.mannequin .man-wear path { stroke-linejoin: round; }

/* ---------- Opening stage ---------- */
.case-stage {
  --accent: var(--c);
  width: min(920px, calc(100% - 24px)); max-height: calc(100dvh - 24px);
  margin: auto; padding: 0; overflow: hidden auto;
  border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); border-radius: 22px;
  background: radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--c) 20%, #150d2a), #0f0920 70%);
  color: var(--text);
}
.case-stage::backdrop { background: rgba(5, 2, 12, .78); backdrop-filter: blur(4px); }
.stage-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 6px 24px; }
.stage-head small { display: block; color: var(--c); font-size: 11px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; }
.stage-head strong { font: 400 24px/1.2 Cinzel, Georgia, serif; }

.reel-wrap { position: relative; margin: 22px 0 10px; }
.reel {
  overflow: hidden; padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.reel-track { display: flex; column-gap: 10px; width: max-content; will-change: transform; }
.reel-tile { flex: none; width: 128px; height: 150px; padding: 12px 8px; }
.reel-tile .item-svg { width: 74px; height: 74px; }
.reel-tile span { font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.2; color: var(--text); }
.reel-tile::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 4px; border-radius: 4px 4px 0 0; background: var(--r); }
.reel-marker {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; transform: translateX(-50%);
  background: #fff; border-radius: 3px; box-shadow: 0 0 12px var(--c), 0 0 2px #fff;
}
.reel-marker::before, .reel-marker::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  border: 9px solid transparent;
}
.reel-marker::before { top: -2px; border-top-color: #fff; }
.reel-marker::after { bottom: -2px; border-bottom-color: #fff; }
.case-stage.landed .reel-tile.win { animation: win-pop .5s ease forwards; z-index: 1; }
@keyframes win-pop { 50% { transform: scale(1.12); } 100% { transform: scale(1.06); box-shadow: 0 0 0 2px var(--r), 0 0 40px var(--r); } }

.reveal { position: relative; display: grid; place-items: center; padding: 20px 20px 10px; overflow: hidden; }
.reveal-burst { position: absolute; left: 50%; top: 42%; width: 0; height: 0; }
.reveal-burst i {
  position: absolute; left: -2px; top: 0; width: 4px; height: 210px; transform-origin: 50% 0;
  background: linear-gradient(var(--r), transparent); border-radius: 4px; opacity: 0;
  transform: rotate(var(--a)) scaleY(.2);
  animation: ray 1.1s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes ray { 30% { opacity: .9; } 100% { opacity: .18; transform: rotate(var(--a)) scaleY(1); } }
.reveal.r-legendary .reveal-burst { animation: spin-rays 14s linear infinite; }
@keyframes spin-rays { to { transform: rotate(360deg); } }
.reveal-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; animation: card-in .55s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes card-in { from { transform: scale(.6) translateY(20px); opacity: 0; } }
.reveal-art {
  width: 170px; height: 170px; padding: 26px; border-radius: 28px;
  border: 2px solid var(--r);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--r) 42%, transparent), #0c0719 72%);
  box-shadow: 0 0 60px -6px var(--r);
}
.reveal-art .item-svg { animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-3deg); } }
.reveal-rarity { margin-top: 10px; color: var(--r); font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.reveal h2 { font: 400 28px/1.15 Cinzel, Georgia, serif; }
.reveal p { color: var(--muted); font-size: 14px; }
.reveal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.reveal-actions a { display: inline-flex; align-items: center; text-decoration: none; }
.reveal-actions .btn-primary { background: var(--r); }
.pill-ok { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 10px; background: rgba(125, 255, 106, .14); color: #7dff6a; font-weight: 700; font-size: 14px; }

.contents { padding: 8px 24px 4px; }
.contents section + section { margin-top: 18px; }
.contents h4 { color: var(--r); font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 10px; }
.contents h4 span { color: var(--muted); font-weight: 600; letter-spacing: 0; text-transform: none; margin-left: 6px; }
.contents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.contents-grid .reel-tile { width: auto; height: 138px; }
.contents-foot { display: flex; justify-content: center; margin: 20px 0 6px; }
.contents-foot .btn-primary { background: var(--c); }

.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px 22px; }
.stage-foot .btn-primary { background: var(--c); min-width: 180px; height: 42px; }
.stage-foot .btn-primary[hidden] { display: none; }
.quick { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.quick input { accent-color: var(--c); width: 16px; height: 16px; }

@media (max-width: 640px) {
  .case-shelf { grid-template-columns: 1fr; }
  .reel-tile { width: 104px; height: 128px; }
  .reel-tile .item-svg { width: 58px; height: 58px; }
  .reveal-art { width: 140px; height: 140px; padding: 20px; }
  .reveal h2 { font-size: 22px; }
  .stage-head { padding-left: 18px; }
  .contents { padding: 8px 16px 4px; }
  .contents-grid { grid-template-columns: repeat(3, 1fr); }
  .stage-foot { padding: 12px 16px 18px; }
  .stage-foot .btn-primary { min-width: 0; flex: 1; }
}

.drop-grid .empty-line { grid-column: 1 / -1; }

/* Badges and sparkles on the case cards */
.tier-badge {
  display: inline-flex; width: fit-content; padding: 3px 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  color: #14081f; background: var(--r);
}
.tier-spark { transform-box: fill-box; transform-origin: center; animation: spark 2.2s ease-in-out infinite; }
@keyframes spark { 0%, 100% { opacity: 0; transform: scale(.3); } 50% { opacity: 1; transform: scale(1); } }

.case-actions .btn-primary { white-space: nowrap; padding: 0 12px; }

/* MMO daylight look: case and item art keep their colours but lose the neon edge. */
.case-svg, .item-art > svg, .col-item svg, .slot svg:not(.ico) { filter: saturate(.72) sepia(.14) brightness(.97); }

/* ---------- Rank cases + Ranking panel unlocks ---------- */
.rank-cases { margin-top: 34px; }
.rank-cases > header { margin-bottom: 14px; }
.rank-cases h3 { font-size: 16px; font-weight: 700; }
.rank-cases header p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.case-card.rank-case { border-width: 2px; }
.rank-badge { background: var(--c) !important; color: #2b1d12 !important; }
.case-card.locked .case-art, .case-card.locked h3, .case-card.locked p, .case-card.locked .odds-bar, .case-card.locked .odds-legend { filter: grayscale(.85) brightness(.85); opacity: .7; }
.case-card.locked .btn-primary { background: #9b8f7a !important; cursor: not-allowed; }
.case-lock {
  position: absolute; top: 18%; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 16px; border-radius: 14px;
  background: rgba(43, 29, 18, .85); color: #fff8ea; text-align: center; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .6);
}
.case-lock .ico { width: 22px; height: 22px; color: var(--c); }
.case-lock b { font-size: 13px; }
.case-lock span { font-size: 11.5px; opacity: .85; }

.chat-title { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: #f2a33a; color: #2b1d12; font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.toast.rank-up { border-color: #f2a33a; box-shadow: 0 0 0 2px rgba(242, 163, 58, .35), 0 12px 30px -12px rgba(242, 163, 58, .8); }

/* Item icon finish (cases/items.js art()) */
.ii .ii-rays { transform-box: view-box; transform-origin: 32px 32px; animation: ii-spin 14s linear infinite; }
.ii .ii-swirl { transform-box: view-box; transform-origin: 32px 32px; animation: ii-spin 9s linear infinite reverse; }
@keyframes ii-spin { to { transform: rotate(360deg); } }
.ii .ii-spark { transform-box: fill-box; transform-origin: center; animation: ii-twinkle 2.4s ease-in-out infinite; }
@keyframes ii-twinkle { 0%, 100% { opacity: .2; transform: scale(.5); } 50% { opacity: 1; transform: scale(1); } }
/* Legendary glows gold and pulses: the icon's art, its card (drops, reel, backpack, character slots, the win), and the
   legendary pieces on the character in the backpack and in the city (items.js portraitSvg .av-glow). */
@keyframes legend-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.ii .ii-legend-glow, .av-glow { animation: legend-pulse 2.4s ease-in-out infinite; }
.r-legendary:is(.drop, .bag-item, .reel-tile, .sf-slot.filled, .sf-cell, .slot.filled)::before, .reveal.r-legendary .reveal-art::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 16px 2px rgba(255, 210, 63, .75), inset 0 0 12px rgba(255, 210, 63, .55);
  animation: legend-pulse 2.4s ease-in-out infinite;
}
.reveal.r-legendary .reveal-art, .slot.filled.r-legendary { position: relative; }
@media (prefers-reduced-motion: reduce) {
  .ii .ii-legend-glow, .av-glow, .r-legendary:is(.drop, .bag-item, .reel-tile, .sf-slot.filled, .sf-cell, .slot.filled)::before, .reveal.r-legendary .reveal-art::before { animation: none; opacity: .8; }
}
/* Bigger icons on Marketplace cards so the detail shows (scoped to listings only) */
.listing .item-art > svg.ii { width: 104px; height: 104px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); transition: transform .25s ease; }
.listing:hover .item-art > svg.ii { transform: translateY(-4px) scale(1.06) rotate(-3deg); }

/* ---------- Inventory window (Shakes & Fidget style) ---------- */
.sf-inv {
  width: min(1040px, calc(100% - 24px)); max-height: calc(100dvh - 24px);
  margin: auto; padding: 0; border: 0; background: transparent; overflow: visible; color: #3b2a1a;
}
.sf-inv::backdrop { background: rgba(20, 12, 4, .62); backdrop-filter: blur(3px); }
.sf-book {
  position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: 0;
  padding: 18px; border-radius: 22px;
  background: linear-gradient(135deg, #7a4a24, #5a3418 60%, #4a2a12);
  box-shadow: 0 0 0 3px #2b1d12, 0 0 0 6px #c9a46a, 0 24px 60px -16px rgba(0, 0, 0, .7);
  max-height: calc(100dvh - 24px); overflow: auto;
}
.sf-book::before, .sf-book::after {
  content: ''; position: absolute; width: 26px; height: 26px; border: 3px solid #f2c14e; border-radius: 4px; pointer-events: none;
}
.sf-book::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.sf-book::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.sf-page {
  padding: 18px 20px; min-width: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .5), transparent 60%), #f4e4c1;
  box-shadow: inset 0 0 40px rgba(122, 74, 36, .35);
}
.sf-left { border-radius: 14px 4px 4px 14px; border-right: 2px solid #c9a46a; }
.sf-right { border-radius: 4px 14px 14px 4px; }
.sf-close {
  position: absolute; top: -12px; right: -12px; z-index: 3; width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid #2b1d12; background: #e0662f; color: #fff8ea; font-weight: 900; font-size: 16px; cursor: pointer;
  box-shadow: 0 3px 0 #8a3a14;
}
.sf-head { text-align: center; margin-bottom: 8px; }
.sf-head h2 { font: 900 24px/1.1 Cinzel, Georgia, serif; color: #3b2a1a; }
.sf-head span { font-size: 13px; color: #7a6247; font-weight: 700; }
.sf-doll { display: grid; grid-template-columns: 78px 1fr 78px; gap: 10px; align-items: center; }
.sf-col { display: grid; gap: 10px; }
.sf-slot, .sf-cell {
  --r: #cfc6b2;
  position: relative; aspect-ratio: 1; border-radius: 10px; padding: 5px; display: grid; place-items: center;
  background: linear-gradient(180deg, #3a2a1a, #2b1d12);
  box-shadow: inset 0 0 0 2px #2b1d12, inset 0 0 0 4px color-mix(in srgb, var(--r) 70%, #5a4228), inset 0 6px 12px rgba(0, 0, 0, .45);
  color: #a08a6a; border: 0; cursor: default;
}
.sf-slot.filled, .sf-cell[data-uid] { cursor: pointer; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--r) 40%, #3a2a1a), #2b1d12 75%); }
.sf-slot .item-svg, .sf-cell .item-svg { width: 100%; height: 100%; }
.sf-slot-empty { display: grid; place-items: center; gap: 2px; opacity: .75; }
.sf-slot-empty .ico { width: 26px; height: 26px; }
.sf-slot-empty small { font-size: 9.5px; font-weight: 700; }
.sf-slot.can-drop { box-shadow: inset 0 0 0 2px #2b1d12, inset 0 0 0 4px #7dff6a, 0 0 14px #7dff6a; }
.sf-slot.drop-hover, .sf-bag.drop-hover { outline: 3px dashed #e0662f; outline-offset: 2px; }
.sf-slot.filled:hover, .sf-cell[data-uid]:hover { transform: translateY(-2px); filter: brightness(1.12); }
.sf-portrait {
  border-radius: 14px; padding: 6px; min-height: 0;
  background: radial-gradient(circle at 50% 35%, #fff8ea, #e8d2a6 70%);
  box-shadow: inset 0 0 0 3px #c9a46a, inset 0 0 0 5px #2b1d12, inset 0 0 30px rgba(122, 74, 36, .35);
}
.sf-hero { width: 100%; height: auto; display: block; }
.sf-power {
  margin: 12px auto 0; width: fit-content; display: flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 999px;
  background: #2b1d12; color: #f2c14e; box-shadow: 0 0 0 2px #c9a46a;
}
.sf-power span { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: #e8d2a6; }
.sf-power b { font: 900 22px Cinzel, Georgia, serif; }
.sf-right h3 { font: 900 16px Cinzel, Georgia, serif; color: #3b2a1a; margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; }
.sf-right h3 small { font: 600 12px Inter, sans-serif; color: #7a6247; }
.sf-stats { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.sf-stats li { display: grid; grid-template-columns: 26px 110px 1fr 64px; align-items: center; gap: 8px; font-size: 13.5px; }
.sf-stat-ico { font-size: 16px; text-align: center; }
.sf-stats b { font-weight: 800; }
.sf-stats i { height: 10px; border-radius: 6px; background: #d9c4a0; box-shadow: inset 0 0 0 1px #b8996a; position: relative; overflow: hidden; }
.sf-stats i::after { content: ''; position: absolute; inset: 0; width: var(--w); border-radius: 6px; background: linear-gradient(90deg, #e0662f, #f2c14e); }
.sf-stats em { font-style: normal; font-weight: 900; text-align: right; }
.sf-stats em small { color: #2f9e4f; font-weight: 800; }
.sf-sub { display: flex; gap: 18px; font-size: 13.5px; padding: 8px 12px; margin-bottom: 12px; border-radius: 10px; background: rgba(122, 74, 36, .12); }
.sf-bag-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sf-sort { display: flex; gap: 4px; }
.sf-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 8px; }
.sf-sort button, .sf-tabs button { padding: 4px 10px; border-radius: 999px; border: 2px solid #c9a46a; background: #fff8ea; color: #7a6247; font-weight: 700; font-size: 12px; cursor: pointer; }
.sf-sort button[aria-pressed="true"], .sf-tabs button[aria-selected="true"] { background: #e0662f; border-color: #8a3a14; color: #fff8ea; }
.sf-bag { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 8px; border-radius: 12px; background: rgba(43, 29, 18, .12); }
.sf-cell.empty { opacity: .55; }
.sf-eq, .sf-bound { position: absolute; font-style: normal; font-size: 9px; font-weight: 900; line-height: 1; }
.sf-eq { top: 3px; left: 4px; padding: 2px 4px; border-radius: 4px; background: #f2c14e; color: #2b1d12; }
.sf-bound { bottom: 3px; right: 3px; font-size: 10px; }
.sf-cell.eq { box-shadow: inset 0 0 0 2px #2b1d12, inset 0 0 0 4px #f2c14e, inset 0 6px 12px rgba(0, 0, 0, .45); }
.sf-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; font-weight: 800; font-size: 13px; }
.sf-pager button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #2b1d12; background: #c9a46a; color: #2b1d12; font-weight: 900; cursor: pointer; }
.sf-help { margin-top: 6px; font-size: 12px; color: #7a6247; text-align: center; }
.sf-tip {
  position: fixed; z-index: 10; width: 250px; pointer-events: none; padding: 0 0 10px; border-radius: 12px; overflow: hidden;
  background: #fff8ea; color: #3b2a1a; box-shadow: 0 0 0 2px #2b1d12, 0 0 0 4px #c9a46a, 0 16px 30px -10px rgba(0, 0, 0, .6);
  font-size: 13px;
}
.sf-tip header { --r: #cfc6b2; padding: 10px 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--r) 55%, #fff8ea), #fff8ea); border-bottom: 2px solid #e8d2a6; }
.sf-tip header b { display: block; font: 900 16px Cinzel, Georgia, serif; }
.sf-tip header span { font-size: 11.5px; color: #7a6247; font-weight: 700; }
.sf-tip-big { margin: 8px 12px 0; font-weight: 800; }
.sf-tip ul { list-style: none; margin: 8px 12px 0; padding: 0; display: grid; gap: 3px; }
.sf-tip li { display: grid; grid-template-columns: 1fr auto 44px; gap: 6px; align-items: center; }
.sf-tip li b { color: #2f9e4f; }
.sf-tip .up { color: #2f9e4f; font-weight: 800; font-size: 12px; text-align: right; }
.sf-tip .down { color: #c0392b; font-weight: 800; font-size: 12px; text-align: right; }
.sf-tip p { margin: 8px 12px 0; }
.sf-tip footer { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 12px 0; font-size: 11px; color: #7a6247; }
.sf-tag { padding: 2px 7px; border-radius: 6px; background: #2b1d12; color: #f2c14e; font-weight: 800; }

@media (max-width: 760px) {
  .sf-book { grid-template-columns: 1fr; padding: 12px; }
  .sf-left { border-radius: 14px 14px 4px 4px; border-right: 0; border-bottom: 2px solid #c9a46a; }
  .sf-right { border-radius: 4px 4px 14px 14px; }
  .sf-doll { grid-template-columns: 62px 1fr 62px; }
  .sf-bag { grid-template-columns: repeat(5, 1fr); }
  .sf-stats li { grid-template-columns: 22px 92px 1fr 54px; font-size: 12.5px; }
  .sf-close { top: 4px; right: 4px; }
  .sf-tip { width: min(260px, calc(100vw - 16px)); }
}
