/* The folded sheet and solo table share the arcade's control scale. */
:root { --sans:var(--suite-font); --poem:var(--suite-font); --serif:var(--suite-font); --dim:#b7b1a5; --t-small:.9375rem; }
body { font-family:var(--suite-font); }
.pbtn,.chip,button,.solo-link,.nav-link,select { font-family:var(--suite-font); font-size:var(--suite-control-size); line-height:1.5; min-height:var(--suite-control-height); letter-spacing:normal; text-transform:none; }
:is(button,.pbtn,select,textarea,input,summary):focus-visible { outline:2px solid var(--bone,#e7e0d0); outline-offset:3px; }
button,.pbtn,.chip,.solo-link,.nav-link,.actions-menu > summary { padding:var(--suite-control-padding); border-radius:var(--suite-control-radius); box-shadow:none; }
button,.pbtn,.pbtn.secondary,.chip,.solo-link,.nav-link { color:var(--bone); background:transparent; border:1px solid #726e65; }
button.primary,.pbtn:not(.secondary) { color:#d58a96; border-color:#bb6676; background:transparent; }
button:hover:not(:disabled),.pbtn:hover:not(:disabled),.pbtn.secondary:hover,.chip:hover,.solo-link:hover,.nav-link:hover { color:var(--bone); border-color:var(--bone); background:#e7e0d008; box-shadow:none; transform:none; }
button.primary:hover:not(:disabled),.pbtn:not(.secondary):hover:not(:disabled) { color:#e4a2ad; border-color:#d58a96; background:#c5708012; }
button:disabled,.pbtn:disabled { opacity:.5; }
.setting-label,.model-readiness,.status,.fold-count,.cue-label,.wall-note,#hint,#panel .help,#panel .model-status { font-family:var(--suite-font); font-size:.9375rem; line-height:1.5; color:var(--dim); }
#panel label,#panel .model-field > span { display:block; font-size:1rem; margin:16px 0 6px; color:var(--bone); }
body[data-surface=solo] #panel-tab { top:76px; left:max(16px,3vw); right:auto; writing-mode:horizontal-tb; transform:none; padding:var(--suite-control-padding); font-family:var(--suite-font); font-size:var(--suite-control-size); letter-spacing:normal; min-height:var(--suite-control-height); border:1px solid #726e65; border-radius:2px; color:var(--bone); background:var(--ink); box-shadow:none; z-index:40; }
body[data-surface=solo] #panel-tab:hover,body[data-surface=solo] #panel-tab[aria-expanded=true] { right:auto; transform:none; color:var(--bone); border-color:var(--bone); background:var(--ink); }
#panel { position:fixed; inset:8px 8px 8px auto; margin:0; width:min(420px,calc(100vw - 16px)); max-width:calc(100vw - 16px); height:calc(100dvh - 16px); max-height:calc(100dvh - 16px); padding:24px; overflow-y:auto; overscroll-behavior:contain; transform:none; font-family:var(--suite-font); font-size:1rem; border:1px solid #726e65; border-radius:2px; background:var(--ink); color:var(--bone); }
#panel:not([open]) { display:none; }
#panel::backdrop { background:#0009; }
#panel .panel-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; position:sticky; top:-24px; background:var(--ink); padding-block:8px; z-index:2; }
#panel h2 { font:600 1.75rem/1.2 var(--suite-display); margin:0; }
#panel .panel-header button { margin:0; }
#panel select { width:100%; min-height:var(--suite-control-height); font-size:1rem; padding:10px; border-radius:2px; }
#panel textarea { width:100%; min-height:100px; font:400 1rem/1.5 var(--suite-font); padding:10px; border-radius:2px; }
#panel #style-choice { background:var(--ink); color:var(--bone); border:1px solid #726e65; }
.menu-primary { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:20px 0; }
#panel .menu-primary .pbtn { margin:0; padding:10px; min-height:var(--suite-control-height); }
.menu-section { border-top:1px solid var(--crease,#514e47); padding:6px 0; }
.menu-section > summary,.actions-menu > summary { display:flex; align-items:center; justify-content:space-between; gap:16px; cursor:pointer; list-style:none; min-height:var(--suite-control-height); padding:10px 0; font:500 1rem/1.5 var(--suite-font); }
.menu-section > summary::after,.actions-menu > summary::after { content:'+'; }
.menu-section[open] > summary::after,.actions-menu[open] > summary::after { content:'−'; }
.menu-section > summary::-webkit-details-marker,.actions-menu > summary::-webkit-details-marker { display:none; }
#panel .override-label { display:flex; align-items:center; gap:12px; min-height:44px; margin:10px 0; font-size:1rem; }
#override-on { width:20px; height:20px; margin:0; }
#full-prompt { font-size:.9375rem; line-height:1.6; overflow-wrap:anywhere; white-space:pre-wrap; }
#panel .menu-items { display:grid; gap:4px; padding-block:8px; }
#panel .menu-items button { margin:0; text-align:left; border-color:transparent; }
.actions-menu { position:relative; min-width:130px; }
.actions-menu > summary { padding:var(--suite-control-padding); border:1px solid #726e65; }
.actions-menu .menu-items { position:absolute; inset:calc(100% + 6px) 0 auto auto; width:min(260px,calc(100vw - 48px)); max-height:50dvh; overflow-y:auto; overscroll-behavior:contain; display:grid; gap:4px; padding:8px; border:1px solid #726e65; background:var(--ink); z-index:30; box-shadow:0 10px 30px #0005; }
.actions-menu .menu-items button { text-align:left; width:100%; white-space:normal; border-color:transparent; }
.actions-menu .menu-items button:hover,#panel .menu-items button:hover { border-color:#726e65; }
.sheet-actions,.reveal-actions { display:flex; align-items:start; flex-wrap:wrap; gap:10px; }
body[data-surface=shared] .page { padding:96px max(16px,3vw) max(32px,env(safe-area-inset-bottom)); }
body[data-surface=shared] .intro { font-size:1.125rem; line-height:1.65; }
body[data-surface=shared] .intro p { max-width:65ch; }
body[data-surface=shared] .table-setting { gap:16px; }
body[data-surface=shared] .table-actions .primary { flex:0 0 auto; width:auto; }
body[data-surface=shared] .setting-field { min-width:0; }
body[data-surface=shared] select { max-width:100%; border-radius:0; }
.reading,#reading { font-family:var(--suite-font); font-size:1.0625rem; line-height:1.65; }
#account-work [hidden] { display:none!important; }
@media(max-width:48rem) {
  body[data-surface=solo] { padding:9rem 16px max(24px,env(safe-area-inset-bottom)); }
  body[data-surface=solo] #panel-tab,body[data-surface=solo] #panel-tab[aria-expanded=true] { left:16px; right:auto; top:65px; }
  body[data-surface=solo] #panel { height:calc(var(--visual-height,100dvh) - 16px); max-height:calc(var(--visual-height,100dvh) - 16px); padding:20px; }
  body[data-surface=solo] #brand { width:clamp(100px,32vw,140px); top:20px; left:16px; }
  #hint { font-size:.9375rem!important; }
  #panel .panel-header { top:-20px; }
  body[data-surface=shared] .table-setting { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reveal-actions > .primary,.reveal-actions > .actions-menu { flex:1 1 140px; }
}
@media(max-width:380px) {
  body[data-surface=shared] .table-setting .setting-field:first-child { grid-column:1/-1; }
}
