.upgrade-wallet {
  margin: -3px 0 9px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #e9f7f0;
  color: #466b5b;
  font: 800 9px ui-monospace;
}
.upgrade-wallet b { color: #246d55; }
.restaurant-upgrade {
  width: 100%;
  margin-bottom: 10px;
  background: #d47743 !important;
  box-shadow: 0 3px 0 #9d4e2d;
}
.debug-drawer button {
  width: 100%;
  border: 1px solid #76d7ab;
  border-radius: 7px;
  padding: 8px;
  background: #265a45;
  color: #e5fff0;
  font: 800 9px ui-monospace;
  cursor: pointer;
}
.room-switcher{display:grid;grid-template-columns:1fr 1fr 150px;gap:8px;padding:8px;background:#182b3a;border-inline:4px solid #513732}.room-switcher button{display:grid;gap:2px;min-width:0;padding:8px 10px;border:2px solid #6e5360;border-radius:10px;background:linear-gradient(145deg,#3a2c48,#27283d);color:#f8e9e1;text-align:left;cursor:pointer}.room-switcher button span{color:#f2aa76;font:900 7px ui-monospace;letter-spacing:1px}.room-switcher button b{font-size:11px}.room-switcher button small{color:#c9b8c7;font-size:7px}.room-switcher button.active{border-color:#ffd074;background:linear-gradient(145deg,#87506c,#42354f);box-shadow:inset 0 0 0 1px #fff4b966}.room-switcher button.locked{filter:saturate(.35);opacity:.68}.room-switcher #camera-follow{background:linear-gradient(145deg,#235d65,#263849)}.room-switcher #camera-follow.follow-active{border-color:#75ded0;box-shadow:inset 0 0 0 1px #9fffe355}.room-level-summary{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:10px 0}.room-level-summary article{padding:9px;border:1px solid #cfae91;border-radius:9px;background:#fff8e9}.room-level-summary span,.room-level-summary b,.room-level-summary small{display:block}.room-level-summary span{color:#b15e61;font:900 7px ui-monospace;letter-spacing:.7px}.room-level-summary b{margin:3px 0;color:#5d4135;font-size:9px}.room-level-summary small{color:#8d725f;font-size:7px}.room-level-summary article.locked{filter:grayscale(.55);opacity:.65}.resource-sources{display:grid;gap:3px;padding:9px;border-radius:9px;background:#eaf3fb;color:#425e75}.resource-sources b{font-size:9px}.resource-sources small{font-size:7px;line-height:1.4}
.roster-v3 button.staff-card{width:100%;font:inherit;text-align:left;cursor:pointer}.roster-v3 button.staff-card.selected{border-color:#4bbca0;background:#edfff8;box-shadow:inset 0 0 0 1px #72d5bd,0 2px 0 #9bcabf}.roster-v3 button.staff-card.selected:after{content:"CAM";padding:2px 4px;border-radius:4px;background:#4aa88f;color:white;font:900 6px ui-monospace}
.quick-demo .full-test-room2{background:linear-gradient(135deg,#653c8e,#bd5f8f);border-color:#f0bb68;color:#fff6df;box-shadow:0 0 0 2px #6b315f33,0 3px 0 #572747;font-weight:1000}.quick-demo .full-test-room2.active{background:linear-gradient(135deg,#247c72,#4daf85);border-color:#8bf1c6;box-shadow:0 3px 0 #1b5a51}
.staff-gacha-banner .gacha-actions{grid-template-columns:1fr}.staff-gacha-banner .gacha-actions button{width:100%;min-height:48px;font-size:12px!important}.gacha-reveal{width:min(760px,92vw)!important}.gacha-result-layout{grid-template-columns:minmax(230px,290px) minmax(260px,1fr)!important;justify-content:center}.gacha-results.single .gacha-result-card{flex-basis:230px}.gacha-results.single .gacha-card-art{height:230px}
.room-upgrade-box{margin-bottom:13px;padding:10px;border:2px solid #d8a358;border-radius:12px;background:linear-gradient(145deg,#fff8df,#f5e0bd);box-shadow:0 4px 0 #bd8758}.room-upgrade-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.room-upgrade-head span{display:block;color:#c2603e;font:900 7px ui-monospace;letter-spacing:1px}.room-upgrade-head h3{margin:2px 0 0;color:#52382d;font-size:13px}.room-upgrade-head>b{padding:5px 8px;border-radius:7px;background:#65405b;color:#ffe4a1;font:1000 10px ui-monospace}.room-upgrade-box>p{margin:6px 0 8px;color:#806451;font-size:8px}.room-upgrade-list{display:grid;gap:6px}.room-upgrade-item{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:7px;padding:7px;border:1px solid #dfc09a;border-radius:9px;background:#fffaf0}.room-upgrade-item>span{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:#dcebe4;color:#32775f;font-size:17px}.room-upgrade-item b,.room-upgrade-item small{display:block}.room-upgrade-item b{color:#5d4032;font-size:9px}.room-upgrade-item small{margin-top:2px;color:#927461;font-size:7px;line-height:1.25}.room-upgrade-item button,.room-upgrade-reset{border:0;border-radius:7px;padding:7px;background:#4ba180;color:#fff;font:900 7px ui-monospace;box-shadow:0 2px 0 #2c6b57;cursor:pointer}.room-upgrade-item.is-upgraded{border-color:#6fb493;background:#effbf4}.room-upgrade-item.is-upgraded>span{background:#8fd1b4}.room-upgrade-item button:disabled{background:#9aac9f;box-shadow:none;cursor:default}.room-upgrade-reset{width:100%;margin-top:7px;background:#7c7188;box-shadow:0 2px 0 #554b61}.room-upgrade-note{display:block;margin-top:7px;color:#9a704d;font:800 7px/1.35 ui-monospace}

/* Readability pass: avoid 7–9px copy in the management UI. */
.v3-integrated .demo-layout{grid-template-columns:270px minmax(680px,1fr) 370px}
.v3-integrated .control-tabs button{font-size:11px;line-height:1.2}
.v3-integrated .control-note,.v3-integrated .empty-state{font-size:12px;line-height:1.55}
.room-switcher button span{font-size:9px}.room-switcher button b{font-size:13px}.room-switcher button small{font-size:9px;line-height:1.35}
.roster-v3 .staff-card b{font-size:12px}.roster-v3 .staff-card small{font-size:10px}.roster-v3 .staff-card em{font-size:11px}
.job-list-v3 .job b{font-size:12px}.job-list-v3 .job small{font-size:10px;line-height:1.4}
.decor-shop-head span{font-size:9px}.decor-shop-head h2{font-size:19px}.decor-shop-head>b{font-size:9px}
.decor-divider{font-size:9px}.decor-drag-help{font-size:10px;line-height:1.5}
.table-shop-head{font-size:11px}.table-shop-head button{font-size:9px}
.table-shop-info strong{font-size:12px}.table-shop-info small{font-size:9px;line-height:1.4}.table-shop-info span{font-size:9px;line-height:1.4}.table-shop-actions button{font-size:9px}
.decor-shop-card span{font-size:9px}.decor-shop-card b{font-size:12px}.decor-shop-card small{font-size:9px;line-height:1.45}.decor-shop-card button{font-size:9px;line-height:1.25}
.upgrade-level-cost{font-size:11px;line-height:1.45}.upgrade-wallet{font-size:10px}.upgrade-price-note{font-size:9px;line-height:1.55}.resource-sources b{font-size:11px}.resource-sources small{font-size:9px;line-height:1.5}
.room-level-summary span{font-size:9px}.room-level-summary b{font-size:11px}.room-level-summary small{font-size:9px;line-height:1.4}
.room-upgrade-head span{font-size:9px}.room-upgrade-head h3{font-size:16px}.room-upgrade-head>b{font-size:12px}.room-upgrade-box>p{font-size:10px;line-height:1.45}
.room-upgrade-item{grid-template-columns:38px minmax(0,1fr) auto;padding:9px;gap:9px}.room-upgrade-item>span{width:36px;height:36px;font-size:20px}.room-upgrade-item b{font-size:12px}.room-upgrade-item small{font-size:9px;line-height:1.45}.room-upgrade-item button,.room-upgrade-reset{font-size:9px;padding:8px}.room-upgrade-note{font-size:9px;line-height:1.5}
.staff-slot-row b{font-size:12px}.staff-slot-row small{font-size:9px;line-height:1.4}.staff-slot-row button{font-size:9px}
.assignment-grid .assignment{font-size:10px}.assignment-grid .assignment select{font-size:10px}
.gacha-collection{font-size:10px}.staff-codex-card b{font-size:10px}.staff-codex-card small{font-size:8px}.staff-codex-card em{font-size:8px}
@media(max-width:1350px){.v3-integrated .demo-layout{grid-template-columns:230px minmax(620px,1fr) 330px}}
.v3-integrated .day-dashboard span{font-size:10px}.v3-integrated .day-dashboard b{font-size:18px}.v3-integrated .trend-chip b{font-size:15px}.v3-integrated .meter-chip b{font-size:13px}
.v3-integrated .phase-tabs button b{font-size:13px}.v3-integrated .phase-tabs button small{font-size:10px;line-height:1.3}
.v3-integrated .tiny-label{font-size:10px}.v3-integrated .phase-brief p{font-size:13px;line-height:1.55}.v3-integrated .objective-row,.v3-integrated .objective-list div{font-size:12px;line-height:1.4}
.v3-integrated .section-heading h2{font-size:16px}.v3-integrated .shift-stats dt{font-size:9px}.v3-integrated .shift-stats dd{font-size:16px}.v3-integrated .timer-badge{font-size:9px}
.v3-integrated .stage-topline{font-size:10px}.v3-integrated .stage-topline b{font-size:13px}.v3-integrated .stage-scale button{font-size:10px}
.v3-integrated .event-ticker{font-size:11px}.v3-integrated .event-ticker b{font-size:9px}
.v3-integrated .senti-dock button b{font-size:10px}.v3-integrated .senti-dock button small{font-size:8px;line-height:1.35}
.v3-integrated .quick-demo>div b{font-size:13px}.v3-integrated .quick-demo button{font-size:9px;padding:8px 10px}

/* Staff panel: the old demo used a 3-column banner grid, so reset it for V3. */
.staff-gacha-banner{grid-template-columns:minmax(0,1fr)!important;align-items:stretch!important}
.staff-gacha-banner>*{grid-column:1;min-width:0}
.staff-gacha-banner .gacha-head strong{font-size:20px;line-height:1.08}
.staff-gacha-banner .gacha-vat{margin:8px auto 5px}
.staff-gacha-banner .gacha-rates{grid-template-columns:repeat(4,minmax(0,1fr))}
.staff-gacha-banner .gacha-rates span{font-size:9px;padding:5px 2px}
.staff-gacha-banner .gacha-pity span{font-size:9px}
.staff-gacha-banner .gacha-demo-note{font-size:9px!important;line-height:1.45}

/* Recipe research: progression follows the V3 document without inventing upgrade prices. */
.recipe-book-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:11px 12px;border:2px solid #8b5d45;border-radius:11px;background:linear-gradient(135deg,#fff3d4,#f7d7b5);box-shadow:0 4px 0 #b98a64;color:#57392d}.recipe-book-head span{display:block;color:#a45a35;font:1000 8px ui-monospace;letter-spacing:1.2px}.recipe-book-head h2{margin:3px 0 0;font-size:18px}.recipe-book-head>b{padding:7px 9px;border-radius:8px;background:#53314f;color:#ffe18e;font:1000 12px ui-monospace}.recipe-note{margin:10px 2px!important;font-size:10px!important}.recipe-lab{padding:10px;border:2px solid #6c9c86;border-radius:12px;background:#effbf4;box-shadow:0 4px 0 #82ae99}.recipe-lab-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.recipe-lab-title span,.recipe-card span{display:block;color:#32836c;font:1000 7px ui-monospace;letter-spacing:.8px}.recipe-lab-title b{display:block;margin-top:2px;color:#49362e;font-size:13px}.recipe-lab-title small{padding:5px 7px;border-radius:6px;background:#347e6a;color:#fff;font:900 8px ui-monospace}.recipe-ingredient-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:8px;max-height:142px;overflow:auto}.recipe-ingredient-grid button{display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;padding:6px;border:1px solid #b7d0c3;border-radius:7px;background:#fffaf0;color:#5a4639;text-align:left;cursor:pointer}.recipe-ingredient-grid button span{overflow:hidden;font-size:8px;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.recipe-ingredient-grid button b{flex:none;color:#8b7567;font-size:7px}.recipe-ingredient-grid button.is-selected{border-color:#dd7547;background:#ffe4ca;box-shadow:inset 0 0 0 1px #dd7547}.recipe-lab>p{min-height:28px;margin:8px 0 0;color:#6e5d51;font-size:9px;line-height:1.45}.recipe-lab-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:7px}.recipe-lab-actions button,.recipe-card button{border:0;border-radius:7px;padding:7px;background:#4a9b7d;color:#fff;font:1000 8px ui-monospace;box-shadow:0 2px 0 #286b57;cursor:pointer}.recipe-lab-actions button:first-child{background:#a29388;box-shadow:0 2px 0 #6f625a}.recipe-lab-actions button:disabled{opacity:.45;box-shadow:none;cursor:default}.recipe-lab-actions .recipe-test{grid-column:1/-1;background:#6b4a8a;box-shadow:0 2px 0 #402b56}.recipe-book-grid{display:grid;gap:7px;max-height:345px;padding-right:3px;overflow:auto}.recipe-card{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:8px;min-width:0;padding:7px;border:2px solid #dfc6aa;border-radius:9px;background:#fff9ed;color:#553e31}.recipe-card-art{position:relative}.recipe-card-art img{display:block;width:56px;height:56px;object-fit:cover;border:2px solid #fff;border-radius:11px;box-shadow:0 2px 0 #c49a72}.recipe-card-art em{position:absolute;left:3px;bottom:2px;padding:2px 3px;border-radius:4px;background:#36263dd9;color:#ffe174;font:900 7px ui-monospace}.recipe-card b,.recipe-card small,.recipe-card strong{display:block}.recipe-card b{margin-top:2px;overflow:hidden;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.recipe-card small{margin-top:2px;color:#8d7566;font-size:8px;line-height:1.3}.recipe-card strong{margin-top:4px;color:#367c67;font-size:8px}.recipe-card button{width:100%;margin-top:5px;background:#8a58b1;box-shadow:0 2px 0 #55326f}.recipe-card.is-locked{border-style:dashed;background:#eee8df;color:#766b63}.recipe-card.is-locked .recipe-card-art img{filter:grayscale(1) brightness(.45);opacity:.65}.recipe-card.has-fragment{border-style:solid;border-color:#b777dd;background:#f7ecff;box-shadow:0 0 12px #bd7ee966}.recipe-card.has-fragment .recipe-card-art img{filter:none;opacity:1}.recipe-card.is-unlocked{border-color:#6fb296;background:#effcf4}.recipe-card.is-unlocked .recipe-card-art img{box-shadow:0 2px 0 #4b8b71,0 0 10px #73c39a66}

/* Full-screen pressure-pot summon sequence before the employee card is revealed. */
.gacha-summon-stage[hidden],.gacha-reveal[hidden]{display:none!important}.gacha-summon-stage{--summon:#cbd5e1;--summon2:#64748b;position:relative;width:min(560px,88vw);height:min(620px,82vh);overflow:hidden;border:3px solid var(--summon);border-radius:26px;background:radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--summon) 48%,transparent) 0,transparent 34%),linear-gradient(180deg,#171426,#080711);box-shadow:0 0 80px color-mix(in srgb,var(--summon) 75%,transparent),inset 0 0 50px #000;color:#fff;text-align:center}.gacha-summon-stage.summon-rank-S{--summon:#62ddff;--summon2:#176b8c}.gacha-summon-stage.summon-rank-SR{--summon:#bb8cff;--summon2:#6840a1}.gacha-summon-stage.summon-rank-SSR{--summon:#ffd56f;--summon2:#e051a1}.summon-rays{position:absolute;inset:-45%;background:repeating-conic-gradient(from 0deg,transparent 0 8deg,color-mix(in srgb,var(--summon) 32%,transparent) 9deg 13deg,transparent 14deg 24deg);opacity:0}.gacha-summon-stage.is-active .summon-rays{animation:summonRays 1.8s ease-out both}.summon-ring{position:absolute;left:50%;top:49%;width:70px;height:70px;border:5px solid var(--summon);border-radius:50%;opacity:0;transform:translate(-50%,-50%)}.ring-two{animation-delay:.25s!important}.gacha-summon-stage.is-active .summon-ring{animation:summonRing 1.15s .38s ease-out both}.summon-pot{position:absolute;left:50%;top:46%;z-index:3;width:178px;height:130px;transform:translate(-50%,-50%);border:7px solid #2c1a35;border-radius:48% 48% 30% 30%;background:linear-gradient(#ffd374,#ee7459 60%,#812f63);box-shadow:inset 0 0 0 6px #ffe3ab,0 13px 0 #190f21,0 0 35px var(--summon)}.summon-pot:before,.summon-pot:after{content:"";position:absolute;top:35px;width:38px;height:55px;border:6px solid #2c1a35;background:#d96f61}.summon-pot:before{left:-42px;border-radius:16px 0 0 16px}.summon-pot:after{right:-42px;border-radius:0 16px 16px 0}.summon-pot>span{position:absolute;left:53px;top:27px;display:grid;width:64px;height:60px;place-items:center;border:5px solid #2c1a35;border-radius:50%;background:radial-gradient(circle at 38% 30%,#fff 0 6%,var(--summon) 9% 32%,#24415d 36%);font:1000 34px system-ui;text-shadow:0 3px #000}.summon-pot>b{position:absolute;left:18px;top:-29px;width:128px;height:27px;border:6px solid #2c1a35;border-radius:50%;background:#f2a05e;transform-origin:88% 70%}.gacha-summon-stage.is-active .summon-pot{animation:summonPot 1.08s cubic-bezier(.3,.05,.55,1) both}.gacha-summon-stage.is-active .summon-pot>b{animation:summonLid .8s .74s cubic-bezier(.2,.8,.35,1) both}.summon-silhouette{position:absolute;left:50%;bottom:76px;z-index:2;width:230px;height:360px;transform:translateX(-50%) translateY(150px) scale(.35);background-position:center top;background-repeat:no-repeat;background-size:cover;filter:brightness(0) drop-shadow(0 0 18px var(--summon));opacity:0}.gacha-summon-stage.is-active .summon-silhouette{animation:summonHero .72s 1.02s cubic-bezier(.18,1.05,.35,1) forwards}.gacha-summon-stage>strong{position:absolute;left:0;right:0;bottom:40px;z-index:6;color:var(--summon);font:1000 27px/1 Georgia,serif;letter-spacing:2px;text-shadow:0 0 18px var(--summon),0 3px #000;opacity:0}.gacha-summon-stage>small{position:absolute;left:0;right:0;bottom:16px;z-index:6;color:#fff4d7;font:900 9px ui-monospace;letter-spacing:2px}.gacha-summon-stage.is-active>strong{animation:summonRank .42s 1.28s ease-out forwards}.gacha-summon-stage.is-active:after{content:"";position:absolute;inset:0;z-index:5;background:#fff;opacity:0;pointer-events:none;animation:summonFlash 1.8s ease-out both}@keyframes summonPot{0%,12%,24%,36%,48%{transform:translate(-50%,-50%) rotate(-4deg)}6%,18%,30%,42%,54%{transform:translate(-50%,-50%) rotate(4deg)}70%{transform:translate(-50%,-50%) scale(1.1)}100%{transform:translate(-50%,-50%) scale(.78);filter:brightness(1.4)}}@keyframes summonLid{0%{transform:none}100%{transform:translate(88px,-170px) rotate(110deg);opacity:0}}@keyframes summonRing{0%{opacity:1;transform:translate(-50%,-50%) scale(.5)}100%{opacity:0;transform:translate(-50%,-50%) scale(7)}}@keyframes summonRays{0%{opacity:0;transform:rotate(0) scale(.45)}45%{opacity:.72}100%{opacity:.22;transform:rotate(95deg) scale(1)}}@keyframes summonHero{0%{opacity:0;transform:translateX(-50%) translateY(150px) scale(.35);filter:brightness(0) drop-shadow(0 0 8px var(--summon))}58%{opacity:1;filter:brightness(0) drop-shadow(0 0 24px var(--summon))}100%{opacity:1;transform:translateX(-50%) translateY(0) scale(1);filter:brightness(.2) saturate(1.4) drop-shadow(0 0 28px var(--summon))}}@keyframes summonRank{from{opacity:0;transform:translateY(18px) scale(.75)}to{opacity:1;transform:none}}@keyframes summonFlash{0%,52%,100%{opacity:0}58%{opacity:.9}64%{opacity:0}.summon-rank-SSR &{opacity:1}}
.gacha-summon-stage.is-active:after{animation-name:summonFlashClean}@keyframes summonFlashClean{0%,52%,100%{opacity:0}58%{opacity:.9}64%{opacity:0}}
@media(max-height:720px){.gacha-summon-stage{height:88vh}.summon-silhouette{height:300px;width:195px}.summon-pot{top:43%;transform:translate(-50%,-50%) scale(.85)}}

.staff-mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0 0 11px;padding:4px;border:1px solid #d4b18e;border-radius:11px;background:#ead6bd}
.staff-mode-tabs button{min-width:0;border:0;border-radius:8px;padding:10px 5px;background:transparent;color:#72503e;font:1000 10px/1.2 ui-monospace,Consolas,monospace;cursor:pointer}
.staff-mode-tabs button.active{background:linear-gradient(145deg,#6b3d70,#a75878);color:#fff8dc;box-shadow:0 3px 0 #472c51}
.staff-mode-view[hidden]{display:none!important}

.dorm-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:12px;border:2px solid #d8995a;border-radius:12px;background:linear-gradient(145deg,#fff2cb,#f4d7ad);box-shadow:0 4px 0 #ad754f}
.dorm-head span{display:block;color:#aa4f55;font:1000 9px ui-monospace,Consolas,monospace;letter-spacing:1px}
.dorm-head h2{margin:3px 0 0;color:#4f3441;font-size:17px;line-height:1.15}
.dorm-head>b{flex:none;padding:7px 8px;border-radius:8px;background:#684268;color:#ffe6a3;font:1000 9px ui-monospace,Consolas,monospace}
.dorm-note{margin:11px 2px 9px!important}
.dorm-test-note{margin:9px 2px 0!important;padding:9px;border-radius:8px;background:#fff4d7;color:#7b5b40!important}
.staff-dorm-list{display:grid;gap:8px;max-height:600px;padding:2px 3px 4px 0;overflow:auto}
.staff-dorm-card{--dorm-rank:#cbd5e1;display:grid;grid-template-columns:74px minmax(0,1fr);grid-template-areas:"art copy" "art action";gap:6px 9px;min-width:0;padding:8px;border:2px solid var(--dorm-rank);border-radius:12px;background:linear-gradient(145deg,#fffaf0,#f3e5d4);box-shadow:0 3px 0 #c2a185}
.staff-dorm-card.rank-S{--dorm-rank:#50b6d5}.staff-dorm-card.rank-SR{--dorm-rank:#9670cf}.staff-dorm-card.rank-SSR{--dorm-rank:#e6ac42}
.staff-dorm-art{position:relative;grid-area:art;min-height:112px;border-radius:9px;background-color:#352a45;background-position:center top;background-repeat:no-repeat;background-size:cover;image-rendering:pixelated;box-shadow:inset 0 0 0 2px #ffffff45}
.staff-dorm-art em{position:absolute;left:5px;top:5px;padding:3px 5px;border-radius:5px;background:var(--dorm-rank);color:#2d2133;font:1000 9px ui-monospace,Consolas,monospace}
.staff-dorm-copy{grid-area:copy;min-width:0}
.staff-dorm-copy>span{display:block;color:#a15b58;font:900 8px ui-monospace,Consolas,monospace;text-transform:uppercase}
.staff-dorm-copy>b{display:block;margin:2px 0 4px;color:#4d3440;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.staff-dorm-copy>small{display:-webkit-box;overflow:hidden;color:#765c53;font-size:9px;line-height:1.35;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.staff-dorm-copy>p{display:flex;flex-wrap:wrap;gap:4px;margin:6px 0 0}
.staff-dorm-copy>p i,.staff-dorm-copy>p strong{padding:3px 5px;border-radius:5px;font:900 8px ui-monospace,Consolas,monospace}
.staff-dorm-copy>p i{background:#f5deb0;color:#8a552e;font-style:normal}.staff-dorm-copy>p strong{background:#e7d9ef;color:#6a467e}
.staff-dorm-copy .staff-dorm-bonus{display:block;margin-top:5px;color:#278267;font-weight:900}
.staff-dorm-card>button{grid-area:action;width:100%;border:0;border-radius:7px;padding:7px;background:linear-gradient(#ef9b59,#d86b4c);color:#fff;font:1000 9px ui-monospace,Consolas,monospace;box-shadow:0 2px 0 #963f42;cursor:pointer}
.staff-dorm-card>button:active{transform:translateY(2px);box-shadow:none}
[data-test-only][hidden]{display:none!important}

/* Planning freedom + larger type pass. */
.v3-integrated .prep-board{max-width:1080px}
.v3-integrated .trend-banner small,.v3-integrated .cooking-batch-head small{font-size:11px;line-height:1.35}
.v3-integrated .trend-banner h2,.v3-integrated .cooking-batch-head h2{font-size:25px}
.v3-integrated .trend-banner p,.v3-integrated .cooking-batch-head p{font-size:13px;line-height:1.55}
.v3-integrated .trend-banner>b{font-size:12px;line-height:1.5}
.v3-integrated .prep-section-title b{font-size:12px}.v3-integrated .prep-section-title span{font-size:11px;line-height:1.35}
.v3-integrated .prep-dish-card span{font-size:10px;line-height:1.35}.v3-integrated .prep-dish-card h3{font-size:15px}.v3-integrated .prep-dish-card p{font-size:11px;line-height:1.45}.v3-integrated .prep-dish-card b{font-size:11px;line-height:1.4}
.v3-integrated .prep-dish-actions{grid-template-columns:40px minmax(110px,1fr) 40px;gap:9px}.v3-integrated .prep-dish-actions button{height:38px;font-size:22px}.v3-integrated .prep-dish-actions label{display:grid;grid-template-columns:58px 1fr;align-items:center;gap:7px}.v3-integrated .prep-dish-actions input{width:100%;height:34px;border:2px solid #c9976f;border-radius:8px;background:#fff;color:#5a3d31;font-size:16px;font-weight:1000;text-align:center}.v3-integrated .prep-dish-actions small{font-size:11px;font-weight:900;color:#735344}
.v3-integrated .prep-inventory{padding:16px}.v3-integrated .prep-inventory li{font-size:11px;line-height:1.4;padding:9px}.v3-integrated .prep-inventory li button{font-size:10px;padding:8px}.v3-integrated .prep-inventory>p{font-size:11px;line-height:1.55}.v3-integrated .prep-inventory .prep-risk{padding:9px;border:1px solid #df8b75;border-radius:8px;background:#fff0e7;color:#9f483e;font-weight:900}.v3-integrated .prep-lock{font-size:12px;line-height:1.35}
.v3-integrated .phase-screen-card h3{font-size:17px}.v3-integrated .phase-screen-card p{font-size:13px;line-height:1.55}.v3-integrated .phase-screen-card button{font-size:12px}
.v3-integrated .event-ticker{height:44px;font-size:12px;line-height:1.4}.v3-integrated .event-ticker b{font-size:10px}
.v3-integrated .senti-dock{grid-template-columns:180px repeat(3,minmax(150px,1fr));gap:9px}.v3-integrated .senti-dock-title{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 11px;border:2px solid #6a4838;border-radius:10px;background:#fff7dd;color:#654638}.v3-integrated .senti-dock-title b{font-size:12px}.v3-integrated .senti-dock-title span{font-size:11px;line-height:1.4;color:#856557}.v3-integrated .senti-badge b{font-size:12px}.v3-integrated .senti-badge small{font-size:10px;line-height:1.4}.v3-integrated .senti-dock button{min-height:58px;padding:9px}.v3-integrated .senti-dock button b{font-size:12px}.v3-integrated .senti-dock button small{font-size:10px;line-height:1.4}
.v3-integrated .control-tabs button{font-size:12px}.v3-integrated .control-tabs button strong{font-size:8px}.v3-integrated .roster-v3 .staff-card b{font-size:13px}.v3-integrated .roster-v3 .staff-card small{font-size:11px}.v3-integrated .job-list-v3 .job b{font-size:13px}.v3-integrated .job-list-v3 .job small{font-size:11px}.v3-integrated .control-note{font-size:12px}
.v3-integrated .room-switcher button span{font-size:10px}.v3-integrated .room-switcher button b{font-size:14px}.v3-integrated .room-switcher button small{font-size:10px}
.warmer-grid .is-waste{border-color:#df7668!important;background:#fff0eb!important}.warmer-grid .is-waste small{color:#a1443b!important;font-weight:900}
body.v3-integrated:not([data-phase="evening"]) .event-ticker,body.v3-integrated:not([data-phase="evening"]) .senti-dock{display:none}

/* Readability pass requested during local review. */
.v3-integrated .recipe-book-head span{font-size:10px}.v3-integrated .recipe-book-head h2{font-size:20px}.v3-integrated .recipe-book-head>b{font-size:14px}.v3-integrated .recipe-note{font-size:12px!important;line-height:1.5}.v3-integrated .recipe-lab-title span{font-size:9px}.v3-integrated .recipe-lab-title b{font-size:15px}.v3-integrated .recipe-lab-title small{font-size:10px}.v3-integrated .recipe-ingredient-grid button{min-height:34px;padding:7px}.v3-integrated .recipe-ingredient-grid button span{font-size:10px}.v3-integrated .recipe-ingredient-grid button b{font-size:9px}.v3-integrated .recipe-lab>p{font-size:11px;line-height:1.5}.v3-integrated .recipe-lab-actions button,.v3-integrated .recipe-card button{font-size:10px}.v3-integrated .recipe-card span{font-size:9px}.v3-integrated .recipe-card b{font-size:12px}.v3-integrated .recipe-card small{font-size:10px;line-height:1.4}.v3-integrated .recipe-card strong{font-size:10px}.v3-integrated .recipe-card-art em{font-size:9px}
.v3-integrated .staff-gacha-banner .gacha-head span{font-size:10px}.v3-integrated .staff-gacha-banner .gacha-head strong{font-size:22px}.v3-integrated .staff-gacha-banner .gacha-rates span{font-size:11px}.v3-integrated .staff-gacha-banner .gacha-pity span{font-size:11px}.v3-integrated .staff-gacha-banner .gacha-actions button{font-size:13px!important}.v3-integrated .staff-gacha-banner .gacha-actions button small{font-size:9px}.v3-integrated .staff-gacha-banner .gacha-demo-note{font-size:11px!important}.v3-integrated .gacha-card-copy b{font-size:13px}.v3-integrated .gacha-card-copy>small{font-size:9px}.v3-integrated .gacha-skill-line{height:auto;min-height:23px;font-size:9px!important}.v3-integrated .gacha-detail p{font-size:11px;line-height:1.5}.v3-integrated .gacha-detail b{font-size:10px}.v3-integrated .gacha-detail-rank{font-size:13px}
.v3-integrated .demo-layout{grid-template-columns:280px minmax(680px,1fr) 390px}.v3-integrated .recipe-ingredient-grid{max-height:158px}.v3-integrated .gacha-summon-stage>strong{font-size:32px}.v3-integrated .gacha-summon-stage>small{font-size:13px}.v3-integrated .summon-silhouette{overflow:hidden;border-radius:46% 46% 20% 20%;-webkit-mask-image:linear-gradient(#000 0 82%,transparent 100%);mask-image:linear-gradient(#000 0 82%,transparent 100%)}.v3-integrated .gacha-summon-stage.is-active .summon-silhouette{animation-name:summonHeroColor}@keyframes summonHeroColor{0%{opacity:0;transform:translateX(-50%) translateY(150px) scale(.35);filter:blur(10px) saturate(1.5) drop-shadow(0 0 8px var(--summon))}58%{opacity:1;filter:blur(2px) saturate(1.5) drop-shadow(0 0 24px var(--summon))}100%{opacity:1;transform:translateX(-50%) translateY(0) scale(1);filter:saturate(1.12) brightness(.9) drop-shadow(0 0 28px var(--summon))}}

/* Day menus use the empty page height instead of a short nested scroller. */
body.v3-integrated:not([data-phase="evening"]) .restaurant-stage.v3-canvas-stage{height:auto;min-height:max(680px,calc(100vh - 260px));overflow:hidden}
body.v3-integrated:not([data-phase="evening"]) #phase-screen{position:relative;inset:auto;box-sizing:border-box;width:100%;min-height:max(674px,calc(100vh - 266px));overflow:visible}
body.v3-integrated:not([data-phase="evening"]) .prep-board{max-width:none}

/* Larger planning-menu type for comfortable reading at the game viewport. */
.v3-integrated .trend-banner small,.v3-integrated .cooking-batch-head small{font-size:13px}
.v3-integrated .trend-banner h2,.v3-integrated .cooking-batch-head h2{font-size:28px}
.v3-integrated .trend-banner p,.v3-integrated .cooking-batch-head p{font-size:15px;line-height:1.6}
.v3-integrated .trend-banner>b{font-size:14px}
.v3-integrated .prep-section-title b{font-size:14px}.v3-integrated .prep-section-title span{font-size:13px}
.v3-integrated .prep-dish-card span{font-size:12px}.v3-integrated .prep-dish-card h3{font-size:18px;line-height:1.25}.v3-integrated .prep-dish-card p{font-size:13px;line-height:1.5}.v3-integrated .prep-dish-card b{font-size:13px}
.v3-integrated .prep-dish-actions small{font-size:13px}.v3-integrated .prep-dish-actions input{font-size:18px}
.v3-integrated .prep-inventory li{font-size:13px;line-height:1.5}.v3-integrated .prep-inventory li button{font-size:12px}.v3-integrated .prep-inventory>p{font-size:13px;line-height:1.6}.v3-integrated .prep-inventory .prep-risk{font-size:12px;line-height:1.45}.v3-integrated .prep-lock{font-size:14px}

/* Global readability pass: every gameplay surface uses comfortable text sizes. */
body.v3-integrated{font-size:16px}
body.v3-integrated h1{font-size:30px!important;line-height:1.2}
body.v3-integrated h2{font-size:24px!important;line-height:1.25}
body.v3-integrated h3{font-size:20px!important;line-height:1.3}
body.v3-integrated p,body.v3-integrated li,body.v3-integrated label,body.v3-integrated dt{font-size:16px!important;line-height:1.55}
body.v3-integrated small{font-size:15px!important;line-height:1.45}
body.v3-integrated button,body.v3-integrated input,body.v3-integrated select{font-size:16px!important;line-height:1.3}
body.v3-integrated :is(.brand-kicker,.tiny-label,.timer-badge,.stage-topline>div>span,.stage-scale>span,.control-tabs strong,.gacha-head span,.recipe-card span,.recipe-lab-title span,.decor-divider){font-size:15px!important;line-height:1.4}
body.v3-integrated .event-brand strong{font-size:24px!important}body.v3-integrated .event-brand small{font-size:15px!important}
body.v3-integrated .day-dashboard span{font-size:15px!important}body.v3-integrated .day-dashboard b{font-size:19px!important}
body.v3-integrated .phase-tabs button b{font-size:18px!important}body.v3-integrated .phase-tabs button small{font-size:15px!important}
body.v3-integrated .objective-list div{font-size:16px!important;line-height:1.45}
body.v3-integrated .section-heading span,body.v3-integrated #loop-status{font-size:15px!important}
body.v3-integrated .roster-v3 .staff-card b,body.v3-integrated .job-list-v3 .job b{font-size:17px!important}
body.v3-integrated .roster-v3 .staff-card small,body.v3-integrated .job-list-v3 .job small{font-size:15px!important}
body.v3-integrated .shift-stats dt{font-size:15px!important}body.v3-integrated .shift-stats dd{font-size:21px!important}
body.v3-integrated .stage-topline b{font-size:18px!important}
body.v3-integrated .room-switcher button span{font-size:15px!important}body.v3-integrated .room-switcher button b{font-size:20px!important}body.v3-integrated .room-switcher button small{font-size:15px!important}
body.v3-integrated .phase-screen span,body.v3-integrated .phase-screen b,body.v3-integrated .control-panel span,body.v3-integrated .control-panel b{font-size:16px!important;line-height:1.45}
body.v3-integrated .prep-dish-card h3{font-size:22px!important}body.v3-integrated .prep-dish-card p{font-size:16px!important}body.v3-integrated .prep-dish-actions button{font-size:28px!important}
body.v3-integrated .control-tabs button{font-size:16px!important}body.v3-integrated .control-note,body.v3-integrated .empty-state{font-size:16px!important}
body.v3-integrated .toast{font-size:17px!important;line-height:1.5}
.prep-open-restaurant{width:100%;min-height:64px;margin-top:12px;border:3px solid #fff1ad;border-radius:11px;background:linear-gradient(#ff9b4b,#d94d38);color:#fff;font-weight:1000;box-shadow:0 5px 0 #91392f;cursor:pointer}.prep-open-restaurant.is-locked{filter:saturate(.78)}.prep-open-note{display:block;margin-top:9px;color:#7c5a47;text-align:center;font-size:15px!important;font-weight:900}.open-restaurant-box{position:sticky;bottom:12px;z-index:8}.open-restaurant-box button{min-width:230px;min-height:66px}.open-restaurant-box.is-locked{border-color:#bc8750;background:linear-gradient(135deg,#fff6df,#eadcc8)}.open-restaurant-box.is-locked span{font-size:17px!important;font-weight:900}
body.v3-integrated .prep-open-restaurant,body.v3-integrated .open-restaurant-box button{font-size:22px!important;letter-spacing:.5px}

/* Staff systems V4: multi-slot assignment, skill inspection, dorm and VIP testing. */
.staff-gacha-banner .gacha-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.staff-gacha-banner .gacha-actions button{min-width:0;min-height:58px!important;padding:9px 5px!important}
.staff-gacha-banner .gacha-actions button small{display:block;color:#5b2940!important;font-weight:1000}
.gacha-again-row{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:18px}
.gacha-again-row .gacha-again{margin:0}
.gacha-again-row .gacha-again-ten{background:linear-gradient(#ff91ce,#a65ddd);box-shadow:0 4px 0 #56306e}

.assignment-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.assignment-grid .assignment{min-width:0;margin:0;padding:11px;border:2px solid #d8b797;border-radius:11px;background:#fff9ec;box-shadow:0 3px 0 #c7a485}
.assignment-grid .assignment>span{display:block;color:#5a3c31;font-size:17px!important;font-weight:1000}
.assignment-grid .assignment>small{display:block;color:#8d705e;font-size:14px!important;line-height:1.4}
.assignment-grid .assignment select{width:100%;min-height:44px;padding:8px 10px;border:2px solid #c9a37f;border-radius:8px;background:#fff;color:#52382f;font-size:16px!important}
.assignment-grid .assignment.is-locked{opacity:.62;filter:grayscale(.45)}

.staff-codex-card.is-selected{transform:translateY(-2px);border-color:#ffe083;box-shadow:0 5px 0 #4e2b5f,0 0 16px #ffd96c88}
.staff-skill-panel{--skill-rank:#cbd5e1;display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;margin-top:12px;padding:11px;border:3px solid var(--skill-rank);border-radius:14px;background:linear-gradient(145deg,#332543,#1e192b);box-shadow:0 5px 0 #110c19,0 0 18px color-mix(in srgb,var(--skill-rank) 55%,transparent);color:#fff}
.staff-skill-panel.rank-S{--skill-rank:#7dd3fc}.staff-skill-panel.rank-SR{--skill-rank:#c4a7ff}.staff-skill-panel.rank-SSR{--skill-rank:#ffd36a}
.staff-skill-art{position:relative;min-height:150px;border-radius:11px;background-color:#281d35;background-position:center top;background-repeat:no-repeat;background-size:cover;image-rendering:pixelated}
.staff-skill-art em{position:absolute;left:6px;top:6px;padding:4px 7px;border-radius:6px;background:var(--skill-rank);color:#26172d;font:1000 14px ui-monospace}
.staff-skill-copy{min-width:0}.staff-skill-copy>span{color:#ffd589;font:1000 13px ui-monospace}.staff-skill-copy h3{margin:4px 0 7px;color:#fff}
.staff-skill-stats{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:8px}.staff-skill-stats b{padding:5px 7px;border-radius:6px;background:#ffffff18;color:#e8dded;font-size:13px!important}
.staff-skill-copy>strong{display:block;margin-top:7px;color:var(--skill-rank);font-size:13px}.staff-skill-copy>p{margin:2px 0;color:#eadfed;font-size:14px!important;line-height:1.45}

.dorm-room{position:relative;height:310px;margin:12px 0 10px;overflow:hidden;border:4px solid #684636;border-radius:15px;background:linear-gradient(#f5dcae 0 54%,#bd875b 54% 57%,#a86e49 57%);box-shadow:inset 0 0 0 3px #fff1c155,0 6px 0 #9f6a49;isolation:isolate}
.dorm-room:before{content:"";position:absolute;inset:57% 0 0;background:repeating-linear-gradient(90deg,#ad754d 0 42px,#895837 43px 45px);opacity:.8;transform:skewY(-3deg);transform-origin:left top}
.dorm-wall{position:absolute;left:50%;top:16px;z-index:2;display:grid;place-items:center;width:190px;min-height:54px;transform:translateX(-50%);border:3px solid #714638;border-radius:9px;background:#fff0c8;box-shadow:0 4px 0 #ad7853;color:#724254}.dorm-wall b{font-size:18px!important}.dorm-wall span{font-size:12px!important;font-weight:900;letter-spacing:1px}
.dorm-bed,.dorm-desk,.dorm-item{position:absolute;z-index:2;display:block}.dorm-bed{top:92px;width:106px;height:57px;border:4px solid #6f493b;border-radius:16px 16px 8px 8px;background:linear-gradient(#fbf1de 0 34%,#7fc9c3 35% 75%,#5e9d9c 76%);box-shadow:0 8px 0 #7e513d}.dorm-bed:after{content:"";position:absolute;left:8px;top:7px;width:37px;height:20px;border-radius:10px;background:#fff}.dorm-bed-a{left:20px}.dorm-bed-b{right:20px}.dorm-desk{left:50%;top:106px;width:90px;height:39px;transform:translateX(-50%);border:4px solid #704536;border-radius:6px;background:#c6834c;box-shadow:0 7px 0 #704536}.dorm-desk:before{content:"📚";position:absolute;left:28px;top:-24px;font-size:27px}
.dorm-item{filter:drop-shadow(0 4px 1px #5c392955)}.dorm-plant{left:7%;bottom:44px;width:43px;height:60px;background:radial-gradient(ellipse at 35% 25%,#4f9f6a 0 25%,transparent 27%),radial-gradient(ellipse at 70% 32%,#77bd77 0 24%,transparent 26%),linear-gradient(90deg,transparent 42%,#426e47 43% 58%,transparent 59%)}.dorm-plant:after{content:"";position:absolute;left:7px;bottom:0;width:30px;height:24px;border-radius:4px 4px 12px 12px;background:#cf684f}.dorm-lamp{right:8%;top:28px;width:42px;height:55px;border-radius:50% 50% 35% 35%;background:radial-gradient(circle,#fff4a8,#f0a546 62%,#a74c45 64%);box-shadow:0 0 22px #ffd667}.dorm-rug{left:31%;right:31%;bottom:14px;height:55px;border:4px solid #765267;border-radius:50%;background:repeating-radial-gradient(ellipse,#d7758d 0 9px,#f2bd79 10px 17px)}.dorm-sofa{right:5%;bottom:36px;width:110px;height:63px;border:4px solid #68484c;border-radius:25px 25px 9px 9px;background:#a46cac;box-shadow:0 7px 0 #67455b}
.dorm-residents{position:absolute;inset:0;z-index:5;pointer-events:none}.dorm-resident{position:absolute;left:var(--x);bottom:34px;width:70px;border:0;background:transparent;color:#50342c;transform:translateX(-50%);pointer-events:auto;cursor:pointer;animation:dormBob 2.2s var(--delay) ease-in-out infinite}.dorm-resident span{display:block;width:66px;height:92px;background-position:center bottom;background-repeat:no-repeat;background-size:contain;image-rendering:pixelated;filter:drop-shadow(0 5px 2px #38261f55)}.dorm-resident b{display:block;padding:3px;border-radius:6px;background:#fff4d8dd;font-size:12px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dorm-decor-tools{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-bottom:12px}.dorm-decor-tools button{min-width:0;border:2px solid #d0a47d;border-radius:8px;padding:9px 5px;background:#fff7e5;color:#654536;font-weight:1000;cursor:pointer}@keyframes dormBob{50%{transform:translateX(-50%) translateY(-5px)}}

.vip-list{display:grid;gap:10px}.vip-card{--vip:#d29bd7;display:grid;grid-template-columns:92px minmax(0,1fr);gap:10px;padding:10px;border:3px solid var(--vip);border-radius:14px;background:linear-gradient(135deg,#fff9ef,#f5e4f2);box-shadow:0 4px 0 #b98a9e}.vip-card.tone-yatta{--vip:#ed7b67}.vip-card.tone-zen{--vip:#6dbfa8}.vip-card.is-active{box-shadow:0 4px 0 #8c5e74,0 0 20px var(--vip)}.vip-art{grid-row:1/3;min-height:135px;border-radius:10px;background-color:#392849;background-position:center top;background-repeat:no-repeat;background-size:cover}.vip-card h3{margin:2px 0 3px}.vip-card span{color:#a05464;font-weight:1000}.vip-card small{color:#735b50}.vip-card p{margin:5px 0!important;color:#7d675a}.vip-card b{display:block;color:#2d8269}.vip-card>button{grid-column:2;border:0;border-radius:8px;padding:9px;background:#9e5d9f;color:#fff;font-weight:1000;box-shadow:0 3px 0 #653b68}.vip-card>button:disabled{background:#aaa29c;box-shadow:none}
.vip-event{margin-top:12px}.vip-event-empty,.vip-event-complete,.vip-event-scene{padding:14px;border:2px dashed #be9369;border-radius:12px;background:#fff6df;color:#654638;text-align:center}.vip-event-scene{display:grid;grid-template-columns:115px minmax(0,1fr);gap:12px;text-align:left}.vip-event-scene>span{min-height:145px;border-radius:10px;background-position:center;background-repeat:no-repeat;background-size:cover}.vip-event-scene h3{margin:4px 0}.vip-event-scene p{margin:4px 0 10px!important}.vip-event button{border:0;border-radius:8px;padding:10px;background:#dd754c;color:#fff;font-weight:1000;box-shadow:0 3px 0 #91442f}.vip-actions{display:flex;flex-wrap:wrap;gap:7px}.vip-event-complete>b{color:#b07418;font-size:18px!important}

.washing-game{max-width:930px;margin:0 auto}.wash-senti-avatar{flex:none;width:76px;height:76px;border:4px solid #fff;border-radius:50%;background-color:#5b4071;background-position:center 18%;background-repeat:no-repeat;background-size:cover;box-shadow:0 4px 0 #c78e62}.washing-game canvas{cursor:grab;touch-action:none}.washing-game canvas:active{cursor:grabbing}

/* True desktop/tablet/phone reflow. Canvas stays pixel-sharp and scrolls inside its viewport. */
@media(max-width:1180px){
  body.v3-integrated{min-width:0!important;overflow-x:hidden}
  .v3-integrated .event-header,.v3-integrated .day-dashboard,.v3-integrated .phase-tabs,.v3-integrated .demo-layout{box-sizing:border-box;max-width:100%}
  .v3-integrated .day-dashboard{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .v3-integrated .trend-chip{grid-column:span 2}
  .v3-integrated .demo-layout{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:calc(100% - 24px)!important}
  .v3-integrated .demo-layout>*{min-width:0;width:auto!important}
  .v3-integrated .mission-column{grid-column:auto;grid-template-columns:repeat(3,minmax(0,1fr))}
  .v3-integrated .mission-column .phase-brief{grid-column:1/-1}
  .v3-integrated .game-column,.v3-integrated .control-column{width:100%;min-width:0}
  .v3-integrated .control-column{min-height:0}
  .v3-integrated .v3-control{min-height:0}
  .v3-integrated .panel-view[data-panel-view="decor"],.v3-integrated .staff-dorm-list,.v3-integrated .recipe-book-grid{max-height:none;overflow:visible}
  .v3-integrated .room-switcher{grid-template-columns:1fr 1fr minmax(150px,.65fr)}
  .v3-integrated .prep-board{max-width:none}
  .gacha-reveal{width:min(960px,96vw)!important}
  .gacha-result-layout{grid-template-columns:minmax(0,1fr) 270px!important}
}
@media(max-width:760px){
  body.v3-integrated{font-size:16px}
  .v3-integrated .event-header{grid-template-columns:auto minmax(0,1fr) auto;gap:7px;padding:9px 10px}
  .v3-integrated .event-brand{text-align:left}.v3-integrated .event-brand strong{font-size:21px!important}.v3-integrated .event-brand small{font-size:13px!important;letter-spacing:.7px}.v3-integrated .brand-kicker{display:none}
  .v3-integrated .back-link span{display:none}.v3-integrated .header-actions #feature-tour{font-size:0!important;padding:8px}.v3-integrated .header-actions #feature-tour:after{content:"?";font-size:18px}
  .v3-integrated .day-dashboard{width:calc(100% - 16px);grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px}.v3-integrated .day-dashboard>div{min-width:0;min-height:70px;padding:9px}.v3-integrated .day-chip{grid-row:auto}.v3-integrated .trend-chip{grid-column:span 2}.v3-integrated .stress-chip,.v3-integrated .rage-chip{display:grid!important}
  .v3-integrated .phase-tabs{width:calc(100% - 16px);grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.v3-integrated .phase-tabs button{display:grid;grid-template-columns:auto 1fr;padding:9px;text-align:left}.v3-integrated .phase-tabs button small{display:block!important}
  .v3-integrated .demo-layout{width:calc(100% - 16px)!important}
  .v3-integrated .mission-column{display:grid!important;grid-template-columns:1fr!important}.v3-integrated .mission-column .compact-card:last-child{display:block}
  .v3-integrated .room-switcher{grid-template-columns:1fr!important}.v3-integrated .room-switcher button{min-height:72px}
  .v3-integrated .stage-topline{align-items:flex-start;flex-direction:column;gap:8px}.v3-integrated .stage-scale{width:100%;justify-content:flex-end}
  .v3-integrated .canvas-wrap{justify-content:flex-start;min-height:460px;max-width:100%;overflow:auto}.v3-integrated .canvas-wrap.scale-2 canvas{width:1120px;height:728px}.v3-integrated .canvas-wrap.scale-3 canvas{width:1680px;height:1092px}
  body.v3-integrated:not([data-phase="evening"]) .restaurant-stage.v3-canvas-stage{min-height:640px}
  body.v3-integrated:not([data-phase="evening"]) #phase-screen{min-height:634px;padding:14px}
  .v3-integrated .phase-screen-grid,.v3-integrated .prep-layout{grid-template-columns:1fr!important}.v3-integrated .prep-menu{grid-template-columns:1fr!important}.v3-integrated .trend-banner{grid-template-columns:minmax(0,1fr) 68px!important;gap:9px;padding:12px}.v3-integrated .trend-banner>b{grid-column:1/-1}.v3-integrated .trend-banner img{width:64px;height:64px}.v3-integrated .warmer-grid,.v3-integrated .warmer-grid.compact{grid-template-columns:1fr}.v3-integrated .open-restaurant-box{align-items:stretch;flex-direction:column}.v3-integrated .open-restaurant-box button{width:100%;min-width:0}
  .v3-integrated .senti-dock{grid-template-columns:1fr 1fr!important}.v3-integrated .senti-dock-title{grid-column:1/-1}.v3-integrated .senti-badge{grid-column:1/-1}
  .v3-integrated .control-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.v3-integrated .control-tabs button{min-height:54px;border-bottom:1px solid #c99c73}
  .assignment-grid{grid-template-columns:1fr}.staff-skill-panel{grid-template-columns:94px minmax(0,1fr)}.staff-skill-art{min-height:140px}
  .dorm-room{height:290px}.dorm-bed{width:88px}.dorm-resident{width:58px}.dorm-resident span{width:55px;height:82px}.dorm-decor-tools{grid-template-columns:1fr 1fr}
  .vip-card{grid-template-columns:82px minmax(0,1fr)}.vip-event-scene{grid-template-columns:88px minmax(0,1fr)}
  .gacha-modal{padding:8px}.gacha-reveal{width:calc(100vw - 16px)!important;max-height:94vh;padding:13px}.gacha-result-layout{grid-template-columns:1fr!important}.gacha-detail{display:none!important}.gacha-results{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible}.gacha-result-card{min-width:0;min-height:330px;border-radius:46px 46px 14px 14px}.gacha-card-art{height:210px}.gacha-again-row{display:grid;grid-template-columns:1fr 1fr}.gacha-again-row button{min-width:0;padding:10px 7px}
  .cooking-game-head{align-items:flex-start;flex-direction:column}.cooking-game-head>button{align-self:stretch}.cooking-game-brief{align-items:flex-start;flex-direction:column}.cooking-game-brief span{align-self:stretch;text-align:center}.cooking-canvas-wrap{overflow:auto}.cooking-canvas-wrap canvas{min-width:680px}.cooking-game-result{min-width:680px}.cooking-game-foot{align-items:flex-start;flex-direction:column}
  .room-level-summary{grid-template-columns:1fr}.recipe-ingredient-grid{grid-template-columns:1fr}.decor-shop-card{grid-template-columns:54px minmax(0,1fr)}.decor-shop-card button{grid-column:1/-1;max-width:none}.table-shop-actions{justify-content:stretch}.table-shop-actions button{flex:1}
}
@media(max-width:430px){
  .v3-integrated .event-brand small{display:none}.v3-integrated .event-brand strong{font-size:18px!important}
  .v3-integrated .day-dashboard{grid-template-columns:1fr 1fr!important}.v3-integrated .balance-chip{grid-column:1/-1}
  .v3-integrated .phase-tabs button{grid-template-columns:1fr;text-align:center}.v3-integrated .phase-tabs button span{grid-row:auto}.v3-integrated .phase-tabs button small{font-size:13px!important}
  .v3-integrated .control-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .staff-gacha-banner .gacha-actions{grid-template-columns:1fr!important}
  .staff-skill-panel{grid-template-columns:1fr}.staff-skill-art{min-height:230px;background-size:contain}.staff-skill-stats{display:grid;grid-template-columns:1fr}
  .dorm-room{height:270px}.dorm-bed-b{display:none}.dorm-wall{width:155px}.dorm-resident{bottom:27px}.dorm-resident:nth-child(n+4){display:none}
  .vip-card,.vip-event-scene{grid-template-columns:1fr}.vip-art,.vip-event-scene>span{min-height:210px;background-size:contain}.vip-card>button{grid-column:1}
  .gacha-results{grid-template-columns:1fr!important}.gacha-result-card{min-height:380px}.gacha-card-art{height:255px}.gacha-again-row{grid-template-columns:1fr}
  .cooking-canvas-wrap canvas,.cooking-game-result{min-width:620px}
}

/* Typography: Inter for readable Vietnamese copy, Unbounded for game display text. */
:root{--font-body:"Inter","Segoe UI",Arial,sans-serif;--font-display:"Unbounded","Inter","Segoe UI",sans-serif}
body.v3-integrated,body.v3-integrated *{font-family:var(--font-body)!important}
body.v3-integrated :is(h1,h2,h3,button,.event-brand strong,.brand-kicker,.tiny-label,.timer-badge,.control-tabs strong,.gacha-rank-hero,.gacha-rank-badge,.gacha-detail-rank,.gacha-head span,.recipe-card span,.recipe-lab-title span,.decor-divider,.room-switcher button span),body.v3-integrated :is(h1,h2,h3,button) *{font-family:var(--font-display)!important}
body.v3-integrated :is(input,select,textarea,option){font-family:var(--font-body)!important}

/* Ten-pull result is one cinematic horizontal summon banner. Character detail opens only on demand. */
.gacha-reveal{position:relative;width:min(1540px,98vw)!important;padding:22px!important;overflow:hidden!important;background:radial-gradient(circle at 50% -20%,#8263a47a,transparent 42%),radial-gradient(circle at 15% 55%,#dba64a26,transparent 28%),linear-gradient(145deg,#101522,#211a31 55%,#0b111b)!important}
.gacha-reveal:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 12% 25%,#fff 0 1px,transparent 2px),radial-gradient(circle at 75% 16%,#fff 0 1px,transparent 2px),radial-gradient(circle at 48% 62%,#bce5ff 0 1px,transparent 2px);background-size:140px 140px,190px 190px,230px 230px;opacity:.42}
.gacha-reveal>*{position:relative;z-index:1}
.gacha-result-layout{display:block!important}
.gacha-results{display:grid!important;grid-template-columns:repeat(10,minmax(0,1fr))!important;align-items:end;gap:3px!important;overflow:visible!important;padding:28px 12px 25px!important;border:0!important;border-radius:18px;background:linear-gradient(90deg,transparent,#ffffff0b 12% 88%,transparent)!important;box-shadow:none!important}
.gacha-results.single{grid-template-columns:minmax(220px,270px)!important;justify-content:center}
.gacha-result-card{--arch-bg:linear-gradient(180deg,#dce8ed,#91a9b5 66%,#415468);position:relative;display:block;min-width:0!important;min-height:390px!important;overflow:hidden;border:2px solid var(--rank-color)!important;border-radius:58px 58px 9px 9px!important;background:radial-gradient(circle at 50% 7%,#fff 0 2%,transparent 3%),var(--arch-bg)!important;box-shadow:0 0 0 1px #eafaff88,inset 0 0 24px #fff6,0 8px 20px #000b,0 0 18px var(--rank-glow)!important;cursor:pointer;isolation:isolate;transition:transform .18s ease,filter .18s ease}
.gacha-result-card:before{content:"";position:absolute;inset:4px;z-index:-1;border:1px solid #ffffff8c;border-radius:52px 52px 6px 6px;background:linear-gradient(135deg,transparent 0 46%,#ffffff12 47% 53%,transparent 54%) 0 0/18px 18px;pointer-events:none}
.gacha-result-card.rank-A{--arch-bg:linear-gradient(180deg,#d8e3e7,#96aab4 65%,#4b5b66)}
.gacha-result-card.rank-S{--arch-bg:linear-gradient(180deg,#c9f5ff,#459dc0 66%,#174e6c)}
.gacha-result-card.rank-SR{--arch-bg:linear-gradient(180deg,#e6d7ff,#8f66cd 65%,#4e307d)}
.gacha-result-card.rank-SSR{--arch-bg:linear-gradient(180deg,#fff1b0,#dc8f4d 45%,#a13f79 78%,#5d295f);box-shadow:0 0 0 1px #fff5c7,inset 0 0 30px #fff9,0 10px 28px #000b,0 0 35px #ffd56fcc!important}
.gacha-result-card:hover,.gacha-result-card:focus-visible{z-index:3;transform:translateY(-12px) scale(1.045);filter:brightness(1.14);outline:none}
.gacha-result-card:nth-child(1),.gacha-result-card:nth-child(10){transform:translateY(14px)}.gacha-result-card:nth-child(2),.gacha-result-card:nth-child(9){transform:translateY(8px)}
.gacha-result-card:nth-child(1):hover,.gacha-result-card:nth-child(10):hover,.gacha-result-card:nth-child(2):hover,.gacha-result-card:nth-child(9):hover{transform:translateY(-9px) scale(1.045)}
.gacha-card-art{position:absolute!important;inset:45px 0 70px!important;height:auto!important;margin:0!important;background-position:center top!important;background-size:cover!important;filter:drop-shadow(0 8px 7px #0008) saturate(1.05)!important}
.gacha-card-copy{position:absolute!important;inset:auto 0 0!important;min-height:105px!important;padding:30px 6px 8px!important;background:linear-gradient(transparent,#121826dc 22%,#10151f 52%)!important;text-align:center}
.gacha-card-copy b{display:block;padding:0!important;overflow:hidden;color:#fff;white-space:nowrap;text-overflow:ellipsis;font-size:13px!important;text-shadow:0 2px 4px #000}.gacha-card-copy>small{display:block;overflow:hidden;color:#d9e7ed!important;white-space:nowrap;text-overflow:ellipsis;font-size:9px!important}.gacha-card-copy>small:last-child{margin-top:3px;color:#ffe0a0!important}.gacha-stars{display:block;margin:4px -8px 0;color:#ffd858;font:900 14px/1 Georgia,serif;letter-spacing:0;text-shadow:0 0 8px #ffb22f,0 1px #794519}
.gacha-rank-ribbon{position:absolute;left:50%;top:18px;z-index:4;min-width:40px;padding:3px 7px;transform:translateX(-50%);border:1px solid #fff9;border-radius:999px;background:#141a26c9;color:#fff;text-align:center;font:900 10px/1 var(--font-display);box-shadow:0 0 12px var(--rank-glow)}
.gacha-card-sigil{position:absolute;left:50%;top:64px;z-index:0;transform:translateX(-50%);color:#ffffffc7;font-style:normal;font-size:20px;text-shadow:0 0 16px #fff}
.gacha-beam{inset:-10% 27% 18%!important;background:linear-gradient(90deg,transparent,#fff9,transparent)!important;opacity:.42!important}
.gacha-new{right:50%!important;top:48px!important;width:auto!important;padding:4px 7px!important;transform:translateX(50%)!important;border-radius:6px!important;background:#ffe574!important;color:#7b472b!important;box-shadow:0 0 13px #ffd350;font-size:9px!important}
.gacha-result-card.rank-SSR .gacha-new{background:#fff2a2;animation:gachaNewPulse .9s ease-in-out infinite alternate}.gacha-result-card.rank-SSR:after{right:50%!important;bottom:112px!important;transform:translateX(50%);font-size:29px!important}
@keyframes gachaNewPulse{to{filter:brightness(1.25);box-shadow:0 0 24px #ffe57a}}
.gacha-detail{position:absolute!important;left:50%;top:50%;z-index:12;display:grid!important;grid-template-columns:minmax(250px,.8fr) minmax(300px,1.2fr)!important;grid-template-rows:minmax(420px,72vh)!important;width:min(760px,calc(100% - 34px))!important;min-height:0!important;max-height:78vh;overflow:auto;transform:translate(-50%,-50%);border-width:3px!important;border-radius:22px!important;background:#17101f!important;box-shadow:0 0 0 9999px #0d0913d9,0 24px 80px #000,0 0 35px var(--rank-color)!important}
.gacha-detail[hidden]{display:none!important}.gacha-detail-art{min-height:420px;background-position:center top!important;background-size:cover!important}.gacha-detail-copy{padding:25px 28px!important;background:linear-gradient(145deg,#352348,#17101f)!important}.gacha-detail-copy h3{margin:10px 0 5px!important;font-size:28px!important}.gacha-detail-copy p{font-size:16px!important;line-height:1.55!important}.gacha-detail-copy b{display:block;margin-top:16px;font-size:14px!important}.gacha-detail-rank{font-size:17px!important}
.gacha-detail-close{position:absolute;right:13px;top:13px;z-index:2;display:grid;width:42px;height:42px;place-items:center;border:2px solid #ffe0a5;border-radius:50%;padding:0!important;background:#2b1c38dd;color:#fff;font-size:25px!important;box-shadow:0 3px 0 #100b18;cursor:pointer}

/* KTX is a dedicated full-screen management view, separate from the restaurant panel. */
body.dorm-open{overflow:hidden}
.open-dorm-button{background:linear-gradient(145deg,#4e9c89,#347463)!important;color:#fff!important;box-shadow:0 3px 0 #245648!important}
.dorm-modal[hidden]{display:none!important}.dorm-modal{position:fixed;inset:0;z-index:95;overflow:auto;padding:24px;background:radial-gradient(circle at 50% 10%,#9bd8db55,transparent 35%),linear-gradient(145deg,#172d3bfa,#32243df5);backdrop-filter:blur(7px)}
.dorm-screen{width:min(1480px,100%);min-height:calc(100vh - 48px);margin:0 auto;overflow:hidden;border:4px solid #6f4b3c;border-radius:22px;background:#f7eedc;box-shadow:0 25px 100px #000a,inset 0 0 0 3px #fff8d1}
.dorm-screen-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;border-bottom:4px solid #6f4b3c;background:linear-gradient(135deg,#ffe9b8,#f0bd82);color:#583747}.dorm-screen-head span{color:#a4515c;font-weight:1000;letter-spacing:1.2px}.dorm-screen-head h2{margin:5px 0!important;font-size:31px!important}.dorm-screen-head p{margin:0;color:#75594d}.dorm-screen-head button{flex:none;border:2px solid #fff1bf;border-radius:11px;padding:13px 17px;background:#75466f;color:#fff;box-shadow:0 4px 0 #4b2c49}
.dorm-screen-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(390px,.75fr);gap:18px;padding:18px}.dorm-room-column,.dorm-roster-column{min-width:0}.dorm-room-column{padding:14px;border:2px solid #d7b38d;border-radius:16px;background:#fff8e9}.dorm-roster-column{padding:14px;border:2px solid #b9987d;border-radius:16px;background:#ead8bf}
.dorm-modal .dorm-room{height:min(620px,62vh);margin:0 0 14px}.dorm-modal .dorm-resident{width:110px;bottom:48px}.dorm-modal .dorm-resident span{width:106px;height:178px;border-radius:44% 44% 16px 16px;background-color:#ffffff38;background-size:cover;box-shadow:inset 0 0 0 2px #fff8;filter:drop-shadow(0 8px 3px #38261f66)}.dorm-modal .dorm-resident b{font-size:14px!important}.dorm-modal .dorm-wall{top:25px;width:250px;min-height:70px}.dorm-modal .dorm-bed{top:125px;width:145px;height:78px}.dorm-modal .dorm-bed-a{left:35px}.dorm-modal .dorm-bed-b{right:35px}.dorm-modal .dorm-desk{top:150px;width:125px;height:50px}.dorm-modal .dorm-item.dorm-rug{bottom:20px}.dorm-modal .dorm-item.dorm-sofa{width:155px;height:85px}.dorm-modal .dorm-decor-tools button{min-height:52px;background:#fff;color:#5f4137}
.dorm-screen-note{margin:9px 0 0!important;color:#7a5f51;text-align:center}.dorm-roster-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}.dorm-roster-head span{color:#a0515b;font-weight:1000}.dorm-roster-head h3{margin:4px 0}.dorm-roster-head>b{padding:8px;border-radius:8px;background:#70456d;color:#ffe29d;font-size:14px!important}.dorm-modal .staff-dorm-list{max-height:calc(100vh - 250px);overflow:auto;padding-right:5px}.staff-dorm-card.is-focused{border-color:#ef8e4a;box-shadow:0 0 0 4px #ffd581,0 7px 18px #9d5b3f55}

@media(max-width:1000px){
  .gacha-reveal{overflow:auto!important}.gacha-results{display:flex!important;justify-content:flex-start;min-width:max-content;padding-inline:18px!important;overflow:visible!important}.gacha-result-card{flex:0 0 112px!important;min-height:355px!important}.gacha-card-copy b{font-size:11px!important}.gacha-card-art{bottom:66px!important}
  .dorm-screen-layout{grid-template-columns:1fr}.dorm-modal .staff-dorm-list{max-height:none;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}.dorm-modal .dorm-room{height:520px}
}
@media(max-width:620px){
  .gacha-reveal{padding:12px!important;overflow:auto!important}.gacha-results{gap:3px!important;padding:22px 7px 24px!important}.gacha-result-card{flex-basis:98px!important;min-height:320px!important;border-radius:48px 48px 8px 8px!important}.gacha-card-art{inset:42px 0 65px!important}.gacha-card-copy{min-height:93px!important;padding:27px 5px 7px!important}.gacha-card-copy b{font-size:10px!important}.gacha-card-copy>small{font-size:8px!important}.gacha-stars{font-size:12px}.gacha-rank-ribbon{top:14px;font-size:8px!important}.gacha-new{top:41px!important;font-size:8px!important}
  .gacha-detail:not([hidden]){display:grid!important;grid-template-columns:1fr!important;grid-template-rows:minmax(260px,42vh) auto!important;width:calc(100% - 20px)!important;max-height:90vh}.gacha-detail-art{min-height:260px}.gacha-detail-copy{padding:18px!important}
  .dorm-modal{padding:0}.dorm-screen{min-height:100vh;border-width:0;border-radius:0}.dorm-screen-head{align-items:flex-start;flex-direction:column;padding:15px}.dorm-screen-head h2{font-size:23px!important}.dorm-screen-head button{width:100%}.dorm-screen-layout{padding:10px}.dorm-modal .dorm-room{height:390px}.dorm-modal .dorm-resident{width:66px}.dorm-modal .dorm-resident span{width:64px;height:108px}.dorm-modal .dorm-bed{width:92px;height:58px}.dorm-modal .dorm-bed-b{display:none}.dorm-modal .dorm-wall{width:170px}.dorm-modal .staff-dorm-list{grid-template-columns:1fr}
}

/* KTX building: pixel residents, private rooms and a shared Hua–Senti suite. */
.dorm-modal .dorm-room{height:min(690px,calc(100vh - 215px));min-height:560px;margin:0 0 14px;overflow:auto;border-color:#60453d;background:linear-gradient(135deg,#43384c,#263848)!important;box-shadow:inset 0 0 0 3px #fce5a833,0 7px 0 #3a2932}
.dorm-modal .dorm-room:before{display:none}
.dorm-building-head{position:sticky;left:0;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;min-height:58px;padding:9px 15px;border-bottom:3px solid #3b2634;background:linear-gradient(90deg,#ffde9e,#eaa67f);color:#593a42}
.dorm-building-head div{display:grid;gap:2px}.dorm-building-head b{font-size:18px!important}.dorm-building-head span{font-size:11px!important;font-weight:900;letter-spacing:1px}.dorm-building-head strong{display:grid;width:46px;height:36px;place-items:center;border:2px solid #fff3bd;border-radius:9px;background:#744c70;color:#fff;font-size:16px!important;box-shadow:0 3px 0 #493145}
.dorm-floor{position:relative;display:grid;grid-template-columns:94px minmax(0,1fr);min-height:158px;border-bottom:4px solid #3b2932;background:linear-gradient(#f3d9ac 0 68%,#aa714b 69% 73%,#805037 74%);isolation:isolate}
.dorm-floor:last-of-type{border-bottom:0}.dorm-floor:before{content:"";position:absolute;inset:73% 0 0;z-index:-1;background:repeating-linear-gradient(90deg,#8c5a3b 0 36px,#68432f 37px 40px);opacity:.9}
.dorm-floor-label{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;padding:8px;border-right:3px solid #654439;background:linear-gradient(#7b5362,#4e3c52);color:#fff4d7;text-align:center}
.dorm-floor-label b{font-size:15px!important}.dorm-floor-label span{font-size:8px!important;line-height:1.35!important;font-weight:900;letter-spacing:.4px}
.dorm-floor-rooms{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));min-width:0}
.dorm-unit{position:relative;min-width:0;overflow:hidden;border-right:3px solid #704a3d;background:linear-gradient(#ffe9bc 0 69%,#b77d53 70%);box-shadow:inset 0 0 0 2px #fff4ce44}
.dorm-unit:last-child{border-right:0}.dorm-unit:after{content:"";position:absolute;left:0;right:0;bottom:0;height:22px;background:repeating-linear-gradient(90deg,#a96d48 0 31px,#815134 32px 34px);opacity:.78}.dorm-unit.is-empty{filter:saturate(.55);opacity:.7}
.dorm-unit>em{position:absolute;left:50%;top:52%;transform:translate(-50%,-50%);color:#956e59;font-size:9px;font-style:normal;font-weight:1000;letter-spacing:.8px;white-space:nowrap}
.dorm-room-number{position:absolute;left:6px;top:5px;z-index:6;padding:3px 5px;border-radius:5px;background:#68465ddd;color:#fff3d1;font-size:9px!important;font-weight:1000}
.dorm-unit-window{position:absolute;right:10px;top:12px;width:44px;height:31px;border:3px solid #765044;border-radius:5px;background:linear-gradient(135deg,#81ccdc,#d8fbf5 48%,#7fafc4 50%);box-shadow:inset 0 0 0 2px #fff9}
.dorm-unit-bed{position:absolute;left:10px;bottom:27px;width:52px;height:29px;border:3px solid #71473c;border-radius:9px 9px 4px 4px;background:linear-gradient(#fff5dc 0 36%,#7dc7c2 37%);box-shadow:0 4px 0 #6e4736}
.dorm-unit-bed:after{content:"";position:absolute;left:4px;top:4px;width:18px;height:9px;border-radius:7px;background:#fff}
.dorm-pixel-resident{position:absolute;left:7px;bottom:9px;z-index:8;width:76px;height:112px;padding:0;border:0;background:transparent;color:#563b36;cursor:pointer;animation:dormPatrol 5.2s var(--walk-delay) ease-in-out infinite alternate}
.dorm-pixel-resident.walk-1{animation-duration:6.3s}.dorm-pixel-resident.walk-2{animation-duration:4.6s}.dorm-pixel-sprite{display:block;width:72px;height:96px;background-position:0 -288px;background-repeat:no-repeat;background-size:288px 864px;image-rendering:pixelated;filter:drop-shadow(0 5px 2px #402a2866);animation:dormSpriteStep .65s steps(4) infinite,dormTurn 10.4s steps(1) infinite}
.dorm-pixel-resident b{position:absolute;left:50%;bottom:0;max-width:92px;padding:2px 5px;transform:translateX(-50%);overflow:hidden;border:1px solid #c89d73;border-radius:5px;background:#fff4d9e8;color:#543b38;font-size:9px!important;white-space:nowrap;text-overflow:ellipsis;box-shadow:0 2px 0 #9c6b51}.dorm-pixel-resident:focus-visible{outline:3px solid #ec8b49;outline-offset:-2px}.dorm-pixel-resident:hover{filter:brightness(1.08)}
.dorm-floor-special{grid-template-columns:94px minmax(0,1fr);min-height:190px}.dorm-unit-shared{min-height:190px;border-right:0;background:linear-gradient(#fff0c8 0 68%,#c18a61 69%)}
.dorm-unit-shared .dorm-unit-window{left:50%;right:auto;width:92px;height:42px;transform:translateX(-50%)}.dorm-unit-shared .dorm-unit-bed-left{left:18px;bottom:34px;width:76px}.dorm-unit-shared .dorm-unit-bed-right{left:auto;right:18px;bottom:34px;width:76px}
.dorm-roommates{position:absolute;inset:0}.dorm-roommates .dorm-pixel-resident{bottom:12px;animation-name:dormPatrolShared}.dorm-roommates .dorm-pixel-resident:nth-child(2){animation-direction:alternate-reverse}
.dorm-unit-shared .dorm-item{z-index:4;transform:scale(.72)}.dorm-unit-shared .dorm-rug{left:38%;right:38%;bottom:5px;height:38px}.dorm-unit-shared .dorm-plant{left:12%;bottom:29px}.dorm-unit-shared .dorm-lamp{right:13%;top:18px}.dorm-unit-shared .dorm-sofa{right:8%;bottom:28px;transform:scale(.65)}
.dorm-elevator{position:sticky;right:8px;bottom:8px;z-index:12;float:right;display:grid;width:35px;height:35px;margin:-43px 8px 8px auto;place-items:center;border:2px solid #ffe5a4;border-radius:9px;background:#63465f;color:#fff;font:900 20px/1 sans-serif;box-shadow:0 3px 0 #38293a}
@keyframes dormPatrol{0%,12%{left:5px}88%,100%{left:calc(100% - 79px)}}
@keyframes dormPatrolShared{0%,12%{left:17%}88%,100%{left:calc(83% - 78px)}}
@keyframes dormSpriteStep{to{background-position-x:-288px}}
@keyframes dormTurn{0%,49%{transform:scaleX(1)}50%,100%{transform:scaleX(-1)}}

@media(max-width:1000px){
  .dorm-modal .dorm-room{height:auto;max-height:none;min-height:0}.dorm-floor{min-height:170px}.dorm-floor-special{min-height:190px}
}
@media(max-width:620px){
  .dorm-modal .dorm-room{height:auto;min-height:0}.dorm-floor{grid-template-columns:62px minmax(0,1fr);min-height:0}.dorm-floor-label{min-height:320px}.dorm-floor-special .dorm-floor-label{min-height:188px}.dorm-floor-rooms{grid-template-columns:repeat(2,minmax(0,1fr))}.dorm-unit{min-height:160px;border-bottom:3px solid #704a3d}.dorm-unit:nth-child(2n){border-right:0}.dorm-unit-shared{min-height:188px}.dorm-pixel-resident{transform:scale(.86);transform-origin:center bottom}
}

/* Per-floor editing and direction-safe resident patrols. */
.dorm-floor-picker{display:grid;grid-template-columns:auto repeat(3,minmax(0,1fr));gap:7px;margin:0 0 8px}.dorm-floor-picker>b{display:flex;align-items:center;padding:0 10px;border:2px solid #a77d63;border-radius:8px;background:#70485f;color:#fff2c6;font-size:12px!important}.dorm-floor-picker button,.dorm-decor-tools button{min-height:48px;transition:transform .15s ease,box-shadow .15s ease,filter .15s ease}.dorm-floor-picker button{border:2px solid #c79b73;border-radius:9px;background:#fff7e4;color:#66463c;font-weight:1000;box-shadow:0 3px 0 #a97658}.dorm-floor-picker button.active{border-color:#ffe49a;background:linear-gradient(#ef9b61,#d86856);color:#fff;box-shadow:0 3px 0 #8d3f43,0 0 0 3px #ffd87f66}.dorm-decor-tools button.active{border-color:#e96f54!important;background:linear-gradient(#ffd389,#ef9c62)!important;color:#623c35!important;box-shadow:inset 0 0 0 2px #fff5bd,0 3px 0 #a45245}.dorm-floor-picker button:active,.dorm-decor-tools button:active{transform:translateY(2px);box-shadow:none}
.dorm-floor.is-editing{z-index:6;box-shadow:inset 0 0 0 4px #ffd56c,0 0 20px #ffd56c77}.dorm-floor.is-editing .dorm-floor-label{background:linear-gradient(#a06172,#6c496a)}
.dorm-floor-decor{position:absolute;inset:0 0 0 94px;z-index:4;overflow:hidden;pointer-events:none}.dorm-unit-shared>.dorm-floor-decor{inset:0}.dorm-floor-decor .dorm-item{position:absolute}.dorm-floor>.dorm-floor-decor .dorm-plant{left:3%;bottom:25px;transform:scale(.66)}.dorm-floor>.dorm-floor-decor .dorm-lamp{right:3%;top:12px;transform:scale(.62)}.dorm-floor>.dorm-floor-decor .dorm-rug{left:41%;right:41%;bottom:4px;height:31px}.dorm-floor>.dorm-floor-decor .dorm-sofa{right:11%;bottom:24px;transform:scale(.56)}
.dorm-pixel-resident{--walk-duration:10.4s;animation:dormPatrolCycle var(--walk-duration) var(--walk-delay) ease-in-out infinite}.dorm-pixel-resident.walk-1{--walk-duration:12.6s;animation-duration:var(--walk-duration)}.dorm-pixel-resident.walk-2{--walk-duration:9.2s;animation-duration:var(--walk-duration)}.dorm-roommates .dorm-pixel-resident{animation-name:dormPatrolSharedCycle;animation-direction:normal}.dorm-roommates .dorm-pixel-resident:nth-child(2){animation-direction:normal!important}.dorm-pixel-sprite{animation:dormSpriteStep .65s steps(4) infinite,dormFaceCycle var(--walk-duration) var(--walk-delay) linear infinite}
@keyframes dormPatrolCycle{0%,10%{left:5px}45%,55%{left:calc(100% - 79px)}90%,100%{left:5px}}
@keyframes dormPatrolSharedCycle{0%,10%{left:17%}45%,55%{left:calc(83% - 78px)}90%,100%{left:17%}}
@keyframes dormFaceCycle{0%,49.99%{transform:scaleX(1)}50%,100%{transform:scaleX(-1)}}
.dorm-pixel-resident.has-reversed-sheet .dorm-pixel-sprite{animation-name:dormSpriteStep,dormFaceCycleReversed}
@keyframes dormFaceCycleReversed{0%,49.99%{transform:scaleX(-1)}50%,100%{transform:scaleX(1)}}
@media(max-width:620px){.dorm-floor-picker{grid-template-columns:1fr 1fr}.dorm-floor-picker>b{grid-column:1/-1;justify-content:center;min-height:38px}.dorm-floor-picker button:last-child{grid-column:1/-1}.dorm-floor-decor{left:62px}}

/* Keep every decoration inside one room slot instead of straddling a wall. */
.dorm-floor-decor{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;padding:8px 7px 24px;box-sizing:border-box}
.dorm-floor-decor .dorm-item{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;align-self:end;justify-self:center;margin:0!important;transform:none!important;max-width:calc(100% - 12px)}
.dorm-floor-decor .dorm-plant{grid-column:1;width:36px;height:49px}.dorm-floor-decor .dorm-lamp{grid-column:2;align-self:start;width:34px;height:44px}.dorm-floor-decor .dorm-rug{grid-column:3;width:82px;height:32px}.dorm-floor-decor .dorm-sofa{grid-column:4;width:84px;height:48px}
.dorm-unit-shared>.dorm-floor-decor{padding-left:12px;padding-right:12px}.dorm-unit-shared>.dorm-floor-decor .dorm-rug{width:92px;height:35px}
@media(max-width:620px){.dorm-floor-decor{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,1fr);padding-bottom:18px}.dorm-floor-decor .dorm-plant{grid-column:1;grid-row:1}.dorm-floor-decor .dorm-lamp{grid-column:2;grid-row:1}.dorm-floor-decor .dorm-rug{grid-column:1;grid-row:2;width:64px}.dorm-floor-decor .dorm-sofa{grid-column:2;grid-row:2;width:70px}}

/* Keep the complete ten-pull visible on tablet/desktop; phones swipe the same single row. */
@media(min-width:761px) and (max-width:1000px){.gacha-results{display:grid!important;grid-template-columns:repeat(10,minmax(0,1fr))!important;min-width:0!important;gap:2px!important;padding-inline:7px!important}.gacha-result-card{min-width:0!important;min-height:340px!important}.gacha-card-copy b{font-size:9px!important}.gacha-card-copy>small{font-size:7px!important}.gacha-stars{font-size:11px!important}.gacha-rank-ribbon{min-width:31px;padding-inline:4px;font-size:8px!important}}
@media(max-width:760px){.gacha-results{display:flex!important;grid-template-columns:none!important;min-width:max-content!important;gap:3px!important;overflow:visible!important}.gacha-result-card{flex:0 0 102px!important}}
