:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;color:#182a32;background:#f1f4f4;font-synthesis:none;--app-height:100dvh;--header-height:56px;--home-color:#f08468;--away-color:#bddded}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%}body{overflow:hidden}button,input,select{font:inherit;color:inherit}button{cursor:pointer;background:#fff;border:1px solid #d7e1dd;border-radius:8px;padding:10px 12px;min-width:48px;min-height:48px;font-size:14px;touch-action:manipulation}button:disabled{opacity:.35;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible,summary:focus-visible,canvas:focus-visible{outline:3px solid #10868c;outline-offset:2px}select,input[type=text]{min-height:48px;max-width:100%;width:100%;padding:10px 8px;border:1px solid #c8d6ce;border-radius:6px;background:white;font-size:16px}select{touch-action:manipulation}input[type=range]{width:100%;min-height:48px;accent-color:#178a7b}
header{display:flex;align-items:center;gap:20px;height:var(--header-height);padding:4px max(14px,env(safe-area-inset-right)) 4px max(14px,env(safe-area-inset-left));background:white;border-bottom:1px solid #dce3e3}.brand{display:flex;align-items:center;gap:14px;font-size:14px;font-weight:800;letter-spacing:1.6px}.brand small{display:block;font-size:12px;letter-spacing:2.7px;color:#73868a;margin-top:4px}.brandmark{font-size:30px;letter-spacing:-8px;padding-right:9px}.brandmark span{color:#168578}.heading{font-size:16px;border-left:1px solid #dce3e3;padding-left:20px}.history{display:none}
main{height:calc(var(--app-height) - var(--header-height));min-height:0}.workspace{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:6px;width:100%;height:100%;min-height:0;padding:6px max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));overflow:hidden;background:#f1f4f4}.workspace.expanded{position:fixed;inset:0;z-index:1000;height:var(--app-height);padding-top:max(6px,env(safe-area-inset-top))}.workspace:fullscreen{width:100vw;height:100dvh}.board-top{grid-column:1;grid-row:1;display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0}.view-controls,.board-actions{display:contents}.view-controls label{display:flex;align-items:center;gap:6px;font-size:14px;white-space:nowrap}.view-controls label[hidden]{display:none}.view-controls select{width:auto;min-width:112px;font-size:14px}.board-top button{white-space:nowrap}.pitch-space{grid-row:2;grid-column:1;position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;padding:0;overflow:hidden}.pitch-wrap{position:relative;flex:none;min-width:0;min-height:0}canvas{display:block;width:100%;height:100%;border-radius:8px;touch-action:none;background:#285e49;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.lane-labels{display:none}
.toolbar{grid-column:1;grid-row:3;display:flex;align-items:center;gap:4px;min-width:0;min-height:0;max-width:100%;padding:4px;border:1px solid #dfe6e4;border-radius:10px;background:white;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}.tool{flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:88px;min-width:88px;min-height:64px;padding:7px 6px;border:0;background:transparent}.tool svg{width:24px;height:24px;flex:none}.tool span{font-size:14px;white-space:nowrap;line-height:1.3}.tool.active{background:#173d34;color:white}.tool[data-tool=eraser].active{background:#a64039}@media(hover:hover){.tool:hover:not(.active){background:#edf4f1}}
footer{grid-column:1;grid-row:4;min-width:0;font-size:12px;line-height:1.4;color:#637a75}footer #hint{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}footer>span:last-child{display:none}
/* Dialogs own their bounded scroll areas. No inherited non-shrinking sidebar. */
dialog{position:fixed;inset:0;box-sizing:border-box;border:1px solid #c9d7d2;border-radius:12px;background:white;color:#182a32;padding:0;margin:auto;width:min(840px,calc(100vw - 20px));max-width:calc(100vw - 20px);max-height:calc(var(--app-height) - 20px);box-shadow:0 24px 100px #071b3655;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}dialog:not([open]){display:none}dialog::backdrop{background:#10272299}
#settings-dialog{inset:10px auto auto 10px;margin:0;width:min(380px,calc(100vw - 20px));height:calc(var(--app-height) - 20px);overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable;touch-action:pan-y}#settings-dialog[open]{display:block}.settings-heading{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;background:white;border-bottom:1px solid #dce3e3}.settings-heading h2{font-size:18px;margin:0}.settings-heading button{flex:none}#settings-dialog aside{display:block;width:100%;min-width:0;height:auto;padding:18px 20px 28px;overflow:visible;background:white}
.section-label{display:flex;justify-content:space-between;gap:10px;font-size:12px;font-weight:750;letter-spacing:1.3px;color:#63767c}.section-label span{letter-spacing:0;font-weight:400}.team-tabs{display:flex;gap:4px;padding:4px;background:#f1f4f4;border-radius:9px;margin-top:16px}.team-tabs button{flex:1;border:0;background:transparent;padding:8px;font-size:14px}.team-tabs button.active{background:white;box-shadow:0 1px 4px #172c3015}.home-dot,.away-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:7px;background:var(--home-color)}.away-dot{background:var(--away-color)}.formation-summary{display:flex;justify-content:space-between;align-items:center;margin:20px 0 16px}.formation-summary strong{font-size:30px;letter-spacing:1px}.formation-summary span{font-size:12px;color:#697d82}.formations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.formations button{font-size:14px;letter-spacing:.6px}.formations button.active{color:#08766a;background:#eaf5f2;border-color:#66aaa0;font-weight:700}.aside-note{font-size:12px;color:#6d7c81;line-height:1.8;margin:12px 0 0}.divider{height:1px;background:#e7ebeb;margin:20px 0}.team-settings{margin-top:18px;border-top:1px solid #e7ebeb;padding-top:12px}summary{cursor:pointer;font-size:14px;font-weight:650;min-height:44px;padding:10px 0}.field-label{display:block;font-size:14px;margin:16px 0 8px}.field-label span{float:right;color:#6d7c81}.kit-colors{display:grid;grid-template-columns:repeat(auto-fit,minmax(48px,1fr));gap:7px}.kit-colors button,.swatches button{width:48px;height:48px;min-width:48px;min-height:48px;padding:0;border:7px solid white;border-radius:50%;box-shadow:0 0 0 1px #9eb2a9}.kit-colors button.active,.swatches button.active{box-shadow:0 0 0 2px #168578}.swatches{display:flex;flex-wrap:wrap;gap:8px}.custom-color{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px;margin:14px 0}.custom-color input{height:48px;width:56px;padding:2px;border:1px solid #c8d4d1;border-radius:5px;background:white}.member-buttons{display:grid;gap:8px;margin-top:16px}.delete{width:100%;font-size:14px}.delete:not(:disabled){color:#ad302a;border-color:#e1b5b2;background:#fff9f8}#selection-count{font-size:14px;color:#467269;margin:0 0 10px}#player-editor{padding-top:4px}#player-editor[hidden],#text-options{display:none}
#members-dialog{height:min(860px,calc(var(--app-height) - 20px));overflow:hidden}#members-form{display:flex;flex-direction:column;min-height:0;height:100%;margin:0}.dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px 12px;flex:none}.dialog-heading h2{font-size:22px;margin:0 0 8px}.dialog-heading p{font-size:14px;color:#607575;margin:0;line-height:1.6}.dialog-heading button{flex:none;font-size:22px}.csv-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:0 20px;flex:none}.csv-tools a,.csv-label{display:inline-flex;align-items:center;min-height:48px;border:1px solid #bbcfc8;border-radius:7px;padding:8px 12px;text-decoration:none;color:#186750;font-size:14px;cursor:pointer;background:#f7fbf9}.csv-label{position:relative;overflow:hidden}.csv-label input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.csv-label:focus-within{outline:3px solid #168578}.csv-tools span{font-size:12px;color:#687b7d}#members-message{flex:none;font-size:14px;margin:10px 20px;color:#236952}#members-message.error{color:#b72d29}.members-scroll{flex:1 1 0;min-height:0;overflow:auto;padding:0 20px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}.members-table{border-collapse:collapse;width:100%;min-width:540px;font-size:14px;table-layout:fixed}.members-table thead{position:sticky;top:0;z-index:1;background:#edf4f1}.members-table th{text-align:left;padding:12px 6px;font-size:14px;color:#496a60}.members-table th:nth-child(1){width:64px}.members-table th:nth-child(2){width:100px}.members-table th:nth-child(3){width:88px}.members-table th:nth-child(5){width:94px}.members-table td{padding:6px;border-bottom:1px solid #e5ece8}.members-table input,.members-table select{font-size:16px;width:100%;padding:9px 7px;min-width:0;min-height:48px}.members-table tbody tr:nth-child(12) td{border-top:3px solid #bacfc6}.members-table .roster-state{font-size:12px;color:#617976}.dialog-bottom{display:flex;align-items:center;gap:10px;border-top:1px solid #dbe5df;padding:12px 20px;flex:none}.dialog-bottom span{font-size:12px;color:#687b7d;margin-right:auto}.primary{background:#173d34;color:white;border-color:#173d34}
@media(max-width:600px){.heading{display:none}.board-top{gap:6px}.board-top button{padding:8px 10px}.view-controls select{min-width:108px}.dialog-heading{padding:14px}.dialog-heading h2{font-size:20px}.csv-tools{padding:0 14px}.members-scroll{padding:0 10px}.dialog-bottom{padding:10px;flex-wrap:wrap}.dialog-bottom span{width:100%}}
@media(max-height:550px){:root{--header-height:48px}footer{display:none}#members-dialog{overflow:auto}#members-form{height:auto;display:block}.members-scroll{max-height:none;overflow-x:auto;overflow-y:visible}.dialog-bottom{position:sticky;bottom:0;background:white}.dialog-bottom span{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
/* A single bottom tool row in every orientation. */
.tool-dock{grid-column:1;grid-row:3;min-width:0;display:flex;flex-direction:column;gap:6px;align-items:center;padding-top:4px}
.tool-dock .toolbar{display:flex;flex-wrap:nowrap;width:max-content;max-width:100%;min-width:0;max-height:none;overflow-x:auto;overflow-y:hidden;align-items:center;justify-content:flex-start;flex:none}
.tool{flex:0 0 88px;width:88px;min-width:88px}.tool span{white-space:nowrap}
#tools-toggle{display:none}.pitch-space{align-items:center;justify-content:center}

#text-bold[aria-pressed=true],#inline-text-bold[aria-pressed=true]{background:#173d34;color:white}#text-value{width:100%;min-height:48px;font-size:16px}
#inline-text-dialog{inset:auto;margin:0;position:fixed;width:min(340px,calc(100vw - 20px));max-height:calc(var(--app-height) - 20px);overflow:auto;padding:16px;touch-action:pan-y}
#inline-text-title{font-size:18px;margin:0 0 12px}#inline-text-value{width:100%;font-size:16px;min-height:48px}.inline-format{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0}.inline-format>label:first-child{width:100%;font-size:14px}.inline-format output{float:right}.inline-format input[type=range]{flex:1 0 100%;min-height:48px}.inline-color{font-size:14px;display:flex;align-items:center;gap:10px}.inline-color input{width:56px;height:48px;padding:2px;border:1px solid #c8d4d1;border-radius:5px}.inline-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}

/* Scrolling remains available; pinch does not scale the tactics surface. */
.workspace{touch-action:pan-x pan-y;overscroll-behavior:none}.workspace.expanded #fullscreen{border-color:#173d34;font-weight:700}

/* Occupy the visible viewport without leaving a stale page below the dock. */
body{position:fixed;inset:0 0 auto;height:var(--app-height);display:flex;flex-direction:column;overflow:hidden}header{flex:none}main{flex:1;min-height:0;height:auto}.workspace{padding-bottom:env(safe-area-inset-bottom,0px)}footer{display:none!important}.tool-dock{margin-bottom:0;align-self:end}#fullscreen-help{padding:20px;width:min(440px,calc(100vw - 20px));overflow:auto}#fullscreen-help h2{font-size:20px;margin:0 0 12px}#fullscreen-help p{font-size:16px;line-height:1.6}#fullscreen-help-close{float:right}

.brand-copyright{display:block;font-size:9px;line-height:1.2;font-weight:400;letter-spacing:.1px;color:#82918e;margin-top:2px}#app-settings-dialog{width:min(560px,calc(100vw - 20px));height:calc(var(--app-height) - 20px);overflow:auto;touch-action:pan-y}.app-settings-body{padding:4px 20px 24px}.app-settings-body section+section{border-top:1px solid #dce3e3;margin-top:24px;padding-top:12px}.app-settings-body h3{font-size:18px}.app-settings-body p{font-size:14px;line-height:1.7}.version-details{display:grid;grid-template-columns:80px 1fr;gap:8px;font-size:16px}.version-details dd{margin:0;overflow-wrap:anywhere}#error-report-form{display:grid;gap:10px}#error-report-form label{font-size:14px;margin-top:6px}#report-email,#report-content{width:100%;min-height:48px;font:inherit;font-size:16px;padding:10px;border:1px solid #c8d6ce;border-radius:6px}#report-content{resize:vertical;min-height:120px}.human-verification{padding:12px;background:#f1f4f4;border-radius:8px;font-size:14px}.human-verification p{margin:4px 0}#version-reload-note{color:#8d4c22}

.brand-logo{display:block;width:44px;height:44px;flex:none;object-fit:contain;border-radius:8px}.brand{gap:10px}
/* Independent design settings and vector-redrawn area magnification. */
#drawing-dialog{width:min(400px,calc(100vw - 20px));height:calc(var(--app-height) - 20px);overflow:auto;touch-action:pan-y}.drawing-body{padding:4px 20px 24px}#drawing-target{font-size:14px;line-height:1.6;color:#496a60}.drawing-body .aside-note{font-size:14px}
.board-pane{display:flex;align-items:center;justify-content:center;position:relative;min-width:0;min-height:0;width:100%;height:100%;overflow:hidden}.pitch-space.split-view{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.board-pane[hidden]{display:none!important}#zoom-pane{display:flex;flex-direction:column;border:1px solid #b7cfc3;border-radius:8px;background:#e6eeea}.zoom-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;width:100%;padding:0 4px 0 12px;font-size:14px;font-weight:650}.zoom-heading button{font-size:22px;border:0;background:transparent}.zoom-space{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;min-width:0;width:100%;overflow:hidden}.zoom-wrap{position:relative;flex:none;min-width:0;min-height:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(orientation:portrait){.pitch-space.split-view{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:8px}}

.input-preference{display:flex;align-items:center;gap:10px;min-height:48px;font-size:16px}.input-preference input{width:22px;height:22px;flex:none;accent-color:#178a7b}

.board-top,.tool-dock{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}

/* Controls remain available without a gesture-dependent launcher. */
.workspace{position:relative;grid-template-rows:auto minmax(0,1fr) auto;padding-bottom:max(6px,env(safe-area-inset-bottom))}
#board-controls{flex-wrap:nowrap;overflow-x:auto;min-width:0;overscroll-behavior-x:contain;touch-action:pan-x}
#board-controls .view-controls,#board-controls .board-actions{flex-wrap:nowrap;flex-shrink:0}
#board-controls button,#board-controls label{flex-shrink:0}
#tool-dock .toolbar{display:flex;position:static;flex-wrap:nowrap;overflow-x:auto;touch-action:pan-x;overscroll-behavior-x:contain}

/* Native iPad selection/callouts must not activate on board labels or launchers. */
header,.workspace,.workspace button,.workspace label{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.workspace input,.workspace textarea,.workspace [contenteditable="true"]{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}
/* The two panes share all available space; the paper has no fixed aspect ratio. */
#writing-pane{flex-direction:column;align-items:stretch;border:1px solid #c8d6ce;border-radius:8px;background:#fff}
.writing-heading{display:flex;align-items:center;justify-content:space-between;min-height:44px;padding:0 4px 0 12px;flex:none;gap:8px;font-size:15px;background:#edf3f0}
.writing-heading strong{white-space:nowrap}.writing-heading button{font-size:24px;border:0;background:transparent;min-height:44px;min-width:44px;padding:4px}
.writing-scroll-hint{margin-left:auto;font-size:11px;font-weight:400;color:#546b62;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.writing-controls{display:flex;gap:4px;padding:3px 6px;overflow-x:auto;overflow-y:hidden;flex:none;align-items:center;scrollbar-width:thin;background:#f4f7f5;border-bottom:1px solid #d5e0da;touch-action:pan-x}
.writing-controls>*{flex-shrink:0}.writing-controls button{min-height:44px;min-width:44px;padding:7px 9px;font-size:13px;white-space:nowrap}
.writing-controls button[aria-pressed=true]{background:#173d34;color:white}.writing-controls label{display:flex;align-items:center;gap:4px;white-space:nowrap;font-size:12px}
.writing-controls input[type=range]{width:76px;min-height:44px}.writing-controls input[type=color]{width:44px;height:44px;padding:4px}
#writing-font-size{width:57px;min-height:44px;border:1px solid #c8d6ce;border-radius:6px;background:white;padding:4px;font-size:16px}
.writing-space{position:relative;flex:1;min-height:0;min-width:0;width:100%;overflow:hidden;padding:0;background:#fff}
#writing-viewport{position:absolute;inset:0;overflow-x:hidden;overflow-y:scroll;overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:pan-y;-webkit-overflow-scrolling:touch;overflow-anchor:none}
#writing-page{position:relative;width:100%;min-height:100%;background:white;overflow:hidden;--memo-line-height:24px}
#writing-canvas{position:absolute;top:0;left:0;background:transparent;border-radius:0;touch-action:none;pointer-events:none}
#writing-text{display:block;width:100%;min-height:0;resize:none;border:0;border-radius:0;padding:12px;background:transparent;color:#173d34;font-family:inherit;font-size:10pt;font-weight:400;line-height:1.8;overflow:hidden;outline-offset:-3px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
#writing-page.memo{background-image:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--memo-line-height) - 1px),#e1ebe7 calc(var(--memo-line-height) - 1px),#e1ebe7 var(--memo-line-height));background-position:0 12px}
@media(max-width:600px){.writing-scroll-hint{display:none}}

#pen-settings-dialog{width:min(420px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto}#pen-color{width:100%;height:48px}#pen-palette{margin-top:12px}

/* Web 3D is an optional second pane, never a resized toolbar. */
#three-pane{overflow-y:auto;flex-direction:column;background:#152d29;border:1px solid #b7cfc3;border-radius:8px;color:#f0f5f3;align-items:stretch}
.three-heading{display:flex;align-items:center;gap:12px;padding:4px 8px 4px 14px;min-height:48px}.three-heading strong{font-size:16px}.three-live{font-size:12px;color:#b7d7c9}.three-heading button{margin-left:auto;font-size:24px;min-width:44px;min-height:44px}
.three-controls{display:flex;flex-wrap:wrap;gap:6px;padding:4px 8px;align-items:center;background:#e7eeea;color:#173d34;flex-shrink:0}.three-controls[hidden],.three-controls label[hidden]{display:none}.three-controls label{display:flex;align-items:center;gap:6px;font-size:14px;min-width:0}.three-controls select{width:auto;max-width:240px;min-height:44px}.three-controls button{min-height:44px;font-size:14px}.three-controls span{font-size:12px}.three-adjust input{width:90px;min-width:65px;min-height:44px;margin:0}.three-adjust label{flex:1}.three-stage{position:relative;min-height:80px;min-width:0;flex:1;overflow:hidden}#three-canvas{width:100%;height:100%;background:#142a29;border-radius:0;cursor:grab;outline-offset:-3px}#three-message{position:absolute;top:12px;left:12px;right:12px;background:#ffffffed;color:#173d34;padding:12px;border-radius:8px;font-size:14px;pointer-events:none}.three-help{margin:0;padding:7px 12px;font-size:12px;color:#d2e1da}#three-switch{display:none}
@media(max-width:600px){.pitch-space.three-open{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.three-open .main-pane{display:none}.three-open.three-mobile-2d .main-pane{display:flex}.three-open.three-mobile-2d #three-pane{position:absolute;right:8px;top:8px;width:auto;height:auto;border:0;z-index:3;background:transparent}.three-mobile-2d #three-pane>:not(.three-controls){display:none}.three-mobile-2d #three-pane .three-controls>*:not(#three-switch){display:none}.three-mobile-2d #three-pane .three-controls{padding:0;background:transparent}.three-mobile-2d #three-pane .three-adjust{display:none}#three-switch{display:inline-flex}}
@media(max-height:500px){.three-help{display:none}.three-heading{min-height:40px}.three-controls{padding:2px 6px}}

/* Stable, labelled control groups retain the established direct tap targets. */
#board-controls{gap:0;padding:6px 4px;background:#fff;border:1px solid #dbe4df;border-radius:12px;box-shadow:0 2px 8px #173d3405;scrollbar-width:thin;scrollbar-color:#b4c8be transparent;align-items:stretch}
#board-controls .menu-cluster{display:flex;flex-direction:column;flex:none;gap:3px;padding:0 10px;border-right:2px solid #9cafA3}
#board-controls .menu-cluster:last-child{border-right:0}
#board-controls .menu-caption{font-size:20px;font-weight:700;letter-spacing:.04em;color:#354f43;line-height:26px;padding-left:4px;user-select:none}
#board-controls .menu-items{display:flex;align-items:center;gap:4px;flex-wrap:nowrap}
#board-controls button{border-color:transparent;background:transparent;border-radius:7px;font-size:13px;font-weight:500;padding:8px 10px;min-height:48px;transition:background-color .12s,color .12s}
#board-controls button:disabled{opacity:.3}
#board-controls button[aria-expanded=true],#board-controls button[aria-pressed=true]{background:#173d34;color:#fff}
#board-controls label{font-size:12px;color:#526c60;gap:6px}
#board-controls select{border-color:#dbe5df;background:#f5f8f6;font-size:13px;min-height:48px;min-width:108px;border-radius:7px}
#board-controls #view-delete{color:#9c4944}
#board-controls #view-undo,#board-controls #view-redo{font-size:21px;padding:6px;min-width:48px}
@media(hover:hover){#board-controls button:not(:disabled):hover{background:#edf3ef;color:#173d34}#board-controls #view-delete:not(:disabled):hover{background:#faedeb;color:#983e38}}
.three-controls{background:#f4f7f5;gap:8px;padding:7px 10px;border-bottom:1px solid #dfe8e2}
.three-controls button,.three-controls select{border-color:#dbe5df;border-radius:7px;font-size:13px}
.three-adjust label{font-size:12px;color:#526c60;gap:8px}
@media(max-width:700px){#board-controls .menu-cluster{padding:0 7px}#board-controls button{padding:8px}#board-controls{border-radius:9px}}
@media(max-height:500px){#board-controls .menu-caption{display:none}#board-controls{padding:3px}}

#app-settings-open{display:inline-flex;align-items:center;gap:8px;font-weight:700;border:2px solid #173d34}.settings-gear{font-size:32px;line-height:1}.save-status{margin:0 12px;font-size:14px;color:#173d34}.save-status:empty{display:none}

.save-message{position:fixed;inset:0;margin:auto;width:min(440px,calc(100vw - 40px));text-align:center;padding:32px 24px;border:1px solid #173d34;border-radius:18px;box-shadow:0 16px 60px #0003}.save-message::backdrop{background:#102c2455}.save-message p{font-size:20px;font-weight:700;line-height:1.6;margin:0 0 18px}.save-message button{font-size:14px}.saved-data-settings{padding:16px 24px}.saved-data-settings p{line-height:1.6}#saved-delete-confirm{max-width:min(520px,calc(100vw - 32px))}#saved-delete-confirm-button,#saved-data-delete{color:#9c2438;border-color:#9c2438}

.save-message #save-message-text{font-size:22px;line-height:1.5;margin:0 0 10px;text-wrap:balance}.save-message #save-message-detail{font-size:16px;font-weight:400;line-height:1.7;margin:0 0 24px;text-wrap:balance;overflow-wrap:anywhere}.save-message button{margin-top:12px}

/* Trial-only UI; the product site and its stored boards are separate. */
[hidden]{display:none!important}
header .heading{font-size:12px;letter-spacing:.12em;color:#8e394d}.demo-back{margin-left:auto;color:#173d34;font-size:13px;font-weight:700;text-decoration:none;padding:10px 12px;border:1px solid #d4e0db;border-radius:8px;white-space:nowrap}.history{display:none}.board-top{gap:10px;padding-top:10px}
.demo-banner{flex:0 0 100%;width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 0 10px;border-bottom:1px solid #c8d6d0;color:#173d34}.demo-meter{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13px}.demo-meter>strong{background:#173d34;color:white;padding:5px 9px;border-radius:5px;letter-spacing:.07em;font-size:11px}.demo-meter button{min-height:32px;padding:4px 10px;font-size:12px}#demo-quota{font-weight:750;font-variant-numeric:tabular-nums;white-space:nowrap}.demo-unavailable{font-size:11px;color:#66736e}
.demo-device-note{display:flex;align-items:center;gap:8px;background:#fff5e6;border:1px solid #dab578;border-radius:7px;padding:7px 10px;flex-shrink:0}.warning-icon{display:grid;place-items:center;flex:0 0 23px;width:23px;height:23px;border-radius:50%;background:#946423;color:white;font-weight:800;font-size:16px}.demo-device-note strong{display:block;font-size:12px;line-height:1.5;color:#714610}.demo-device-note small{display:block;font-size:10px;line-height:1.6;color:#714610}
.menu-caption{font-size:16px}.menu-cluster{padding-right:12px}.menu-items{gap:6px}.menu-items button,.menu-items select{font-size:12px;min-height:38px;padding:7px 9px}.settings-gear{font-size:24px!important}#board-save:disabled{opacity:1;color:#8b9290;background:#eef1ef;border-style:dashed;cursor:not-allowed}.demo-formation-note{font-size:12px;line-height:1.8;color:#725d35;background:#fff5e6;border-radius:6px;padding:10px 12px}.formations button:disabled{opacity:.55;cursor:not-allowed}
#demo-help-dialog,#demo-limit-dialog{width:min(580px,calc(100vw - 28px));max-height:calc(100dvh - 36px);overflow:auto;border:0;border-radius:18px;color:#173d34;padding:30px;box-shadow:0 20px 90px #102e2940}#demo-help-dialog::backdrop,#demo-limit-dialog::backdrop{background:#0c242b70}#demo-help-dialog h2,#demo-limit-dialog h2{font-size:23px;line-height:1.6}#demo-help-dialog ol{padding-left:23px}#demo-help-dialog li{margin:15px 0;font-size:14px;line-height:1.8}#demo-help-dialog li strong{display:block;margin-bottom:4px}#demo-help-dialog p{font-size:13px;line-height:1.8}#demo-help-dialog small,#demo-limit-dialog small{display:block;font-size:12px;line-height:1.8;color:#697872}
#demo-limit-dialog{text-align:center;padding:40px 30px}.demo-dialog-label{font-size:11px;letter-spacing:.15em;font-weight:700;color:#9d4358}#demo-limit-dialog p{line-height:1.9;font-size:14px;margin:20px 0 26px}.demo-primary{display:block;background:#173d34;color:white;text-decoration:none;padding:14px 20px;border-radius:8px;font-weight:700;margin-bottom:12px}#demo-limit-close{width:100%;padding:12px;margin-bottom:18px}.demo-ended #demo-quota{color:#934252}.demo-back:focus-visible,.demo-primary:focus-visible{outline:3px solid #c58f35;outline-offset:3px}
/* The board is the working surface: short status strip, one primary control row. */
:root{--header-height:44px}
header{height:44px;gap:12px;padding:4px max(10px,env(safe-area-inset-right)) 4px max(10px,env(safe-area-inset-left))}.brand{gap:8px;font-size:13px}.brand-logo{width:32px;height:32px}.brand small,.brand-copyright,header .heading{display:none}.demo-back{font-size:12px;padding:8px 10px;min-height:34px;display:flex;align-items:center}
.workspace{gap:4px;padding-top:4px;padding-left:max(4px,env(safe-area-inset-left));padding-right:max(4px,env(safe-area-inset-right));padding-bottom:max(4px,env(safe-area-inset-bottom))}
.demo-topbar{grid-column:1;grid-row:1;display:flex;flex-direction:column;gap:4px;min-width:0;min-height:0;max-height:42dvh;overflow:auto;overscroll-behavior:contain}
.demo-banner{position:static;flex:none;width:100%;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 12px;padding:2px 8px;border:1px solid #d4dfda;border-radius:8px;background:#fff}
.demo-meter{gap:8px;font-size:.875rem;flex-wrap:nowrap}.demo-meter>strong{font-size:.75rem;letter-spacing:0;padding:5px 7px}.demo-meter button{min-height:40px;min-width:44px;padding:6px 8px;font-size:.875rem}#demo-quota{font-weight:700}.demo-unavailable{font-size:.75rem;line-height:1.5}
.demo-device-note{display:flex;flex:none;align-items:center;gap:6px;min-height:40px;margin:0;padding:5px 8px;border:1px solid #dab578;background:#fff5e6;border-radius:6px}.demo-device-note strong{font-size:.75rem;font-weight:600;white-space:nowrap}.warning-icon{flex-basis:20px;width:20px;height:20px;font-size:14px}
.demo-device-details{padding:12px 14px;background:#fff5e6;border:1px solid #dab578;border-radius:8px;color:#714610;margin:18px 0}.demo-device-details strong{font-size:14px;line-height:1.7}#demo-help-dialog .demo-device-details p{font-size:14px;line-height:1.7;margin:6px 0}
#board-controls{position:static;display:flex;flex-direction:column;flex-wrap:nowrap;flex:0 0 auto;align-items:stretch;gap:0;padding:4px 6px;max-height:none;overflow:visible;min-width:0;border-radius:8px}
#board-controls .menu-cluster{max-width:100%;min-width:0;padding:0 10px;gap:4px}
#board-controls .view-controls{flex:none;border:0;padding:0}
#board-controls .view-controls>.menu-caption{display:none}
#board-controls .view-controls>.menu-items{display:flex;align-items:center;flex-wrap:wrap;gap:4px}
#board-controls .menu-caption{font-size:.75rem;line-height:1.5;font-weight:700;letter-spacing:.02em;padding:0;color:#5e2937}
#board-controls .menu-items{flex-wrap:wrap;gap:4px}
#board-controls .menu-items button,#board-controls .menu-items select{min-height:44px;min-width:44px;font-size:.875rem;line-height:1.4;padding:7px 9px}
#board-controls .view-controls label{font-size:.75rem;gap:4px}#board-controls .view-controls select{min-width:104px}
#board-controls .view-controls #competition-mode{min-width:112px}
#competition-mode,#three-open{border:1px solid #73978a;font-weight:700;color:#173d34;background:#f0f7f3}
#board-controls #view-undo,#board-controls #view-redo{padding:6px;width:44px;font-size:20px}
#board-controls #demo-more-toggle{display:flex;align-items:center;gap:6px;margin-left:auto;border:1px solid #b3c7bd;font-weight:600}#demo-more-toggle>span:first-child{font-size:20px}.demo-more-chevron{line-height:1}#demo-more-toggle[aria-expanded=true] .demo-more-chevron{transform:rotate(180deg)}
#demo-more-controls{display:flex;align-items:stretch;flex-wrap:wrap;gap:12px 0;border-top:2px solid #b8cbc2;margin-top:4px;padding:10px 0 6px}#demo-more-controls .menu-cluster{border-right:2px solid #b8cbc2}#demo-more-controls .menu-cluster:last-child{border:0}
#board-controls #board-save:disabled{opacity:1;color:#737c78;background:#eef1ef;border:1px dashed #c0cbc5}
.tool-dock{padding-top:0;gap:0}.tool-dock .toolbar{padding:3px;gap:2px;border-radius:8px}.tool-dock .tool{width:72px;min-width:64px;min-height:56px;padding:5px 4px;gap:3px}.tool-dock .tool svg{width:22px;height:22px}.tool-dock .tool span{font-size:.75rem}
.demo-ended .demo-topbar{opacity:.65}
@media(max-width:1000px){.demo-unavailable{display:none}}
@media(max-width:700px){.demo-banner{gap:2px 6px;padding:2px 6px}.demo-meter{gap:5px}.demo-device-note{padding:5px 6px}#board-controls .view-controls label{font-size:.75rem}#board-controls .view-controls select{min-width:88px}#board-controls .view-controls #competition-mode{min-width:96px}#board-controls .menu-items button,#board-controls .menu-items select{padding:7px}#board-controls .menu-cluster{padding:0 7px}#demo-limit-dialog{padding:30px 20px}}
@media(max-width:430px){.demo-device-note{margin-left:auto}.demo-meter{width:100%;justify-content:space-between}.demo-meter>strong{font-size:.75rem}.demo-meter button{margin-left:auto}.demo-device-note{min-height:32px}.demo-topbar{max-height:45dvh}}
