/* Journey 3 "Share House Survival" · shared level styles (staging, Batch 1).
   Same Hatsch rules as Journey 1 and 2: cream page, purple accents, ink text, white bubble, lavender figure area,
   white choice buttons with a lavender border, purple primary button. Phone-first (max 430px), works at 320px. */
*{box-sizing:border-box}
html,body{margin:0;background:#faf8eb;color:#201638;font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
.app{max-width:430px;min-height:100dvh;margin:auto;padding:18px 18px 28px}
header{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;color:#8000ef;font-weight:800;letter-spacing:.02em}
header a{color:#8000ef;text-decoration:none}
.title{font-size:30px;margin:22px 0 2px;color:#201638;line-height:1.1}
.muted{color:#705d80;font-size:13px;margin:0 0 14px}
.bubble{background:#fff;color:#201638;border:2px solid #e0c5f5;border-radius:15px;padding:12px 14px;margin:0 0 10px;font-size:15px;font-weight:800;text-align:center;line-height:1.4;min-height:70px;display:flex;flex-direction:column;align-items:center;justify-content:center}
.bubble small{display:block;font-size:15px;font-weight:800;color:#8000ef;margin-top:2px}
/* One fixed figure area: changing art never moves the layout. The opening scene is shown whole (4:3), never stretched. */
.scene{position:relative;aspect-ratio:4/3;max-height:300px;width:100%;border-radius:22px;overflow:hidden;background:#e9d8fa}
.scene img{position:absolute;inset:0;width:100%;height:100%;opacity:0;transition:opacity .18s ease}
.scene img.on{opacity:1}
.scene img.photo{object-fit:cover;object-position:50% 50%}
.scene img.figure{object-fit:contain;object-position:50% 100%;top:10px;height:calc(100% - 10px)}
.react{position:absolute;right:12px;top:10px;font-size:34px;line-height:1;background:#fff;border-radius:50%;width:54px;height:54px;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(32,22,56,.16);opacity:0;transform:scale(.6);transition:opacity .18s ease,transform .18s ease}
.react.on{opacity:1;transform:scale(1)}
.msg{background:#fff;border:1px solid #d8b6f5;border-radius:15px;padding:11px 14px;margin:12px 0 0}
.msg .from{font-size:12px;font-weight:800;color:#8000ef;margin:0 0 3px}
.msg .text{font-size:16px;font-weight:750;margin:0;line-height:1.4}
.msg.chat{background:#eef6ff;border-color:#b9d6f5}
.msg.chat .from{color:#2f6db5}
.tag{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#8000ef;font-weight:800;margin:18px 0 6px}
.count{font-size:13px;font-weight:800;color:#8000ef;background:#f4ecfd;border-radius:999px;padding:4px 10px;white-space:nowrap}
.dots{display:inline-flex;gap:4px;margin-right:6px;vertical-align:middle}.dots i{width:8px;height:8px;border-radius:50%;background:#e0c5f5;display:inline-block}.dots i.on{background:#8000ef}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.card{position:relative;min-height:128px;background:#fff;border:2px dashed #c99bf2;border-radius:16px;padding:8px 4px 10px;font:inherit;color:#201638;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;transition:transform .12s ease}
.card:active{transform:scale(.97)}
.card:focus-visible{outline:3px solid #8000ef;outline-offset:2px}
.card svg{width:100%;max-width:96px;height:66px;display:block}
.card .name{font-size:14px;font-weight:800;line-height:1.2;text-align:center}
.card.seen{border-style:solid;border-color:#8000ef;background:#f4ecfd}
.card.open{box-shadow:0 0 0 3px #e0c5f5}
.card .tick{position:absolute;top:6px;right:6px;width:20px;height:20px;border-radius:50%;background:#8000ef;color:#fff;font-size:12px;font-weight:900;display:none;align-items:center;justify-content:center}
.card.seen .tick{display:flex}
.reveal{margin:10px 0 0;background:#fff;border:2px solid #e0c5f5;border-radius:15px;padding:12px 14px;font-size:16px;font-weight:750;line-height:1.4;animation:pop .22s ease}
.reveal .what{display:block;font-size:12px;font-weight:900;letter-spacing:.06em;color:#8000ef;margin-bottom:3px}
@keyframes pop{from{transform:translateY(6px);opacity:0}to{transform:none;opacity:1}}
.action{display:block;width:100%;min-height:52px;background:#fff;color:#201638;border:2px solid #d8b6f5;border-radius:15px;padding:13px 16px;margin:7px 0;font:inherit;font-size:16px;font-weight:750;text-align:left;cursor:pointer}
.action .em{font-size:20px;margin-right:8px}
.action:focus-visible{outline:3px solid #8000ef;outline-offset:2px}
.action.primary{background:#8000ef;border-color:#8000ef;color:#fff;text-align:center;margin-top:14px}
.action.picked{border-color:#8000ef;background:#f4ecfd}
.result{margin:12px 0 0}
.result .you{font-size:13px;font-weight:800;color:#705d80;margin:0 0 6px}
.result .big{background:#201638;color:#fff;border-radius:16px;padding:16px;font-size:20px;font-weight:900;line-height:1.3;text-align:center;margin:0}
.done{margin:14px 0 0;text-align:center;background:#fff;border:2px solid #8000ef;border-radius:18px;padding:16px}
.done .h{font-size:24px;font-weight:900;margin:0}
.done .p{font-size:16px;font-weight:750;color:#705d80;margin:4px 0 0}
.hint{font-size:12px;color:#705d80;text-align:center;margin-top:14px}
.hide{display:none!important}
@media (max-width:340px){.title{font-size:26px}.card{min-height:118px}.card .name{font-size:13px}.card svg{height:58px}}
@media (prefers-reduced-motion:reduce){.card,.scene img,.react{transition:none}.reveal{animation:none}}
/* Mate reaction right after the consequence (mobile reading order: action, consequence, reaction, next action). */
.mreact{display:flex;align-items:flex-end;gap:10px;margin:10px 0 0;background:#e9d8fa;border-radius:16px;padding:8px 12px 0;overflow:hidden}
.mreact img{height:120px;width:auto;display:block}
.mreact .em{font-size:40px;line-height:1;padding-bottom:14px}
.mreact .who{font-size:13px;font-weight:800;color:#705d80;padding-bottom:16px}
/* Level 3 · Guest or roommate? (no right or wrong answers: no red, no scores) */
.sort{display:grid;gap:8px}
.row{display:grid;grid-template-columns:64px 1fr;gap:10px;align-items:center;background:#fff;border:2px solid #e0c5f5;border-radius:16px;padding:8px 10px}
.row svg{width:64px;height:52px}
.row .q{font-size:15px;font-weight:800;line-height:1.3;margin:0 0 6px}
.row .opts{display:flex;gap:6px}
.opt{flex:1;min-height:44px;border:2px solid #d8b6f5;background:#fff;border-radius:12px;font:inherit;font-size:14px;font-weight:800;color:#201638;cursor:pointer}
.opt[aria-pressed="true"]{background:#8000ef;border-color:#8000ef;color:#fff}
.opt:focus-visible{outline:3px solid #8000ef;outline-offset:2px}
.limits{margin:12px 0 0;background:#201638;color:#fff;border-radius:16px;padding:16px;text-align:center;animation:pop .22s ease}
.limits .a{font-size:19px;font-weight:900;margin:0}.limits .b{font-size:16px;font-weight:750;color:#d9ccef;margin:4px 0 0}
.bill{background:#fff;border:2px solid #e0c5f5;border-radius:16px;padding:12px 14px;margin:12px 0 0}
.bill .bars{display:grid;grid-template-columns:auto 1fr auto;gap:8px 10px;align-items:center;font-weight:800;font-size:14px}
.bill .bar{height:18px;border-radius:9px;background:#d8c3ef}
.bill .bar.now{background:#8000ef;animation:grow .6s ease}
@keyframes grow{from{width:69%!important}}
.bill .amt{font-size:16px;font-weight:900}
.people{display:flex;align-items:center;justify-content:center;gap:10px;margin:12px 0 2px;font-size:28px}
.people span{position:relative}.people span i{position:absolute;right:-6px;bottom:-4px;font-style:normal;font-size:15px}
.people-cap{text-align:center;font-size:15px;font-weight:900;margin:2px 0 0}
@media (prefers-reduced-motion:reduce){.limits{animation:none}.bill .bar.now{animation:none}}
/* ---------- Batch 2 (Levels 4–6). Everything above is unchanged. ---------- */
/* Level 4 · Whose is it? (tap an item, then its owner) */
.mrow{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.item{position:relative;min-height:96px;background:#fff;border:2px dashed #c99bf2;border-radius:16px;padding:8px 4px;font:inherit;color:#201638;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}
.item .ic{font-size:34px;line-height:1}.item .name{font-size:14px;font-weight:800;text-align:center;line-height:1.2}
.item[aria-pressed="true"]{border-style:solid;border-color:#8000ef;box-shadow:0 0 0 3px #e0c5f5;background:#f4ecfd}
.item.done{border-style:solid;border-color:#8000ef;background:#f4ecfd;cursor:default}
.item .own{position:absolute;top:-8px;right:-6px;width:34px;height:34px;border-radius:50%;border:2px solid #8000ef;background:#fff;overflow:hidden;display:none}
.item.done .own{display:block}.item .own img{width:100%;height:100%;object-fit:cover}
.owners{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px}
.owner{min-height:112px;background:#fff;border:2px solid #e0c5f5;border-radius:16px;padding:6px 4px 8px;font:inherit;font-size:14px;font-weight:800;color:#201638;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:4px}
.owner img{width:66px;height:66px;border-radius:50%;object-fit:cover;background:#e9d8fa}
.owner:disabled{opacity:.55;cursor:default}
.owner.waiting{border-color:#8000ef}
.item:focus-visible,.owner:focus-visible,.billcard:focus-visible{outline:3px solid #8000ef;outline-offset:2px}
.shake{animation:shake .32s ease}
@keyframes shake{0%,100%{transform:none}25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
.oops{margin:12px 0 0;display:flex;align-items:center;gap:12px;background:#201638;color:#fff;border-radius:16px;padding:10px 14px;animation:pop .25s ease}
.oops img{width:76px;height:76px;border-radius:50%;object-fit:cover;background:#e9d8fa;flex:none}
.oops .who{font-size:12px;font-weight:900;letter-spacing:.06em;color:#d9ccef;margin:0}
.oops .say{font-size:18px;font-weight:900;margin:2px 0 0;line-height:1.3}
/* Level 5 · Check the bills (tap to open; paid/unpaid shown with icon + word, never colour alone) */
.bills{display:grid;gap:8px}
.billcard{width:100%;text-align:left;background:#fff;border:2px dashed #c99bf2;border-radius:16px;padding:12px 14px;font:inherit;color:#201638;cursor:pointer}
.billcard.seen{border-style:solid;border-color:#8000ef}
.billcard .top{display:flex;justify-content:space-between;align-items:center;font-size:17px;font-weight:900}
.billcard .top .chev{font-size:13px;font-weight:800;color:#8000ef}
.billcard .who{display:none;margin:10px 0 0;padding:0;list-style:none}
.billcard[aria-expanded="true"] .who{display:grid;gap:6px;animation:pop .2s ease}
.who li{display:grid;grid-template-columns:30px 1fr auto;gap:8px;align-items:center;font-size:15px;font-weight:800}
.who li img{width:30px;height:30px;border-radius:50%;object-fit:cover;background:#e9d8fa}
.st{font-size:13px;font-weight:900;border-radius:999px;padding:3px 9px;white-space:nowrap}
.st.paid{background:#e6f6ec;color:#17643a}.st.unpaid{background:#fff0d6;color:#8a4b00;border:2px dashed #e0a34a}
.owes{margin:12px 0 0;text-align:center;background:#fff;border:3px solid #8000ef;border-radius:18px;padding:14px;animation:pop .25s ease}
.owes .a{font-size:17px;font-weight:900;margin:0}.owes .b{font-size:46px;font-weight:900;color:#8000ef;margin:2px 0 0;line-height:1}
.chatline{display:flex;gap:8px;align-items:flex-end;margin:8px 0 0;animation:pop .22s ease}
.chatline img{width:34px;height:34px;border-radius:50%;object-fit:cover;background:#e9d8fa;flex:none}
.chatline .b{background:#eef6ff;border:1px solid #b9d6f5;border-radius:14px 14px 14px 4px;padding:8px 12px;font-size:15px;font-weight:750;line-height:1.35}
.chatline .b b{display:block;font-size:12px;color:#2f6db5}
.chatline.me{flex-direction:row-reverse}.chatline.me .b{background:#f4ecfd;border-color:#d8b6f5;border-radius:14px 14px 4px 14px}.chatline.me .b b{color:#8000ef}
/* Big comedic transitions (Level 5 "One week later", Level 6 "Five songs later") */
.later{margin:14px 0 0;background:#201638;color:#fff;border-radius:20px;padding:22px 16px;text-align:center;animation:later .5s ease}
.later .h{font-size:24px;font-weight:900;letter-spacing:.04em;margin:0}
.later .bugs{font-size:40px;margin:10px 0 6px;display:flex;justify-content:center;gap:14px}
.later .bugs span{display:inline-block;animation:hop 1s ease-in-out infinite}.later .bugs span:nth-child(2){animation-delay:.2s}.later .bugs span:nth-child(3){animation-delay:.4s}
.later .p{font-size:18px;font-weight:800;color:#d9ccef;margin:0}
.later .amt{font-size:30px;font-weight:900;color:#ffd56a;margin:6px 0 0}
@keyframes later{from{transform:scale(.85);opacity:0}to{transform:none;opacity:1}}
@keyframes hop{0%,100%{transform:none}50%{transform:translateY(-8px) rotate(-8deg)}}
/* Level 6 · Try to sleep */
.clock{display:flex;justify-content:center;align-items:center;gap:8px;margin:12px 0 0;font-size:30px;font-weight:900;letter-spacing:.02em;background:#201638;color:#fff;border-radius:16px;padding:10px}
.clock.small{font-size:20px;padding:8px}
.awake{margin:12px 0 0;text-align:center;background:#201638;color:#fff;border-radius:18px;padding:16px;animation:later .45s ease}
.awake .t{font-size:30px;font-weight:900;margin:0}.awake .eyes{font-size:42px;margin:6px 0}.awake .p{font-size:20px;font-weight:900;color:#ffd56a;margin:0}
.later .notes span{animation:hop .8s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){.later,.awake,.oops,.owes,.later .bugs span,.later .notes span,.shake{animation:none}}
/* ---------- Batch 3 (Levels 7–10). Everything above is unchanged. ---------- */
.item:disabled{cursor:default}
.item.wait{opacity:.5;border-style:dashed}
.item .q{font-size:13px;font-weight:800;color:#8a7a9c}
/* Level 8 · group chat + composer */
.phone{background:#f2eef8;border:2px solid #d8b6f5;border-radius:22px;overflow:hidden}
.phone .bar{display:flex;justify-content:space-between;align-items:center;background:#201638;color:#fff;padding:10px 14px;font-weight:900;font-size:16px}
.phone .unread{background:#ff4f6d;color:#fff;border-radius:999px;font-size:12px;font-weight:900;padding:3px 9px}
.phone .msgs{padding:8px 10px 10px;min-height:60px}
.chatline .b.them{background:#fff;border-color:#e0d6ec}
.readnext{width:100%;margin:8px 0 0}
.composer{display:flex;gap:8px;align-items:center;background:#fff;border-top:2px solid #e0d6ec;padding:8px}
.composer .box{flex:1;min-height:44px;border:2px solid #e0d6ec;border-radius:22px;padding:10px 14px;font-size:15px;font-weight:750;color:#201638;background:#faf8fd;overflow-wrap:anywhere}
.composer .box.empty{color:#9a8cad;font-weight:700}
.composer .sendbtn{flex:none;min-width:64px;min-height:44px;border:0;border-radius:22px;background:#8000ef;color:#fff;font:inherit;font-weight:900;font-size:15px;cursor:pointer}
.composer .sendbtn:disabled{background:#cdb7e6;cursor:default}
.chips{display:grid;gap:8px;margin:10px 0 0}
.chip{width:100%;text-align:left;min-height:48px;background:#fff;border:2px solid #d8b6f5;border-radius:16px;padding:10px 14px;font:inherit;font-weight:800;font-size:15px;color:#201638;cursor:pointer}
.chip[aria-pressed="true"]{border-color:#8000ef;background:#f4ecfd;box-shadow:0 0 0 3px #e0c5f5}
.chip:disabled{opacity:.55;cursor:default}
/* Level 9 · budget */
.budget{background:#fff;border:2px solid #e0d6ec;border-radius:18px;padding:12px 14px}
.budget .top{display:flex;justify-content:space-between;align-items:baseline;font-weight:900}
.budget .left{font-size:26px;color:#17643a}.budget .left.low{color:#b54700}
.meter{height:16px;border-radius:999px;background:#efe8f7;overflow:hidden;margin:8px 0 2px}
.meter i{display:block;height:100%;background:linear-gradient(90deg,#3fbf7f,#8be0a8);border-radius:999px;transition:width .6s ease}
.meter.low i{background:linear-gradient(90deg,#ff8a3d,#ffb36b)}
.expenses{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 0}
.expense{min-height:64px;background:#fff;border:2px dashed #c99bf2;border-radius:16px;padding:8px 10px;font:inherit;color:#201638;text-align:left;cursor:pointer}
.expense b{display:block;font-size:15px}.expense span{font-size:14px;font-weight:800;color:#8a4b00}
.expense.paid{border-style:solid;border-color:#8000ef;background:#f4ecfd;cursor:default}
.expense.paid span::after{content:" ✓ taken"}
.fine{font-size:12px;color:#8a7a9c;font-weight:700;margin:6px 0 0;text-align:center}
.zero{margin:12px 0 0;text-align:center;background:#201638;color:#fff;border-radius:20px;padding:18px 14px;animation:later .45s ease}
.zero .h{font-size:14px;font-weight:900;letter-spacing:.08em;color:#ffd56a;margin:0}
.zero .up{font-size:28px;font-weight:900;margin:4px 0 8px}
.zero .z{font-size:52px;font-weight:900;line-height:1;margin:0}
.zero .z small{display:block;font-size:14px;letter-spacing:.06em;color:#d9ccef;margin-bottom:4px}
.zero .e{font-size:38px;margin:6px 0 0}
/* Level 10 · Before / Now */
.compare{display:grid;gap:8px}
.cmp{width:100%;text-align:left;background:#fff;border:2px dashed #c99bf2;border-radius:16px;padding:12px 14px;font:inherit;color:#201638;cursor:pointer}
.cmp.seen{border-style:solid;border-color:#8000ef}
.cmp .top{display:flex;justify-content:space-between;align-items:center;font-size:17px;font-weight:900}
.cmp .top .chev{font-size:13px;font-weight:800;color:#8000ef}
.cmp .bn{display:none;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 0}
.cmp[aria-expanded="true"] .bn{display:grid;animation:pop .2s ease}
.cmp .bn>span{display:block;border-radius:12px;padding:8px 10px;font-size:14px;font-weight:800;line-height:1.3}
.cmp .bn .b4{background:#eef6ff}.cmp .bn .nw{background:#fff0d6}
.cmp .bn small{display:block;font-size:11px;font-weight:900;letter-spacing:.06em;color:#6b6080}
.cmp .note{display:none;margin:8px 0 0;font-size:14px;font-weight:800}
.cmp[aria-expanded="true"] .note{display:block}
.bond{margin:12px 0 0;text-align:center;background:#fff;border:3px solid #8000ef;border-radius:18px;padding:14px;animation:pop .25s ease}
.bond .r{display:flex;justify-content:space-between;font-size:17px;font-weight:900;margin:2px 0}
.bond .r.ded{color:#b54700;font-size:22px}
.bond .e{font-size:36px;margin:4px 0 0}
@media (prefers-reduced-motion:reduce){.zero,.bond,.meter i{animation:none;transition:none}}
