@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/kanit/kanit-thai-400-normal.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/kanit/kanit-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/kanit/kanit-thai-500-normal.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/kanit/kanit-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/kanit/kanit-thai-600-normal.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/kanit/kanit-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/kanit/kanit-thai-700-normal.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/kanit/kanit-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/static/fonts/kanit/kanit-thai-800-normal.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/static/fonts/kanit/kanit-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/static/fonts/kanit/kanit-thai-900-normal.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: "Kanit";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/static/fonts/kanit/kanit-latin-900-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #27324a;
  --muted: #7f8aa9;
  --purple: #3f63c5;
  --sky: #75b9ed;
  --success: #35b779;
  --warning: #f0b429;
  --danger: #e94b5a;
  --purple-soft: #edf6ff;
  --surface: #ffffff;
  --app-background:
    radial-gradient(circle at 100% 0%, rgba(183, 231, 248, 0.45), transparent 16rem),
    linear-gradient(180deg, #edf7ff 0%, #edf7ff 100%);
}

[x-cloak] {
  display: none !important;
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--app-background);
  color: var(--ink);
  font-family: "Kanit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  margin: 0;
  min-height: 100vh;
}

.app-shell {
  background: var(--app-background);
  display: grid;
  min-height: 100vh;
  padding: 0;
  place-items: start center;
}

.phone-card {
  background: var(--app-background);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  width: min(100%, 430px);
}

.cover-panel {
  background:
    radial-gradient(circle at 74% 28%, rgba(255, 255, 255, 0.36), transparent 7rem),
    linear-gradient(135deg, #8ea9ee 0%, #75b9ed 64%, #b7e7f8 100%);
  min-height: 220px;
  padding: 1rem;
  position: relative;
}

.dashboard-icon-link {
  align-items: center;
  background: #3f63c5;
  border: 0.18rem solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 0.7rem 1.3rem rgba(39, 50, 74, 0.18);
  color: #ffffff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  min-height: 2.35rem;
  justify-content: center;
  line-height: 1.25;
  padding: 0.42rem 0.7rem;
  position: absolute;
  right: 1rem;
  text-align: center;
  text-decoration: none;
  top: 1rem;
  width: 7.8rem;
  z-index: 4;
}

.checkin-pill-group {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.checkin-pill {
  align-items: center;
  background: #3f63c595;
  border: 0;
  border-radius: 50px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.85rem;
  gap: 0.45rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 0.62rem 0.95rem;
}

.checkin-info-trigger {
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #eef7ff 100%);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 0.45rem 1rem rgba(63, 99, 197, 0.2);
  color: #3f63c5;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  gap: 0.28rem;
  height: 2.1rem;
  justify-content: center;
  line-height: 1.15;
  padding: 0 0.58rem 0 0.42rem;
  white-space: nowrap;
}

.checkin-info-trigger:hover,
.checkin-info-trigger:focus-visible {
  box-shadow: 0 0.65rem 1.2rem rgba(63, 99, 197, 0.28);
  transform: translateY(-1px);
}

.checkin-info-trigger svg {
  fill: none;
  height: 1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 1rem;
}

.checkin-info-dialog {
  background: transparent;
  border: 0;
  max-width: min(78vw, 20rem);
  padding: 0;
}

.checkin-info-dialog::backdrop {
  background: rgba(39, 50, 74, 0.48);
}

.checkin-info-image {
  background: #ffffff;
  border-radius: 1.25rem;
  box-shadow: 0 1.25rem 2.6rem rgba(39, 50, 74, 0.28);
  display: block;
  max-height: 68vh;
  max-width: 100%;
  object-fit: contain;
}

.checkin-info-close {
  position: absolute;
  right: 0.7rem;
  top: 0.7rem;
  z-index: 1;
}

.checkin-preview {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 1.25rem;
  bottom: calc(100% + 0.55rem);
  box-shadow: 0 1rem 2rem rgba(39, 50, 74, 0.22);
  display: flex;
  height: 5.4rem;
  justify-content: center;
  padding: 0.75rem;
  position: absolute;
  right: 0;
  width: 5.4rem;
}

.checkin-preview[hidden] {
  display: none;
}

.checkin-preview svg {
  fill: none;
  height: 100%;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  width: 100%;
}

.cover-copy {
  color: #ffffff;
  margin-top: 0.85rem;
  max-width: 19rem;
  padding-right: 1.1rem;
}

.cover-copy h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: normal;
  line-height: 1.28;
  margin: 0 0 0.65rem;
  text-wrap: balance;
}

.cover-copy p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.55;
  margin: 0;
}

