


body { background: var(--cream-300); }

.door {
  position: relative;
  isolation: isolate;
  max-width: var(--app-max);
  height: 100vh;
  height: 100dvh;
  min-height: 540px;
  margin-inline: auto;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  
  padding:
    calc(32px + env(safe-area-inset-top, 0px))
    56px
    calc(36px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.door-wall, .door-light, .door-orn-host { position: absolute; inset: 0; pointer-events: none; }
.door-wall { z-index: -3; background: var(--cream-100); background-image: var(--tex-wall); }
.door-light { z-index: -2; }
.door-orn-host { z-index: 1; overflow: hidden; }
.door-orn { display: block; shape-rendering: crispEdges; }


.gate-plate { position: relative; z-index: 2; display: grid; justify-items: center; }


.gate-room { position: relative; z-index: 0; min-height: 0; }
.gate-room img { position: absolute; image-rendering: pixelated; }
.gate-mame {
  left: 50%; bottom: 6%;
  width: 120px; height: 120px;
  translate: -50% 0;
  animation: breathe 2400ms steps(2, end) infinite;
}

.gate-shadow { position: absolute; left: 50%; bottom: calc(6% - 8px); width: 120px; height: 16px; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(79,61,48,.22) 0 55%, rgba(79,61,48,.12) 55% 80%, transparent 80%); }
@keyframes breathe { 50% { translate: -50% -2px; } }


.gate-enter { position: relative; z-index: 2; display: grid; gap: 12px; padding-top: 12px; }

.btn-line {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px;
  padding: 0 16px;
  background: var(--brand-line);
  color: var(--cream-050);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  
  clip-path: polygon(0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px));
  box-shadow: inset 0 -4px 0 var(--brand-line-lo), inset 0 2px 0 var(--brand-line-hi);
  transition: translate var(--t-fast) var(--ease-step);
}
.btn-line:active { translate: 0 2px; box-shadow: inset 0 -2px 0 var(--brand-line-lo); }

.gate-enter .btn { min-height: 52px; font-weight: 700; text-decoration: none; }

.btn-line:focus-visible, .gate-enter .btn:focus-visible { outline: 3px solid var(--apricot-300); outline-offset: 3px; }


