.mobile-only { display: none; }
.mobile-help-dialog { border: 1px solid var(--ln-soft); border-radius: 16px; background: var(--surface); color: var(--t-strong); }
@media (max-width: 768px), (max-width: 1024px) and (max-height: 450px) and (orientation: landscape) {
    html.mobile-ready { height: 100%; overflow: hidden; scrollbar-gutter: auto; }
    html.mobile-ready body { position: fixed; top: var(--mobile-vtop, 0px); left: 0; width: 100%; min-width: 0; height: var(--mobile-vh, 100dvh); max-height: var(--mobile-vh, 100dvh); padding: 0 !important; display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: none; }
    html.mobile-ready [hidden] { display: none !important; }
    html.mobile-ready .mobile-only { display: flex; }
    html.mobile-ready .top-header-bar { flex: 0 0 auto; position: relative; }
    html.mobile-ready .header-inner { padding: 6px 12px !important; }
    html.mobile-ready .header-left { margin: 0 0 4px; }
    html.mobile-ready .brand-icon { width: 24px; height: 24px; border-radius: 8px; }
    html.mobile-ready .header-title { font-size: 16px; }
    html.mobile-ready .brand-caption { font-size: 8px; }
    html.mobile-ready .header-right { gap: 5px; }
    html.mobile-ready .site-nav { justify-content: space-between; }
    html.mobile-ready .nav-btn-capsule { min-height: 36px; padding: 6px 8px; font-size: 11px; gap: 4px; }
    html.mobile-ready .nav-btn-capsule .ui-icon { width: 13px; height: 13px; }
    html.mobile-ready .theme-toggle-btn { min-height: 36px; padding: 6px; font-size: 10px; }
    html.mobile-ready .app-main { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; margin: 0 0 82px; padding: 7px 12px 0 !important; gap: 7px; }
    html.mobile-ready .app-footer { display: none; }
    html.mobile-ready .page-heading { padding: 0 !important; margin: 0; min-height: 0 !important; background: none !important; }
    html.mobile-ready .page-heading > div, html.mobile-ready .page-heading > .text-link { display: none; }
    html.mobile-ready .mode-tabs { width: 100%; padding: 0; gap: 5px !important; background: none; border: 0; }
    html.mobile-ready .mode-tabs a { min-height: 33px; padding: 5px 9px !important; font-size: 12px; }
    html.mobile-ready .mode-tabs .ui-icon { width: 14px; height: 14px; }
    html.mobile-ready .game-layout { display: flex; flex-direction: column; align-items: stretch; flex: 1; min-height: 0; gap: 7px; }
    html.mobile-ready .game-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
    html.mobile-ready .panel-heading { display: none; }
    html.mobile-ready .stats-strip { flex: 0 0 auto; padding: 8px 12px !important; gap: 0; }
    html.mobile-ready .stat-item { padding-left: 10px; display: flex; gap: 0; }
    html.mobile-ready .stat-item:first-child { padding-left: 0; }
    html.mobile-ready .stat-icon { display: none; }
    html.mobile-ready .stat-label { font-size: 10px; }
    html.mobile-ready .stat-value { font-size: 20px !important; line-height: 1.15; margin: 1px 0 0; }
    html.mobile-ready .stat-denominator { font-size: 11px; }
    html.mobile-ready .board-area { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 10px 6px !important; }
    html.mobile-ready .board-toolbar { padding: 7px 0; margin: 0; }
    html.mobile-ready .board-toolbar h2 { font-size: 12px; }
    html.mobile-ready .color-legend { gap: 8px; font-size: 10px; }
    html.mobile-ready .history-scroll { min-height: 0; overflow: visible; margin: 0; }
    html.mobile-ready #history-container { min-width: 0; }
    html.mobile-ready .history-header, html.mobile-ready .mobile-scroll-hint { display: none !important; }
    html.mobile-ready .guess-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin: 0; }
    html.mobile-ready .mobile-result[data-mobile-current="false"], html.mobile-ready .mobile-kd-row[data-mobile-current="false"] { display: none !important; }
    html.mobile-ready .attr-card { flex-direction: column; min-height: 33px; padding: 3px 5px; border-radius: 7px; font-size: 12px; line-height: 1.15; gap: 2px; }
    html.mobile-ready .attr-card::before { content: attr(data-mobile-label); font-size: 9px; opacity: .78; font-weight: 400; }
    html.mobile-ready .attr-card .team-logo-frame { width: 17px; height: 17px; flex-basis: 17px; }
    html.mobile-ready .game-empty { display: flex; flex-direction: column; justify-content: center; flex: 1; padding: 10px !important; text-align: center; }
    html.mobile-ready .clue-illustration { display: none; }
    html.mobile-ready .game-empty h3 { font-size: 15px !important; margin-bottom: 9px; }
    html.mobile-ready .game-empty > p { font-size: 12px !important; }
    html.mobile-ready .guess-composer { flex: 0 0 auto; padding: 7px 10px !important; }
    html.mobile-ready .guess-composer > label, html.mobile-ready .composer-meta { display: none; }
    html.mobile-ready .input-area { flex-wrap: nowrap; gap: 7px; }
    html.mobile-ready .input-wrapper { min-width: 0; flex: 1 !important; }
    html.mobile-ready #player-input, html.mobile-ready #search-input { height: 42px; min-height: 42px; font-size: 13px; padding: 8px 8px 8px 38px; }
    html.mobile-ready #submit-btn, html.mobile-ready #search-btn { width: 80px; height: 42px; min-height: 42px !important; padding: 7px; font-size: 12px; white-space: nowrap; }
    html.mobile-ready #submit-btn .ui-icon { display: none; }
    html.mobile-ready .game-status { margin: 5px 0 0; font-size: 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    html.mobile-ready .game-sidebar { display: contents; }
    html.mobile-ready .guide-section { display: none; }
    html.mobile-ready .session-actions { flex: 0 0 auto; display: flex; flex-direction: row; order: 0; gap: 8px; padding: 0; margin: 0; }
    html.mobile-ready .session-actions button { flex: 1; min-height: 36px; padding: 6px; font-size: 12px; }
    html.mobile-ready .session-actions > p { display: none; }
    html.mobile-ready .mobile-pager { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 7px; min-height: 34px; margin-top: 5px; font-size: 11px; color: var(--t-muted); }
    html.mobile-ready .mobile-pager button, html.mobile-ready .mobile-help-button { padding: 5px 10px; min-height: 32px; border: 1px solid var(--ln-soft); border-radius: 8px; background: var(--surface-soft); color: var(--t-mid); font-size: 11px; }
    html.mobile-ready .mobile-help-button { flex: 0 0 auto; align-items: center; justify-content: center; }
    html.mobile-ready .mobile-pager button:disabled { opacity: .35; }
    html.mobile-ready .mobile-empty-pager { display: none; }
    html.mobile-ready .mobile-history-pager { margin-top: auto; padding-top: 4px; }
    html.mobile-ready .search-page .page-heading, html.mobile-ready .data-page .page-heading { display: none; }
    html.mobile-ready .search-panel, html.mobile-ready .data-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    html.mobile-ready .bottom-search-area { padding: 9px 10px 6px !important; flex: 0 0 auto; }
    html.mobile-ready .field-label { display: none; }
    html.mobile-ready .search-status { font-size: 10px; line-height: 1.4; margin: 5px 0 0; }
    html.mobile-ready .placeholder-box { flex: 1; min-height: 0; padding: 12px !important; display: flex; flex-direction: column; align-items: center; justify-content: center; }
    html.mobile-ready .placeholder-box .placeholder-icon { margin-bottom: 10px; }
    html.mobile-ready #search-result-container { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 7px 10px !important; gap: 0; }
    html.mobile-ready .cs-card { flex: 1; min-height: 0; width: 100%; max-width: none !important; display: flex; flex-direction: column; }
    html.mobile-ready .cs-card-bar { display: none; }
    html.mobile-ready .cs-card-header { flex: 0 0 auto; padding: 10px 12px; }
    html.mobile-ready .cs-player-id { font-size: 18px !important; }
    html.mobile-ready .cs-avatar-icon { display: none; }
    html.mobile-ready .cs-player-meta { margin-left: auto; font-size: 10px; }
    html.mobile-ready .player-honors { margin-top: 5px; gap: 4px; }
    html.mobile-ready .player-honor { padding: 2px 5px; font-size: 9px; }
    html.mobile-ready .mobile-card-tabs, html.mobile-ready .mobile-preference-tabs { display: flex; flex: 0 0 auto; gap: 4px; padding: 4px 10px; }
    html.mobile-ready .mobile-card-tabs button, html.mobile-ready .mobile-preference-tabs button { flex: 1; min-height: 31px; border: 0; border-radius: 7px; background: var(--surface-muted); color: var(--t-muted); font-size: 12px; }
    html.mobile-ready .mobile-card-tabs button[aria-selected=true], html.mobile-ready .mobile-preference-tabs button[aria-pressed=true] { background: var(--blue-soft); color: var(--a-accent-ink); font-weight: 600; }
    html.mobile-ready .cs-card-body { padding: 12px !important; flex-direction: row !important; align-items: center; gap: 11px; min-height: 0; flex: 1; }
    html.mobile-ready .cs-body-left, html.mobile-ready #search-result-container > .cs-card:only-child .cs-body-left { width: 80px; }
    html.mobile-ready .cs-player-img-box, html.mobile-ready #search-result-container > .cs-card:only-child .cs-player-img-box { height: 125px; }
    html.mobile-ready .cs-info-row { padding: 6px 0; gap: 6px; }
    html.mobile-ready .cs-info-label { font-size: 10px; white-space: nowrap; }
    html.mobile-ready .cs-info-value { font-size: 11px; white-space: normal; }
    html.mobile-ready .cs-info-value .team-logo-frame { width: 21px; height: 21px; flex-basis: 21px; }
    html.mobile-ready [data-mobile-tab=info] > .player-event-stats { display: none; }
    html.mobile-ready [data-mobile-tab]:not([data-mobile-tab=info]) > .cs-card-body { display: none; }
    html.mobile-ready [data-mobile-tab=performance] .event-totals, html.mobile-ready [data-mobile-tab]:not([data-mobile-tab=notes]) .event-stats-footnote { display: none; }
    html.mobile-ready [data-mobile-tab=totals] .event-metrics, html.mobile-ready [data-mobile-tab=notes] :is(.event-metrics,.event-totals) { display: none; }
    html.mobile-ready .player-event-stats { padding: 10px 12px; min-height: 0; flex: 1; border: 0; }
    html.mobile-ready .event-stats-heading { margin-bottom: 9px; gap: 5px; }
    html.mobile-ready .event-stats-heading h3 { font-size: 12px; }
    html.mobile-ready .event-data-link { font-size: 10px; padding: 3px; }
    html.mobile-ready .event-metrics { gap: 7px; }
    html.mobile-ready .event-metric { padding: 10px; }
    html.mobile-ready .event-metric h4 { font-size: 12px; }
    html.mobile-ready .event-metric-value { font-size: 27px; }
    html.mobile-ready .event-comparison { margin: 7px 0 12px; font-size: 10px; }
    html.mobile-ready .event-metric-note { font-size: 10px; }
    html.mobile-ready .event-percentile { font-size: 10px; padding: 2px 4px; }
    html.mobile-ready .event-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 6px 0 12px; gap: 12px; }
    html.mobile-ready .event-stats-footnote { font-size: 10px; line-height: 1.6; }
    html.mobile-ready .mobile-search-pager, html.mobile-ready .mobile-kd-pager { padding: 0 10px 7px; margin-top: 0; }
    html.mobile-ready .modal { padding: 12px; overflow: hidden; height: var(--mobile-vh, 100dvh); }
    html.mobile-ready .modal-box { width: 100%; max-height: calc(var(--mobile-vh, 100dvh) - 24px); padding: 16px 12px !important; overflow: visible; }
    html.mobile-ready .modal-emblem { display: none; }
    html.mobile-ready .modal h2 { font-size: 20px; }
    html.mobile-ready .modal-text { margin-top: 5px; font-size: 12px; }
    html.mobile-ready .modal-embedded-card { margin: 12px 0; min-height: 230px; }
    html.mobile-ready .modal .primary-button { min-height: 42px; }
    html.mobile-ready .data-panel-heading { display: flex; padding: 9px 10px 0; }
    html.mobile-ready .data-panel-heading h2 { font-size: 13px; }
    html.mobile-ready .data-panel-heading p, html.mobile-ready .data-badge { display: none; }
    html.mobile-ready .kd-toolbar { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 7px 10px; }
    html.mobile-ready .kd-search-wrap { grid-column: 1/-1; }
    html.mobile-ready .kd-search { min-height: 38px; font-size: 13px; }
    html.mobile-ready .kd-select, html.mobile-ready .kd-btn { min-height: 33px; font-size: 11px; padding: 5px 8px; }
    html.mobile-ready .kd-count { grid-column: 1/-1; margin: 0; font-size: 10px; }
    html.mobile-ready .mobile-sort { display: flex; gap: 6px; padding: 0 10px 7px; }
    html.mobile-ready .mobile-sort select { flex: 1; min-width: 0; }
    html.mobile-ready .mobile-sort :is(select,button) { height: 32px; border: 1px solid var(--ln-soft); border-radius: 7px; background: var(--surface-soft); color: var(--t-mid); font-size: 11px; padding: 4px 8px; }
    html.mobile-ready .stat-wrap { flex: 1; min-height: 0; overflow: visible; border: 0; }
    html.mobile-ready .kd-table { display: block; min-width: 0; width: 100%; }
    html.mobile-ready .kd-table thead { display: none; }
    html.mobile-ready .kd-table tbody { display: block; padding: 0 10px; }
    html.mobile-ready .kd-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
    html.mobile-ready .kd-table td { display: flex; flex-direction: column; align-items: flex-start; padding: 6px 9px; border: 0; background: var(--surface-soft); border-radius: 8px; text-align: left; font-size: 16px; font-weight: 600; }
    html.mobile-ready .kd-table td::before { content: attr(data-mobile-label); font-size: 10px; color: var(--t-muted); font-weight: 400; margin-bottom: 3px; }
    html.mobile-ready .kd-table td:first-child, html.mobile-ready .kd-table td:nth-child(2) { grid-column: 1/-1; background: none; padding: 1px 4px; }
    html.mobile-ready .kd-table td:first-child::before, html.mobile-ready .kd-table td:nth-child(2)::before { display: none; }
    html.mobile-ready .kd-table .id-main { font-size: 20px; }
    html.mobile-ready .data-footnote, html.mobile-ready .data-definition { display: none; }
    html.mobile-ready .kd-empty { padding: 24px 12px; }
    html.mobile-ready .preferences-panel { position: fixed; top: 80px; left: 12px; right: 12px; width: auto; max-width: none; max-height: none; bottom: 84px; overflow: hidden; padding: 12px; }
    html.mobile-ready .preferences-heading { padding-bottom: 9px; }
    html.mobile-ready .preferences-heading h2 { font-size: 15px; }
    html.mobile-ready .preferences-heading p, html.mobile-ready .preferences-footnote { display: none; }
    html.mobile-ready .mobile-preference-tabs { padding: 0 0 10px; }
    html.mobile-ready .preferences-panel[data-mobile-view=style] .preferences-options, html.mobile-ready .preferences-panel[data-mobile-view=options] .style-picker { display: none; }
    html.mobile-ready .preference-row { min-height: 55px; padding: 9px 6px; }
    html.mobile-ready .style-picker { padding-bottom: 0; }
    html.mobile-ready .mobile-help-dialog { width: calc(100% - 24px); max-width: 460px; max-height: calc(var(--mobile-vh, 100dvh) - 32px); padding: 20px; overflow: hidden; }
    html.mobile-ready .mobile-help-dialog::backdrop { background: rgba(0,0,0,.45); }
    html.mobile-ready .mobile-help-dialog h2 { font-size: 18px; }
    html.mobile-ready .mobile-help-dialog > p { margin: 20px 0; line-height: 1.8; font-size: 14px; white-space: pre-line; }
    html.mobile-ready .mobile-help-close { width: 100%; min-height: 38px; margin-top: 12px; border: 0; border-radius: 8px; background: var(--blue-soft); color: var(--a-accent-ink); }
    html.mobile-ready .input-wrapper .autocomplete-items { position: fixed; top: var(--mobile-suggest-top, 100px); bottom: auto; left: 12px; right: 12px; width: auto; max-height: var(--mobile-suggest-height, 200px); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; z-index: 160; }
    html.mobile-ready .music-player.is-collapsed { padding: 5px 10px; }
    html.mobile-ready .music-player.is-collapsed .music-play { width: 40px; height: 40px; }
    html.mobile-ready.mobile-keyboard .music-player { visibility: hidden; pointer-events: none; }
    html.mobile-ready.mobile-keyboard .app-main { margin-bottom: 6px; }
    html.mobile-ready.mobile-keyboard .game-page :is(.page-heading,.stats-strip,.board-area,.game-sidebar), html.mobile-ready.mobile-keyboard .search-page :is(#search-result-container,.placeholder-box,.mobile-search-pager) { display: none !important; }
    html.mobile-ready.mobile-keyboard .game-panel, html.mobile-ready.mobile-keyboard .search-panel { flex: 0 0 auto; }
    html.mobile-ready.mobile-keyboard .preferences-panel { top: 12px; bottom: 12px; }
}

