
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;touch-action:manipulation}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#05080c;color:#f7f3ea;font-family:system-ui,-apple-system,"Noto Sans JP",sans-serif}button,select,input{font:inherit;color:inherit}.vp{position:fixed;inset:0;overflow:hidden}.app{--scale:1;position:absolute;left:50%;top:50%;width:1280px;height:720px;transform:translate(-50%,-50%) scale(var(--scale));transform-origin:center;display:grid;grid-template-rows:64px 1fr 58px;background:#111820}.hud{display:flex;align-items:center;justify-content:space-between;padding:6px 10px;background:#101722;border-bottom:1px solid #334155}.hg,.speed{display:flex;gap:6px}.hb{min-width:135px;padding:6px 9px;background:#1b2634;border:1px solid #3a4b60;border-radius:9px;display:flex;justify-content:space-between;align-items:baseline;gap:8px}.hb strong{font-size:17px}.speed button{min-width:48px;min-height:42px;border:1px solid #526275;background:#263444;border-radius:8px;font-weight:800}.speed button.on{background:#8b6736;border-color:#d6b06c}.area{position:relative;overflow:hidden}.res{position:absolute;left:10px;top:8px;bottom:8px;width:168px;background:#182230;border:1px solid #3c4a5c;border-radius:12px;padding:10px;overflow:auto;z-index:4}.res h3{margin:0 0 8px}.ri{padding:7px;margin:6px 0;border-left:4px solid #d89595;background:#222e3c;border-radius:7px;font-size:11px}.test{width:100%;padding:9px;border:1px solid #53657b;background:#243142;border-radius:8px}.map{position:absolute;inset:8px 10px 8px 188px;border:3px solid #303a45;border-radius:14px;background:#c3b18f;overflow:hidden}.z{position:absolute;border:3px solid #4f443a;background:#d0bc98;color:#241f1b;border-radius:8px;font-weight:800;min-width:44px;min-height:44px}.z span{display:block}.sub{font-size:11px;margin-top:4px}.wait{left:2%;top:3%;width:23%;height:24%}.ent{left:42%;top:1%;width:14%;height:11%}.rec{right:16%;top:4%;width:17%;height:20%}.staffroom{right:2%;top:3%;width:13%;height:26%}.room{background:linear-gradient(#c7aa83,#b9936f)}.r101{left:5%;top:34%;width:25%;height:27%}.r102{left:33%;top:34%;width:22%;height:27%}.r103{right:5%;top:34%;width:25%;height:27%}.r201{left:20%;bottom:3%;width:28%;height:24%}.r202{right:20%;bottom:3%;width:28%;height:24%}.back{left:2%;bottom:4%;width:14%;height:14%}.cv,.ch{position:absolute;background:#d7c8aa;border:2px solid rgba(90,76,58,.25)}.cv{left:47%;top:11%;width:11%;height:85%}.ch{left:15%;top:62%;width:76%;height:10%}.actors{position:absolute;inset:0;pointer-events:none}.actor{position:absolute;z-index:5;pointer-events:auto}.actor.char{width:92px;height:104px;transform:translate(-50%,-50%);display:flex;align-items:flex-end;justify-content:center;background:transparent;border:0;border-radius:0;cursor:pointer}.actor.char img{display:block;max-width:86px;height:78px;object-fit:contain;filter:drop-shadow(0 3px 2px rgba(0,0,0,.42))}.actor.owner{left:51%;top:25%}.actor.staff{width:32px;height:32px;border-radius:50%;border:2px solid #251e1a;display:grid;place-items:center;font-size:16px;background:#87aee0}.actor.a{left:75%;top:18%}.actor.b{left:90%;top:19%}.lab{position:absolute;left:50%;bottom:-2px;transform:translate(-50%,100%);font-size:9px;background:#222d;color:#fff;padding:2px 4px;border-radius:4px;white-space:nowrap}.actor.char .lab{bottom:6px}.sheet.profile-mode{max-height:88%}.profile{display:grid;grid-template-columns:40% 1fr;gap:14px;min-height:465px}.profile-art{height:465px;background:#050505;border:1px solid #3f5063;border-radius:12px;display:grid;place-items:center;overflow:hidden}.profile-art img{width:100%;height:100%;object-fit:contain}.profile-info{display:flex;flex-direction:column;gap:8px}.status-badge{display:inline-flex;align-items:center;width:max-content;padding:6px 10px;border-radius:999px;background:#315e3b;border:1px solid #5f8f69;font-weight:800}.status-badge.before{background:#334155;border-color:#64748b}.status-badge.after{background:#232a33;border-color:#475569}.status-badge.busy{background:#6b3737;border-color:#945353}.status-badge.wait{background:#665126;border-color:#9b7b38}.statline{display:grid;grid-template-columns:74px 1fr 44px 28px;align-items:center;gap:7px;margin:6px 0}.statbar{height:10px;background:#111827;border-radius:999px;overflow:hidden;border:1px solid #415166}.statfill{height:100%;background:linear-gradient(90deg,#8b6736,#d6b06c)}.profile-actions{margin-top:auto;display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.profile-note{line-height:1.65}.owner-card{display:grid;grid-template-columns:180px 1fr;gap:14px;align-items:center}.owner-card img{height:250px;max-width:170px;object-fit:contain;justify-self:center}.nav{display:grid;grid-template-columns:repeat(6,1fr);background:#101722}.nav button{border:0;border-right:1px solid #39485c;background:#192331;font-weight:800}.nav button:first-child{background:#7a5b34}.sheet{position:absolute;z-index:50;visibility:hidden;pointer-events:none;left:0;right:0;bottom:58px;max-height:64%;background:#151f2a;border-top:2px solid #526275;border-radius:16px 16px 0 0;padding:8px 14px 14px;transform:translateY(110%);transition:.18s;overflow:auto}.sheet.open{transform:translateY(0);visibility:visible;pointer-events:auto}.shead{display:flex;justify-content:space-between;align-items:center}.shead h2{margin:4px 0 8px}.close,.act{min-height:46px;border:1px solid #526275;background:#2a394a;border-radius:8px;padding:8px}.danger{background:#6b3737}.good{background:#315e3b}.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.card{background:#202c39;border:1px solid #3f5063;border-radius:9px;padding:10px;margin:8px 0}.row{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}.mini{font-size:12px;color:#b7c0cc}select,input{min-height:42px;border-radius:8px;border:1px solid #526275;background:#101722;padding:8px;font-size:16px}.toast{position:absolute;z-index:80;left:50%;bottom:72px;transform:translate(-50%,20px);opacity:0;background:#0d1520;border:1px solid #53657b;padding:9px 13px;border-radius:9px;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}.gate,.rot{position:fixed;inset:0;z-index:9999;background:#080d14;display:grid;place-items:center;padding:20px}.gcard{width:min(460px,92vw);background:#16202c;border:1px solid #405267;border-radius:18px;padding:24px;text-align:center}.gcard button{margin-top:14px;min-height:52px;padding:0 18px;border:1px solid #d5b06d;background:#8b6736;border-radius:12px;font-weight:800}.rot{display:none}.started .gate{display:none}.version{position:absolute;right:8px;bottom:62px;font-size:10px;color:#95a0ae;z-index:10}@media(orientation:portrait){body.started .rot{display:grid}}

