

  .door:not([data-view="room"]) .gate-screen,
  .door:not([data-view="room"]) .gate-room,
  .door:not([data-view="room"]) .gate-enter,
  .door:not([data-view="room"]) .gate-plate,
  .door:not([data-view="room"]) .prop-layer,
  .door:not([data-view="room"]) .home-gear,
  .door:not([data-view="room"]) .lantern, .door:not([data-view="room"]) .lantern-line, .door:not([data-view="room"]) .lantern-glow,
  .door:not([data-view="room"]) .door-light, .door:not([data-view="room"]) .beams { visibility: hidden; }

  
  .door.swap .door-veil { animation: swap 300ms steps(3, end) both; }

@keyframes swap { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }

.pantry, .puzzle-view, .storage-view, .shop-view {
    position: absolute; z-index: 2; left: 34px; right: 34px; top: calc(30px + env(safe-area-inset-top, 0px)); bottom: var(--tabs-h);
    display: grid; align-content: center; justify-items: center; gap: 14px;   
    padding: 52px 6px 14px;
  }

.pantry[hidden], .puzzle-view[hidden], .storage-view[hidden], .shop-view[hidden] { display: none; }

.pantry, .storage-view { align-content: safe center; overflow-y: auto; scrollbar-width: none; }

@media (max-height: 600px) {                                 
    .pantry, .storage-view { gap: 8px; padding-top: 46px; padding-bottom: 8px; }
    .pantry-board, .storage-board { padding: 6px; }
    .pantry-grid, .storage-grid { gap: 6px; padding: 4px; }
    .pantry-detail { padding: 9px 10px; gap: 6px 10px; }
    .pantry-detail .pd-note { font-size: 12px; line-height: 1.5; }
    .pantry-detail .pd-give { min-height: 44px; }
  }

  .pantry-tag { position: absolute; top: 4px; left: 50%; translate: -50% 0; margin: 0; }

  .melon-plate {
    position: absolute; left: -6px; top: 0;
    display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px 0 6px;
    background: var(--cream-050); box-shadow: inset 0 0 0 2px var(--oak-700), inset 0 -3px 0 var(--cream-300);
    font-family: var(--f-pixel); font-size: 15px; color: var(--ink-900); -webkit-font-smoothing: none;
  }

.melon-plate img { width: 24px; height: 24px; image-rendering: pixelated; }

  .pantry-board {
    width: 100%; padding: 10px;
    background: var(--cream-100);
    box-shadow: 0 0 0 2px var(--oak-900), inset 0 0 0 4px var(--oak-300), inset 0 0 0 6px var(--oak-700), 4px 4px 0 2px rgba(79,61,48,.18);
  }

.pantry-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 6px; }

.slot {
    position: relative; aspect-ratio: 1; padding: 0; border: 0; cursor: pointer;
    display: grid; place-items: center;
    background: var(--cream-050); box-shadow: inset 0 0 0 2px var(--cream-400), inset 0 -4px 0 var(--cream-200);
  }

.slot img { width: 32px; height: 32px; image-rendering: pixelated; }

.slot[data-empty] { background: transparent; box-shadow: inset 0 0 0 2px rgba(150,114,86,.35); cursor: default; }

.slot-count {
    position: absolute; right: 3px; bottom: 2px;
    font-family: var(--f-pixel); font-size: 12px; line-height: 1; color: var(--ink-900); -webkit-font-smoothing: none;
    text-shadow: 1px 0 0 var(--cream-050), -1px 0 0 var(--cream-050), 0 1px 0 var(--cream-050), 0 -1px 0 var(--cream-050);
  }

.slot-ribbon {                               
    position: absolute; left: 2px; top: 2px; width: 10px; height: 10px;
    background: var(--sage-300); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 70%, 0 100%);
  }

.slot[data-zero] img { opacity: .35; filter: grayscale(.6); }

.slot[aria-selected="true"] { box-shadow: inset 0 0 0 3px var(--apricot-500), inset 0 -4px 0 var(--apricot-100); }

.slot[aria-selected="true"]::before {         
    content: ""; position: absolute; left: -9px; top: 50%; width: 7px; height: 10px; translate: 0 -50%;
    background: var(--ink-900); clip-path: polygon(0 0, 100% 50%, 0 100%);
    animation: glint 900ms steps(1, end) infinite;
  }

.slot:focus-visible { outline: 3px solid var(--apricot-300); outline-offset: 2px; }

  .slot[data-rarity="3"] { box-shadow: inset 0 0 0 2px var(--sage-500), inset 0 0 0 4px var(--sage-100), inset 0 -4px 0 var(--cream-200); }

.slot[data-rarity="4"] { background: var(--cream-050); box-shadow: inset 0 0 0 2px var(--apricot-500), inset 0 0 0 4px var(--apricot-100), inset 0 -4px 0 var(--apricot-100); }

