:root{color-scheme:dark;--bg:#14191e;--panel:#1c232a;--border:#333c44;--muted:#a7b1bb;--gold:#edc083}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#edf1f3;font:16px/1.6 'Segoe UI','Yu Gothic UI',Meiryo,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid #46525e;background:#29323a;color:#f1f3f5;border-radius:7px;padding:8px 16px}button:hover{background:#394650}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid var(--gold);outline-offset:4px}input,select,textarea{width:100%;padding:11px 12px;color:#f4f5f6;background:#12181e;border:1px solid #46515b;border-radius:7px;resize:vertical}input:focus,select:focus,textarea:focus{outline:2px solid var(--gold)}label{display:block;font-size:14px;margin:20px 0 8px}label input,label select,label textarea{margin-top:8px}.primary{width:100%;background:var(--gold);color:#282118;font-weight:700;border-color:var(--gold);padding:12px}.primary:hover{background:#ffdaa4}.eyebrow{font-size:12px;letter-spacing:2px;color:var(--gold);font-weight:700;margin:0 0 8px}.muted,.footnote{color:var(--muted)}.footnote{font-size:13px}.login-page{min-height:100dvh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at top,#303b46 0,#14191e 65%)}.login-card{max-width:430px;width:100%;padding:40px;border:1px solid var(--border);border-radius:16px;background:#1c232af2;box-shadow:0 30px 80px #0005}.brand-mark{font-size:48px;line-height:1;color:var(--gold);margin-bottom:24px}h1{font-size:28px;line-height:1.4;margin:0}h2{font-size:21px;margin:0 0 12px}#error{color:#ffb2ac;min-height:24px;font-size:14px}header{display:flex;align-items:center;gap:28px;padding:20px 32px;border-bottom:1px solid var(--border)}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--gold);font-size:24px}.brand strong{font-size:16px;letter-spacing:2px;color:#f2f4f6}.header-caption{font-size:14px;color:var(--muted)}.account{margin-left:auto;display:flex;gap:20px;align-items:center;font-size:14px}.workspace{max-width:1740px;margin:auto;padding:32px}.title-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}#summary{color:var(--muted);font-size:14px}.office-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:24px}.map-card,.detail{border:1px solid var(--border);border-radius:12px;background:var(--panel);overflow:hidden}.map-toolbar,.map-footer{padding:14px 18px;display:flex;justify-content:space-between;gap:16px;font-size:13px;color:var(--muted)}.map-toolbar{border-bottom:1px solid var(--border)}.map-toolbar span:first-child{color:#e8edf1}.map-scroll{overflow:auto}#map{position:relative;min-width:760px}#map img{display:block;width:100%;height:auto;image-rendering:pixelated}.hotspot{position:absolute;transform:translate(-50%,-50%);width:11.5%;height:15%;background:transparent;border:2px solid transparent;border-radius:6px;padding:0;display:flex;align-items:flex-end;justify-content:center}.hotspot:hover,.hotspot[aria-pressed=true]{background:#ffcc6622;border-color:var(--gold);box-shadow:0 0 0 3px #191e2480}.hotspot .badge{font-size:12px;padding:1px 8px;white-space:nowrap;box-shadow:0 2px 6px #0006}.badge{display:inline-block;border-radius:4px;background:#34404a;color:#e1e7ec;font-size:13px;padding:3px 9px}.badge[data-status="作業中"]{background:#264d44;color:#a3ecd0}.badge[data-status="確認待ち"]{background:#674d2a;color:#ffe1ad}.detail{padding:26px 22px}.detail .muted{font-size:14px}.detail .primary{margin-top:10px}#message{font-size:14px;color:var(--gold)}.members-section{margin-top:30px}.section-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.section-heading h2{font-size:18px;margin:0}.section-heading span{font-size:12px;color:var(--muted);letter-spacing:1px}.members{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.member{display:flex;flex-direction:column;align-items:flex-start;gap:10px;text-align:left;padding:16px;background:var(--panel);border-color:var(--border)}.member[aria-pressed=true]{border-color:var(--gold)}.member span:first-child{font-size:14px;font-weight:600}@media(min-width:1500px){.office-layout{grid-template-columns:minmax(0,1fr) 320px}}@media(max-width:1050px){.office-layout{grid-template-columns:1fr}.members{grid-template-columns:repeat(4,minmax(0,1fr))}.detail{max-width:none}.detail form{max-width:600px}}@media(max-width:620px){header{padding:16px}.header-caption{display:none}.brand strong{font-size:13px}.account{gap:8px}.account span{max-width:90px;overflow:hidden;text-overflow:ellipsis}.workspace{padding:24px 16px}.title-row{display:block}h1{font-size:25px}.members{grid-template-columns:repeat(2,minmax(0,1fr))}.map-toolbar,.map-footer{flex-wrap:wrap}.login-card{padding:28px}.map-toolbar span:last-child{font-size:12px}}

.setup-notice{display:flex;gap:16px;padding:16px 20px;margin-bottom:20px;border:1px solid #705935;border-radius:8px;background:#362f23;color:#edd5af;font-size:14px}.setup-notice[hidden]{display:none}.history-item{border-top:1px solid var(--border);margin-top:24px;padding-top:20px}.history-item time{color:var(--muted);font-size:12px}.history-item .request{font-size:14px;color:var(--gold);white-space:pre-wrap;overflow-wrap:anywhere}.history-item pre{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;font-size:14px;line-height:1.8;max-height:480px;overflow:auto}.badge[data-status="エラー"]{background:#683737;color:#ffd0ca}.badge[data-status="作業中"]{animation:pulse 1.5s infinite}@keyframes pulse{50%{box-shadow:0 0 0 3px #74c2a533}}@media(prefers-reduced-motion:reduce){.badge{animation:none!important}}@media(max-width:620px){.setup-notice{display:block}.setup-notice span{display:block;margin-top:8px}}

.live-label{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#292d34;color:white;font-weight:600;line-height:1.25;pointer-events:none;font-size:clamp(12px,1.1vw,18px)}.live-label strong{font-size:clamp(14px,1.6vw,25px)}.dev-label{left:56.5%;top:25.6%;width:8.4%;height:7.7%}.writer-label{left:71.4%;top:25.6%;width:9.3%;height:7.7%}.ceo-count{left:42.85%;top:36.8%;width:6%;height:3.1%;background:#f7e9d6;color:#86543d}.session-count{left:39.7%;top:43.5%;width:12.3%;height:2.5%;background:#306da7;font-size:12px}

/* Greenhouse office: daylight, sage, oak. */
:root{color-scheme:light;--bg:#f1f4ec;--panel:#fffef9;--border:#d6dfd0;--muted:#687568;--gold:#347052}body{color:#243b2c;background:radial-gradient(ellipse at top left,#e6efdf,transparent 55%),var(--bg)}header{background:#fffef9cc}.brand,.brand strong{color:#2e6549}.map-toolbar span:first-child{color:#31543e}.map-card,.detail{box-shadow:0 10px 35px #28452d08}.map-toolbar,.map-footer{background:#f8faf4}.map-toolbar{font-weight:600}.map-scroll{background:#e3ebdb}#map{min-width:880px}#map img{image-rendering:auto}.hotspot{width:10.5%;height:auto;min-height:42px;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:1px solid #ffffffbd;background:#fffef5eb;box-shadow:0 3px 9px #25432d30;border-radius:8px;padding:5px 3px;color:#26412f}.hotspot:hover,.hotspot[aria-pressed=true]{background:#e9f4df;border-color:#347052;box-shadow:0 0 0 3px #34705255;z-index:2}.pin-name{font-size:clamp(11px,.9vw,16px);line-height:1.3;white-space:nowrap}.hotspot .badge{font-size:10px;box-shadow:none;padding:1px 6px}.badge{background:#e2e9dc;color:#456047}.badge[data-status="作業中"]{background:#d1eadc;color:#226340}.badge[data-status="確認待ち"]{background:#fff0cd;color:#805819}.badge[data-status="エラー"]{background:#f7ded9;color:#873e32}button{background:#edf2e7;color:#294733;border-color:#bdcdb9}button:hover{background:#dfebd8}input,select,textarea{color:#243b2c;background:#fffefb;border-color:#c5d2bf}.primary{background:#347052;color:white;border-color:#347052}.primary:hover{background:#285a41}.member{background:#fffef9}.member[aria-pressed=true]{background:#e5efdf}.setup-notice{background:#f6f1dd;color:#655a33;border-color:#ddd3ad}.login-page{background:radial-gradient(ellipse at top,#dcebd4 0,#f1f4ec 75%)}.login-card{background:#fffef9f5;box-shadow:0 25px 70px #25432d18}#error{color:#a74336}.live-label{display:none}@media(max-width:620px){h1{font-size:23px}.map-footer{font-size:12px}.hotspot .badge{font-size:10px}}

/* Members rest at the back; active work stays at desks. */
.lounge-zone{position:absolute;left:4%;right:4%;top:9%;height:30%;border:1px solid #ffffffe0;border-radius:18px;background:linear-gradient(#eaf3dc8c,#f9f7e66b);box-shadow:0 6px 18px #2c4a2520;pointer-events:none}.lounge-zone>span{position:absolute;top:6px;left:16px;font-size:11px;letter-spacing:1px;font-weight:700;color:#244e38;background:#f5faeae8;padding:2px 9px;border-radius:20px}.hotspot{transition:left 1.2s ease-in-out,top 1.2s ease-in-out;min-height:38px;z-index:1}.hotspot[data-area=lounge]{background:#fffff0ed}.avatar{position:absolute;bottom:calc(100% + 4px);left:calc(50% - 9px);width:18px;height:19px;background:var(--shirt);border:2px solid #33443b;border-radius:5px 5px 2px 2px;box-shadow:-5px 3px 0 -2px var(--shirt),5px 3px 0 -2px var(--shirt)}.avatar:before{content:'';position:absolute;width:12px;height:13px;left:1px;top:-13px;background:#edc29c;border:2px solid #4c4034;border-top-width:5px;border-radius:5px 5px 3px 3px}.avatar:after{content:'';position:absolute;left:0;bottom:-6px;width:5px;height:6px;background:#34443e;box-shadow:9px 0 #34443e}.entrance{position:absolute;left:43%;top:80%;width:14%;height:19%;pointer-events:none;filter:drop-shadow(4px 6px 3px #273c3333)}.entrance-sign{display:block;text-align:center;background:#496953;color:#fffde8;border:4px solid #b38e5a;font-size:10px;letter-spacing:2px;line-height:18px}.door-frame{height:68%;border:6px solid #b99460;display:flex;background:#90bab599;box-shadow:inset 0 0 0 2px #665941}.door-frame i{position:relative;width:50%;border:2px solid #d0b182;background:linear-gradient(125deg,#e7ffff99 0 30%,#c1e2d63d 31% 63%,#f8fff96b 64% 70%,#b7d8cb66 71%)}.door-frame i:after{content:'';position:absolute;right:6px;top:45%;height:17px;width:3px;background:#665840}.door-frame i+i:after{left:6px;right:auto}.entrance-mat{display:block;width:80%;margin:0 auto;background:#78917d;color:#fff9e6;text-align:center;font-size:10px;letter-spacing:2px;border:2px solid #556e5b}@media(prefers-reduced-motion:reduce){.hotspot{transition:none}}

/* Seated sprite anchors and walking frames, scaled with the room. */
#map{container-type:inline-size}#map img{image-rendering:pixelated}.lounge-title{position:absolute;left:8%;top:8%;color:#335c43;background:#fffde8df;border:1px solid #a7bd93;padding:2px 8px;font-size:11px;letter-spacing:1px;pointer-events:none}.hotspot,.hotspot[data-area=lounge]{width:4.5%;aspect-ratio:1;height:auto;min-height:0;padding:0;border:0;background:transparent;box-shadow:none;transform:translate(-50%,-90%);border-radius:0;transition:none;display:block}.hotspot:hover,.hotspot[aria-pressed=true]{background:transparent;border:0;box-shadow:none;outline:0}.character-sprite{position:absolute;inset:0;background-image:url('index.php?asset=characters.png');background-size:300% 200%;background-position:var(--sprite-x,0%) var(--sprite-y,0%);image-rendering:pixelated;filter:hue-rotate(var(--hue,0deg));pointer-events:none}.hotspot[data-pose=walk] .character-sprite{animation:walking-bob .34s steps(2,end) infinite}.member-number{position:absolute;left:50%;top:92%;transform:translateX(-50%);min-width:15px;height:15px;line-height:14px;font-size:9px;text-align:center;border:1px solid #f7f8e7;background:#39634ee0;color:white;border-radius:50%;box-shadow:0 1px 2px #2636264d}.hotspot .pin-name,.hotspot>.badge{display:none;position:absolute;left:50%;transform:translateX(-50%);white-space:nowrap;pointer-events:none}.hotspot .pin-name{bottom:102%;padding:3px 7px;background:#fffdebf5;color:#254a34;border:1px solid #92a981;border-radius:4px;font-size:12px}.hotspot>.badge{top:calc(100% + 13px);font-size:10px}.hotspot:hover .pin-name,.hotspot:hover>.badge,.hotspot:focus-visible .pin-name,.hotspot:focus-visible>.badge,.hotspot[aria-pressed=true] .pin-name,.hotspot[aria-pressed=true]>.badge{display:block}.hotspot:focus-visible .member-number,.hotspot[aria-pressed=true] .member-number{outline:2px solid #c38b35;outline-offset:2px}.hotspot[data-area=desk] .member-number{background:#9b6c28}.hotspot[data-pose=walk] .member-number{background:#39739a}@keyframes walking-bob{50%{translate:0 -1px}}@media(prefers-reduced-motion:reduce){.character-sprite{animation:none!important}}
.character-sprite{filter:none}.entrance,.entrance-sign,.door-frame,.door-frame i,.entrance-mat{border-radius:0}.door-frame i{background:linear-gradient(135deg,#dceee18c 0 35%,#add0c170 35% 65%,#eff8e99c 65% 72%,#add0c170 72%)}
.hotspot,.hotspot[data-area=lounge]{width:6%}.character-sprite{inset:auto;left:50%;bottom:10%;transform:translateX(-50%);background-repeat:no-repeat;filter:none}.hotspot .pin-name{display:block;bottom:80%;font-size:11px;line-height:1.3;padding:2px 5px;border-radius:2px;background:#fffdebf2}.hotspot[data-pose=walk] .pin-name{bottom:97%}.hotspot[data-member="2"][data-area=lounge] .pin-name{bottom:108%}.member-number{display:none}.hotspot:focus-visible .pin-name,.hotspot[aria-pressed=true] .pin-name{outline:2px solid #c38b35}.hotspot>.badge{top:96%}
.hotspot[data-member="11"][data-area=lounge] .pin-name{bottom:108%}@container(max-width:1100px){.hotspot .pin-name{font-size:10px;padding:2px 4px}}

.hotspot>.badge[data-status="作業中"]{display:block;font-variant-numeric:tabular-nums}.badge[data-status="作業中"]{font-variant-numeric:tabular-nums}

/* Compact shell; office art and motion retain their existing styles. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
header{padding:12px 24px}.workspace{padding:18px 24px}.office-layout{grid-template-columns:minmax(0,1fr) 360px;align-items:start;gap:18px}
.detail{display:flex;flex-direction:column;min-width:0;height:clamp(620px,calc(100dvh - 110px),850px);padding:18px;position:sticky;top:16px}
.detail>*{flex-shrink:0}.member-picker-label{margin:0 0 6px;font-size:12px}.detail select{padding:8px 10px}.detail #detail-hint{margin:6px 0;font-size:12px}.detail label{margin:8px 0 4px}.detail textarea{max-height:150px;min-height:72px;padding:8px 10px}.detail .primary{margin-top:4px;padding:9px}.detail #updated{font-size:11px;margin:5px 0}.detail #message{margin:7px 0}.detail #message:empty{display:none}.sharing-note{font-size:11px;color:var(--muted);margin:4px 0}.sharing-note p{margin:4px 0;font-size:11px}
#history{flex:1 1 auto;min-height:140px;overflow:auto;overscroll-behavior:contain;margin-top:10px;padding-right:5px;scrollbar-gutter:stable}.history-item{margin-top:14px;padding-top:14px}.history-item:first-child{margin-top:0}.history-item pre{max-height:none;overflow:visible}.members-section{margin-top:18px}.section-heading{margin-bottom:8px}.member{padding:10px;gap:4px}.map-footer{padding:10px 14px;font-size:12px}
@media(max-width:1050px){.office-layout{grid-template-columns:1fr}.detail{position:static;height:640px}.detail form{max-width:none}.members{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:620px){header{padding:10px 14px}.workspace{padding:12px}.detail{height:640px;padding:14px}.members{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Use the available window width without a separate member list. */
.workspace{max-width:none;width:100%;padding:12px}.office-layout{gap:12px}.detail{height:calc(100dvh - 90px);min-height:580px;top:12px}
@media(max-width:1050px){.detail{height:640px;min-height:0}}

/* Fill the desktop workspace vertically, keeping all office coordinates visible. */
@media(min-width:1051px){
 .office-layout{height:calc(100dvh - 90px);min-height:580px;align-items:stretch}
 .map-card{display:flex;flex-direction:column;min-height:0;height:100%}
 .map-scroll{flex:1;min-height:0;overflow:hidden}
 #map{width:100%;height:100%;min-width:0}
 #map img{width:100%;height:100%;object-fit:fill}
 .map-footer{flex-shrink:0}
 .detail{height:100%;min-height:0;position:static}
}
