:root { --cozy-paper:#fff9e9; --cozy-ink:#4b2e19; --cozy-line:#b9966d; --cozy-green:#587e35; --cozy-honey:#f5cb66; --paper:#fff9e9; --ink:#4b2e19; --leaf:#486538; --line:#d4c1a2; --mint:#e5ecd9; }
#schoolRequestApp { position:relative; width:min(100%,177.7dvh); max-width:none; height:min(56.28vw,100dvh); margin:0 auto; padding:0; color:var(--cozy-ink); font-family:var(--body); }
#schoolRequestApp button, #schoolOfferDialog button { font-family:var(--body); }
#schoolRequestApp .primary, #schoolOfferDialog .primary { color:#fffdf2; background:var(--cozy-green); border:2px solid #385127; border-radius:14px; box-shadow:inset 0 3px 0 #b2c875,inset 0 -4px 0 #3e602a,0 3px 0 #694f32; padding:14px 24px; min-height:56px; font-weight:700; }
#schoolRequestApp .secondary { color:var(--cozy-ink); border:2px solid var(--cozy-line); border-radius:14px; background:var(--cozy-paper); box-shadow:inset 0 -3px 0 #e8d4ae,0 2px 0 #805e3e; min-height:56px; }
#schoolRequestApp .school-trial-head { position:absolute; inset:2.8% 2% auto; z-index:12; display:block; margin:0; min-height:0; pointer-events:none; }
#schoolRequestApp .school-trial-head > div:first-child { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
#schoolRequestApp .school-trial-head > div:last-child { display:flex; align-items:flex-start; justify-content:space-between; width:100%; gap:12px; }
#schoolRequestApp .school-trial-wallet, .cozy-offer-wallet { display:flex; align-items:center; gap:12px; min-height:54px; padding:8px 16px; border:2px solid #886341; border-radius:15px; background:var(--cozy-paper); box-shadow:inset 0 -3px 0 #e8d3ae; color:var(--cozy-ink); pointer-events:auto; }
#schoolRequestApp .school-trial-wallet strong, .cozy-offer-wallet strong { font-size:clamp(22px,2.5vw,38px); line-height:1.2; color:var(--cozy-ink); white-space:nowrap; }
.cozy-coin { width:32px; height:32px; flex:none; }
#schoolRequestApp .school-more { pointer-events:auto; }
#schoolRequestApp .school-more summary { min-width:56px; width:56px; height:54px; padding:12px; color:var(--cozy-ink); border:2px solid #886341; border-radius:14px; background:var(--cozy-paper); box-shadow:inset 0 -3px 0 #e8d3ae; }
#schoolMenuButton svg { width:26px; height:26px; }
#schoolRequestApp .school-menu-panel { z-index:30; color:var(--cozy-ink); background:var(--cozy-paper); border-color:var(--cozy-line); }
#schoolRequestApp .school-menu-panel .quiet { color:var(--cozy-ink); }
#schoolRequestApp #schoolVillageActions { margin:0; padding:8px; }
#schoolRequestApp #schoolWorld { position:relative; display:block; width:100%; height:100%; overflow:hidden; border:0; border-radius:0; background:#dce9d5; }
#schoolMapStage { position:absolute; inset:0; }
#schoolOfferSettings svg { display:block; width:24px; height:24px; }
#schoolRequestApp { --request-x:25%; --request-y:24%; }
#schoolRequestApp[data-request-site='1'] { --request-x:48%; --request-y:21%; }
#schoolRequestApp[data-request-site='2'] { --request-x:76%; --request-y:32%; }
#schoolRequestApp .school-scene { position:absolute; inset:0; width:100%; height:100%; max-width:none; max-height:none; aspect-ratio:auto; margin:0; background:transparent; }
#schoolRequestApp .school-scene canvas { display:block; width:100%; height:100%; object-fit:fill; image-rendering:auto; }
#schoolRequestApp .school-steps, #schoolRequestApp .school-conditions, #schoolRequestApp .school-place-heading, #schoolRequestApp .school-summary, #schoolRequestApp .school-key-hint { display:none; }
#schoolRequestApp[data-screen=map] .school-place-heading { display:block; position:absolute; inset:0; background:transparent; border:0; pointer-events:none; z-index:3; }
#schoolRequestApp #schoolPlaces { position:absolute; inset:0; display:block; width:100%; padding:0; background:transparent; pointer-events:none; }
#schoolRequestApp #schoolPlaces button { position:absolute; top:38%; transform:translateX(-50%); width:auto; min-width:76px; padding:9px 16px; border:2px solid #a17d54; border-radius:13px; background:var(--cozy-paper); color:var(--cozy-ink); font-size:clamp(16px,1.5vw,24px); font-weight:700; box-shadow:inset 0 -3px 0 #e7d4ac; pointer-events:auto; }
#schoolPlaces button:nth-child(1) { left:21%; }
#schoolPlaces button:nth-child(2) { left:53%; }
#schoolRequestApp #schoolPlaces button:nth-child(3) { left:80%; top:42%; }
.cozy-request-marker { position:absolute; top:var(--request-y); left:var(--request-x); z-index:4; padding:12px 18px; color:var(--cozy-ink); background:var(--cozy-honey); border:2px solid #b88a30; border-radius:28px; font-weight:700; font-size:clamp(16px,1.65vw,25px); pointer-events:none; }
.cozy-map-prompt { position:absolute; bottom:3.5%; left:2%; z-index:4; max-width:60%; margin:0; padding:12px 20px; color:var(--cozy-ink); background:var(--cozy-paper); border:2px solid var(--cozy-line); border-radius:24px; font-size:var(--game-font-body,16px); line-height:1.6; }
#schoolRequestApp .school-command-panel { position:absolute; left:4%; right:4%; bottom:4%; grid-column:auto; grid-row:auto; display:block; height:auto; max-height:36%; overflow:visible; padding:24px; background:var(--cozy-paper); color:var(--cozy-ink); border:2px solid #98734d; border-radius:20px; box-shadow:0 3px 0 #765637; }
#schoolRequestApp .school-story { display:block; min-height:100px; padding:0; border:0; }
#schoolRequestApp .school-story-copy { display:block; }
#schoolRequestApp .school-portrait { display:none; }
#schoolRequestApp .school-story-tools { display:block; position:absolute; top:-24px; left:24px; margin:0; padding:9px 20px; background:#fff0c9; border:2px solid #ae8654; border-radius:15px; color:var(--cozy-ink); }
#schoolRequestApp .school-story-tools h2 { color:var(--cozy-ink); font-size:clamp(16px,1.6vw,24px); line-height:1.4; margin:0; }
#schoolRequestApp .school-speech { width:67%; font-size:calc(var(--game-font-body,16px)*1.4); color:var(--cozy-ink); line-height:1.65; margin-top:8px; }
#schoolRequestApp .school-action-row { position:absolute; display:flex; flex-direction:row; align-items:stretch; right:20px; left:auto; bottom:20px; width:28%; padding:0; margin:0; border:0; background:transparent; gap:12px; }
#schoolRequestApp .school-action-row > button { width:100%; min-width:0; margin:0; font-size:clamp(16px,1.6vw,24px); }
#schoolRequestApp .school-feedback:empty { display:none; }
#schoolRequestApp .school-feedback { color:var(--cozy-ink); }
#schoolRequestApp[data-screen=map] .school-command-panel { left:auto; right:2%; bottom:3%; width:auto; max-width:38%; padding:0; border:0; background:transparent; box-shadow:none; }
#schoolRequestApp[data-screen=map] .school-story, #schoolRequestApp[data-screen=map] .school-feedback { display:none; }
#schoolRequestApp[data-screen=map] .school-action-row { position:static; width:auto; }
#schoolRequestApp[data-screen=map] .school-action-row > .primary { min-width:240px; padding:18px 28px; font-size:clamp(20px,2vw,32px); }
#schoolRequestApp #schoolSave { display:none; }
#schoolRequestApp #schoolSave.cozy-save-warning { position:absolute; top:12%; left:2%; z-index:15; display:block; max-width:70%; padding:8px 12px; background:var(--cozy-paper); color:var(--cozy-ink); border-radius:8px; }
/* Inspection is its own work surface, with no people or dialogue portraits. */
#schoolRequestApp[data-screen=inspection] .school-scene { display:none; }
#schoolRequestApp[data-screen=inspection] .school-command-panel { inset:0; max-height:none; height:100%; padding:0; background:var(--cozy-paper) url('assets/art/inspection-room-v37.webp') center/cover; border:0; border-radius:0; box-shadow:none; }
#schoolRequestApp[data-screen=inspection] .school-story { display:none; }
#schoolRequestApp .school-inspection { height:83%; padding:6.5% 4% 0; border:0; background:transparent; }
#schoolRequestApp .school-inspection h2 { text-align:center; color:var(--cozy-ink); font-size:clamp(24px,3vw,46px); line-height:1.35; margin:0 14% 8px; }
.cozy-inspection-intro { text-align:center; font-size:var(--game-font-body,16px); margin:0 0 2%; color:var(--cozy-ink); }
.cozy-delivery-layout { display:grid; grid-template-columns:.95fr 1fr 1.2fr; align-items:center; gap:2%; height:84%; }
.cozy-order-paper { align-self:stretch; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:10% 12% 8%; background:url('assets/art/order-clipboard-v37.webp') center/100% 100% no-repeat; min-width:0; }
.cozy-order-paper h3, .cozy-parts-box h3 { color:var(--cozy-ink); font-size:clamp(16px,1.6vw,25px); margin:0 0 8px; text-align:center; }
#schoolRequestApp #schoolExpectedProduct { width:75%; height:auto; max-height:45%; object-fit:contain; image-rendering:auto; }
#schoolRequestApp #schoolExpectedParts { width:100%; height:auto; }
#schoolRequestApp #schoolInspectionExpected { text-align:center; font-size:var(--game-font-label,14px); margin:4px 0 10px; line-height:1.6; }
.cozy-delivered-product { width:100%; height:auto; image-rendering:auto; }
.cozy-parts-box { align-self:center; min-width:0; padding:8% 9% 10%; background:url('assets/art/shipping-box-v37.webp') center/100% 100% no-repeat; }
.cozy-parts-box h3 { padding-top:8%; }
#schoolRequestApp #schoolScrews { display:block; width:100%; height:auto; image-rendering:auto; margin:12% auto 0; }
#schoolRequestApp #schoolInspectionHint { margin:8px 0 0; font-size:var(--game-font-label,14px); text-align:center; line-height:1.5; }
#schoolRequestApp [data-object=bench] .cozy-delivery-layout { grid-template-columns:1fr 1fr; gap:8%; padding-inline:10%; }
#schoolRequestApp[data-screen=inspection] .school-action-row { left:20%; right:20%; bottom:3%; width:auto; }
#schoolRequestApp[data-screen=inspection] .school-feedback { position:absolute; bottom:15%; left:22%; right:22%; padding:8px 12px; margin:0; text-align:center; font-size:var(--game-font-label,14px); background:var(--cozy-paper); border-radius:10px; z-index:3; }
#schoolRequestApp .school-observe { position:absolute; z-index:5; left:20%; right:20%; bottom:15%; padding:20px; background:var(--cozy-paper); border:2px solid var(--cozy-line); border-radius:16px; box-shadow:0 8px 24px #4b2e1930; }
#schoolRequestApp .school-observe h3 { color:var(--cozy-ink); }
/* A task page rather than a narrow dialog beside the game. */
#schoolOfferDialog { width:min(100vw,177.7dvh); height:min(56.28vw,100dvh); max-width:none; max-height:100dvh; padding:0; margin:auto; border:0; border-radius:0; color:var(--cozy-ink); background:linear-gradient(90deg,#fff9e9c9,#fff9e9 15%,#fff9e9 85%,#fff9e9c9),url('assets/art/school-wide-v37.webp') center/cover; }
#schoolOfferDialog[open] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
#schoolOfferDialog::backdrop { background:#dce9d5; }
#schoolOfferDialog .festival-dialog-head { position:relative; display:flex; justify-content:space-between; padding:16px 2%; color:var(--cozy-ink); background:transparent; border:0; }
#schoolOfferDialog .festival-dialog-head button { border:2px solid var(--cozy-line); border-radius:12px; background:var(--cozy-paper); color:var(--cozy-ink); padding:10px 16px; min-height:48px; }
.cozy-offer-utilities { display:flex; align-items:center; gap:14px; }
.cozy-offer-wallet { min-height:48px; }
.cozy-offer-wallet strong { font-size:clamp(20px,2vw,30px); }
#schoolOfferDialog .festival-dialog-body { min-height:0; display:grid; grid-template-rows:auto auto minmax(0,1fr); gap:12px; padding:0 11%; }
#schoolOfferDialog #schoolOfferTitle { color:var(--cozy-ink); font-size:clamp(24px,2.8vw,44px); text-align:center; margin:0; line-height:1.3; }
#schoolOfferDialog #schoolOfferConditions { padding:8px 16px; margin:0 auto; background:#fff0cd; border:1px solid var(--cozy-line); border-radius:20px; color:var(--cozy-ink); text-align:center; font-size:var(--game-font-body,16px); line-height:1.5; }
#schoolOfferDialog .school-offer-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; min-height:0; }
#schoolOfferDialog .school-offer-grid:has(.school-offer:nth-child(4)) { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
#schoolOfferDialog .school-offer { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:12px 18px; border:2px solid #d2bea0; border-radius:20px; background:#fffaf1b3; color:var(--cozy-ink); min-width:0; }
#schoolOfferDialog .school-offer canvas { width:auto; height:clamp(100px,17vw,240px); max-width:100%; object-fit:contain; image-rendering:auto; }
#schoolOfferDialog .school-offer > span { display:flex; flex-direction:column; align-items:flex-start; width:100%; min-width:0; }
#schoolOfferDialog .school-offer small { color:var(--cozy-ink); font-size:var(--game-font-label,14px); line-height:1.5; }
#schoolOfferDialog .school-offer strong { color:var(--cozy-ink); font-size:clamp(17px,1.6vw,25px); line-height:1.5; overflow-wrap:anywhere; }
#schoolOfferDialog .school-offer strong::before { content:none; }
#schoolOfferDialog .school-offer b { font-size:clamp(24px,2.3vw,36px); padding:2px 12px; margin:8px 0 12px; border-radius:10px; background:#fbe0a0; color:var(--cozy-ink); line-height:1.4; }
#schoolOfferDialog .school-offer span > span { font-size:var(--game-font-body,16px); line-height:1.6; color:var(--cozy-ink); }
#schoolOfferDialog .school-offer[aria-pressed=true] { background:#f2f6e6; border:3px solid #779a48; }
#schoolOfferDialog .school-offer[aria-pressed=true]::after { content:''; position:absolute; top:12px; right:14px; width:10px; height:20px; border:solid #527736; border-width:0 4px 4px 0; transform:rotate(45deg); }
#schoolOfferDialog .school-offer-footer { display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:12px 24px; padding:20px 13% 3%; background:transparent; border:0; }
#schoolOfferFeedback { grid-column:1/-1; }
#schoolOfferDialog #schoolBudgetPreview { margin:0; padding:12px 16px; font-size:var(--game-font-body,16px); line-height:1.7; text-align:center; background:#fff4de; border:1px solid var(--cozy-line); border-radius:15px; }
#schoolOfferDialog #schoolOrder { width:100%; margin:0; font-size:clamp(17px,1.65vw,25px); }
#schoolRequestApp button:focus-visible, #schoolOfferDialog button:focus-visible { outline:3px solid #9a4e23; outline-offset:4px; }
@media (hover:hover) and (pointer:fine) { #schoolRequestApp .primary:hover, #schoolOfferDialog .primary:hover { background:#4e702e; } #schoolOfferDialog .school-offer:hover { border-color:#779a48; } }
@media (max-width:780px) {
 #schoolRequestApp { width:100%; height:calc(100dvh - env(safe-area-inset-bottom,0px)); max-height:none; margin:0; }
 #schoolRequestApp .school-trial-head { inset:max(12px,env(safe-area-inset-top)) 12px auto; }
 #schoolRequestApp .school-trial-wallet { min-height:44px; padding:7px 12px; gap:8px; }
 #schoolRequestApp .school-trial-wallet strong { font-size:24px; }
 .cozy-coin { width:26px; height:26px; }
 #schoolRequestApp .school-more summary { width:46px; min-width:46px; height:44px; padding:8px; }
 #schoolRequestApp .school-scene { height:58%; }
 #schoolRequestApp .school-scene canvas { object-fit:cover; }
 #schoolRequestApp .school-command-panel { top:53%; bottom:0; left:0; right:0; height:auto; max-height:none; display:flex; flex-direction:column; padding:16px 16px max(16px,env(safe-area-inset-bottom)); border-radius:18px 18px 0 0; }
 #schoolRequestApp .school-story { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
 #schoolRequestApp .school-story-tools { position:static; width:fit-content; padding:6px 12px; margin-bottom:8px; border-radius:10px; }
 #schoolRequestApp .school-story-tools h2 { font-size:16px; }
 #schoolRequestApp .school-speech { width:100%; font-size:calc(var(--game-font-body,16px)*1.15); margin:0; line-height:1.7; }
 #schoolRequestApp .school-action-row { position:static; width:100%; padding-top:12px; flex:none; }
 #schoolRequestApp .school-action-row > button { font-size:var(--game-font-body,16px); min-height:52px; }
 #schoolRequestApp[data-screen=map] #schoolWorld { display:flex; flex-direction:column; justify-content:center; gap:20px; padding:80px 0 24px; }
 #schoolRequestApp[data-screen=map] #schoolMapStage { position:relative; inset:auto; order:1; width:100%; aspect-ratio:16/9; flex:none; }
 #schoolRequestApp[data-screen=map] .school-scene, #schoolRequestApp[data-screen=map] .school-place-heading { inset:0; height:100%; width:100%; aspect-ratio:auto; }
 #schoolRequestApp[data-screen=map] .school-scene canvas { object-fit:contain; }
 #schoolRequestApp #schoolPlaces button { min-width:64px; padding:7px 10px; font-size:15px; }
 #schoolRequestApp .cozy-request-marker { padding:8px 12px; font-size:16px; }
 #schoolRequestApp .cozy-map-prompt { position:static; order:2; width:88%; margin:0 auto; max-width:none; text-align:center; font-size:16px; padding:12px; }
 #schoolRequestApp[data-screen=map] .school-command-panel { position:static; order:3; margin:0 auto; max-width:none; width:84%; flex:none; }
 #schoolRequestApp[data-screen=map] .school-action-row > .primary { min-width:0; width:100%; font-size:22px; padding:16px; }
 #schoolRequestApp[data-screen=inspection] .school-command-panel { inset:0; padding:88px 12px 110px; overflow-y:auto; display:block; }
 #schoolRequestApp .school-inspection { height:auto; padding:0; }
 #schoolRequestApp .school-inspection h2 { font-size:25px; margin:0 0 8px; }
 .cozy-inspection-intro { font-size:15px; margin-bottom:16px; }
 .cozy-delivery-layout, #schoolRequestApp [data-object=bench] .cozy-delivery-layout { grid-template-columns:110px minmax(0,1fr); gap:16px 12px; height:auto; padding:0; }
 #schoolRequestApp .cozy-delivered-product { display:block; width:110px; height:160px; object-fit:contain; grid-row:2; }
 .cozy-order-paper { grid-column:1/-1; display:grid; grid-template-columns:80px minmax(0,1fr); gap:4px 12px; min-height:0; padding:14px; background:var(--cozy-paper); border:2px solid var(--cozy-line); border-radius:14px; }
 .cozy-order-paper h3, #schoolRequestApp #schoolInspectionExpected, #schoolRequestApp #schoolExpectedParts { grid-column:2; }
 .cozy-order-paper h3, .cozy-parts-box h3 { font-size:18px; }
 #schoolRequestApp #schoolExpectedProduct { grid-column:1; grid-row:1/4; width:80px; max-height:100px; }
 #schoolRequestApp #schoolExpectedParts { width:160px; max-width:100%; }
 #schoolRequestApp #schoolInspectionExpected { font-size:14px; margin:0; }
 .cozy-parts-box { grid-row:2; padding:12px 8px 24px; min-height:0; background-size:100% auto; background-position:center 36px; }
 #schoolRequestApp #schoolScrews { margin-top:34px; }
 #schoolRequestApp [data-object=bench] .cozy-parts-box { grid-column:1/-1; width:100%; }
 #schoolRequestApp #schoolInspectionHint { font-size:14px; }
 #schoolRequestApp[data-screen=inspection] .school-action-row { position:fixed; z-index:5; left:0; right:0; bottom:0; width:100%; padding:14px 12px max(14px,env(safe-area-inset-bottom)); background:var(--cozy-paper); border-top:1px solid var(--cozy-line); }
 #schoolRequestApp[data-screen=inspection] .school-feedback { position:static; margin:12px 0 0; padding:12px; font-size:16px; }
 #schoolRequestApp .school-observe { position:static; margin:12px 0; padding:14px; }
 #schoolRequestApp .school-observe-choices { display:grid; grid-template-columns:1fr; }
 #schoolOfferDialog { width:100%; height:100dvh; max-height:none; overflow-y:auto; }
 #schoolOfferDialog[open] { display:block; }
 #schoolOfferDialog .festival-dialog-head { position:sticky; top:0; z-index:4; padding:10px 12px; background:var(--cozy-paper); }
 #schoolOfferDialog .festival-dialog-head button { padding:8px 10px; min-height:44px; }
 .cozy-offer-utilities { gap:8px; }
 .cozy-offer-wallet { gap:6px; min-height:44px; padding:7px 10px; }
 .cozy-offer-wallet strong { font-size:22px; }
 #schoolOfferDialog .festival-dialog-body { display:block; padding:10px 12px 0; }
 #schoolOfferDialog #schoolOfferTitle { font-size:25px; margin-bottom:12px; }
 #schoolOfferDialog #schoolOfferConditions { font-size:var(--game-font-label,14px); margin-bottom:16px; padding:8px 12px; }
 #schoolOfferDialog .school-offer-grid, #schoolOfferDialog .school-offer-grid:has(.school-offer:nth-child(4)) { grid-template-columns:1fr; gap:12px; }
 #schoolOfferDialog .school-offer { display:grid; grid-template-columns:108px minmax(0,1fr); gap:12px; padding:12px; border-radius:16px; }
 #schoolOfferDialog .school-offer canvas { width:108px; height:116px; }
 #schoolOfferDialog .school-offer strong { font-size:19px; }
 #schoolOfferDialog .school-offer small { font-size:14px; }
 #schoolOfferDialog .school-offer b { font-size:27px; margin:5px 0; }
 #schoolOfferDialog .school-offer span > span { font-size:var(--game-font-body,16px); }
 #schoolOfferDialog .school-offer-footer { position:sticky; bottom:0; z-index:3; grid-template-columns:1fr; padding:12px 12px max(14px,env(safe-area-inset-bottom)); gap:10px; background:var(--cozy-paper); border-top:1px solid var(--cozy-line); }
 #schoolOfferDialog #schoolBudgetPreview { padding:8px 12px; font-size:16px; }
 #schoolOfferDialog #schoolOrder { font-size:18px; min-height:52px; }
}
@media (max-height:500px) and (min-width:781px) {
 #schoolOfferDialog .festival-dialog-head { padding-block:6px; }
 #schoolOfferDialog .school-offer canvas { height:90px; }
 #schoolOfferDialog .school-offer b { margin:3px 0; }
 #schoolOfferDialog .school-offer-footer { padding-block:10px; }
}
/* The festival shares the stage and HUD vocabulary; its 3:2 placement canvas keeps its hit coordinates. */
#festivalApp { position:relative; width:min(100%,177.7dvh); max-width:none; height:min(56.28vw,100dvh); padding:0; margin:0 auto; color:var(--cozy-ink); }
#festivalApp .festival-head { position:absolute; inset:3% 2% auto; z-index:12; margin:0; pointer-events:none; }
#festivalApp .festival-identity { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
#festivalApp .festival-head-actions { width:100%; display:flex; justify-content:space-between; align-items:flex-start; pointer-events:auto; }
#festivalApp .festival-wallet { display:block; width:auto; max-width:none; padding:8px 16px; background:var(--cozy-paper); border:2px solid #886341; border-radius:15px; }
#festivalApp .festival-wallet strong { font-size:30px; color:var(--cozy-ink); }
#festivalApp .festival-wallet > span { font-size:12px; color:var(--cozy-ink); }
#festivalApp .festival-more > summary { color:var(--cozy-ink); background:var(--cozy-paper); border:2px solid #886341; border-radius:14px; }
#festivalApp .town-stages { display:grid; grid-template-columns:1fr; margin:0 0 10px; }
#festivalApp .town-stages button { font-size:14px; padding:8px; }
#festivalApp .festival-world { position:relative; display:block; width:100%; height:100%; border:0; border-radius:0; overflow:hidden; background:#314834; }
#festivalApp .festival-board { position:absolute; top:0; bottom:0; left:50%; transform:translateX(-50%); height:100%; width:auto; max-width:100%; max-height:none; aspect-ratio:3/2; margin:0; }
#festivalApp .festival-world-top { position:absolute; z-index:5; top:3%; left:29%; right:29%; padding:10px; border:0; border-radius:12px; background:var(--cozy-paper); text-align:center; justify-content:center; }
#festivalApp .festival-world-top h2 { font-size:18px; color:var(--cozy-ink); }
#festivalApp > .festival-summary, #festivalApp > .festival-save-status { display:none; }
#festivalApp #festivalSites { position:absolute; z-index:5; top:18%; left:25%; right:25%; padding:6px; border:0; border-radius:12px; background:#fff9e9e8; }
#festivalApp #festivalSites button { color:var(--cozy-ink); border-color:var(--cozy-line); }
#festivalApp #festivalSites button[aria-pressed=true] { color:var(--cozy-paper); background:var(--cozy-green); }
#festivalApp .festival-command-panel { position:absolute; z-index:7; left:3%; right:3%; bottom:3%; display:flex; flex-direction:row; align-items:flex-end; gap:20px; height:auto; padding:0; border:0; background:transparent; overflow:visible; }
#festivalApp #townPartySummary { display:none; }
#festivalApp .festival-note { flex:1; min-width:0; margin:0; padding:12px 18px; color:var(--cozy-ink); background:var(--cozy-paper); border:1px solid var(--cozy-line); border-radius:15px; font-size:var(--game-font-body,16px); line-height:1.7; }
#festivalApp .festival-command-actions { position:static; width:32%; margin:0; background:transparent; }
#festivalApp .festival-toolbar { display:flex; flex-direction:column; padding:0; border:0; margin:0; }
#festivalApp .festival-toolbar > button:not(.primary) { background:var(--cozy-paper); color:var(--cozy-ink); border-color:var(--cozy-line); }
#festivalApp .town-stage-actions { padding:10px 0 0; }
#festivalApp .primary, #reflectionApp .primary { background:var(--cozy-green); color:#fffdf2; border:2px solid #385127; border-radius:14px; box-shadow:inset 0 3px 0 #b2c875,inset 0 -4px 0 #3e602a,0 3px 0 #694f32; min-height:52px; }
#festivalApp .festival-tray { position:absolute; bottom:100%; margin-bottom:12px; width:100%; border:2px solid var(--cozy-line); border-radius:14px; background:var(--cozy-paper); }
#reflectionApp { max-width:1000px; }
#reflectionApp .reflection-card { display:block; border-color:var(--cozy-line); background:var(--cozy-paper); box-shadow:0 6px 20px #4b2e1914; }
#reflectionApp .reflection-intro { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; background:transparent; border:0; padding:24px; }
#reflectionApp .reflection-intro h1 { color:var(--cozy-ink); }
#reflectionApp .reflection-question, #reflectionApp .reflection-results { max-height:none; }
#reflectionApp .reflection-top { border-color:var(--cozy-line); }
#reflectionApp .reflection-choice { border-color:var(--cozy-line); box-shadow:none; color:var(--cozy-ink); }
/* Generated frame plates carry the illustrated edges; controls and their lettering stay semantic. */
#schoolRequestApp .primary, #schoolOfferDialog .primary, #festivalApp .primary, #reflectionApp .primary {
 border:solid transparent; border-width:14px 30px 20px; border-image:url('assets/art/ui-primary-v37.webp') 40 80 62 80 stretch;
 background:var(--cozy-green); background-clip:padding-box; border-radius:0; box-shadow:none; padding:4px 10px; color:#fffdf2;
}
#schoolRequestApp .school-trial-wallet, .cozy-offer-wallet { background:transparent url('assets/art/ui-wallet-v37.webp') center/100% 100% no-repeat; border:0; border-radius:0; box-shadow:none; padding:14px 24px; }
#schoolRequestApp .school-more summary, #schoolOfferSettings { background:transparent url('assets/art/ui-menu-v37.webp') center/100% 100% no-repeat; border:0; border-radius:0; box-shadow:none; }
#schoolRequestApp #schoolPlaces button { background:transparent url('assets/art/ui-sign-v37.webp') center/100% 100% no-repeat; border:0; border-radius:0; box-shadow:none; padding:14px 24px; min-width:110px; }
#schoolRequestApp .cozy-request-marker { width:154px; height:121px; padding:47px 32px 20px 10px; background:transparent url('assets/art/ui-bubble-v37.webp') center/100% 100% no-repeat; border:0; border-radius:0; font-size:20px; text-align:center; }
#schoolRequestApp .cozy-map-prompt { background:transparent; border:solid transparent; border-width:13px 30px 16px; border-image:url('assets/art/ui-prompt-v37.webp') 30 75 35 75 fill stretch; border-radius:0; padding:2px 10px; font-size:18px; }
#schoolRequestApp[data-screen=map] .school-action-row > .primary { padding:6px 14px; font-size:clamp(22px,2.3vw,36px); }
#schoolAction::before { content:''; display:inline-block; width:1em; height:1em; margin-right:.4em; vertical-align:-.12em; background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 12h16M13 5l7 7-7 7' fill='none' stroke='%23fffdf2' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@media (max-width:780px) {
 #festivalApp { width:100%; height:100dvh; }
 #festivalApp .festival-head { inset:12px 12px auto; }
 #festivalApp .festival-wallet strong { font-size:24px; }
 #festivalApp .festival-world-top { top:15%; left:15%; right:15%; }
 #festivalApp .festival-board { top:24%; bottom:auto; width:100%; height:auto; aspect-ratio:3/2; }
 #festivalApp #festivalSites { top:22%; left:6%; right:6%; }
 #festivalApp .festival-command-panel { left:12px; right:12px; bottom:max(16px,env(safe-area-inset-bottom)); flex-direction:column; gap:12px; align-items:stretch; }
 #festivalApp .festival-command-actions { width:100%; }
 #festivalApp .festival-note { font-size:15px; padding:12px; }
 #reflectionApp .reflection-intro { padding:16px; }
 #reflectionApp .reflection-intro canvas { width:56px; height:66px; }
 #schoolRequestApp .school-trial-wallet, .cozy-offer-wallet { padding:10px 16px; }
 #schoolRequestApp #schoolPlaces button { min-width:82px; padding:10px 14px; font-size:15px; }
 #schoolRequestApp .cozy-request-marker { top:-30px; transform:translateX(-40%); width:110px; height:87px; padding:33px 23px 12px 6px; font-size:15px; }
 #schoolRequestApp .cozy-map-prompt { font-size:16px; border-width:12px 24px 14px; width:92%; }
 #schoolRequestApp[data-screen=map] .school-action-row > .primary { font-size:24px; padding:4px; }
}