.topber {
  display: block;
  margin-bottom: 2.15rem;
}

.profile-panel {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 1.4rem;
  box-shadow: 0 0.8rem 1.8rem rgba(74, 111, 179, 0.08);
  margin: 0 1rem;
  padding: 1.2rem 1.15rem 1rem;
  position: relative;
}

.topber-heart {
  align-items: center;
  background: linear-gradient(135deg, #ffffff, #edf6ff);
  border: 0.36rem solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0.9rem 1.8rem rgba(74, 111, 179, 0.14);
  color: var(--purple);
  display: inline-flex;
  font-size: 1.2rem;
  font-weight: 800;
  height: 5.6rem;
  justify-content: center;
  line-height: 1.35;
  bottom: -2.8rem;
  position: absolute;
  right: 1.75rem;
  top: auto;
  width: 5.6rem;
  z-index: 2;
}

.topber-heart svg {
  height: 3.25rem;
  width: 3.25rem;
}

.avatar-heart {
  fill: var(--purple);
}

.avatar-pulse {
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4.6;
}

.profile-panel p {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  margin: 0;
}

.history-summary-section,
.assessment-panel {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 1.4rem;
  box-shadow: 0 0.8rem 1.8rem rgba(74, 111, 179, 0.06);
  margin: 0 1rem 1rem;
  padding: 1rem;
}

.history-summary-section h2,
.assessment-panel h2 {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 1rem;
}

.start-panel {
  background: transparent;
  display: grid;
  gap: 0.75rem;
  margin: 0 1rem 1rem;
}

.start-panel form {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.start-action {
  align-items: center;
  appearance: none;
  background: linear-gradient(135deg, var(--purple) 0%, var(--sky) 100%);
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 0.9rem 1.7rem rgba(63, 99, 197, 0.2);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  gap: 0.55rem;
  justify-content: center;
  line-height: 1.35;
  min-height: 3.25rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  width: 100%;
}

.start-action-secondary {
  background: linear-gradient(135deg, #24b47e 0%, #67d6a3 100%);
  box-shadow: 0 0.9rem 1.7rem rgba(36, 180, 126, 0.2);
}

.start-action svg {
  display: block;
  fill: none;
  flex: 0 0 1.35rem;
  height: 1.35rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 1.35rem;
}

.assessment-page {
  padding-top: 0;
}

.assessment-page-header {
  background:
    radial-gradient(circle at 100% 0%, rgba(183, 231, 248, 0.5), transparent 9rem),
    rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 1.4rem;
  box-shadow: 0 0.8rem 1.8rem rgba(74, 111, 179, 0.06);
  margin: 0 1rem 1rem;
  padding: 1rem;
}

.back-link {
  align-items: center;
  color: var(--purple);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 0.28rem;
  line-height: 1.35;
  margin-bottom: 0.85rem;
  text-decoration: none;
}

.back-link svg {
  fill: none;
  height: 1.1rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  width: 1.1rem;
}

.assessment-page-header span {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.18rem;
}

.assessment-page-header h1 {
  color: var(--ink);
  font-size: 1.32rem;
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 0.32rem;
}

.assessment-page-header p {
  color: #516078;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.55;
  margin: 0;
}

.start-panel p {
  background: transparent;
  border: 0;
  color: #516078;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.55;
  margin: 0;
  padding: 0 0.1rem;
}

.section-heading span {
  color: var(--purple);
  display: block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.25rem;

}

.section-heading h2 {
  font-size: 1rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.section-heading p,
.warning-block p {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
}

.stat-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 1rem 0;
}

.stat-card {
  background: #eef7ff;
  border: 1px solid rgba(216, 224, 244, 0.72);
  border-radius: 1rem;
  padding: 0.75rem 0.45rem;
  text-align: center;
}

.stat-card strong,
.stat-card span {
  display: block;
}

.stat-card strong {
  color: var(--purple);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.stat-card span {
  color: #516078;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
}

.detail-toggle {
  background: var(--purple);
  border: 0;
  border-radius: 0.95rem;
  color: #ffffff;
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  margin-left: auto;
  min-height: 2.25rem;
  padding: 0.55rem 0.82rem;
}

.stress-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 20;
}

.stress-modal-backdrop {
  background: rgba(39, 50, 74, 0.42);
  inset: 0;
  position: absolute;
}

.stress-modal-card {
  background: var(--surface);
  border: 0;
  border-radius: 1.35rem;
  color: var(--ink);
  box-shadow: 0 1.2rem 3rem rgba(39, 50, 74, 0.24);
  margin: 0;
  max-height: min(82vh, 46rem);
  overflow: hidden;
  padding: 0;
  position: relative;
  width: min(100%, 398px);
}

.stress-modal-header {
  align-items: center;
  border-bottom: 1px solid rgba(216, 224, 244, 0.72);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.75rem 0.75rem 0.6rem 1rem;
  background:
    radial-gradient(circle at 74% 28%, rgba(255, 255, 255, 0.36), transparent 7rem),
    linear-gradient(135deg, #8ea9ee 0%, #75b9ed 64%, #b7e7f8 100%);
  color: white;
}

.stress-modal-header span {
  color: var(--purple);
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.18rem;
}

.stress-modal-header h2 {
  flex: 1;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
  text-align: left;
}

.modal-close {
  align-items: center;
  background: rgba(238, 247, 255, 0.9);
  border: 0;
  border-radius: 999px;
  color: rgba(63, 99, 197, 0.78);
  display: inline-flex;
  flex: 0 0 2.2rem;
  font-size: 1.35rem;
  font-weight: 700;
  height: 2.2rem;
  justify-content: center;
  line-height: 1;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
  width: 2.2rem;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: rgba(223, 233, 251, 0.95);
  box-shadow: 0 0.45rem 1rem rgba(63, 99, 197, 0.12);
  color: var(--purple);
  transform: translateY(-1px);
}

.modal-close:focus-visible {
  outline: 2px solid rgba(63, 99, 197, 0.22);
  outline-offset: 2px;
}

.ad-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 40;
}

.ad-modal-backdrop {
  background: rgba(39, 50, 74, 0.56);
  inset: 0;
  position: absolute;
}

.ad-modal-card {
  background: var(--surface);
  border: 0;
  border-radius: 1.35rem;
  box-shadow: 0 1.2rem 3rem rgba(39, 50, 74, 0.28);
  margin: 0;
  max-height: min(92vh, 52rem);
  overflow: hidden;
  padding: 0;
  position: relative;
  width: min(100%, 398px);
  z-index: 1;
}

.ad-modal-close {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  z-index: 2;
}

.ad-modal-image {
  display: block;
  height: auto;
  max-height: calc(92vh - 4.4rem);
  object-fit: contain;
  width: 100%;
}

.ad-modal-checkbox {
  align-items: center;
  background: #ffffff;
  border-top: 1px solid rgba(216, 224, 244, 0.82);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 0.95rem;
  font-weight: 700;
  gap: 0.55rem;
  justify-content: center;
  min-height: 3.4rem;
  padding: 0.75rem 1rem;
}

.ad-modal-checkbox input {
  accent-color: var(--purple);
  height: 1.1rem;
  width: 1.1rem;
}

.stress-modal-body {
  max-height: calc(min(82vh, 46rem) - 5rem);
  overflow-y: auto;
  padding: 1rem;
}

.warning-block {
  margin-top: 1rem;
}

.stress-modal-body .warning-block {
  margin-top: 0;
}

.warning-block h3 {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 0.35rem;
}

.symptom-list {
  display: grid;
  gap: 0.18rem;
  margin-top: 0.65rem;
  
}

.symptom-list article {
  align-items: center;
  background: rgba(255, 255, 255, 0.74);
  border: 0;
  border-radius: 0.95rem;
  display: flex;
  gap: 0.75rem;
  padding: 0.45rem 0rem;
}

.symptom-icon {
  align-items: center;
  background: linear-gradient(135deg, #ffffff, var(--purple-soft));
  border-radius: 0.75rem;
  box-shadow: 0 0.35rem 0.8rem rgba(63, 99, 197, 0.07);
  color: var(--purple);
  display: inline-flex;
  flex: 0 0 2.1rem;
  height: 2.1rem;
  justify-content: center;
  width: 2.1rem;
}

.symptom-icon svg {
  fill: none;
  height: 1.2rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1.2rem;
}

.symptom-list strong,
.symptom-list span {
  display: block;
  
}

.symptom-list strong {
  display: inline;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0;
}

.symptom-list article div {
  min-width: 0;
}

.symptom-list article div span {
  display: inline;
  margin-left: 0.35rem;
}

.symptom-list span {
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.45;
}

.symptom-list .symptom-icon {
  color: var(--purple);
  display: inline-flex;
}

.history-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.history-summary-section {
  margin-top: 1.15rem;
}

.history-heading span,
.history-heading small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.history-heading h2 {
  margin: 0;
}

.history-heading-link {
  align-items: center;
  background: #eef7ff;
  border-radius: 999px;
  color: #516078;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  min-height: 2rem;
  padding: 0.42rem 0.72rem;
  text-decoration: none;
}

.history-card-stack {
  display: grid;
  gap: 0.85rem;
}

.history-summary-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(216, 224, 244, 0.82);
  border-radius: 1.15rem;
  padding: 0.85rem;
}

.history-loading {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(216, 224, 244, 0.82);
  border-radius: 1.15rem;
  display: flex;
  gap: 0.85rem;
  padding: 0.95rem;
}

.history-loading strong {
  color: var(--ink);
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.16rem;
}

.history-loading p {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}

.loading-spinner {
  animation: loading-spin 900ms linear infinite;
  border: 0.22rem solid rgba(63, 99, 197, 0.16);
  border-top-color: var(--purple);
  border-radius: 999px;
  flex: 0 0 2.1rem;
  height: 2.1rem;
  width: 2.1rem;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.history-card-label {
  color: var(--purple);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.55rem;
}

.result-preview {
  --result-color: var(--success);
  --result-rgb: 53, 183, 121;
  background:
    radial-gradient(circle at 50% 37%, rgba(var(--result-rgb), 0.18), transparent 5.8rem),
    linear-gradient(180deg, #ffffff 0%, #fffdf2 55%, rgba(var(--result-rgb), 0.12) 100%);
  border: 1px solid rgba(var(--result-rgb), 0.2);
  border-radius: 1rem;
  margin-top: 0.75rem;
  overflow: hidden;
  padding: 0.9rem 0.85rem 0;
  text-align: center;
}

.result-preview-low {
  --result-color: #74c9a6;
  --result-rgb: 116, 201, 166;
}

.result-preview-moderate {
  --result-color: #e8c85c;
  --result-rgb: 232, 200, 92;
}

.result-preview-high {
  --result-color: #f2a15f;
  --result-rgb: 242, 161, 95;
}

.result-preview-severe {
  --result-color: #ef7d8b;
  --result-rgb: 239, 125, 139;
}

.result-preview span {
  color: var(--ink);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.12rem;
}

.result-preview time {
  color: var(--ink);
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.45rem;
  text-align: right;
}

.result-preview h2,
.result-preview h3 {
  color: var(--result-color);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.28;
  margin: 0 0 0.72rem;
}

.mood-face {
  align-items: center;
  background: var(--result-color);
  border-radius: 999px;
  box-shadow: 0 1.1rem 2rem rgba(var(--result-rgb), 0.18);
  color: #ffffff;
  display: inline-flex;
  height: 4.4rem;
  justify-content: center;
  margin-bottom: 0.9rem;
  width: 4.4rem;
}

.mood-face svg {
  display: block;
  fill: none;
  height: 3.55rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.4;
  width: 3.55rem;
  color: #ffffff;
}

.mood-face circle {
  fill: var(--result-color);
  stroke: var(--result-color);
}

.result-preview p {
  background: linear-gradient(135deg, var(--result-color), rgba(var(--result-rgb), 0.84));
  border-radius: 0.95rem 0.95rem 0 0;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.55;
  margin: 0 -0.85rem;
  padding: 0.9rem 1rem;
}

.quick-advice {
  background:
    linear-gradient(135deg, rgba(237, 246, 255, 0.95), rgba(255, 255, 255, 0.88));
  border: 1px solid rgba(216, 224, 244, 0.72);
  border-radius: 0.95rem;
  margin-top: 0.75rem;
  padding: 0.78rem;
}

.quick-advice span {
  color: var(--purple);
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.18rem;
}

.quick-advice p,
.history-empty p {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}

.history-page-section {
  margin-top: 0;
}

.history-timeline {
  display: grid;
  gap: 0.85rem;
}

.history-detail-card {
  --history-color: #74c9a6;
  --history-rgb: 116, 201, 166;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--history-rgb), 0.18), transparent 7rem),
    rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(var(--history-rgb), 0.22);
  border-radius: 1.15rem;
  padding: 0.9rem;
}

.history-detail-moderate {
  --history-color: #e8c85c;
  --history-rgb: 232, 200, 92;
}

.history-detail-high {
  --history-color: #f2a15f;
  --history-rgb: 242, 161, 95;
}

.history-detail-severe {
  --history-color: #ef7d8b;
  --history-rgb: 239, 125, 139;
}

.history-detail-top {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.history-detail-top strong,
.history-detail-top time {
  display: block;
}

.history-detail-top strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.35;
}

.history-detail-top time {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 0.12rem;
}

.history-detail-top > span {
  color: var(--history-color);
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.35;
}

.history-detail-card h3 {
  color: var(--history-color);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.35;
  margin: 0.75rem 0 0.25rem;
}

.history-detail-card p {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
}

.history-empty {
  background: rgba(255, 255, 255, 0.78);
  border: 1px dashed rgba(127, 138, 169, 0.34);
  border-radius: 1rem;
  padding: 0.95rem;
}

.history-empty strong {
  color: var(--ink);
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.assessment-panel {
  border-top: 0;
  padding-top: 1.2rem;
}

.panel-heading {
  align-items: start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.panel-heading span,
.panel-heading small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.panel-heading h2 {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
  margin: 0.12rem 0 0;
}

.scale-guide {
  background: rgba(238, 247, 255, 0.78);
  border-radius: 0.95rem;
  display: grid;
  gap: 0.38rem;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 1rem;
  padding: 0.55rem;
}

.scale-guide p {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  grid-column: 1 / -1;
  line-height: 1.35;
  margin: 0 0 0.12rem;
}

.scale-guide span {
  align-items: center;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.72rem;
  display: grid;
  gap: 0.08rem;
  justify-items: center;
  min-height: 3rem;
  padding: 0.42rem 0.2rem;
}

.scale-guide strong {
  color: var(--purple);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
}

.scale-guide em {
  color: #516078;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.question-list {
  display: grid;
  gap: 0.8rem;
}

.question-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(216, 224, 244, 0.82);
  border-radius: 1rem;
  padding: 0.9rem;
}

.question-title {
  align-items: flex-start;
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.question-title span {
  align-items: center;
  background: var(--purple-soft);
  border-radius: 999px;
  color: var(--purple);
  display: inline-flex;
  flex: 0 0 1.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  height: 1.8rem;
  justify-content: center;
  line-height: 1.35;
}

.question-title p {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.55;
  margin: 0;
}

.option-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(5, 1fr);
}

.option-pill {
  cursor: pointer;
}

.option-pill input {
  position: absolute;
  opacity: 0;
}

.option-pill span {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e7eaf2;
  border-radius: 0.75rem;
  color: #647089;
  display: flex;
  font-weight: 700;
  height: 2.3rem;
  justify-content: center;
  line-height: 1.35;
}

.option-pill input:checked + span {
  background: var(--purple);
  border-color: var(--purple);
  color: #ffffff;
}

.action-row {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr 0.75fr;
  margin-top: 1rem;
  
}

.assessment-submit-row {
  display: flex;
  justify-content: center;
}

.assessment-submit-row .primary-action {
  min-width: 12rem;
}

.primary-action {
  background: var(--purple);
  border: 0;
  border-radius: 0.95rem;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1.35;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
}

.primary-action:disabled {
  background: #d9d2ef;
}

.secondary-action {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(63, 99, 197, 0.18);
  border-radius: 0.95rem;
  color: var(--purple);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  line-height: 1.35;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
}

.mock-qa-panel {
  display: grid;
  gap: 1rem;
}

.mock-choice-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 1fr 1fr;
}

.mock-risk-action {
  background: linear-gradient(135deg, var(--danger), #f2a15f);
}

.hint-text {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0.75rem 0 0;
  text-align: center;
}

.stage-decision-text {
  background: rgba(238, 247, 255, 0.8);
  border-radius: 0.85rem;
  color: #516078;
  padding: 0.7rem 0.8rem;
}

.result-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 30;
}

.result-modal-backdrop {
  background: rgba(39, 50, 74, 0.42);
  inset: 0;
  position: absolute;
}

.result-modal-card {
  background: var(--surface);
  border: 0;
  border-radius: 1.25rem;
  box-shadow: 0 1.2rem 3rem rgba(39, 50, 74, 0.24);
  max-height: min(88vh, 42rem);
  overflow-y: auto;
  padding: 0.75rem;
  position: relative;
  width: min(100%, 390px);
  z-index: 1;
}

.result-modal-card .result-preview {
  margin-top: 0;
}

.result-close {
  position: absolute;
  right: 0.9rem;
  top: 0.9rem;
  z-index: 2;
}

.result-advice {
  margin-top: 0.75rem;
}

.dashboard-section {
  display: grid;
  gap: 1rem;
}

.dashboard-metric-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, 1fr);
}