@media (max-width: 768px) and (max-height: 700px), (max-width: 1024px) and (max-height: 450px) and (orientation: landscape) {
    html.mobile-ready .bottom-search-area { padding: 7px 10px 5px !important; }
    html.mobile-ready .search-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    html.mobile-ready #search-result-container { padding: 5px 10px !important; }
    html.mobile-ready .cs-card-header { padding: 8px 12px; }
    html.mobile-ready .mobile-card-tabs { padding: 2px 10px; }
    html.mobile-ready .stats-strip { padding: 6px 10px !important; }
    html.mobile-ready .stat-item > div { display: flex; align-items: baseline; gap: 5px; }
    html.mobile-ready .stat-label { font-size: 9px; }
    html.mobile-ready .stat-value { font-size: 17px !important; margin: 0; }
    html.mobile-ready .attr-card { flex-direction: row; justify-content: space-between; min-height: 30px; padding: 4px 6px; gap: 4px; }
    html.mobile-ready .guess-row { gap: 4px; }
    html.mobile-ready .board-toolbar { padding: 4px 0; }
    html.mobile-ready .board-toolbar h2 { line-height: 1.2; }
    html.mobile-ready .mobile-history-pager { min-height: 32px; padding-top: 0; }
    html.mobile-ready .guess-composer { padding: 5px 10px !important; }
    html.mobile-ready .game-status { margin-top: 4px; line-height: 1.3; }
    html.mobile-ready .player-event-stats { padding: 8px 10px; }
    html.mobile-ready .event-stats-heading { margin-bottom: 7px; }
    html.mobile-ready .event-metric { padding: 8px; }
    html.mobile-ready .event-metric-value { margin: 6px 0 3px; }
    html.mobile-ready .event-comparison { margin: 4px 0 7px; }
    html.mobile-ready .event-metric-note { margin-top: 6px; }
    html.mobile-ready .kd-table tr { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    html.mobile-ready .kd-table td { padding: 5px 7px; font-size: 14px; line-height: 1.3; }
    html.mobile-ready .kd-table td::before { font-size: 9px; line-height: 1.3; }
}
@media (max-width: 1024px) and (max-height: 450px) and (orientation: landscape) {
    html.mobile-ready .header-left { display: none; }
    html.mobile-ready .header-right { width: 100%; }
    html.mobile-ready .header-inner { padding: 4px 12px !important; }
    html.mobile-ready .app-main { margin-bottom: 0; padding: 4px 116px 4px 12px !important; gap: 4px; }
    html.mobile-ready .game-layout { gap: 4px; }
    html.mobile-ready .mode-tabs a, html.mobile-ready .mode-tabs .mobile-help-button { min-height: 28px; padding-top: 2px !important; padding-bottom: 2px !important; }
    html.mobile-ready .mobile-pager, html.mobile-ready .mobile-pager button { min-height: 28px; }
    html.mobile-ready .session-actions button { min-height: 30px; padding: 3px; }
    html.mobile-ready .stats-strip { padding: 4px 10px !important; }
    html.mobile-ready .board-toolbar { padding: 2px 0; }
    html.mobile-ready .board-area { padding-bottom: 2px !important; }
    html.mobile-ready .history-scroll { padding: 0; }
    html.mobile-ready .guess-composer { padding-top: 3px !important; padding-bottom: 3px !important; }
    html.mobile-ready .guess-row { grid-template-columns: repeat(4, minmax(0,1fr)); }
    html.mobile-ready .attr-card { flex-direction: column; justify-content: center; font-size: 10px; min-height: 30px; padding: 2px; gap: 0; }
    html.mobile-ready .game-status, html.mobile-ready .kd-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    html.mobile-ready .music-player.is-collapsed { left: auto !important; right: 8px; top: auto !important; bottom: 8px; width: 98px !important; padding: 5px; }
    html.mobile-ready .music-player.is-collapsed .music-drag { display: none; }
    html.mobile-ready .search-page .bottom-search-area { position: fixed; top: 52px; right: 8px; width: 98px; padding: 0 !important; border: 0; }
    html.mobile-ready .search-page .input-area { flex-direction: column; }
    html.mobile-ready .search-page .input-wrapper, html.mobile-ready .search-page #search-btn { width: 100%; }
    html.mobile-ready .search-page #search-input { padding-left: 8px; }
    html.mobile-ready .search-page .input-wrapper > .input-icon { display: none; }
    html.mobile-ready .search-page .input-wrapper .autocomplete-items { right: 116px; }
    html.mobile-ready .cs-card-header { padding: 5px 10px; }
    html.mobile-ready .cs-player-id { font-size: 16px !important; }
    html.mobile-ready .cs-player-img-box, html.mobile-ready #search-result-container > .cs-card:only-child .cs-player-img-box { height: 85px; }
    html.mobile-ready .cs-card-body { padding: 6px 10px !important; }
    html.mobile-ready .cs-info-row { padding: 3px 0; }
    html.mobile-ready .cs-body-right { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px 8px; }
    html.mobile-ready .cs-info-row { flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 0; gap: 1px; border: 0; }
    html.mobile-ready .player-honors { display: inline-flex; margin: 0 0 0 5px; }
    html.mobile-ready .event-stats-heading { margin-bottom: 3px; }
    html.mobile-ready .event-metric { padding: 5px 7px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 5px; align-items: center; }
    html.mobile-ready .event-metric-heading { grid-column: 1/-1; }
    html.mobile-ready .event-metric-value { margin: 0; font-size: 23px; }
    html.mobile-ready .event-comparison { margin: 0; }
    html.mobile-ready .event-rank-track, html.mobile-ready .event-metric-note { grid-column: 1/-1; margin-top: 3px; }
    html.mobile-ready .event-totals { grid-template-columns: repeat(4,minmax(0,1fr)); }
    html.mobile-ready .data-panel-heading { padding-top: 3px; }
    html.mobile-ready .data-panel-heading .mobile-help-button { min-height: 28px; padding-top: 2px; padding-bottom: 2px; }
    html.mobile-ready .kd-toolbar { grid-template-columns: minmax(0,1fr) 95px auto; padding-top: 4px; padding-bottom: 4px; }
    html.mobile-ready .mobile-sort { padding-bottom: 4px; }
    html.mobile-ready .kd-search-wrap { grid-column: auto; }
    html.mobile-ready .kd-search, html.mobile-ready .kd-select, html.mobile-ready .kd-btn { height: 32px; min-height: 32px; }
    html.mobile-ready .kd-table td { padding: 3px 7px; }
    html.mobile-ready .kd-table td:first-child, html.mobile-ready .kd-table td:nth-child(2) { grid-column: auto; }
    html.mobile-ready .kd-table td:first-child { grid-column: 1/3; }
    html.mobile-ready .kd-table .id-main { font-size: 17px; }
    html.mobile-ready .preferences-panel { top: 48px; bottom: 8px; }
    html.mobile-ready .preferences-heading { display: none; }
    html.mobile-ready .preference-row { min-height: 48px; padding: 5px; }
    html.mobile-ready .mobile-help-dialog { padding: 12px; }
    html.mobile-ready .mobile-help-dialog > p { margin: 8px 0; line-height: 1.5; }
    html.mobile-ready .modal-box { padding: 10px !important; }
    html.mobile-ready .modal-embedded-card { margin: 4px 0; min-height: 0; }
    html.mobile-ready .modal .cs-card-body { padding: 3px 10px !important; }
    html.mobile-ready .modal h2 { font-size: 16px; }
    html.mobile-ready .modal .primary-button { min-height: 32px; }
    html.mobile-ready .modal .modal-text { margin: 2px 0; }
}

/* Continuous mobile guess history: one guess per row, shared labels, no record pager. */
@media (max-width: 768px), (max-width: 1024px) and (max-height: 450px) and (orientation: landscape) {
 html.mobile-ready .history-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; margin: 0; }
 html.mobile-ready #history-container { min-width: 0; padding: 0; --guess-columns: minmax(0,1.5fr) repeat(3,minmax(0,1fr)) minmax(0,.7fr) minmax(0,.75fr) minmax(0,1fr) minmax(0,.75fr); }
 html.mobile-ready .history-header, html.mobile-ready .guess-row { grid-template-columns: var(--guess-columns); gap: 2px; }
 html.mobile-ready .history-header { display: grid !important; position: sticky; top: 0; z-index: 2; background: var(--surface); margin: 0 0 3px; }
 html.mobile-ready .header-col { min-width: 0; padding: 5px 0; font-size: 0; line-height: 1; }
 html.mobile-ready .header-col::after { content: attr(data-short-label); font-size: 10px; line-height: 1.3; }
 html.mobile-ready .guess-row { margin: 0 0 4px; }
 html.mobile-ready .attr-card { min-width: 0; min-height: 36px; padding: 3px 1px; border-radius: 5px; font-size: 11px; line-height: 1.2; gap: 0; flex-direction: column; justify-content: center; overflow-wrap: anywhere; }
 html.mobile-ready .attr-card::before { display: none; }
 html.mobile-ready .attr-card .team-badge { flex-direction: column; gap: 1px; min-width: 0; font-size: 10px; white-space: normal; }
 html.mobile-ready .attr-card .team-logo-frame { width: 13px; height: 13px; flex-basis: 13px; padding: 0; border-radius: 3px; }
}