.enter-error {
  margin: 0;
  padding: 8px 12px;
  background: var(--cream-050);
  box-shadow: 0 0 0 2px var(--oak-700);
  color: var(--ink-700);
  font-size: 13px;
  white-space: nowrap;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.enter-error[hidden] { display: none; }
.enter-error button {
  border: 0; background: none; padding: 4px 0;
  color: var(--apricot-700); font: inherit; font-weight: 700; text-decoration: underline;
}


.door-veil {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: var(--cream-050); opacity: 0;
}
.door.entering .door-veil { animation: veil var(--t-slow) steps(4, end) forwards; }
.door.entering .gate-mame { animation: none; }
@keyframes veil { to { opacity: 1; } }


@media (max-height: 640px) {
  .gate-mame { width: 96px; height: 96px; }
  .gate-shadow { width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .gate-mame, .door * { animation: none !important; }
}

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .door { height: min(860px, calc(100dvh - 48px)); }
}

  

  .door-wall {
    background-color: var(--cream-200);
    background-image:
      repeating-linear-gradient(180deg, rgba(251,248,242,.5) 0 14px, transparent 14px 16px);
  }

  
  .door-light {
    background:
      repeating-conic-gradient(rgba(134,101,58,.045) 0 90deg, transparent 90deg 180deg) 0 0 / 4px 4px,
      radial-gradient(circle at 50% 64%,
        var(--cream-050) 0 13%,
        var(--cream-100) 13% 20%,
        rgba(240,203,171,.62) 20% 30%,
        rgba(240,203,171,.38) 30% 42%,
        rgba(227,204,162,.22) 42% 56%,
        rgba(227,204,162,.10) 56% 70%,
        transparent 70%),
      linear-gradient(180deg, var(--apricot-100) 0 8%, var(--oak-100) 8% 18%, var(--cream-200) 18% 30%, transparent 30%);
  }
  .beams {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: repeating-conic-gradient(from 168deg at 50% 64%,
      rgba(255,251,243,.55) 0 4deg, transparent 4deg 13deg);
    -webkit-mask: radial-gradient(circle at 50% 64%, black 0 18%, rgba(0,0,0,.5) 18% 30%, transparent 46%);
            mask: radial-gradient(circle at 50% 64%, black 0 18%, rgba(0,0,0,.5) 18% 30%, transparent 46%);
    clip-path: polygon(20% 20%, 80% 20%, 100% 100%, 0 100%);
  }

  
  .gate-plate { padding-top: 14px; }
  .gate-plate::before, .gate-plate::after {          
    content: ""; position: absolute; top: -6px; width: 2px; height: 22px;
    background: repeating-linear-gradient(var(--brass-700) 0 4px, transparent 4px 6px);
  }
  .gate-plate::before { left: calc(50% - 46px); }
  .gate-plate::after  { right: calc(50% - 46px); }
  .plate-board {
    padding: 10px clamp(12px, 4vw, 22px) 9px;
    background: var(--brass-100);
    box-shadow:
      0 0 0 2px var(--oak-900),
      inset 0 0 0 2px var(--brass-300),
      inset 0 -6px 0 var(--brass-300),
      4px 4px 0 2px rgba(79,61,48,.18);
  }
  .plate-name {
    margin: 0;
    font-family: var(--f-pixel);
    font-size: clamp(22px, 7.4vw, 30px); line-height: 1;
    letter-spacing: .12em;
    white-space: nowrap;
    color: var(--ink-900);
    text-shadow: 2px 2px 0 var(--brass-300);
    -webkit-font-smoothing: none;
  }
  
  .plate-tag {
    position: relative;
    margin: 12px 0 0;
    padding: 4px 14px 5px;
    background: var(--cream-050);
    box-shadow: 0 0 0 2px var(--oak-700), inset 0 -3px 0 var(--cream-300);
    font-family: var(--f-title);
    font-size: 14px; font-weight: 700;
    letter-spacing: .3em;
    color: var(--ink-700);
  }
  .plate-tag::before {                      
    content: ""; position: absolute; left: 50%; top: -12px; translate: -50% 0;
    width: 6px; height: 8px;
    box-shadow: 0 0 0 2px var(--brass-500);
  }

  
  .pantry, .storage-view, .shop-view, .puzzle-view, .shop-sheet, .home-now, .talk-limit { word-break: keep-all; word-break: auto-phrase; overflow-wrap: anywhere; line-break: strict; }
  .sheet-card, .sheet-card * { min-width: 0; max-width: 100%; }

  
  .plate-charm { display: none; position: absolute; right: -12px; bottom: -22px; width: 24px; height: 24px; image-rendering: pixelated; pointer-events: none; }
  .door[data-sub="1"] .plate-charm { display: block; }

  
  .glint { position: absolute; width: 4px; height: 4px; background: var(--cream-050); box-shadow: 0 0 0 2px rgba(227,204,162,.7); opacity: 0; animation: glint 4800ms steps(1, end) infinite; }
  .glint:nth-of-type(1) { left: calc(50% - 92px); top: 40px; }
  .glint:nth-of-type(2) { left: calc(50% + 86px); top: 30px;  animation-delay: 1200ms; }
  .glint:nth-of-type(3) { left: calc(50% + 70px); top: 78px; animation-delay: 2400ms; }
  .glint:nth-of-type(4) { left: calc(50% - 78px); top: 84px; animation-delay: 3600ms; }
  @keyframes glint { 0% { opacity: 0; } 8% { opacity: 1; } 16% { opacity: .4; } 24% { opacity: 0; } }

  
  .lantern { position: absolute; z-index: 2; left: 64px; top: 168px; width: 48px; height: 48px; image-rendering: pixelated; }
  .lantern-line { position: absolute; z-index: 2; left: 87px; top: 70px; width: 2px; height: 100px; background: var(--brass-700); }
  .lantern-glow { position: absolute; z-index: -1; left: 40px; top: 144px; width: 96px; height: 96px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,240,205,.8) 0 26%, rgba(240,203,171,.4) 26% 48%, transparent 48%);
    animation: flicker 3000ms steps(3, end) infinite; }
  @keyframes flicker { 50% { opacity: .75; } }

  
  .petals { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
  .petals i { position: absolute; top: -8px; width: 6px; height: 4px; background: var(--berry-100); box-shadow: 2px 2px 0 rgba(168,111,112,.35);
    animation: fall 11s steps(44, end) infinite; }
  .petals i:nth-child(3n)   { background: var(--apricot-100); }
  .petals i:nth-child(3n+1) { background: var(--cream-050); width: 4px; height: 4px; box-shadow: 0 0 0 2px rgba(227,204,162,.5); }
  .petals i:nth-child(1) { left: 18%; animation-delay: 0s; }
  .petals i:nth-child(2) { left: 34%; animation-delay: -3s;  animation-duration: 13s; }
  .petals i:nth-child(3) { left: 52%; animation-delay: -7s; }
  .petals i:nth-child(4) { left: 66%; animation-delay: -1.5s; animation-duration: 14s; }
  .petals i:nth-child(5) { left: 78%; animation-delay: -9s; }
  .petals i:nth-child(6) { left: 26%; animation-delay: -5s;  animation-duration: 12s; }
  .petals i:nth-child(7) { left: 72%; animation-delay: -11s; animation-duration: 15s; }
  @keyframes fall {
    0%   { translate: 0 0; opacity: 0; }
    10%  { opacity: 1; }
    25%  { translate: 10px 22vh; }
    50%  { translate: -6px 44vh; }
    75%  { translate: 12px 66vh; opacity: .9; }
    100% { translate: 0 88vh; opacity: 0; }
  }

  
  .gate-mame { width: 144px; height: 144px; bottom: 8%; }
  .gate-flower { left: 18%; bottom: 6%; width: 40px; height: 40px; }
  @media (min-height: 780px) { .gate-mame { width: 168px; height: 168px; } .gate-shadow { width: 156px; } }
  @media (max-height: 700px) {
    .gate-mame { width: 112px; height: 112px; }
    .lantern, .lantern-line, .lantern-glow { display: none; }
  }

  
  .gate-screen {
    position: absolute; z-index: 0; pointer-events: none;
    top: var(--gate-in); left: var(--gate-in); right: var(--gate-in);
    bottom: var(--gate-thr);
    overflow: hidden;
    border-radius: 50% 50% 0 0 / var(--gate-arch) var(--gate-arch) 0 0;
  }
  .gate-video {
    display: block; width: 100%; height: 100%;
    object-fit: cover; object-position: 50% 50%;
    opacity: 0; transition: opacity var(--t-slow) steps(4, end);
  }
  
  .gate-screen::after {
    content: ""; position: absolute; inset: 0;
    box-shadow: inset 0 0 0 4px rgba(79,61,48,.16), inset 0 0 40px rgba(79,61,48,.16);
  }
  .door.has-video .gate-video { opacity: 1; }
  
  .door.has-video .gate-room { visibility: hidden; }
  .door.has-video .beams { display: none; }
  
  .door.has-video .lantern, .door.has-video .lantern-line, .door.has-video .lantern-glow { display: none; }

  .gate-enter { padding-top: 16px; }

  
  .door-veil { transition: opacity var(--t-slow) steps(4, end); }
  .door.arriving .door-veil { opacity: 1; }
  
  @view-transition { navigation: auto; }

  
  .door { min-height: 0; }                      
  .door[data-stage="room"] .gate-plate { padding-top: 6px; }
  .door[data-stage="room"] .gate-plate::before, .door[data-stage="room"] .gate-plate::after { display: none; }
  .plate-tag-only { margin-top: 0; }

  
  .door { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto auto; }
  .door[data-stage="room"] { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }

  
  .home-gear {
    position: absolute; z-index: 3; top: calc(30px + env(safe-area-inset-top, 0px)); right: 24px;
    display: grid; place-items: center; width: 34px; height: 34px;
    background: var(--cream-050);
    clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
    box-shadow: inset 0 0 0 2px var(--oak-700), inset 0 -3px 0 var(--cream-300);
  }
  .home-gear::before {                       
    content: ""; position: absolute; left: 50%; bottom: 100%; width: 2px; height: 14px; translate: -50% 0;
    background: repeating-linear-gradient(var(--brass-700) 0 4px, transparent 4px 6px);
  }
  .home-gear img { width: 24px; height: 24px; image-rendering: pixelated; }
  .home-gear:active { translate: 0 2px; }

  .home-act { gap: 10px; padding-top: 12px; }
  
  
  .home-now {
    justify-self: center; margin: 0 -20px; padding: 6px 14px 7px;
    display: grid; justify-items: center; gap: 6px;
    max-width: calc(100% + 40px);
    background: var(--cream-050); box-shadow: 0 0 0 2px var(--oak-700), inset 0 -3px 0 var(--cream-300);
    font-size: var(--fs-small); font-weight: 500; color: var(--ink-700); text-decoration: none; text-align: center;
  }
  .home-now-line { display: flex; align-items: baseline; justify-content: center; }
  #home-now-text {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    line-height: 1.5;
  }
  .home-now-dot { display: inline-block; width: 6px; height: 6px; margin-right: 8px; vertical-align: 2px; background: var(--sage-500); box-shadow: 0 0 0 2px var(--sage-100); }
  .home-now[data-life] { cursor: pointer; box-shadow: 0 0 0 2px var(--apricot-500), inset 0 -3px 0 var(--apricot-100); }
  .home-now[data-life] .home-now-dot { background: var(--apricot-500); box-shadow: 0 0 0 2px var(--apricot-100); animation: glint 2400ms steps(1, end) infinite; }
  .home-now-go { padding: 2px 12px 3px; background: var(--apricot-300); color: var(--cream-050); font-weight: 700; font-size: 12px; box-shadow: 0 0 0 2px var(--oak-900), inset 0 -2px 0 var(--apricot-500); }
  .home-now-go::after { content: " ›"; }
  .home-now-go[hidden] { display: none; }
  .home-now[data-life]:active { translate: 0 2px; }

  
  .home-say {
    display: grid; grid-template-columns: minmax(0, 1fr) 40px 40px; gap: 6px; align-items: center;
    padding: 6px;
    background: var(--brass-100);
    box-shadow: 0 0 0 2px var(--oak-900), inset 0 0 0 2px var(--brass-300), inset 0 -4px 0 var(--brass-300), 4px 4px 0 2px rgba(79,61,48,.18);
  }
  .home-say:focus-within { box-shadow: 0 0 0 2px var(--oak-900), 0 0 0 5px var(--apricot-300), inset 0 0 0 2px var(--brass-300), inset 0 -4px 0 var(--brass-300); }
  .home-say input {
    min-width: 0; height: 40px; padding: 0 10px;
    border: 0; background: var(--cream-050); box-shadow: inset 0 2px 0 var(--cream-300);
    font: inherit; font-size: var(--fs-body); color: var(--ink-900); outline: none;
  }
  .home-say input::placeholder { color: var(--ink-300); }
  @media (max-width: 340px) { .home-say { padding: 4px; gap: 4px; } .home-say input { padding: 0 5px; font-size: 12px; letter-spacing: 0; } }   
  .say-btn {
    display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 0; color: var(--ink-900); cursor: pointer;
    background: var(--cream-050); box-shadow: 0 0 0 2px var(--oak-700), inset 0 -3px 0 var(--cream-300);
  }
  .say-send { background: var(--apricot-300); box-shadow: 0 0 0 2px var(--oak-900), inset 0 -3px 0 var(--apricot-500), inset 0 2px 0 var(--apricot-100); }
  .say-send[disabled] { background: var(--cream-200); box-shadow: 0 0 0 2px var(--oak-500), inset 0 -3px 0 var(--cream-300); color: var(--ink-300); cursor: default; }
  .say-mic { color: var(--ink-700); }
  .say-btn:not([disabled]):active { translate: 0 2px; }
  .say-btn:focus-visible { outline: 3px solid var(--apricot-300); outline-offset: 2px; }

  
  .home-tabs {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: repeat(5, 1fr);
    margin: 18px -38px 0;
    padding: 4px 0 2px;
    background:
      repeating-linear-gradient(90deg, rgba(228,216,200,.35) 0 2px, transparent 2px 6px),
      var(--cream-050);
    box-shadow: 0 -2px 0 var(--oak-700), 0 -4px 0 var(--brass-300), 0 -6px 0 var(--oak-700);
  }
  
  .home-tabs::before {
    content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 6px;
    background: radial-gradient(circle at 4px 0, var(--apricot-100) 0 3px, transparent 3.5px) 0 0 / 8px 6px repeat-x;
  }
  .home-tab {
    position: relative;
    display: grid; justify-items: center; gap: 1px; padding: 4px 0 4px;
    color: var(--ink-500); font-size: 12px; font-weight: 700; text-decoration: none;
  }
  .tab-ico { display: grid; place-items: center; width: 42px; height: 38px; }
  .tab-ico img { width: 32px; height: 32px; image-rendering: pixelated; }
  .home-tab[aria-current="page"] { color: var(--ink-900); }
  .home-tab[aria-current="page"] .tab-ico {
    translate: 0 -6px;
    background: var(--brass-100);
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
    box-shadow: inset 0 0 0 2px var(--brass-500), inset 0 -4px 0 var(--brass-300);
  }
  .home-tab[aria-current="page"] .tab-label { translate: 0 -4px; }
  .home-tab[aria-current="page"]::after {
    content: ""; position: absolute; left: 50%; bottom: 1px; width: 14px; height: 2px; translate: -50% 0;
    background: var(--apricot-300); box-shadow: -4px 0 0 var(--cream-050), 4px 0 0 var(--cream-050);
  }
  .home-tab:not([aria-current]) .tab-ico img { filter: saturate(.75); }
  .door.kb .home-tabs { display: none; }        

  
  .room-tabs { grid-template-columns: repeat(5, 1fr); }

  
  .door.shift .door-veil { animation: shift 520ms steps(4, end) both; }
  @keyframes shift { 0% { opacity: 0; } 50% { opacity: .7; } 100% { opacity: 0; } }

  
  .home-now-back {
    padding: 2px 10px 3px; border: 0; cursor: pointer;
    background: var(--cream-200); color: var(--ink-700); font: inherit; font-size: 12px; font-weight: 700;
    box-shadow: 0 0 0 2px var(--oak-700), inset 0 -2px 0 var(--cream-300);
  }
  .home-now-back::before { content: "‹ "; }
  .home-now-back[hidden] { display: none; }
  .door[data-mode="talk"] .home-now { grid-auto-flow: column; align-items: center; }
  .door[data-mode="talk"] .home-now-dot { background: var(--apricot-300); box-shadow: 0 0 0 2px var(--apricot-100); }
  .door[data-mode="talk"] .home-now[data-speaking] .home-now-dot { animation: glint 900ms steps(1, end) infinite; }

  
  .say-slip {
    position: absolute; z-index: 4; left: 50%; max-width: 80%;
    padding: 4px 12px 5px; translate: -50% 0;
    background: var(--cream-050); color: var(--ink-700); font-size: var(--fs-small);
    box-shadow: 0 0 0 2px var(--oak-700), inset 0 -2px 0 var(--cream-300);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    animation: slip 1400ms steps(7, end) forwards; pointer-events: none;
  }
  @keyframes slip { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-64px); } }
  .say-mic[data-listening] { background: var(--apricot-100); animation: glint 600ms steps(1, end) infinite; }

  
  .door[data-mode="life"] .home-now,
  .door[data-mode="life"] .home-say { display: none; }
  .life-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .life-choices[hidden] { display: none; }
  .life-choice {
    min-height: 44px; padding: 6px 8px; border: 0; cursor: pointer;
    background: var(--cream-050); color: var(--ink-900);
    font: inherit; font-size: var(--fs-small); font-weight: 700; line-height: 1.35;
    box-shadow: 0 0 0 2px var(--oak-900), inset 0 0 0 2px var(--brass-300), inset 0 -4px 0 var(--brass-100);
  }
  .life-choice::before { content: "▸ "; color: var(--apricot-500); }
  .life-choice:active { translate: 0 2px; }
  .life-choice:focus-visible { outline: 3px solid var(--apricot-300); outline-offset: 2px; }
  .life-choices[data-wait] .life-choice { visibility: hidden; }   

  
  .room-exit {
    position: absolute; z-index: 3; top: calc(30px + env(safe-area-inset-top, 0px)); left: 24px;
    display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; cursor: pointer;
    background: var(--cream-050);
    clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
    box-shadow: inset 0 0 0 2px var(--oak-700), inset 0 -3px 0 var(--cream-300);
  }
  .room-exit img { width: 20px; height: 20px; image-rendering: pixelated; opacity: .8; }
  .room-exit[hidden] { display: none; }
  .door[data-mode="life"] .home-gear { visibility: hidden; }

  
  .prop-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
  .prop-spot { position: absolute; pointer-events: auto; border: 0; padding: 0; background: transparent; cursor: pointer; }
  .prop-spot:focus-visible { outline: 3px dashed var(--apricot-300); outline-offset: 2px; }
  
  .prop-sparkle {
    position: absolute; width: 33px; height: 33px; translate: -50% -50%; pointer-events: none;
    background: url("./sprites/sparkle.svg") 0 0 / 330px 33px no-repeat;
    image-rendering: pixelated;
    animation: twinkle 1500ms steps(10, jump-none) infinite;
  }
  .prop-sparkle.lg { width: 44px; height: 44px; background-size: 440px 44px; animation-name: twinkle-lg; }
  @keyframes twinkle { from { background-position: 0 0; } to { background-position: -297px 0; } }
  @keyframes twinkle-lg { from { background-position: 0 0; } to { background-position: -396px 0; } }
  @media (prefers-reduced-motion: reduce) { .prop-sparkle { animation: none; background-position: -66px 0; } .prop-sparkle.lg { background-position: -88px 0; } }
  .door:not([data-mode="idle"]) .prop-layer { display: none; }

  /* (beta) おやつ · あそぶ · ものいれ · おみせ views are left in the design workspace until the full launch. */
  
  .talk-limit { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin: 0 0 6px; font-size: 11px; color: var(--ink-700); }
  .talk-limit[hidden] { display: none; }
  /* One line for 「きょうの おはなしは ここまで」; the longer beta notices (「ベータテストは 終了しました。ご参加
     ありがとうございました。」, 362 px) were cut off at both sides on a 375 px phone (2026-11-01): they wrap at the
     spaces between phrases (keep-all above). */
  .talk-limit-text { white-space: normal; text-align: center; }
  .talk-more { min-height: 32px; padding: 0 10px; white-space: nowrap; border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; color: var(--ink-900); background: var(--brass-100); box-shadow: 0 0 0 2px var(--oak-700), inset 0 -3px 0 var(--brass-300); position: relative; }
  .talk-more::after { content: ""; position: absolute; inset: -6px 0; }
  .talk-more[hidden] { display: none; }
  .door[data-mode="life"] .talk-limit { display: none; }

  
  .prop-menu {
    position: absolute; z-index: 4; display: flex; align-items: center; gap: 6px; padding: 6px;
    background: var(--cream-050);
    box-shadow: 0 0 0 2px var(--oak-900), inset 0 -3px 0 var(--cream-300), 4px 4px 0 2px rgba(79,61,48,.18);
  }
  .prop-menu::after {                          
    content: ""; position: absolute; left: 22px; top: -8px; width: 10px; height: 8px;
    background: var(--oak-900); clip-path: polygon(0 100%, 100% 100%, 0 0);
  }
  .prop-menu button {
    padding: 6px 10px; border: 0; cursor: pointer; text-align: left;
    background: var(--brass-100); color: var(--ink-900); font: inherit; font-size: var(--fs-small); font-weight: 700;
    box-shadow: 0 0 0 2px var(--oak-700), inset 0 -3px 0 var(--brass-300);
    white-space: nowrap;
  }
  .prop-menu button::before { content: "▸ "; color: var(--apricot-500); }
  .prop-menu .prop-menu-close { width: 28px; height: 28px; padding: 0; text-align: center; background: transparent; box-shadow: none; color: var(--ink-500); font-size: 16px; }
  .prop-menu .prop-menu-close::before { content: ""; }
  .home-tab:active { translate: 0 2px; }

  .name-form { gap: 10px; }
  
  .name-plate {
    padding: 8px 12px;
    background: var(--brass-100);
    box-shadow:
      0 0 0 2px var(--oak-900),
      inset 0 0 0 2px var(--brass-300),
      inset 0 -5px 0 var(--brass-300),
      4px 4px 0 2px rgba(79,61,48,.18);
  }
  .name-plate input {
    display: block; width: 100%;
    padding: 8px 6px 6px;
    border: 0; border-bottom: 2px dashed var(--brass-700);
    background: transparent;
    font-family: var(--f-title); font-size: 22px; font-weight: 700;
    letter-spacing: .08em; text-align: center;
    color: var(--ink-900);
    outline: none;
  }
  .name-plate input::placeholder { color: var(--brass-700); opacity: .75; font-weight: 500; }
  .name-plate:focus-within { box-shadow: 0 0 0 2px var(--oak-900), 0 0 0 5px var(--apricot-300), inset 0 0 0 2px var(--brass-300), inset 0 -5px 0 var(--brass-300); }
  .name-help { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-500); }
  .name-error { margin: 0; font-size: 13px; line-height: 1.5; color: var(--berry-500); font-weight: 700; }
  .name-error[hidden] { display: none; }
  .name-error { white-space: pre-line; }
  
  .name-form:has(.name-error:not([hidden])) .name-help { display: none; }
  .name-form .btn[disabled] { filter: saturate(.5); color: var(--ink-500); }
  @media (max-height: 560px) { .name-help { display: none; } }   
  
  .gate-enter::before { content: ""; position: absolute; inset: -18px -40px -40px; z-index: -1;
    background: radial-gradient(60% 70% at 50% 60%, rgba(255,251,243,.7) 0 40%, rgba(255,251,243,.3) 40% 70%, transparent 70%); }
