:root { color-scheme: dark; --bg:#0f1419; --card:#161d26; --line:#2a3644; --fg:#e7edf3; --dim:#8b9bad; --acc:#2fbf8f; --blue:#1083fe; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: var(--acc); }
#app { max-width: 680px; margin: 0 auto; padding: 0 14px 40px; }
.topbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 20px 2px 12px; }
.logo { border-radius: 50%; }
.brand { font-weight: 700; font-size: 20px; }
.brand-sub { font-size: 12px; color: var(--dim); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.card p { line-height: 1.6; font-size: 14px; margin: 0 0 12px; color: #cfd9e3; }
.card p.fine, .fine { font-size: 12px; color: var(--dim); }
h2, h3 { margin: 0 0 8px; }
h3 { font-size: 15px; }
.lbl { display: block; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 6px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
input[type=text], textarea { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--fg); background: #0c1117; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
textarea { width: 100%; resize: vertical; margin-bottom: 8px; }
button, .btn { font: inherit; font-size: 14px; font-weight: 600; color: #04130d; background: var(--acc); border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; text-decoration: none; display: inline-block; }
button.ghost { background: transparent; color: var(--acc); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: default; }
.msg { color: #ff8f8f; min-height: 1em; font-size: 13px; margin: 10px 0 0; }
.bar { height: 8px; background: #0c1117; border-radius: 99px; overflow: hidden; margin: 10px 0; }
#trainBar { height: 100%; width: 0; background: var(--acc); transition: width .15s; }
.log { font-size: 12px; color: var(--dim); white-space: pre-wrap; margin: 8px 0 0; font-family: ui-monospace, Consolas, monospace; }
.score-row { display: flex; gap: 18px; align-items: center; }
.score { width: 112px; height: 112px; flex: none; border-radius: 50%; border: 6px solid var(--acc); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score span { font-size: 38px; font-weight: 800; line-height: 1; }
.score small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 14px 0; }
.stat { background: #0c1117; border-radius: 10px; padding: 8px 10px; font-size: 11px; color: var(--dim); }
.stat b { display: block; font-size: 16px; color: var(--fg); margin-bottom: 2px; }
#hist svg { width: 100%; height: auto; display: block; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } .score-row { flex-direction: column; align-items: flex-start; } }
.plist { margin: 0; padding-left: 18px; font-size: 13px; color: #cfd9e3; }
.plist li { margin-bottom: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.plist small { color: var(--dim); }
.again { text-align: center; font-size: 13px; }

/* bluesky-ish thread */
.post { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.post:first-child { border-top: 0; }
.post.reply { padding-left: 0; }
.post img.av, .post .av { width: 42px; height: 42px; border-radius: 50%; flex: none; background: #3a4757; object-fit: cover; }
.post .body { min-width: 0; flex: 1; }
.post .head { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post .head b { color: var(--fg); }
.post .head span { color: var(--dim); }
.post .txt { font-size: 15px; line-height: 1.45; margin: 3px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post .acts { display: flex; gap: 28px; font-size: 12px; color: var(--dim); }
.post .tag { display: inline-block; font-size: 10px; color: var(--dim); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.composer { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.composer .row { gap: 8px; }
footer { text-align: center; color: var(--dim); font-size: 12px; margin-top: 24px; line-height: 1.8; }

.brain { margin-top: 12px; }
.brain summary { cursor: pointer; color: #8b9bad; font-size: 13px; }
.knobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
.knobs label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #8b9bad; }
.knobs select { background: #0f1720; color: inherit; border: 1px solid #2a3a4a; border-radius: 8px; padding: 6px 8px; font: inherit; }
