:root {
  color-scheme: dark;
  --bg: #111715;
  --panel: #19211e;
  --line: #2c3832;
  --text: #e9eeeb;
  --muted: #9aa79f;
  --accent: #bce4cf;
  --bad: #ffb1ab;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:where(button, a, input, textarea, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* The home screen has one action. Everything else lives behind the menu. */
.login-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 24px; }
.login-card { width: min(100%, 380px); }
.login-icon { margin-bottom: 24px; border-radius: 18px; }
.login-card h1 { font-size: 32px; margin: 0 0 14px; font-weight: 500; letter-spacing: -.8px; }
.login-card > p { color: var(--muted); font-size: 15px; }
#device-code { font-size: 26px; text-align: center; letter-spacing: 5px; padding: 16px; font-variant-numeric: tabular-nums; }
.login-card > .primary { padding: 15px; margin-top: 16px; }
.login-card .hint { margin-top: 22px; font-size: 12px; }
.phone-address { font-size: 22px; color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.phone-code { font-size: 40px; letter-spacing: 5px; font-variant-numeric: tabular-nums; margin: 16px 0; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.device-row .hint { margin: 4px 0; }
.navigation { position: fixed; z-index: 10; top: max(24px, env(safe-area-inset-top)); right: max(28px, env(safe-area-inset-right)); }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); }
.icon-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover, .icon-button[aria-expanded="true"] { background: var(--panel); color: var(--text); }
.menu { position: absolute; right: 0; top: 54px; width: 200px; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 16px 48px #0004; }
.menu a, .menu button { display: block; width: 100%; padding: 11px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; text-decoration: none; font-size: 14px; }
.menu :is(a, button):hover, .menu a[aria-current="page"] { background: #243029; color: var(--text); }
.menu-divider { height: 1px; margin: 6px 8px; background: var(--line); }
.speak-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 104px 24px; outline: none; }
.voice-control { position: relative; display: grid; justify-items: center; }
.voice-button { position: relative; display: grid; place-items: center; width: 112px; height: 112px; border: 1px solid transparent; border-radius: 50%; background: var(--accent); color: #233c2e; transition: background .2s, transform .2s, box-shadow .2s; }
.voice-button:hover:not(:disabled) { background: #d0f0de; transform: scale(1.035); }
.voice-button:active:not(:disabled) { transform: scale(.97); }
.voice-button svg { width: 32px; height: 32px; }
.mic-icon { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; }
.voice-button .stop-icon { display: none; fill: currentColor; }
.voice-button.active { background: #263d31; border-color: #668a74; color: var(--accent); }
.voice-button.active .mic-icon { display: none; }
.voice-button.active .stop-icon { display: block; }
.listening .voice-button { box-shadow: 0 0 0 10px #bce4cf08; }
.speaking .voice-button { animation: speaking 1.6s ease-in-out infinite; }
.voice-status { position: absolute; top: 100%; margin: 22px 0 0; width: min(310px, calc(100vw - 48px)); text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
.voice-status.idle { visibility: hidden; }
@keyframes speaking { 50% { box-shadow: 0 0 0 16px #bce4cf0c; } }

.kanban-page { max-width: 1280px; margin: 0 auto; padding: 106px 48px 64px; outline: none; }
.board-heading, .board-actions, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.035em; font-weight: 550; margin: 0; }
h2 { font-size: 21px; line-height: 1.35; letter-spacing: -.02em; font-weight: 550; margin: 0; }
.board-actions { gap: 8px; }
.primary, .secondary { border-radius: 10px; padding: 11px 16px; font-weight: 550; font-size: 13px; border: 1px solid transparent; }
.primary { color: #233c2e; background: var(--accent); }
.primary:hover:not(:disabled) { background: #d0f0de; }
.secondary { color: var(--text); background: transparent; border-color: var(--line); }
.secondary:hover:not(:disabled) { background: #243029; }
.text-button { border: none; background: none; padding: 10px; min-width: 44px; min-height: 44px; color: var(--muted); font-size: 14px; }
.text-button:hover { color: var(--text); }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; margin-top: 36px; }
.column { min-width: 0; min-height: 220px; padding: 14px; background: #151d19; border: 1px solid #233028; border-radius: 16px; }
.column-title { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 550; margin: 2px 2px 16px; }
.column-title span { font-variant-numeric: tabular-nums; font-weight: 400; }
.task { display: block; width: 100%; text-align: left; margin: 0 0 10px; padding: 16px; color: var(--text); background: #202a24; border: 1px solid #303e34; border-radius: 10px; }
.task:last-child { margin-bottom: 0; }
.task:hover { border-color: #799987; }
.task-title { font-size: 14px; line-height: 1.55; margin-bottom: 16px; overflow-wrap: anywhere; }
.task-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.status-done { color: var(--accent); }
.status-blocked { color: #e9c194; }
.empty { color: var(--muted); font-size: 13px; margin: 12px 2px; }

.notifications { position: fixed; z-index: 20; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(520px, calc(100% - 40px)); display: grid; gap: 8px; }
.notice { padding: 14px 18px; border: 1px solid #52715c; border-radius: 12px; background: #24382b; color: var(--text); box-shadow: 0 8px 28px #0003; font-size: 13px; overflow-wrap: anywhere; }
.error { color: var(--bad); }
.notice.error { background: #342322; border-color: #72504b; }
dialog { width: min(580px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 24px; border: 1px solid #394b3f; border-radius: 18px; background: var(--panel); color: var(--text); box-shadow: 0 28px 100px #0006; }
dialog::backdrop { background: #080e0bcc; backdrop-filter: blur(5px); }
dialog p { font-size: 14px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 14px 0; }
label { display: block; }
form > label, .form-row label, #phone-dialog > label { margin: 18px 0 7px; font-size: 12px; color: var(--muted); }
input:not([type="checkbox"]), textarea, select { width: 100%; min-width: 0; padding: 11px; border: 1px solid #3c4c41; border-radius: 9px; background: #111a15; color: var(--text); font-size: 14px; }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
form > .primary { width: 100%; margin-top: 12px; }
#form-error { font-size: 13px; }
#detail-content { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; margin-top: 18px; }
.detail-label { color: var(--accent); font-size: 12px; margin-top: 22px; }
.toggle-label { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 18px 0; }
.toggle-label input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.settings-actions { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
@media (max-width: 720px) {
  .navigation { top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
  .kanban-page { padding: 96px 20px 32px; }
  .board { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
  .column { min-height: 100px; }
  .board-heading { gap: 8px; }
  h1 { font-size: 25px; }
  .board-actions { gap: 4px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  dialog { padding: 20px; }
  input:not([type="checkbox"]), textarea, select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