.slot[data-rarity="4"]::after { content: ""; position: absolute; right: 3px; top: 3px; width: 6px; height: 6px; background: var(--apricot-300); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

.slot[data-rarity="5"] { background: linear-gradient(var(--brass-100), var(--cream-050)); box-shadow: inset 0 0 0 2px var(--brass-700), inset 0 0 0 4px var(--brass-300), inset 0 0 0 6px var(--brass-100), inset 0 -4px 0 var(--brass-300); }

.slot-glint { position: absolute; right: 2px; top: 2px; width: 22px; height: 22px; pointer-events: none; image-rendering: pixelated; background-repeat: no-repeat; background-size: 220px 22px; animation: twinkle-sm 1800ms steps(10, jump-none) infinite; }

@keyframes twinkle-sm { from { background-position: 0 0; } to { background-position: -198px 0; } }

.slot[aria-selected="true"][data-rarity] { box-shadow: inset 0 0 0 3px var(--apricot-500), inset 0 -4px 0 var(--apricot-100); }

  .pantry-detail[data-rarity="3"] .pd-icon { box-shadow: inset 0 0 0 2px var(--sage-500); }

.pantry-detail[data-rarity="4"] { box-shadow: 0 0 0 2px var(--oak-900), inset 0 0 0 2px var(--apricot-300), inset 0 -4px 0 var(--apricot-100), 4px 4px 0 2px rgba(79,61,48,.18); }

.pantry-detail[data-rarity="4"] .pd-icon { box-shadow: inset 0 0 0 2px var(--apricot-500); }

.pantry-detail[data-rarity="5"] { background: linear-gradient(var(--brass-100), var(--cream-050) 40%); box-shadow: 0 0 0 2px var(--brass-700), inset 0 0 0 2px var(--brass-300), inset 0 0 0 4px var(--brass-100), 4px 4px 0 2px rgba(79,61,48,.18); }

.pantry-detail[data-rarity="5"] .pd-icon { background: var(--brass-100); box-shadow: inset 0 0 0 2px var(--brass-700); }

@media (prefers-reduced-motion: reduce) { .slot-glint { animation: none; background-position: -44px 0; } }

  .melon-plate .pz-melon, .melon-plate .st-melon, .melon-plate .sh-melon { font: inherit; }

#puzzle-title { white-space: nowrap; }

.pz-bar { width: 100%; max-width: 312px; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }

.pz-bar .pz-left { justify-content: flex-start; white-space: nowrap; min-width: 0; }

  .pz-quit {
    min-height: 32px; min-width: 64px; padding: 0 12px; border: 0; cursor: pointer;
    font: inherit; font-size: 12px; color: var(--ink-700);
    background: var(--cream-050); box-shadow: inset 0 0 0 2px var(--oak-500), inset 0 -3px 0 var(--cream-300);
    position: relative;
  }

.pz-quit::after { content: ""; position: absolute; inset: -6px -2px; }

  .pz-quit[hidden] { display: none; }

.pz-confirm { position: absolute; inset: 8px; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 12px; background: rgba(247,243,235,.9); text-align: center; }

.pz-confirm[hidden] { display: none; }

.pz-confirm p { margin: 0; font-size: var(--fs-body); color: var(--ink-900); line-height: 1.6; }

.pz-confirm small { font-size: 12px; color: var(--ink-500); }

.pz-confirm-btns { display: flex; gap: 10px; }

.pz-confirm-btns .pz-quit-no, .pz-confirm-btns .pz-quit-yes { min-height: 44px; padding: 0 16px; font-weight: 700; }

.pz-left { display: flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--ink-700); }

.pz-left img { width: 18px; height: 18px; image-rendering: pixelated; }

.pz-left img[data-used] { opacity: .25; filter: grayscale(1); }

.pz-board {
    position: relative; width: 100%; max-width: 312px; aspect-ratio: 1; padding: 8px;
    background: var(--oak-300);
    box-shadow: 0 0 0 2px var(--oak-900), inset 0 0 0 3px var(--brass-300), inset 0 0 0 5px var(--oak-700), 4px 4px 0 2px rgba(79,61,48,.18);
    touch-action: none; user-select: none; -webkit-user-select: none;
  }

.pz-cells, .pz-tiles { position: absolute; inset: 8px; }

.pz-cells { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); }

.pz-cells i { margin: 3px; background: var(--cream-200); box-shadow: inset 0 2px 0 var(--cream-400); }

.pz-tile {
    position: absolute; left: 0; top: 0; width: 25%; height: 25%; padding: 3px;
    transform: translate(calc(var(--c) * 100%), calc(var(--r) * 100%));
    transition: transform 100ms steps(3, end);
  }

.pz-tile::before {                            
    content: ""; position: absolute; inset: 3px;
    background: var(--cream-050); box-shadow: inset 0 0 0 2px var(--cream-400), inset 0 -4px 0 var(--cream-200);
  }

.pz-tile img { position: relative; display: block; width: 66%; height: 66%; margin: 17%; image-rendering: pixelated; }

.pz-tile[data-t="5"]::before, .pz-tile[data-t="6"]::before { background: var(--cream-050); box-shadow: inset 0 0 0 2px var(--oak-500), inset 0 -4px 0 var(--cream-200); }

.pz-tile[data-t="7"]::before { box-shadow: inset 0 0 0 2px var(--sage-500), inset 0 0 0 4px var(--sage-100), inset 0 -4px 0 var(--cream-200); }

.pz-tile[data-t="8"]::before { box-shadow: inset 0 0 0 2px var(--apricot-500), inset 0 0 0 4px var(--apricot-100), inset 0 -4px 0 var(--apricot-100); }

.pz-tile[data-t="9"]::before { background: linear-gradient(var(--brass-100), var(--cream-050)); box-shadow: inset 0 0 0 2px var(--brass-700), inset 0 0 0 4px var(--brass-300), inset 0 -4px 0 var(--brass-300); }

