*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:'Yu Gothic UI','Meiryo',sans-serif;color:#514768;background:#e8e2f1;overscroll-behavior:none}button{font:inherit;border:0;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid #638de8;outline-offset:3px}button:active{transform:translateY(2px) scale(.97)}button:disabled{cursor:default}#game{position:relative;isolation:isolate;width:min(100%,460px);height:100svh;min-height:600px;max-height:1000px;margin:auto;display:grid;grid-template-rows:70px 150px minmax(115px,1fr) 286px 100px;background:#fff5e9;overflow:hidden;box-shadow:0 0 80px #70628835}header{display:flex;gap:7px;align-items:center;padding:13px 16px;background:linear-gradient(125deg,#f7edff,#e7edff);border-bottom:3px solid #fff;z-index:5}.brand{flex:1;white-space:nowrap}.brand span{font-size:12px;letter-spacing:2px;color:#9c79b3;display:block;font-weight:800}.brand b{font-size:15px;display:block;margin-top:3px}#stages{border-radius:14px;padding:7px 11px;background:#fff;box-shadow:0 3px 0 #d5cbea;color:#87769f;font-size:9px;letter-spacing:1px}#stages b{display:block;font-size:21px;line-height:23px;color:#675483}.round{border-radius:50%;background:#fff9;width:31px;height:31px;color:#8b7ba3;font-size:19px;flex-shrink:0}.task-zone{background:linear-gradient(#fff9ef,#f5e9da);padding:9px 13px 10px;z-index:3}.section-label{display:flex;align-items:center;justify-content:space-between;font-size:11px;font-weight:800;letter-spacing:1px;color:#9c887d;padding:0 4px 7px}#progress{font-size:11px;padding:2px 9px;background:#fff;border-radius:15px;color:#927da6}#tasks{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;height:112px}.task{position:relative;min-width:0;border-radius:20px;background:#fff;border:3px solid #fff;box-shadow:0 5px 0 #d7c5af;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px;color:#69606a;transition:transform .18s}.task.tea{background:#f0eaff;border-color:#cdbcee}.task.clean{background:#e9f6ef;border-color:#a7d4c0}.task.book{background:#fff0e5;border-color:#efc3a4}.task-name{font-size:10px;font-weight:800;line-height:17px;white-space:nowrap}.task-icon{width:36px;height:36px;display:block}.needs{display:flex;gap:5px;margin-top:7px}.need{width:22px;height:22px;display:grid;place-items:center;border-radius:50%;border:2px solid currentColor;font-size:12px;font-weight:bold;background:#fff9}.need.filled{background:currentColor}.need.filled span{color:#fff}.A{color:#5d85d7}.B{color:#d98393}.C{color:#78af92}.task.empty{border:2px dashed #d3c4b5;background:#ffffff40;box-shadow:none;color:#c0af9d;font-size:20px}.task.target{box-shadow:0 0 0 4px #ffe494,0 5px 0 #c9ab5c;transform:translateY(-3px)}.task.completed{animation:card-pop .55s ease both}.task.completed:after{content:'できた！';position:absolute;inset:30% -2px auto;background:#f8d96f;color:#8b672d;border-radius:10px;padding:9px;font-size:16px;font-weight:900;transform:rotate(-5deg)}#work{position:relative;background:repeating-linear-gradient(0deg,#f1dec5 0px,#f1dec5 31px,#ebd5ba 32px,#f1dec5 33px);overflow:hidden}.windows{height:47px;display:flex;justify-content:space-around;background:#f9eedf;border-bottom:5px solid #e3ccb0}.windows i{width:32px;height:34px;margin-top:3px;display:block;background:linear-gradient(90deg,transparent 47%,#fff6df 48%,#fff6df 55%,transparent 56%),linear-gradient(#cce8ec,#eff6ef);border:4px solid #fff7e9;border-radius:15px 15px 2px 2px;box-shadow:0 0 0 2px #e3cebb}.wall-border{position:absolute;top:46px;width:100%;height:8px;background:#c7ad9290}.rug{position:absolute;left:9%;right:9%;top:56px;bottom:37px;min-height:30px;border:4px solid #d5bcc8;border-radius:50%;background:#ead4dc;box-shadow:inset 0 0 0 3px #f5e4e9;opacity:.55}.hall-title{position:absolute;bottom:38px;left:0;right:0;text-align:center;font-size:9px;letter-spacing:3px;color:#b79d90;opacity:.8}.hall-title span{display:block;font-size:15px;margin-top:4px}#waiting{position:absolute;inset:0;display:grid;grid-template-columns:repeat(3,1fr);gap:9px;padding:0 13px;z-index:3}.team{position:relative;display:flex;justify-content:center;align-items:start;gap:0;padding-top:3px}.station-maid{width:40px;height:64px;display:flex;align-items:center;flex-direction:column}.station-maid .sprite{width:46px;height:46px;z-index:2}.station-maid .shadow{width:25px;margin-top:-8px}.station-maid small{font-size:8px;color:#8d7b75;white-space:nowrap;background:#fff9;padding:1px 3px;border-radius:5px;margin-top:2px}.waiting{animation:breathe 2s ease-in-out infinite}#message{position:absolute;bottom:7px;left:12px;right:12px;min-height:24px;padding:5px 10px;border-radius:12px;background:#fff9;color:#937963;text-align:center;font-size:11px;font-weight:bold;z-index:4}#message.notice{background:#fff1b8;color:#9a6f33}#route{position:absolute;height:3px;border-top:3px dotted #f6bd68;z-index:2;transform-origin:0 center}.queue-zone{background:linear-gradient(#fbf2e4,#fff8ed);padding:12px 15px 3px;border-top:6px solid #dcc5ab;z-index:2}#queues{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;height:232px}.lane{position:relative;background:linear-gradient(#edebf8,#f6eff9);border:2px solid #e1d7ef;border-radius:45px 45px 24px 24px;padding:5px 6px;box-shadow:inset 0 0 0 4px #ffffff60;display:flex;flex-direction:column;align-items:center;gap:3px}.lane:nth-child(2){background:linear-gradient(#fce7e8,#fff1ed);border-color:#eed4d4}.lane:nth-child(3){background:linear-gradient(#e3f1e9,#eff6eb);border-color:#cddfd1}.maid-button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:start;padding:0;background:transparent;width:100%;height:64px;min-height:64px;border-radius:18px}.maid-button.front{height:76px;min-height:76px;margin-bottom:1px;background:#fff7;box-shadow:0 0 0 2px #fff,0 4px 7px #82619315}.maid-button .sprite{width:64px;height:64px;position:relative;z-index:2;margin-top:-3px}.sprite{object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 2px 0 #56445c18);display:block;flex-shrink:0}.shadow{width:37px;height:8px;background:#6b567332;border-radius:50%;margin-top:-10px;z-index:1}.maid-tag{font-size:9px;line-height:13px;position:absolute;bottom:1px;background:#fff;color:#776588;border-radius:7px;padding:0 6px;font-weight:800;z-index:3}.type-pin{position:absolute;top:6px;right:2px;font-size:13px;background:#fff;border-radius:50%;width:20px;height:20px;display:grid;place-items:center;z-index:4}.front:after{content:'▲';position:absolute;top:-12px;left:calc(50% - 6px);font-size:13px;color:#bd9ddf;animation:point 1.4s infinite;z-index:5}.maid-button:not(.front) .maid-tag{display:none}.maid-button:not(.front){opacity:.86}.lane-total{position:absolute;bottom:2px;font-size:9px;color:#ac97b6}.queue-hint{font-size:10px;color:#b39b8d;text-align:center;line-height:18px}.legend{display:flex;gap:6px}.legend .dot{font-style:normal;font-size:12px}footer{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:10px 17px 14px;background:#efe5f8;border-top:3px solid #fff;z-index:4}footer button{display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:20px;background:#fff;box-shadow:0 5px 0 #d2c2e2;color:#8b6fac;border:2px solid #e0d2eb}footer button:nth-child(2){background:#fff4d9;border-color:#eed592;color:#b89545;box-shadow:0 5px 0 #dcc18a}footer button:nth-child(3){background:#e9f7f2;border-color:#bddfce;color:#76a797;box-shadow:0 5px 0 #b4d1c3}footer span{font-size:27px;line-height:27px}footer b{font-size:11px}footer small{font-size:9px;margin-top:2px}footer em{font-style:normal}footer button:disabled{opacity:.45}footer button.armed{outline:3px solid #dcad58;animation:glow .8s infinite alternate}.selectable{outline:3px dashed #daa85f!important}.defer-choice{outline:3px dashed #80b49d}.walking-actor{position:absolute;left:0;top:0;width:64px;height:64px;will-change:transform;z-index:10}.walking-actor img{width:64px;height:64px}.walking-actor .shadow{position:absolute;bottom:0;left:13px}.walking-actor img.facing-right{transform:scaleX(-1)}#actors,#sparkles{position:absolute;inset:0;pointer-events:none;z-index:10}#sparkles i{position:absolute;font-style:normal;color:#eab861;font-size:15px;animation:spark .75s ease-out forwards}.happy{animation:hop .36s ease-in-out infinite}.confetti{position:fixed;width:8px;height:12px;top:-30px;z-index:30;animation:confetti 2.1s ease-in forwards}dialog{border:0;border-radius:28px;background:#fff9ef;padding:25px 24px;width:min(340px,90vw);color:#695375;box-shadow:0 12px 0 #d4c3dd;text-align:center;overflow:visible}dialog::backdrop{background:#50416288;backdrop-filter:blur(3px)}dialog h1{font-size:35px;letter-spacing:4px;color:#bd8dc8;margin:6px 0}dialog h2{font-size:20px;margin:3px 0 16px}dialog p{font-size:12px;line-height:1.9}dialog .hero{width:128px;height:128px;margin:5px auto;image-rendering:pixelated}dialog .primary{width:100%;padding:14px;border-radius:18px;background:#9874c5;color:#fff;font-weight:bold;box-shadow:0 5px 0 #6f519c;margin:6px 0;font-size:15px}dialog .secondary{background:transparent;color:#aa91b3;font-size:11px;padding:10px}dialog .reward{font-size:18px;color:#bb9342;margin:8px}.stage-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin:20px 0}.stage-grid button{padding:12px 5px;background:#eae0f6;border-radius:12px;color:#8b6cab;box-shadow:0 3px 0 #cdbce2;font-weight:bold}.stage-grid button.cleared{background:#d9efdf;color:#6aa781}.empty-lane{margin-top:50px;text-align:center;color:#baabbf;font-size:12px;line-height:2}.empty-lane b{font-size:25px;display:block}@keyframes breathe{50%{transform:translateY(-1px)}}@keyframes point{50%{transform:translateY(-3px)}}@keyframes card-pop{40%{transform:scale(1.09) rotate(2deg)}}@keyframes hop{50%{transform:translateY(-12px)}}@keyframes glow{to{box-shadow:0 0 0 3px #f9e4af}}@keyframes spark{to{transform:translate(var(--dx),var(--dy)) rotate(70deg);opacity:0}}@keyframes confetti{to{transform:translate(var(--drift),105vh) rotate(650deg);opacity:.3}}
/* V0.2B: fixed arrival slots, quiet contact feedback and completion cadence. */
#queues,#actors,#waiting{user-select:none;-webkit-user-select:none}
.station-slot{width:40px;height:64px;flex-shrink:0;position:relative;display:flex;justify-content:center}.arrival-anchor{display:block;width:46px;height:46px;flex-shrink:0}.station-maid{flex-shrink:0}.task.arrived{animation:arrival-pop .28s ease-out}.task.completed:after{content:'COMPLETE';font-size:13px;letter-spacing:1px;animation:complete-stamp .28s ease-out both}.task.leaving,.team.leaving{animation:task-leave .22s ease-in both}.task.entering{animation:task-enter .24s ease-out both}.task.empty.entering{animation:none}.walking-actor .sprite{transform-origin:center bottom}.walking-actor .shadow{transform-origin:center bottom}.walking-actor .sprite.waiting{animation:none}.station-maid .waiting{animation:none}#sparkles .departure-spark{font-size:12px;color:#d9b774;animation:spark .5s ease-out forwards}dialog[open]:has(.clear-label){animation:clear-reveal .36s cubic-bezier(.2,.8,.3,1) both}dialog[open] .clear-label+h1{animation:clear-title .45s .08s ease-out both}.team.happy,.station-maid.happy{animation:team-cheer .4s ease-in-out infinite}.station-maid.happy .sprite{animation:none}
@keyframes arrival-pop{45%{transform:translateY(-3px) scale(1.04)}}@keyframes complete-stamp{from{opacity:0;transform:scale(.8) rotate(-5deg)}to{opacity:1;transform:scale(1) rotate(-5deg)}}@keyframes task-leave{to{opacity:0;transform:translateY(-9px) scale(.96)}}@keyframes task-enter{from{opacity:0;transform:translateY(15px)}to{opacity:1;transform:translateY(0)}}@keyframes clear-reveal{from{opacity:0;transform:translateY(15px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes clear-title{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}@keyframes team-cheer{50%{transform:translateY(-4px)}}

/* Reservations count against capacity, with arrival distinguished visually. */
.need.reserved{border-style:dashed;background:#fff6cd}.need.reserved span{font-size:14px}.task[aria-disabled="true"]:not(.empty){cursor:default}.station-slot{pointer-events:none}

/* Four identities: keep motifs visible when a slot is reserved or arrived. */
.motif{width:16px;height:16px;display:block;flex-shrink:0}.need{position:relative}.need>span{display:grid;place-items:center}.need-status{position:absolute;right:-4px;bottom:-4px;border-radius:50%;background:#fff;color:#765b38;font-size:10px;width:12px;height:12px;line-height:12px;box-shadow:0 0 0 1px #dbcdb7}.need.D{border-color:#76aabe;background:#eef9fc}.need.B{border-color:#de8b88;background:#fff0ea}.need.C{border-color:#a6c38b;background:#f0f8e8}.legend .dot{display:block}.legend .motif{width:17px;height:17px}.station-maid{position:relative}.station-pin,.actor-pin{position:absolute;display:grid;place-items:center;background:#fffef8;border:1px solid #ddd3c6;border-radius:50%;width:16px;height:16px;z-index:5}.station-pin{right:-2px;top:33px}.actor-pin{right:4px;bottom:1px}.station-pin .motif,.actor-pin .motif{width:12px;height:12px}.need.reserved span{font-size:inherit}
