:root {
  --pink: #ff4fb8;
  --hot-pink: #ff1493;
  --soft-pink: #ffe1f3;
  --lavender: #7a5cff;
  --violet: #4b2fa0;
  --navy: #16215e;
  --mint: #4fd6ad;
  --yellow: #ffe78c;
  --text: #2c2550;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Prompt", "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
  background: #fff5fb;
  transition: color .25s ease, background-color .25s ease;
}

a {
  color: #b10c70;
}

.site-header {
  position: relative;
  z-index: 1040;
  padding-top: 1.5rem;
  overflow: visible;
}

.top-logo,
.footer-logo {
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(123, 55, 132, .25));
}

.site-title {
  max-width: 980px;
  margin: .75rem auto .5rem;
  font-size: clamp(1.45rem, 3vw, 2.6rem);
  font-weight: 800;
  color: #8f0b65;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .85);
}

.site-title > span {
  display: block;
}

.site-brand-name {
  margin-bottom: .2rem;
  color: #d30b80;
  font-size: 2.35rem;
  line-height: 1;
}

.footer-brand-art {
  width: 210px;
  height: 210px;
  border: 3px solid #fff;
  border-radius: 8px;
  background: #f9effa;
}

.live-clock {
  display: inline-flex;
  gap: .75rem;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--hot-pink), var(--lavender));
  box-shadow: 0 10px 22px rgba(255, 20, 147, .24);
  font-weight: 700;
}

