@font-face { font-family: Lexend; src: url(fonts/Lexend.woff2) format('woff2'); font-weight: 100 900; }
@font-face { font-family: NotoTelugu; src: url(fonts/NotoSansTelugu.ttf); font-weight: 100 900; }
@font-face { font-family: NotoDeva; src: url(fonts/NotoSansDevanagari.ttf); font-weight: 100 900; }

/* AutoPilot iOS palette (Theme.swift) */
:root {
  color-scheme: light;
  --bg: #F7F5F0; --paper: #FCFBF8; --card: #EFECE6; --card2: #E6E3DC; --line: #E3E0D9;
  --field: #FFFFFF; --field-line: #D9D6CF; --text: #1B1A1E; --muted: #6E6C72; --faint: #A6A4AA;
  --accent: #14805A; --accent-soft: #E3F0E8; --amber: #B7771F; --red: #B9483A; --on-ink: #fff;
  --sans: Lexend, NotoTelugu, NotoDeva, system-ui, sans-serif;
  --serif: Lexend, NotoTelugu, NotoDeva, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

#app { display: flex; height: 100vh; }
.side { width: 260px; flex: none; display: flex; flex-direction: column; gap: 6px; padding: 44px 14px 14px; -webkit-app-region: drag; overflow-y: auto; }
.side > * { -webkit-app-region: no-drag; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 20px; padding: 0 8px 10px; -webkit-app-region: drag; }
.brand.big { font-size: 26px; justify-content: center; }
.mark { width: 26px; height: 26px; --ap-green: var(--accent); --ap-now: var(--text); --ap-ash: var(--faint); }
.brand.big .mark { width: 34px; height: 34px; }
.grow { flex: 1; }

.btn { border: 1px solid var(--field-line); background: var(--field); border-radius: 12px; padding: 8px 14px; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.btn:hover { background: var(--card); }
.btn.primary { background: var(--text); color: var(--on-ink); border-color: var(--text); font-weight: 600; }
.btn.primary:hover { opacity: .9; }
.btn.small { padding: 4px 10px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; padding: 10px 14px; }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .5; cursor: default; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); display: inline-block; }
.icon-btn { border: 0; background: none; color: var(--muted); font-size: 18px; width: 28px; height: 28px; border-radius: 8px; line-height: 1; }
.icon-btn:hover { background: var(--card); color: var(--text); }
.field { width: 100%; border: 1px solid var(--field-line); background: var(--field); border-radius: 12px; padding: 9px 12px; outline: none; }
.field:focus { border-color: var(--muted); }
.side .field { margin: 6px 0 4px; }

.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text); cursor: pointer; user-select: none; white-space: nowrap; }
.nav:hover { background: var(--card); }
.nav.active { background: var(--card2); font-weight: 600; }
.nav .count { margin-left: auto; color: var(--faint); font-size: 13px; font-weight: 400; }
.nav .name { overflow: hidden; text-overflow: ellipsis; }
.nav.drop { outline: 2px dashed var(--accent); }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sec { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 14px 10px 2px; }
.side .field.inline { margin: 2px 0; padding: 6px 10px; }

.rec-card { background: var(--card); border-radius: 14px; padding: 12px 14px; margin-bottom: 6px; }
.rec-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.rec-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; color: var(--accent); }
.rec-row .btn { margin-left: auto; }
.wave { display: inline-flex; gap: 2px; align-items: center; height: 18px; }
.wave i { width: 3px; height: 6px; background: var(--accent); border-radius: 2px; animation: wave 1s infinite ease-in-out; }
.wave i:nth-child(2) { animation-delay: .15s } .wave i:nth-child(3) { animation-delay: .3s } .wave i:nth-child(4) { animation-delay: .45s } .wave i:nth-child(5) { animation-delay: .6s }
@keyframes wave { 50% { height: 18px; } }