.dashboard-metric-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(117, 185, 237, 0.2), transparent 4.5rem),
    rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(216, 224, 244, 0.82);
  border-radius: 1rem;
  padding: 0.8rem;
}

.dashboard-metric-warning {
  background:
    radial-gradient(circle at 100% 0%, rgba(240, 180, 41, 0.2), transparent 4.5rem),
    rgba(255, 255, 255, 0.82);
}

.dashboard-metric-danger {
  background:
    radial-gradient(circle at 100% 0%, rgba(233, 75, 90, 0.18), transparent 4.5rem),
    rgba(255, 255, 255, 0.82);
}

.dashboard-metric-card span,
.dashboard-metric-card small {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
}

.dashboard-metric-card strong {
  color: var(--purple);
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.05;
  margin: 0.28rem 0;
}

.dashboard-metric-warning strong {
  color: #c38a08;
}

.dashboard-metric-danger strong {
  color: var(--danger);
}

.dashboard-block {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(216, 224, 244, 0.62);
  border-radius: 1.1rem;
  padding: 0.85rem;
}

.dashboard-block-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.dashboard-block-heading span {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.12rem;
}

.dashboard-block-heading h3 {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.35;
  margin: 0;
}

.dashboard-filter-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0.75rem;
}

.dashboard-filter-grid label {
  display: grid;
  gap: 0.28rem;
}