.candy-nav {
  position: relative;
  z-index: 1050;
  margin-top: 1rem;
  overflow: visible;
  background: linear-gradient(90deg, #ff4fb8, #a755ff, #37bfe8);
  box-shadow: 0 14px 30px rgba(141, 29, 142, .24);
}

.candy-nav .container,
.candy-nav .navbar-collapse,
.candy-nav .navbar-nav,
.candy-nav .nav-item.dropdown {
  overflow: visible;
}

.navbar .nav-link {
  border-radius: 999px;
  color: rgba(255, 255, 255, .94);
  padding-inline: 1rem !important;
  font-weight: 700;
}

.navbar .nav-link:hover {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

.sparkle {
  position: absolute;
  color: #fff2a8;
  font-size: 2.2rem;
  animation: floaty 4s ease-in-out infinite;
}

.sparkle-one {
  left: 8%;
  top: 2rem;
}

.sparkle-two {
  right: 10%;
  top: 4rem;
  animation-delay: 1s;
}

@keyframes floaty {
  50% { transform: translateY(-12px) rotate(8deg); }
}

.hero-panel,
.profile-hero,
.glass-panel,
.auth-card,
.tree-panel {
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 28px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 20px 45px rgba(126, 45, 140, .18);
  backdrop-filter: blur(14px);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 1.5rem;
  align-items: center;
  padding: 1.2rem;
  margin-bottom: 1.4rem;
}

.hero-panel h2 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 900;
  color: #382277;
}

.hero-panel p {
  font-size: 1.15rem;
}

.hero-art {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(38, 27, 95, .28);
}

.pill-label,
.role-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .42rem .9rem;
  color: #fff;
  background: linear-gradient(90deg, var(--hot-pink), var(--lavender));
  font-weight: 800;
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.station-card {
  position: relative;
  min-height: 620px;
  padding: 2.2rem 1rem 1rem;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 8px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(38, 27, 95, .3);
}

.station-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .38;
  background-image: radial-gradient(circle at 24% 20%, rgba(255,255,255,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 10%, rgba(255,231,140,.9) 0 2px, transparent 3px);
  pointer-events: none;
}

.station-card > * {
  position: relative;
  z-index: 1;
}

.sound-card {
  background: linear-gradient(155deg, #17236d 0%, #342489 50%, #ff68c0 130%);
}

.writing-card {
  background: linear-gradient(155deg, #6f4edc 0%, #ff78c7 72%, #ffe2f6 140%);
}

.ai-card {
  background: linear-gradient(155deg, #111b56 0%, #312487 62%, #51c9ff 130%);
}

.station-badge {
  position: absolute;
  top: .75rem;
  left: 50%;
  transform: translateX(-50%);
  min-width: 150px;
  border-radius: 999px;
  padding: .45rem 1rem;
  background: linear-gradient(90deg, #d883ff, #73b9ff);
  text-align: center;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.station-card h3 {
  margin-top: 1.2rem;
  font-size: 1.85rem;
  font-weight: 900;
}

.sound-orb,
.lumi-avatar {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin: 1.5rem auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,139,215,.56) 38%, rgba(122,92,255,.18) 68%);
  box-shadow: 0 0 40px rgba(255, 234, 160, .7);
  font-size: 4rem;
}

.sound-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.sound-chip,
.quick-moods button {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  padding: .7rem .55rem;
  color: #fff;
  background: rgba(255,255,255,.13);
  font-weight: 700;
}

.sound-chip.active,
.quick-moods button:hover {
  background: linear-gradient(90deg, rgba(255,79,184,.82), rgba(255,231,140,.72));
}

.time-row {
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-size: .9rem;
}

.journal-box {
  min-height: 210px;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, .84);
  line-height: 1.9;
}

.choice-button {
  border: 0;
  border-radius: 22px;
  padding: .85rem;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(45, 24, 88, .22);
}

.choice-button span {
  font-size: .86rem;
  font-weight: 600;
}

.choice-button.keep {
  background: linear-gradient(90deg, #4fd6ad, #7ed7ff);
}

.choice-button.let-go {
  background: linear-gradient(90deg, #ff78c7, #ba75ff);
}

.chat-window {
  height: 210px;
  overflow-y: auto;
  padding: .75rem;
  border-radius: 20px;
  background: rgba(255,255,255,.12);
}

.chat-bubble {
  max-width: 88%;
  margin-bottom: .65rem;
  padding: .65rem .85rem;
  border-radius: 18px;
  color: #fff;
}

.chat-bubble.bot {
  background: rgba(255,255,255,.18);
}

.chat-bubble.user {
  margin-left: auto;
  background: linear-gradient(90deg, #ff4fb8, #7a5cff);
}

.quick-moods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .75rem;
}

.chat-input {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
}

.chat-input .form-control {
  border-radius: 999px;
}

.btn-pink,
.btn-light-pink,
.btn-lavender {
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(255, 20, 147, .22);
}

.btn-pink {
  background: linear-gradient(90deg, var(--hot-pink), var(--lavender));
}

.btn-light-pink {
  background: linear-gradient(90deg, #ff8ed2, #ffe78c);
}

.btn-lavender {
  background: linear-gradient(90deg, #7a5cff, #42c9e8);
}

.tree-panel {
  display: grid;
  grid-template-columns: 240px 1fr 260px;
  gap: 1rem;
  align-items: center;
  margin-top: 1.4rem;
  padding: 1rem;
}

.tree-title {
  color: #1b3d8f;
  font-weight: 900;
}

.tree-title span {
  display: block;
  font-size: .95rem;
  font-weight: 600;
}

.tree-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  text-align: center;
  font-size: 2rem;
}

.tree-steps small {
  display: block;
  color: #26306d;
  font-size: .8rem;
  font-weight: 700;
}

.tree-note {
  border: 1px solid rgba(255, 79, 184, .2);
  border-radius: 18px;
  padding: .9rem;
  color: #b10c70;
  background: rgba(255,255,255,.55);
  text-align: center;
  font-weight: 800;
}

.site-footer {
  padding: 2rem 0;
}

.developer-credit {
  margin: .5rem 0 .2rem;
  color: #7a165d;
  font-weight: 800;
}

.reference-link {
  font-weight: 700;
}

.admin-nav-menu {
  z-index: 1100;
  min-width: 230px;
  padding: .45rem;
  border: 1px solid #eadbec;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(58, 32, 113, .2);
}

.admin-nav-menu .dropdown-item {
  border-radius: 6px;
  padding: .65rem .75rem;
  color: #43365c;
  font-weight: 700;
}

.admin-nav-menu .dropdown-item:hover,
.admin-nav-menu .dropdown-item:focus {
  color: #8f0b65;
  background: #fff0f8;
}

.admin-page {
  max-width: 1320px;
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eaddea;
}

.admin-heading.compact {
  align-items: flex-end;
}

.admin-heading h2 {
  margin: .2rem 0;
  color: #34255c;
  font-size: 1.85rem;
  font-weight: 900;
}

.admin-heading p {
  margin: 0;
  color: #756a7f;
}

.admin-system-status {
  display: grid;
  justify-items: end;
  min-width: 260px;
  padding: .8rem;
  border-left: 4px solid #38b991;
  background: #effcf6;
}

.admin-system-status .role-pill {
  margin-bottom: .35rem;
  padding: .28rem .65rem;
  font-size: .75rem;
}

.admin-system-status small {
  color: #617168;
}

.admin-alert-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border: 1px solid #f2bec9;
  border-left: 5px solid #c7254e;
  border-radius: 8px;
  color: #7d1733;
  background: #fff2f5;
}

.admin-alert-strip strong,
.admin-alert-strip span {
  display: block;
}

.admin-alert-strip span {
  color: #805867;
  font-size: .82rem;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .7rem;
  margin-bottom: 1rem;
}

.admin-stat-grid > a {
  display: grid;
  min-height: 124px;
  padding: .85rem;
  border: 1px solid #e7dce9;
  border-top: 4px solid #ff4fb8;
  border-radius: 8px;
  color: #3a3150;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(65, 42, 91, .08);
}

.admin-stat-grid > a:nth-child(2) { border-top-color: #7758dd; }
.admin-stat-grid > a:nth-child(3) { border-top-color: #36b9cc; }
.admin-stat-grid > a:nth-child(4) { border-top-color: #38b991; }
.admin-stat-grid > a:nth-child(5) { border-top-color: #e2a628; }
.admin-stat-grid > a:nth-child(6) { border-top-color: #d64c68; }

.admin-stat-grid span {
  color: #71677a;
  font-size: .82rem;
  font-weight: 700;
}

.admin-stat-grid strong {
  align-self: end;
  color: #2f2452;
  font-size: 1.85rem;
  font-variant-numeric: tabular-nums;
}

.admin-stat-grid small {
  color: #847989;
  font-size: .72rem;
}

.admin-chart-grid,
.admin-lower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #e6dce9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(65, 42, 91, .08);
}

.admin-chart-grid .admin-panel,
.admin-lower-grid .admin-panel {
  margin-bottom: 0;
}

.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .8rem;
}

.admin-panel-heading h3,
.admin-panel > h3 {
  margin: .1rem 0 0;
  color: #37295c;
  font-size: 1.15rem;
  font-weight: 900;
}

.admin-panel-heading > a {
  font-weight: 800;
}

.admin-chart-shell {
  position: relative;
  height: 300px;
}

.admin-dataset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.2rem;
}

.admin-dataset-grid article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 72px;
  padding: .7rem 0;
  border-bottom: 1px solid #eee4ef;
}

.admin-dataset-grid article strong,
.admin-dataset-grid article span {
  display: block;
}

.admin-dataset-grid article span {
  color: #807587;
  font-size: .78rem;
}

.admin-dataset-grid article > div:last-child {
  display: flex;
  gap: .55rem;
  font-size: .82rem;
  font-weight: 800;
}

.admin-table {
  margin-bottom: 0;
}

.admin-table td > strong,
.admin-table td > small {
  display: block;
}

.admin-table td > small {
  color: #857a8c;
  font-size: .72rem;
}

.admin-level {
  display: inline-flex;
  min-width: 92px;
  justify-content: center;
  padding: .3rem .5rem;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 800;
}

.admin-level.level-low { color: #17674f; background: #ddf8ed; }
.admin-level.level-moderate { color: #715416; background: #fff2bd; }
.admin-level.level-high { color: #a14c13; background: #ffe4ce; }
.admin-level.level-severe { color: #9a173b; background: #ffe1e8; }

.admin-audit-list > div {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) 1fr;
  padding: .65rem 0;
  border-bottom: 1px solid #eee5ef;
}

.admin-audit-list span {
  color: #9d176d;
  font-weight: 800;
}

.admin-audit-list small {
  grid-column: 2;
  color: #817688;
}

.backup-panel dl {
  margin: 1rem 0;
}

.backup-panel dl > div {
  display: flex;
  justify-content: space-between;
  padding: .5rem 0;
  border-bottom: 1px solid #eee4ef;
}

.backup-panel dd {
  margin: 0;
  font-weight: 800;
}

.backup-confirm {
  display: flex;
  gap: .55rem;
  align-items: center;
  margin-bottom: .75rem;
  padding-left: 0;
}

.backup-confirm .form-check-input {
  float: none;
  flex: 0 0 auto;
  margin: 0;
}

.admin-manual-link {
  display: block;
  margin-top: .75rem;
  text-align: center;
  font-weight: 800;
}

.admin-restricted-note {
  margin: 0;
  padding: .75rem;
  border-left: 4px solid #d35b86;
  color: #66586e;
  background: #fff2f7;
}

.database-security-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .75rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border: 1px solid #e5b5c7;
  border-radius: 8px;
  color: #67233e;
  background: #fff1f6;
}

.database-security-strip strong {
  color: #a4164d;
}

.database-transfer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.database-transfer-grid .admin-panel {
  margin-bottom: 0;
}

.database-transfer-grid h4 {
  color: #4d4160;
  font-size: 1rem;
  font-weight: 800;
}

.database-transfer-grid p,
.database-import-form small {
  color: #756a7b;
}

.database-facts {
  margin: 1rem 0;
}

.database-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid #eee4ef;
}

.database-facts dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.database-import-form {
  display: grid;
  gap: .9rem;
}

.database-import-form small {
  display: block;
  margin-top: .3rem;
}

.database-danger-confirm {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  margin: 0;
  padding: .8rem;
  border: 1px solid #edc3ce;
  border-radius: 8px;
  color: #7f2745;
  background: #fff4f7;
}

.database-danger-confirm .form-check-input {
  float: none;
  flex: 0 0 auto;
  margin: .15rem 0 0;
}

.database-table-summary code {
  color: #78205a;
  font-weight: 700;
}

.database-table-summary .admin-data-table {
  min-width: 680px;
}

.database-table-summary th:nth-child(2),
.database-table-summary th:nth-child(3),
.database-table-summary td:nth-child(2),
.database-table-summary td:nth-child(3) {
  width: 110px;
  white-space: nowrap;
}

.database-table-summary th:last-child,
.database-table-summary td:last-child {
  min-width: 230px;
}

.admin-dataset-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 1rem;
  border: 1px solid #dfd3e5;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.admin-dataset-tabs a {
  padding: .7rem .55rem;
  border-right: 1px solid #e8deea;
  color: #5b5066;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
}

.admin-dataset-tabs a:last-child {
  border-right: 0;
}

.admin-dataset-tabs a.active {
  color: #fff;
  background: #8c3ca6;
}

.admin-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 170px auto auto;
  gap: .7rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: .9rem;
  border: 1px solid #e6dce9;
  border-radius: 8px;
  background: #fff;
}

.admin-filter-bar label {
  display: block;
  margin-bottom: .3rem;
  color: #645970;
  font-size: .78rem;
  font-weight: 800;
}

.admin-data-panel {
  padding: 0;
  overflow: hidden;
}

.admin-data-table td {
  max-width: 260px;
  vertical-align: middle;
}

.admin-cell-long_text {
  min-width: 250px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-pagination {
  display: flex;
  justify-content: center;
  gap: .4rem;
}

.admin-pagination a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #ded2e4;
  border-radius: 6px;
  color: #514461;
  background: #fff;
  text-decoration: none;
  font-weight: 800;
}

.admin-pagination a.active {
  border-color: #8c3ca6;
  color: #fff;
  background: #8c3ca6;
}

.admin-record-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: -1rem -1rem 1rem;
  border-bottom: 1px solid #e8deea;
  background: #f8f5fa;
}

.admin-record-meta > div {
  padding: .75rem 1rem;
  border-right: 1px solid #e8deea;
}

.admin-record-meta > div:last-child {
  border-right: 0;
}

.admin-record-meta span,
.admin-record-meta strong {
  display: block;
}

.admin-record-meta span {
  color: #7f7487;
  font-size: .75rem;
}

.admin-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-field-wide {
  grid-column: 1 / -1;
}

.admin-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  padding-top: 1rem;
  border-top: 1px solid #e9e0eb;
}

.admin-answer-editor {
  min-width: 0;
  margin: 0;
  padding: 1rem 0 0;
  border: 0;
  border-top: 1px solid #e9e0eb;
}

.admin-answer-editor legend {
  float: none;
  width: auto;
  margin: 0 0 .75rem;
  color: #37295c;
  font-size: 1.05rem;
  font-weight: 900;
}

.admin-answer-summary {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  margin-bottom: .8rem;
  padding: .7rem .8rem;
  border-left: 4px solid #38b991;
  background: #effcf6;
}

.admin-answer-summary strong {
  color: #17674f;
  font-size: 1.4rem;
}

.admin-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}

.admin-answer-grid label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: .7rem;
  align-items: center;
  min-height: 74px;
  padding: .65rem 0;
  border-bottom: 1px solid #eee4ef;
}

.admin-answer-grid label > span {
  color: #514760;
  font-size: .84rem;
}

.night-mode .admin-heading h2,
.night-mode .admin-panel-heading h3,
.night-mode .admin-panel > h3,
.night-mode .admin-stat-grid strong {
  color: #f4edf9;
}

.night-mode .admin-panel,
.night-mode .admin-filter-bar,
.night-mode .admin-stat-grid > a,
.night-mode .admin-dataset-tabs,
.night-mode .admin-pagination a {
  border-color: #625a83;
  color: #ede8f5;
  background: #272752;
}

.night-mode .database-security-strip,
.night-mode .database-danger-confirm,
.night-mode .admin-restricted-note {
  border-color: #73516d;
  color: #eadfea;
  background: #392744;
}

.night-mode .database-transfer-grid h4,
.night-mode .database-table-summary code {
  color: #f1d8ef;
}

.night-mode .database-transfer-grid p,
.night-mode .database-import-form small {
  color: #cfc5d4;
}

.night-mode .admin-dataset-tabs a,
.night-mode .admin-stat-grid span,
.night-mode .admin-stat-grid small {
  color: #d7cfdf;
}

.night-mode .admin-record-meta {
  border-color: #625a83;
  background: #30305e;
}

@media (max-width: 1199px) {
  .admin-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-filter-bar {
    grid-template-columns: minmax(240px, 1fr) 160px 160px;
  }
}

@media (max-width: 767px) {
  .admin-heading,
  .admin-alert-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-system-status {
    justify-items: start;
    min-width: 0;
  }

  .admin-stat-grid,
  .admin-chart-grid,
  .admin-lower-grid,
  .database-transfer-grid,
  .admin-dataset-grid,
  .admin-filter-bar,
  .admin-edit-form {
    grid-template-columns: 1fr;
  }

  .database-security-strip {
    grid-template-columns: 1fr;
  }

  .admin-answer-grid {
    grid-template-columns: 1fr;
  }

  .admin-dataset-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-record-meta {
    grid-template-columns: 1fr;
  }

  .admin-record-meta > div {
    border-right: 0;
    border-bottom: 1px solid #e8deea;
  }

  .admin-field-wide {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .admin-stat-grid,
  .admin-dataset-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dataset-grid article,
  .admin-edit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-answer-grid label {
    grid-template-columns: 1fr;
  }
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.auth-card {
  width: min(100%, 680px);
  padding: 1.5rem;
}

.auth-card h2,
.glass-panel h2,
.profile-hero h2 {
  color: #8f0b65;
  font-weight: 900;
}

.form-control,
.form-select {
  border: 1px solid rgba(255, 79, 184, .24);
  border-radius: 16px;
  padding: .72rem 1rem;
}

.profile-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem;
}

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

.stat-card {
  border-radius: 22px;
  padding: 1.1rem;
  background: #fff;
  box-shadow: 0 12px 28px rgba(126, 45, 140, .14);
}

.stat-card strong {
  display: block;
  color: var(--hot-pink);
  font-size: 2rem;
}

.reflection-list article {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(143, 11, 101, .14);
}

.reflection-list article:last-child {
  border-bottom: 0;
}

.reflection-list span,
.reflection-list time {
  color: #8f0b65;
  font-weight: 800;
}

.pretty-table {
  overflow: hidden;
  border-radius: 18px;
}

.pretty-table thead th {
  color: #fff;
  background: linear-gradient(90deg, var(--hot-pink), var(--lavender));
}

.role-select {
  min-width: 140px;
}

.account-settings-page {
  max-width: 1180px;
}

.settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.25rem 0;
}

.settings-heading h2 {
  margin: .65rem 0 .25rem;
  color: #8f0b65;
  font-weight: 900;
}

.account-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.settings-panel {
  padding: 1.4rem;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 22px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 16px 34px rgba(126, 45, 140, .15);
  backdrop-filter: blur(14px);
}

.settings-panel h3 {
  margin-bottom: 1rem;
  color: #63319f;
  font-weight: 900;
}

.member-actions form {
  margin: 0;
}

.install-card {
  max-width: 520px;
  margin: 1rem auto 0;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255,255,255,.7);
}

