/* Release shell: a fixed game title, local record tools and guardian pages. */
html[data-screen="home"] #app{display:block;padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
html[data-screen="home"] #main{height:100%}
.title-screen{height:100%;min-height:0;max-width:1060px;margin:auto;display:grid;grid-template-rows:48px minmax(90px,.65fr) minmax(120px,1fr) auto;gap:8px;position:relative}
.title-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.edition-badge{font-size:11px;line-height:1.4;color:#174d44;background:#fff2c9;border:2px solid #a9c1a0;border-radius:10px;padding:5px 9px}
.title-top>div{display:flex;align-items:center;gap:8px}
.title-parent{min-height:44px;display:flex;align-items:center;justify-content:center;gap:5px;border:2px solid #447c78;border-radius:12px;padding:4px 9px;background:#e1efe0;color:#24534c;font-size:12px;box-shadow:0 3px 0 #225963}
.title-parent .ui-icon{width:20px;height:20px}
.title-brand{min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;position:relative;z-index:1}
.title-wordmark{min-height:0;width:100%;height:calc(100% - 25px);max-width:610px;object-fit:contain;filter:drop-shadow(0 5px 0 #245d6822)}
.title-brand p{font-size:14px;line-height:20px;color:#244d43;background:#f9f0cfdd;border-radius:12px;padding:1px 12px;text-align:center;flex:none}
.title-diorama{position:relative;min-height:0;min-width:0;isolation:isolate;border:3px solid #e5edc6;border-radius:30px;background:#bad6b3;box-shadow:0 5px 0 #2d6a73;overflow:hidden;max-width:810px;width:100%;justify-self:center}
.title-hills{position:absolute;inset:0;z-index:-2;opacity:.8}
.title-hills>svg{width:100%;height:100%;object-fit:cover}
.title-shops{position:absolute;inset:0 8% 28%;display:flex;align-items:center;justify-content:center;gap:0;opacity:.85;z-index:-1}
.title-shops>span{width:33%;height:100%;filter:drop-shadow(0 4px 0 #4b897322)}
.title-friends{position:absolute;inset:19% 4% 18%}
.title-friends>.friend{position:absolute;bottom:7%;left:6%;width:24%;height:78%;translate:-50% 0;filter:drop-shadow(0 4px 0 #3f6a5633)}
.title-friends>.friend:nth-child(2){left:21%;bottom:16%;z-index:1}
.title-friends>.friend:nth-child(3){left:34%;bottom:20%;z-index:2}
.title-friends>.friend:nth-child(4){left:50%;bottom:0;width:35%;height:100%;z-index:4}
.title-friends>.friend:nth-child(5){left:66%;bottom:20%;z-index:2}
.title-friends>.friend:nth-child(6){left:79%;bottom:16%;z-index:1}
.title-friends>.friend:nth-child(7){left:94%}
.title-diorama-label{position:absolute;bottom:5px;left:50%;translate:-50% 0;white-space:nowrap;background:#fff6d7e6;border:1px solid #d8c8a0;border-radius:10px;color:#42674f;padding:3px 10px;font-size:11px;line-height:15px}
.title-actions{width:100%;max-width:460px;justify-self:center;display:flex;flex-direction:column;gap:7px;align-items:stretch}
.title-start{font-size:20px;min-height:56px;width:100%;border-color:#245d66;background:linear-gradient(#ffe09a,#efbd68);color:#244b3c;box-shadow:inset 0 3px 0 #fff8c6,0 4px 0 #255b68}
.title-secondary{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.title-secondary .soft{min-width:0;min-height:44px;font-size:12px;padding:4px 6px}
.title-secondary .ui-icon{width:22px;height:22px}
.title-actions>small{text-align:center;font-size:11px;line-height:1.4;color:#fff7d9;background:#286477;border-radius:8px;padding:3px 6px}
.hud-title-logo{padding:0;background:none;border:0;display:grid;place-items:center;min-width:0;min-height:44px;width:100%;height:48px;border-radius:10px}
.hud-title-logo>img{width:100%;height:100%;min-height:0;object-fit:contain}
.hud-title-logo>.game-logo{min-width:0}
.hud-title-logo .game-logo strong{font-size:clamp(17px,4vw,25px)}
.full-tag{display:block;font-size:11px;line-height:14px;color:#5d5237;background:#f5e6ba;border-radius:5px;padding:0 3px;pointer-events:none}
.choice>.full-tag{position:absolute;top:2px;left:2px;right:2px;white-space:nowrap}
.choice:has(>.full-tag){padding-top:18px;min-height:80px}
.choice.locked-choice{border-style:dashed;background:linear-gradient(#faf5e3,#e5dfca)}
.choice.locked-choice::after{display:none}
.choice.more-choice{min-height:80px;padding:5px 2px;gap:3px;border-style:dashed;background:linear-gradient(#faf5e3,#e5dfca)}
.choice.more-choice>.ui-icon{width:24px;height:24px}
.choice.more-choice>.full-tag{position:static;align-self:center;width:auto;max-width:100%}
.choice.more-choice>b{font-size:11px;line-height:13px;white-space:normal;text-align:center}
.toy-choice:has(.full-tag){display:flex;flex-wrap:wrap;align-items:center;justify-content:center;column-gap:3px;row-gap:0}
.toy-choice .full-tag{width:100%}
.settings-tabs>b{display:flex;align-items:center;justify-content:center;flex:1;font-size:13px;color:#34574c}
.settings-tabs>.soft{min-height:44px;font-size:12px;background:#fff3d0;border:2px solid #8ba88b}
.settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.settings-actions>button{font-size:12px;min-height:44px;padding:4px;min-width:0}
.settings-actions .ui-icon{width:21px;height:21px}
.parent-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.parent-tabs>button{border:2px solid #a6b49a;border-radius:11px;background:#e5e5c9;padding:4px 2px;min-width:0;min-height:44px;font-size:12px;color:#37594b}
.parent-tabs>button.selected{background:#b9e1c6;border-color:#618b74;box-shadow:inset 0 2px 0 #e4f2d5}
.parent-pane{min-width:0}
.plan-cards{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.plan-card{min-width:0;background:#fff8df;border:2px solid #9cb7a0;border-radius:14px;padding:9px;color:#304f44}
.plan-card h3{font-size:19px;margin:0}
.plan-card p{font-size:12px;line-height:1.5;margin:5px 0}
.plan-card ul{padding:0;margin:6px 0;list-style:none;font-size:12px;line-height:1.7}
.plan-card li::before{content:'・'}
.plan-card>b{display:block;font-size:11px;line-height:1.5;background:#d9ebcd;border-radius:7px;padding:3px 5px}
.full-plan{border-color:#bca675;background:#fff0ce}
.full-plan>b{background:#eadcb9}
.parent-footnote{font-size:11px;line-height:1.6;margin:7px 0 0;color:#405c51}
.record-panel{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:8px}
.record-summary{background:#fff7da;border:2px solid #c8c8a4;border-radius:13px;padding:10px;align-self:stretch}
.record-summary>b{font-size:18px}
.record-summary p{font-size:12px;line-height:1.6;margin:6px 0}
.record-summary small{font-size:11px;line-height:1.5;color:#405c51}
.backup-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.backup-actions>button{min-width:0;min-height:48px;font-size:12px;padding:4px}
.backup-actions>button:disabled{opacity:.5}
.record-note{grid-column:1/-1;font-size:11px;line-height:1.5;color:#405c51}
.about-grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:12px;align-items:center}
.about-brand{display:flex;flex-direction:column;gap:5px;align-items:center;text-align:center}
.about-brand>img{width:100%;height:110px;object-fit:contain}
.about-brand>b{font-size:12px}.about-brand>small{font-size:11px}
.about-links{display:flex;flex-direction:column;gap:7px}
.about-links>button{font-size:12px;min-height:44px;padding:4px}
.parent-document p,.import-confirm>p{font-size:12px;line-height:1.65}
.parent-document .primary{min-height:44px;font-size:13px}
.gate-intro{font-size:12px;text-align:center;color:#405c51}
.gate-question{display:flex;justify-content:center;align-items:center;gap:10px;font-size:20px;min-height:38px}
.gate-question output{min-width:55px;border:2px solid #92b29b;background:#fffbea;border-radius:10px;text-align:center;padding:3px;line-height:1.3;color:#244e43}
.gate-message{font-size:11px;text-align:center;color:#405c51;min-height:16px}
.gate-keypad{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.gate-keypad .soft{font-size:19px;min-height:48px;padding:3px}
.guardian-gate .dialog-actions>.primary{font-size:14px;min-height:48px}
.boot-message{display:grid;place-items:center;text-align:center;gap:12px;height:100%;padding:25px;color:#fff6cf;font-size:16px}
.boot-message a{color:#fff6cf}
@media(orientation:portrait) and (max-width:380px){
  .title-screen{gap:6px;grid-template-rows:44px minmax(80px,.65fr) minmax(112px,1fr) auto}
  .title-brand p{font-size:12px;line-height:17px;padding:2px 7px}
  .title-start{min-height:52px;font-size:18px}
  .title-actions{gap:6px}
  .plan-card{padding:6px}.plan-card h3{font-size:17px}.plan-card p,.plan-card ul{font-size:11px}
  .record-panel{grid-template-columns:1fr}.record-summary{padding:7px}.record-summary p{margin:2px 0}.record-summary small br{display:none}
  .backup-actions>button{min-height:44px}.record-note{font-size:11px}
}
@media(orientation:landscape) and (max-height:640px){
  html[data-screen="home"] #app{padding-left:max(28px,env(safe-area-inset-left));padding-right:max(28px,env(safe-area-inset-right))}
  .title-screen{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);grid-template-rows:44px minmax(0,1fr) minmax(0,1fr);gap:5px 12px}
  .title-top{grid-column:1/-1;grid-row:1}
  .title-brand{grid-column:1;grid-row:2;gap:2px}.title-brand p{font-size:11px;line-height:16px;padding:1px 6px}.title-wordmark{height:calc(100% - 20px)}
  .title-diorama{grid-column:1;grid-row:3;border-radius:18px}
  .title-actions{grid-column:2;grid-row:2/4;align-self:center;gap:7px}
  .title-friends{inset:0 4% 14%}.title-shops{inset:0 7% 28%;opacity:.5}
  .title-diorama-label{font-size:11px;padding:0 5px;bottom:2px;line-height:14px}
  .title-start{font-size:18px;min-height:52px}
  .title-secondary .soft{font-size:11px}.title-secondary .ui-icon{width:19px;height:19px}
  .hud-title-logo{height:44px}
  .parent-modal{gap:6px}.plan-card{padding:6px}.plan-card h3{font-size:17px}.plan-card p,.plan-card ul{font-size:11px;line-height:1.4;margin:3px 0}
  .parent-footnote{line-height:1.4;margin-top:5px}
  .record-summary{padding:6px}.record-summary>b{font-size:15px}.record-summary p{font-size:11px;line-height:1.4;margin:3px 0}
  .backup-actions{gap:4px}.backup-actions>button{min-height:44px;font-size:11px;padding:2px}.record-panel{gap:5px}.record-note{line-height:1.4}
  .about-brand>img{height:75px}.about-links{gap:5px}
}
@media(orientation:landscape) and (max-height:360px){
  .work-controls:has(.request-card) .choice.more-choice{padding:0 1px;gap:0;min-height:46px}
  .work-controls:has(.request-card) .choice.more-choice>.ui-icon{display:none}
  .title-brand p{display:none}.title-wordmark{height:100%}.title-screen{gap:4px 10px}
  .title-start{min-height:48px;font-size:17px}.title-secondary .soft{gap:2px;padding:2px}
  .title-secondary .ui-icon{display:none}.title-actions>small{padding:2px 3px}
  .settings-modal{grid-template-columns:1fr 1fr}.settings-actions{grid-column:1/-1}
  .guardian-gate{gap:4px}.guardian-gate .gate-intro{display:none}.gate-question{min-height:32px;font-size:19px}.gate-question output{padding:0}
  .gate-keypad{gap:4px}.gate-keypad .soft,.guardian-gate .dialog-actions>.primary{min-height:44px}.gate-message{min-height:14px}
  .parent-modal{gap:4px}.plan-card h3{font-size:16px}.plan-card p{line-height:1.3}.plan-card ul{line-height:1.35}.plan-card>b{line-height:1.3;padding:2px}
  .parent-footnote{line-height:1.3;margin-top:4px}.parent-document{gap:5px}.parent-document p{font-size:11px;line-height:1.5}
}
@media(min-width:900px) and (min-height:650px){
  .title-screen{grid-template-columns:1fr 1fr;grid-template-rows:50px minmax(0,1fr) auto;gap:16px 20px}
  .title-top{grid-column:1/-1}.title-brand{grid-column:1;grid-row:2}.title-diorama{grid-column:2;grid-row:2;max-height:450px;align-self:center;height:100%}
  .title-actions{grid-column:1/-1;grid-row:3;max-width:520px}.title-wordmark{max-height:300px}.title-brand p{font-size:16px}
}
@media(max-height:285px),(max-width:280px){.title-screen{min-height:390px}}

/* Saved work counts may contain five digits. Reserve their intrinsic width. */
.game-hud{grid-template-columns:58px minmax(0,1fr) max-content}
.hud-tools>.collection-counter{flex-shrink:0}
.hud-title-logo .game-logo strong{white-space:normal;line-height:1.05}
@media(orientation:portrait) and (max-height:680px){.game-hud{grid-template-columns:50px minmax(0,1fr) max-content}}
@media(orientation:landscape) and (max-height:640px){.game-hud{grid-template-columns:52px minmax(0,1fr) max-content}}
@media(orientation:landscape) and (max-height:360px){.game-hud{grid-template-columns:48px minmax(0,1fr) max-content}}

/* Long account notices and subscription choices remain readable inside the safe-area dialog. */
.parent-account{display:grid;gap:12px;min-width:0;overflow-wrap:anywhere}
.parent-account h3,.parent-account h4,.parent-account p{margin:0;line-height:1.5}
.account-form{display:grid;gap:12px}.account-form label{display:grid;gap:5px}
.account-form input{width:100%;min-height:48px;font:inherit;padding:8px;border:2px solid #749c91;border-radius:10px;background:#fff;color:#233f36;box-sizing:border-box}
.parent-account button{min-height:48px;white-space:normal;padding:10px}
.account-plan{display:grid;gap:12px;padding:14px;border:2px solid #c5d4bf;border-radius:14px;background:#fffdf3}
.account-check{display:flex;align-items:center;gap:10px;min-height:48px;line-height:1.45}
.account-check input{min-width:28px;min-height:28px;margin:8px;accent-color:#246d67}
.account-legal{display:flex;flex-wrap:wrap;gap:12px}.account-legal a{min-height:44px;display:inline-flex;align-items:center;color:#18594e;text-decoration:underline}
.parent-account details p{white-space:pre-wrap;margin-top:10px}.parent-account summary{min-height:44px;cursor:pointer}
.parent-account [role=status]:empty{display:none}
dialog:has(.parent-account) .modal-heading{position:sticky;top:-14px;z-index:5;background:#fff6da;padding-top:4px}
.household-save-choice .dialog-actions{display:grid;grid-template-columns:1fr;gap:10px}
.household-save-choice .dialog-actions button{min-height:48px}
@media(orientation:landscape){.household-save-choice .dialog-actions{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Language is a device preference, separate from creations and account state. */
.language-options{display:flex;gap:6px;flex-wrap:wrap}.language-options button{min-width:76px;min-height:44px;padding:8px 10px}.language-options .selected{background:#91d6bd;border-color:#376e65}.language-row{gap:10px}html:lang(ja) .studio-caption,html:lang(ja) .project-summary{line-height:1.45}html:lang(ja) .shop-label{font-size:clamp(12px,2.8vw,17px)}
