/* Compact mobile layouts and summary-first player history. */
.brand { gap: 9px; }
.brand-mark { width: 40px; height: 40px; overflow: visible; flex: none; }
.brand img { position: static; width: 40px; height: 40px; max-width: 100%; transform: none; object-fit: contain; }
.brand-label { padding: 0; border: 0; font-size: 15px; color: #f0e5dd; font-weight: 600; letter-spacing: .01em; }
.records-dialog { width: min(calc(100% - 24px),570px); max-height: calc(100dvh - 24px); }
.records-card { height: auto; max-height: calc(100dvh - 24px); grid-template-rows: auto auto auto minmax(0,1fr); padding: 22px; gap: 12px; }
.records-card .panel-heading { min-height: 32px; gap: 8px; padding-right: 40px; }
.records-card .panel-symbol { width: 30px; height: 30px; border-radius: 9px; }
.records-card .panel-symbol svg { width: 17px; height: 17px; }
.records-card .panel-heading h2 { font-size: 19px; }
.records-card .close { width: 38px; height: 38px; right: 12px; top: 12px; }
.records-card .close svg { width: 17px; height: 17px; }
.records-card .history-period { gap: 3px; padding: 3px; border-radius: 10px; }
.records-card .history-period button { min-height: 32px; padding: 6px; font-size: 12px; border-radius: 7px; }
.records-card .history-toolbar { font-size: 10px; line-height: 1.6; }
.records-overview { display: grid; gap: 8px; }
.records-summary-card { display: grid; grid-template-columns: 1fr; gap: 12px; width: 100%; border: 1px solid #86613c70; border-radius: 13px; padding: 18px; background: linear-gradient(120deg,#3b292c,#291e28); color: #ead5c2; text-align: left; }
.records-summary-card:disabled { opacity: 1; cursor: default; }
.records-summary-card:hover:not(:disabled) { border-color: #bf945b; background: linear-gradient(120deg,#4a3030,#34222c); }
.summary-label { font-size: 12px; color: #c5a78f; }
.summary-net { font-size: 32px; font-weight: 600; line-height: 1.1; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.summary-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 12px 0 0; border-top: 1px solid #af875326; }
.summary-metrics>span { display: grid; gap: 5px; }
.summary-metrics>span>span { color: #af94a0; font-size: 10px; }
.summary-metrics b { font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 500; color: #e8d1c9; }
.summary-open { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; color: #e3ba82; font-size: 11px; }
.summary-open>span:last-child { font-size: 21px; line-height: 1; }
.records-summary-status { margin: 0; color: #a9919e; font-size: 10px; line-height: 1.6; text-align: center; }
#recordsRetry { width: 100%; min-height: 36px; padding: 7px; font-size: 12px; }
.records-dialog[data-view=details] .records-card { height: min(650px,calc(100dvh - 24px)); }
.records-detail-view { display: grid; grid-template-rows: auto minmax(0,1fr) auto; min-height: 0; gap: 8px; }
.record-detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.record-detail-toolbar>button { display: flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 8px; border: 1px solid #65434e; border-radius: 7px; background: #30232d; color: #d8b694; font-size: 11px; }
.record-detail-toolbar>button>span:first-child { font-size: 20px; line-height: 1; }
#recordsDetailTotal { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.records-detail-view .records-list { height: 100%; min-height: 0; max-height: none; gap: 0; padding-right: 5px; }
.records-detail-view .records-list article { padding: 10px 0; }
.records-detail-view .records-list article:first-child { padding-top: 5px; }
.records-detail-view .records-list article>div { gap: 8px; align-items: center; }
.records-detail-view .record-heading { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 5px; }
.records-detail-view .record-game { font-size: 12px; font-weight: 500; line-height: 1.5; }
.records-detail-view .record-kind { padding: 1px 5px; border-radius: 4px; background: #422c38; font-size: 9px; line-height: 1.5; color: #c9a3b5; }
.records-detail-view .records-list strong { font-size: 15px; padding-top: 0; line-height: 1.4; }
.records-detail-view .records-list small { padding-right: 0; margin-top: 0; font-size: 10px; line-height: 1.5; }
.records-detail-view .records-list .record-round { margin-top: 5px; font-size: 10px; color: #c5a3b4; overflow-wrap: anywhere; }
.records-detail-view .records-list .record-row-footer { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 3px 8px; margin-top: 3px; }
.record-row-footer time { font-size: 10px; color: #a08a9b; line-height: 1.5; }
.record-row-footer small { color: #a08a9b; }
.records-detail-view .history-footer { padding-top: 8px; }
.records-detail-view .points-pagination { gap: 10px; }
.records-detail-view .points-pagination button { min-height: 34px; padding: 6px 8px; font-size: 11px; border-radius: 8px; }
.records-detail-view .points-pagination>span { font-size: 10px; }
@media(max-width:540px) {
  .app-shell { padding-right: 14px; padding-left: 14px; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .site-header { min-height: 50px; gap: 8px; }
  .brand { gap: 6px; }
  .brand-mark,.brand img { width: 34px; height: 34px; }
  .brand-label { display: inline; font-size: 12px; }
  .header-actions { gap: 5px; }
  .header-account { min-height: 34px; padding: 6px 8px; font-size: 10px; border-radius: 8px; }
  .header-account svg { width: 14px; height: 14px; }
  .language-button { min-height: 34px; padding: 6px; gap: 4px; border-radius: 8px; font-size: 10px; }
  .language-button img { width: 17px; height: 12px; }
  .hero { aspect-ratio: 3.55; border-radius: 12px; }
  .hero-art { object-position: center top; }
  .hero-copy { left: 14px; }
  .hero-copy small,.hero-copy p { display: none; }
  .hero-copy h1 { margin: 0; font-size: 20px; line-height: 1.3; }
  .announcement { min-height: 26px; margin: 3px 0 6px; gap: 6px; }
  .announcement p { font-size: 10px; }
  .announcement-label { font-size: 10px; }
  .announcement-label svg { width: 13px; height: 13px; }
  .announcement button { height: 26px; width: 26px; }
  .member-strip { min-height: 57px; padding: 8px 10px; margin-bottom: 12px; gap: 6px; border-radius: 10px; }
  .member-identity { gap: 6px; }
  .member-identity img { width: 27px; height: 30px; }
  .member-identity small,.wallet>span { margin-bottom: 3px; font-size: 9px; }
  .member-identity b { font-size: 11px; }
  .wallet b { font-size: 18px; }
  .wallet { padding-left: 9px; }
  .member-entry { height: 32px; }
  .lobby-heading { margin-bottom: 6px; }
  .lobby-heading h2 { font-size: 16px; }
  .catalog-label { display: none; }
  .type-tabs { min-height: 40px; gap: 7px; margin-bottom: 8px; }
  .type-tabs button { min-height: 40px; padding: 4px 6px; font-size: 11px; gap: 4px; border-radius: 9px; }
  .category-picture { width: 25px; height: 25px; }
  .provider-tabs button.provider-icon { min-height: 35px; height: 35px; width: 66px; min-width: 66px; flex-basis: 66px; gap: 4px; padding: 4px; border-radius: 8px; }
  .provider-icon img { width: 26px; height: 23px; }
  .provider-tabs { padding-bottom: 4px; }
  .catalog-toolbar { gap: 7px; margin-bottom: 8px; }
  .catalog-toolbar>button { width: 35px; height: 35px; border-radius: 8px; }
  .game-search { margin-bottom: 12px; border-radius: 9px; padding: 0 11px; gap: 8px; }
  .game-search input { min-height: 38px; padding: 8px 0; font-size: 12px; }
  .game-search svg { width: 16px; height: 16px; }
  .game-grid { gap: 14px 9px; }
  .game-art { border-radius: 10px; }
  .game-meta { padding-top: 6px; gap: 3px; }
  .game-meta b { font-size: 11px; min-height: 2.8em; }
  .bottom-nav { min-height: calc(57px + env(safe-area-inset-bottom)); padding: 4px 8px calc(3px + env(safe-area-inset-bottom)); }
  .bottom-nav button { min-height: 46px; gap: 4px; font-size: 9px; }
  .bottom-nav svg { width: 19px; height: 19px; }
  .bottom-nav button.active svg { box-shadow: 0 0 0 5px #543326; }
  .login-dialog,.language-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .dialog-card,.language-glass { padding: 20px 16px 16px; gap: 13px; border-radius: 16px; }
  .dialog-card .close,.language-close { width: 36px; height: 36px; right: 9px; top: 9px; }
  .close svg,.language-close svg { width: 17px; height: 17px; }
  .dialog-card h2,.language-glass h2 { font-size: 20px; }
  .panel-heading { min-height: 32px; gap: 8px; padding-right: 32px; }
  .panel-heading p,.panel-hero p { display: none; }
  .panel-heading h2,.panel-hero h2 { font-size: 18px; }
  .panel-symbol { width: 30px; height: 30px; border-radius: 9px; }
  .panel-symbol svg { width: 18px; height: 18px; }
  .panel-hero { min-height: 42px; gap: 9px; padding-right: 30px; }
  .panel-hero img { width: 38px; height: 38px; }
  .panel-hero>div>span { font-size: 10px; margin-top: 3px; }
  .profile-card { max-height: calc(100dvh - 24px); gap: 12px; }
  .member-tabs button { min-height: 38px; padding: 6px 3px 10px; font-size: 11px; }
  .profile-wallet { padding: 14px; gap: 7px; border-radius: 10px; }
  .profile-wallet>span { font-size: 10px; }
  .profile-wallet strong { font-size: 25px; }
  .profile-wallet button { min-height: 34px; font-size: 9px; padding: 6px 8px; }
  .member-details { margin: 12px 0; }
  .member-details>div { padding: 9px 0; }
  .member-details dt { font-size: 11px; }
  .member-details dd { font-size: 12px; }
  .machine-code-card { padding: 13px; border-radius: 10px; }
  .machine-code-card h3 { font-size: 13px; }
  .machine-code-card p { margin-bottom: 12px; font-size: 11px; }
  .primary,.outline { min-height: 40px; padding: 9px 12px; font-size: 13px; }
  .panel-footer { padding-top: 10px; }
  .member-section-heading h3 { font-size: 15px; margin-bottom: 5px; }
  .member-section-heading p { font-size: 11px; }
  .password-form { gap: 12px; margin-top: 16px; }
  .dialog-card label { font-size: 12px; gap: 6px; }
  .dialog-card input { min-height: 42px; padding: 9px 11px; }
  .password-field input { padding-right: 46px; }
  .password-toggle { width: 38px; height: 38px; }
  .password-toggle svg { width: 18px; height: 18px; }
  .help-text { font-size: 12px; line-height: 1.7; }
  .login-mascot { width: 65px; height: 65px; top: 14px; right: 52px; }
  #loginForm>h2 { padding-right: 76px; }
  #loginForm .help-text { padding-top: 4px; }
  .support-card { gap: 16px; }
  .support-shop { padding: 15px 95px 15px 14px; border-radius: 10px; }
  .support-shop h3 { font-size: 19px; margin: 6px 0; }
  .support-shop p { font-size: 11px; line-height: 1.7; }
  .support-shop:after { width: 88px; height: 105px; }
  .support-topics { gap: 15px; }
  .support-topics article { gap: 10px; }
  .support-topics article>span { width: 30px; height: 30px; border-radius: 8px; font-size: 10px; }
  .support-topics h3 { font-size: 13px; margin-bottom: 4px; }
  .support-topics p { font-size: 11px; }
  .support-note { padding-top: 12px; font-size: 10px; }
  .language-options { gap: 6px; margin: 18px 0; }
  .language-option { min-height: 42px; padding: 9px 11px; font-size: 13px; }
  #confirmLanguage { min-height: 40px; padding: 10px; font-size: 13px; }
  .records-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .records-dialog .records-card { padding: 16px 14px 12px; gap: 10px; max-height: calc(100dvh - 20px); }
  .records-card .panel-heading h2 { font-size: 17px; }
  .records-card .panel-heading { min-height: 28px; }
  .records-card .panel-symbol { width: 26px; height: 26px; border-radius: 7px; }
  .records-card .panel-symbol svg { width: 15px; height: 15px; }
  .records-card .close { top: 9px; right: 9px; width: 34px; height: 34px; }
  .records-card .history-period button { min-height: 30px; padding: 5px; font-size: 11px; }
  .records-card .history-toolbar { font-size: 9px; }
  .records-summary-card { padding: 15px; gap: 10px; border-radius: 11px; }
  .summary-label { font-size: 11px; }
  .summary-net { font-size: 28px; }
  .summary-metrics { padding-top: 10px; }
  .summary-metrics b { font-size: 13px; }
  .summary-metrics>span>span { font-size: 9px; }
  .summary-open { font-size: 10px; min-height: 22px; }
  .records-dialog[data-view=details] .records-card { height: min(610px,calc(100dvh - 20px)); }
  .records-detail-view { gap: 7px; }
  .record-detail-toolbar>button { min-height: 29px; padding: 3px 7px; font-size: 10px; }
  #recordsDetailTotal { font-size: 10px; }
  .records-detail-view .records-list article { padding: 9px 0; }
  .records-detail-view .record-game { font-size: 12px; }
  .records-detail-view .records-list strong { font-size: 14px; }
  .records-detail-view .record-kind { font-size: 9px; }
  .records-detail-view .records-list .record-round { font-size: 10px; line-height: 1.5; }
  .record-row-footer time,.records-detail-view .records-list .record-row-footer small { font-size: 9px; }
  .records-detail-view .history-footer { padding-top: 7px; }
  .records-detail-view .points-pagination button { min-height: 31px; padding: 5px 7px; font-size: 10px; }
}
@media(max-width:360px) {
  .brand-label { font-size: 11px; }
  .header-account { padding: 6px; }
  .header-actions { gap: 4px; }
  .hero-copy h1 { font-size: 18px; }
  .wallet b { font-size: 17px; }
  .member-strip { grid-template-columns: minmax(0,1fr) minmax(0,1.2fr) 16px; }
  .profile-wallet { grid-template-columns: minmax(0,1fr) auto; }
  .profile-wallet strong { font-size: 23px; }
}