.sticker {
  font-size: 3rem;
}

@media (max-width: 991px) {
  .hero-panel,
  .station-grid,
  .tree-panel {
    grid-template-columns: 1fr;
  }

  .station-card {
    min-height: auto;
  }

  .tree-steps,
  .stats-grid,
  .account-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .site-title {
    font-size: 1.35rem;
  }

  .live-clock,
  .profile-hero,
  .chat-input,
  .settings-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .sound-options,
  .quick-moods,
  .tree-steps,
  .stats-grid,
  .account-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ฤดูใจ application */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  color: #fff;
  background: rgba(22, 33, 94, .3);
  font-size: 1.25rem;
}

.eyebrow,
.section-kicker {
  display: block;
  color: #9c1772;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-welcome,
.assessment-header,
.healing-heading,
.growth-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
  padding: 1.4rem 0;
  border-bottom: 2px solid rgba(255, 79, 184, .16);
}

.dashboard-welcome h2,
.assessment-header h2,
.healing-heading h2,
.growth-heading h2 {
  margin: .35rem 0;
  color: #422277;
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  font-weight: 900;
}

.dashboard-welcome p,
.assessment-header p,
.healing-heading p,
.growth-heading p {
  max-width: 720px;
  margin: 0;
  color: #655b79;
}