/* v0.2.4a image-layout repair: keep the entire standing portrait in the panel. */
.profile-art{position:relative;display:block;min-width:0;min-height:0}
.profile-art img{position:absolute;inset:0;display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain}
.toast{pointer-events:none}


/* v0.2.5 formal high-quality map */
.map{background:#080d14!important;border:2px solid #364354!important;border-radius:12px!important;overflow:hidden!important}
.mapstage{position:absolute;top:0;bottom:0;left:50%;aspect-ratio:1448/1086;transform:translateX(-50%);overflow:hidden;background:#080d14}
.mapbg{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none;image-rendering:auto}
.mapstage .z{position:absolute!important;background:transparent!important;border:0!important;color:transparent!important;border-radius:8px!important;min-width:0!important;min-height:0!important;padding:0!important;z-index:4!important}
.mapstage .z:active{outline:3px solid #d6b06caa;background:#d6b06c22!important}
.mapstage .z>span:first-child{display:none!important}
.mapstage .z .sub{display:block!important;position:absolute;left:50%;bottom:4px;transform:translateX(-50%);font-size:10px!important;color:#fff!important;background:#101722d9;padding:2px 5px;border:1px solid #526275;border-radius:5px;white-space:nowrap;line-height:1.2}
.mapstage .z .sub[id^="c"]{display:none!important}
.mapstage .wait .sub{bottom:8px}
.mapstage .ent,.mapstage .back,.mapstage .toilet,.mapstage .manager,.mapstage .staffroom{font-size:0!important}

/* transparent tap zones matched to v0.2.5 map */
.mapstage .wait{left:6.5%!important;top:2.5%!important;width:34%!important;height:27%!important}
.mapstage .ent{left:41%!important;top:0%!important;width:18.5%!important;height:30%!important}
.mapstage .rec{left:57.5%!important;top:4%!important;width:16%!important;height:27%!important}
.mapstage .staffroom{left:74%!important;top:3%!important;width:22.5%!important;height:27%!important}
.mapstage .r101{left:6.5%!important;top:31%!important;width:23%!important;height:27%!important}
.mapstage .r102{left:29.5%!important;top:31%!important;width:19.5%!important;height:27%!important}
.mapstage .toilet{left:53.5%!important;top:31%!important;width:12.5%!important;height:27%!important}
.mapstage .manager{left:66%!important;top:31%!important;width:16.5%!important;height:27%!important}
.mapstage .r103{left:24%!important;top:61%!important;width:19%!important;height:27.5%!important}
.mapstage .r104{left:43%!important;top:61%!important;width:17.5%!important;height:27.5%!important}
.mapstage .r105{left:60.5%!important;top:61%!important;width:18.5%!important;height:27.5%!important}
.mapstage .back{left:7%!important;top:58%!important;width:16.5%!important;height:31%!important}

.mapstage .actors{position:absolute;inset:0;pointer-events:none;z-index:8}
.mapstage .actor.char,.mapstage .actor.staffActor{position:absolute!important;width:54px!important;height:70px!important;display:flex;align-items:flex-end!important;justify-content:center!important;transform:translate(-50%,-100%)!important;background:transparent!important;border:0!important;border-radius:0!important;pointer-events:auto!important;overflow:visible!important;z-index:10}
.mapstage .actor.char img,.mapstage .actor.staffActor img{width:100%!important;height:100%!important;object-fit:contain!important;image-rendering:auto;filter:drop-shadow(0 2px 2px #000a)!important}
.mapstage .actor .lab{top:auto!important;bottom:-3px!important;transform:translate(-50%,100%)!important;font-size:8px!important;padding:1px 4px!important}

/* Staff positions are controlled only by the movement engine. */

.mapstage .customerActor{position:absolute;width:50px;height:66px;transform:translate(-50%,-100%);z-index:9;pointer-events:none;display:flex;align-items:flex-end;justify-content:center}
.mapstage .customerActor img{width:100%;height:100%;object-fit:contain;image-rendering:auto;filter:drop-shadow(0 2px 2px #000a)}
.mapstage .customerActor .lab{position:absolute;left:50%;bottom:-3px;transform:translate(-50%,100%);font-size:8px;background:#222d;color:#fff;padding:1px 4px;border-radius:4px;white-space:nowrap}
.maphint{position:absolute;right:6px;bottom:5px;z-index:12;font-size:9px;padding:3px 6px;border-radius:5px;background:#101722bb;color:#e5e7eb;pointer-events:none}

.asset-health{position:absolute;left:4px;bottom:5px;z-index:15;background:#101722d9;color:#d5b06d;font-size:11px;padding:4px 6px;border-radius:4px;max-width:65%}.asset-health.error{background:#6b3737;color:#fff}.asset-health button{font-size:11px;padding:4px}

/* v0.2.8-pre1 operational UI */
.ops-alert{position:absolute;right:16px;top:16px;z-index:30;min-height:44px;border:1px solid #d5b06d;background:#7a5b34;border-radius:8px;padding:8px 12px}
.ops-alert[hidden]{display:none}
.act:disabled{opacity:.45;cursor:not-allowed}
.document-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
progress{display:block;width:100%;height:18px;margin:10px 0}
.sheet p{line-height:1.55}


/* v0.3.0-pre1 map zoom / pan + NPC movement */
.map{touch-action:none!important}
.mapstage{--map-zoom:1;--map-pan-x:0px;--map-pan-y:0px;left:calc(50% + var(--map-pan-x))!important;top:var(--map-pan-y)!important;bottom:auto!important;height:100%!important;transform:translateX(-50%) scale(var(--map-zoom))!important;transform-origin:center center!important;will-change:transform,left,top}
.map-zoom-controls{position:absolute;right:8px;top:66px;z-index:35;display:flex;gap:5px;align-items:stretch;pointer-events:auto;touch-action:manipulation}
.map-zoom-controls button{min-width:44px;height:44px;padding:0 10px;border:1px solid #718096;background:#152131e6;color:#fff;border-radius:9px;font-weight:900;box-shadow:0 2px 7px #0007;touch-action:manipulation}
.map-zoom-controls button:disabled{opacity:.4}
#mapZoomReset{min-width:66px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.05}
#mapZoomReset small{font-size:9px;font-weight:700;color:#cbd5e1;margin-top:2px}
#mapZoomLabel{font-size:11px}
.map.panning{cursor:grabbing}
.map.panning .mapstage{transition:none!important}

/* v0.3.0-pre1 daily report / save */
.report-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;margin-bottom:10px;background:#172536;border:1px solid #4d6985;border-radius:12px}.report-hero b{font-size:22px}.report-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:8px}.report-grid .card{margin:0;display:flex;justify-content:space-between;align-items:center;min-height:58px}.report-grid .card b{font-size:17px}.card.warn{border-color:#b8754c;background:#2e211b}.report-link{width:100%;text-align:left;color:inherit;cursor:pointer}.report-link:hover{filter:brightness(1.08)}

/* v0.3.0-pre1 NPC movement: existing elements glide between map waypoints. */
.mapstage .actor.char,.mapstage .actor.staffActor,.mapstage .customerActor{transition:none}
.mapstage .customerActor[data-status="お見送り中"] .lab{background:#6b4f2aee}
.mapstage .customerActor[data-status="退店移動中"]{opacity:.9}

/* v0.3.1 feet-based, speed-synchronised navigation. No CSS positional transition. */
.npc-activity{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);padding:2px 4px;border:1px solid #a79061;border-radius:5px;background:#17202fe6;color:#f5e7bd;font-size:8px;line-height:1.2;white-space:nowrap;pointer-events:none}
.npc-activity[hidden]{display:none}
.staffActor .npc-activity{border-color:#6888a9;color:#d3e8ff}
.mapstage .actor img,.mapstage .customerActor img{will-change:transform}
@media(prefers-reduced-motion:reduce){.mapstage .actor img,.mapstage .customerActor img{transform:none!important}}

/* v0.3.1-pre2: room assignment workspace */
.assign-workspace{display:grid;grid-template-columns:1.12fr .88fr;gap:10px;align-items:start}.assign-section-title{font-size:15px;font-weight:900;margin-bottom:8px}.assign-shift-list{display:grid;gap:6px}.assign-cast-row{width:100%;min-height:54px;border:1px solid #526275;border-radius:9px;background:#172433;padding:7px 9px;display:grid;grid-template-columns:1fr auto 92px;align-items:center;gap:8px;text-align:left}.assign-cast-row span{display:flex;flex-direction:column}.assign-cast-row small{font-size:10px;color:#aeb9c6;margin-top:2px}.assign-cast-row strong{font-size:16px;color:#f3d392;white-space:nowrap}.assign-cast-row em{font-size:11px;font-style:normal;color:#b7c0cc;text-align:right}.assign-cast-row:active{background:#29405a}.assign-editor label{display:flex;flex-direction:column;gap:4px;margin-bottom:7px;font-size:12px}.assign-editor select{width:100%}.assign-time-row{display:grid;grid-template-columns:1fr 1fr;gap:7px}.assign-editor .act{width:100%;margin-top:5px}.assign-hint{min-height:48px;margin:8px 0;padding:7px 9px;border-radius:8px;border:1px solid #496276;background:#162431;font-size:12px;line-height:1.45}.assign-hint.ok{border-color:#4d7a58;background:#17301f;color:#d6f3dc}.assign-hint.warn{border-color:#9a7044;background:#342719;color:#ffe1ad}.assign-current-row,.assign-overview-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid #344354}.assign-current-row:last-child,.assign-overview-row:last-child{border-bottom:0}.assign-current-row .compact{min-height:34px;padding:4px 10px}.assign-overview-row b{min-width:64px}.assign-overview-row span{font-size:12px;text-align:right;color:#d8dee8}.assign-overview{margin-bottom:0}@media(max-width:800px){.assign-workspace{grid-template-columns:1fr}}

/* v0.3.3-pre2: read-only reservation overview + owner reception */
.reservation-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:5px 0 10px}.reservation-summary>div{background:#202c39;border:1px solid #3f5063;border-radius:9px;padding:8px;display:flex;justify-content:space-between;align-items:center}.reservation-summary span{font-size:11px;color:#b7c0cc}.reservation-summary b{font-size:18px}.reservation-actions{margin-bottom:8px}.reservation-list{display:grid;gap:7px}.reservation-card{margin:0}.reservation-time{font-size:18px;color:#f3d392}.reservation-state{font-size:11px;background:#162433;border:1px solid #506175;border-radius:999px;padding:4px 7px}.reservation-name{font-weight:800;margin:5px 0}.reservation-meta{display:flex;gap:6px;flex-wrap:wrap}.reservation-meta span{font-size:11px;background:#152131;border:1px solid #435469;padding:3px 6px;border-radius:6px}.reservation-room-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin:8px 0 12px}@media(max-width:800px){.reservation-room-grid{grid-template-columns:repeat(3,1fr)}}

.reservation-info{border-color:#52667c;background:#162230}.reservation-info b{color:#f0d69b}

/* v0.3.4-pre2: owner reception desk, customer history, warehouse, staff directives */
.customer-summary{display:grid;grid-template-columns:1.2fr .8fr .8fr;gap:7px;margin:4px 0 8px}.customer-summary>div{background:#172433;border:1px solid #435469;border-radius:9px;padding:8px;display:flex;flex-direction:column;gap:3px}.customer-summary span{font-size:10px;color:#aeb9c6}.customer-summary b{font-size:16px}.reception-history{max-height:185px;overflow:auto}.history-row{display:grid;grid-template-columns:70px 150px 1fr;gap:8px;align-items:start;padding:6px 0;border-top:1px solid #344354}.history-row:first-of-type{margin-top:7px}.history-row span{font-size:10px;color:#e2c98e}.history-row b{font-size:11px}.history-row em{font-size:11px;font-style:normal;color:#b7c0cc;line-height:1.4}.reception-request{border-color:#8a6b3d;background:#2b251c}.request-chips{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.request-chip{font-size:11px;padding:4px 7px;border-radius:999px;background:#152131;border:1px solid #607086}.reception-decision{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}.reception-decision label,.staff-directive-card label{display:flex;flex-direction:column;gap:4px;font-size:11px}.slot-list{display:grid;gap:6px;margin-top:8px}.slot-option{width:100%;min-height:50px;border:1px solid #526275;border-radius:8px;background:#1c2b3b;color:#fff;padding:7px 9px;display:flex;justify-content:space-between;align-items:center;text-align:left}.slot-option b{color:#f1d596}.slot-option span{font-size:11px;color:#c6d0dc}.slot-option.unacceptable{opacity:.45}.warn-text{margin-top:8px;color:#ffd1a1;font-size:12px}.reception-pending{width:100%;text-align:left;color:inherit}.reception-pending:active{filter:brightness(1.13)}
.warehouse-list{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.warehouse-item{width:100%;min-height:70px;border:1px solid #526275;border-radius:10px;background:#182634;color:#fff;padding:9px;display:grid;grid-template-columns:1fr 70px 115px;gap:8px;align-items:center;text-align:left}.warehouse-item span{display:flex;flex-direction:column}.warehouse-item small{color:#aeb9c6}.warehouse-item strong{font-size:20px;text-align:center}.warehouse-item em{font-style:normal;font-size:11px;text-align:right}.warehouse-item.good{border-color:#4f765b}.warehouse-item.used{border-color:#9a7448;background:#2b261d}.warehouse-item.poor{border-color:#a95050;background:#332020}.warehouse-item.broken{opacity:.55}.staff-directive-card select{width:100%;margin-top:5px}@media(max-width:800px){.customer-summary{grid-template-columns:1fr 1fr 1fr}.history-row{grid-template-columns:60px 120px 1fr}.reception-decision{grid-template-columns:1fr}.warehouse-list{grid-template-columns:1fr}}
/* v0.3.4-pre2: reservation proposal/consent flow */
.slot-option{display:grid;grid-template-columns:150px 1fr auto;gap:10px}.slot-option small{font-size:10px;color:#9fc7ee;white-space:nowrap}.owner-offer{border-color:#5176a5;background:#18283a}.owner-offer .offer-time{font-size:22px;font-weight:900;color:#f1d596;margin:8px 0}.card.warn{border-color:#9a7044;background:#342719}@media(max-width:800px){.slot-option{grid-template-columns:1fr}.slot-option small{white-space:normal}}

/* v0.3.4-pre3: customer memo + 5-minute reservation offers */
.customer-memo textarea{width:100%;box-sizing:border-box;min-height:70px;margin:7px 0;padding:8px 10px;border-radius:8px;border:1px solid #506175;background:#101b27;color:#fff;resize:vertical;font:inherit}.customer-memo .compact{min-height:34px;padding:5px 10px}.offer-select-label{display:flex;flex-direction:column;gap:5px;margin:9px 0;font-size:11px;color:#cbd5e1}.offer-select-label select{width:100%;min-height:42px;background:#101b27;color:#fff;border:1px solid #526275;border-radius:8px;padding:7px}.customer-memo .row span{font-size:11px;color:#f1d596;text-align:right}

/* v0.3.5-pre2: Royal calendar, cast documents Phase 1, shift trust/audit */
.sheet.document-mode{left:14px;right:14px;bottom:66px;top:70px;max-height:none;border:1px solid #58697d;border-radius:14px;padding:12px 16px;background:#121a24}
.sheet.document-mode #body{min-height:500px}
.manager-hub{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:8px 0}.manager-category{min-height:110px;text-align:left;border:1px solid #526275;border-radius:12px;background:#1c2937;color:#fff;padding:16px;display:flex;flex-direction:column;gap:8px}.manager-category b{font-size:20px}.manager-category span{font-size:12px;color:#bac5d2}.manager-category:active{background:#29405a}
.doc-list-head{display:flex;justify-content:space-between;align-items:center;padding:6px 2px 10px}.cast-file-list{display:grid;gap:7px}.cast-file-row{width:100%;display:grid;grid-template-columns:1.2fr 1fr 100px 110px;align-items:center;gap:10px;text-align:left;background:#1d2a38;border:1px solid #435468;border-radius:9px;color:#fff;padding:10px 12px}.cast-file-row span:first-child{display:flex;flex-direction:column}.cast-file-row small{color:#aeb9c6}.doc-status{text-align:right}.doc-status.good{color:#9fe0aa}.doc-status.warn{color:#f0ce87}.doc-status.bad{color:#f49a9a}
.doc-workspace{display:grid;grid-template-columns:180px 1fr;gap:12px;align-items:start}.doc-tabs{display:flex;flex-direction:column;gap:6px;position:sticky;top:0}.doc-tabs button{min-height:48px;border:1px solid #526275;background:#1b2937;color:#fff;border-radius:8px;text-align:left;padding:8px 10px}.doc-tabs button.active{background:#795c35;border-color:#d0ad6e}.doc-paper{background:#f1ead8;color:#29231d;border:1px solid #ae9d7d;border-radius:4px;padding:18px;box-shadow:0 8px 22px #0006}.paper-title{text-align:center;font-family:serif;font-size:28px;font-weight:900;letter-spacing:.3em;margin:2px 0 14px}.paper-dates{display:flex;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:2px solid #8c806a;font-size:12px}.paper-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:0 16px}.paper-row{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px solid #c8bda7;font-size:12px}.paper-row span{color:#685e50}.paper-row b{text-align:right}.paper-warning{color:#79551f!important;margin:8px 0}.actual-join-editor{display:grid;grid-template-columns:1.5fr repeat(3,.7fr) auto auto;gap:6px;align-items:center;padding:10px 0}.actual-join-editor input{min-width:0;background:#fffaf0;color:#211d18;border-color:#a99a80}.compact{min-height:36px!important;padding:5px 8px!important}.doc-main{display:grid;grid-template-columns:1fr 340px;gap:12px}.identity-stack{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.identity-card{background:#d9eee8;color:#213a38;border:1px solid #7fa8a0;border-radius:9px;padding:12px}.identity-head{display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid #8db1ab;padding-bottom:8px}.identity-head span{font-size:10px}.identity-face{height:138px;margin:8px 0;background:#bfd9d3;border:1px dashed #668b84;display:grid;place-items:center;font-size:12px;overflow:hidden;position:relative}.identity-face.has-photo{border-style:solid;background:#dedad2}.identity-face img{width:100%;height:100%;display:block;object-fit:cover;object-position:center 35%}.identity-photo-fallback{padding:8px;text-align:center;color:#355b55}.identity-checks label{display:block;margin:9px 0}.identity-checks select{width:100%}.contract-signatures{display:flex;gap:16px;align-items:center;margin-top:18px;padding-top:12px;border-top:2px solid #8c806a}.doc-log{display:grid;gap:6px}.log-row{display:grid;grid-template-columns:150px 130px 1fr;gap:10px;align-items:start;background:#202c39;border:1px solid #3f5063;border-radius:8px;padding:9px}.log-row span{font-size:11px;color:#d9c28d}.log-row em{font-size:12px;font-style:normal;color:#c0cad6}.reservation-risks{display:grid;gap:6px;margin:8px 0}.risk{padding:8px 10px;border:1px solid #526275;border-radius:8px;display:flex;flex-direction:column;gap:3px;font-size:12px}.risk.ok{border-color:#4c7858;background:#162c1d}.risk.warn{border-color:#a1733c;background:#352616}.risk.severe{border-color:#a94e4e;background:#391d1d}.risk.audit{border-color:#7f5da6;background:#281e37}.risk span{color:#d9e0e8}.contract-paper{max-width:820px}.hb:first-child{min-width:250px}
@media(max-width:800px){.sheet.document-mode{left:4px;right:4px;top:66px}.doc-workspace{grid-template-columns:145px 1fr}.doc-main{grid-template-columns:1fr}.paper-grid{grid-template-columns:1fr}.identity-stack{grid-template-columns:1fr}.cast-file-row{grid-template-columns:1fr 1fr}.actual-join-editor{grid-template-columns:1fr 1fr 1fr}.actual-join-editor b{grid-column:1/-1}.manager-hub{grid-template-columns:1fr 1fr}}

/* v0.3.6-pre3: manual reservation flow, actual service board, Android profile fallback */
.profile-art{background:linear-gradient(180deg,#111a24,#070b10)}
.profile-art img.broken{display:none}
.profile-art img.fallback-sprite{object-fit:contain;padding:18px;box-sizing:border-box;image-rendering:auto}
.profile-art-placeholder{display:none;position:absolute;inset:0;place-items:center;text-align:center;padding:20px;color:#9aa8b8;font-size:12px}
.profile-art.portrait-missing .profile-art-placeholder{display:grid}
.doc-workspace>.doc-log{grid-column:2;min-width:0}
.log-row{grid-template-columns:minmax(130px,150px) minmax(100px,130px) minmax(0,1fr);min-width:0}
.log-row b,.log-row em{min-width:0;overflow-wrap:anywhere;word-break:normal}
.identity-state{display:flex;justify-content:space-between;gap:8px;align-items:center;margin:0 0 10px;padding:7px 9px;border-radius:8px;border:1px solid #526275;background:#172230}
.identity-state span{font-size:10px;color:#b9c4d0;text-align:right}
.identity-state.done{border-color:#4d7c5a;background:#17291e}.identity-state.done b{color:#a8e1b4}
.identity-state.pending{border-color:#99743f;background:#302617}.identity-state.pending b{color:#f0cf8e}
@media(max-width:800px){
 .doc-workspace{grid-template-columns:145px minmax(0,1fr)}
 .doc-workspace>.doc-log{grid-column:2}
 .log-row{grid-template-columns:118px 92px minmax(0,1fr);gap:7px}
}

/* v0.3.6-pre3: manual reservation time selection + final confirmation */
.sheet.schedule-mode{left:10px;right:10px;top:72px;bottom:64px;max-height:none;border:1px solid #5c6778;border-radius:14px;background:#111a25;padding:10px 14px 14px}
.sheet.schedule-mode #body{min-height:500px}
.schedule-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:2px 0 8px}
.schedule-tabs button{min-height:44px;border:1px solid #4a5b70;background:#1a2735;color:#f4f0e8;border-radius:8px;font-weight:800}
.schedule-tabs button.active{background:#80613a;border-color:#d7b574;color:#fff7df;box-shadow:inset 0 0 0 1px #e4c78b55}
.schedule-datebar{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#182433;border:1px solid #3e4e62;border-radius:9px;padding:7px 10px;margin-bottom:8px}
.schedule-datebar b{font-size:16px;color:#f0d49a}.schedule-datebar span{font-size:11px;color:#b9c4d0}.schedule-datebar .act{margin-left:auto}
.schedule-frame{border:1px solid #526275;border-radius:10px;background:#0c131c;overflow:hidden}
.schedule-scroll{overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-color:#786343 #17202b;scrollbar-width:thin}
.schedule-board{display:grid;grid-template-columns:180px var(--schedule-width);width:calc(180px + var(--schedule-width));min-width:100%;background:#0f1721}
.schedule-corner,.schedule-cast-label{position:sticky;left:0;z-index:7;background:#172434;border-right:1px solid #59687a}
.schedule-corner{height:46px;display:flex;align-items:center;padding:0 12px;font-weight:900;border-bottom:1px solid #59687a}
.schedule-time-head{position:relative;height:46px;background:#172434;border-bottom:1px solid #59687a;background-image:repeating-linear-gradient(to right,rgba(255,255,255,.11) 0 1px,transparent 1px 60px),repeating-linear-gradient(to right,rgba(226,190,118,.18) 0 1px,transparent 1px 120px)}
.schedule-hour{position:absolute;top:14px;transform:translateX(-50%);font-size:11px;color:#e8dcc2;font-weight:800;white-space:nowrap}.schedule-hour:first-child{transform:none}.schedule-hour:last-child{transform:translateX(-100%)}
.schedule-cast-label{height:76px;padding:12px;display:flex;flex-direction:column;justify-content:center;gap:4px;border-bottom:1px solid #465568}
.schedule-cast-label b{font-size:17px}.schedule-cast-label small{font-size:10px;color:#b7c1cd}.schedule-cast-label.focused{background:#2b2a28;box-shadow:inset 4px 0 #d5ae68}
.schedule-track{position:relative;height:76px;background:#111923;border-bottom:1px solid #465568;overflow:hidden}
.schedule-track::after{content:"";position:absolute;inset:0;z-index:5;pointer-events:none;background-image:repeating-linear-gradient(to right,rgba(255,255,255,.10) 0 1px,transparent 1px 60px),repeating-linear-gradient(to right,rgba(219,182,112,.17) 0 1px,transparent 1px 120px)}
.schedule-track.focused{box-shadow:inset 0 0 0 2px #d6b36b88}
.schedule-shift-window{position:absolute;top:0;bottom:0;z-index:1;background:#efe7d7;border-left:2px solid #b99e6d;border-right:2px solid #b99e6d}
.schedule-shift-window.just{background:#e6eaf2;border-color:#8798b8}
.schedule-reservation{position:absolute;top:12px;height:51px;z-index:4;border:1px solid #d1b370;background:#171717;color:#fff6e5;border-radius:5px;padding:5px 7px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;overflow:hidden;text-align:left;white-space:nowrap;box-shadow:0 2px 4px #0007}
.schedule-reservation b{font-size:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis}.schedule-reservation span{font-size:9px;color:#d8cbb2;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.schedule-reservation.done{opacity:.5}.schedule-reservation.arrived{border-color:#6cae7d}.schedule-reservation.warn{border-color:#d68d43;background:#3b2916}.schedule-reservation.severe{border-color:#df6565;background:#441f1f}.schedule-reservation.audit{box-shadow:inset 0 0 0 2px #9f73d4,0 2px 4px #0007}.schedule-reservation.rejected{opacity:.35;text-decoration:line-through}
.schedule-service{position:absolute;top:8px;height:59px;z-index:5;border:2px solid #72d7a2;background:#173e2d;color:#effff5;border-radius:6px;padding:5px 7px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;overflow:hidden;text-align:left;white-space:nowrap;box-shadow:0 2px 5px #0009}.schedule-service b{font-size:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis}.schedule-service span{font-size:9px;color:#c9f3d9;max-width:100%;overflow:hidden;text-overflow:ellipsis}.schedule-service.active{border-color:#9aefbf;background:#1b5238;box-shadow:inset 0 0 0 1px #d1ffe155,0 2px 5px #0009}.schedule-service.finished{opacity:.72}
.schedule-now-line,.schedule-focus-line{position:absolute;top:0;bottom:0;width:2px;z-index:6;pointer-events:none}.schedule-now-line{background:#df5c5c;box-shadow:0 0 0 1px #32000066}.schedule-focus-line{background:#4cb4f6;box-shadow:0 0 0 1px #082f4966}
.schedule-time-head .schedule-now-line,.schedule-time-head .schedule-focus-line{z-index:4}
.schedule-legend{display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:7px 10px;background:#121c28;border-top:1px solid #405064;font-size:10px;color:#c3ccd7}.schedule-legend span{display:flex;align-items:center;gap:5px}.schedule-legend .lg{width:16px;height:12px;border:1px solid #6a7788;border-radius:2px;display:inline-block}.schedule-legend .lg.shift{background:#efe7d7}.schedule-legend .lg.booked{background:#171717;border-color:#d1b370}.schedule-legend .lg.service{background:#1b5238;border-color:#9aefbf}.schedule-legend .lg.off{background:#111923}.schedule-legend .lg.just{background:#e6eaf2;border-color:#8798b8}
.schedule-help{margin:7px 2px 0}.schedule-frame.compact{margin:8px 0}.schedule-frame.compact .schedule-board{grid-template-columns:145px var(--schedule-width);width:calc(145px + var(--schedule-width))}.schedule-frame.compact .schedule-cast-label{height:58px;padding:8px 9px}.schedule-frame.compact .schedule-track{height:58px}.schedule-frame.compact .schedule-reservation{top:8px;height:41px;padding:3px 5px}.schedule-frame.compact .schedule-service{top:6px;height:45px;padding:3px 5px}.schedule-frame.compact .schedule-cast-label b{font-size:14px}.schedule-frame.compact .schedule-legend{padding:5px 8px}
@media(max-width:800px){.sheet.schedule-mode{left:4px;right:4px;top:66px;padding:8px}.schedule-board{grid-template-columns:150px var(--schedule-width);width:calc(150px + var(--schedule-width))}.schedule-frame.compact .schedule-board{grid-template-columns:125px var(--schedule-width);width:calc(125px + var(--schedule-width))}.schedule-datebar{flex-wrap:wrap}.schedule-datebar .act{margin-left:0}.schedule-cast-label{padding:8px}.schedule-cast-label b{font-size:14px}}

/* v0.3.6-pre9 recruitment */
.mapstage .actor.saphira{width:76px!important;height:70px!important}
.recruitment-ad-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.recruitment-ad-card{margin:0}.recruitment-ad-card button{width:100%;margin-top:8px}.applicant-card{width:100%;text-align:left;color:inherit;cursor:pointer;border-color:#8a6b3d;background:#2b251c}.applicant-profile{min-height:410px}.applicant-actions{margin-top:10px}@media(max-width:800px){.recruitment-ad-grid{grid-template-columns:1fr}.applicant-profile{grid-template-columns:36% 1fr}}
