:root {
  --navy: #022c44; --navy-2: #0a3a57; --teal: #2dd4bf; --teal-d: #0f766e; --ink: #0f172a; --muted: #64748b;
  --line: #e2e8f0; --bg: #f4f7fa; --card: #fff; --red: #b91c1c; --amber: #b45309; --ok: #047857;
  --radius: 14px; --shadow: 0 1px 2px rgba(2,44,68,.06), 0 6px 20px rgba(2,44,68,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--teal-d); }
img { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
header.top { background: var(--navy); color: #e6fffb; }
header.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
header.top .brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; }
header.top .brand img { width: 32px; height: 32px; border-radius: 8px; }
header.top nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
header.top nav a, header.top nav button { color: #cfe9e6; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 15px; background: none; border: 0; cursor: pointer; font: inherit; }
header.top nav a.on, header.top nav a:hover, header.top nav button:hover { background: var(--navy-2); color: #fff; }
main.wrap, main { padding-top: 24px; padding-bottom: 64px; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; color: var(--navy); }
h2 { font-size: 20px; margin: 0 0 8px; color: var(--navy); }
h3 { font-size: 16px; margin: 16px 0 6px; color: var(--navy); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.narrow { max-width: 440px; margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
input[type=checkbox], input[type=radio] { width: auto; margin-right: 8px; transform: scale(1.15); }
.check { display: flex; align-items: flex-start; gap: 4px; font-weight: 400; }
button, .btn { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 11px 18px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
.btn-primary { background: var(--teal-d); color: #fff; }
.btn-primary:hover { background: #0b5f59; }
.btn-light { background: #e8f0f5; color: var(--navy); }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: none; color: var(--teal-d); padding: 6px 8px; min-height: 0; }
button:disabled { opacity: .55; cursor: default; }
.full { width: 100%; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } h1 { font-size: 24px; } }
.msg { margin-top: 10px; font-size: 14px; min-height: 1em; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--ok); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #e8f0f5; color: var(--navy); }
.pill.ok { background: #d1fae5; color: var(--ok); }
.pill.warn { background: #fef3c7; color: var(--amber); }
.pill.err { background: #fee2e2; color: var(--red); }
.notice { background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.notice.warn { background: #fffbeb; border-color: #fde68a; }
.notice.err { background: #fef2f2; border-color: #fecaca; }
.hidden { display: none !important; }

/* recorder */
.rec-big { text-align: center; padding: 28px 16px; }
.rec-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--red); margin-right: 8px; animation: pulse 1.2s infinite; vertical-align: middle; }
.rec-dot.paused { background: var(--amber); animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
.timer { font-size: 44px; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy); letter-spacing: 1px; }
.meter { height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; max-width: 320px; margin: 12px auto; }
.meter > div { height: 100%; width: 0; background: var(--teal); transition: width .1s; }
.seg { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 10px; overflow: hidden; }
.seg button { border-radius: 0; background: #fff; color: var(--navy); font-weight: 600; min-height: 40px; }
.seg button.on { background: var(--navy); color: #fff; }

/* notes */
.vlist { list-style: none; padding: 0; margin: 0; }
.vlist li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.vlist li:hover { background: #f8fafc; }
.vlist .lbl { font-weight: 600; }
.field { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.field .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.field .head strong { color: var(--navy); font-size: 14px; text-transform: uppercase; letter-spacing: .03em; }
.field .body { white-space: pre-wrap; font-size: 15px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.scroll { overflow-x: auto; }
.timecard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
@media (max-width: 760px) { .timecard { grid-template-columns: 1fr 1fr; } }
.timecard .num { font-size: 22px; font-weight: 700; color: var(--navy); }

/* landing */
.hero { background: linear-gradient(160deg, var(--navy) 0%, #064e57 100%); color: #e6fffb; padding: 56px 0 64px; }
.hero h1 { color: #fff; font-size: 40px; max-width: 720px; }
.hero p.lead { font-size: 19px; max-width: 640px; color: #cfe9e6; }
@media (max-width: 760px) { .hero h1 { font-size: 30px; } .hero { padding: 36px 0 44px; } }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: -32px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.price { font-size: 40px; font-weight: 800; color: var(--navy); }
footer { color: var(--muted); font-size: 13px; padding: 24px 0 40px; }
#sq-card { min-height: 90px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 50; box-shadow: var(--shadow); }