.pz-tile.appear { animation: pz-appear 160ms steps(3, end) both; }

.pz-tile.pop img { animation: pz-pop 180ms steps(3, end) both; }

.pz-tile.goal::before { animation: pz-goal 900ms steps(2, end) 2; }

@keyframes pz-appear { from { opacity: 0; } to { opacity: 1; } }

@keyframes pz-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

@keyframes pz-goal { 50% { box-shadow: inset 0 0 0 3px var(--brass-700), inset 0 0 0 6px var(--brass-100); } }

.pz-spark {                                   
    position: absolute; right: 0; top: 0; width: 22px; height: 22px; pointer-events: none;
    background: var(--glint) 0 0 / 220px 22px no-repeat; image-rendering: pixelated;
    animation: twinkle-sm 900ms steps(10, jump-none) 1 both;
  }

.pz-start { position: absolute; inset: 8px; display: grid; place-content: center; justify-items: center; gap: 10px; background: rgba(247,243,235,.82); text-align: center; }

.pz-start[hidden] { display: none; }

.pz-start-btn { min-height: 48px; padding: 0 28px; font-weight: 700; }

.pz-tomorrow { margin: 0; font-size: var(--fs-small); color: var(--ink-700); line-height: 1.6; }

.pz-hint, .pz-capnote { margin: 0; font-size: 12px; color: var(--ink-500); text-align: center; }

.pz-hint[hidden], .pz-capnote[hidden], .pz-tomorrow[hidden], .pz-start-btn[hidden] { display: none; }

  .pz-result {
    width: 100%; max-width: 312px;
    display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px 10px; align-items: center; padding: 10px 12px;
    background: var(--cream-050);
    box-shadow: 0 0 0 2px var(--oak-900), inset 0 0 0 2px var(--brass-300), 4px 4px 0 2px rgba(79,61,48,.18);
    animation: slideup 300ms steps(3, end) both; text-align: left;
  }

.pz-result[hidden] { display: none; }

.pz-result[data-success="1"] { background: linear-gradient(var(--brass-100), var(--cream-050) 55%); box-shadow: 0 0 0 2px var(--brass-700), inset 0 0 0 2px var(--brass-300), inset 0 0 0 4px var(--brass-100), 4px 4px 0 2px rgba(79,61,48,.18); }

.pz-r-iconbox { display: grid; place-items: center; width: 52px; height: 52px; background: var(--cream-100); box-shadow: inset 0 0 0 2px var(--cream-400); }

.pz-r-icon { width: 40px; height: 40px; image-rendering: pixelated; }

.pz-r-text { display: grid; gap: 1px; min-width: 0; }

.pz-r-head { font-size: 12px; color: var(--ink-500); }

.pz-r-name { font-size: var(--fs-body); color: var(--ink-900); }

.pz-r-melon { font-family: var(--f-pixel); font-size: 14px; color: var(--ink-700); -webkit-font-smoothing: none; }

.pz-r-cap { font-size: 12px; color: var(--ink-500); }

.pz-r-cap[hidden], .pz-again[hidden], .pz-r-tomorrow[hidden] { display: none; }

.pz-again { grid-column: 1 / -1; justify-self: end; min-height: 44px; padding: 0 18px; font-weight: 700; }

.pz-r-tomorrow { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--ink-500); text-align: right; }

@keyframes slideup { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

  .puzzle-view { align-content: safe center; overflow-y: auto; scrollbar-width: none; }

  @media (max-height: 600px) {
    .puzzle-view { gap: 6px; padding-top: 44px; padding-bottom: 8px; }
    .pz-board, .pz-bar { max-width: 196px; }
    .pz-bar .pz-left { gap: 2px; }
    .pz-bar .pz-left img { width: 14px; height: 14px; }
    .pz-result { padding: 8px 10px; gap: 2px 10px; }
    .pz-result .pz-again { min-height: 44px; }
  }

@media (prefers-reduced-motion: reduce) {
    .pz-tile { transition: none; }
    .pz-tile.appear, .pz-tile.pop img, .pz-tile.goal::before, .pz-result { animation: none; }
    .pz-spark { animation: none; background-position: -44px 0; }
  }

  .door[data-mode="life"] .room-tabs [data-tab]:not([data-tab="room"]) { opacity: .4; filter: grayscale(.6); cursor: default; }

  .pantry-detail {
    width: 100%;
    display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px 12px; align-items: start;
    padding: 12px; text-align: left;
    background: var(--cream-050);
    box-shadow: 0 0 0 2px var(--oak-900), inset 0 0 0 2px var(--brass-300), inset 0 -4px 0 var(--cream-200), 4px 4px 0 2px rgba(79,61,48,.18);
  }

.pd-icon { display: grid; place-items: center; width: 56px; height: 56px; background: var(--cream-100); box-shadow: inset 0 0 0 2px var(--cream-400); }

.pd-icon img { width: 48px; height: 48px; image-rendering: pixelated; }

.pd-text { display: grid; gap: 2px; min-width: 0; }

.pd-text strong { font-size: var(--fs-body); color: var(--ink-900); }

.pd-note { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-700); }

.pd-give { grid-column: 2; justify-self: end; min-height: 44px; min-width: 112px; padding: 0 16px; font-weight: 700; }

.pd-give:disabled { filter: saturate(.4); color: var(--ink-500); }