.dashboard-filter-grid label:only-child {
  grid-column: 1 / -1;
}

.dashboard-search-filter {
  grid-column: 1 / -1;
}

.dashboard-respondent-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-filter-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
}

.dashboard-filter-grid input {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(216, 224, 244, 0.82);
  border-radius: 0.8rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 0;
  padding: 0.58rem 0.7rem;
  width: 100%;
}

.dashboard-filter-grid select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--purple) 50%) calc(100% - 1rem) 50% / 0.4rem 0.4rem no-repeat,
    linear-gradient(135deg, var(--purple) 50%, transparent 50%) calc(100% - 0.72rem) 50% / 0.4rem 0.4rem no-repeat,
    rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(216, 224, 244, 0.82);
  border-radius: 0.8rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  min-width: 0;
  padding: 0.58rem 1.8rem 0.58rem 0.7rem;
  width: 100%;
}

.dashboard-pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.85rem;
}

.dashboard-pagination button {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(216, 224, 244, 0.9);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  min-width: 2.1rem;
  padding: 0.45rem 0.68rem;
}

.dashboard-pagination .dashboard-page-button {
  min-height: 0;
}

.dashboard-pagination button.is-active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.dashboard-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.dashboard-unit-list,
.dashboard-assessment-list,
.dashboard-respondent-list {
  display: grid;
  gap: 0.65rem;
}

