/* v140 — mobile game shell. The park is the canvas; controls float above it. */
.edit-venue, .close-venue-edit, .quick-menu, .hud-toggle { display: none; }
.venue-dashboard .festival-details:not([open]) > .festival-rank,
.prep-details:not([open]) > .prep-details-body { display: none; }
.festival-promotion-checks { display: none; }
.festival-details > summary, .prep-details > summary { cursor: pointer; list-style: none; }
.festival-details > summary::-webkit-details-marker,
.prep-details > summary::-webkit-details-marker { display: none; }
@media (min-width: 601px), (orientation: landscape) {
  .venue-dashboard .festival-details { grid-column: 2; grid-row: 1; }
  .festival-details[open] > summary, .prep-details[open] > summary { display: none; }
}

@media (max-width: 600px) and (orientation: portrait) {
  :root {
    --game-deep: #102c30;
    --game-ink: #173c3d;
    --game-gold: #f5c777;
    --game-cream: #fff6e4;
  }
  body { background: var(--game-deep); }
  .topbar {
    min-height: 50px; height: calc(50px + env(safe-area-inset-top));
    flex-basis: calc(50px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 14px 0;
    background: var(--game-deep); border: 0; box-shadow: none;
  }
  .topbar .brand h1 { color: var(--game-cream); font-size: 17px; letter-spacing: .045em; }
  .header-actions { gap: 7px; }
  .header-actions .icon-btn, .game-settings > summary {
    min-height: 42px; min-width: 47px; padding-inline: 9px;
    background: #ffffff15; border: 1px solid #ffffff27;
    border-radius: 10px; color: #e6f2ec; font-size: 12px;
  }
  main { gap: 0; padding: 0; background: var(--game-deep); }
  .workspace { gap: 0; grid-template-rows: minmax(0, 1fr) auto; }
  .venue {
    position: relative; display: block; min-height: 0;
    border: 0; border-radius: 0; background: #cee8d7;
    overflow: hidden; isolation: isolate;
  }
  .venue .canvas-wrap {
    position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0;
    display: block; background: #cee8d7;
  }
  .canvas-wrap #world { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; }
  .venue::after {
    content: ''; position: absolute; inset: 0 0 auto; height: 210px;
    pointer-events: none; z-index: 2;
    background: linear-gradient(180deg, #102c30aa, #102c3048 62%, transparent);
  }

  /* A two-row heads-up display replaces the white dashboard strip. */
  .venue-dashboard {
    position: absolute; top: 10px; left: 11px; right: 11px; z-index: 5;
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    align-items: center; gap: 8px;
    padding: 0; border: 0; background: transparent;
    pointer-events: none;
  }
  .venue-dashboard .season-line {
    grid-column: 1; grid-row: 1; min-width: 0; align-self: center;
    pointer-events: none;
  }
  .venue-dashboard .season-line > div:first-child { gap: 7px; min-width: 0; }
  .venue-dashboard .edition {
    flex: none; padding: 4px 6px; border: 1px solid #f5c77770;
    border-radius: 5px; background: #f5c777; color: #263c38;
    font-size: 11px; font-weight: 800;
  }
  .venue-dashboard .season-line strong {
    color: #fffdf4; font-size: 14px; font-weight: 750;
    text-shadow: 0 1px 6px #102c30b0;
  }
  .venue-dashboard .festival-details {
    grid-column: 2; grid-row: 1; position: relative;
    align-self: center; pointer-events: auto;
  }
  .festival-details > summary {
    display: flex; align-items: center; justify-content: center;
    gap: 5px; min-height: 44px; padding: 0 11px;
    border: 1px solid #f7f6e158; border-radius: 22px;
    background: #102f32d9; color: #fff7df;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    font-size: 12px; font-weight: 750; white-space: nowrap;
  }
  .festival-details[open] > summary span:last-child { transform: rotate(180deg); }
  .venue-dashboard .festival-rank {
    position: absolute; top: calc(100% + 7px); right: 0;
    width: min(295px, calc(100vw - 24px));
    display: grid; grid-template-columns: minmax(0, 1fr);
    gap: 6px; padding: 13px 15px;
    border: 1px solid #ffffff35; border-radius: 13px;
    background: #102c30f2; color: #fff8e8;
    box-shadow: 0 12px 28px #0b222b55;
    max-height: min(55dvh, 370px); overflow-y: auto;
    overscroll-behavior: contain;
  }
  .venue-dashboard .festival-rank strong { color: #fff8e8; font-size: 14px; white-space: normal; }
  .venue-dashboard .festival-rank small {
    color: #d0e0d9; font-size: 12px; white-space: normal; overflow-wrap: anywhere;
  }
  .venue-dashboard .festival-xp-track { grid-column: 1; height: 5px; background: #ffffff3b; }
  .venue-dashboard .festival-xp-track i { background: var(--game-gold); }
  .festival-promotion-checks {
    display: block; padding-top: 8px;
    border-top: 1px solid #ffffff30;
  }
  .promotion-heading {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 5px; font-size: 12px; font-weight: 700;
  }
  .promotion-heading b { color: var(--game-gold); white-space: nowrap; }
  .festival-promotion-checks ul {
    display: grid; gap: 7px; margin: 10px 0 8px; padding: 0;
    list-style: none;
  }
  .festival-promotion-checks li {
    display: grid; grid-template-columns: 15px minmax(0, 1fr) auto;
    align-items: center; gap: 5px; font-size: 12px;
  }
  .festival-promotion-checks li > b { font-variant-numeric: tabular-nums; }
  .festival-promotion-checks li.met { color: #c5efd5; }
  .festival-promotion-checks li.pending { color: #f6dfaf; }
  .festival-promotion-checks li > span:first-child { font-weight: 900; }
  .festival-promotion-checks .promotion-note {
    display: block; margin: 7px 0 0; color: #d7e5d9;
    font-size: 11px; line-height: 1.5;
  }
  .venue-dashboard .stats {
    grid-column: 1 / -1; grid-row: 2;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px; width: auto; margin: 0; padding: 0;
    border: 0; border-radius: 0; background: transparent;
    backdrop-filter: none;
  }
  .venue-dashboard .stats .stat {
    display: grid; grid-template-columns: minmax(0, 1fr);
    align-content: center; gap: 0;
    min-width: 0; min-height: 54px; padding: 5px 9px;
    border: 1px solid #ffffff38; border-radius: 9px;
    background: #102c30d6; box-shadow: none;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .venue-dashboard .stats .stat + .stat { border-left: 1px solid #ffffff38; }
  .venue-dashboard .stats .stat > span {
    display: block; color: #c6d9cf; font-size: 10px; line-height: 1.2;
    white-space: nowrap;
  }
  .venue-dashboard .stats .stat strong {
    display: block; color: #fff9ea; font-size: 17px; line-height: 1.4;
    font-variant-numeric: tabular-nums; text-align: left; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
  }
  .venue-dashboard .stats .stat:last-child strong { color: var(--game-gold); font-size: 16px; }
  .venue-dashboard .stats .stat small { color: #d1e2d6; font-size: 10px; margin-left: 2px; }

  /* Map tools sit in the park, close to the action they control. */
  .venue-top {
    position: absolute; top: auto; bottom: 76px; left: 11px; right: 11px;
    z-index: 5; display: flex; align-items: flex-end; justify-content: space-between;
    gap: 6px; min-height: 44px; margin: 0; padding: 0;
    border: 0; border-radius: 0; background: none; box-shadow: none;
    pointer-events: none;
  }
  .venue-top .phase {
    min-height: 44px; min-width: 0; padding: 0;
    display: flex; align-items: center; gap: 4px;
    border: 0; border-radius: 0; background: none; color: #173c3d;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    pointer-events: none;
  }
  .venue-top .phase #phaseIcon, .venue-top .phase #landSize,
  .venue-top .phase #timeText { display: none; }
  .venue-top .phase strong {
    color: #234a46; font-size: 11px; white-space: nowrap;
    text-shadow: 0 1px 3px #f0f6df;
  }
  .venue-top .phase::before {
    content: ''; width: 6px; height: 6px; flex: none;
    border-radius: 50%; background: #2e7864;
    box-shadow: 0 0 0 3px #e6f5dc;
  }
  .venue-top .map-controls {
    display: flex; gap: 3px; padding: 3px;
    border: 1px solid #fff6de62; border-radius: 12px;
    background: #102c30df;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    pointer-events: auto;
  }
  .venue-top .map-controls .small-btn {
    min-width: 42px; min-height: 42px; height: 42px; padding: 2px 5px;
    border: 0; border-radius: 8px; background: transparent;
    color: #fff6e4; font-size: 12px;
  }
  .venue-top .map-controls .small-btn:active,
  .venue-top .map-controls .small-btn[aria-pressed=true] {
    background: var(--game-gold); color: #173332;
  }
  .venue-top .map-controls #fitMap { min-width: 64px; margin-left: 2px; border-left: 1px solid #ffffff2d; }
  .venue-top .map-controls #blueprint { min-width: 50px; }
  .hud-toggle {
    display: block; position: absolute; top: 128px; right: 12px; z-index: 8;
    min-width: 88px; min-height: 44px; padding: 6px 10px;
    border: 1px solid #fff6de8a; border-radius: 11px;
    background: #102c30d9; color: #fff6e4;
    box-shadow: 0 4px 14px #102c3040;
    font-size: 12px; font-weight: 750;
  }
  body.hud-hidden .hud-toggle {
    top: calc(10px + env(safe-area-inset-top)); right: 12px;
  }
  body.hud-hidden .topbar, body.hud-hidden .control-panel,
  body.hud-hidden .venue-dashboard, body.hud-hidden .venue-top,
  body.hud-hidden .venue-footer, body.hud-hidden .venue > .run-hud,
  body.hud-hidden .quick-menu, body.hud-hidden .edit-venue,
  body.hud-hidden .construction-dock, body.hud-hidden .build-preview,
  body.hud-hidden .canvas-wrap .map-hint,
  body.hud-hidden .canvas-wrap .legend,
  body.hud-hidden .canvas-wrap .map-tag,
  body.hud-hidden .canvas-wrap .now-playing,
  body.hud-hidden .canvas-wrap .viewing-hud,
  body.hud-hidden .canvas-wrap .audience-hud,
  body.hud-hidden .canvas-wrap .run-notice,
  body.hud-hidden .canvas-wrap .run-build,
  body.hud-hidden .canvas-wrap .guest-inspector { display: none !important; }
  body.hud-hidden .workspace { grid-template-rows: minmax(0, 1fr); }
  body.hud-hidden .venue::after { display: none; }
  .quick-menu {
    position: absolute; left: 12px; bottom: 15px; z-index: 6;
    display: flex; align-items: center; gap: 5px;
  }
  .quick-menu button {
    display: grid; place-items: center; width: 48px; height: 48px;
    padding: 10px; border: 1px solid #fff6de8a; border-radius: 12px;
    background: #102c30e8; color: #fff6e4;
    box-shadow: 0 5px 18px #102c3050;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .quick-menu button[hidden] { display: none; }
  .quick-menu button svg {
    width: 25px; height: 25px; fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  }
  .quick-menu button.active { color: #203b37; background: var(--game-gold); }
  body.venue-editing .quick-menu, body.placing .quick-menu,
  body:has(.control-panel.menu-open) .quick-menu { display: none; }
  body.running .quick-menu { bottom: 122px; }
  body.running .venue:has(.signature-dock:not([hidden])) .quick-menu { bottom: 171px; }
  .edit-venue {
    display: flex; align-items: center; justify-content: center;
    position: absolute; right: 12px; bottom: 13px; z-index: 6;
    min-height: 51px; padding: 0 18px;
    border: 1px solid #f7da9d; border-radius: 13px;
    background: var(--game-gold); color: #203b37;
    box-shadow: 0 5px 18px #102c3060;
    font-size: 14px; font-weight: 850;
  }
  .edit-venue::before { content: '✎'; margin-right: 7px; font-size: 17px; line-height: 1; }
  .edit-venue[hidden], .close-venue-edit[hidden] { display: none !important; }
  body.venue-editing .edit-venue, body.placing .edit-venue { display: none; }
  body:has(.control-panel.menu-open) .edit-venue { display: none; }
  body.preparing:not(.venue-editing) .canvas-wrap .construction-dock { display: none !important; }
  body.preparing:not(.venue-editing) .canvas-wrap .map-hint { display: none; }
  body.venue-editing .canvas-wrap .map-hint { bottom: 108px; }
  .canvas-wrap .construction-dock {
    position: absolute; inset: auto 0 0; z-index: 7;
    width: 100%; max-width: none; margin: 0;
    padding: 8px 10px 12px; border: 0;
    border-top: 1px solid #ffffff45; border-radius: 17px 17px 0 0;
    background: #102c30f5; color: #fff8e9;
    box-shadow: 0 -10px 28px #102c305c;
  }
  .construction-dock .dock-budget {
    position: static; min-height: 44px; padding: 0 1px;
    background: none; border: 0; box-shadow: none;
  }
  .construction-dock .workshop-budget { color: #dbe8df; font-size: 12px; }
  .construction-dock .workshop-budget b { color: var(--game-gold); font-size: 17px; margin-left: 4px; }
  .construction-dock .workshop-budget small { display: none; }
  .construction-dock .prep-history { gap: 4px; }
  .construction-dock .prep-history button, .close-venue-edit {
    min-width: 42px; min-height: 44px; padding: 2px 5px;
    border: 1px solid #ffffff38; border-radius: 9px;
    background: #ffffff18; color: #fff8e9;
    font-size: 12px; font-weight: 700;
  }
  .construction-dock .prep-history button:disabled { opacity: .35; }
  .close-venue-edit { display: block; font-size: 21px; line-height: 1; }
  .construction-dock .workshop-nav { margin-top: 5px; gap: 4px; }
  .construction-dock .workshop-nav button {
    min-height: 49px; padding: 4px 1px; border: 1px solid #ffffff25;
    border-radius: 9px; background: #ffffff12;
    color: #e5eee7; font-size: 12px;
  }
  .construction-dock .workshop-nav button.active,
  .construction-dock .workshop-nav button[aria-pressed=true] {
    background: var(--game-gold); border-color: var(--game-gold);
    color: #183d39;
  }

  /* A continuous dark command deck replaces the stacked white strips. */
  .control-panel {
    position: relative; z-index: 9; display: block;
    height: auto; overflow: visible; border: 0; border-radius: 0;
    background: var(--game-deep); box-shadow: 0 -5px 22px #102c3026;
  }
  .control-panel .tabs { display: none; }
  .control-panel .tabs .tab {
    min-height: 56px; height: 56px; gap: 3px;
    border: 0; border-bottom: 3px solid transparent; border-radius: 0;
    background: transparent; color: #a7c4bd; font-size: 12px;
  }
  .control-panel .tabs .tab.active,
  .control-panel .tabs .tab[aria-selected=true] {
    background: transparent; color: var(--game-gold);
    border-bottom-color: var(--game-gold);
  }
  .control-panel .launch-panel {
    display: block; padding: 3px 14px calc(12px + env(safe-area-inset-bottom));
    border: 0; background: var(--game-deep);
  }
  .prep-details > summary {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 44px; gap: 8px; padding: 2px 0;
    border: 0; border-radius: 0; background: none; color: #d9e6dd;
  }
  .prep-summary-copy { display: grid; gap: 1px; min-width: 0; }
  .prep-summary-copy small { color: #8fb2a8; font-size: 10px; }
  .prep-summary-copy strong {
    font-size: 12px; color: #f5f7e9; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
  }
  .prep-summary-cost { display: flex; align-items: center; gap: 5px; flex: none; font-size: 12px; }
  .prep-summary-cost b { color: var(--game-gold); }
  .prep-summary-cost b::before { content: '開催費 '; color: #9dbab0; font-weight: 500; }
  .prep-summary-cost i { font-size: 15px; font-style: normal; }
  .prep-details[open] .prep-summary-cost i { transform: rotate(180deg); }
  .prep-details-body {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    padding: 6px 0 8px;
  }
  .prep-details-body .preparation-advice {
    grid-column: 1 / -1; margin: 0; padding: 8px 10px;
    border: 1px solid #ffffff25; border-radius: 9px;
    background: #ffffff12; color: #fff8e9;
  }
  .preparation-advice strong { font-size: 13px; line-height: 1.4; }
  .preparation-advice p { margin-top: 3px; font-size: 11px; line-height: 1.4; }
  .preparation-advice button { min-height: 42px; }
  .prep-details-body .budget-line {
    display: grid; align-content: center; min-height: 44px; padding: 5px 9px;
    border: 1px solid #ffffff25; border-radius: 8px;
    background: #ffffff12; color: #b9d3ca; font-size: 11px;
  }
  .prep-details-body .budget-line strong { color: #fff8e9; font-size: 14px; }
  .control-panel .launch-panel .launch-btn {
    min-height: 53px; margin: 4px 0 0; border: 0; border-radius: 12px;
    background: var(--game-gold); color: #203b37;
    box-shadow: 0 3px 0 #bd8e4e; font-size: 16px; font-weight: 850;
  }
  .control-panel .launch-panel .launch-btn:hover:not(:disabled) { background: #ffdb98; }
  .control-panel .launch-panel .start-symbol { color: #21423d; }
  .control-panel .panel-content {
    border-color: #d5e4d9; border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 28px #102c3042;
  }
  body:not(.preparing) .prep-details { display: none; }
  body.preparing .venue-footer { display: none; }
  body.running .venue-dashboard { top: 8px; }
  body.running .venue-top {
    top: 125px; bottom: auto; flex-direction: column;
    align-items: stretch; gap: 4px;
  }
  body.running .venue-top .phase {
    align-self: flex-start; max-width: calc(100% - 100px);
  }
  body.running .venue-top .map-controls { align-self: flex-end; }
  body.running .venue-top .phase strong,
  body.running .venue-top .phase #timeText { color: #fff8e9; }
  body.running .venue-top .phase strong { text-shadow: 0 1px 4px #102c30c9; }
  body.running .venue-top .phase #timeText {
    display: inline; font-size: 11px;
  }
  body.running .venue > .run-hud {
    position: absolute; inset: auto 0 0; z-index: 6;
    width: 100%; margin: 0; padding: 6px 12px 8px;
    border: 0; border-top: 1px solid #ffffff31;
    background: #102c30f2; color: #fff8e9;
  }
  body.running .venue > .run-hud #liveMoodValue,
  body.running .venue > .run-hud #hypeText { color: #fff8e9; }
  body.running .venue > .run-hud .live-details-toggle {
    border-color: #ffffff3d; background: #ffffff1a; color: #fff8e9;
  }
  body.running .venue > .run-hud .signature-dock button {
    border-color: #e6b65e; background: var(--game-gold); color: #173b39;
  }
  body.running .venue-footer {
    position: absolute; inset: auto 0 62px; z-index: 5;
    width: 100%; border: 0; border-radius: 0;
    background: #102c30cf; color: #e8f3ea;
  }
  body.running .venue:has(.signature-dock:not([hidden])) .venue-footer { bottom: 111px; }
  body.running .venue-footer .festival-progress { min-height: 42px; padding: 5px 12px; }
  body.running .venue-footer .progress-caption { color: #e8f3ea; }
  body.running .venue-footer .progress-track { background: #ffffff36; }
  body.placing .venue-dashboard { display: none; }
  body.placing .venue-top { top: 4px; bottom: auto; left: 4px; right: 4px; }
  body.placing .venue::after { display: none; }

  .festival-details > summary:focus-visible, .prep-details > summary:focus-visible,
  .edit-venue:focus-visible, .close-venue-edit:focus-visible,
  .quick-menu button:focus-visible, .hud-toggle:focus-visible,
  .control-panel .tabs .tab:focus-visible {
    outline: 3px solid #fff5dc; outline-offset: -3px;
  }
}

@media (max-width: 360px) and (orientation: portrait) {
  .venue-dashboard .season-line strong { font-size: 12px; }
  .venue-dashboard .stats .stat { padding-inline: 6px; }
  .venue-dashboard .stats .stat strong { font-size: 15px; }
  .venue-dashboard .stats .stat:last-child strong { font-size: 14px; }
  .venue-top .phase { padding-inline: 8px; }
  .venue-top .map-controls { gap: 0; }
  .venue-top .map-controls .small-btn { min-width: 39px; padding-inline: 3px; }
  .venue-top .map-controls #blueprint { min-width: 47px; }
  .prep-summary-cost b::before { content: ''; }
}

.build-preview .rotate-build {
  align-self: flex-start;
  min-height: 44px;
  padding: 7px 14px;
  border: 1px solid #f4cf84;
  border-radius: 9px;
  background: #f8d98e;
  color: #173b39;
  font-size: 14px;
  font-weight: 800;
}
.build-preview .rotate-build[hidden] { display: none !important; }
#roadEditor #fenceBuild { flex-basis: 100%; }

/* Consistent, accessible dismiss affordance for every optional dialog. */
dialog > .dialog-dismiss {
  position: absolute; top: 12px; right: 12px; z-index: 5;
}
.dialog-music-controls:has(.dialog-dismiss) { gap: 8px; }
dialog:has(> .dialog-dismiss) > h2 { padding-right: 48px; }
dialog .dialog-dismiss, .panel-heading .dialog-dismiss {
  display: grid; place-items: center; flex: none;
  width: 44px; min-width: 44px; height: 44px; min-height: 44px;
  margin: 0; padding: 0; border: 1px solid #b6c8c6; border-radius: 12px;
  background: #eff5f1; color: #193d3d; box-shadow: none;
  font: 400 28px/1 system-ui, sans-serif; cursor: pointer;
}
dialog .dialog-dismiss:hover, .panel-heading .dialog-dismiss:hover { background: #deebe4; }
dialog .dialog-dismiss:focus-visible, .panel-heading .dialog-dismiss:focus-visible {
  outline: 3px solid #137f73; outline-offset: 2px;
}
#panelArtists .dialog-dismiss, #storyReadDialog .dialog-dismiss {
  background: #ffffff19; border-color: #ffffff55; color: #fff;
}
#panelArtists .dialog-dismiss:hover, #storyReadDialog .dialog-dismiss:hover { background: #ffffff35; }
#panelArtists .dialog-dismiss:focus-visible, #storyReadDialog .dialog-dismiss:focus-visible { outline-color: #f5c777; }

/* The material switch remains visible while placing; detailed range actions can scroll. */
.road-material{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%;flex-shrink:0}
.road-material[hidden]{display:none!important}
.build-preview .road-material button{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;min-height:48px;padding:7px 10px;border:1px solid #8ba99f;border-radius:9px;background:#294a45;color:#e4f3e9;text-align:left}
.road-material button b{font-size:15px;white-space:nowrap}
.road-material button small{font-size:11px;line-height:1.2;white-space:nowrap}
.build-preview .road-material button[aria-pressed="true"]{background:#f3cb7b;border-color:#ffe0a2;color:#223d38;box-shadow:inset 0 -2px #c39a55}
@media(max-width:370px){.road-material button small{font-size:10px}}
@media(max-height:450px){body.placing .road-material{grid-column:1/-1;grid-row:3}body.placing .build-preview:has(.road-material:not([hidden])) .placement-details{grid-row:4}}

/* v157: active festival controls and notices share a single flowing footer. */
#quickMenu[hidden], body.running .quick-menu,
body.running #tabDevelop, body.running #tabArtists, body.running #tabReport,
body.running .canvas-wrap .map-hint { display:none!important; }
.venue-footer>.run-notice {
  position:static; inset:auto; transform:none; width:auto; max-width:none;
  margin:0; padding:7px 12px; border:0; border-radius:0; box-shadow:none;
  font-size:13px; line-height:1.45; white-space:normal; pointer-events:none;
  background:#284f48; color:#fff6de;
}
.venue-footer>.run-notice[hidden] { display:none!important; }
#liveInfoDialog .run-build {
  position:static; inset:auto; max-width:none; margin:0 0 12px; padding:0;
  display:flex; flex-wrap:wrap; gap:5px;
}
#liveInfoDialog .run-build[hidden] { display:none; }
@media(max-width:600px) and (orientation:portrait) {
  /* Live rows size themselves: dashboard, tools, stage, information, controls. */
  body.running .venue { display:flex; flex-direction:column; background:#102c30; }
  body.running .venue::after { display:none; }
  body.running .venue-dashboard {
    position:relative; inset:auto; order:0; flex:none;
    width:100%; margin:0; padding:7px 10px; box-sizing:border-box;
  }
  body.running .venue-top {
    position:relative; inset:auto; order:1; flex:none;
    min-height:44px; padding:0 10px 5px; box-sizing:border-box;
    flex-direction:row; align-items:center; justify-content:flex-end;
  }
  body.running .venue-top .phase { display:none; }
  body.running .venue-top .map-controls { align-self:auto; }
  body.running .venue .canvas-wrap {
    position:relative; inset:auto; order:2; flex:1 1 0;
    width:100%; height:auto; min-height:100px;
  }
  body.running .venue-footer,
  body.running .venue:has(.signature-dock:not([hidden])) .venue-footer {
    position:relative; inset:auto; bottom:auto; order:3; flex:none;
    margin:0; background:#102c30; z-index:auto;
  }
  body.running .venue>.run-hud {
    position:relative; inset:auto; order:4; flex:none; background:#102c30;
  }
  body.running .venue-footer .festival-progress { background:transparent; border:0; }
  body.running .venue-footer .progress-caption { color:#d3e6dc; opacity:1; }
  body.running .hud-toggle { top:8px; right:8px; min-width:72px; }
  body.running.hud-hidden .venue .canvas-wrap { min-height:0; }
  .venue:has(#festivalDetails[open]) .venue-dashboard { z-index:12; }
  .venue-dashboard .festival-details[open] .festival-rank { background:#102c30; z-index:1; }
  body:not(.hud-hidden) .venue:has(#festivalDetails[open]) .hud-toggle,
  .venue:has(#festivalDetails[open]) .quick-menu { display:none!important; }
  .venue:has(#festivalDetails[open]) .venue-top,
  .venue:has(#festivalDetails[open]) .stats { visibility:hidden; }
}

/* v162: budget warnings remain visible outside folded placement details. */
.build-budget-warning{margin:0;padding:8px 10px;border-radius:8px;font-size:13px;line-height:1.5;background:#ffffff12;color:#e7f3ed;white-space:normal;overflow-wrap:anywhere;flex-shrink:0}
.build-budget-warning.budget-warning{background:#684329;color:#ffe2bd;border:1px solid #c79753}
.build-risk-acceptance{display:flex;align-items:center;gap:8px;min-height:44px;padding:4px;font-size:13px;line-height:1.4;flex-shrink:0;color:#ffe2bd;cursor:pointer}
.build-risk-acceptance input{width:22px;height:22px;flex-shrink:0;accent-color:#f2c774}
#buildBudgetWarning[hidden],#buildRiskAcceptance[hidden]{display:none!important}
@media(max-height:450px){body.placing .build-preview .build-budget-warning,body.placing .build-preview .build-risk-acceptance{grid-column:1/-1}body.placing .build-preview{overflow-y:auto;overscroll-behavior:contain}body.placing .build-preview .preview-actions{position:sticky;bottom:0;background:#193b3d}}
/* v163: artist relationships live in the yearbook, with a single optional promise. */
.bond-catalogue,.bond-profile,.bond-result{color:#193d3c;text-align:left;line-height:1.65}
.bond-catalogue{margin:8px 0 24px}.bond-catalogue h3,.bond-profile h3,.bond-profile h4{margin:0;color:#193d3c}.bond-note{font-size:.86rem;color:#607571;margin:8px 0 12px}
.bond-artist-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:8px}.bond-artist-link{display:flex;gap:12px;align-items:center;min-height:80px;width:100%;padding:10px 12px;border:1px solid #c6d8cf;border-radius:14px;background:#f6faf5;color:#193d3c;text-align:left;box-shadow:none}.bond-artist-link img{width:48px;height:60px;object-fit:cover;object-position:top;border-radius:8px;flex:none}.bond-artist-link span:nth-child(2){min-width:0;flex:1}.bond-artist-link b,.bond-artist-link small{display:block;overflow-wrap:anywhere}.bond-artist-link small{font-size:.75rem;color:#63786e}.bond-current{display:grid;gap:5px;background:#e7f1e9;border:1px solid #b7cebf;border-radius:14px;padding:14px;margin-bottom:12px}.bond-current small{color:#527168}.bond-current button{justify-self:start}
.bond-back{min-height:44px;margin-bottom:8px}.bond-hero{display:flex;align-items:center;gap:16px;margin:8px 0 18px}.bond-hero img{width:92px;height:116px;object-fit:cover;object-position:top;border-radius:16px;background:#e4eee5;flex:none}.bond-hero div{min-width:0}.bond-hero h3{font-size:1.2rem;overflow-wrap:anywhere}.bond-hero small,.bond-hero p{color:#587367;font-size:.85rem;margin:4px 0}
.bond-voice{padding:16px 18px;background:#e8f1ea;border-radius:4px 18px 18px;border-left:3px solid #9dbba7;margin:12px 0 20px}.bond-voice small{font-size:.78rem;color:#536f64}.bond-profile blockquote{margin:8px 0;font-size:1rem;line-height:1.85;font-weight:500}.bond-promise{padding:18px;border:1px solid #d9c491;border-radius:16px;background:#fff9e8;margin:16px 0}.bond-section-title{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 16px}.bond-section-title span{font-size:.78rem;color:#6d5d32}.bond-promise p{margin:12px 0}.bond-condition{font-size:.88rem;background:#ffffffa8;border-radius:8px;padding:10px 12px}.bond-thanks{border-top:1px solid #decfa6;padding-top:12px}.bond-promise .primary-btn{width:100%;min-height:44px}.bond-promise .text-btn{min-height:44px}.bond-memory,.bond-milestones{padding:16px 0;border-top:1px solid #d4e0d7}.bond-memory small{color:#637568}.bond-memory p{font-size:.88rem}.bond-memory blockquote{font-size:.95rem;color:#355d4e}.bond-milestones p{display:flex;gap:14px;font-size:.9rem;align-items:baseline}.bond-milestones time{flex:none;color:#697b6e;font-size:.8rem}.bond-stories{border-top:1px solid #d4e0d7;padding:8px 0 16px}.bond-stories summary{min-height:44px;align-content:center;cursor:pointer}.bond-stories button{display:block;text-align:left;min-height:44px}.bond-profile>.secondary-btn{width:100%;min-height:44px}.bond-profile-link{margin:10px 0;min-height:44px;width:100%}.bond-booking-mark{display:inline-block;margin-left:5px;border-radius:8px;padding:1px 5px;background:#e9d49a;color:#4e431d;font-size:.65rem;line-height:1.5}
.bond-result{margin:14px 0;background:#eef4ec;border:1px solid #c6d8c5;border-radius:16px;padding:14px}.bond-result-card{display:flex;gap:12px;align-items:flex-start}.bond-result-card>img{width:52px;height:66px;object-fit:cover;object-position:top;border-radius:10px;flex:none}.bond-result-card>div{min-width:0;flex:1}.bond-result-card b,.bond-result-card small{display:block}.bond-result-card small{font-size:.74rem;color:#617757}.bond-result-card b{font-size:.95rem}.bond-result-card p{margin:8px 0;font-size:.93rem}.bond-result-card button{min-height:44px;font-size:.85rem;text-align:left}.bond-result summary{min-height:44px;align-content:center;cursor:pointer;font-size:.85rem}.bond-result details .bond-result-card{padding-top:12px;border-top:1px solid #c6d8c5}
@media(max-width:380px){.bond-hero{gap:12px}.bond-hero img{width:72px;height:94px}.bond-hero h3{font-size:1.05rem}.bond-promise{padding:14px}.bond-result{padding:12px}.bond-result-card{gap:8px}}
.bond-alternatives{margin:16px 0 24px}.bond-alternatives h4{font-size:.9rem;margin-bottom:8px}.bond-alternative{border:1px solid #c8d8ca;border-radius:12px;padding:0 14px;margin:8px 0;background:#f5f8f1}.bond-alternative summary{padding:10px 0;min-height:44px;cursor:pointer}.bond-alternative summary b{font-size:.92rem}.bond-alternative summary small{display:block;margin-left:18px;color:#69806c;font-size:.75rem}.bond-alternative p{font-size:.9rem;margin:8px 0}.bond-alternative button{min-height:44px;width:100%;margin:10px 0 14px}.bond-alternative blockquote{padding-bottom:10px}.bond-alternative[open]{background:#fffbed}
/* v164: personal scenes share the existing footer flow and yearbook. */
.bond-arc{padding:12px 0 8px}.bond-arc>small{font-size:.72rem;color:#687e6d}.bond-arc h4{font-size:1rem;color:#244d3d}.bond-arc p{font-size:.77rem;color:#687e6d;margin:4px 0}.bond-arc progress{width:100%;height:5px;accent-color:#4c876d}
.bond-keepsakes{border-top:1px solid #cedccb;padding:8px 0;margin-bottom:12px}.bond-keepsakes>summary{min-height:44px;align-content:center;cursor:pointer}.bond-keepsake{display:flex;gap:12px;padding:14px 0;border-top:1px solid #dce6d6}.bond-keepsake>img{width:72px;height:96px;object-fit:cover;object-position:top;border-radius:10px;flex:none}.bond-keepsake>div{min-width:0;flex:1}.bond-keepsake small{font-size:.74rem;color:#698065}.bond-keepsake h4{font-size:.92rem}.bond-keepsake p{font-size:.88rem;margin:8px 0}.bond-keepsake button,.bond-result-scene>summary{min-height:44px;font-size:.8rem;cursor:pointer}.bond-result-scene p{font-size:.84rem}
.bond-live{position:static;display:flex;gap:9px;align-items:flex-start;background:#24473f;color:#fff6dc;padding:9px 12px;border-top:1px solid #8cad744a;box-shadow:none}.bond-live[hidden]{display:none!important}.bond-live>img{width:36px;height:46px;object-fit:cover;object-position:top;border-radius:7px;flex:none}.bond-live>div{flex:1;min-width:0}.bond-live small{display:block;font-size:11px;color:#e3c680;font-weight:700}.bond-live p{margin:3px 0 0;font-size:12px;line-height:1.6;overflow-wrap:anywhere}.bond-live>button{min-width:44px;min-height:44px;flex:none;border:0;background:transparent;color:#f2ead2;font-size:22px;padding:0}.bond-live~.run-notice{margin:0}
@media(max-height:480px){.bond-live p{font-size:11px}.bond-live{padding:5px 10px}.bond-live>img{height:38px;width:30px}}

/* v171: readiness is visible before expanding cost details. */
.launch-panel > .preparation-advice { margin: 0 0 8px; padding: 10px; gap: 8px; }
.launch-panel > .preparation-advice[data-readiness="blocked"] { border-left: 4px solid #ae5729; background: #fff3e6; }
.launch-panel > .preparation-advice strong { display: block; line-height: 1.4; }
.launch-panel > .preparation-advice p { margin: 4px 0 0; overflow-wrap: anywhere; }
.launch-panel > .preparation-advice button { min-width: 72px; min-height: 44px; line-height: 1.4; }
.prep-details-body .prep-remaining { grid-column: 1 / -1; }
.prep-remaining .negative { color: #a63b27; }
.prep-remaining span small { display: block; font-size: 11px; font-weight: 400; }
.artist-search-reset { display: block; margin: 12px auto 0; min-height: 44px; white-space: normal; }
.settings-popover { max-height: calc(100dvh - 88px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
.tabs .tab:focus-visible, .artist-search-reset:focus-visible, .preparation-advice button:focus-visible { outline: 3px solid #be7424; outline-offset: -3px; }
@media (max-width: 600px) and (orientation: portrait) {
  .quick-menu button { height: 58px; padding: 5px 3px; gap: 2px; grid-template-rows: 25px auto; }
  .quick-menu button span { display: block; font-size: 11px; font-weight: 700; line-height: 1.2; }
  .launch-panel > .preparation-advice { background: #ffffff12; border: 1px solid #ffffff35; border-radius: 9px; }
  .launch-panel > .preparation-advice[data-readiness="blocked"] { border-left: 4px solid #f5c777; background: #473b30; }
  .launch-panel > .preparation-advice strong { color: #fff5dc; font-size: 12px; }
  .launch-panel > .preparation-advice p { color: #e4eade; font-size: 12px; line-height: 1.45; }
  .launch-panel > .preparation-advice button { color: #fff5dc; border: 1px solid #ffffff66; background: #ffffff15; font-size: 12px; }
  .control-panel .launch-panel .prep-summary-copy strong { white-space: normal; }
  .prep-remaining .negative { color: #ffc2a3; }
  .launch-panel .prep-details-body { max-height: 24dvh; overflow-y: auto; overscroll-behavior: contain; }
}
