/* Settings share a compact navigation bar and readable, grouped controls. */
#settings-dialog .settings-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;border:0;background:var(--bg);padding:4px;border-radius:12px;margin:12px 0 16px}
#settings-dialog .settings-tabs button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-width:0;min-height:54px;padding:6px 2px;border:1px solid transparent;border-radius:8px;background:none;box-shadow:none;color:var(--muted)}
#settings-dialog .settings-tabs button svg{width:21px;height:21px}
#settings-dialog .settings-tabs button .setting-label{font-size:12px;line-height:1.3}
#settings-dialog .settings-tabs button[aria-selected=true]{background:var(--panel);border-color:var(--line);color:var(--ink);box-shadow:0 1px 3px #0002}
#settings-dialog #settings-play{display:flex;flex-direction:column;gap:12px}
#settings-dialog .control-section{display:flex;flex:none;flex-direction:column;gap:16px;margin:0;padding:16px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--ink) 3%,var(--panel))}
.control-section header h3{font-size:16px;margin:0;font-weight:650}
.control-section header p,.control-help{font-size:12px;color:var(--muted);line-height:1.5;margin:4px 0 0}
#settings-dialog .control-section .setting-choice,#settings-dialog .control-section .camera-distance{margin:0;padding:0;border:0;min-width:0}
#settings-dialog .control-section legend{display:block;padding:0;margin:0 0 8px;font-size:13px;font-weight:500;color:var(--ink)}
#settings-dialog .control-section .setting-chip{display:flex;justify-content:center;align-items:center;gap:6px;min-width:0;min-height:42px;height:auto;padding:8px 6px;font-size:13px;border-radius:8px;box-shadow:none}
#settings-dialog .control-section .setting-chip span{font-size:13px}
#settings-dialog .control-section .setting-chip svg{width:20px;height:20px}
#settings-dialog .control-section .setting-chip[aria-pressed=true]{background:color-mix(in srgb,var(--ink) 16%,var(--panel));border-color:color-mix(in srgb,var(--ink) 65%,var(--line));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 15%,transparent)}
#settings-dialog .control-section .control-toggle{display:flex;justify-content:space-between;gap:14px;min-height:48px!important;padding:0!important;border:0!important;margin:0!important}
.control-toggle-copy{display:grid;gap:3px;text-align:left;min-width:0;font-size:14px;line-height:1.4}
.control-toggle-copy small{font-size:12px;line-height:1.4;color:var(--muted);font-weight:400}
.control-toggle.is-disabled{opacity:.45}
#settings-dialog .control-angle{display:grid;grid-template-columns:1fr auto;align-items:center;gap:0 8px;font-size:13px;margin:0;padding:0}
#settings-dialog .control-angle[hidden]{display:none}
.angle-value{font-variant-numeric:tabular-nums;color:var(--muted)}
#settings-dialog .control-angle input{grid-column:1/-1;width:100%;min-width:0;max-width:none;min-height:32px;margin:4px 0 0;accent-color:var(--accent)}
#settings-dialog #camera-distance:disabled{opacity:.4}

/* The basic marker is independent of the detailed movement-path overlay. */
body[data-last-move-marker=off] [data-basic-last-move]{display:none}
#last-move-marker-choice .setting-chips{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#settings-dialog #last-move-marker-choice .setting-chip{min-height:44px;font-size:14px}
#settings-dialog #last-move-marker-choice .setting-chip span{font-size:14px}
#last-move-marker-choice svg{flex:none;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
#settings-dialog #last-move-marker-choice legend{font-size:14px}
#last-move-marker-choice .control-help{margin-top:8px;font-size:13px}

