.fc-home { margin:0; background:#203d36 }
.fc-scene {
  --ink:#203d35; --green:#31563d; --paper:#fff9ec; --edge:#cec4a8;
  position:fixed; inset:0; z-index:2147481000; display:grid; align-items:center;
  justify-items:start; overflow:auto; box-sizing:border-box; padding:clamp(24px,5.2vw,72px);
  background:#455d45;
  font:500 17px/1.4 'Avenir Next', Avenir, system-ui, sans-serif; color:var(--ink);
  text-shadow:none; text-align:left; touch-action:manipulation; cursor:auto; user-select:auto;
}
.fc-scene::before { content:''; position:fixed; inset:-4px; z-index:-1; pointer-events:none; filter:blur(1.6px);
  background:linear-gradient(105deg,#263c337f 0%,#d3a55416 65%),linear-gradient(0deg,#51422c45,transparent 44%),
    url('/family/panorama.webp') center 48% / cover no-repeat; }
.fc-scene * { box-sizing:border-box }
.fc-scene button,.fc-scene input { font:inherit; color:inherit }
.fc-panel { width:min(440px,100%); padding:48px; background:var(--paper);
  border:2px solid #eee5cf; border-radius:8px; box-shadow:0 7px 0 #413c2bb3, 0 20px 54px #16322255 }
.fc-mark { width:65px; height:65px; display:block; border-radius:8px; image-rendering:pixelated }
.fc-scene h1 { margin:22px 0 6px; color:var(--ink); font:700 clamp(42px,4.2vw,64px)/1.04 'Avenir Next', Avenir, system-ui,sans-serif;
  letter-spacing:-.035em; text-transform:none; text-shadow:none }
.fc-scene p { margin:0 }
.fc-tagline { color:#52665a; font-size:19px }
.fc-form { display:grid; margin-top:35px; gap:8px }
.fc-form label { font-weight:750; font-size:16px }
.fc-input { width:100%; min-height:64px; padding:10px 15px; background:white; border:2px solid #a5ab95; border-radius:5px; font-size:22px!important;
  outline-offset:3px; letter-spacing:.1em }
.fc-input:focus { border-color:var(--green); outline:2px solid var(--green) }
.fc-input[aria-invalid=true] { border-color:#a64d35 }
.fc-hint { min-height:0; color:#943e2d; font-size:15px; font-weight:650 }
.fc-hint:empty { display:none }
.fc-primary { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:64px; margin-top:8px;
  border:1px solid #294231; border-bottom:4px solid #203a2a; border-radius:6px; padding:12px 18px; background:var(--green);
  color:#fffae9!important; font-weight:650!important; font-size:19px!important; cursor:pointer }
.fc-primary::after { content:'→'; font-size:24px }
.fc-primary:hover { background:#416949 }
.fc-primary:active { transform:translateY(2px) }
.fc-primary:disabled { opacity:.75; cursor:wait }
.fc-scene button:focus-visible { outline:4px solid #db9c40; outline-offset:4px }
.fc-scene:has(.fc-wait),.fc-scene:has(.fc-problem) { justify-items:center }
.fc-wait,.fc-problem { width:min(510px,100%); text-align:center }
.fc-wait .fc-mark,.fc-problem .fc-mark { margin:0 auto }
.fc-wait h1,.fc-problem h1 { margin:24px auto; font-size:clamp(30px,3.2vw,44px); letter-spacing:-.05em }
.fc-progress { display:block; width:100%; height:14px; background:#e3dec8; accent-color:var(--green); border:0; border-radius:4px }
.fc-progress::-webkit-progress-bar { border-radius:4px; background:#e3dec8 }
.fc-progress::-webkit-progress-value { border-radius:4px; background:var(--green); transition:width .2s }
@media(max-width:720px) { .fc-scene { padding:24px; justify-items:center }.fc-panel { padding:30px } }
.fc-scene[hidden] { display:none }

.fc-pause { width:204px }
.fc-pause button { width:100% }
.fc-pause label { display:flex; justify-content:space-between; gap:8px; align-items:center; color:white }
.fc-pause input { width:112px; accent-color:#8bbc73 }
@media(pointer:coarse) { .fc-pause button,.fc-pause label { min-height:calc(64px / var(--guiScale, 1)) } }

#family-stage:not([hidden]) ~ #game-ui { visibility:hidden }

.fc-rotate { display:none }
@media (pointer:coarse) {
  [data-family-control], #mobile-top > button {
    min-width:calc(65px / var(--guiScale, 1));
    min-height:calc(65px / var(--guiScale, 1));
  }
}
@media (orientation:portrait) and (pointer:coarse) {
  .fc-rotate {
    position:fixed; inset:0; z-index:2147483647; display:flex;
    flex-direction:column; align-items:center; justify-content:center; gap:24px;
    padding:32px; box-sizing:border-box; text-align:center; color:#203d35;
    background:#fff9ec; touch-action:none; font:600 18px/1.22 system-ui,sans-serif;
  }
  .fc-rotate h1 { max-width:16ch; font:inherit; font-size:clamp(28px,6vw,44px); margin:0 }
  .fc-rotate .fc-mark { width:84px; height:84px }
  .fc-rotate ~ *, body:has(.fc-rotate) > :is(#family-stage,#game-ui,.fc-video) { visibility:hidden }
}

@media(min-width:900px) {
  .fc-scene:has(.fc-door) { justify-items:center }
  .fc-door {
    width:min(100%,max(66vw,820px)); max-width:1080px; padding:clamp(42px,4.5vw,70px);
    display:grid; grid-template-columns:1fr 1fr; column-gap:clamp(35px,5.5vw,86px);
    grid-template-areas:'mark form' 'name form' 'tag form'; align-items:center;
  }
  .fc-door.fc-naming { grid-template-areas:'mark form' 'name form' }
  .fc-door > .fc-mark { grid-area:mark; width:76px; height:76px }
  .fc-door > h1 { grid-area:name; margin:19px 0 8px; font-size:clamp(48px,4.6vw,72px) }
  .fc-door > .fc-tagline { grid-area:tag; font-size:clamp(19px,1.65vw,24px) }
  .fc-door > .fc-form { grid-area:form; margin:0; gap:10px }
  .fc-door .fc-form label { font-size:19px }
  .fc-input,.fc-primary { min-height:68px }
}

#mobile-top > button { appearance:none; touch-action:manipulation; cursor:pointer }

.fc-inventory a[target="_blank"] { display:none !important }