.dashboard-visual {
  width: min(38%, 440px);
  aspect-ratio: 16 / 9;
  border: 3px solid #fff;
  border-radius: 8px;
  object-fit: cover;
  object-position: left center;
  box-shadow: 0 16px 32px rgba(58, 32, 113, .18);
}

.dashboard-grid,
.growth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr);
  gap: 1rem;
}

.vibe-panel,
.growth-panel,
.login-invitation,
.assessment-form,
.assessment-result,
.assessment-locked {
  border: 1px solid #f2d7e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(80, 35, 97, .1);
}

.vibe-panel,
.growth-panel {
  padding: 1.25rem;
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.section-title-row h3,
.vibe-panel h3,
.growth-panel h3 {
  margin: .2rem 0 .6rem;
  color: #442675;
  font-weight: 900;
}

.checkin-count,
.vault-count {
  border-radius: 999px;
  padding: .42rem .75rem;
  color: #7b1660;
  background: #ffe0f1;
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

.mood-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .6rem;
  margin-top: 1rem;
}

.mood-option {
  min-height: 112px;
  border: 1px solid #e5dcf5;
  border-radius: 8px;
  color: #3b3260;
  background: #faf8ff;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.mood-option:hover,
.mood-option:focus-visible {
  border-color: var(--pink);
  box-shadow: 0 10px 22px rgba(255, 79, 184, .18);
  transform: translateY(-3px);
}

.mood-option span {
  display: block;
  margin-bottom: .35rem;
  font-size: 2.35rem;
}

.mood-option small {
  font-weight: 800;
}

.today-timeline {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid #f1ddea;
}

.today-timeline > div {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: .6rem;
  align-items: center;
  padding: .5rem 0;
}

.today-timeline p {
  margin: 0;
  overflow-wrap: anywhere;
}

.today-timeline time {
  color: #867c93;
  font-size: .82rem;
}

.mission-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff7d8;
  border-color: #f0d77d;
}

.mission-panel.is-complete {
  background: #e9fff6;
  border-color: #9ee2c9;
}

.mission-icon {
  font-size: 3.4rem;
}

.mission-panel p {
  flex: 1;
  color: #51475f;
  font-size: 1.08rem;
}

.wellbeing-summary {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid #c8dff2;
  border-radius: 8px;
  background: #eef9ff;
}

.summary-number strong {
  display: block;
  color: #0b88a5;
  font-size: 2.35rem;
  line-height: 1;
}

.summary-number span {
  color: #466773;
  font-size: .85rem;
}

.wellbeing-summary h3 {
  margin: .1rem 0;
  color: #35236f;
  font-weight: 900;
}

.login-invitation {
  margin-bottom: 1rem;
  padding: 2rem;
  text-align: center;
}

.login-invitation h3 {
  color: #8f0b65;
  font-weight: 900;
}

.module-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.module-link {
  display: grid;
  grid-template-columns: 56px 1fr 24px;
  gap: .8rem;
  align-items: center;
  min-height: 145px;
  padding: 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #302454;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(73, 39, 111, .09);
}

.module-link:hover {
  color: #302454;
  transform: translateY(-2px);
}

.assessment-link { background: #f2efff; border-color: #cfc3fa; }
.healing-link { background: #eaf9ff; border-color: #b7e1ef; }
.growth-link { background: #edfff5; border-color: #bce8d0; }

.module-link h3 {
  margin: .1rem 0;
  font-size: 1.15rem;
  font-weight: 900;
}

.module-link p {
  margin: 0;
  color: #6d647e;
  font-size: .9rem;
}

.module-icon {
  font-size: 2.35rem;
}

.module-arrow {
  font-size: 2rem;
}

.assessment-page {
  max-width: 1100px;
}

.assessment-monster,
.result-monster {
  font-size: 5rem;
  filter: drop-shadow(0 12px 18px rgba(71, 45, 109, .2));
}

.assessment-type-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.assessment-type-tabs a {
  display: block;
  padding: .85rem 1rem;
  border: 1px solid #e1d8ed;
  border-radius: 8px;
  color: #40355b;
  background: #fff;
  text-decoration: none;
}

.assessment-type-tabs a.active {
  border-color: var(--pink);
  background: #fff0f8;
  box-shadow: inset 4px 0 0 var(--pink);
}

.assessment-type-tabs strong,
.assessment-type-tabs span {
  display: block;
}

.assessment-type-tabs span {
  margin-top: .15rem;
  color: #81778f;
  font-size: .82rem;
}

.assessment-form,
.assessment-result,
.assessment-locked {
  padding: 1.4rem;
}

.spst-instructions {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr);
  gap: 1rem 1.5rem;
  margin: -1.4rem -1.4rem 1.4rem;
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid #eadcec;
  background: #fff7fb;
}

.spst-instructions h3,
.spst-instructions p {
  margin: 0;
}

.spst-instructions h3 {
  color: #4e277d;
  font-size: 1.15rem;
}

.spst-instructions p {
  margin-top: .4rem;
  color: #645971;
}

.spst-scale-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem .8rem;
  align-content: center;
  font-size: .82rem;
}

.spst-scale-summary span {
  min-width: 0;
}

.spst-scale-summary strong {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: .3rem;
  border-radius: 50%;
  color: #fff;
  background: #7044b1;
}

.assessment-progress-wrap {
  margin-bottom: 1.4rem;
}

.assessment-progress {
  height: 8px;
  margin-top: .5rem;
  border-radius: 999px;
  background: #eee8f5;
  overflow: hidden;
}

.assessment-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--lavender));
  transition: width .25s ease;
}

