:root{--bg: #f6f7f9;--surface: #ffffff;--text: #171b3e;--muted: #555b6e;--border: #dde0e8;--accent: #1d257a;--accent-text: #ffffff;--accent-soft: #e8eaf4;--pink: #f62a72;--pink-text: #d0165f;--ok: #177344;--warn: #8a5300;--err: #b42318;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--text);background:var(--bg)}@media(prefers-color-scheme:dark){:root{--bg: #0d1020;--surface: #171b30;--text: #ecebf6;--muted: #a9adbf;--border: #2b3150;--accent: #9fb0ff;--accent-text: #0d1020;--accent-soft: #232a4d;--pink: #ff6b9d;--pink-text: #ff6b9d;--ok: #52c985;--warn: #f0b252;--err: #ff8a80}}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}h1{font-size:1.5rem;margin:0}h2{font-size:1.1rem;margin:0 0 .5rem}.center{max-width:32rem;margin:15vh auto;padding:1rem;text-align:center}.page{max-width:52rem;margin:0 auto;padding:1rem}.who{display:flex;gap:.75rem;align-items:center;color:var(--muted)}.card{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:12px;padding:1rem;margin-bottom:1rem}.card.muted{opacity:.85}.hint{color:var(--muted);margin:.25rem 0 .75rem}.actions{display:flex;gap:.75rem;flex-wrap:wrap}button,.button{font:inherit;cursor:pointer;border-radius:8px;padding:.55rem .9rem;border:1px solid var(--border);background:var(--surface);color:var(--text)}button.primary,.button{background:var(--accent);color:var(--accent-text);border-color:var(--accent)}button:focus-visible,.button:focus-within{outline:3px solid var(--accent);outline-offset:2px}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.error{color:var(--err)}.chat{display:flex;flex-direction:column;gap:.5rem;padding:.25rem 0}.turn{display:flex;flex-direction:column}.turn .bubble.user{align-self:flex-end}.turn .bubble{scroll-margin-top:.75rem}.bubble{padding:.55rem .8rem;border-radius:12px;max-width:85%;white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid var(--border);background:var(--bg);color:var(--text)}.bubble.user{align-self:flex-end;background:var(--accent);color:var(--accent-text);border-color:var(--accent)}.bubble.system{align-self:center;color:var(--warn);background:var(--surface);font-size:.9rem}.via{margin-right:.35rem}.composer{display:flex;gap:.5rem;margin:.75rem -1rem -1rem;flex-wrap:nowrap;align-items:center;position:sticky;bottom:0;z-index:2;padding:.75rem 1rem calc(.75rem + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--border);border-radius:0 0 12px 12px}.composer input{flex:1 1 14rem;font:inherit;padding:.55rem .7rem;border-radius:8px;border:1px solid var(--border);background:var(--bg);color:var(--text)}button:disabled{opacity:.55;cursor:not-allowed}button.voice.on{background:var(--err);color:var(--surface);border-color:var(--err)}.sources{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center;margin-top:.5rem;font-size:.88rem}button.source{padding:.15rem .5rem;border-radius:999px;font-size:.85rem;background:var(--surface);color:var(--accent);border-color:var(--accent)}button.source sup{font-size:.75rem}.bubble button.source:has(sup){padding:0 .35rem;margin:0 .1rem;vertical-align:super;line-height:1.2}.crash{text-align:left;white-space:pre-wrap;font-size:.8rem;max-height:40vh;overflow:auto;background:var(--surface);color:var(--err);border:1px solid var(--border);padding:.5rem;border-radius:8px}#global-error{position:fixed;left:0;right:0;bottom:0;padding:.6rem 1rem;background:var(--err);color:var(--surface);font-size:.85rem;z-index:10}h3{font-size:1rem;margin:1rem 0 .25rem}button.tab{padding:.3rem .75rem;border-radius:999px}button.tab.on{background:var(--accent);color:var(--accent-text);border-color:var(--accent)}.chat-head{display:flex;justify-content:space-between;align-items:center;gap:.5rem;flex-wrap:wrap}.themes{display:flex;gap:.4rem;flex-wrap:wrap;margin:.25rem 0 .75rem}.hint.small{font-size:.82rem;margin-bottom:0}.frame{position:relative;width:100%;aspect-ratio:16 / 9;background:#000;border-radius:8px;overflow:hidden}.frame iframe{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;border:0}.player figcaption{display:flex;justify-content:space-between;gap:.75rem;flex-wrap:wrap;align-items:center;font-size:.88rem;color:var(--muted);margin-top:.4rem}a{color:var(--accent)}a.tab:focus-visible,a.source:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.cloud{list-style:none;margin:.5rem 0 0;padding:.5rem 0;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:.25rem .9rem}.cloud li{line-height:1.15}button.word{border:none;background:none;padding:.1rem .25rem;color:var(--accent);border-radius:6px}button.word.tier-1,button.word.tier-2{opacity:.8}button.word:hover,button.word.on{background:var(--accent);color:var(--accent-text)}a.source{display:inline-flex;align-items:center;padding:.15rem .5rem;border-radius:999px;font-size:.85rem;border:1px solid var(--accent);color:var(--accent);text-decoration:none;background:var(--surface)}.bubble a.source:has(sup){padding:0 .35rem;margin:0 .1rem;vertical-align:super;line-height:1.2}.quiz fieldset{border:1px solid var(--border);border-radius:10px;margin:0 0 .75rem;padding:.6rem .8rem .8rem}.quiz legend{font-weight:600;padding:0 .3rem}.quiz legend .hint{font-weight:400;font-size:.85rem}.options{display:grid;grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));gap:.4rem;margin-top:.4rem}.option{display:flex;gap:.5rem;align-items:center;padding:.5rem .65rem;border:1px solid var(--border);border-radius:8px;cursor:pointer;background:var(--bg)}.option.on{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}.option:focus-within{outline:3px solid var(--accent);outline-offset:2px}.submit-video{display:grid;gap:.35rem;max-width:34rem;margin-top:.5rem}.field{font:inherit;padding:.5rem .6rem;border-radius:8px;border:1px solid var(--border);background:var(--bg);color:var(--text)}button.link{border:none;background:none;padding:0;color:var(--accent);text-decoration:underline}.source.inline{display:inline-flex;padding:0 .45rem;margin:0 .15rem;font-size:.8rem;line-height:1.5;vertical-align:baseline;white-space:nowrap}.sources{flex-direction:column;align-items:flex-start}.sources .source b{margin-right:.15rem}blockquote.quote{margin:.4rem 0;padding:.35rem .75rem;border-left:3px solid var(--accent);background:var(--surface);border-radius:0 8px 8px 0;font-style:italic;white-space:pre-wrap}blockquote.quote{border-left-color:var(--accent)}button.word:hover{background:var(--accent-soft);color:var(--accent)}button.word.on{background:var(--accent);color:var(--accent-text)}button.word.keyword{color:var(--muted)}.bubble.assistant{background:var(--surface)}.player-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:#080a19b8;display:flex;align-items:center;justify-content:center;padding:max(1rem,env(safe-area-inset-top)) 1rem max(1rem,env(safe-area-inset-bottom));animation:fade-in .15s ease-out;cursor:pointer}.player.lightbox{position:relative;margin:0;width:min(60rem,100%,calc((100vh - 8rem) * 16 / 9));cursor:auto;background:var(--surface);border-radius:12px;padding:.5rem;box-shadow:0 20px 60px #00000073}.player.lightbox figcaption{margin-top:.4rem;padding:0 .25rem}.player-close{position:absolute;top:-.9rem;right:-.9rem;z-index:1;width:2.4rem;height:2.4rem;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--surface);color:var(--text);border:1px solid var(--border);box-shadow:0 4px 12px #0000004d}@media(max-width:40rem){.player-close{top:-2.9rem;right:0}.player.lightbox{padding:.35rem}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.player-backdrop{animation:none}}.donate{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap;margin:.5rem 0 .75rem}.donate p{flex:1 1 22rem;margin:0}a.button{text-decoration:none;display:inline-block}:root{--tabbar-h: 0px;--cloud-scale: 1}@media(min-width:48.01rem){.page{max-width:62rem}}.app-header{display:flex;align-items:center;gap:1rem;margin-bottom:1rem}.brand{display:flex;flex-direction:column;text-decoration:none;color:var(--text);margin-right:auto;flex:none;white-space:nowrap}.brand-name{font-size:1.5rem;font-weight:750;letter-spacing:-.01em;border-bottom:2px solid var(--pink);padding-bottom:.1rem;align-self:flex-start}.tagline{margin-top:.15rem;color:var(--muted);font-size:.95rem}.tabs{display:flex;gap:.35rem}a.tab{display:inline-flex;align-items:center;gap:.4rem;text-decoration:none;padding:.45rem .85rem;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--text);white-space:nowrap}a.tab.on{background:var(--accent);color:var(--accent-text);border-color:var(--accent)}a.tab .icon{width:18px;height:18px}.tab-short{display:none}a.info{display:inline-flex;align-items:center;justify-content:center;width:2.4rem;height:2.4rem;border-radius:50%;color:var(--muted);border:1px solid var(--border);background:var(--surface);flex:none}a.info:hover,a.info.on{color:var(--accent);border-color:var(--accent)}a.info:focus-visible{outline:3px solid var(--accent);outline-offset:2px}footer.reminder{display:flex;flex-wrap:wrap;gap:.4rem 1rem;align-items:center;justify-content:center;margin:1.25rem 0 .5rem;font-size:.85rem;color:var(--muted)}footer.reminder a{color:var(--accent)}.contribute-banner{display:flex;align-items:center;gap:.85rem;margin:1.5rem 0 .25rem;padding:.9rem 1rem;background:var(--accent-soft);color:var(--text);border:1px solid var(--border);border-left:4px solid var(--pink);border-radius:12px}.contribute-banner-icon{display:inline-flex;color:var(--pink-text);flex:none}.contribute-banner-icon .icon{width:28px;height:28px}.contribute-banner-text{display:flex;flex-direction:column;gap:.15rem;flex:1 1 0;min-width:0;line-height:1.4}.contribute-banner .button{flex:none;text-decoration:none;font-weight:600}@media(prefers-color-scheme:dark){.contribute-banner{background:var(--surface)}}@media(max-width:30rem){.contribute-banner{flex-wrap:wrap}.contribute-banner .button{flex:1 1 100%;text-align:center}}.prose h3{margin:1.1rem 0 .35rem}.prose ul{margin:.25rem 0 .5rem;padding-left:1.2rem}.prose li{margin:.3rem 0;line-height:1.45}.prose p{line-height:1.5}.anchor{height:0;scroll-margin-top:.75rem}@media(max-width:48rem){:root{--tabbar-h: calc(3.75rem + env(safe-area-inset-bottom)) ;--cloud-scale: .6}.cloud{gap:.15rem .6rem}body{padding-bottom:var(--tabbar-h)}.page{padding:.75rem .75rem 0}.app-header{margin-bottom:.75rem}.brand-name{font-size:1.25rem}.tagline{font-size:.85rem}.tabs{position:fixed;z-index:10;left:0;right:0;bottom:0;height:var(--tabbar-h);gap:0;padding:.25rem .25rem env(safe-area-inset-bottom);background:var(--surface);border-top:1px solid var(--border);box-shadow:0 -4px 16px #00000014}a.tab{flex:1 1 0;flex-direction:column;justify-content:center;gap:.15rem;padding:.3rem .1rem;border:none;border-radius:10px;background:none;color:var(--muted);font-size:.72rem;font-weight:600}a.tab .icon{width:24px;height:24px}a.tab.on{background:none;color:var(--accent)}a.tab.on .icon{stroke-width:2.3}.tab-label{display:none}.tab-short{display:inline}.composer{bottom:var(--tabbar-h)}footer.reminder{margin-bottom:.75rem}}.composer input{flex:1 1 10rem;min-width:0}button.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;padding:0;flex:none}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spin{animation:none}}