@media (max-width: 340px) { .pantry-detail { grid-template-columns: 48px minmax(0, 1fr); } .pd-icon { width: 48px; height: 48px; } .pd-icon img { width: 32px; height: 32px; } }

  .storage-board {
    position: relative; width: 100%; padding: 10px;
    background: var(--oak-300);
    box-shadow: 0 0 0 2px var(--oak-900), inset 0 0 0 4px var(--oak-500), inset 0 0 0 6px var(--oak-700), 4px 4px 0 2px rgba(79,61,48,.18);
  }

.storage-view .bag-book {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 14px; border: 0; border-radius: 12px; cursor: pointer; text-align: left;
  background: var(--oak-300); color: #4F3D30; box-shadow: inset 0 0 0 2px var(--oak-700), inset 0 4px 0 rgba(79,61,48,.14);
}
.bag-book img { width: 36px; height: 36px; image-rendering: pixelated; flex: none; }
.bag-book-text { display: grid; gap: 1px; }
.bag-book-text small { font-size: 12px; opacity: .78; }
.storage-board[hidden] { display: none; }
.storage-board::before {                     
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(var(--brass-300), var(--brass-300)) left 0 top 0 / 10px 10px no-repeat,
      linear-gradient(var(--brass-300), var(--brass-300)) right 0 top 0 / 10px 10px no-repeat,
      linear-gradient(var(--brass-300), var(--brass-300)) left 0 bottom 0 / 10px 10px no-repeat,
      linear-gradient(var(--brass-300), var(--brass-300)) right 0 bottom 0 / 10px 10px no-repeat;
  }

.storage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 6px; }

.storage-grid .slot {                        
    background: var(--cream-100);
    box-shadow: inset 0 0 0 2px var(--oak-700), inset 0 5px 0 rgba(79,61,48,.14), inset 0 -3px 0 var(--cream-200);
  }

.storage-grid .slot[data-empty] { background: rgba(79,61,48,.12); box-shadow: inset 0 0 0 2px rgba(79,61,48,.28), inset 0 5px 0 rgba(79,61,48,.10); }

.storage-grid .slot[aria-selected="true"] { box-shadow: inset 0 0 0 3px var(--apricot-500), inset 0 5px 0 rgba(79,61,48,.10), inset 0 -4px 0 var(--apricot-100); }

.slot-placed {                               
    position: absolute; left: 3px; bottom: 3px; width: 18px; height: 18px; display: grid; place-items: center;
    background: var(--sage-100); box-shadow: inset 0 0 0 2px var(--sage-500);
  }

.slot-placed img { width: 12px; height: 12px; image-rendering: pixelated; }

.storage-detail .pd-icon { background: var(--oak-300); box-shadow: inset 0 0 0 2px var(--oak-700), inset 0 4px 0 rgba(79,61,48,.14); }

.sd-state {
    justify-self: start; margin: 1px 0 3px; padding: 1px 6px;
    font-size: 11px; line-height: 1.6; color: var(--ink-700);
    background: var(--cream-200); box-shadow: inset 0 0 0 1px var(--oak-500);
  }

.sd-state[data-placed] { background: var(--sage-100); box-shadow: inset 0 0 0 1px var(--sage-500); }

.sd-swap { margin: 2px 0 0; font-size: 12px; color: var(--ink-500); }

.sd-swap[hidden] { display: none; }

  .shop-view { align-content: safe center; overflow-y: auto; scrollbar-width: none; gap: 10px; }

.shop-awning {                               
    width: calc(100% + 12px); height: 20px; margin: 0 -6px;
    background: repeating-linear-gradient(90deg, var(--apricot-300) 0 16px, var(--cream-050) 16px 32px);
    box-shadow: inset 0 2px 0 var(--oak-900), inset 0 -2px 0 rgba(79,61,48,.25);
    -webkit-mask: radial-gradient(8px 6px at 8px 100%, transparent 98%, black) 0 0 / 16px 100%;
            mask: radial-gradient(8px 6px at 8px 100%, transparent 98%, black) 0 0 / 16px 100%;
  }

.shop-signs { width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }

.shop-sign {                                 
    position: relative; display: grid; justify-items: center; gap: 1px; min-height: 48px; padding: 5px 0 4px; border: 0; cursor: pointer;
    font: inherit; font-size: 10px; font-weight: 700; color: var(--ink-700); white-space: nowrap;
    background: var(--oak-300); box-shadow: inset 0 0 0 2px var(--oak-700), inset 0 -3px 0 var(--oak-500);
  }

.shop-sign img { width: 20px; height: 20px; image-rendering: pixelated; }

.shop-sign[aria-selected="true"] { translate: 0 -3px; color: var(--ink-900); background: var(--brass-100); box-shadow: inset 0 0 0 2px var(--brass-700), inset 0 -3px 0 var(--brass-300), 0 3px 0 var(--oak-700); }

.shop-sign[data-sec="pass"] { background: linear-gradient(var(--brass-100), var(--oak-300) 70%); }

.shop-sign:focus-visible { outline: 3px solid var(--apricot-300); outline-offset: 2px; }

.shop-info { width: 100%; margin: 0; font-size: 12px; line-height: 1.6; color: var(--ink-700); text-align: center; }

.shop-info[hidden] { display: none; }

.shop-info b { font-family: var(--f-pixel); font-size: 14px; color: var(--ink-900); -webkit-font-smoothing: none; }

.shop-info small { font-size: 11px; color: var(--ink-500); }