.assessment-form.js-ready .assessment-question {
  display: none;
}

.assessment-form.js-ready .assessment-question.active {
  display: block;
}

.assessment-question {
  min-width: 0;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.assessment-question legend {
  margin-bottom: 1.2rem;
  color: #34235f;
  font-size: 1.35rem;
  font-weight: 900;
}

.assessment-question legend span {
  display: block;
  margin-bottom: .5rem;
  color: #a91b78;
  font-size: .8rem;
}

.answer-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .65rem;
}

.answer-scale input {
  position: absolute;
  opacity: 0;
}

.answer-not-occurred {
  display: block;
  margin-bottom: .7rem;
}

.answer-not-occurred input {
  position: absolute;
  opacity: 0;
}

.answer-not-occurred > span {
  display: flex;
  gap: .65rem;
  align-items: center;
  min-height: 58px;
  padding: .65rem .85rem;
  border: 2px solid #d8d2e4;
  border-radius: 8px;
  color: #554a65;
  background: #f7f5fa;
  cursor: pointer;
}

.answer-not-occurred strong {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  background: #766d83;
}

.answer-not-occurred input:checked + span {
  border-color: #7044b1;
  color: #46236d;
  background: #eee7fb;
  box-shadow: 0 8px 18px rgba(112, 68, 177, .16);
}

.answer-not-occurred input:focus-visible + span {
  outline: 3px solid rgba(66, 201, 232, .45);
}

.answer-scale label span {
  display: grid;
  place-items: center;
  min-height: 110px;
  padding: .75rem .45rem;
  border: 2px solid #e8def0;
  border-radius: 8px;
  color: #5a4c70;
  background: #fcfaff;
  text-align: center;
  cursor: pointer;
}

.answer-scale label strong {
  display: block;
  color: #7044b1;
  font-size: 1.7rem;
}

.answer-scale input:checked + span {
  border-color: var(--pink);
  color: #7b1057;
  background: #ffe5f4;
  box-shadow: 0 8px 18px rgba(255, 79, 184, .18);
}

.answer-scale input:focus-visible + span {
  outline: 3px solid rgba(66, 201, 232, .45);
}

.assessment-navigation {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
}

.assessment-form:not(.js-ready) .assessment-js-only {
  display: none;
}

.assessment-result {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 1.4rem;
  align-items: center;
  border-left: 6px solid var(--pink);
}

.result-monster-portrait {
  --monster-x: 1%;
  width: 170px;
  max-width: 100%;
  aspect-ratio: 1 / 2;
  overflow: hidden;
  border: 1px solid #e5d9ec;
  border-radius: 8px;
  background-image: url('../../uploads/illustrations/stress-monster-guide.png');
  background-repeat: no-repeat;
  background-position: var(--monster-x) 92%;
  background-size: 400% auto;
  box-shadow: 0 12px 24px rgba(71, 45, 109, .14);
}

.monster-low { --monster-x: 1%; }
.monster-moderate { --monster-x: 34%; }
.monster-high { --monster-x: 67%; }
.monster-severe { --monster-x: 100%; }

.assessment-result h2 {
  color: #4e277d;
  font-weight: 900;
}

.assessment-result h2 small {
  font-size: .6em;
}

.result-score strong {
  color: var(--hot-pink);
  font-size: 2.7rem;
}

.assessment-disclaimer {
  color: #786c80;
  font-size: .86rem;
}

.assessment-locked {
  text-align: center;
}

.assessment-locked > div {
  font-size: 3rem;
}

.score-guide {
  display: grid;
  grid-template-columns: 180px repeat(4, 1fr);
  gap: .6rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: #202555;
  color: #fff;
}

.score-guide h3 {
  margin: 0;
  font-size: 1rem;
}

.score-guide div {
  text-align: center;
}

.score-guide span {
  display: block;
  color: #ffe78c;
  font-weight: 900;
}

.latest-stress-chip {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0 .6rem;
  align-items: center;
  padding: .65rem .85rem;
  border: 1px solid #dad1ee;
  border-radius: 8px;
  color: #322257;
  background: #fff;
  text-decoration: none;
}

.latest-stress-chip > span {
  grid-row: span 2;
  font-size: 2rem;
}

.latest-stress-chip small {
  color: #786e88;
}

.upgraded-stations .station-card {
  min-height: 850px;
}

.smart-recommendation {
  margin: 1rem 0;
  padding: .7rem;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  background: rgba(255, 255, 255, .13);
  font-size: .88rem;
}

.smart-recommendation span {
  display: block;
  color: #ffe78c;
  font-weight: 900;
}

.youtube-player-shell {
  min-height: 220px;
  border-radius: 8px;
  background: #0b1237;
  overflow: hidden;
}

#youtubePlayer:not(iframe) {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: #ffe78c;
  font-size: 4rem;
}

.now-playing {
  padding: .7rem 0;
  text-align: center;
}