/* About offers a useful starting point, with provenance a little further down. */
#settings-dialog #settings-more{padding:2px;display:flex;flex-direction:column;gap:16px}
.about-intro{display:flex;align-items:center;gap:14px;padding:8px 0 0}
.about-mark{display:grid;place-items:center;flex:none;width:58px;height:66px;background:color-mix(in srgb,var(--ink) 7%,var(--panel));clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);font-size:38px;color:var(--accent)}
.about-intro h3{font-size:26px;letter-spacing:.04em;font-weight:650;margin:0 0 6px}
.about-intro p{margin:0;font-size:14px;line-height:1.5}
#settings-more .about-lead{font-size:15px;line-height:1.6;margin:2px 0 8px;color:var(--muted)}
.about-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:2px 0 8px}
.about-actions button{display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:5px;padding:14px;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--ink) 4%,var(--panel))}
.about-actions strong{font-size:14px;font-weight:600}
.about-actions span{font-size:12px;color:var(--muted);line-height:1.45}
.about-actions b{float:right;color:var(--ink);font-size:16px;font-weight:400}
.about-section{padding:4px 0 0}
.about-section h3{font-size:15px;margin:0 0 7px}
.about-section p,.about-section dd{font-size:13px;line-height:1.5;color:var(--muted);margin:0}
#settings-more .about-original .beta-buy{align-items:flex-start;margin:12px 0 0;padding:12px 14px;background:var(--bg);gap:3px;font-size:14px}
#settings-more .about-original .beta-buy span{font-size:12px}
.about-section dl{display:grid;gap:12px;margin:0}
.about-section dt{font-size:13px;font-weight:500;margin-bottom:3px}
#settings-more .about-credits{border:0;border-top:1px solid var(--line);padding:0;border-radius:0;flex:none}
#settings-more .about-credits summary{font-size:13px;color:var(--muted);padding:12px 0;min-height:44px}
#settings-more .about-credits p{font-size:12px;line-height:1.5;margin:0 0 10px}

