:root {
  --bg: #0b0c10;
  --surface: #111319;
  --raised: #161921;
  --sunk: #0d0f14;
  --line: #22262f;
  --line-2: #2d323d;
  --ink: #eceef4;
  --ink-2: #c3c7d3;
  --muted: #8a90a2;
  --faint: #5d6374;
  --accent: #6366f1;
  --accent-hi: #7c7ff5;
  --accent-soft: rgba(99, 102, 241, .14);
  --accent-line: rgba(99, 102, 241, .55);
  --discord: #5865f2;
  --good: #22c55e;
  --good-soft: rgba(34, 197, 94, .13);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, .13);
  --warn: #f5b546;
  --warn-soft: rgba(245, 181, 70, .12);
  --bad: #f87171;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 18px 40px -24px rgba(0, 0, 0, .7);
  --font: "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; background: radial-gradient(1200px 500px at 50% -220px, rgba(99, 102, 241, .10), transparent 70%), var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .88em; background: var(--sunk); border: 1px solid var(--line); padding: .08em .38em; border-radius: 6px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 36px); background: rgba(11, 12, 16, .78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 800; font-size: 17px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; letter-spacing: -.01em; }
.brand-text span { font-size: 12px; color: var(--muted); }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line-2); object-fit: cover; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.avatar.sm { width: 22px; height: 22px; font-size: 12px; }
.who-name { font-weight: 600; font-size: 14px; }
.staff-tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-hi); background: var(--accent-soft); padding: 2px 8px; border-radius: 99px; }

.app { width: min(1040px, 100%); margin: 0 auto; padding: clamp(18px, 4vw, 40px) clamp(16px, 4vw, 32px) 80px; }
.narrow { width: min(760px, 100%); margin: 0 auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--raised); font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: #1c2029; border-color: #3a404d; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--raised); }
.btn.discord { background: var(--discord); border-color: var(--discord); color: #fff; height: 50px; padding: 0 24px; font-size: 15px; border-radius: 13px; width: 100%; }
.btn.discord:hover { background: #4752e0; border-color: #4752e0; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.kbd { font-family: var(--mono); font-size: 11px; color: var(--faint); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 0 5px; line-height: 17px; }

.login { min-height: calc(100vh - 120px); display: grid; place-items: center; }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 36px 30px 28px; box-shadow: var(--shadow); text-align: center; }
.login-card .mark { width: 54px; height: 54px; font-size: 26px; border-radius: 16px; margin: 0 auto 20px; }
.login-card h1 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 8px; }
.login-card p { color: var(--muted); margin: 0 0 26px; }
.login-card .fine { font-size: 12.5px; color: var(--faint); margin: 18px 0 0; }
.login-steps { display: grid; gap: 10px; text-align: left; margin: 0 0 26px; padding: 0; list-style: none; }
.login-steps li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: 14px; }
.login-steps b { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-hi); font-size: 12px; }

.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.hello h1 { margin: 0; font-size: clamp(24px, 3.2vw, 30px); letter-spacing: -.025em; }
.hello p { margin: 4px 0 0; color: var(--muted); }

.callout { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; margin-bottom: 26px; border-radius: var(--radius); border: 1px solid var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), rgba(99, 102, 241, .05)); }
.callout strong { display: block; font-size: 16px; }
.callout span { color: var(--ink-2); font-size: 14px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 0 0 rgba(124, 127, 245, .6); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(124, 127, 245, 0); } 100% { box-shadow: 0 0 0 0 rgba(124, 127, 245, 0); } }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 30px 0 12px; }
.section-title h2 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .count { font-size: 11px; color: inherit; opacity: .7; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
a.card, button.card { display: block; text-align: left; width: 100%; cursor: pointer; transition: border-color .15s, transform .15s, background .15s; }
a.card:hover, button.card:hover { border-color: var(--line-2); background: #13161d; transform: translateY(-1px); }
.project-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-head h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.project-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-top: 4px; }
.project-note { color: var(--ink-2); font-size: 14px; margin: 12px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.open-count { color: var(--accent-hi); font-weight: 700; }
.done-count { color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.offen { color: var(--warn); background: var(--warn-soft); }
.pill.in_arbeit { color: var(--info); background: var(--info-soft); }
.pill.fertig { color: var(--good); background: var(--good-soft); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 18px; cursor: pointer; background: none; border: 0; padding: 0; }
.back:hover { color: var(--ink); }

.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.detail-head h1 { margin: 0; font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -.025em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0 8px; }
.step { position: relative; padding-top: 14px; font-size: 13px; font-weight: 600; color: var(--faint); }
.step::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--line); }
.step.on { color: var(--ink); }
.step.on::before { background: var(--accent); }
.note-box { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--sunk); border: 1px solid var(--line); color: var(--ink-2); white-space: pre-wrap; }
.note-box b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }

.ask-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ask-row h3 { margin: 0; font-size: 15.5px; }
.ask-row p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.stack { display: grid; gap: 10px; }

.history details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.history summary { list-style: none; cursor: pointer; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history summary::-webkit-details-marker { display: none; }
.history summary h3 { margin: 0; font-size: 15px; }
.history summary p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.history summary .chev { color: var(--faint); transition: transform .15s; }
.history details[open] .chev { transform: rotate(90deg); }
.qa { padding: 0 18px 16px; display: grid; gap: 12px; }
.qa-item { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--sunk); border: 1px solid var(--line); }
.qa-q { font-size: 13.5px; color: var(--muted); margin: 0 0 6px; }
.qa-a { font-weight: 600; margin: 0; }
.qa-note { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; }

.staff-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
select, textarea, input[type="text"] { font: inherit; color: var(--ink); background: var(--sunk); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; }
textarea { width: 100%; min-height: 84px; resize: vertical; line-height: 1.5; }
textarea:focus, select:focus, input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }

.flow { width: min(860px, 100%); margin: 0 auto; }
.flow.wide { width: min(1040px, 100%); }
.flow-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.flow-top .crumb { color: var(--muted); font-size: 14px; }
.flow-top .crumb strong { color: var(--ink); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px 0 6px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.tab .n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--raised); font-size: 11.5px; color: var(--ink-2); }
.tab:disabled { opacity: .45; cursor: not-allowed; }
.tab.cur { border-color: var(--accent-line); color: var(--ink); background: var(--accent-soft); }
.tab.cur .n { background: var(--accent); color: #fff; }
.tab.ok .n { background: var(--good-soft); color: var(--good); }
.progress { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 26px; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .25s ease; }

.q-header { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-hi); background: var(--accent-soft); border-radius: 7px; padding: 3px 9px; margin-bottom: 12px; }
.q-text { font-size: clamp(19px, 2.4vw, 23px); font-weight: 700; letter-spacing: -.015em; line-height: 1.35; margin: 0 0 6px; }
.q-hint { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.q-body { display: grid; gap: 18px; }
.q-body.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; }
.opts { display: grid; gap: 10px; }
.opt { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; width: 100%; text-align: left; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s; }
.opt:hover { border-color: #3b4150; background: #141720; }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.opt.peek:not(.sel) { border-color: #444b5c; }
.tick { margin-top: 2px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #4a5060; display: grid; place-items: center; transition: all .12s; }
.multi .tick { border-radius: 6px; }
.opt.sel .tick { border-color: var(--accent); background: var(--accent); }
.opt.sel .tick::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.multi .opt.sel .tick::after { width: 10px; height: 6px; border-radius: 0; background: none; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.opt-label { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt-desc { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.opt.sel .opt-desc { color: var(--ink-2); }
.badge { font-size: 11px; font-weight: 700; color: var(--good); background: var(--good-soft); border-radius: 6px; padding: 1px 7px; letter-spacing: .02em; }
.opt .kbd { margin-top: 2px; }
.other-box { margin-top: 10px; }
.preview { position: sticky; top: 84px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--sunk); overflow: hidden; }
.preview-head { padding: 9px 14px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; }
.preview pre { margin: 0; padding: 14px; font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-size: 12.5px; line-height: 1.55; color: var(--ink-2); white-space: pre; overflow: auto; max-height: 60vh; }
.add-note { background: none; border: 0; color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 4px 0; }
.add-note:hover { color: var(--ink); }
.flow-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(11, 12, 16, 0), var(--bg) 35%); }
.flow-foot .hint { color: var(--faint); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }

.review { display: grid; gap: 10px; }
.review-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); }
.review-item .qa-q { margin: 0 0 4px; }

.done { text-align: center; padding: 60px 20px; }
.done-ring { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center; background: var(--good-soft); color: var(--good); animation: pop .35s ease; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done h1 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.02em; }
.done p { color: var(--muted); margin: 0 0 26px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 11px 16px; border-radius: 11px; background: #1d212b; border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; max-width: calc(100% - 32px); }
.toast.err { border-color: rgba(248, 113, 113, .5); color: #fecaca; }
.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface), #151821, var(--surface)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 760px) {
  .q-body.split { grid-template-columns: 1fr; }
  .preview { position: static; }
  .opt .kbd, .flow-foot .hint, .brand-text span, .who-name { display: none; }
  .callout { flex-direction: column; align-items: stretch; }
  .steps { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