.now-playing small,
.now-playing strong,
.now-playing span {
  display: block;
}

.player-progress {
  margin: 0 0 .75rem;
}

.player-progress input {
  width: 100%;
  accent-color: #ff78c7;
  cursor: pointer;
}

.player-progress > div {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, .76);
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
}

.now-playing strong {
  color: #ffe78c;
}

.now-playing span {
  color: rgba(255, 255, 255, .72);
  font-size: .82rem;
}

.player-controls {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .4rem;
  margin-bottom: .75rem;
}

.player-controls button {
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  font-weight: 900;
}

.player-controls .primary-control {
  color: #362367;
  background: #fff;
}

.track-list {
  max-height: 238px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
}

.track-option {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: .5rem;
  width: 100%;
  padding: .58rem .7rem;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  background: transparent;
  text-align: left;
}

.track-option.active {
  background: rgba(255, 79, 184, .42);
}

.track-option > span {
  color: #ffe78c;
  font-weight: 900;
}

.track-option small {
  color: rgba(255, 255, 255, .68);
}

.sound-log-form {
  margin-top: .85rem;
}

.listening-status {
  margin: .85rem 0 0;
  padding: .65rem .75rem;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  color: #fff;
  background: rgba(11, 18, 55, .25);
  font-size: .8rem;
  text-align: center;
}

.listening-status span {
  color: #54e6b8;
}

.compact-journal {
  min-height: 100px;
}

.writing-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-top: 1rem;
}

.writing-actions .choice-button span {
  display: block;
}

#reflectionForm {
  transition: opacity .8s ease, transform .8s ease, filter .8s ease;
}

#reflectionForm.letting-go {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(-24px) rotate(-1deg);
}

.mindtalk-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin-top: .75rem;
}

.mindtalk-identity {
  display: grid;
  grid-template-columns: 52px 1fr 38px;
  gap: .65rem;
  align-items: center;
  margin-bottom: .75rem;
}

.mindtalk-identity strong,
.mindtalk-identity small {
  display: block;
}

.mindtalk-identity small {
  color: rgba(255, 255, 255, .7);
  font-size: .76rem;
}

.mindtalk-identity .lumi-avatar {
  margin: 0;
  width: 52px;
  height: 52px;
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(255, 234, 160, .58);
}

.mindtalk-identity > button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .13);
  font-size: 1.2rem;
}

.chat-status {
  min-height: 1.35rem;
  padding-top: .25rem;
  color: #d8d2ff;
  font-size: .76rem;
}

.chat-bubble.bot.crisis {
  border: 1px solid #ffb4c4;
  color: #fff;
  background: rgba(158, 22, 61, .78);
  white-space: pre-line;
}

.chat-bubble.bot.error {
  border: 1px solid #ffd9a8;
  background: rgba(130, 82, 24, .66);
}

.chat-bubble.bot {
  white-space: pre-line;
}

.mindtalk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  min-height: 0;
  margin-top: .65rem;
}

.mindtalk-action {
  padding: .5rem .7rem;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
}

.mindtalk-action:hover,
.mindtalk-action:focus-visible {
  color: #31245c;
  background: #fff;
}

.mindtalk-action.action-emergency,
.mindtalk-action.action-hotline {
  border-color: #ffd0da;
  background: #a91644;
}

.mindtalk-action.action-save {
  border-color: #b5f3df;
  background: #257c68;
}

.mindtalk-action.action-save.is-saved {
  color: #195a49;
  background: #dbfff3;
}

.stress-monster-guide-visual {
  margin: 1rem 0 0;
  overflow: hidden;
  border: 1px solid #e1d4ee;
  border-radius: 8px;
  background: #251d5b;
}

.stress-monster-guide-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.stress-monster-guide-visual figcaption {
  padding: .7rem 1rem;
  color: #514663;
  background: #fff;
  font-size: .82rem;
  text-align: center;
}

.privacy-note {
  margin: .6rem 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: .76rem;
  text-align: center;
}

.healing-safety-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
  padding: .85rem;
  border: 1px solid #e4d9ee;
  border-radius: 8px;
  background: #fff;
}

.healing-safety-strip > * {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0 .55rem;
  align-items: center;
  min-width: 0;
  padding: .6rem;
  border: 0;
  border-radius: 8px;
  color: #3d3153;
  background: #f8f5fb;
  text-align: left;
  text-decoration: none;
}

.healing-safety-strip > * > span {
  grid-row: span 2;
  font-size: 1.8rem;
}

.healing-safety-strip small {
  color: #776e83;
  overflow-wrap: anywhere;
}

.healing-safety-strip .hotline-link {
  color: #8d173b;
  background: #fff0f3;
}

.breathing-modal-content {
  border: 0;
  border-radius: 8px;
  background: #f7f3ff;
}

.breathing-circle {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin: .5rem auto 1.4rem;
  border: 10px solid #c9bbff;
  border-radius: 50%;
  color: #fff;
  background: #6c55c9;
  transition: transform 4s ease, background-color .4s ease;
  font-size: 1.2rem;
  font-weight: 900;
}

.breathing-circle.inhale {
  background: #3eb7c8;
  transform: scale(1.16);
}

.breathing-circle.exhale {
  background: #7954bd;
  transform: scale(.86);
  transition-duration: 6s;
}

.growth-page {
  max-width: 1200px;
}

.usage-progress-panel {
  margin-bottom: 1rem;
  overflow: hidden;
}

.usage-progress-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}

.usage-progress-heading h3,
.usage-progress-heading p {
  margin: 0;
}

.usage-progress-heading p {
  margin-top: .35rem;
  color: #6f6478;
}

.usage-day-total {
  min-width: 150px;
  color: #5d4676;
  text-align: right;
}

.usage-day-total small,
.usage-day-total strong,
.usage-day-total span {
  display: block;
}

.usage-day-total strong {
  color: #d01782;
  font-size: 2rem;
  line-height: 1.1;
}

.usage-day-total span {
  margin-top: .15rem;
  font-size: .78rem;
}

.usage-stage-scroll {
  margin-top: 1.2rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.usage-stage-track {
  display: grid;
  grid-template-columns: repeat(7, minmax(84px, 1fr));
  min-width: 680px;
  gap: .65rem;
}

.usage-stage {
  position: relative;
  min-width: 0;
  color: #766b80;
  text-align: center;
}

.usage-stage::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: 21px;
  left: calc(50% + 25px);
  width: calc(100% - 37px);
  height: 3px;
  border-radius: 999px;
  background: #ded8e8;
}

.usage-stage:last-child::after {
  display: none;
}

.usage-stage > span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto .45rem;
  border: 3px solid #ded8e8;
  border-radius: 50%;
  color: #81768c;
  background: #fff;
  font-weight: 900;
}

