:root { --navy: #1e2a44; --orange: #f57814; --cream: #f3eee4; --ink: #1e2a44; --muted: #6b7386; --line: #e3dfd5; --card: #ffffff; --bg: #f7f4ee;
  --font: -apple-system, "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; }
body.dark { background: var(--navy); color: var(--cream); }
.wrap { max-width: 560px; margin: 0 auto; padding: 20px 18px calc(28px + env(safe-area-inset-bottom)); }
.center { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 14px; text-align: center; }
.brand { font: 700 12px/1 "Avenir Next", var(--font); letter-spacing: .16em; opacity: .75; }
h1 { margin: 0; font-size: 26px; line-height: 1.2; }
h2 { margin: 26px 0 10px; font-size: 15px; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
body.dark .muted { color: rgba(243, 238, 228, .7); }
.row { display: flex; gap: 10px; }
input { flex: 1; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; font: 500 18px var(--font); letter-spacing: .08em; text-transform: uppercase; }
.btn, .btn-main { min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; font: 600 16px var(--font); cursor: pointer; }
.btn { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn-main { background: var(--orange); color: #fff; box-shadow: 0 8px 22px rgba(245, 120, 20, .3); }
.btn:active, .btn-main:active { transform: scale(.98); }
.link { color: inherit; opacity: .7; font-size: 14px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.points { font: 800 40px/1 "Avenir Next", var(--font); color: var(--orange); font-variant-numeric: tabular-nums; }
.points small { font-size: 14px; color: var(--muted); margin-left: 6px; font-weight: 600; }
#stage { height: 300px; border-radius: 18px; background: radial-gradient(circle at 50% 30%, #2b3858, var(--navy) 70%); overflow: hidden; position: relative; touch-action: none; }
#stage canvas { width: 100% !important; height: 100% !important; display: block; }
#stage .ar { position: absolute; right: 12px; bottom: 12px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; font-size: 13px; }
.item img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: var(--cream); }
.item.on { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(245, 120, 20, .25); }
.item.locked { opacity: .55; }
.item .b { margin-top: 6px; display: block; width: 100%; min-height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font: 600 13px var(--font); }
.item .b.main { background: var(--orange); color: #fff; border-color: transparent; }
.tl { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tl li { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tl .t { color: var(--muted); font-size: 12px; }
.tl .p { font-weight: 700; color: var(--orange); font-variant-numeric: tabular-nums; }
.tl .p.neg { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--navy); color: var(--cream); padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
[hidden] { display: none !important; }

/* 窄屏输入框收缩，衣柜按挂点分组。 */
input { min-width: 0; }
.slot-group { grid-column: 1 / -1; }
.slot-group h3 { margin: 4px 0 8px; font-size: 13px; color: var(--muted); }
a.btn, a.btn-main { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
button:disabled { cursor: default; opacity: .6; }