/* One row language in the board picker and the main Games menu. */
:is(#mobile-game-select,#beta-hub,#online-dialog) .game-picker-row{min-height:54px;gap:0;padding:0;border:0;border-radius:10px;margin:2px 0;align-items:center;background:color-mix(in srgb,var(--ink) 3%,var(--panel))}
:is(#mobile-game-select,#beta-hub,#online-dialog) .game-picker-row.active{background:color-mix(in srgb,var(--ink) 15%,var(--panel))}
:is(#mobile-game-select,#beta-hub,#online-dialog) .game-picker-row[data-kind=online]{border-left:2px solid color-mix(in srgb,var(--ink) 35%,var(--line))}
:is(#mobile-game-select,#beta-hub,#online-dialog) .game-picker-row:has([data-turn=yours]){border-left-color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--panel))}
:is(#mobile-game-select,#beta-hub,#online-dialog) .game-picker-select{display:flex;align-items:center;gap:8px;min-height:54px;padding:8px 10px;border:0;border-radius:inherit;text-align:left;background:transparent;box-shadow:none;font-size:14px;flex:1;min-width:0;color:var(--ink)}
:is(#mobile-game-select,#beta-hub,#online-dialog) .game-picker-select .game-label{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}
:is(#mobile-game-select,#beta-hub,#online-dialog) .game-picker-select .game-title{font-size:14px;line-height:1.35;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:is(#mobile-game-select,#beta-hub,#online-dialog) .game-picker-select .game-detail{font-size:11px;line-height:1.4;color:var(--muted);white-space:normal}
:is(#mobile-game-select,#beta-hub,#online-dialog) .game-picker-select::before{content:'';display:block;flex:none;min-width:14px;width:14px;height:16px;margin:0;background:var(--muted);clip-path:polygon(50% 0,94% 25%,94% 75%,50% 100%,6% 75%,6% 25%,50% 0,50% 10%,14% 30%,14% 70%,50% 90%,86% 70%,86% 30%,50% 10%)}
:is(#mobile-game-select,#beta-hub,#online-dialog) .game-picker-select[data-turn=theirs]::before{clip-path:polygon(0 0,100% 0,100% 22%,60% 50%,100% 78%,100% 100%,0 100%,0 78%,40% 50%,0 22%);height:13px}
:is(#mobile-game-select,#beta-hub,#online-dialog) .game-picker-select[data-turn=yours]::before{background:var(--accent);clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}
:is(#mobile-game-select,#beta-hub,#online-dialog) .game-picker-close{flex:0 0 38px;width:38px;min-width:38px;height:44px;min-height:44px;padding:0;border:0;font-size:20px;color:var(--muted);background:none}
#beta-hub .hub-game-list{display:grid;gap:4px}
#beta-hub .menu-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0}
#beta-hub .menu-section-heading h3{margin:0;font-size:13px;font-weight:600}
#hub-local-count{font-size:12px;color:var(--muted)}
#hub-local-games{margin-top:20px}
#beta-hub .game-filters{margin:0 0 10px}
#beta-hub .game-filters button{min-height:36px;font-size:12px;padding:6px 12px;border-radius:8px}
#beta-hub .hub-find-game{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:46px;padding:10px 12px;margin:16px 0 0;text-align:left;border:1px solid var(--line);border-radius:10px;font-size:13px;color:var(--ink)}
#beta-hub .games-empty{padding:12px;margin:0;border:1px dashed var(--line);border-radius:10px;font-size:12px}

/* A lobby for real players and tables, with the same actions as their profiles. */
#beta-hub .community-actions{display:flex;align-items:center;gap:8px}
#beta-hub #community-host{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:42px;padding:9px 14px;border-radius:9px;font-size:13px;flex:1}
#beta-hub .community-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:16px 0 10px}
#beta-hub .community-section-heading h3{font-size:14px;margin:0;font-weight:600}
#beta-hub .community-section-heading>span{font-size:12px;color:var(--muted)}
#beta-hub .community-section-heading button{font-size:12px;min-height:36px;padding:6px 0 6px 8px;color:var(--muted)}
#beta-hub #table-search{min-height:40px;font-size:13px;margin-bottom:10px;padding:8px 12px}
#beta-hub .community-table-card{gap:10px;padding:12px;margin:0 0 8px;background:color-mix(in srgb,var(--ink) 3%,var(--panel))}
#beta-hub .table-host-mark{display:grid;place-items:center;flex:none;width:36px;height:40px;font-size:15px;font-weight:600;color:var(--ink);background:color-mix(in srgb,var(--accent) 16%,var(--panel));clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}
#beta-hub .community-table-card strong{font-size:14px;overflow-wrap:anywhere}
#beta-hub .community-table-card>div>span{display:block;font-size:11px;line-height:1.5;margin-top:4px}
#beta-hub .table-join{flex:none;min-width:48px;min-height:40px;padding:8px 10px;font-size:13px;border:1px solid var(--line);border-radius:8px}
#beta-hub .community-empty{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:16px;text-align:left;border:1px dashed var(--line);border-radius:12px;background:none}
#beta-hub .community-empty strong{font-size:14px}
#beta-hub .community-empty p{font-size:12px;line-height:1.5;margin:0 0 6px}
#beta-hub .community-empty button{font-size:12px;padding:8px 12px;min-height:40px}
#beta-hub #player-search-toggle{display:none}
#beta-hub .community-filters{display:flex;flex-wrap:nowrap;gap:4px;margin:4px 0 10px}
#beta-hub .community-filters button{min-height:36px;padding:5px 7px;font-size:11px;white-space:nowrap;border-radius:8px}
#beta-hub #community-search{margin-bottom:12px}
#beta-hub #community-search input{font-size:13px}
#beta-hub #community-players .community-player-card{display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;padding:14px;border-radius:12px;background:color-mix(in srgb,var(--ink) 3%,var(--panel))}
#beta-hub .community-player-card>.account-avatar{width:42px;min-width:42px;height:42px;min-height:42px;padding:0;border:0;align-self:start}
#beta-hub .community-player-card>div{min-width:0}
#beta-hub .community-player-card .community-player-name{display:block;max-width:100%;min-height:24px;padding:0;font-size:15px;line-height:1.4;font-weight:600;text-align:left;overflow-wrap:anywhere;border:0;background:none}
#beta-hub .community-player-card .community-player-presence{display:block;font-size:11px;line-height:1.45;margin-top:3px}
#beta-hub .community-player-card .community-player-bio{grid-column:1/-1;font-size:13px;line-height:1.5;color:var(--ink);margin:0;overflow-wrap:anywhere}
#beta-hub .community-player-card .community-player-actions{grid-column:1/-1;display:flex;gap:6px;padding-top:2px}
#beta-hub .community-player-actions button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:7px 12px;font-size:12px;border:1px solid var(--line);border-radius:8px;flex:1}
#beta-hub .community-player-actions svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7}
#beta-hub .community-player-actions .community-challenge{background:color-mix(in srgb,var(--accent) 12%,var(--panel))}
@media(max-width:400px){#settings-dialog .control-section{padding:12px}#settings-dialog .control-section .layout-choice .setting-chip{flex-direction:column;gap:3px;min-height:54px}#settings-dialog .control-section .layout-choice .setting-chip svg{width:19px;height:19px}}
@media(max-height:500px) and (orientation:landscape){#settings-dialog .settings-tabs{margin:6px 0 10px}#settings-dialog .settings-tabs button{flex-direction:row;min-height:38px}}

@media(max-width:380px){.about-actions{grid-template-columns:1fr}}