.usage-stage strong,
.usage-stage small {
  display: block;
}

.usage-stage small {
  margin-top: .15rem;
  font-size: .72rem;
}

.usage-stage.completed > span {
  border-color: #48a47e;
  color: #fff;
  background: #48a47e;
}

.usage-stage.completed::after {
  background: #78c6a5;
}

.usage-stage.current > span {
  border-color: #ff4fb8;
  background: #ff4fb8;
  box-shadow: 0 0 0 6px rgba(255, 79, 184, .14);
}

.usage-stage.current strong {
  color: #a31273;
}

.usage-progress-meter {
  height: 8px;
  margin-top: 1rem;
  border-radius: 999px;
  background: #eee8f5;
  overflow: hidden;
}

.usage-progress-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #48a47e, #ff4fb8, #7044b1);
}

.usage-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .45rem;
  color: #786d81;
  font-size: .76rem;
}

.growth-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.growth-stats > div {
  display: grid;
  grid-template-columns: 44px 1fr;
  padding: .85rem;
  border: 1px solid #e5d9ed;
  border-radius: 8px;
  background: #fff;
}

.growth-stats span {
  grid-row: span 2;
  align-self: center;
  font-size: 1.8rem;
}

.growth-stats strong {
  color: #89126a;
  font-size: 1.6rem;
}

.growth-stats small {
  color: #6f6478;
}

.chart-shell {
  position: relative;
  height: 330px;
}

.research-score-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: .5rem;
  align-items: center;
  margin: 1rem 0;
}

.research-score-row > div {
  padding: .8rem;
  border-radius: 8px;
  background: #f4f0fa;
  text-align: center;
}

.research-score-row small,
.research-score-row strong,
.research-score-row span {
  display: block;
}

.research-score-row strong {
  color: #d01782;
  font-size: 2.2rem;
}

.research-score-row span {
  color: #776d80;
  font-size: .78rem;
}

.research-difference {
  padding: .7rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 900;
}

.research-difference.improved { color: #126b4b; background: #e2f9ee; }
.research-difference.increased { color: #a22a49; background: #fff0f3; }

.monster-evolution {
  margin: 1rem 0;
}

.monster-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 1rem 0;
}

.monster-stage {
  text-align: center;
}

.monster-stage span,
.monster-stage strong,
.monster-stage small {
  display: block;
}

.monster-stage-portrait {
  width: 110px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 auto .45rem;
  border: 1px solid #e4d8ec;
  border-radius: 50%;
  background-image: url('../../uploads/illustrations/stress-monster-guide.png');
  background-repeat: no-repeat;
  background-position: var(--monster-x, 1%) 48%;
  background-size: 400% auto;
  box-shadow: 0 8px 18px rgba(72, 43, 106, .14);
}

.monster-stage span {
  font-size: 3.3rem;
}

.monster-stage strong {
  color: #8f0b65;
}

.lower-growth-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
}

.gratitude-list {
  max-height: 520px;
  overflow-y: auto;
}

.gratitude-list article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: .6rem;
  padding: .8rem 0;
  border-bottom: 1px solid #f0dfeb;
}