main { flex: 1; min-width: 0; margin: 10px 10px 10px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; display: flex; flex-direction: column; overflow: hidden; }
.top { display: flex; align-items: center; gap: 8px; padding: 16px 22px 0; -webkit-app-region: drag; min-height: 56px; }
.top > * { -webkit-app-region: no-drag; }
.top .grow { -webkit-app-region: drag; align-self: stretch; }
.scroll { flex: 1; overflow-y: auto; }
.page { max-width: 860px; margin: 0 auto; padding: 8px 32px 40px; }
h1.title { font: 500 38px/1.2 var(--serif); margin: 10px 0 12px; outline: none; letter-spacing: -.02em; }
h1.title:empty::before { content: 'New note'; color: var(--faint); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--field-line); background: transparent; border-radius: 9px; padding: 4px 10px; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.chip.dashed { border-style: dashed; }
button.chip:hover { background: var(--card); color: var(--text); }

.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin: 22px 0 18px; }
.tab { border: 0; background: none; padding: 8px 0 10px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--text); font-weight: 600; border-color: var(--text); }

.bar { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px; padding: 10px 14px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .06em; margin-bottom: 14px; }
.bar .grow { flex: 1; }
.summary { font-size: 16px; line-height: 1.75; }
.summary h3 { font-size: 16px; margin: 22px 0 6px; }
.summary ul { margin: 4px 0; padding-left: 22px; }
.summary p { margin: 0 0 10px; }
textarea.thoughts { width: 100%; min-height: 50vh; border: 0; background: transparent; outline: none; resize: none; font-size: 16px; line-height: 1.7; }
.empty { color: var(--muted); text-align: center; padding: 48px 0; }

.who { font-weight: 600; font-size: 15px; margin: 16px 0 6px; }
.bubble { background: var(--card); border-radius: 14px; padding: 10px 14px; display: inline-block; max-width: 100%; font-size: 16px; line-height: 1.6; white-space: pre-wrap; }
.bubble .live { color: var(--faint); }
.ts { color: var(--faint); font-size: 12px; font-weight: 400; margin-left: 8px; }

.dock { border-top: 1px solid var(--line); padding: 14px 22px; display: flex; gap: 10px; align-items: flex-start; background: var(--paper); }
.dock .wrap { max-width: 860px; margin: 0 auto; width: 100%; }
.dock form { display: flex; gap: 10px; }
.dock .field { border-radius: 999px; padding: 11px 18px; }
.rec-btn { border-radius: 999px; padding: 10px 18px; white-space: nowrap; }
.rec-btn .dot.green { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.answer { background: var(--card); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; max-height: 40vh; overflow-y: auto; position: relative; }
.answer .q { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.answer .icon-btn { position: absolute; top: 6px; right: 6px; }

h1.folder { font: 500 34px/1.2 var(--serif); letter-spacing: -.02em; margin: 6px 0 4px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.day { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 26px 0 6px; }
.row { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; cursor: pointer; }
.row:hover { background: var(--card); }
.row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { margin-left: auto; color: var(--faint); font-size: 13px; white-space: nowrap; display: flex; gap: 10px; align-items: center; }
.row .body { min-width: 0; }
.row.recording .t::after { content: ' · Recording'; color: var(--red); font-weight: 500; }

.popover { position: fixed; z-index: 10; width: 320px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.14); overflow: hidden; }
.popover .field { margin: 10px; width: calc(100% - 20px); }
.popover .list { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-height: 260px; overflow-y: auto; padding: 4px 0; }
.popover .item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; cursor: pointer; }
.popover .item:hover { background: var(--card); }
.popover .item .check { margin-left: auto; color: var(--accent); }
.popover .none { padding: 12px 16px; color: var(--muted); }
.popover .create { margin: 6px; padding: 9px 10px; border-radius: 10px; display: flex; gap: 8px; color: var(--muted); cursor: pointer; }
.popover .create:hover { background: var(--card); color: var(--text); }
.popover.menu { width: 200px; padding: 6px; }
.popover.menu .item { border-radius: 8px; padding: 8px 10px; }

.login { position: fixed; inset: 0; display: grid; place-items: center; -webkit-app-region: drag; }
.login-card { width: 440px; display: flex; flex-direction: column; gap: 12px; text-align: center; -webkit-app-region: no-drag; }
.login-card h1 { font: 500 30px/1.25 var(--serif); letter-spacing: -.02em; white-space: nowrap; margin: 8px 0 0; }
.error { color: var(--red); min-height: 1em; margin: 0; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #26252A; color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 20; }
.modal { max-width: 520px; }
.setting { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting input[type=checkbox] { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; }

.login-card .muted { white-space: nowrap; }
.web .side { padding-top: 16px; }
