:root {
    color-scheme: dark;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: #20251f;
    color: #f0eee4;
    --panel: #272e25;
    --border: #455044;
    --muted: #b4bead;
    --accent: #d1e5a7;
    --coral: #eea48c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
body, button, input, textarea, select { font-size: 1rem; }
button, input, textarea, select { font-family: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a.outline { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, a.outline {
    padding: .58rem .85rem; min-height: 42px; border-radius: .55rem; border: 1px solid transparent;
    text-decoration: none; font-weight: 600; color: inherit; background: transparent; line-height: 1.3;
}
button:hover:not(:disabled), a.outline:hover { filter: brightness(1.12); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.outline { border-color: var(--border) !important; background: #2e382c !important; }
.quiet { color: var(--muted); }
.primary { color: #222c1b; background: var(--accent); }
.topbar {
    min-height: 70px; padding: .7rem clamp(1rem, 3vw, 2.5rem); display: flex; align-items: center;
    justify-content: space-between; gap: .6rem; border-bottom: 1px solid var(--border); background: #242b22;
}
.brand, .account, .actions, .section-row, .record-group { display: flex; align-items: center; gap: .65rem; }
.brand { font-size: 1.4rem; font-weight: 750; letter-spacing: -.045em; }
.brand-mark { display: flex; align-items: center; gap: 3px; padding: 8px; border-radius: 9px; background: var(--accent); }
.brand-mark i { width: 2px; height: 8px; border-radius: 2px; background: #34432b; }
.brand-mark i:nth-child(2n) { height: 13px; }
.brand-mark i:nth-child(3) { height: 20px; }
.account { color: var(--muted); max-width: 55%; }
#username { overflow: hidden; text-overflow: ellipsis; }
.layout { display: grid; grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr); min-height: calc(100vh - 70px); }
.sidebar { border-right: 1px solid var(--border); padding: 1.6rem 1.15rem; background: #252c23; }
.sidebar h2 { font-size: 1rem; }
.section-row { justify-content: space-between; flex-wrap: wrap; }
.projects { display: grid; gap: .3rem; margin-top: .75rem; }
.project-option { display: flex; justify-content: space-between; align-items: center; text-align: left; gap: .65rem; overflow-wrap: anywhere; }
.project-option[aria-current="true"] { border-color: var(--border); background: #364332; color: var(--accent); }
.count { color: var(--muted); font-size: .85rem; }
details { margin-top: 1.1rem; }
summary { color: var(--muted); cursor: pointer; }
.workspace-content { width: min(100%, 70rem); padding: clamp(1rem, 3vw, 2.5rem); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.055em; overflow-wrap: anywhere; line-height: 1.05; }
h2 { font-size: 1.2rem; }
.project-title { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .9rem; margin-bottom: 1.6rem; }
.project-title h1 { margin-bottom: .45rem; }
.muted, .meta { color: var(--muted); }
.capture {
    background: var(--panel); border: 1px solid var(--border); border-radius: .9rem; padding: 1rem;
    display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
}
.record-group { gap: 1rem; }
.record-group time { font: 600 1.05rem ui-monospace, Consolas, monospace; color: var(--muted); }
.record-button { display: flex; align-items: center; gap: .55rem; background: var(--coral); color: #311d17; }
.record-dot { width: .72rem; height: .72rem; border-radius: 50%; background: currentColor; }
.record-button.is-recording .record-dot { border-radius: 2px; }
.section { margin-top: 2rem; }
.items { margin-top: .75rem; display: grid; gap: .65rem; }
.item { border: 1px solid var(--border); border-radius: .75rem; padding: .9rem 1rem; background: var(--panel); display: grid; gap: .65rem; }
.item-title { font-weight: 700; overflow-wrap: anywhere; }
.meta { font-size: .88rem; margin-top: .25rem; }
.note { white-space: pre-wrap; overflow-wrap: anywhere; }
.item audio { display: block; width: min(100%, 26rem); height: 40px; }
.actions { flex-wrap: wrap; }
.filter { display: flex; align-items: center; gap: .5rem; cursor: pointer; color: var(--muted); }
input[type="checkbox"] { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
.notice { border: 1px solid var(--border); padding: .75rem; border-radius: .6rem; margin-bottom: 1rem; }
.error, .danger { color: #ffc0ab; }
.notice.error { border-color: #a45d4f; }
.welcome, .stack { display: grid; gap: 1rem; }
.welcome { align-content: start; justify-items: start; padding: 1.25rem 0; }
.welcome p { color: var(--muted); }
.signin { display: grid; place-items: center; min-height: calc(82vh - 70px); padding: 1rem; }
.login-panel, dialog { width: min(100%, 27rem); border: 1px solid var(--border); border-radius: 1rem; background: var(--panel); padding: 1.55rem; }
.stack label:not(.filter) { display: grid; gap: .4rem; }
input:not([type="checkbox"]), textarea, select {
    width: 100%; background: #20251f; color: inherit; border: 1px solid var(--border); border-radius: .5rem; padding: .6rem;
}
dialog { max-width: calc(100% - 2rem); }
dialog::backdrop { background: #11140fd0; }
.dialog-actions { justify-content: end; }
.startup { padding: 1rem; text-align: center; color: var(--muted); }
@media (max-width: 650px) {
    .layout { display: block; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--border); padding: .8rem 1rem; }
    .projects { display: flex; flex-wrap: wrap; }
    .topbar { min-height: 60px; }
    .section { margin-top: 1.4rem; }
}