.gratitude-list p {
  margin: .25rem 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.gratitude-list time {
  color: #867b8e;
  font-size: .76rem;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.milestone-badge {
  min-height: 135px;
  padding: .75rem;
  border: 1px solid #e8dff0;
  border-radius: 8px;
  background: #faf8fc;
  text-align: center;
}

.milestone-badge span,
.milestone-badge strong,
.milestone-badge small {
  display: block;
}

.milestone-badge span {
  font-size: 2rem;
}

.milestone-badge small {
  color: #756b7d;
}

.milestone-badge.earned {
  border-color: #e6c25c;
  background: #fff9df;
}

.milestone-badge.locked {
  opacity: .65;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  text-align: center;
}

.empty-state > span {
  font-size: 3rem;
}

.empty-state.compact {
  min-height: 220px;
}

.emergency-haven {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #efb8c5;
  border-radius: 8px;
  background: #fff1f4;
}

.emergency-haven > div {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.emergency-haven > div > span {
  font-size: 2.5rem;
}

.emergency-haven h3,
.emergency-haven p {
  margin: 0;
}

.night-mode {
  --text: #f4effb;
  color: var(--text);
  background: #10142f;
}

.night-mode .site-title,
.night-mode .dashboard-welcome h2,
.night-mode .assessment-header h2,
.night-mode .healing-heading h2,
.night-mode .growth-heading h2,
.night-mode .section-title-row h3,
.night-mode .vibe-panel h3,
.night-mode .growth-panel h3,
.night-mode .assessment-question legend,
.night-mode .wellbeing-summary h3 {
  color: #f3dfff;
}

.night-mode .dashboard-welcome p,
.night-mode .assessment-header p,
.night-mode .healing-heading p,
.night-mode .growth-heading p {
  color: #c7bfd7;
}

.night-mode .vibe-panel,
.night-mode .growth-panel,
.night-mode .login-invitation,
.night-mode .assessment-form,
.night-mode .assessment-result,
.night-mode .assessment-locked,
.night-mode .growth-stats > div,
.night-mode .assessment-type-tabs a,
.night-mode .spst-instructions,
.night-mode .latest-stress-chip,
.night-mode .healing-safety-strip {
  border-color: #393c70;
  color: #f4effb;
  background: #1b204a;
}

.night-mode .spst-instructions p {
  color: #c7bfd7;
}

.night-mode .answer-not-occurred > span {
  border-color: #444a7b;
  color: #e8e2f3;
  background: #242a59;
}

.night-mode .form-control,
.night-mode .form-select {
  border-color: #4a4f82;
  color: #fff;
  background: #202653;
}

.night-mode .form-control::placeholder {
  color: #a9a5bd;
}

.night-mode .mood-option,
.night-mode .answer-scale label span,
.night-mode .research-score-row > div,
.night-mode .milestone-badge,
.night-mode .healing-safety-strip > * {
  border-color: #444a7b;
  color: #e8e2f3;
  background: #242a59;
}

.night-mode .module-link {
  color: #f1ebfa;
  background: #202650;
  border-color: #3e477e;
}

.night-mode .module-link p,
.night-mode .track-option small {
  color: #bbb3ca;
}

.night-mode .wellbeing-summary {
  border-color: #365e78;
  color: #f1ecfa;
  background: #172d48;
}

.night-mode .mission-panel,
.night-mode .mission-panel.is-complete {
  background: #272752;
  border-color: #625a83;
}

.night-mode .mission-panel p {
  color: #d7cfdf;
}

.night-mode .usage-progress-heading p,
.night-mode .usage-progress-meta,
.night-mode .usage-day-total,
.night-mode .usage-stage {
  color: #c7bfd7;
}

.night-mode .usage-stage > span {
  border-color: #4a4f82;
  color: #d8d2e2;
  background: #202653;
}

.night-mode .usage-stage::after,
.night-mode .usage-progress-meter {
  background: #393c70;
}

@media (max-width: 1199px) {
  .theme-toggle {
    margin: .35rem 0;
  }
}

@media (max-width: 991px) {
  .dashboard-grid,
  .growth-grid,
  .lower-growth-grid {
    grid-template-columns: 1fr;
  }

  .module-links,
  .growth-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upgraded-stations .station-card {
    min-height: auto;
  }

  .healing-safety-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .dashboard-welcome,
  .assessment-header,
  .healing-heading,
  .growth-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .usage-progress-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .usage-day-total {
    text-align: left;
  }

  .dashboard-visual {
    width: 100%;
  }

  .mood-picker,
  .answer-scale {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mood-option:last-child,
  .answer-scale label:last-child {
    grid-column: span 2;
  }

  .wellbeing-summary {
    grid-template-columns: 1fr;
  }

  .assessment-type-tabs,
  .module-links {
    grid-template-columns: 1fr;
  }

  .spst-instructions {
    grid-template-columns: 1fr;
  }

  .assessment-result {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .result-monster-portrait {
    width: min(220px, 100%);
    margin-inline: auto;
  }

  .score-guide {
    grid-template-columns: repeat(2, 1fr);
  }

  .score-guide h3 {
    grid-column: 1 / -1;
    text-align: center;
  }

  .growth-stats,
  .badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monster-timeline {
    flex-wrap: wrap;
  }

  .emergency-haven {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .mood-picker,
  .answer-scale,
  .writing-actions,
  .mindtalk-tools,
  .growth-stats,
  .badge-grid,
  .healing-safety-strip {
    grid-template-columns: 1fr;
  }

  .spst-scale-summary {
    grid-template-columns: 1fr;
  }

  .mood-option:last-child,
  .answer-scale label:last-child {
    grid-column: auto;
  }

  .section-title-row,
  .assessment-navigation {
    align-items: stretch;
    flex-direction: column;
  }

  .assessment-navigation .btn {
    width: 100%;
  }

  .track-option {
    grid-template-columns: 28px 1fr;
  }

  .track-option small {
    grid-column: 2;
  }

  .site-brand-name {
    font-size: 1.9rem;
  }

  .mindtalk-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Cohesive generated illustration set */
.dashboard-visual,
.assessment-feature-visual,
.section-feature-banner,
.auth-visual {
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 8px;
  background: #f9eef8;
  box-shadow: 0 16px 32px rgba(58, 32, 113, .18);
}

.dashboard-visual {
  width: min(36%, 390px);
  height: auto;
  aspect-ratio: 4 / 3;
  object-position: center 42%;
}

.assessment-feature-visual {
  flex: 0 0 clamp(160px, 19vw, 220px);
  width: clamp(160px, 19vw, 220px);
  aspect-ratio: 1;
  margin: 0;
}

.assessment-feature-visual img,
.section-feature-banner img,
.auth-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-feature-banner {
  width: 100%;
  margin: 0 0 1.25rem;
}

.healing-feature-banner {
  aspect-ratio: 15 / 6;
}

.healing-feature-banner img {
  object-position: center 62%;
}

.growth-feature-banner {
  aspect-ratio: 15 / 5;
}

.growth-feature-banner img {
  object-position: center 59%;
}

.auth-page {
  display: block;
  padding: 2rem 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.1fr);
  align-items: stretch;
  width: min(100%, 1080px);
  margin: 0 auto;
  gap: 1rem;
}

.auth-visual {
  min-height: 100%;
  margin: 0;
}

.auth-visual img {
  object-position: center;
}

.auth-card {
  display: flex;
  width: 100%;
  border-radius: 8px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.35rem, 3vw, 2.25rem);
}

.night-mode .assessment-feature-visual,
.night-mode .section-feature-banner,
.night-mode .auth-visual {
  border-color: #4a4f82;
  background: #202653;
}

@media (max-width: 991px) {
  .auth-layout {
    grid-template-columns: minmax(260px, .75fr) minmax(380px, 1.25fr);
  }
}

@media (max-width: 767px) {
  .dashboard-visual {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-position: center 43%;
  }

  .assessment-feature-visual {
    width: 100%;
    aspect-ratio: 16 / 8;
  }

  .assessment-feature-visual img {
    object-position: center 43%;
  }

  .healing-feature-banner,
  .growth-feature-banner {
    aspect-ratio: 4 / 3;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    aspect-ratio: 16 / 8;
  }

  .auth-visual img {
    object-position: center 36%;
  }
}

@media (max-width: 480px) {
  .assessment-feature-visual,
  .auth-visual {
    aspect-ratio: 4 / 3;
  }

  .section-feature-banner {
    border-width: 2px;
  }
}

/* Database installer */
.installer-shell {
  max-width: 960px;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.installer-shell .sticker {
  display: inline-grid;
  width: 64px;
  height: 64px;
  margin-bottom: .75rem;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  place-items: center;
  font-size: 2rem;
  background: #fff2fa;
  box-shadow: 0 9px 24px rgba(214, 51, 132, .18);
}

.installer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 1.5rem 0;
}

.installer-summary > div {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(214, 51, 132, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .75);
}

.installer-summary span,
.installer-summary small {
  display: block;
  color: #6d5870;
}

.installer-summary strong {
  display: block;
  overflow-wrap: anywhere;
  margin: .15rem 0;
  color: #8f2363;
  font-size: 1.15rem;
}

.installer-heading {
  margin: 1.6rem 0 .75rem;
  font-size: 1.25rem;
}

.installer-table code {
  color: #71205a;
  font-size: .92rem;
}

.install-status {
  display: inline-block;
  padding: .2rem .55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 700;
  white-space: nowrap;
}

.install-status.created {
  border-color: #98d7bd;
  color: #126746;
  background: #e5f8ef;
}

.install-status.existing {
  border-color: #d8b7e8;
  color: #66307c;
  background: #f4eafa;
}

.installer-accounts {
  display: grid;
  gap: .65rem;
}

.installer-accounts > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
  border: 1px solid rgba(214, 51, 132, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .68);
}

.installer-help {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid #edbfd2;
  border-radius: 8px;
  background: #fff5f8;
}

.installer-help h2 {
  font-size: 1.2rem;
}

@media (max-width: 767px) {
  .installer-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .installer-accounts > div {
    align-items: flex-start;
    flex-direction: column;
  }
}