.dashboard-respondent-list {
  max-height: 28rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.dashboard-unit-card,
.dashboard-assessment-card,
.dashboard-respondent-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(216, 224, 244, 0.76);
  border-radius: 0.95rem;
  padding: 0.75rem;
}

.dashboard-unit-card,
.dashboard-assessment-card {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.dashboard-unit-card strong,
.dashboard-assessment-card strong,
.dashboard-respondent-card strong {
  color: var(--ink);
  display: block;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.35;
}

.dashboard-unit-card span,
.dashboard-unit-card small,
.dashboard-assessment-card span,
.dashboard-assessment-card small,
.dashboard-respondent-card span,
.dashboard-respondent-card time {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-unit-stats,
.dashboard-assessment-stats {
  flex: 0 0 auto;
  text-align: right;
}

.dashboard-unit-stats span,
.dashboard-assessment-stats span {
  color: var(--purple);
  font-size: 0.84rem;
  font-weight: 900;
}

.dashboard-assessment-stats small:last-child {
  color: #c38a08;
}

.dashboard-severity-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(4, 1fr);
}

.dashboard-severity-card {
  --severity-color: #74c9a6;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(216, 224, 244, 0.76);
  border-radius: 0.85rem;
  padding: 0.65rem 0.35rem;
  text-align: center;
}

.dashboard-severity-moderate {
  --severity-color: #c38a08;
}

.dashboard-severity-high {
  --severity-color: #d8792e;
}

.dashboard-severity-severe {
  --severity-color: var(--danger);
}

.dashboard-severity-card span,
.dashboard-severity-card small {
  color: var(--muted);
  display: block;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.25;
}

.dashboard-severity-card span {
  min-height: 2.1rem;
}

.dashboard-severity-card strong {
  color: var(--severity-color);
  display: block;
  font-size: 1.22rem;
  font-weight: 900;
  line-height: 1.1;
  margin: 0.24rem 0;
}

.dashboard-respondent-card {
  --history-color: #74c9a6;
  --history-rgb: 116, 201, 166;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--history-rgb), 0.16), transparent 5rem),
    rgba(255, 255, 255, 0.82);
  border-color: rgba(var(--history-rgb), 0.22);
}

