:root {
  font:
    16px/1.55 Inter,
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
  color: #132d48;
  background: #edf3f9;
  --paper: #fff;
  --line: #dce7f3;
  --blue: #1161bb;
  --muted: #496680;
}
* {
  box-sizing: border-box;
}
body,
p,
h1,
h2,
h3 {
  margin: 0;
}
h1 {
  font-size: clamp(1.55rem, 5vw, 2.15rem);
  letter-spacing: -0.035em;
  line-height: 1.24;
}
h2 {
  font-size: 1.35rem;
  line-height: 1.35;
}
h3 {
  font-size: 1.03rem;
}
[hidden] {
  display: none !important;
}
p {
  overflow-wrap: anywhere;
}
#app {
  margin: auto;
  max-width: 640px;
  min-height: 100dvh;
  background: linear-gradient(#edf5ff 66px, #f8fbff 370px, #fff 640px);
}
.top {
  position: sticky;
  z-index: 3;
  top: 0;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffffec;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(15px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logomark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #0d60b5;
  color: #fff;
  font-weight: 800;
}
button,
a.primary {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  border: 1px solid transparent;
  border-radius: 12px;
  min-height: 44px;
  padding: 8px 12px;
  color: #214f80;
  cursor: pointer;
  touch-action: manipulation;
}
.primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #1062bc;
  color: #fff !important;
  text-decoration: none;
}
.secondary {
  background: #edf5ff;
  border-color: #dceaf8;
}
.plain {
  background: transparent;
  padding-inline: 6px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #116ac9;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.56;
  cursor: default;
}
.nav {
  position: fixed;
  z-index: 3;
  inset: auto 0 0;
  max-width: 640px;
  margin: auto;
  display: flex;
  justify-content: space-around;
  gap: 5px;
  padding: 6px 12px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #ffffffef;
  backdrop-filter: blur(12px);
}
.nav-btn {
  flex: 1;
  font-size: 0.8rem;
  color: #526c85;
}
.nav-btn[aria-current] {
  color: #0757a9;
  background: #eaf4ff;
}
.content {
  display: grid;
  gap: 12px;
  padding: 24px 17px 83px;
}
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 8px;
}
.section-head p {
  margin-top: 5px;
}
.panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 22px #23486d0b;
  min-width: 0;
}
.panel:empty {
  display: none;
}
.panel > button {
  justify-self: start;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.row > input {
  flex: 1;
  min-width: 130px;
}
.login {
  max-width: 440px;
  margin: auto;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: clamp(24px, 8vh, 65px) 21px 30px;
  gap: 15px;
}
.login-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 18px;
}
.roles,
.choices {
  display: grid;
  gap: 8px;
}
.roles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.muted {
  color: var(--muted);
  font-size: 0.88rem;
}
.eyebrow,
.progress-label {
  color: #145d9f;
  font-size: 0.78rem;
  font-weight: 700;
}
.progress-head {
  display: flex;
  justify-content: space-between;
}
progress {
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  accent-color: #1266c4;
}
progress::-webkit-progress-bar {
  background: #dceaff;
}
progress::-webkit-progress-value {
  background: #1266c4;
}
.choice,
.patient-row {
  display: block;
  text-align: left;
  background: #f8fbff;
  color: #183e64;
  border: 1px solid #dce9f6;
  line-height: 1.4;
}
.choice[aria-pressed="true"] {
  border-color: #1266c4;
  background: #eaf4ff;
}
.art-choices {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.art-choices button {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 7px 10px 10px;
  min-height: 112px;
  font-size: 0.82rem;
}
.art-choices button::before {
  content: "";
  width: 70px;
  height: 70px;
  justify-self: center;
  border-radius: 8px;
  background: url(/symptom-studio.webp) 0 0/200% 200%;
}
.art-choices button:nth-child(2)::before {
  background-position: 100% 0;
}
.art-choices button:nth-child(3)::before {
  background-position: 0 100%;
}
.art-choices button:nth-child(4)::before {
  background-position: 100% 100%;
}
.field {
  display: grid;
  gap: 4px;
  margin: 5px 0;
  color: #355878;
  font-weight: 600;
  font-size: 0.84rem;
}
.field:has(input[type="checkbox"]) {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.checklist .field {
  padding: 4px 0;
}
input,
textarea,
select {
  min-height: 43px;
  width: 100%;
  border: 1px solid #dbe7f4;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  color: inherit;
  background: #f9fbfe;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: #1266c4;
}
.row input {
  width: auto;
}
textarea {
  resize: vertical;
}
.safety {
  border-color: #f3cfc0;
  background: #fff6f0;
  color: #82341c;
}
.safety .muted {
  color: #743a28;
}
.safety > a {
  justify-self: start;
}
.service {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid #e5edf6;
  padding-bottom: 10px;
}
.service:last-child {
  border: 0;
  padding: 0;
}
.service button {
  justify-self: start;
}
.record,
.exercise {
  padding-block: 8px;
  border-top: 1px solid #e4edf7;
}
.exercise summary,
.record summary,
summary {
  cursor: pointer;
  color: #174976;
  font-size: 0.92rem;
}
.thread {
  display: grid;
  gap: 8px;
  max-height: 45vh;
  overflow: auto;
}
.bubble {
  justify-self: start;
  background: #f0f5fb;
  border-radius: 13px;
  padding: 8px 12px;
  max-width: 88%;
}
.bubble.own {
  justify-self: end;
  background: #e7f2ff;
}
.bubble .muted {
  font-size: 0.69rem;
}
.message-text {
  white-space: pre-wrap;
  font-size: 0.9rem;
}
.patient-row {
  justify-self: stretch !important;
  width: 100%;
}
#notice:not(:empty) {
  position: fixed;
  z-index: 4;
  bottom: 68px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 28px);
  background: #0e416e;
  color: #fff;
  padding: 8px 13px;
  border-radius: 12px;
  font-size: 0.85rem;
}
#notice[data-kind="error"] {
  background: #8a3334;
}
dialog {
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
  border-radius: 16px;
}
dialog::backdrop {
  background: #163b6a60;
}
.demo-canvas,
.plan-demo canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
dialog.angle-dialog {
  width: min(calc(100% - 22px), 430px);
  max-height: 96dvh;
  padding: 0;
  border: 0;
  border-radius: 23px;
  color: #142e49;
  box-shadow: 0 20px 65px #07274d38;
}
dialog.angle-dialog::backdrop {
  background: #0b224f72;
}
.angle-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 16px 8px;
  background: #fff;
  border-bottom: 1px solid #e6edf5;
}
.angle-dialog h2 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.35;
}
.angle-dialog h2:focus {
  outline: none;
}
.angle-welcome,
.angle-editor {
  padding: 14px 16px 16px;
}
.angle-intro {
  color: #435d75;
  font-size: 0.91rem;
  margin: 0 0 12px;
}
.angle-note {
  color: #496480;
  font-size: 0.78rem;
  margin: -6px 0 10px;
}
.angle-sample,
.angle-guide {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.angle-sample {
  border-radius: 14px;
  background: #edf4fb;
}
.angle-sample img,
.angle-guide img {
  display: block;
  width: 100%;
  height: auto;
}
.angle-sample figcaption {
  position: absolute;
  bottom: 9px;
  left: 9px;
  padding: 3px 8px;
  border-radius: 6px;
  color: #fff;
  background: #132e4bd9;
  font-size: 0.7rem;
  font-weight: 650;
}
.angle-dot {
  display: grid;
  place-items: center;
  position: absolute;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  background: #0a64c5;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 7px #152d5e50;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1;
}
.angle-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 10px 0 14px;
}
.angle-editor .angle-steps {
  margin: 0 0 10px;
}
.angle-steps li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 2px;
  border-radius: 7px;
  background: #f2f6fa;
  color: #496480;
  font-size: 0.78rem;
  font-weight: 620;
}
.angle-steps li > span:first-child {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #e0ebf7;
  color: #265a92;
  font-size: 0.68rem;
}
.angle-steps li[aria-current="step"] {
  background: #e6f1ff;
  color: #064a93;
}
.angle-steps li[aria-current="step"] > span:first-child {
  background: #0862c4;
  color: #fff;
}
.angle-steps li.is-marked {
  background: #ecf5ff;
  color: #225f9c;
}
.angle-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.angle-dialog button {
  min-height: 45px;
  margin: 0;
  padding: 7px 8px;
  border-radius: 11px;
  font-size: 0.84rem;
  font-weight: 640;
}
.angle-dialog .angle-link {
  color: #175b9f;
  border-color: transparent;
  background: transparent;
}
.angle-dialog .angle-link:disabled {
  color: #718296;
}
.angle-header .angle-link {
  width: auto;
  min-width: 46px;
}
.angle-error {
  color: #912d31;
  font-size: 0.8rem;
  margin-top: 8px;
}
.angle-error:empty {
  display: none;
}
.angle-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 72px;
  margin: 0 0 9px;
  padding: 7px 9px 7px 11px;
  border: 1px solid #deebf9;
  border-radius: 12px;
  background: #f0f7ff;
}
.angle-status {
  display: grid;
  gap: 1px;
  color: #164573;
  font-size: 0.86rem;
  line-height: 1.36;
}
.angle-status span {
  color: #48647f;
  font-size: 0.74rem;
}
.angle-prompt.is-measured strong {
  color: #0855a4;
  font-size: 1.4rem;
  line-height: 1.16;
}
.angle-guide {
  flex: none;
  width: 73px;
  border-radius: 6px;
}
.angle-guide .angle-dot {
  width: 15px;
  height: 15px;
  border-width: 1px;
  font-size: 0.52rem;
}
.angle-photo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 50dvh;
  margin-inline: auto;
  border-radius: 11px;
  touch-action: none;
  cursor: crosshair;
}
.angle-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  margin: 3px 0;
}
.angle-dialog .angle-controls button {
  padding-inline: 2px;
  font-size: 0.76rem;
}
.angle-dialog .angle-done {
  margin-top: 3px;
}
.home-hero {
  display: grid;
  gap: 14px;
  padding: 6px 3px 14px;
}
.home-hero h1 {
  font-size: 1.9rem;
  max-width: 310px;
  line-height: 1.26;
}
.home-photo {
  width: 100%;
  aspect-ratio: 1.65;
  object-fit: cover;
  border-radius: 21px;
}
.panel video {
  display: block;
  width: 100%;
  max-height: 52vh;
  aspect-ratio: 1.956;
  background: #eaf3fa;
  border-radius: 14px;
}
.row select {
  flex: 1;
  min-width: 100px;
}
output {
  overflow-wrap: anywhere;
}
