/* RS player interface · warm ivory / oxblood / muted brass */
:root {
  color-scheme: light;
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: #2d2728;
  background: #eeeae7;
  --paper: #faf8f5;
  --surface: #fff;
  --ink: #2d2728;
  --muted: #777176;
  --line: #e9e4df;
  --brand: #8b2639;
  --brand-hover: #6e1c2c;
  --brand-soft: #f6eaed;
  --gold: #a1804b;
  --positive: #16715c;
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100dvh; background: #eeeae7; }
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, a, input, summary { touch-action: manipulation; }
button { transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease; }
button:disabled { opacity: .42; cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #ad8190; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { width: min(100%, 1080px); min-height: 100dvh; margin: auto; padding: 0 32px calc(106px + env(safe-area-inset-bottom)); background: var(--paper); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 88px; padding-top: env(safe-area-inset-top); }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand-mark { position: relative; display: grid; place-items: center; width: 100px; height: 46px; overflow: hidden; border-radius: 10px; background: #762334; }
.brand img { position: absolute; top: 50%; left: 50%; width: 110px; height: 110px; max-width: none; object-fit: contain; transform: translate(-50%,-52%); }
.brand-label { padding-left: 14px; border-left: 1px solid var(--line); color: var(--muted); font-size: 13px; letter-spacing: .12em; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-account { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; min-height: 44px; border: 0; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 700; }
.header-account svg { width: 18px; height: 18px; }
.language-button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; }
.language-button img { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; }
.language-button svg { width: 11px; height: 11px; }
.hero { position: relative; width: 100%; aspect-ratio: 3.65; overflow: hidden; border-radius: 20px; background: #3f1520; }
.hero-art { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 43%; }
.hero:after { position: absolute; inset: 0; content: ''; background: linear-gradient(90deg, #2d0e1cea 0%, #3e132494 35%, transparent 65%); pointer-events: none; }
.hero-copy { position: absolute; top: 50%; left: 36px; z-index: 1; transform: translateY(-50%); max-width: 60%; color: #fff; }
.hero-copy small { color: #ead1a1; font-size: 10px; font-weight: 600; letter-spacing: .22em; }
.hero-copy h1 { margin: 12px 0; font-size: clamp(24px, 3.8vw, 38px); font-weight: 700; line-height: 1.45; letter-spacing: .07em; }
.hero-copy p { margin: 0; color: #e9dadc; font-size: 13px; line-height: 1.6; }
.hero-copy h1 span { display: block; }
.hero.store-carousel { aspect-ratio: 3; }
.hero.store-carousel .hero-art { object-fit: contain; }
.hero.store-carousel .hero-copy, .hero.store-carousel:after { display: none; }
.hero.carousel-unavailable { min-height: 90px; }
.announcement { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0; margin: 8px 0 12px; color: #75666a; }
.announcement-icon { display: none; }
.announcement-label { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--brand); font-size: 12px; font-weight: 700; }
.announcement-label svg { width: 16px; height: 16px; }
.announcement p { min-width: 0; flex: 1; overflow: hidden; margin: 0; font-size: 12px; white-space: nowrap; }
#marqueeText { display: inline-block; vertical-align: middle; }
#marqueeText.scrolling { animation: shop-marquee var(--marquee-duration,20s) linear infinite; }
@keyframes shop-marquee { 0%,12% { transform: translateX(0); } 88%,100% { transform: translateX(calc(-1 * var(--marquee-distance,0px))); } }
.announcement button { display: grid; place-items: center; flex: none; width: 44px; height: 36px; padding: 0; border: 0; border-radius: 8px; color: var(--muted); background: transparent; }
.announcement button svg { width: 14px; height: 14px; }
.member-strip { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: center; gap: 18px; margin: 0 0 30px; padding: 20px 24px; min-height: 100px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.member-identity { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.member-identity img { width: 48px; height: 48px; object-fit: contain; flex: none; }
.member-identity span { min-width: 0; }
.member-identity small, .wallet>span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.member-identity b { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; }
.wallet { min-width: 0; padding: 0 0 0 24px; border: 0; border-left: 1px solid var(--line); background: transparent; text-align: left; }
.wallet b { display: flex; align-items: baseline; gap: 7px; color: var(--brand); font-size: 28px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wallet b span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wallet i { display: none; }
.member-medal { display: none; }
.member-entry { display: grid; place-items: center; width: 36px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: var(--paper); color: var(--muted); }
.member-entry svg { width: 18px; height: 18px; }
.lobby { display: block; }
.lobby-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.lobby-heading h2 { margin: 0 0 5px; font-size: 23px; line-height: 1.4; letter-spacing: .04em; }
.lobby-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.catalog-label { font-size: 10px; color: var(--gold); letter-spacing: .14em; white-space: nowrap; }
.type-tabs { display: flex; gap: 26px; min-height: 52px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.type-tabs button { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 52px; padding: 0 4px 12px; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
.type-tabs button svg { width: 20px; height: 20px; }
.type-tabs button.active { color: var(--brand); font-weight: 700; }
.type-tabs button.active:after { position: absolute; bottom: -1px; right: 0; left: 0; height: 3px; border-radius: 4px; content: ''; background: var(--brand); }
.category-icon { display: none; }
.lobby-content { min-width: 0; }
.filter-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: var(--muted); font-size: 11px; }
.filter-heading span:last-child { color: #7b6c70; }
.catalog-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-width: 0; }
.provider-tabs { display: flex; flex: 1; min-width: 0; gap: 8px; padding: 3px 2px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #d8cccf transparent; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.provider-tabs button, .loading-chip { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: 8px; min-width: 76px; min-height: 48px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; scroll-snap-align: start; }
.provider-tabs button.active { border-color: #aa7a88; background: var(--brand-soft); color: var(--brand); }
.provider-tabs button.provider-icon { flex-direction: column; gap: 5px; width: 78px; height: 65px; padding: 5px 8px; }
.provider-icon img { display: block; width: 50px; height: 32px; padding: 2px; object-fit: contain; background: #2e202c; border-radius: 6px; }
.provider-label { font-size: 10px; line-height: 1.2; letter-spacing: .05em; }
.catalog-toolbar>button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface); }
.catalog-toolbar>button svg { width: 19px; height: 19px; }
.game-search { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 20px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.game-search:focus-within { border-color: #b88494; box-shadow: 0 0 0 3px #8b263910; }
.game-search svg { flex: none; width: 19px; height: 19px; color: #91888e; }
.game-search input { width: 100%; min-width: 0; min-height: 48px; padding: 10px 0; border: 0; outline: none; border-radius: 12px; background: transparent; color: var(--ink); font-size: 14px; }
.game-search input::placeholder { color: #928c91; }
.game-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 20px 16px; }
.game-card { display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; }
.game-card:active { transform: scale(.985); }
.game-art { display: grid; place-items: center; width: 100%; aspect-ratio: 1; overflow: hidden; background: #eee5e6; }
.game-card-live .game-art { aspect-ratio: 3/4; }
.game-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.game-fallback { color: var(--brand); font-size: 24px; font-weight: 700; }
.game-meta { display: flex; flex-direction: column; width: 100%; gap: 5px; padding: 12px 13px 14px; }
.game-meta small { order: 2; color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.game-meta b { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.9em; font-size: 14px; line-height: 1.45; font-weight: 600; }
.empty-state { padding: 40px 20px; border: 1px dashed #d9cdd0; border-radius: 12px; color: var(--muted); font-size: 14px; line-height: 1.8; text-align: center; }
.game-load-sentinel { width: 100%; height: 1px; margin-top: 8px; }
.game-grid[aria-busy=true] { opacity: .6; pointer-events: none; }
.lobby-footnote { margin: 30px 0 4px; padding-top: 20px; border-top: 1px solid var(--line); color: #8a8187; font-size: 11px; line-height: 1.8; text-align: center; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: repeat(4,1fr); width: min(100%,1080px); min-height: calc(76px + env(safe-area-inset-bottom)); margin: auto; padding: 8px 18px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fffffff5; backdrop-filter: blur(12px); }
.bottom-nav button { display: grid; align-content: center; justify-items: center; gap: 5px; min-height: 54px; padding: 4px 2px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px; line-height: 1.4; }
.bottom-nav svg { width: 23px; height: 23px; }
.bottom-nav button.active { color: var(--brand); font-weight: 700; }
.bottom-nav button.active svg { background: var(--brand-soft); box-shadow: 0 0 0 7px var(--brand-soft); border-radius: 6px; }
.login-dialog, .language-dialog { width: min(calc(100% - 32px),440px); max-height: calc(100dvh - 40px); overflow: auto; overscroll-behavior: contain; margin: auto; padding: 0; border: 0; border-radius: 24px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 100px #25141e35; }
.login-dialog::backdrop, .language-dialog::backdrop { background: #241b286b; backdrop-filter: blur(4px); }
.dialog-card, .language-glass { position: relative; display: grid; gap: 20px; padding: 32px; border: 0; border-radius: 24px; background: var(--surface); }
.dialog-card>p:first-of-type { margin: 0; color: var(--gold); font-size: 10px; font-weight: 600; letter-spacing: .17em; }
.dialog-card h2 { margin: 0; padding-right: 30px; color: var(--ink); font-size: 26px; line-height: 1.3; font-weight: 700; }
.dialog-card label { display: grid; gap: 8px; font-size: 13px; font-weight: 500; color: #51464d; }
.dialog-card input { width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px; border: 1px solid #dcd5da; border-radius: 10px; outline: none; background: #fff; color: var(--ink); font-size: 16px; }
.dialog-card input:focus { border-color: #a66a7e; box-shadow: 0 0 0 3px #8b263910; }
.dialog-card .close, .language-close { position: absolute; top: 18px; right: 18px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: #f8f6f5; color: #675b64; font-size: 0; }
.close svg, .language-close svg { display: block; width: 20px; height: 20px; stroke-width: 1.8; }
.close:focus-visible, .language-close:focus-visible { outline: 2px solid #b28597; outline-offset: 2px; }
dialog h2[tabindex="-1"]:focus { outline: none; }
.close:hover, .language-close:hover { color: var(--brand); background: var(--brand-soft); border-color: #e5c9d2; }
.primary, .outline { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 12px 16px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; line-height: 1.4; font-weight: 600; }
.primary { background: var(--brand); color: #fff; }
.primary:hover:not(:disabled) { background: var(--brand-hover); }
.outline { border-color: #e0d8dd; background: var(--surface); color: #5e515a; }
.outline:hover:not(:disabled) { background: #f7f3f5; border-color: #c6abb5; }
.help-text { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.form-error { margin: 0; color: #ae2945; font-size: 13px; line-height: 1.7; letter-spacing: 0; }
.form-error:empty { display: none; }
.login-dialog:not(.profile-dialog):not(.records-dialog):not(.support-dialog) .primary { width: 100%; margin-top: 4px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 56px; }
.password-toggle { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: #8b7882; }
.password-toggle svg { width: 20px; height: 20px; }
.login-footnote { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; color: #867a82; font-size: 11px; line-height: 1.6; }
.login-footnote svg { width: 14px; height: 14px; flex: none; }
.panel-heading { display: flex; align-items: center; gap: 12px; min-height: 48px; padding-right: 42px; }
.panel-heading p, .panel-hero p { margin: 0 0 6px; color: var(--gold); font-size: 9px; font-weight: 600; letter-spacing: .17em; }
.panel-heading h2, .panel-hero h2 { padding: 0; font-size: 23px; }
.panel-symbol { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-size: 0; }
.panel-symbol svg { width: 24px; height: 24px; }
.records-dialog { width: min(calc(100% - 32px),620px); }
.records-card { max-height: calc(100dvh - 40px); display: grid; grid-template-rows: auto auto auto minmax(0,1fr) auto; overflow: hidden; }
.history-period { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #f4f0f2; }
.history-period button { flex: 1; min-height: 40px; padding: 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; }
.history-period button.active { background: #fff; color: var(--brand); font-weight: 700; box-shadow: 0 2px 6px #3823310c; }
.history-toolbar { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.history-toolbar>span:last-child { white-space: nowrap; }
.records-list { display: grid; gap: 0; min-height: 100px; max-height: 420px; overflow: auto; scrollbar-width: thin; scrollbar-color: #d4c3ca transparent; align-content: start; overscroll-behavior: contain; }
.records-list article { position: relative; padding: 14px 0; border-top: 1px solid var(--line); }
.records-list article:first-child { border-top: 0; padding-top: 4px; }
.records-list article>div { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.record-heading { display: grid; gap: 5px; min-width: 0; }
.record-game { display: block; color: var(--ink); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; font-weight: 600; }
.record-kind { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 400; }
.record-kind>span:first-child { padding: 2px 6px; border-radius: 5px; background: #f4f0f2; color: #66535f; }
.records-list strong { flex: none; padding-top: 1px; font-size: 17px; font-weight: 600; line-height: 1.5; white-space: nowrap; font-variant-numeric: tabular-nums; }
.records-list small { display: block; margin-top: 4px; padding-right: 80px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.positive { color: var(--positive); }
.negative { color: #ae2945; }
.neutral { color: var(--muted); }
.record-detail { margin-top: 0; color: var(--muted); font-size: 11px; }
.record-detail summary { position: absolute; right: 0; bottom: 14px; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 3px 0; cursor: pointer; color: #826570; font-size: 11px; list-style: none; }
.record-detail[open] { margin-top: 8px; }
.record-detail[open] summary { position: static; min-height: 28px; }
.record-detail summary::-webkit-details-marker { display: none; }
.record-detail summary:after { content: '+'; font-size: 15px; }
.record-detail[open] summary:after { content: '−'; }
.record-detail p { margin: 3px 0 0; padding: 10px 12px; border-radius: 8px; background: #faf7f8; overflow-wrap: anywhere; line-height: 1.8; }
.history-footer, .panel-footer { padding-top: 16px; border-top: 1px solid var(--line); }
.history-caption { margin: 0 0 12px; color: var(--muted); font-size: 10px; line-height: 1.7; text-align: center; }
.points-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; }
.points-pagination button { flex: 1; min-height: 44px; padding: 8px 10px; font-size: 12px; }
.points-pagination>span { white-space: nowrap; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.history-empty { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); text-align: center; }
.history-empty>span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: #f5f0f2; color: #9c7c8a; font-size: 24px; }
.history-empty b { color: #675662; font-size: 14px; font-weight: 500; }
.history-empty small { margin: 0; font-size: 12px; }
.support-dialog { width: min(calc(100% - 32px),480px); }
.support-card { gap: 24px; }
.support-shop { padding: 22px; border: 1px solid #e7d4da; border-radius: 14px; color: var(--ink); background: #faf3f5; }
.support-shop small { font-size: 11px; color: #88616f; }
.support-shop h3 { margin: 8px 0; color: var(--brand); font-size: 24px; line-height: 1.4; overflow-wrap: anywhere; }
.support-shop p { margin: 0; font-size: 12px; color: #7d6772; line-height: 1.8; }
.support-topics { display: grid; gap: 20px; }
.support-topics article { display: flex; gap: 14px; align-items: flex-start; }
.support-topics article>span { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: #f5f2ef; color: var(--gold); font-size: 12px; }
.support-topics h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.support-topics p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.support-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); color: #887782; font-size: 11px; line-height: 1.6; }
.support-note svg { width: 15px; height: 15px; flex: none; }
.profile-dialog { width: min(calc(100% - 32px),560px); }
.profile-card { max-height: calc(100dvh - 40px); overflow: hidden; grid-template-rows: auto auto minmax(0,1fr) auto; }
.panel-hero { display: flex; align-items: center; gap: 12px; min-height: 58px; padding-right: 44px; }
.panel-hero img { width: 54px; height: 54px; object-fit: contain; flex: none; }
.panel-hero>div { min-width: 0; }
.panel-hero h2 { overflow-wrap: anywhere; }
.panel-hero>div>span { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.member-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; border-bottom: 1px solid var(--line); }
.member-tabs button { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 4px 14px; border: 0; background: transparent; color: var(--muted); font-size: 13px; line-height: 1.4; }
.member-tabs button[aria-selected=true] { color: var(--brand); font-weight: 700; }
.member-tabs button[aria-selected=true]:after { position: absolute; bottom: -1px; left: 14px; right: 14px; height: 3px; border-radius: 3px; content: ''; background: var(--brand); }
.profile-scroll { min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #d4c3ca transparent; overscroll-behavior: contain; }
.profile-wallet { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 22px; border-radius: 14px; background: #752439; color: #fff; }
.profile-wallet>span { grid-column: 1/-1; color: #e4cbd4; font-size: 12px; }
.profile-wallet strong { min-width: 0; overflow-wrap: anywhere; font-size: 34px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.profile-wallet button { align-self: center; min-height: 44px; padding: 8px 10px; border: 1px solid #ffffff42; background: #ffffff0d; color: #fff; font-size: 11px; }
.profile-wallet button:hover:not(:disabled) { background: #ffffff20; border-color: #ffffff66; }
.member-details { margin: 20px 0; padding: 0; }
.member-details>div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.member-details dt { color: var(--muted); font-size: 12px; }
.member-details dd { margin: 0; text-align: right; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.machine-code-card { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.machine-code-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 15px; }
.pair-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pair-heading h3 { margin: 0; }
.pair-heading>svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.history-empty>span svg { width: 26px; height: 26px; }
.machine-code-card h3 svg { width: 20px; height: 20px; color: var(--gold); }
.machine-code-card p { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.machine-code-card .primary { width: 100%; }
.machine-code-card output { display: block; padding-top: 16px; color: var(--brand); font-size: 32px; font-weight: 700; letter-spacing: .2em; text-align: center; overflow-wrap: anywhere; }
.machine-code-card output:empty { display: none; }
.profile-help { margin: 14px 0 0; font-size: 11px; }
.panel-footer button { width: 100%; color: var(--brand); }
.member-section-heading h3 { margin: 0 0 7px; font-size: 17px; line-height: 1.5; }
.member-section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.member-section-heading small { display: inline-block; margin-top: 10px; font-size: 10px; color: #8a7b84; }
.member-points-panel { display: grid; gap: 18px; }
.player-points { display: grid; gap: 0; max-height: 330px; min-height: 140px; overflow: auto; scrollbar-width: thin; scrollbar-color: #d4c3ca transparent; align-content: start; }
.player-points>div { padding: 16px 0; border-top: 1px solid var(--line); }
.player-points>div:first-child { border-top: 0; }
.player-points b { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink); font-size: 13px; font-weight: 500; }
.point-amount { font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 600; }
.player-points small { display: block; margin-top: 8px; font-size: 11px; line-height: 1.8; color: var(--muted); }
.member-points-panel footer { padding-top: 16px; border-top: 1px solid var(--line); }
.password-form { display: grid; gap: 18px; margin-top: 24px; }
.password-form .primary { width: 100%; margin-top: 4px; }
.first-password-symbol { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-size: 24px; }
.first-password-dialog .outline { width: 100%; }
.language-glass { display: block; }
.language-glass h2 { margin: 0; padding-right: 35px; font-size: 23px; }
.language-options { display: grid; gap: 8px; margin: 24px 0; }
.language-option { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-align: left; font-size: 14px; }
.language-option img { width: 27px; height: 18px; object-fit: cover; border-radius: 2px; }
.language-option>span:nth-child(2) { flex: 1; }
.language-check { opacity: 0; color: var(--brand); }
.language-option[aria-checked=true] { border-color: #b28091; background: var(--brand-soft); }
.language-option[aria-checked=true] .language-check { opacity: 1; }
#confirmLanguage { width: 100%; min-height: 48px; padding: 12px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; }
html.dialog-open, html.dialog-open body { overflow: hidden; }
.play-layer { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; height: 100dvh; background: #20121b; }
.play-header { display: flex; align-items: center; gap: 12px; flex: none; min-height: 60px; padding: max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left)); color: #fff; background: #572235; }
.play-header button { min-height: 44px; padding: 8px 14px; border: 1px solid #ffffff40; border-radius: 10px; background: #ffffff0a; color: #fff; font-size: 13px; }
#playTitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.play-actions { display: flex; gap: 6px; }
.play-header .play-icon-button { display: grid; place-items: center; width: 44px; padding: 0; }
.play-icon-button svg { width: 21px; height: 21px; }
.fullscreen-exit { display: none; }
[aria-pressed=true] .fullscreen-enter { display: none; }
[aria-pressed=true] .fullscreen-exit { display: block; }
.play-layer iframe { flex: 1; min-height: 0; width: 100%; padding-bottom: env(safe-area-inset-bottom); border: 0; background: #fff; }
.play-layer:fullscreen { width: 100%; height: 100dvh; }
.toast { position: fixed; z-index: 50; right: 20px; bottom: calc(96px + env(safe-area-inset-bottom)); left: 20px; max-width: 420px; margin: auto; transform: translateY(20px); padding: 14px 18px; border: 1px solid #ffffff20; border-radius: 12px; background: #3b2935f5; color: #fff; box-shadow: 0 6px 28px #25141e25; font-size: 13px; line-height: 1.7; text-align: center; opacity: 0; transition: .18s ease; pointer-events: none; }
.toast.show { transform: translateY(0); opacity: 1; }
.preview-switcher { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; min-height: 38px; padding: 8px 12px; background: #ece4e8; color: #74606c; font-size: 10px; }
.preview-switcher a { color: #7c304a; text-decoration: none; font-weight: 600; }
.preview-switcher a[aria-current=page] { text-decoration: underline; text-underline-offset: 3px; }
@media(hover:hover) {
  .game-card:hover { border-color: #b58b99; box-shadow: 0 5px 20px #5222370c; }
  .provider-tabs button:hover { border-color: #b58b99; }
  .bottom-nav button:hover { background: #fbf7f8; }
}
@media(min-width:901px) {
  .app-shell { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); align-content: start; column-gap: 20px; }
  .site-header, .announcement, .lobby, .lobby-footnote { grid-column: 1/-1; }
  .site-header { min-height: 80px; }
  .hero { grid-column: 1; grid-row: 2; aspect-ratio: 3; min-height: 200px; }
  .hero-copy { left: 26px; }
  .hero-copy h1 { font-size: 29px; margin: 9px 0; }
  .hero-copy p { font-size: 11px; }
  .member-strip { position: relative; grid-column: 2; grid-row: 2; align-self: stretch; grid-template-columns: 1fr; gap: 12px; margin: 0; padding: 22px; }
  .member-identity { padding-right: 16px; }
  .wallet { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
  .member-entry { position: absolute; right: 12px; top: 28px; }
  .announcement { margin-bottom: 16px; }
  .lobby { position: relative; }
  .lobby-heading { margin-bottom: 12px; }
  .type-tabs { padding-right: 360px; margin-bottom: 14px; }
  .game-search { position: absolute; right: 0; top: 54px; width: 320px; margin: 0; }
  .filter-heading { display: none; }
  .catalog-toolbar { margin-bottom: 18px; }
}
@media(max-width:900px) {
  .app-shell { max-width: 720px; padding-right: 24px; padding-left: 24px; }
  .bottom-nav { max-width: 720px; }
  .game-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px 12px; }
  .hero { aspect-ratio: 3.1; }
  .hero-copy { left: 28px; }
  .hero-copy h1 { font-size: 28px; }
}
@media(max-width:540px) {
  body { background: var(--paper); }
  .app-shell { padding: 0 18px calc(94px + env(safe-area-inset-bottom)); }
  .site-header { min-height: 60px; gap: 8px; }
  .brand-mark { width: 83px; height: 38px; border-radius: 8px; }
  .brand img { width: 86px; height: 86px; }
  .brand-label { display: none; }
  .header-actions { gap: 6px; }
  .header-account { padding: 8px 10px; font-size: 12px; }
  .language-button { padding: 8px; font-size: 11px; gap: 5px; }
  .language-button img { width: 19px; height: 13px; }
  .hero { aspect-ratio: 3.2; border-radius: 16px; }
  .hero-art { object-position: 58% center; }
  .hero-copy { left: 20px; max-width: 65%; }
  .hero-copy small { font-size: 8px; }
  .hero-copy h1 { margin: 8px 0 0; font-size: clamp(20px,6vw,28px); letter-spacing: .03em; line-height: 1.45; }
  .hero-copy p { display: none; }
  .announcement { gap: 8px; min-height: 40px; margin: 3px 0 6px; padding: 4px 0; }
  .announcement p { font-size: 11px; }
  .announcement-label { font-size: 11px; gap: 4px; }
  .member-strip { gap: 10px; min-height: 76px; padding: 11px 14px; margin-bottom: 20px; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr) auto; border-radius: 14px; }
  .member-identity { gap: 8px; }
  .member-identity img { width: 38px; height: 38px; }
  .member-identity small, .wallet>span { font-size: 10px; }
  .member-identity b { font-size: 12px; }
  .wallet { padding-left: 12px; }
  .wallet b { font-size: 20px; }
  .member-entry { width: 24px; height: 44px; background: transparent; }
  .lobby-heading { margin-bottom: 6px; }
  .lobby-heading h2 { font-size: 20px; }
  .lobby-heading p { display: none; }
  .catalog-label { font-size: 9px; }
  .type-tabs { gap: 26px; min-height: 44px; margin-bottom: 10px; }
  .type-tabs button { min-height: 44px; font-size: 13px; padding-bottom: 9px; }
  .type-tabs button svg { width: 18px; height: 18px; }
  .catalog-toolbar { gap: 7px; margin-bottom: 10px; }
  .filter-heading { display: none; }
  .provider-tabs { gap: 7px; }
  .provider-tabs button.provider-icon { flex-direction: row; flex-basis: 80px; min-width: 80px; min-height: 44px; width: 80px; height: 44px; padding: 5px; gap: 5px; }
  .provider-icon img { width: 34px; height: 26px; }
  .catalog-toolbar>button { width: 44px; }
  .game-search { margin-bottom: 16px; }
  .game-search input { min-height: 44px; }
  .game-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px 12px; }
  .game-card { border-radius: 12px; }
  .game-meta { padding: 10px; gap: 5px; }
  .game-meta b { font-size: 12px; }
  .game-meta small { font-size: 9px; }
  .bottom-nav { min-height: calc(72px + env(safe-area-inset-bottom)); padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav button { font-size: 11px; min-height: 54px; gap: 6px; }
  .bottom-nav svg { width: 22px; height: 22px; }
  .login-dialog, .language-dialog { width: calc(100% - 32px); max-height: calc(100dvh - 32px); border-radius: 20px; }
  .dialog-card, .language-glass { padding: 28px 22px 24px; border-radius: 20px; gap: 20px; }
  .dialog-card .close, .language-close { right: 14px; top: 14px; }
  .dialog-card h2 { font-size: 24px; }
  .panel-heading h2, .panel-hero h2 { font-size: 21px; }
  .panel-heading p, .panel-hero p { font-size: 8px; }
  .panel-symbol { width: 42px; height: 42px; border-radius: 12px; }
  .panel-heading { padding-right: 38px; gap: 10px; }
  .panel-hero { gap: 10px; }
  .panel-hero img { width: 46px; height: 46px; }
  .records-card, .profile-card { max-height: calc(100dvh - 32px); gap: 18px; }
  .records-list { max-height: 48dvh; }
  .records-list article { padding: 14px 0; }
  .record-game { font-size: 13px; }
  .records-list strong { font-size: 16px; }
  .history-toolbar { font-size: 10px; }
  .history-period button { font-size: 12px; }
  .member-tabs button { font-size: 12px; }
  .profile-wallet { padding: 19px 16px; gap: 10px; }
  .profile-wallet strong { font-size: 28px; }
  .profile-wallet button { max-width: 108px; font-size: 10px; padding: 8px; }
  .machine-code-card { padding: 16px; }
  .support-shop { padding: 20px; }
  .support-shop h3 { font-size: 22px; }
  .points-pagination { gap: 10px; }
}
@media(max-width:360px) {
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .member-strip { gap: 7px; padding: 14px 10px; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr) 18px; }
  .member-identity img { width: 31px; height: 31px; }
  .wallet b { font-size: 18px; }
  .member-identity { gap: 5px; }
  .dialog-card, .language-glass { padding: 26px 18px 22px; }
  .profile-wallet { grid-template-columns: 1fr; }
  .profile-wallet button { justify-self: start; }
  .brand-mark { width: 76px; }
  .header-account { font-size: 11px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
