:root {
  --bg: #0e0f13; --panel: #171922; --panel2: #1f2230; --line: #2a2e3d;
  --fg: #e9ecf2; --muted: #9aa3b2; --accent: #ff5a3c; --accent2: #3ce0a0;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 560px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px 64px; }

.logo { font-weight: 800; letter-spacing: -.5px; font-size: 28px; margin: 0; }
.logo span { color: var(--accent); }
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; }

h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 28px 0 12px; }
h2 .date { float: right; text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; }

/* login */
.login { padding-top: 12vh; text-align: center; }
.login .tag { color: var(--muted); margin-top: -6px; margin-bottom: 28px; }
.login form { display: flex; flex-direction: column; gap: 14px; max-width: 340px; margin: 0 auto; }
.err { color: var(--accent); font-size: 14px; }

input[type=password], input[type=text] {
  width: 100%; padding: 15px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); color: var(--fg); font-size: 16px;
}
button, .filebtn {
  border: none; border-radius: var(--radius); padding: 16px; font-size: 16px; font-weight: 700;
  color: #0e0f13; background: var(--accent); cursor: pointer; width: 100%; display: block; text-align: center;
}
button:active, .filebtn:active { transform: scale(.99); }

/* plan */
.plan .focus { color: var(--accent2); font-weight: 600; margin: 0 0 14px; }
.plan .empty, .empty { color: var(--muted); background: var(--panel); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 18px; }
ol.items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
ol.items li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.chk { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.chk input { width: 22px; height: 22px; accent-color: var(--accent2); }
.chk input:checked + .name { color: var(--muted); text-decoration: line-through; }
.presc { color: var(--fg); margin: 6px 0 0 32px; }
.presc b { color: var(--accent); }
.cue { color: var(--muted); font-size: 13.5px; margin: 6px 0 0 32px; }

/* capture */
.capture { margin-top: 8px; }
.cap { margin-bottom: 12px; }
.cap.voice { background: var(--accent); font-size: 18px; padding: 20px; }
.cap.voice.rec { background: #c62828; color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .7; } }
.cap-form { display: flex; gap: 8px; margin-bottom: 12px; }
.cap-form input[type=text] { flex: 1; }
.cap.text { width: auto; padding: 15px 18px; background: var(--panel2); color: var(--fg); border: 1px solid var(--line); }
.filebtn { background: var(--panel2); color: var(--fg); border: 1px solid var(--line); font-weight: 600; position: relative; }
.filebtn.small { font-size: 14px; padding: 13px; }
.filebtn input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }

/* history tables */
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 8px 6px; }
table.grid td { padding: 8px 6px; border-bottom: 1px solid var(--panel2); }
ul.hist { list-style: none; padding: 0; margin: 0; }
ul.hist li { padding: 10px 0; border-bottom: 1px solid var(--panel2); }
ul.hist .sub, .sub { color: var(--muted); font-size: 13.5px; }
.focus { color: var(--accent2); }
