:root {
  --bg: #fff6fa; --bg2: #f4ecfb; --ink: #3b2f47; --muted: #84768f; --line: rgba(110, 80, 140, .14);
  --card: rgba(255, 255, 255, .86); --card-solid: #ffffff; --accent: #a97be4; --accent-ink: #ffffff; --accent2: #ff8fb7; --good: #5cbf94; --warn: #e6a23c; --bad: #e0627a;
  --shadow: 0 10px 30px rgba(120, 80, 160, .14); --shadow-sm: 0 3px 10px rgba(120, 80, 160, .12);
  --r: 22px; --r-sm: 14px;
  --font: ui-rounded, "SF Pro Rounded", "Avenir Next Rounded", "Avenir Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --tabh: 68px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
:root[data-theme="dark"] {
  --bg: #17131f; --bg2: #211a2e; --ink: #f2eaf9; --muted: #a99bb8; --line: rgba(220, 200, 255, .14);
  --card: rgba(40, 32, 56, .88); --card-solid: #2a2238; --accent: #b794f0; --accent-ink: #1b1328; --accent2: #ff9bc0;
  --shadow: 0 10px 30px rgba(0, 0, 0, .4); --shadow-sm: 0 3px 10px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-text-size-adjust: 100%; }
body { background: radial-gradient(900px 500px at 20% -10%, var(--bg2), transparent 70%), var(--bg); overscroll-behavior-y: contain; }
#app { position: relative; height: 100%; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; }
#view { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: calc(var(--safe-t) + 10px) 14px calc(var(--tabh) + var(--safe-b) + 18px); outline: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; }
h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .5em; }
.muted { color: var(--muted); } .small { font-size: .82rem; } .center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; } .gap { gap: 14px; } .col { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card + .card { margin-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }

/* tab bar */
#tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(100%, 520px); height: calc(var(--tabh) + var(--safe-b)); padding: 6px 8px var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--card-solid) 88%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-top: 1px solid var(--line); z-index: 20; }
.tab { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .64rem; font-weight: 600; min-height: 48px; min-width: 0; border-radius: 16px; cursor: pointer; }
.tab svg { width: 26px; height: 26px; fill: currentColor; }
.more-panel { position: absolute; right: 8px; bottom: calc(100% + 8px); display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; width: min(300px, calc(100vw - 16px)); padding: 8px; border-radius: 20px; background: var(--card-solid); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 60; }
.more-panel[hidden] { display: none; }
.more-panel .tab { flex-direction: row; justify-content: flex-start; gap: 8px; padding: 6px 12px; font-size: .85rem; color: var(--ink); }
.more-panel .tab svg { width: 22px; height: 22px; }
.tab[aria-selected="true"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }

/* buttons */
.btn { appearance: none; border: 0; border-radius: 999px; padding: 12px 18px; min-height: 46px; font-weight: 700; font-size: .95rem; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.secondary { background: color-mix(in srgb, var(--accent) 14%, var(--card-solid)); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--accent); box-shadow: none; }
.btn.danger { background: var(--bad); color: #fff; }
.btn.block { width: 100%; } .btn.sm { min-height: 38px; padding: 8px 14px; font-size: .85rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: color-mix(in srgb, var(--accent) 14%, var(--card-solid)); border: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.chip.btnlike { cursor: pointer; min-height: 38px; font-size: .84rem; padding: 7px 13px; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chip.free { background: color-mix(in srgb, var(--good) 20%, var(--card-solid)); } .chip.pro { background: color-mix(in srgb, var(--accent2) 22%, var(--card-solid)); } .chip.soon { background: color-mix(in srgb, var(--warn) 22%, var(--card-solid)); }
.seg { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; }
.seg .chip { flex: none; }
.lock { opacity: .55; } .lock::after { content: " 🔒"; }

/* today */
.today-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.today-head .date { font-size: .8rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.today-head h1 { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; }
.iconbtn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--card-solid); box-shadow: var(--shadow-sm); font-size: 1.25rem; display: grid; place-items: center; cursor: pointer; flex: none; }
.iconbtn[aria-pressed="true"] { background: color-mix(in srgb, var(--accent2) 30%, var(--card-solid)); }
.stage-wrap { position: relative; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--bg2); }
.stage { display: block; width: 100%; height: min(58vh, 520px); min-height: 330px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
.stage.play { cursor: none; }
.caption { position: absolute; left: 12px; right: 12px; top: 12px; text-align: center; pointer-events: none; }
.caption span { display: inline-block; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .86); color: #4a3a56; font-size: .86rem; font-weight: 700; box-shadow: var(--shadow-sm); opacity: 0; transform: translateY(-6px); transition: .25s; }
.caption span.show { opacity: 1; transform: none; }
.stage-hint { position: absolute; left: 50%; transform: translateX(-50%); bottom: 10px; white-space: nowrap; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.78); text-align: center; font-size: .76rem; font-weight: 700; color: #5a4868; pointer-events: none; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 10px; margin: 12px 0; }
.act { border: 1px solid var(--line); background: var(--card-solid); border-radius: 20px; padding: 10px 6px; min-height: 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 700; font-size: .8rem; cursor: pointer; box-shadow: var(--shadow-sm); }
.act .e { font-size: 1.5rem; line-height: 1.1; }
.act[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.act:active { transform: scale(.96); }
.cat-card h2 { font-family: var(--display); font-size: 1.5rem; }
.fact { background: color-mix(in srgb, var(--accent2) 12%, var(--card-solid)); border-radius: var(--r-sm); padding: 10px 12px; font-size: .9rem; line-height: 1.4; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stat { background: color-mix(in srgb, var(--accent) 9%, var(--card-solid)); border-radius: 14px; padding: 8px 4px; } .stat b { display: block; font-size: 1.25rem; } .stat span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.bar { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 15%, transparent); overflow: hidden; } .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: 99px; transition: width .4s; }
.visit-banner { display: flex; gap: 8px; align-items: center; background: color-mix(in srgb, var(--warn) 18%, var(--card-solid)); border: 1px solid var(--line); border-radius: 16px; padding: 8px 12px; margin-bottom: 10px; font-size: .85rem; font-weight: 600; }

/* grids */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { position: relative; border: 1px solid var(--line); background: var(--card-solid); border-radius: 18px; overflow: hidden; padding: 0; cursor: pointer; box-shadow: var(--shadow-sm); text-align: left; }
.tile img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.tile .nm { padding: 6px 8px 8px; font-size: .78rem; font-weight: 700; line-height: 1.15; } .tile .nm small { display: block; color: var(--muted); font-weight: 600; }
.tile.locked img { filter: grayscale(1) brightness(.35) contrast(.8) blur(2px); } .tile.locked { cursor: default; }
.tile .q { position: absolute; inset: 0 0 38px 0; display: grid; place-items: center; font-size: 2rem; color: rgba(255,255,255,.8); pointer-events: none; }
.tile .fav { position: absolute; right: 6px; top: 6px; font-size: 1rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { text-align: center; font-size: .7rem; color: var(--muted); font-weight: 700; }
.day { aspect-ratio: .82; border-radius: 12px; border: 1px solid var(--line); background: var(--card-solid); position: relative; overflow: hidden; padding: 0; cursor: pointer; font-size: .7rem; font-weight: 700; }
.day img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.day .n { position: absolute; left: 4px; top: 2px; z-index: 1; background: rgba(255,255,255,.78); color: #4a3a56; border-radius: 8px; padding: 0 5px; }
.day.empty { visibility: hidden; } .day.future { opacity: .35; cursor: default; } .day.missed { background: repeating-linear-gradient(45deg, transparent 0 6px, color-mix(in srgb, var(--muted) 14%, transparent) 6px 12px); color: var(--muted); }
.day.today { outline: 3px solid var(--accent2); } .day.missed .n { background: none; }
.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.badge { display: flex; gap: 10px; align-items: center; background: var(--card-solid); border: 1px solid var(--line); border-radius: 16px; padding: 10px; } .badge .e { font-size: 1.8rem; } .badge b { font-size: .88rem; display: block; } .badge span { font-size: .74rem; color: var(--muted); }
.badge.off { opacity: .5; filter: grayscale(.9); }

/* designer / phone mock */
.picker { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; } .picker::-webkit-scrollbar { display: none; }
.pick { flex: none; width: 54px; height: 54px; border-radius: 16px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--card-solid); cursor: pointer; box-shadow: var(--shadow-sm); } .pick img { width: 100%; height: 100%; object-fit: cover; display: block; } .pick[aria-pressed="true"] { border-color: var(--accent); }
.mock-wrap { display: flex; justify-content: center; margin: 4px 0 12px; }
.phone { --pw: 230px; position: relative; width: var(--pw); border-radius: calc(var(--pw) * .15); padding: calc(var(--pw) * .028); background: linear-gradient(145deg, #2d2736, #12101a); box-shadow: 0 18px 40px rgba(60, 30, 100, .35), inset 0 0 0 2px rgba(255,255,255,.08); }
.screen { position: relative; width: 100%; aspect-ratio: var(--ar, 1290 / 2796); border-radius: calc(var(--pw) * .125); overflow: hidden; background: #000; }
.screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.ov { position: absolute; inset: 0; pointer-events: none; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.25); font-family: -apple-system, "SF Pro Display", system-ui, sans-serif; }
.ov .island { position: absolute; top: 1.6%; left: 50%; width: 26%; height: 2.4%; border-radius: 99px; background: #000; transform: translateX(-50%); }
.ov .sb { position: absolute; top: 1.7%; left: 8%; right: 8%; display: flex; justify-content: space-between; font-size: calc(var(--pw) * .052); font-weight: 700; }
.ov .ldate { position: absolute; top: 8.5%; width: 100%; text-align: center; font-size: calc(var(--pw) * .06); font-weight: 600; }
.ov .ltime { position: absolute; top: 10.5%; width: 100%; text-align: center; font-size: calc(var(--pw) * .30); font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.ov .widgets { position: absolute; top: 27.5%; left: 10%; right: 10%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4%; }
.ov .widgets i { aspect-ratio: 1; border-radius: 22%; background: rgba(255,255,255,.34); backdrop-filter: blur(4px); }
.ov .lbtn { position: absolute; bottom: 4.2%; width: 12%; aspect-ratio: 1; border-radius: 50%; background: rgba(0,0,0,.35); } .ov .lbtn.l { left: 9%; } .ov .lbtn.r { right: 9%; }
.ov .grid4 { position: absolute; top: 9%; left: 8%; right: 8%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5% 4%; }
.ov .grid4 i { aspect-ratio: 1; border-radius: 24%; background: rgba(255,255,255,.4); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.ov .dock { position: absolute; bottom: 2.2%; left: 5%; right: 5%; height: 8.4%; border-radius: 26px; background: rgba(255,255,255,.28); backdrop-filter: blur(6px); display: flex; justify-content: space-around; align-items: center; padding: 0 4%; } .ov .dock i { height: 70%; aspect-ratio: 1; border-radius: 24%; background: rgba(255,255,255,.55); }
.ov .dots { position: absolute; bottom: 12%; width: 100%; display: flex; justify-content: center; gap: 6px; } .ov .dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.7); }
.zone { position: absolute; left: 0; right: 0; border: 2px dashed rgba(255, 90, 130, .9); background: rgba(255, 90, 130, .12); color: #fff; font-size: calc(var(--pw) * .042); font-weight: 700; display: flex; align-items: flex-start; justify-content: flex-end; padding: 2px 6px; }
.zone.w { border-color: rgba(60, 180, 255, .95); background: rgba(60, 180, 255, .12); }
.slider { display: grid; grid-template-columns: 92px 1fr 40px; gap: 8px; align-items: center; font-size: .85rem; font-weight: 600; padding: 4px 0; }
.slider output { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 32px; }
select, input[type=text], input[type=date], input[type=time] { font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-solid); color: var(--ink); min-height: 44px; max-width: 100%; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card-solid); border-radius: 14px; padding: 10px 12px; min-height: 52px; cursor: pointer; }
.opt[aria-pressed="true"], .opt[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card-solid)); }
.opt small { color: var(--muted); display: block; font-weight: 500; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sw { border: 2px solid transparent; border-radius: 14px; height: 54px; cursor: pointer; font-size: .68rem; font-weight: 700; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3px; color: #4a3a56; text-shadow: 0 0 4px rgba(255,255,255,.8); } .sw[aria-pressed="true"] { border-color: var(--accent); }
.switch { position: relative; width: 52px; height: 32px; flex: none; } .switch input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; } .switch i { position: absolute; inset: 0; border-radius: 99px; background: color-mix(in srgb, var(--muted) 40%, transparent); transition: .2s; } .switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); transition: .2s; } .switch input:checked + i { background: var(--accent); } .switch input:checked + i::after { transform: translateX(20px); }
.setrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 56px; } .setrow:last-child { border-bottom: 0; } .setrow .t { flex: 1; } .setrow .t b { display: block; font-size: .95rem; } .setrow .t span { font-size: .78rem; color: var(--muted); display: block; line-height: 1.3; }
.note { font-size: .8rem; line-height: 1.4; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--warn) 16%, var(--card-solid)); border: 1px solid var(--line); }
.note.info { background: color-mix(in srgb, var(--accent) 10%, var(--card-solid)); } .note.err { background: color-mix(in srgb, var(--bad) 16%, var(--card-solid)); }
.list { display: flex; flex-direction: column; gap: 8px; } .li { display: flex; gap: 10px; align-items: center; background: var(--card-solid); border: 1px solid var(--line); border-radius: 16px; padding: 8px; } .li img { width: 44px; height: 94px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bg2); } .li .t { flex: 1; font-size: .85rem; font-weight: 700; } .li .t small { display: block; color: var(--muted); font-weight: 600; }

