:root{color-scheme:light;--on-bg: #fff8ea;--ink: #3b2a14;--card: #f6e7c1;--muted: #6e5938;--primary: #e39b12;--primary-ink: #2a1a06;--secondary: #fff6df;--field: #fffaf0;--good: #1f7a3f;--danger: #9d2424;--danger-ink: #fff;--line: rgba(59, 42, 20, .16);--bar: rgba(16, 12, 40, .94);--bar-ink: #fff6df;--shadow: 0 12px 30px rgba(0, 0, 0, .18);--xp: #e39b12;font-family:Noto Sans TC,PingFang TC,Microsoft JhengHei,sans-serif}html[data-theme=esports]{color-scheme:dark;--on-bg: #faf5ff;--ink: #faf5ff;--card: #3b0764;--muted: #f0abfc;--primary: #f472b6;--primary-ink: #3b0764;--secondary: #4c1d95;--field: #2e1065;--good: #4ade80;--danger: #fb7185;--danger-ink: #3b0614;--line: rgba(244, 114, 182, .45);--bar: rgba(59, 7, 100, .96);--bar-ink: #faf5ff;--xp: #22d3ee;--shadow: 0 10px 28px rgba(88, 28, 135, .45)}html[data-theme=pet]{color-scheme:light;--on-bg: #143028;--ink: #143028;--card: #ffffff;--muted: #3d6b58;--primary: #1f9d62;--primary-ink: #ffffff;--secondary: #e7f8ef;--field: #f4fff8;--good: #147a48;--danger: #c2413b;--danger-ink: #fff;--line: rgba(20, 48, 40, .12);--bar: rgba(232, 248, 239, .96);--bar-ink: #143028;--shadow: 0 10px 24px rgba(20, 80, 50, .12);--xp: #1f9d62}*{box-sizing:border-box}body{margin:0;min-height:100vh;color:var(--on-bg);background:radial-gradient(circle at 12% 10%,rgba(255,255,255,.9) 0 1px,transparent 2px),radial-gradient(circle at 78% 22%,rgba(255,255,255,.75) 0 1px,transparent 2px),radial-gradient(circle at 30% 78%,rgba(255,214,90,.18),transparent 28%),linear-gradient(180deg,#241a55,#120c2c 72%)}html[data-theme=esports] body{background:radial-gradient(circle at 8% 0%,#7c3aed,transparent 42%),radial-gradient(circle at 100% 12%,#ec4899,transparent 36%),radial-gradient(circle at 80% 80%,#22d3ee,transparent 28%),linear-gradient(180deg,#4c1d95,#2e1065 55%,#1e1b4b)}html[data-theme=adventure] body{background:#0b1c3d;color:#f8fafc}html[data-theme=pet] body{background:#e7fbf3;color:#134e4a}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit}.app-frame,.login,.setup{width:min(720px,100%);margin:0 auto;padding:12px 12px calc(156px + env(safe-area-inset-bottom))}.setup,.login{padding-top:28px}h1,h2,p{margin:0}h1{font-size:1.8rem;line-height:1.25}h2{font-size:1.25rem}.stack{display:flex;flex-direction:column;gap:12px}.card{background:var(--card);color:var(--ink);border-radius:22px;padding:16px;box-shadow:var(--shadow)}.eyebrow{font-weight:700;letter-spacing:.04em;color:var(--muted)}.muted{color:var(--muted)}.center{text-align:center;padding:24px}.cap{font-weight:800}.prompt{font-size:1.35rem;line-height:1.4}.quiz-hint{border:2px solid var(--line);border-radius:16px;background:var(--field);color:var(--ink)}.quiz-hint>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;padding:10px 14px;font-weight:800;cursor:pointer;list-style:none}.quiz-hint>summary::-webkit-details-marker{display:none}.quiz-hint:not([open])>:not(summary){display:none}.quiz-hint>summary:after{content:"▸";font-weight:900}.quiz-hint[open]>summary:after{content:"▾"}.quiz-hint-body{margin:0;padding:0 14px 14px;line-height:1.5;font-weight:700;white-space:pre-wrap}.primary,.secondary,.danger,.ghost,.link-button{min-height:52px;border-radius:16px;border:0;padding:10px 16px;font-weight:800;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px}.primary{background:var(--primary);color:var(--primary-ink)}.secondary{background:var(--secondary);color:var(--ink);border:2px solid var(--line)}.danger{background:var(--danger);color:var(--danger-ink)}.ghost{min-height:44px;background:transparent;color:var(--on-bg);border:2px solid transparent}.link-button{width:100%}.primary small,.secondary small{display:block;font-weight:700}.field{display:flex;flex-direction:column;gap:6px;font-weight:700}.field.slim{min-width:96px}input,select,textarea{min-height:52px;border-radius:14px;border:2px solid var(--line);background:var(--field);color:var(--ink);padding:10px 12px}textarea{min-height:120px}.check{display:flex;gap:10px;align-items:center;min-height:48px;font-weight:700}.check input{width:28px;height:28px;min-height:28px}.row,.tier-row,.boost-row{display:flex;flex-wrap:wrap;gap:8px}.tier-row>button{flex:1 1 30%}.tier-box{border:2px solid var(--line);border-radius:16px;padding:12px}.error{background:#ffe1e1;color:#7a1212;border-radius:14px;padding:12px;font-weight:700}.text-link{margin-left:8px;font-weight:800}.top,.themes{display:flex;justify-content:space-between;gap:8px;align-items:center}.top{flex-wrap:wrap}.brand{font-weight:900;font-size:1.15rem;white-space:nowrap}.who{opacity:.85}.top-side{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-start;align-items:center;flex:1 1 100%}.themes{margin:0;flex-wrap:wrap;justify-content:flex-end}.themes button{flex:0 1 auto;min-height:36px;border-radius:999px;border:2px solid transparent;background:transparent;color:var(--on-bg);font-weight:800;padding:4px 8px;font-size:.78rem}.top-side .ghost{min-height:36px;padding:4px 8px}.themes button.on{background:var(--primary);color:var(--primary-ink)}.ticker{overflow:hidden;border-radius:999px;color:#3b0620;background:repeating-linear-gradient(-45deg,#fb7185 0,#fb7185 12px,#f9a8d4 12px,#f9a8d4 24px);box-shadow:0 8px 18px #f43f5e59}html[data-theme=adventure] .ticker{color:#431407;background:repeating-linear-gradient(-45deg,#f97316 0,#f97316 12px,#fbbf24 12px,#fbbf24 24px)}html[data-theme=pet] .ticker{color:#7c2d12;background:repeating-linear-gradient(-45deg,#fb923c 0,#fb923c 12px,#fdba74 12px,#fdba74 24px)}.ticker p,.marquee p{display:inline-block;margin:0;padding:10px 0 10px 100%;white-space:nowrap;font-weight:900;animation:tick 16s linear infinite}@keyframes tick{to{transform:translate(-100%)}}.tabbar{position:fixed;left:0;right:0;bottom:0;display:flex;gap:8px;overflow-x:auto;padding:8px 12px calc(8px + env(safe-area-inset-bottom));background:var(--bar)}.tabbar a{flex:0 0 auto;min-height:48px;padding:0 14px;border-radius:999px;color:var(--bar-ink);text-decoration:none;display:flex;align-items:center;font-weight:800}.tabbar a.active{background:var(--primary);color:var(--primary-ink)}.quest-banner{font-size:1.4rem;font-weight:900}.xp,.pet{display:flex;gap:12px;align-items:center}.xp{color:var(--on-bg)}.xp strong,.xp span{display:block}.ring-bg,.ring-fg{fill:none;stroke-width:8}.ring-bg{stroke:#7f7f7f47}.ring-fg{stroke:var(--xp);stroke-linecap:round;transform:rotate(-90deg);transform-origin:36px 36px}.ring-label{fill:var(--ink);font-size:14px;font-weight:900}.pet-face{font-size:4rem;line-height:1}.stats{display:flex;gap:10px;padding:0;margin:8px 0 0;list-style:none;font-weight:800}.photo{width:100%;border-radius:16px}.table-wrap{overflow-x:auto;background:var(--card);color:var(--ink);border-radius:18px}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px;border-bottom:1px solid var(--line)}code{font-family:ui-monospace,monospace}.setup ol{padding-left:1.2rem;display:flex;flex-direction:column;gap:8px}.level-card{background:linear-gradient(135deg,#7c3aed,#d946ef 58%,#818cf8);color:#fff;border:0}html[data-theme=adventure] .level-card{background:linear-gradient(135deg,#6d28d9,#c2410c 70%,#f59e0b);color:#fffaf0}html[data-theme=pet] .level-card{background:linear-gradient(135deg,#059669,#34d399 60%,#a7f3d0);color:#022c22}.level-chips{display:flex;flex-wrap:wrap;gap:6px}.level-body{display:flex;gap:12px;align-items:center;min-width:0}.level-name{margin:0;font-size:2rem;font-weight:900;line-height:1}.xp-meta{display:flex;justify-content:space-between;gap:8px;align-items:baseline;font-weight:800}.xp-meta span{font-size:.82rem;text-align:right}.level-caption,.pet-line{font-size:.72rem;font-weight:700;line-height:1.4;opacity:.9}.level-ring{flex:0 0 auto}.ring-bg{fill:none;stroke:#ffffff47;stroke-width:8}.ring-fg{fill:none;stroke:#67e8f9;stroke-width:8;stroke-linecap:round;transform:rotate(-90deg);transform-origin:36px 36px}.ring-dot{fill:#fff;filter:drop-shadow(0 0 5px #67e8f9)}.ring-num,.ring-lv{fill:currentColor;font-weight:900}.ring-num{font-size:22px}.ring-lv{font-size:8px;letter-spacing:.08em}html[data-theme=pet] .ring-fg{stroke:#064e3b}html[data-theme=pet] .ring-dot{fill:#064e3b;filter:drop-shadow(0 0 4px #ecfdf5)}html[data-theme=adventure] .ring-fg{stroke:#fde68a}.stat-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.jar-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.jar-metric,.jar-facts>div{background:var(--field);color:var(--ink);border-radius:16px;padding:10px;min-width:0}.jar-metric span,.jar-facts span,.jar-facts dt{display:block;font-size:.78rem;font-weight:800;color:var(--muted)}.jar-metric strong,.jar-facts strong,.jar-facts dd{display:block;margin:4px 0 0;font-size:1.05rem;line-height:1.25;overflow-wrap:anywhere}.jar-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0}.jar-balance{font-size:1.8rem}.jar-row{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.jar-row p{margin-top:4px}.stat-card{display:flex;flex-direction:column;gap:4px;align-items:flex-start;padding:10px;min-width:0}.stat-card strong{font-size:1.15rem;line-height:1.1}.stat-card span:last-child{color:inherit;opacity:.8;font-size:.68rem;font-weight:800;line-height:1.3;overflow-wrap:anywhere}.stat-icon{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;font-size:1.05rem;font-weight:900}.stat-icon.flame{background:#ffedd5}.stat-icon.spark{background:#ede9fe}.stat-icon.coin{background:radial-gradient(circle at 30% 30%,#fff3bf,#f5b400 58%,#b45309);color:#7a3e00;box-shadow:inset 0 0 0 2px #fde68a}html[data-theme=esports] .stat-card{background:linear-gradient(180deg,#6d28d9,#4c1d95);color:#faf5ff;border:1px solid rgba(244,114,182,.55)}html[data-theme=esports] .task-card{background:linear-gradient(180deg,#4c1d95,#3b0764);color:#faf5ff;border:2px solid #22d3ee;box-shadow:0 0 0 1px #22d3ee59,0 0 22px #22d3ee59}html[data-theme=adventure] .task-card{border:2px solid #f59e0b;box-shadow:0 0 16px #f59e0b47}html[data-theme=pet] .task-card{border:2px solid #10b981;box-shadow:0 0 16px #10b98147}.task-top{display:flex;gap:8px;align-items:flex-start}.task-main{min-width:0;flex:1}.task-main h2{font-size:1.15rem}.task-icon{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;font-size:1.45rem;background:#22d3ee29;border:1px solid #22d3ee;flex:0 0 auto}html[data-theme=adventure] .task-icon{background:#f59e0b29;border-color:#f59e0b}html[data-theme=pet] .task-icon{background:#10b98129;border-color:#10b981}.xp-side{color:var(--xp);font-size:.92rem;font-weight:900;white-space:nowrap}.payout,.tier-ask,.progress-line,.task-blurb{overflow-wrap:anywhere}.xp-track{height:12px;border-radius:999px;background:#ffffff38;overflow:hidden}html[data-theme=adventure] .xp-track,html[data-theme=pet] .xp-track{background:#00000014}.xp-track span{display:block;height:100%;background:var(--xp)}.pills{display:flex;flex-wrap:wrap;gap:6px}.pill{display:inline-flex;align-items:center;min-height:28px;padding:2px 8px;border-radius:999px;background:var(--secondary);color:var(--ink);font-weight:800;font-size:.78rem}.pill.cat-study{background:#ddd6fe;color:#4c1d95}.pill.cat-health{background:#bbf7d0;color:#14532d}.pill.cat-sport{background:#fed7aa;color:#9a3412}.pill.lock.open{background:#4ade80;color:#052e16}.pill.lock.done{background:#67e8f9;color:#083344}.pill.lock.locked{background:#e5e7eb;color:#374151}.tier-panel{border:2px dashed rgba(255,255,255,.45);border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:8px}html[data-theme=adventure] .tier-panel,html[data-theme=pet] .tier-panel{border-color:#00000047;background:#ffffff59}html[data-theme=esports] .tier-row>button.secondary{background:#2e1065;color:#faf5ff;border:2px solid rgba(255,255,255,.2)}html[data-theme=esports] .tier-row>button.primary{background:#ff2d95;color:#fff}html[data-theme=adventure] .tier-row>button.primary{background:#f59e0b;color:#3b2204}html[data-theme=pet] .tier-row>button.primary{background:#059669;color:#fff}.boost-line{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0;font-weight:800}.boost-pill{display:inline-flex;align-items:center;min-height:32px;padding:4px 10px;border-radius:999px;background:#fb923c;color:#431407;font-weight:900}.board-title{font-size:1.2rem}.board-foot{font-size:.8rem;line-height:1.45;opacity:.9}.badge,.rank-chip{display:inline-flex;align-items:center;min-height:28px;padding:2px 10px;border-radius:999px;background:#ffffff38;color:inherit;font-weight:900;font-size:.82rem}.rank-chip{background:#0000002e}@media(max-width:420px){.card{padding:12px}.level-name{font-size:1.7rem}.stat-card{padding:8px}.stat-card strong{font-size:1rem}.themes button{font-size:.72rem;min-height:32px;padding:2px 6px}.tier-row{min-width:0}.tier-row>button{min-width:0;min-height:52px;padding:6px 4px}.tabbar{width:100%;max-width:100%}.xp-side{font-size:.78rem}}@media(prefers-reduced-motion:reduce){.ticker p,.marquee p{animation:none;padding-left:12px}}.pet-sheet,.pet-task{background:#fffdf6;color:#134e4a;border-radius:22px;padding:16px;box-shadow:0 10px 24px #10503214}.pet-diary{font-size:.92rem}.pet-diary .badge,.pet-diary .rank-chip{font-size:.72rem;min-height:24px;padding:2px 8px}.pet-diary-title{font-size:1.28rem;line-height:1.25}.pet-date{font-weight:700;font-size:.82rem}.pet-scene{position:relative;height:280px;border-radius:18px;overflow:hidden}.scene-art{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%}.pet-bubble{position:absolute;top:12px;left:12px;right:12px;z-index:2;margin:0;background:#fff;color:#134e4a;border-radius:16px;padding:10px 12px;font-size:.82rem;font-weight:700;box-shadow:0 6px 16px #00000014}.creature-wrap{position:absolute;left:50%;bottom:18px;z-index:1;transform:translate(-50%)}.creature-wrap svg{width:128px;height:118px}.creature-wrap[data-stage="1"] svg{width:142px;height:130px}.creature-wrap[data-stage="2"] svg{width:160px;height:146px}.creature-wrap[data-stage="3"] svg{width:184px;height:168px}.pet-growth{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;list-style:none;padding:0;margin:8px 0 0;text-align:center}.pet-growth li{padding:4px 2px;border-radius:12px}.pet-growth li.on{outline:3px solid #f97316}.pet-diary .pet-growth strong,.pet-diary .pet-growth span{display:block;font-size:.62rem}.pet-face{display:flex;gap:10px;width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;font-weight:800}.pet-face-copy{min-width:0;display:flex;flex-direction:column;gap:4px}.pet-diary .pet-face-copy strong{font-size:1.05rem}.pet-diary .flavor-line,.pet-diary .pet-pay,.pet-diary .pet-task p{font-size:.82rem}.pet-diary .pill{font-size:.68rem;min-height:22px}.flavor-line{font-weight:700}.pet-tile{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;font-size:1.15rem;background:#ecfdf5;flex:0 0 auto}.pet-pay{font-weight:800}.adv-head h1{font-size:1.55rem}.treasure{display:flex;gap:10px;align-items:center;background:#14213d;color:#f8fafc;border-radius:18px;padding:12px}.treasure .eyebrow{color:#fde68a}.treasure strong{display:block;font-size:1.25rem}.chest{width:42px;height:32px;border-radius:6px;background:#dc2626;box-shadow:inset 0 10px #991b1b;flex:0 0 auto}.map-card{position:relative;height:620px;background:#f6e7c4;color:#3b2a14;border-radius:22px;overflow:hidden}.map-decor{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none}.map-pin{position:absolute;z-index:1;width:150px;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:6px 8px;border:0;border-radius:12px;background:#fff7e8f0;color:#3b2a14;text-align:left;font-weight:800}.map-pin strong{font-size:.92rem}.map-pin small{font-weight:700}.pin-1{left:14px;bottom:24px}.pin-2{right:10px;top:250px}.pin-3{left:16px;top:86px}.map-detail,.adv-task{background:#fff7e8;color:#3b2a14;border-radius:18px;padding:14px}.adv-task h2{font-size:1.15rem}.adv-task-list{margin-top:4px}.clear-flag{position:absolute;z-index:1;top:14px;right:12px;display:inline-flex;align-items:center;gap:8px;margin:0;padding:6px 10px;border-radius:12px;background:#fff;color:#111;font-weight:900;border:3px solid #111}.clear-flag.dim{opacity:.38}.clear-flag:before{content:"";width:28px;height:18px;background:repeating-conic-gradient(#111 0,#111 25%,#fff 0,#fff 50%) 0 0 / 8px 8px;border:2px solid #111}.push-card h2{font-size:1.35rem}.notice-mock{margin-top:18px;background:#fff;color:#1a1028;border-radius:22px;padding:14px 16px 16px;box-shadow:0 18px 40px #00000059}.notice-app{font-size:.78rem;font-weight:800;letter-spacing:.04em;color:#6b6280;margin-bottom:4px}.notice-mock h2{font-size:1.2rem;margin-bottom:8px}.notice-mock p{white-space:pre-line;font-weight:700;line-height:1.5}.admin-shell{display:flex;flex-direction:column;gap:12px}.admin-nav{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px}.admin-nav button,.admin-nav a{flex:0 0 auto;min-height:44px;border-radius:999px;border:2px solid var(--line);background:var(--secondary);color:var(--ink);padding:8px 14px;font-weight:800;text-decoration:none;display:inline-flex;align-items:center}.admin-nav button.on{background:var(--primary);color:var(--primary-ink);border-color:transparent}.admin-task{display:flex;flex-direction:column;gap:8px;padding-top:8px;border-top:1px solid var(--line)}.admin-task h3{margin:0;font-size:1.05rem}.amount-row{display:flex;flex-wrap:wrap;gap:8px;font-weight:800}.status-chip{display:inline-flex;align-items:center;min-height:28px;padding:2px 10px;border-radius:999px;font-weight:900;background:var(--secondary)}.status-chip.active{background:#bbf7d0;color:#14532d}.status-chip.disabled{background:#fecaca;color:#7f1d1d}.status-chip.skipped{background:#fde68a;color:#78350f}@media(min-width:1000px){.app-frame:has(.admin-shell){width:min(1180px,calc(100% - 24px))}.admin-shell{display:grid;grid-template-columns:220px minmax(0,1fr);align-items:start;gap:16px}.admin-nav{flex-direction:column;position:sticky;top:12px}.admin-nav button,.admin-nav a{width:100%}}.file-pick{position:relative;display:flex;align-items:center;justify-content:center;min-height:52px;border-radius:14px;border:2px dashed var(--line);font-weight:800;overflow:hidden}.file-pick input{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer}.veg-shot,.veg-proof{display:flex;flex-wrap:wrap;gap:8px}.veg-shot figure{margin:0;display:flex;flex-direction:column;gap:4px;align-items:flex-start}.veg-shot img,.veg-proof img{width:104px;height:104px;object-fit:cover;border-radius:16px;background:#166534}.veg-shot button{min-height:36px;padding:4px 10px}.veg-review{display:flex;flex-wrap:nowrap;gap:10px;align-items:center}.veg-review>.row{flex:1 1 auto;flex-direction:column}.veg-review>.row>button{width:100%}
