/* Painted room: quiet paper labels, walnut ink and sage controls.
   Keep the clean/ink presentation modes and original portfolio artwork intact. */
:root[data-style='painted'] {
  --paper: #eee5cf;
  --paper-2: #f7efdd;
  --ink: #373b30;
  --blue: #46634c;
  --accent: #46634c;
  --accent-rgb: 70,99,76;
  --magenta: #46634c;
  --line: #b6a88b;
  --muted: #716b5b;
  --sans: 'Trebuchet MS', Arial, sans-serif;
  --chrome: #f1e8d4;
  --paper-shadow: 2px 3px 0 #71624d, 0 9px 22px #30261926;
}
.menu-caption { margin: 18px 0 6px; color: var(--muted); font: 15px/1.3 var(--serif); }
html[data-style='painted'] ::selection { background: #c6d4b5; color: #283b2e; }
html[data-style='painted'] :is(button,a,summary) { transition: color .16s, background-color .16s, box-shadow .16s; }
html[data-style='painted'] :is(button,a,input,select,summary):focus-visible { outline: 3px solid #46634c; outline-offset: 3px; }
html[data-style='painted'] kbd { padding: 2px 5px; border-color: #baad91; border-bottom-width: 2px; border-radius: 4px; color: #79715f; background: #fffaec70; font-size: 9px; }
html[data-style='painted'] .wordmark { color: #3d543e; text-shadow: 0 1px 0 #fff6; letter-spacing: -.045em; }
html[data-style='painted'] .masthead:has(.objects-panel[open]) { z-index: 90; }
html[data-style='painted'] :is(.edit-button,.objects-panel > summary) { padding: 8px 14px; min-height: 44px; border: 1px solid #8f8169; border-radius: 6px; background: var(--chrome); box-shadow: 1px 2px 0 #71624d; color: var(--ink); font: 12px/1.4 var(--sans); letter-spacing: .01em; text-transform: none; }
html[data-style='painted'] .edit-button { margin-right: 12px; }
html[data-style='painted'] .objects-panel > summary { gap: 13px; }
html[data-style='painted'] .objects-panel[open] > summary { background: #d6dfc7; }
html[data-style='painted'] :is(.objects-sheet,.player-controls,.held-tape,.editor,.project-screening,.object-action-menu) { border: 1px solid #908167; border-radius: 8px; background: var(--chrome); color: var(--ink); box-shadow: var(--paper-shadow); backdrop-filter: none; }
html[data-style='painted'] .objects-sheet { top: calc(100% + 10px); padding: 5px 24px 23px; scrollbar-color: #ac9d81 transparent; }
html[data-style='painted'] .menu-caption { margin: 19px 0 5px; font-size: 20px; color: #46634c; }
html[data-style='painted'] .object-index :is(button,a) { font-size: 12px; padding: 11px 4px; border-color: #cfc2a7; border-radius: 0; }
html[data-style='painted'] .object-index :is(button,a):hover { background: #dce2cc; color: #314b38; }
html[data-style='painted'] .object-index :is(button,a) span { color: #776f5c; }
html[data-style='painted'] :is(.scene-focus,.controls-panel > summary,.back-view,.reader-library) { border: 1px solid #8f8169; border-radius: 6px; background: var(--chrome); color: var(--ink); box-shadow: var(--paper-shadow); backdrop-filter: none; }
html[data-style='painted'] .scene-focus { gap: 3px; padding: 4px; }
html[data-style='painted'] .view-button { min-height: 40px; padding: 10px 13px; border-radius: 3px; font: 12px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: #676754; }
html[data-style='painted'] .view-button:hover { background: #e1dfc9; color: #324b37; }
html[data-style='painted'] .view-button:is(.selected,[aria-pressed='true']) { background: #526b50; color: #fff5dd; box-shadow: inset 0 0 0 1px #3f553e; }
html[data-style='painted'] .view-button:is(.selected,[aria-pressed='true']):after { display: none; }
html[data-style='painted'] .controls-panel > summary { min-height: 50px; width: 112px; gap: 8px; font: 12px/1.4 var(--sans); text-transform: none; letter-spacing: 0; }
html[data-style='painted'] .controls-panel > summary svg { stroke-width: 1.5; }
html[data-style='painted'] .controls-panel[open] > summary { background: #d6dfc7; }
html[data-style='painted'] .player-controls { bottom: 60px; padding: 12px 16px 5px; }
html[data-style='painted'] .transport button { border-radius: 5px; }
html[data-style='painted'] .transport button:not(:disabled):hover { background: #d5dec5; }
html[data-style='painted'] .now-playing { font-size: 11px; min-height: 38px; }
html[data-style='painted'] .now-playing button { font-size: 11px; }
html[data-style='painted'] .machine-controls { gap: 9px 14px; font-size: 11px; }
html[data-style='painted'] .machine-controls button { min-height: 38px; }
html[data-style='painted'] :is(.machine-controls select,.editor select,.editor input[type='number']) { background: #fff8e7; border-radius: 4px; }
html[data-style='painted'] .held-tape { gap: 22px; padding: 10px 12px 10px 20px; }
html[data-style='painted'] .held-heading { font-size: 22px; letter-spacing: -.025em; }
html[data-style='painted'] .held-face { padding: 3px 7px; border: 1px solid #a7ad90; border-radius: 3px; color: #566149; background: #e0e5ce; font: 10px/1.3 var(--sans); letter-spacing: .03em; text-transform: none; }
html[data-style='painted'] .held-tape[data-face='back'] .held-face { border-color: #a7ad90; color: #566149; }
html[data-style='painted'] .held-actions button { min-height: 44px; font-size: 12px; border-radius: 4px; }
html[data-style='painted'] .held-actions button:not(.primary-button):hover { background: #e0e2cd; }
html[data-style='painted'] .primary-button { border: 1px solid #354d39; border-radius: 4px; background: #526b50; color: #fff7e2; box-shadow: 1px 2px 0 #354d39; }
html[data-style='painted'] .primary-button:hover:not(:disabled) { background: #3f5942; color: #fff7e2; box-shadow: 1px 3px 0 #354d39; }
html[data-style='painted'] .primary-button:active:not(:disabled) { translate: 0 1px; box-shadow: none; }
html[data-style='painted'] .back-view { font: 12px/1.4 var(--sans); }
html[data-style='painted'] :is(.back-view,.reader-library):hover { background: #dce2cb; color: #304d36; }
html[data-style='painted'] .object-tooltip { padding: 7px 12px; border-color: #8f8169; border-radius: 4px; background: #f7efdd; color: #3f5540; box-shadow: 1px 2px 0 #71624d; font: 12px/1.4 var(--sans); letter-spacing: 0; text-transform: none; }
html[data-style='painted'] .object-tooltip:before,html[data-style='painted'] .object-tooltip:after { content: none; }
html[data-style='painted'] .toast { background: #f7efdd; border-color: #908167; border-radius: 6px; box-shadow: var(--paper-shadow); }
html[data-style='painted'] dialog:not(.site-dialog) { border: 1px solid #908167; border-radius: 9px; background: #f1e8d4; color: var(--ink); box-shadow: 3px 4px 0 #71624d, 0 28px 80px #211d2150; }
html[data-style='painted'] dialog::backdrop { background: #222a244d; backdrop-filter: blur(5px); }
html[data-style='painted'] .close-dialog { border: 1px solid #b6a88b; border-radius: 50%; color: #596148; font: 27px/1 var(--sans); }
html[data-style='painted'] .close-dialog:hover { color: #304d36; background: #dce2cb; }
html[data-style='painted'] :is(.book-content a,.book-navigation button:hover,.book-sketch) { color: #46634c; }
html[data-style='painted'] .library-kicker { font: 11px/1.4 var(--sans); letter-spacing: .12em; color: #696b52; }
html[data-style='painted'] .library-intro { font: 14px/1.5 var(--sans); color: #686c59; }
html[data-style='painted'] .library-book strong { color: #374d3a; }
html[data-style='painted'] .library-author { color: #636953; }
html[data-style='painted'] .library-length { color: #76694f; }
html[data-style='painted'] :is(.reader-library) { min-height: 44px; font-size: 12px; }
html[data-style='painted'] .reader-accessibility:focus-within:not([hidden]) { background: var(--chrome); color: var(--ink); border: 1px solid #908167; border-radius: 7px; box-shadow: var(--paper-shadow); }
html[data-style='painted'] .project-screening button { min-height: 44px; border: 1px solid #a5a88b; border-radius: 4px; background: #e2e5cf; color: #3d523d; }
html[data-style='painted'] .project-screening button:hover { background: #cfd9bd; color: #2f4834; }
html[data-style='painted'] .project-screening :is(a:hover,p) { color: #46634c; }
html[data-style='painted'] .screening-credit { color: #6a6b58; }
html[data-style='painted'] .screening-credit a { text-decoration: underline; text-underline-offset: 3px; }
html[data-style='painted'] .screening-transport input { accent-color: #526b50; }
html[data-style='painted'] #project-film-play { background: #526b50; border-color: #354d39; color: #fff7e2; }
html[data-style='painted'] .object-action-menu { padding: 10px; border-radius: 8px; }
html[data-style='painted'] .object-action-title { margin: 4px 9px 8px; padding-bottom: 8px; border-bottom: 1px solid #c1b79b; color: #46634c; font: 19px/1.2 var(--serif); letter-spacing: 0; text-transform: none; }
html[data-style='painted'] .object-action-choices button { min-height: 42px; border-radius: 4px; color: var(--ink); }
html[data-style='painted'] .object-action-choices button:is(:hover,:focus-visible) { background: #d6dfc7; outline-color: #46634c; }
html[data-style='painted'] .object-action-choices .object-action-cancel { color: #736d5a; font-size: 11px; }
html[data-style='painted'] .editor header strong { font: 18px/1.3 var(--serif); letter-spacing: 0; text-transform: none; }
html[data-style='painted'] .editor label { font-family: var(--sans); letter-spacing: .03em; text-transform: none; }
html[data-style='painted'] :is(.objects-panel[open] .objects-sheet,.controls-panel[open] .player-controls,dialog[open]:not(.site-dialog)) { animation: paper-menu-arrive .18s var(--ease) both; }
@keyframes paper-menu-arrive { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
/* Presentations stay on the easel; these are only its quiet controls and index. */
.presentation-library { width: min(1060px,calc(100vw - 32px)); padding: 36px; }
.presentation-library h2 { margin: 6px 0 10px; font-size: 38px; }
.presentation-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 26px 24px; }
.presentation-choice { display: flex; flex-direction: column; gap: 7px; text-align: left; min-width: 0; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.presentation-choice img { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #e2dac6; box-shadow: 2px 3px 0 #82765f; transition: translate .16s; }
.presentation-choice strong { font: 19px/1.25 var(--serif); margin-top: 6px; }
.presentation-choice span { font-size: 11px; color: var(--muted); }
.presentation-choice:hover img { translate: 0 -3px; }
.presentation-controls { position: fixed; z-index: 130; left: 50%; bottom: max(20px,env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(780px,calc(100vw - 28px)); padding: 12px 18px; border: 1px solid #908167; border-radius: 8px; background: var(--chrome); color: var(--ink); box-shadow: var(--paper-shadow,0 12px 32px #0004); }
.presentation-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.presentation-heading strong { font: 23px/1.2 var(--serif); }
.presentation-controls button,.presentation-controls a { min-height: 44px; padding: 9px 11px; border-radius: 4px; font-size: 12px; }
.presentation-controls button:hover,.presentation-controls a:hover { background: #d6dfc7; color: #3f5942; }
#presentation-close { flex-shrink: 0; border: 1px solid var(--line); }
.presentation-navigation { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
#presentation-previous,#presentation-next { background: #526b50; color: #fff7e2; border: 1px solid #354d39; min-width: 44px; font-size: 20px; }
#presentation-page { min-width: 48px; text-align: center; font: 11px/1.4 var(--mono); }
#presentation-status { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
#presentation-status:empty { display: none; }
#presentation-source { margin-left: auto; text-decoration: underline; text-underline-offset: 3px; }
html[data-presentation='on'] .room-chrome { visibility: hidden; }
.artwork-dialog { width: min(1040px,calc(100vw - 28px)); padding: 24px; }
.artwork-dialog figure { margin: 0; }
.artwork-dialog img { display: block; width: 100%; height: min(66dvh,740px); object-fit: contain; }
.artwork-dialog figcaption { margin: 18px 12px 0; }
.artwork-dialog h2 { margin: 0 0 6px; font-size: 27px; }
.artwork-dialog p { margin: 0; font-size: 12px; color: var(--muted); }
@media(max-width:700px) {
  .presentation-library { padding: 28px 20px; }
  .presentation-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 17px; }
  .presentation-choice strong { font-size: 17px; }
  .presentation-choice span { font-size: 10px; }
  .presentation-controls { bottom: max(12px,env(safe-area-inset-bottom)); padding: 10px 12px; }
  .presentation-heading { gap: 8px; }
  .presentation-heading strong { font-size: 19px; }
  .presentation-navigation { gap: 3px; }
  .presentation-controls button,.presentation-controls a { font-size: 11px; padding: 9px 8px; }
  .artwork-dialog { padding: 20px 14px; }
  .artwork-dialog img { height: 60dvh; }
}
@media(max-width:360px) {
  .presentation-grid { grid-template-columns: 1fr; }
  .presentation-heading strong { font-size: 17px; }
  #presentation-close { padding: 8px; font-size: 10px; }
}
@media(max-height:500px) and (min-width:641px) {
  .presentation-controls { bottom: 9px; padding: 7px 12px; }
  .presentation-heading strong { font-size: 19px; }
  .presentation-navigation { margin-top: 3px; padding-top: 3px; }
}
@media(max-width:700px) {
  html[data-style='painted'] .held-tape { gap: 8px; padding: 11px 13px; }
  html[data-style='painted'] .held-heading { font-size: 19px; }
  html[data-style='painted'] .view-button { padding: 9px 10px; }
  html[data-style='painted'] .objects-sheet { padding: 4px 16px 18px; }
  html[data-style='painted'] .object-index { gap: 0 13px; }
  html[data-style='painted'] .object-index :is(button,a) { gap: 8px; font-size: 11px; }
}
@media(max-width:640px) {
  html[data-style='painted'] .view-button { min-height: 44px; padding: 9px 6px; font-size: 11px; }
  html[data-style='painted'] .scene-focus { padding: 3px; }
  html[data-style='painted'] .controls-panel > summary { min-height: 44px; width: 106px; }
  html[data-style='painted'] .held-tape { bottom: 136px; }
  html[data-style='painted'] .player-controls { bottom: calc(100% + 10px); width: min(510px,calc(100vw - 32px)); }
}
@media(max-width:360px) {
  html[data-style='painted'] .wordmark { font-size: 23px; }
  html[data-style='painted'] .masthead { padding: 0 12px; }
  html[data-style='painted'] .edit-button { margin-right: 5px; padding: 8px; }
  html[data-style='painted'] .objects-panel > summary { padding: 8px 10px; }
  html[data-style='painted'] .held-heading { font-size: 18px; }
  html[data-style='painted'] .held-actions button { font-size: 11px; }
  html[data-style='painted'] .screening-heading { gap: 8px; }
  html[data-style='painted'] .screening-heading strong { font-size: 16px; }
  html[data-style='painted'] .screening-heading button { font-size: 11px; padding: 7px; }
}
@media(prefers-reduced-motion:reduce) {
  html[data-style='painted'] :is(.objects-panel[open] .objects-sheet,.controls-panel[open] .player-controls,dialog[open]:not(.site-dialog)) { animation: none; }
}
.game-library { width: min(750px,calc(100vw - 28px)); padding: 34px; }
.game-library h2 { margin: 8px 0 24px; font: 34px/1.1 var(--serif); }
.game-choice { padding: 18px 0; border-top: 1px solid var(--line); }
.game-choice > button { display: block; width: 100%; padding: 0; text-align: left; border: 0; background: none; color: inherit; }
.game-choice > button > span { display: block; font-size: 11px; color: var(--muted); }
.game-choice strong { display: block; margin-top: 5px; font: 27px/1.2 var(--serif); }
.game-choice p { margin: 7px 0 12px; font-size: 13px; line-height: 1.5; }
.game-choice b { color: var(--accent); font-size: 13px; }
.game-choice details { margin-top: 12px; color: var(--muted); font-size: 11px; }
.game-choice summary { cursor: pointer; }
.game-choice details a { color: var(--accent); }
.game-controls { position: fixed; z-index: 65; left: 50%; transform: translateX(-50%); bottom: max(20px,env(safe-area-inset-bottom)); width: min(720px,calc(100vw - 28px)); padding: 12px 16px; background: var(--chrome,#eee5cf); color: var(--ink,#373b30); border: 1px solid #908167; border-radius: 6px; box-shadow: var(--paper-shadow); }
.game-controls[hidden] { display: none; }
.game-heading,.game-pad,.direction-pad,.game-buttons { display: flex; align-items: center; gap: 7px; }
.game-heading strong { flex: 1; font: 23px/1.2 var(--serif); }
.game-controls button { min-height: 40px; border: 1px solid transparent; border-radius: 4px; padding: 7px 10px; color: inherit; background: none; font: 12px var(--sans); touch-action: none; }
.game-controls button:hover,.game-controls button[data-pressed] { background: #d6dfc7; border-color: #908167; }
.game-controls button:focus-visible { outline: 2px solid var(--accent,#46634c); outline-offset: 2px; }
.game-controls button:disabled { opacity: .45; }
.game-controls p { margin: 7px 0 0; color: var(--muted,#666653); font-size: 11px; line-height: 1.5; }
.game-pad { justify-content: space-between; margin-top: 10px; padding-top: 9px; border-top: 1px solid #c7bda6; }
.game-pad button { border-color: #b3a68e; min-width: 45px; background: #f7efdd; user-select: none; }
.direction-pad button { font-size: 20px; }
html[data-gameui='on'] .room-chrome { visibility: hidden; }
@media (min-width:800px) and (pointer:fine) { .game-pad { display: none; } }
@media(max-width:700px) {
  .game-library { padding: 30px 22px; }
  .game-heading { flex-wrap: wrap; gap: 2px; }
  .game-heading strong { flex-basis: 100%; font-size: 22px; }
  .game-controls { bottom: max(9px,env(safe-area-inset-bottom)); padding: 10px 12px; }
  .game-controls button { font-size: 11px; padding: 7px 8px; min-height: 44px; }
  .game-pad { gap: 6px; flex-wrap: wrap; }
  .direction-pad,.game-buttons { gap: 5px; }
  .game-pad button { min-width: 40px; }
}
@media(pointer:coarse) { .game-controls button { min-height: 44px; } }
@media(max-height:500px) and (min-width:701px) {
  .game-controls { bottom: max(8px,env(safe-area-inset-bottom)); padding: 6px 12px; }
  .game-controls p { display: none; }
  .game-heading strong { font-size: 21px; }
  .game-pad { margin-top: 4px; padding-top: 4px; }
}

/* Presentation actions are optional drawer controls, never an automatic popup. */
.player-controls .presentation-controls {position:static;transform:none;box-sizing:border-box;width:100%;padding:12px 0 0;margin-top:12px;border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;background:transparent;}
html[data-presentation='on'] #controls-panel {visibility:visible;}
html[data-presentation='on'] #controls-panel .player-controls > :not(#presentation-controls) {display:none;}

/* Area shortcuts remain visible during exploration; focused media keep their
   existing Back controls and dedicated layouts above. */
.toast { bottom:calc(var(--room-navigation-inset,140px) + 20px); }
@media(pointer:coarse) {
  html[data-style='painted'] .view-button { min-height:44px; }
}
@media(min-width:641px) and (max-width:900px) {
  .controls-panel { left:auto; right:0; transform:none; }
  .room-chrome .player-controls { left:auto; right:0; transform:none; }
}
html[data-style] .close-dialog.surface-back { width:auto; min-height:40px; padding:8px 12px; border-radius:6px; font:16px/1.2 var(--sans); }

/* Playback controls follow the current surface. Room editing and the old object
   directory are no longer part of the visitor's playback drawer. */
html[data-control-surface='tv'] #music-controls,
html[data-has-vhs='false'] .transport,
html[data-control-surface='tv']:not([data-tv-input='1']) .transport,
html[data-control-surface='tv']:not([data-tv-input='1']) #playback-status,
html[data-control-surface='tv']:not([data-tv-input='1']) .machine-controls :is([data-action='vcr-power'],[data-action='stop'],[data-action='forward']),
html[data-control-surface='stereo'] :is(.transport,.now-playing,.machine-controls) {display:none;}
html[data-control-surface='tv'] .player-controls {width:min(390px,calc(100vw - 32px));max-height:min(340px,calc(100svh - 180px));overflow-y:auto;}
html[data-control-surface='tv'] .machine-controls {display:flex;flex-direction:column;align-items:stretch;gap:8px;}
html[data-control-surface='tv'] .machine-controls label {justify-content:space-between;min-width:0;width:100%;}
html[data-control-surface='tv'] .machine-controls label:last-child {grid-column:1/-1;}
html[data-control-surface='tv'] .machine-controls input {width:min(200px,65%);min-height:44px;}
html[data-control-surface='tv'] .machine-controls select {min-height:44px;width:65%;max-width:220px;box-sizing:border-box;}
html[data-control-surface='tv'][data-tv-input='3'] .now-playing,
html[data-control-surface='tv'][data-tv-input='3'][data-tv-power='on'] .machine-controls [data-action='tv-power'] {display:none;}
html[data-control-surface='tv'] .now-playing {justify-content:flex-end;border:0;}
.music-controls > summary {cursor:pointer;min-height:44px;display:flex;align-items:center;font:18px/1.3 var(--serif);color:var(--accent);}
.music-controls > summary::after {content:'+';margin-left:auto;font:20px var(--sans);}
.music-controls[open] > summary::after {content:'−';}
@media(min-width:901px) {
  html[data-control-surface='tv'] .controls-panel {left:auto;right:0;transform:none;}
  html[data-control-surface='tv'] .player-controls {left:auto;right:0;transform:none;}
}