/* sheets & toasts */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(30, 15, 50, .45); opacity: 0; transition: opacity .2s; pointer-events: auto; }
.sheet { position: relative; width: min(100%, 520px); max-height: 92dvh; overflow-y: auto; background: var(--bg); border-radius: 28px 28px 0 0; padding: 14px 16px calc(20px + var(--safe-b)); box-shadow: 0 -10px 40px rgba(60, 20, 100, .3); transform: translateY(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); pointer-events: auto; }
.sheet-wrap.in .sheet-backdrop { opacity: 1; } .sheet-wrap.in .sheet { transform: none; }
.sheet-grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 8px; }
.sheet-x { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card-solid); box-shadow: var(--shadow-sm); cursor: pointer; z-index: 2; }
.sheet h2 { padding-right: 44px; }
.sheet .hero { width: 100%; border-radius: 22px; display: block; margin: 10px 0; }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabh) + var(--safe-b) + 12px); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; }
.toast { background: #3b2f47; color: #fff; padding: 10px 16px; border-radius: 16px; font-size: .88rem; font-weight: 600; max-width: 88%; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: .3s; } .toast.in { opacity: 1; transform: none; } .toast.err { background: var(--bad); } .toast.good { background: #2f8f6b; }
#banner { padding: calc(var(--safe-t) + 6px) 14px 6px; background: color-mix(in srgb, var(--warn) 22%, var(--card-solid)); font-size: .8rem; font-weight: 600; text-align: center; border-bottom: 1px solid var(--line); z-index: 25; }
.price { font-size: 2rem; font-weight: 800; } .list-check { padding-left: 0; list-style: none; margin: 6px 0; } .list-check li { padding: 4px 0 4px 26px; position: relative; font-size: .9rem; line-height: 1.35; } .list-check li::before { content: "✓"; position: absolute; left: 4px; color: var(--good); font-weight: 800; } .list-check.no li::before { content: "–"; color: var(--muted); }
details.how { border: 1px solid var(--line); background: var(--card-solid); border-radius: 16px; padding: 10px 14px; } details.how summary { font-weight: 700; cursor: pointer; min-height: 32px; display: flex; align-items: center; } details.how ol { margin: 8px 0 4px; padding-left: 20px; font-size: .88rem; line-height: 1.5; }
.welcome img { width: 100%; max-width: 280px; display: block; margin: 8px auto; border-radius: 26px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
:root[data-motion="reduce"] * { transition: none !important; animation: none !important; }

.mock-wrap.sticky { position: sticky; top: 0; z-index: 6; margin: 0 -14px 10px; padding: 6px 0 10px; background: linear-gradient(var(--bg) 82%, transparent); }
.optgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .optgrid .opt { min-height: 60px; padding: 8px 10px; } .optgrid .opt b { font-size: .9rem; } .optgrid .opt small { font-size: .72rem; line-height: 1.2; }

/* ---- v0.2: Studio look on Today, earned accessories, unlock moment ---- */
.look-chip { position: absolute; left: 10px; top: 10px; display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 11px; border-radius: 999px; background: rgba(255,255,255,.88); color: #4a3a56; font-size: .76rem; font-weight: 800; box-shadow: var(--shadow-sm); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 2; }
.look-chip[hidden] { display: none; }
.look-chip button { appearance: none; border: 0; border-radius: 999px; padding: 6px 10px; min-height: 30px; font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; background: color-mix(in srgb, #a97be4 16%, #fff); color: #4a3a56; }
.look-chip #look-toggle { background: #a97be4; color: #fff; }
.look-chip.off { background: rgba(255,255,255,.72); }
.unlock { position: absolute; left: 10px; right: 10px; bottom: 44px; pointer-events: none; opacity: 0; transform: translateY(18px) scale(.96); transition: opacity .35s, transform .45s cubic-bezier(.2,1.4,.4,1); z-index: 3; }
.unlock.show { opacity: 1; transform: none; pointer-events: auto; }
.unlock-card { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 20px; background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,240,247,.95)); color: #4a3a56; box-shadow: 0 10px 30px rgba(80,40,90,.28); border: 1px solid rgba(255,143,183,.45); }
.unlock-card b { display: block; font-size: .95rem; } .unlock-card .small { color: #7a6888; line-height: 1.25; }
.unlock-k { font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #e0628f; }
.unlock-ic { font-size: 2rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #fff 30%, #ffe1ee 100%); flex: none; }
.unlock.show .unlock-ic { animation: unlockpop .7s cubic-bezier(.2,1.6,.4,1) both, unlockglow 1.6s ease-in-out .4s 2; }
@keyframes unlockpop { from { transform: scale(.2) rotate(-25deg); } to { transform: none; } }
@keyframes unlockglow { 50% { box-shadow: 0 0 0 8px rgba(255,143,183,.25), 0 0 26px rgba(255,143,183,.6); } }
.earned { margin-top: 12px; }
.earn-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 8px 0 10px; }
.earn-chip { appearance: none; display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--card-solid); color: var(--ink); border-radius: 16px; padding: 8px 10px; min-height: 52px; font: inherit; }
.earn-chip .e { font-size: 1.45rem; } .earn-chip b { display: block; font-size: .84rem; } .earn-chip small { display: block; font-size: .7rem; color: var(--muted); font-weight: 600; }
.earn-chip.got { cursor: pointer; } .earn-chip.got[aria-pressed="true"] { background: color-mix(in srgb, var(--accent2) 18%, var(--card-solid)); border-color: color-mix(in srgb, var(--accent2) 55%, transparent); }
.earn-chip.locked { opacity: .62; } .earn-chip.locked .e { filter: grayscale(1); }
.bar.thin { height: 7px; }
.earn-hint { margin-top: 6px; font-weight: 600; }
.studio-note { font-size: .74rem; color: var(--muted); text-align: center; margin: 4px 0 8px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .unlock, .unlock.show .unlock-ic { transition: none; animation: none; } }

/* ---- v0.3: ways to care, home spot, backup -------------------------------------------- */
.care { margin-top: 12px; }
.care-sub { margin: 2px 0 8px; }
.care-row { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--line); }
.care-row:first-child { border-top: 0; }
.care-k { flex: none; width: 58px; font-weight: 800; font-size: .82rem; padding-top: 8px; }
.care-k small { display: block; font-weight: 600; font-size: .66rem; color: var(--muted); }
.care-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.care-chip { appearance: none; display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; border: 1px solid var(--line); background: var(--card-solid); color: var(--ink); border-radius: 999px; padding: 7px 11px; min-height: 40px; font: inherit; font-size: .8rem; font-weight: 700; }
.care-chip .e { font-size: 1.05rem; }
.care-chip.on { background: color-mix(in srgb, var(--accent) 18%, var(--card-solid)); border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.care-chip.locked { opacity: .62; border-style: dashed; border-radius: 14px; }
.care-chip.locked small { flex-basis: 100%; font-size: .66rem; font-weight: 600; color: var(--muted); margin-top: -2px; }
.home-line { margin-top: 8px; }
.backup-nudge { margin-top: 12px; border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); }
.backup-nudge .e { font-size: 1.6rem; }
.codebox { width: 100%; font: 600 .72rem/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; border-radius: 12px; border: 1px solid var(--line); padding: 8px; background: var(--card-solid); color: var(--ink); resize: vertical; }
.bk-err { color: var(--bad); min-height: 0; margin: 6px 0 0; }
.bk-err:empty { display: none; }
.icon-prev { border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.18); flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stage[data-home="resting"], .stage[data-home="walking"] { cursor: pointer; }

/* v0.4 collectible shop */
.sec-h { font-size: 1rem; margin: 16px 4px 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.shop-item .shop-thumb { width: 88px; height: 88px; border-radius: 18px; object-fit: cover; flex: none; box-shadow: var(--shadow-sm); }
.shop-item.ended { opacity: .78; }
.shop-item.ended .shop-thumb, .shop-item.upcoming .shop-thumb { filter: saturate(.6); }
ul.plain { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 4px; }
.premium-extras ul.plain { margin-bottom: 0; }
.shop-item, #gallery, #acct, .note + .card { margin-top: 12px; }

/* v0.6 adoption, favourites, cuddles */
.act[hidden] { display: none; }
.cuddle-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 12px; }
.cuddle-row[hidden] { display: none; }
.adopt-card .btn { min-height: 40px; }
.care-chip.fav small.fav-l { display: block; font-size: .66rem; color: var(--accent); font-weight: 700; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.room-opt { appearance: none; border: 2px solid var(--line); background: var(--card-solid); color: var(--ink); border-radius: 14px; padding: 4px; font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.room-opt img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.room-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card-solid)); }
.tile .adopted { position: absolute; left: 6px; top: 6px; font-size: .9rem; }

/* ---- v0.7 tab bar with 7 tabs ---- */
#tabbar { padding-left: 4px; padding-right: 4px; }
.tab { font-size: .6rem; }
.tab svg { width: 24px; height: 24px; }
.linkbtn { border: 0; background: none; color: var(--accent); font-weight: 700; padding: 4px 6px; cursor: pointer; min-height: 32px; }
.linkbtn.mod { color: var(--bad); }
.admin-badge { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 800; background: #2f3a8f; color: #fff; vertical-align: middle; }
.note.warn { background: color-mix(in srgb, var(--warn) 22%, var(--card-solid)); padding: 8px 10px; border-radius: 12px; }

/* ---- v0.7 profile ---- */
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; margin-top: 6px; max-height: 220px; overflow: auto; padding: 2px; }
.avatar-pick, .house-opt { border: 2px solid var(--line); background: var(--card-solid); border-radius: 14px; padding: 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; color: var(--ink); cursor: pointer; }
.avatar-pick img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.avatar-pick[aria-checked="true"], .house-opt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.house-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.house-opt span:last-child { text-align: center; line-height: 1.15; }
/* ---- v0.9 growing house (collection) ---- */
.house-mini { display: block; width: 72px; height: 84px; position: relative; border-radius: 10px; overflow: hidden; }
.house-mini .mini-sky { position: absolute; inset: 0; background: var(--hs-sky); }
.house-mini .mini-stack { position: absolute; left: 6%; right: 6%; bottom: 0; display: flex; flex-direction: column; }
.house-mini .mini-stack svg { display: block; width: 100%; height: auto; }
.house-mini .mini-stack .roof { margin-bottom: -1px; } .house-mini .mini-stack .base { margin-top: -1px; }
.hs-cabin { --hs-sky: linear-gradient(#7fb0dd, #b9d6ec 55%, #f3e3c0); }
.hs-cottage { --hs-sky: linear-gradient(#8ec5ee, #cde6f6 60%, #fbf0d6); }
.hs-glass { --hs-sky: linear-gradient(#3b2a5e, #b35a7a 38%, #f59a6a 70%, #ffd08a); }
.hs-steampunk { --hs-sky: linear-gradient(#0d1430, #1d2350 50%, #3a3260); }
.hv-head { align-items: flex-start; gap: 8px; }
.hv-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.hv-zoom { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: 0 0 6px; }
.hv-zoom .btn { min-width: 40px; }
.hs { --hz: 1; position: relative; overflow: hidden; border-radius: 18px; background: var(--hs-sky); padding: 14% 0 0; isolation: isolate; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.hs::after { content: ""; position: absolute; inset: 0; background: url(../img/house/grain.webp); background-size: 192px; mix-blend-mode: soft-light; opacity: .35; pointer-events: none; z-index: 5; }
.hs .hs-sky { position: absolute; left: 0; right: 0; top: 0; height: 60vh; max-height: 520px; z-index: -1; pointer-events: none; }
.hs .hs-sky svg, .hs .hs-back-wrap svg { display: block; width: 100%; height: 100%; }
.hs .hs-back-wrap { position: absolute; left: 0; right: 0; bottom: 0; height: min(78vw, 420px); z-index: -1; pointer-events: none; }
.house { position: relative; width: calc(92% * var(--hz)); max-width: calc(520px * var(--hz)); margin: 0 auto; display: flex; flex-direction: column; container-type: inline-size; transition: width .2s ease; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.house > div { position: relative; width: 100%; }
.house svg.roof, .house svg.floor-bg, .house svg.base { display: block; width: 100%; height: 100%; }
.house .hroof { margin-bottom: -1px; } .house .hbase { margin-top: -1px; }
.hfloor { margin-top: -1px; }
.hwin { position: absolute; border: 0; padding: 0; background: none; cursor: pointer; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: manipulation; color: #fff; }
.hwin .room { position: absolute; inset: 3%; overflow: hidden; border-radius: 2px; background: #2a1a10; }
.hwin .room.arch { border-radius: 50% 50% 3% 3% / 36% 36% 3% 3%; }
.hwin .room svg.int { position: absolute; inset: 0; width: 100%; height: 100%; }
.hwin .room img { position: absolute; display: block; height: auto; pointer-events: none; -webkit-user-drag: none; }
.hwin .room img.furn.mir { transform: scaleX(-1); }
.hwin .room img.wcat { transform: translateX(-50%); opacity: 0; transition: opacity .3s; max-height: 86%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.hwin .room img.wcat.in { opacity: 1; }
.hwin .room img.win-decor { bottom: 3%; height: 30%; width: auto; z-index: 2; }
.hwin .room img.win-decor.l { left: 4%; } .hwin .room img.win-decor.r { right: 4%; }
.hwin .room .lamp { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 18%, rgba(255,214,140,.38), transparent 60%), linear-gradient(transparent 60%, rgba(40,20,10,.25)); mix-blend-mode: screen; pointer-events: none; z-index: 3; }
.hs-steampunk .hwin .room .lamp, .hs-glass .hwin .room .lamp { background: radial-gradient(ellipse at 50% 18%, rgba(255,200,120,.32), transparent 62%); }
.hwin svg.frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.hwin .wname { position: absolute; left: 50%; bottom: -2%; transform: translate(-50%, 50%); z-index: 6; white-space: nowrap; max-width: 130%; overflow: hidden; text-overflow: ellipsis; font-size: max(10px, 3.1cqw); font-weight: 800; padding: .15em .6em; border-radius: 99px; background: rgba(30,18,10,.78); color: #fff4dc; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.hs-glass .hwin .wname { background: rgba(20,24,30,.82); } .hs-cottage .hwin .wname { background: rgba(60,90,50,.85); }
.hs-steampunk .hwin .wname { background: linear-gradient(#c99a46, #7c5522); color: #2a1a0a; }
.hwin.empty .dim { position: absolute; inset: 0; background: rgba(20,12,30,.35); }
.hwin.empty .empty-tag { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; font-size: max(9px, 2.6cqw); font-weight: 700; color: rgba(255,240,210,.85); }
.hwin:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.hwin:active .room { filter: brightness(1.08); }
.hwin.lifting { opacity: .55; }
.house.dragging .hwin:not(.lifting) .room { box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.hwin.drop-target .room { box-shadow: inset 0 0 0 4px #ffd27a, 0 0 18px #ffd27a; }
.hwin.wandered .room::after { content: "✨"; position: absolute; right: 6%; top: 8%; font-size: max(12px, 4cqw); z-index: 5; animation: sparkle 1.6s ease-in-out 3; }
@keyframes sparkle { 0%,100% { transform: scale(.8); opacity: .6; } 50% { transform: scale(1.25); opacity: 1; } }
.drag-ghost { position: fixed; left: 0; top: 0; width: 80px; height: auto; z-index: 1000; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(0,0,0,.45)); transition: none; }
.wander-note { margin: 0 0 8px; background: linear-gradient(135deg, #fff6e0, #ffe9f0); color: #3a2a1a; }
.wander-note ul { margin: 4px 0 0; padding-left: 18px; }
.move-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 50vh; overflow-y: auto; }
.move-to { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--card-solid); color: var(--ink); cursor: pointer; }
.move-to[disabled] { opacity: .55; border-style: dashed; }
.arr-row { gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
/* animated bits (smoke, gears, stars, airships); still when reduced motion is on */
.hs .smoke, .hs .smoke-drift { animation: smoke 6s ease-in-out infinite; transform-box: fill-box; }
@keyframes smoke { 0%,100% { transform: translate(0,0); opacity: .9; } 50% { transform: translate(4px,-6px); opacity: .5; } }
.hs .gear-spin { animation: spin 18s linear infinite; transform-box: fill-box; transform-origin: center; }
.hs .gear-spin.rev { animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.hs .twinkle { animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .2; } }
.hs .airship { animation: drift 40s linear infinite alternate; } .hs .airship.slow { animation-duration: 60s; }
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(40px); } }
[data-motion="reduce"] .hs *, [data-motion="reduce"] .house { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { [data-motion="auto"] .hs * { animation: none !important; } }
.house-gate { margin-bottom: 8px; }
.house-gate { margin-bottom: 8px; }
.details-root { min-height: 60vh; }

/* ---- v0.7 chat ---- */
.chat-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100dvh - 330px); min-height: 220px; overflow-y: auto; padding: 4px 2px; overscroll-behavior: contain; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg.mine { flex-direction: row-reverse; }
.msg-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; background: var(--card-solid); }
.msg-box { background: var(--card-solid); border: 1px solid var(--line); border-radius: 14px; padding: 6px 10px; max-width: 82%; min-width: 0; }
.msg.mine .msg-box { background: color-mix(in srgb, var(--accent) 14%, var(--card-solid)); }
.msg.hidden-msg .msg-box, .msg.deleted-msg .msg-box { opacity: .6; border-style: dashed; }
.msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .78rem; }
.msg-time { font-size: .7rem; margin-left: 4px; }
.msg-body { margin: 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.msg-acts { display: flex; gap: 2px; margin: 0 -6px -4px; }
.chat-form { position: sticky; bottom: 0; background: var(--bg, transparent); padding-top: 6px; }
.chat-form textarea { width: 100%; resize: none; border-radius: 14px; padding: 8px 10px; font: inherit; border: 1px solid var(--line); background: var(--card-solid); color: var(--ink); }
.mod-row { border-top: 1px solid var(--line); padding: 8px 0; gap: 8px; align-items: center; }
.mod-users .mod-row .col { gap: 4px; }

/* ---------- v0.8 Feed & water, mood, Toy Catch, cat talk, decor shop ---------- */
.bowls { position: absolute; left: 4%; bottom: 13%; width: 30%; max-width: 130px; pointer-events: none; z-index: 2; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.bowls svg { width: 100%; height: auto; display: block; }
.bowl-fill { transform: translateY(26px); transition: transform 1s cubic-bezier(.3,.7,.4,1); }
.bowl-fill.water { transition-delay: .25s; }
.bowls.full .bowl-fill { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .bowl-fill { transition: none; } }
.hungry-gate { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding: 14px; background: linear-gradient(180deg, rgba(255,248,240,.55), rgba(255,248,240,0) 60%); z-index: 3; }
.hungry-gate[hidden] { display: none; }
.hungry-card { background: var(--card-solid); border-radius: 18px; padding: 12px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.18); max-width: 300px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.hungry-ic { font-size: 1.6rem; }
.stage-wrap.is-hungry .stage { filter: saturate(.8); }
.actions .act:disabled { opacity: .45; cursor: not-allowed; }
.care-rows.gated, #care-rows.gated { opacity: .5; pointer-events: none; }
.mood-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.mood-line[hidden] { display: none; }
.chip.mood-grumpy { background: #ffe3d6; } .chip.mood-stuffed { background: #fff1c4; } .chip.mood-happy { background: #dff5e3; } .chip.bday { background: #ffd9ec; }
.stage-wrap.grumpy::after { content: '😾'; position: absolute; right: 10px; top: 10px; font-size: 1.5rem; z-index: 2; pointer-events: none; }
.stage-wrap.stuffed::after { content: '😴'; position: absolute; right: 10px; top: 10px; font-size: 1.5rem; z-index: 2; pointer-events: none; }
.care-stats .stat-row { display: grid; grid-template-columns: 6.5em 1fr 2.4em; align-items: center; gap: 8px; margin: 6px 0; }
.care-stats .bar { margin: 0; }
.name-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.name-opt { border: 2px solid var(--line); background: var(--card-solid); border-radius: 999px; padding: 6px 12px; font-weight: 600; cursor: pointer; color: inherit; }
.name-opt[aria-checked="true"] { border-color: var(--accent, #e8608a); background: color-mix(in srgb, var(--accent, #e8608a) 14%, var(--card-solid)); }
/* cat talk */
.talk-form { display: flex; flex-direction: column; gap: 8px; }
.talk-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.talk-cat { border: 3px solid transparent; border-radius: 50%; padding: 0; background: none; cursor: pointer; flex: none; }
.talk-cat img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; }
.talk-cat[aria-checked="true"] { border-color: var(--accent, #e8608a); }
.talk-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.talk-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-solid); padding: 6px 2px; cursor: pointer; color: inherit; min-height: 48px; }
.talk-btn span { font-size: 1.25rem; line-height: 1.2; } .talk-btn small { font-size: .62rem; color: var(--muted); }
.talk-btn:disabled { opacity: .5; }
.talk-say { font-size: 1.15rem; }
/* Toy Catch */
.play-view { display: flex; flex-direction: column; gap: 10px; }
.play-view .card { margin: 0; }
.code-in { text-transform: uppercase; letter-spacing: .2em; font-weight: 700; text-align: center; }
.room-code { font-size: 2.6rem; font-weight: 800; letter-spacing: .25em; font-family: ui-monospace, monospace; margin: 4px 0 8px; }
.seat-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.seat-row { display: flex; align-items: center; gap: 10px; border-left: 5px solid; border-radius: 12px; padding: 6px 8px; background: color-mix(in srgb, var(--card-solid) 80%, transparent); position: relative; }
.seat-emote { font-size: 1.4rem; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.seat-emote.show { opacity: 1; transform: none; animation: emote-out 2.4s forwards; }
@keyframes emote-out { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
.emote-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.emote-btn { border: 1px solid var(--line); background: var(--card-solid); border-radius: 10px; font-size: 1.2rem; min-height: 40px; cursor: pointer; }
.play-view.match { gap: 6px; }
.scoreboard { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.score-chip { display: flex; align-items: center; gap: 6px; border: 2px solid; border-radius: 12px; padding: 3px 8px 3px 3px; background: var(--card-solid); font-size: .8rem; position: relative; min-width: 0; }
.score-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.score-chip .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-chip b { font-size: 1rem; }
.score-chip.me { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #e8608a) 40%, transparent); }
.score-chip .seat-emote { position: absolute; right: -4px; top: -14px; }
.game-wrap { position: relative; width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 3 / 4; max-height: calc(100dvh - var(--tabh) - var(--safe-b) - var(--safe-t) - 190px); border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); touch-action: none; }
.game-cv { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.game-time { position: absolute; top: 8px; right: 10px; font-weight: 800; background: rgba(255,255,255,.8); border-radius: 999px; padding: 2px 10px; color: #333; }
.game-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 4rem; font-weight: 900; color: #e8608a; text-shadow: 0 3px 0 #fff; pointer-events: none; }
.game-count[hidden] { display: none; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin: 8px 0; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 31%; font-size: .8rem; min-width: 0; }
.pod b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.pod.p1 img { width: 72px; height: 72px; box-shadow: 0 0 0 3px #f2c230; }
.pod .step { width: 100%; border-radius: 10px 10px 0 0; background: color-mix(in srgb, var(--accent, #e8608a) 25%, var(--card-solid)); display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; font-size: 1.4rem; }
.pod.p1 .step { height: 90px; } .pod.p2 .step { height: 64px; } .pod.p3 .step { height: 44px; }
.earned-pts { font-size: 1.8rem; font-weight: 800; color: #3d8f55; }
.decor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 10px 0; }
.decor-item { border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: var(--card-solid); }
.decor-item img { height: 74px; width: auto; max-width: 100%; }
.decor-item.owned { border-color: #58b368; }
.btn[aria-disabled="true"] { opacity: .6; }
.hungry-note { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.win-decor { position: absolute; bottom: 4%; height: 34%; width: auto; pointer-events: none; }
/* v0.8: keep the hungry prompt compact so the cat (looking at its bowl) stays visible */
.hungry-gate { padding: 10px; }
.hungry-card { padding: 9px 12px; gap: 6px; max-width: 280px; font-size: .92rem; }
.hungry-card .hungry-ic, .hungry-card .muted { display: none; }
/* v0.9 Toy Catch entry on Home */
.play-card { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--card-solid)), var(--card-solid)); }
.play-card .row { gap: 10px; align-items: center; }
.play-ic { font-size: 1.8rem; }
/* v0.9 update prompt */
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabh) + var(--safe-b) + 10px); z-index: 80; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--ink); color: var(--card-solid); box-shadow: 0 8px 24px rgba(0,0,0,.3); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.update-bar .update-x { border: 0; background: none; color: inherit; font-size: 1rem; padding: 6px 8px; cursor: pointer; }
/* v0.9.1 painted house: generated painted pieces (roof / repeatable floor / base) over a painted scene; rooms show through window holes */
.hs.painted { background: var(--hs-top, #345); padding-top: 18%; }
.hs.painted .hs-sky, .hs.painted .hs-back-wrap { display: none; }
.hs.painted .hs-bg { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; min-height: 60%; object-fit: cover; object-position: bottom; z-index: -1; pointer-events: none; }
.hs.painted::before { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -1; pointer-events: none; background: linear-gradient(var(--hs-top), transparent 30%); opacity: .0; }
.hs.painted .house { width: calc(100% * var(--hz)); max-width: calc(640px * var(--hz)); filter: drop-shadow(0 8px 12px rgba(0,0,0,.28)); padding-bottom: 2%; }
.house .piece { position: relative; display: block; width: 100%; height: 100%; pointer-events: none; z-index: 1; -webkit-user-drag: none; user-select: none; }
.hs.painted .hfloor { margin-top: -2px; }
.hs.painted .house .hroof { margin-bottom: -2px; } .hs.painted .house .hbase { margin-top: -2px; }
.hs.painted .hwin { z-index: auto; }
.hs.painted .hwin .room { inset: -4%; border-radius: 0; background: #2a1a10; z-index: 0; }
.hs.painted .hwin .room .lamp { background: radial-gradient(ellipse at 50% 22%, rgba(255,214,140,.42), transparent 62%), linear-gradient(transparent 70%, rgba(40,20,10,.18)); }
.hs.painted .hwin .wname { z-index: 3; bottom: 1%; }
.hs.painted .hwin .glint { position: absolute; left: 4%; top: 6%; width: 5%; height: 22%; border-radius: 99px; background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,0)); transform: rotate(18deg); z-index: 2; pointer-events: none; }
.hs.painted .hwin.drop-target .room { box-shadow: inset 0 0 0 6px #ffd27a, 0 0 22px #ffd27a; }
.hs.painted .hwin:focus-visible { outline-offset: 0; }
.house-mini.pm { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; background-size: cover; background-position: bottom; padding: 6% 0 0; overflow: hidden; }
.house-mini.pm img { display: block; width: 92%; height: auto; margin-top: -1px; }
.hs.painted .hs-bg { -webkit-mask-image: linear-gradient(transparent, #000 14%); mask-image: linear-gradient(transparent, #000 14%); }
/* rc1: community kill switch hides Play + Chat; the tab bar closes the gap */
.tab[hidden] { display: none !important; }
html[data-community="off"] #tabbar { grid-template-columns: repeat(3, 1fr); }
.legal { max-width: 680px; margin: 0 auto; padding: 18px 16px 48px; line-height: 1.55; }
.legal h1 { font-family: var(--display); margin: 8px 0 4px; } .legal h2 { margin-top: 26px; font-size: 1.1rem; }
.legal table { border-collapse: collapse; width: 100%; font-size: .9rem; } .legal td, .legal th { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: top; }
/* rc1: limited "special guest" card (Ember, free through Nov 28) on Home and in the house */
.guest-card{display:flex;align-items:center;gap:10px;width:100%;margin:6px 0 8px;padding:8px 12px;border:0;border-radius:16px;text-align:left;cursor:pointer;color:#fff;background:linear-gradient(120deg,#2b1f45,#7a4fc2);box-shadow:0 4px 14px rgba(43,31,69,.25);font:inherit;min-height:56px}
.guest-card img{width:44px;height:44px;border-radius:50%;object-fit:cover;border:2px solid #f6b26b;flex:none}
.guest-card b{display:block;font-size:.98rem}
.guest-card small{display:block;opacity:.92;font-size:.82rem}
.guest-card .go{font-size:1.6rem;line-height:1;opacity:.9}
.guest-card:focus-visible{outline:3px solid #f6b26b;outline-offset:2px}
.visit-banner.guest{background:#2b1f45;color:#fff}
