/* NEO Office on the phone: dark, large, plain type, no italics, big targets. */
:root {
  --bg: #16141c; --pane: #201d28; --line: #34303f; --text: #f1eef6; --dim: #c9c4d6;
  --accent: #b39ae8; --green: #74c68f; --red: #ec8f81; --amber: #e3b26a;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f4f2f7; --pane: #ffffff; --line: #d9d4e2; --text: #19161f; --dim: #4a4456; --accent: #5e3fa6; --green: #2f7a47; --red: #a8402f; --amber: #8a5a10; color-scheme: light; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  -webkit-text-size-adjust: 100%;
  padding: env(safe-area-inset-top) 0 calc(76px + env(safe-area-inset-bottom));
}
em, i { font-style: normal; font-weight: 600; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.top h1 { font-size: 26px; margin: 0; font-weight: 700; }
.quiet { background: none; border: none; color: var(--dim); font-size: 16px; padding: 8px 4px; }
.status { margin: 0 16px 8px; padding: 10px 12px; border-radius: 10px; background: var(--pane); border: 1px solid var(--line); font-size: 16px; }
.status.wait { border-color: var(--amber); }
.status.err { border-color: var(--red); }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--pane); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabs button { background: none; border: none; color: var(--dim); font-size: 16px; padding: 14px 4px 16px; font-weight: 600; }
.tabs button.on { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: #15121c; font-size: 14px; }

.pad { padding: 16px; }
.dim { color: var(--dim); font-weight: 400; }
.big-dim { font-size: 19px; color: var(--dim); text-align: center; margin-top: 40px; }
.sub { font-size: 17px; color: var(--green); margin: 22px 16px 8px; }
.sub.late { color: var(--red); }

.row { display: flex; width: calc(100% - 24px); margin: 8px 12px; align-items: center; gap: 10px; text-align: left; background: var(--pane); border: 1px solid var(--line); border-radius: 12px; padding: 14px; min-height: 56px; }
.row.soft { opacity: 0.8; }
.row-title { flex: 1; min-width: 0; font-size: 17px; }
.row-meta { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; font-size: 15px; color: var(--dim); }
.due { font-size: 15px; color: var(--dim); }
.due.soon { color: var(--amber); font-weight: 600; }
.due.over { color: var(--red); font-weight: 600; }
.wait { font-size: 14px; color: var(--amber); border: 1px solid var(--amber); border-radius: 10px; padding: 0 7px; }
.wait-note { color: var(--amber); font-size: 15px; }

.card { background: var(--pane); border: 1px solid var(--line); border-radius: 14px; margin: 8px 12px 20px; padding: 16px; }
.card h2 { font-size: 22px; line-height: 1.3; margin: 6px 0 4px; }
.meta { color: var(--dim); font-size: 15px; margin: 0 0 12px; }
.md { font-size: 17px; overflow-wrap: anywhere; }
.md h2, .md h3, .md h4 { font-size: 18px; margin: 18px 0 6px; color: var(--green); }
.md blockquote { margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 0 8px 8px 0; position: relative; }
.md code { font: 15px/1.4 ui-monospace, Menlo, monospace; }
.md .tags { background: color-mix(in srgb, var(--green) 10%, transparent); padding: 10px 12px; border-radius: 8px; position: relative; }
.md a { color: var(--accent); }
.md .table { overflow-x: auto; }
.md table { border-collapse: collapse; font-size: 15px; }
.md td, .md th { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.copy { display: block; margin: 8px 0 0 auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; font-size: 15px; }
details { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
summary { font-size: 17px; font-weight: 600; padding: 4px 0; }

.lab { display: block; font-size: 15px; color: var(--dim); margin: 14px 0 6px; }
.lab input, .lab select, .lab textarea, textarea { display: block; width: 100%; margin-top: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 17px; color: var(--text); }
textarea { resize: vertical; }
.btns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0 8px; }
.st { background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 14px 8px; font-size: 17px; font-weight: 600; }
.st.on { border-color: var(--accent); color: var(--accent); }
.st-done { border-color: color-mix(in srgb, var(--green) 60%, var(--line)); }
.st-approved { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.st-skip { color: var(--red); }
.big { display: block; width: 100%; padding: 14px; border-radius: 10px; background: var(--bg); border: 1.5px solid var(--line); font-size: 17px; font-weight: 600; margin: 8px 0; }
.big.primary { background: var(--accent); color: #15121c; border-color: var(--accent); }
.pick { text-align: left; }

.post { margin: 8px 12px; background: var(--pane); border: 1px solid var(--line); border-radius: 12px; }
.post.open { border-color: var(--accent); }
.post.done { opacity: 0.75; }
.post-line { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; text-align: left; padding: 14px; min-height: 56px; }
.time { width: 68px; flex: 0 0 auto; color: var(--dim); font-size: 15px; }
.chip { --tint: var(--accent); flex: 0 0 auto; font-size: 14px; font-weight: 600; padding: 2px 9px; border-radius: 10px; color: var(--tint); background: color-mix(in srgb, var(--tint) 16%, transparent); }
.ok { color: var(--green); font-size: 14px; font-weight: 600; }
.post-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.plat h4 { margin: 14px 0 4px; font-size: 16px; color: var(--accent); }

body.locked textarea, body.locked input, body.locked select { opacity: 0.55; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); background: var(--text); color: var(--bg); padding: 12px 14px; border-radius: 12px; font-size: 16px; opacity: 0; transform: translateY(8px); transition: 0.2s; pointer-events: none; z-index: 20; }
.toast.show { opacity: 1; transform: none; }
.md .trow { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: var(--bg); }
.md .tcell { padding: 2px 0; }
.md .tlab { color: var(--dim); font-size: 15px; font-weight: 600; }