.dashboard-respondent-card.history-detail-moderate {
  --history-color: #c38a08;
  --history-rgb: 232, 200, 92;
}

.dashboard-respondent-card.history-detail-high {
  --history-color: #d8792e;
  --history-rgb: 242, 161, 95;
}

.dashboard-respondent-card.history-detail-severe {
  --history-color: var(--danger);
  --history-rgb: 239, 125, 139;
}

.dashboard-respondent-main,
.dashboard-respondent-result {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.dashboard-respondent-main {
  margin-bottom: 0.65rem;
}

.dashboard-respondent-main time {
  flex: 0 0 auto;
  text-align: right;
}

.dashboard-respondent-result {
  background: linear-gradient(135deg, rgba(var(--history-rgb), 0.14), rgba(var(--history-rgb), 0.06));
  border: 1px solid rgba(var(--history-rgb), 0.2);
  border-radius: 0.75rem;
  padding: 0.5rem 0.6rem;
}

.dashboard-respondent-meta {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-bottom: 0.55rem;
}

.dashboard-respondent-meta span {
  background: rgba(var(--history-rgb), 0.12);
  border: 1px solid rgba(var(--history-rgb), 0.22);
  border-radius: 999px;
  color: var(--history-color);
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.2;
  padding: 0.32rem 0.55rem;
}

.dashboard-respondent-meta strong {
  background: #eef2f7;
  border: 1px solid #d8e0ee;
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.68rem;
  line-height: 1.2;
  padding: 0.32rem 0.55rem;
}

.dashboard-respondent-result span {
  color: var(--history-color);
  font-weight: 900;
  padding-right: 0.5rem;
}

.dashboard-respondent-result strong {
  color: var(--history-color);
  flex: 0 0 auto;
}

@media (max-width: 480px) {
  .dashboard-filter-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-respondent-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-assessment-card,
  .dashboard-respondent-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-assessment-stats {
    text-align: left;
  }

  .app-shell {
    padding: 0;
  }

  .phone-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    width: 100%;
  }
}