.shop-shelf {
    width: 100%; padding: 8px;
    background: var(--oak-300);
    box-shadow: 0 0 0 2px var(--oak-900), inset 0 0 0 4px var(--oak-500), inset 0 0 0 6px var(--oak-700), 4px 4px 0 2px rgba(79,61,48,.18);
  }

.shop-shelf[hidden] { display: none; }

.shop-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 4px; }

.shop-grid[data-kind="talk"], .shop-grid[data-kind="pack"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.goods {
    position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; min-height: 70px; padding: 6px 2px 5px; border: 0; cursor: pointer;
    font: inherit; color: var(--ink-900);
    background: var(--cream-050); box-shadow: inset 0 0 0 2px var(--oak-700), inset 0 -4px 0 var(--cream-200);
  }

.goods-pic { display: grid; place-items: center; width: 36px; height: 36px; }

.goods-pic img { width: 32px; height: 32px; image-rendering: pixelated; }

.goods[data-kind="pack"] { min-height: 112px; padding-top: 8px; }

.goods[data-kind="pack"] .goods-pic, .goods[data-kind="talk"] .goods-pic { width: 52px; height: 52px; }

.goods[data-kind="pack"] .goods-pic img, .goods[data-kind="talk"] .goods-pic img { width: 48px; height: 48px; }

.goods-name { font-size: 11px; color: var(--ink-700); }

  .goods[data-id="pack-s"] { background: var(--cream-050); }

.goods[data-id="pack-m"] { background: var(--cream-100); box-shadow: inset 0 0 0 2px var(--oak-700), inset 0 0 0 4px var(--cream-300), inset 0 -4px 0 var(--cream-200); }

.goods[data-id="pack-l"] { background: linear-gradient(var(--cream-050), var(--cream-200)); box-shadow: inset 0 0 0 2px var(--oak-900), inset 0 0 0 4px var(--oak-300), inset 0 -4px 0 var(--oak-300); }

.goods[data-id="pack-xl"] { background: linear-gradient(var(--brass-100), var(--cream-050) 60%); box-shadow: inset 0 0 0 2px var(--brass-700), inset 0 0 0 4px var(--brass-300), inset 0 0 0 6px var(--brass-100), inset 0 -4px 0 var(--brass-300); }

.goods[data-rarity="5"] { box-shadow: inset 0 0 0 2px var(--brass-700), inset 0 0 0 4px var(--brass-300), inset 0 -4px 0 var(--brass-100); }

.goods[aria-selected="true"] { box-shadow: inset 0 0 0 3px var(--apricot-500), inset 0 -4px 0 var(--apricot-100); }

.goods[aria-selected="true"]::before {       
    content: ""; position: absolute; left: -7px; top: 18px; width: 6px; height: 9px;
    background: var(--ink-900); clip-path: polygon(0 0, 100% 50%, 0 100%); animation: glint 900ms steps(1, end) infinite;
  }

.goods[data-owned] .goods-pic img { opacity: .55; }

.goods .slot-count { top: 3px; right: 4px; bottom: auto; }

  .goods:focus-visible { outline: 3px solid var(--apricot-300); outline-offset: 2px; }

  .price { display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px 1px 2px; background: var(--brass-100); box-shadow: inset 0 0 0 1px var(--brass-700); }

.price img { width: 14px; height: 14px; image-rendering: pixelated; }

.price b { font-family: var(--f-pixel); font-size: 13px; line-height: 1; color: var(--ink-900); -webkit-font-smoothing: none; }

.goods-amount { font-family: var(--f-pixel); font-size: 13px; color: var(--ink-900); -webkit-font-smoothing: none; }

.goods-yen { padding: 1px 6px; font-size: 12px; font-weight: 700; color: var(--ink-900); background: var(--cream-200); box-shadow: inset 0 0 0 1px var(--oak-500); }

.goods-free { padding: 1px 5px; font-size: 10px; white-space: nowrap; color: var(--ink-700); background: var(--sage-100); box-shadow: inset 0 0 0 1px var(--sage-500); }

.goods-owned { padding: 1px 3px; font-size: 9px; line-height: 1.4; color: var(--ink-700); background: var(--sage-100); box-shadow: inset 0 0 0 1px var(--sage-500); text-align: center; }

.shop-detail { grid-template-columns: 56px minmax(0, 1fr); }

.shop-detail[hidden] { display: none; }

.shd-icon { width: 48px; height: 48px; image-rendering: pixelated; }

.shd-name { font-size: var(--fs-body); color: var(--ink-900); }

.shd-note { margin: 0; }

.shd-price { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin: 2px 0; }

.shd-state { justify-self: start; margin-top: 2px; padding: 1px 6px; font-size: 11px; color: var(--ink-700); background: var(--sage-100); box-shadow: inset 0 0 0 1px var(--sage-500); }

.shd-state[hidden] { display: none; }

.shd-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.shd-actions .shd-buy, .shd-actions .shd-alt { min-height: 44px; padding: 0 14px; font-weight: 700; }

.shd-actions .shd-buy:disabled { filter: saturate(.4); color: var(--ink-500); cursor: default; }

.shd-alt[hidden], .shd-buy[hidden] { display: none; }

  .shop-pass {
    width: 100%; display: grid; gap: 10px; padding: 14px; text-align: left;
    background: linear-gradient(var(--brass-100), var(--cream-050) 45%);
    box-shadow: 0 0 0 2px var(--brass-700), inset 0 0 0 2px var(--brass-300), inset 0 0 0 4px var(--cream-050), 4px 4px 0 2px rgba(79,61,48,.18);
  }

.shop-pass[hidden] { display: none; }

.pass-head { display: flex; align-items: center; gap: 12px; }

.pass-pic, .pass-day, .pass-free, .pass-melon, .pass-next { font-variant-numeric: tabular-nums; }

.pass-head img { width: 64px; height: 64px; image-rendering: pixelated; }

.pass-head div { display: grid; }

.pass-head strong { font-size: var(--fs-body); color: var(--ink-900); }

.pass-price { font-size: 18px; font-weight: 700; color: var(--ink-900); }

.pass-price small { font-size: 12px; color: var(--ink-700); }

.pass-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }

.pass-list li { position: relative; padding-left: 16px; font-size: 13px; line-height: 1.6; color: var(--ink-900); }

.pass-list li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 7px; height: 7px; background: var(--apricot-500); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

.pass-list b { font-family: var(--f-pixel); font-size: 15px; -webkit-font-smoothing: none; }

.pass-list small { font-size: 11px; color: var(--ink-500); }

.pass-note { margin: 0; text-align: center; font-size: 12px; color: var(--ink-500); }

.pass-buy { justify-self: stretch; min-height: 48px; font-weight: 700; }

.pass-buy[hidden], .pass-on[hidden] { display: none; }

.pass-on { display: grid; justify-items: center; gap: 4px; }

.pass-on small { font-size: 11px; color: var(--ink-500); text-align: center; }

  .member-card {
    position: relative; width: 100%; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; text-align: left;
    background: var(--cream-050); box-shadow: inset 0 0 0 2px var(--brass-700), inset 0 0 0 4px var(--brass-100), inset 0 -4px 0 var(--brass-300);
  }

.mc-pic { width: 56px; height: 56px; image-rendering: pixelated; }

.mc-text { display: grid; gap: 1px; min-width: 0; }

.mc-title { font-size: 12px; font-weight: 700; color: var(--ink-900); letter-spacing: .05em; }

.mc-line { font-size: 12px; color: var(--ink-700); }

.mc-line b { font-family: var(--f-pixel); font-size: 13px; color: var(--ink-900); -webkit-font-smoothing: none; }

.mc-no, .mc-joined, .mc-days { font-variant-numeric: tabular-nums; }

.mc-badge { position: absolute; right: 8px; top: -9px; padding: 1px 8px; font-size: 10px; font-weight: 700; color: var(--ink-900); background: var(--apricot-100); box-shadow: inset 0 0 0 1px var(--apricot-500); }

.mc-badge[hidden] { display: none; }

.pass-chip { padding: 3px 10px; font-size: 13px; font-weight: 700; color: var(--ink-900); background: var(--brass-100); box-shadow: inset 0 0 0 2px var(--brass-700); }

  .sh-passmark { display: none; width: 18px; height: 18px; margin-left: 2px; image-rendering: pixelated; }

.shop-view[data-sub="1"] .sh-passmark { display: inline-block; }

  .shop-sheet { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; padding: 24px; background: rgba(247,243,235,.82); }

.shop-sheet[hidden] { display: none; }

.sheet-card {
    width: min(100%, 300px); display: grid; justify-items: center; gap: 8px; padding: 16px 14px 14px; text-align: center;
    background: var(--cream-050); box-shadow: 0 0 0 2px var(--oak-900), inset 0 0 0 2px var(--brass-300), inset 0 -4px 0 var(--cream-200), 4px 4px 0 2px rgba(79,61,48,.18);
  }

.sheet-icon { width: 48px; height: 48px; image-rendering: pixelated; }

.sheet-icon[hidden] { display: none; }

.sheet-title { margin: 0; font-size: var(--fs-body); font-weight: 700; color: var(--ink-900); line-height: 1.5; }

.sheet-body { margin: 0; font-size: 13px; line-height: 1.7; color: var(--ink-700); }

.sheet-body small { font-size: 11px; color: var(--ink-500); }

.sheet-yen { font-size: 18px; font-weight: 700; color: var(--ink-900); }

.sheet-arrow { font-size: 12px; color: var(--ink-500); }

.sheet-btns { display: flex; gap: 10px; margin-top: 4px; }

.sheet-btns .sheet-no, .sheet-btns .sheet-ok { min-height: 44px; padding: 0 14px; font-weight: 700; white-space: nowrap; }

.shop-view[data-release="1"] .shop-signs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }

  
  .shop-pass { gap: 12px; }

.pass-lead { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; text-align: center; font-size: 13.5px; line-height: 1.6; color: var(--ink-700); }

.pass-face { width: 32px; height: auto; flex: none; image-rendering: auto; }

.pass-trial { justify-self: center; margin: -2px 0 0; padding: 3px 12px; font-size: 12.5px; font-weight: 700; color: var(--ink-900); background: var(--sage-100); box-shadow: inset 0 0 0 2px var(--sage-500); white-space: nowrap; }

.pass-trial[hidden] { display: none; }

.pass-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.pp { position: relative; min-width: 0; display: grid; align-content: start; gap: 8px; padding: 12px 10px 10px; background: var(--cream-050); box-shadow: inset 0 0 0 2px var(--brass-700), inset 0 0 0 4px var(--brass-100); }