/* ---------- login-up.html only: login method panel ---------- */

.enter-first { display: grid; gap: 12px; }
.enter-first[hidden] { display: none; }
.btn-login { letter-spacing: 0; white-space: nowrap; font-size: clamp(14px, 4.3vw, 16px); }   

.login-panel {
  display: grid; gap: 10px; padding: 12px 12px 8px;
  background: var(--cream-050); background-image: var(--tex-linen);
  box-shadow: inset 0 0 0 2px var(--oak-700), 0 2px 0 var(--oak-900);
}
.login-panel[hidden] { display: none; }
.login-panel-title { margin: 0; text-align: center; font-size: 13px; letter-spacing: .12em; color: var(--ink-700); }
.idp { display: flex; align-items: center; min-height: 48px; text-decoration: none; }
.idp:focus-visible { outline: 3px solid var(--apricot-300); outline-offset: 3px; }

.idp-line { position: relative; background: #06C755; color: #FFFFFF; border-radius: 6px; font-weight: 700; font-size: 15px; }
.idp-line-mark { display: grid; place-items: center; width: 48px; height: 48px; border-right: 1px solid rgba(0,0,0,.08); }
.idp-line-text { flex: 1; text-align: center; white-space: nowrap; padding-right: clamp(4px, 12vw - 8px, 48px); }
.idp-line:hover { background: linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)), #06C755; }
.idp-line:active { background: linear-gradient(rgba(0,0,0,.30), rgba(0,0,0,.30)), #06C755; }

.idp-google { background: #FFFFFF; box-shadow: inset 0 0 0 1px #747775; border-radius: 6px; color: #1F1F1F; font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 500; font-size: 14px; line-height: 20px; }
.idp-g { display: grid; place-items: center; width: 48px; height: 48px; }
.idp-google-text { flex: 1; text-align: center; white-space: nowrap; padding-right: clamp(4px, 12vw - 8px, 48px); }
.login-panel-close { justify-self: center; border: 0; background: none; padding: 6px 12px; font: inherit; font-size: 13px; color: var(--ink-700); text-decoration: underline; text-underline-offset: 3px; }
.login-panel-close:focus-visible { outline: 3px solid var(--apricot-300); outline-offset: 2px; }
