:root{color-scheme:light;--ink:#14283b;--muted:#4a6174;--line:#d4e0e8;--teal:#00695f;--paper:#fff;--wash:#f1f6f9;font:16px/1.5 system-ui,sans-serif;color:var(--ink);background:var(--wash)}*{box-sizing:border-box}body{margin:0}.top{padding:16px max(24px,calc((100vw - 1320px)/2));background:var(--paper);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.brand{font-weight:750;display:flex;gap:10px;align-items:center}.brand span{background:var(--teal);color:white;padding:4px 10px;border-radius:9px}.top-actions,.note-buttons{display:flex;flex-wrap:wrap;gap:9px}.wrap{max-width:1368px;margin:auto;padding:28px 24px 48px}.intro,.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.intro{margin-bottom:22px}h1,h2,h3,p{margin:0}h1{font-size:clamp(1.6rem,3vw,2.3rem);letter-spacing:-.035em}h2{font-size:1.2rem}h3{font-size:1rem;margin-top:16px}.intro p,.hint,#count{color:var(--muted)}.badge{border:1px solid #b7dcd3;border-radius:99px;padding:5px 12px;color:#00564e;background:#e6f5f0;font-size:.875rem;font-weight:700}main{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:20px;align-items:start}.card{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:20px;box-shadow:0 2px 5px #17334a08}#encounter{display:grid;gap:16px}.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.wide{grid-column:1/-1}label{display:block;font-size:.875rem;font-weight:650}input,textarea,select{display:block;width:100%;border:1px solid #acbdca;border-radius:8px;background:white;color:var(--ink);font:inherit;font-weight:400;padding:8px 10px;margin-top:4px;min-height:42px}textarea{resize:vertical}button{font:inherit;font-size:.875rem;font-weight:700;border:1px solid #b7c9d4;background:white;color:var(--ink);border-radius:8px;padding:8px 12px;min-height:40px;cursor:pointer}button:hover{background:#ebf3f8}.primary{background:var(--teal);color:white;border-color:var(--teal)}.primary:hover{background:#00564e}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #128cb1;outline-offset:2px}.preview{position:sticky;top:16px}.preview label{margin-top:14px}#note{min-height:clamp(270px,51vh,590px);background:#f8fbfd;font-size:.95rem}.note-buttons{margin-top:12px}.hint,#status{font-size:.875rem;margin-top:8px}#status{color:#005e51;font-weight:650}#status:empty{display:none}.entry,.pending-row,.empty{border:1px solid var(--line);border-radius:9px;padding:12px;margin-top:10px}.entry time{color:#006459;font-weight:750;font-size:.875rem}.entry p{white-space:pre-wrap;overflow-wrap:anywhere}.entry .detail{font-size:.9rem;color:var(--muted)}.entry-actions{display:flex;gap:8px;margin-top:8px}.empty{color:var(--muted);background:#f8fbfd}#addPending{margin-top:10px}dialog{border:1px solid var(--line);border-radius:14px;padding:20px;color:var(--ink);width:min(650px,calc(100% - 24px));max-height:90vh}dialog::backdrop{background:#102b46a0}dialog label:has(select){margin-top:12px}small{display:block;color:var(--muted);font-weight:400}@media(max-width:820px){main{grid-template-columns:1fr}.preview{position:static}}@media(max-width:460px){.fields{grid-template-columns:1fr}.wrap{padding-inline:12px}.card{padding:14px}}
#care>.section-head{position:sticky;top:0;z-index:1;background:var(--paper);padding-block:8px}
.entry h2{font-size:1rem}
[hidden]{display:none!important}.shell{width:min(100%,1368px);margin-inline:auto;padding-inline:24px}.top{display:block;padding:14px 0}.bar,.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.bar{justify-content:space-between}.workflow{display:grid;gap:16px;min-width:0}.pin{position:sticky;top:0;z-index:2;background:var(--paper);padding-block:8px}.guide{margin-bottom:16px}.guide ol{margin-bottom:0;padding-left:1.4rem}.guide li+li{margin-top:5px}.guide kbd{border:1px solid var(--line);border-radius:4px;padding:1px 4px;background:var(--wash)}.choices{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}.chip{font-weight:650;min-height:38px;text-align:left}.chip[aria-pressed=true]{border-color:#00695f;background:#e6f5f0;color:#004e45}.field{position:relative;min-width:0}.sentence{margin-top:14px;border-left:3px solid #179b88;padding:9px 12px;background:#edf8f5;color:#184d49;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.9rem}.optional{margin-top:14px}.optional summary{cursor:pointer;font-weight:650;color:var(--teal);width:max-content}.optional button,.pending-row button,#addPending{margin-top:8px}.pending{margin-top:14px}.suggestions{position:absolute;z-index:5;top:100%;left:0;right:0;background:#fff;border:1px solid #a6bfc8;border-radius:8px;box-shadow:0 5px 15px #17334a28;max-height:14rem;overflow:auto}.suggestion{padding:8px 10px;cursor:pointer;font-size:.875rem}.suggestion[aria-selected=true],.suggestion:hover{background:#e4f4f0;color:#004b43}.error{color:#a32727;display:block;font-size:.82rem}.error:empty{display:none}[aria-invalid=true]{border-color:#ae2c2c}.notice{background:#fff5d9;color:#654900;border:1px solid #e8d5a3;border-radius:8px;padding:8px 10px;margin-top:10px;font-size:.875rem}.note-actions,.entry .actions{margin-top:10px}.entry h3{margin:2px 0}.card{min-width:0}.preview h2{margin-right:8px}@media(max-width:460px){.shell{padding-inline:12px}}

.header-right { display:flex; align-items:center; justify-content:flex-end; gap:12px; margin-inline-start:auto; }
.brand img { display:block; object-fit:contain; flex:none; animation:heartbeat 1.65s infinite; }
.watch { min-width:9.5rem; padding:5px 10px; border:1px solid #355765; border-radius:10px; background:#142d39; color:#d5ffeb; text-align:center; font-family:ui-monospace,monospace; }
.watch time { display:block; font-size:1.24rem; font-weight:750; line-height:1.2; letter-spacing:.08em; font-variant-numeric:tabular-nums; }
.watch span { display:block; font-size:.73rem; line-height:1.5; }
.workspace-actions { margin:-6px 0 16px; }
#sampleName { color:var(--muted); font-size:.9rem; font-weight:650; }
.footer { display:grid; justify-items:center; gap:.65rem; padding:20px 16px 26px; background:var(--paper); border-top:1px solid var(--line); text-align:center; }
.feature { display:inline-flex; padding:8px 14px; border:1px solid var(--line); border-radius:8px; color:var(--ink); text-decoration:none; font-size:.9rem; font-weight:700; }
.feature:hover { border-color:var(--teal); }
.feature:focus-visible { outline:3px solid #128cb1; outline-offset:2px; }
.credit { display:inline-block; color:var(--teal); animation:heartbeat 1.65s infinite; }
@keyframes heartbeat {
  0%, 26%, 42%, 100% { transform:scale(1); }
  15% { transform:scale(1.14); }
  34% { transform:scale(1.08); }
}
:root[data-theme="dark"] {
  color-scheme:dark; --ink:#e9f2f8; --muted:#b5c8d4;
  --line:#375063; --teal:#71e2ca; --paper:#1c2e3a; --wash:#13232d;
}
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select,
[data-theme="dark"] button, [data-theme="dark"] .suggestions, [data-theme="dark"] dialog {
  background:#172733; border-color:#4e697c; color:var(--ink);
}
[data-theme="dark"] button:hover { background:#2c4456; }
[data-theme="dark"] .primary { background:#71e2ca; color:#0b2f2b; border-color:#71e2ca; }
[data-theme="dark"] .primary:hover { background:#9cf2de; }
[data-theme="dark"] .badge, [data-theme="dark"] .chip[aria-pressed="true"],
[data-theme="dark"] .sentence, [data-theme="dark"] .suggestion:hover,
[data-theme="dark"] .suggestion[aria-selected="true"] {
  background:#173f3b; border-color:#4f9186; color:#bbf7e7;
}
[data-theme="dark"] #note, [data-theme="dark"] .empty { background:#172733; }
[data-theme="dark"] #status, [data-theme="dark"] .entry time { color:#8bead6; }
[data-theme="dark"] .notice { background:#42371d; border-color:#80683d; color:#ffdf96; }
[data-theme="dark"] .error { color:#ffacac; }
[data-theme="dark"] [aria-invalid="true"] { border-color:#ffacac; }
@media (max-width:530px) {
  .header-right { gap:8px; }
  .brand img { width:38px; height:38px; }
}
@media (prefers-reduced-motion:reduce) {
  .brand img, .credit { animation:none; }
}

/* Workstation controls and mobile layout */
.header-right { gap:8px; }
.watch { min-width:9.25rem; }
#clockFormat { white-space:nowrap; min-width:3.25rem; padding-inline:6px; }
.theme-control { position:relative; display:inline-flex; }
#themeToggle { width:38px; min-height:38px; padding:0; display:grid; place-items:center; }
#themeIcon { font-size:1.25rem; line-height:1; }
.tooltip { display:none; position:absolute; top:calc(100% + 6px); inset-inline-end:0; z-index:10; padding:4px 8px; border-radius:6px; color:var(--ink); background:var(--paper); border:1px solid var(--line); white-space:nowrap; font-size:.8rem; }
.theme-control:focus-within:has(:focus-visible) .tooltip { display:block; }
@media (hover:hover) { .theme-control:hover .tooltip { display:block; } }
.tools { margin-top:28px; scroll-margin-top:12px; }
.tool-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:10px; }
.tools h3 { margin:0; }
.timer { margin:12px 0; font:750 clamp(1.65rem,5vw,2.3rem)/1 ui-monospace,monospace; font-variant-numeric:tabular-nums; }
.timer-label { margin-top:12px; max-width:12rem; }
.tool-result { color:var(--teal); font-weight:750; margin-top:4px; }
button:disabled { opacity:.65; cursor:default; }
.ref-card { grid-column:1/-1; }
.references { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 24px; padding:0; list-style:none; margin:10px 0 0; }
.references li { padding:7px 0; border-bottom:1px solid var(--line); }
.references a { color:var(--teal); font-weight:700; text-underline-offset:3px; }
.references span { display:block; color:var(--muted); font-size:.875rem; }
.footer { display:block; padding:9px 0 max(9px,env(safe-area-inset-bottom)); text-align:initial; }
.footer-row { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.revision,.footer-credit { font-size:.79rem; }
.revision { line-height:1.6; }
.revision span { display:block; color:var(--muted); }
.footer-credit { text-align:right; }
.footer-credit .feature { padding:3px 9px; font-size:.79rem; margin-bottom:3px; }
.shell { padding-left:max(24px,env(safe-area-inset-left)); padding-right:max(24px,env(safe-area-inset-right)); }
.top { padding-top:max(14px,env(safe-area-inset-top)); }
@media (max-width:630px) {
  .tool-grid,.references { grid-template-columns:1fr; }
  .watch { min-width:0; }
  .watch time { font-size:1.03rem; }
  .header-right { flex-wrap:wrap; }
  .fields input,.fields select,.fields textarea,#note { font-size:1rem; }
}
@media (max-width:460px) {
  .shell { padding-left:max(12px,env(safe-area-inset-left)); padding-right:max(12px,env(safe-area-inset-right)); }
  .footer-row { align-items:flex-start; }
  .footer-credit { max-width:55%; }
  .header-right { justify-content:flex-end; }
}