.pp[data-current] { box-shadow: inset 0 0 0 3px var(--apricot-500), inset 0 0 0 5px var(--apricot-100); }

.pp-name { display: flex; align-items: flex-start; gap: 6px; min-height: 2.6em; font-family: var(--f-title); font-weight: 700; font-size: 14.5px; line-height: 1.3; letter-spacing: .04em; color: var(--ink-900); }

.pp-name > img { width: 20px; height: 20px; flex: none; image-rendering: pixelated; }

.pp-price { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid color-mix(in srgb, var(--brass-700) 45%, transparent); }

.pp-price b { font-family: var(--f-title); font-weight: 700; font-size: 24px; line-height: 1; color: var(--ink-900); font-variant-numeric: lining-nums tabular-nums; -webkit-font-smoothing: antialiased; }

.pp-price .yen { font-size: .56em; font-weight: 500; margin-right: .06em; vertical-align: .42em; }

.pp-price small { font-size: 10.5px; letter-spacing: .12em; color: var(--ink-500); }

.pp-rows { margin: 0; display: grid; }

.pp-rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; padding: 5px 1px; border-bottom: 1px dotted var(--oak-300); }

.pp-rows div:last-child { border-bottom: 0; }

.pp-rows dt { font-size: 10.5px; letter-spacing: .08em; color: var(--ink-500); white-space: nowrap; }

.pp-rows dd { margin: 0; display: flex; align-items: baseline; gap: 2px; font-size: 11.5px; white-space: nowrap; color: var(--ink-900); }

.pp-rows dd b { font-family: var(--f-title); font-weight: 700; font-size: 16px; font-variant-numeric: lining-nums tabular-nums; -webkit-font-smoothing: antialiased; }

.pp-rows dd img { width: 14px; height: 14px; align-self: center; image-rendering: pixelated; }

.pp-now { justify-self: start; padding: 1px 8px; font-size: 10.5px; font-weight: 700; color: var(--ink-900); background: var(--apricot-100); box-shadow: inset 0 0 0 1px var(--apricot-700); }

.pass-note { font-size: 12px; letter-spacing: .02em; }

.pass-manage { min-height: 40px; padding: 0 14px; font-size: 13px; }

.shop-pass, .pass-plans, .pass-lead { min-width: 0; max-width: 100%; }

@media (max-width: 360px) { .pass-lead { font-size: 12.5px; } .pass-lead .nw { display: inline; white-space: normal; } .pp { padding: 10px 7px 8px; } .pp-price b { font-size: 21px; } .pp-rows dd { font-size: 10.5px; } .pp-rows dd b { font-size: 14.5px; } .pp-rows dt { letter-spacing: .02em; } .pp-name { font-size: 13.5px; } }

.nw { display: inline-block; white-space: nowrap; }

.shop-toast {
    position: fixed; left: 50%; top: calc(84px + env(safe-area-inset-top, 0px)); translate: -50% 0; z-index: 7;    margin: 0; padding: 8px 14px;
    font-size: 13px; font-weight: 700; color: var(--ink-900); white-space: nowrap;
    background: var(--cream-050); box-shadow: 0 0 0 2px var(--oak-900), inset 0 -3px 0 var(--sage-100), 4px 4px 0 2px rgba(79,61,48,.18);
    animation: slideup 300ms steps(3, end) both;
  }

.shop-toast[hidden] { display: none; }

@media (max-height: 600px) { .shop-view { gap: 6px; } .goods { min-height: 62px; } .goods[data-kind="pack"] { min-height: 100px; } .shop-awning { height: 14px; } }

@media (max-width: 340px) { .shop-sign { font-size: 9px; } .goods-owned { font-size: 8px; } }

@media (prefers-reduced-motion: reduce) { .goods[aria-selected="true"]::before { animation: none; } .shop-toast { animation: none; } }

/* omoide-up.js set each photo's tilt in a style attribute, which the app CSP refuses; same values by position. */
.om-strip .om-cheki:nth-child(5n+1) { --tilt: -2.5deg; }
.om-strip .om-cheki:nth-child(5n+2) { --tilt: 1.8deg; }
.om-strip .om-cheki:nth-child(5n+3) { --tilt: -1.2deg; }
.om-strip .om-cheki:nth-child(5n+4) { --tilt: 2.4deg; }
.om-strip .om-cheki:nth-child(5n) { --tilt: -1.8deg; }
/* The tabs belong to the room only — never on the login door or the name form. */
.door:not([data-stage="room"]) .room-tabs { display: none; }

.pantry-empty { align-self: center; margin: 0; padding: 10px 14px; text-align: center; font-size: 13px; line-height: 1.6; color: var(--oak-900); background: #fbf5e7; border: 2px solid var(--oak-900); border-radius: 8px; }
[data-no-week] .om-cover-week { display: none; }
[data-no-share] .om-share-btn { display: none; }

/* まめの しゃしん: today's photo waits in the room, not yet developed (photo-view.mjs). */
.photo-peek {
  position: absolute; z-index: 3; right: 16px; bottom: calc(100% + 54px); width: 72px; padding: 5px 5px 2px; border: 0; background: #FFFEFA; rotate: 5deg;
  box-shadow: 0 0 0 1px rgba(79, 61, 48, .1), 3px 8px 14px rgba(79, 61, 48, .34);
  animation: peek-in .6s cubic-bezier(.2, 1.3, .4, 1) both, peek-breathe 3.6s 1s ease-in-out infinite;
}
.door[data-mode="talk"] .photo-peek { bottom: calc(100% + 88px); }
.photo-peek[hidden], .door.kb .photo-peek, .door[data-reply] .photo-peek, .door:not([data-view="room"]) .photo-peek { display: none; }
.pk-film { display: block; aspect-ratio: 3 / 4; background: linear-gradient(160deg, #d9cfc1, #bdb0a0 55%, #cfc3b3); }
.pk-name { display: block; padding: 4px 0 3px; font: 600 11.5px/1 var(--f-hand); color: var(--ink-700); text-align: center; }
@keyframes peek-in { from { translate: 110px 26px; rotate: 22deg; } }
@keyframes peek-breathe { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }

.photo-viewer { position: absolute; inset: 0; z-index: 40; display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 8px; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(18px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; background: var(--cream-100); }
.photo-viewer[hidden] { display: none; }
.pv-stage { display: grid; align-content: center; justify-items: center; gap: 8px; width: 100%; min-height: 0; }
.photo-viewer .om-photo { width: min(82%, 300px, 52dvh); margin: 8px auto 2px; rotate: -1.5deg; animation: pv-in .42s cubic-bezier(.2, 1.1, .4, 1) both; }
.photo-viewer .om-ph { aspect-ratio: 3 / 4; background: linear-gradient(160deg, #d9cfc1, #bdb0a0 55%, #cfc3b3); }
.photo-viewer .om-photo .om-cap { min-height: 1.5em; font-size: 17px; padding: 9px 4px 12px; }
.photo-viewer .om-ph .om-date { font-size: 13px; }
.photo-viewer .om-photo.develop img { animation: om-develop 2.4s .15s ease-out both; }
@keyframes pv-in { from { translate: 70px 170px; rotate: 11deg; scale: .32; } }
.pv-keep { width: 100%; max-width: 330px; min-height: 50px; border: 0; border-radius: 12px; background: var(--oak-300); box-shadow: inset 0 0 0 2px var(--oak-700), inset 0 -4px 0 rgba(79, 61, 48, .18); font: 700 16px/1 var(--f-body); color: #4F3D30; }
.pv-keep:disabled { opacity: .5; }
.om-voice { display: flex; align-items: center; gap: 7px; min-height: 40px; margin: 8px auto 2px; padding: 0 14px; border: 0; border-radius: 20px; background: var(--cream-200); box-shadow: inset 0 0 0 1.5px var(--oak-300); font: 600 13px/1 var(--f-hand); color: var(--ink-700); }
.om-voice[hidden] { display: none; }
.om-voice .wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.om-voice .wave i { display: block; width: 3px; height: 6px; border-radius: 2px; background: var(--akane); }
.om-voice[data-on] .wave i { animation: pv-wave .7s ease-in-out infinite alternate; }
.om-voice[data-on] .wave i:nth-child(2) { animation-delay: .15s; }
.om-voice[data-on] .wave i:nth-child(3) { animation-delay: .3s; }
@keyframes pv-wave { to { height: 14px; } }
.om-dnote { margin: 6px 0 0; font-size: 12px; color: var(--ink-500); }
[data-tab].got img { animation: tab-got .7s ease-in-out; }
@keyframes tab-got { 0%, 100% { rotate: 0deg; scale: 1; } 20% { rotate: -14deg; scale: 1.26; } 50% { rotate: 11deg; scale: 1.18; } 75% { rotate: -6deg; } }
@media (prefers-reduced-motion: reduce) {
  .photo-peek, .photo-viewer .om-photo, [data-tab].got img { animation: none; }
  .photo-viewer .om-photo.develop img, .om-photo.develop .om-date { animation: none; }
}

/* 「📷 画像にする」 (2026-11-15): a quiet second button under the photo, and the sheet that shows the card you will get */
.pv-share { min-height: 40px; margin: 0 auto 10px; padding: 0 18px; border: 0; border-radius: 20px; background: var(--cream-050, #fffaf0); box-shadow: inset 0 0 0 1.5px var(--oak-300); font: 700 14px/1 var(--f-body); color: #4F3D30; }
.pv-share[hidden] { display: none; }
/* the plaza card's language (2026-11-15 design pass): a dimmed backdrop, the card with a ✕ on its corner, one main button */
.share-sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px 20px max(24px, env(safe-area-inset-bottom)); background: rgba(40, 30, 22, .64); }
.share-sheet[hidden] { display: none; }
.share-card { display: grid; justify-items: center; gap: 18px; }
.share-frame { position: relative; }
.share-pic { display: block; width: auto; height: min(64dvh, 620px); aspect-ratio: 9 / 16; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.share-x { position: absolute; top: -15px; right: -15px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #FFFDF8; box-shadow: 0 2px 8px rgba(0, 0, 0, .28), inset 0 0 0 1.5px var(--oak-300); font: 400 16px/1 var(--f-body); color: #6b5444; }
.share-help { margin: 0; font: 500 13px/1.6 var(--f-body); color: #FFFAF0; text-align: center; }
.share-help[hidden] { display: none; }
.share-go { min-width: min(64vw, 250px); min-height: 50px; padding: 0 28px; border: 0; border-radius: 25px; background: var(--apricot-500, #cf6f43); box-shadow: 0 4px 12px rgba(0, 0, 0, .2); font: 700 16px/1 var(--f-body); color: #fff; }
