:root {
  color-scheme: light;
  font-family: "Avenir Next Rounded", "Nunito", "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #20362f;
  --muted: #63736d;
  --soft-muted: #91a09b;
  --bg: #f7f1e6;
  --panel: rgba(255, 254, 249, 0.9);
  --line: rgba(64, 89, 80, 0.13);
  --teal: #2f8f83;
  --teal-dark: #1f675f;
  --orange: #ef6a3a;
  --yellow: #ffd260;
  --red: #f59ba0;
  --blue: #79d7e8;
  --green: #a6df74;
  --paper: #fffdf7;
  --crayon: #ffefe2;
  --shadow: 0 22px 48px rgba(74, 57, 32, 0.12);
  --soft-shadow: 0 12px 30px rgba(74, 57, 32, 0.09);
  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --spring: cubic-bezier(0.2, 0.8, 0.2, 1);
  --noise: url("data:image/svg+xml;utf8,<svg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.25 0 0 0 0 0.18 0 0 0 0 0.10 0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Kid garden visual refresh, inspired by playful learning apps. */
:root {
  --leaf: #59cf4f;
  --leaf-dark: #2fa640;
  --action-green: #59cf4f;
  --action-green-dark: #2fa640;
  --action-green-deep: #1d7d35;
  --action-green-soft: #eaffc9;
  --leaf-soft: #eaffc9;
  --mint: #dffbdc;
  --cream: #fffdf1;
  --cream-2: #fbf8df;
  --brown: #6d421f;
  --candy-red: #ff6655;
  --candy-orange: #ff9d30;
  --candy-purple: #8f78f6;
  --sky: #75d7ff;
  --game-shadow: 0 7px 0 rgba(72, 141, 45, 0.2), 0 18px 34px rgba(66, 120, 48, 0.14);
}

body {
  background:
    radial-gradient(circle at 14% 9%, rgba(213, 255, 146, 0.92) 0 11%, transparent 32%),
    radial-gradient(circle at 88% 5%, rgba(139, 226, 92, 0.52) 0 16%, transparent 38%),
    linear-gradient(180deg, #f7fff0 0%, #fbfae7 48%, #eff9dc 100%);
  background-size: auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 78%, rgba(109, 207, 89, 0.22) 0 7%, transparent 18%),
    radial-gradient(circle at 95% 34%, rgba(255, 224, 100, 0.22) 0 5%, transparent 17%),
    linear-gradient(120deg, transparent 0 78%, rgba(112, 218, 91, 0.12) 78% 100%);
}

.app-shell {
  background:
    radial-gradient(circle at 80% 7%, rgba(169, 246, 111, 0.42) 0 10%, transparent 27%),
    radial-gradient(circle at 12% 20%, rgba(255, 246, 161, 0.78) 0 8%, transparent 25%),
    linear-gradient(180deg, #f4ffe9 0%, #fffdf0 43%, #f2f8df 100%);
  box-shadow: 0 0 0 1px rgba(68, 151, 61, 0.12), 0 24px 70px rgba(61, 105, 48, 0.18);
}

.app-shell::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -74px;
  height: 168px;
  z-index: 0;
  pointer-events: none;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.65) 0 8px, transparent 9px),
    radial-gradient(circle at 66% 26%, rgba(255, 255, 255, 0.55) 0 7px, transparent 8px),
    linear-gradient(180deg, #b7ef70 0%, #62cb48 78%);
  opacity: 0.38;
}

.topbar {
  min-height: 78px;
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(123, 220, 103, 0.88), rgba(104, 211, 86, 0.86));
  box-shadow: 0 8px 0 rgba(57, 152, 54, 0.1);
}

.brand {
  border-radius: 22px;
  padding: 8px 12px 8px 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 22px rgba(43, 122, 70, 0.14);
}

.brand-mark {
  border-radius: 18px;
  background-color: #fff9d7;
  box-shadow: 0 5px 0 rgba(44, 139, 62, 0.16), 0 10px 18px rgba(40, 126, 58, 0.18);
}

.brand-title {
  color: #167a35;
  font-size: 22px;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.65);
}

.brand-subtitle {
  color: rgba(42, 82, 39, 0.72);
  font-weight: 800;
}

.screen {
  isolation: isolate;
}

.app-hero-visual {
  padding: 0;
  border: 0;
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent), #dffbdc;
  box-shadow: 0 9px 0 rgba(78, 166, 58, 0.13), 0 24px 48px rgba(64, 132, 55, 0.16);
}

.app-hero-visual::before {
  inset: auto 26px 20px;
  height: 12px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: linear-gradient(90deg, #9bed5c 0 56%, rgba(255, 255, 255, 0.35) 56% 100%);
  box-shadow: 0 2px 0 rgba(74, 145, 56, 0.16);
}

.app-hero img {
  aspect-ratio: 16 / 10;
  border-radius: 36px;
  box-shadow: none;
}

.hero-sticker {
  border: 2px solid rgba(255, 255, 255, 0.78);
  color: #4d2e17;
  background: linear-gradient(180deg, #ffe477, #ffc64f);
  box-shadow: 0 6px 0 rgba(209, 143, 29, 0.18), 0 14px 22px rgba(95, 83, 38, 0.12);
}

.sticker-two {
  color: #fff;
  background: linear-gradient(180deg, #83e87a, #4ece51);
}

.hero-eyebrow,
.daily-topic-badge {
  color: #297f31;
  background: linear-gradient(180deg, #edffd2, #d8f6a4);
  border: 1px solid rgba(97, 186, 74, 0.2);
  box-shadow: 0 4px 0 rgba(95, 174, 61, 0.12);
}

.app-hero h1,
.app-welcome h2 {
  color: #226b30;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.78);
}

.app-hero p,
.app-welcome p,
.section-head p {
  color: #657064;
}

.panel,
.auth-card,
.topic-card,
.map-card,
.timeline-item,
.compare-card,
.profile-stats div {
  border: 0;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 0 rgba(191, 198, 143, 0.28), 0 20px 34px rgba(99, 126, 75, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.auth-card {
  border-radius: 34px;
  padding: 22px;
}

.tabs {
  padding: 6px;
  background: #e9eee7;
  box-shadow: inset 0 4px 8px rgba(70, 101, 61, 0.1);
}

.tab {
  min-height: 48px;
  color: #6a716a;
}

.tab.active {
  color: #278638;
  background: #fff;
  box-shadow: 0 6px 0 rgba(160, 171, 142, 0.16), 0 14px 22px rgba(96, 112, 78, 0.12);
}

.field label {
  color: #5a695a;
  font-weight: 900;
}

.field input,
.field select,
.quick-input input {
  border: 2px solid rgba(64, 108, 57, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.82), 0 4px 0 rgba(196, 204, 170, 0.16);
}

.field input:focus,
.field select:focus {
  border-color: rgba(89, 207, 79, 0.72);
  box-shadow: 0 0 0 5px rgba(130, 226, 98, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.92);
}

.btn {
  border-radius: 22px;
  box-shadow: 0 5px 0 rgba(86, 110, 67, 0.14), 0 14px 24px rgba(88, 115, 70, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 rgba(86, 110, 67, 0.13), 0 18px 28px rgba(88, 115, 70, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.btn.primary {
  color: #fff;
  background: linear-gradient(180deg, #72e86a 0%, var(--action-green) 100%);
  box-shadow: 0 7px 0 var(--action-green-dark), 0 16px 28px rgba(73, 184, 52, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.btn.yellow {
  color: var(--action-green-deep);
  background: linear-gradient(180deg, #f0ffd8, #c9f78b);
  box-shadow: 0 6px 0 rgba(72, 166, 55, 0.32), 0 14px 24px rgba(85, 164, 52, 0.18);
}

.btn.danger {
  color: #8e3a37;
  background: linear-gradient(180deg, #ffe9eb, #ffd7dc);
  box-shadow: 0 5px 0 rgba(210, 116, 123, 0.18), 0 12px 20px rgba(130, 60, 64, 0.08);
}

.app-welcome {
  border: 0;
  border-radius: 34px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 228, 97, 0.82) 0 33px, transparent 34px),
    radial-gradient(circle at 92% 64%, rgba(117, 215, 255, 0.42) 0 28px, transparent 29px),
    linear-gradient(135deg, #edffd7 0%, #ffffff 58%, #fff5c6 100%);
  box-shadow: 0 8px 0 rgba(75, 160, 58, 0.13), 0 24px 42px rgba(73, 122, 57, 0.14);
}

.app-welcome::after {
  right: 18px;
  top: 16px;
  width: 64px;
  height: 64px;
  border-radius: 22px 22px 28px 28px;
  background:
    radial-gradient(circle at 50% 36%, #fff 0 7px, transparent 8px),
    radial-gradient(circle at 38% 48%, #24492f 0 3px, transparent 4px),
    radial-gradient(circle at 62% 48%, #24492f 0 3px, transparent 4px),
    radial-gradient(ellipse at 50% 65%, #ff9d30 0 10px, transparent 11px),
    linear-gradient(180deg, #ffd84d, #ffae33);
  box-shadow: 0 7px 0 rgba(194, 129, 23, 0.2), 0 16px 24px rgba(111, 88, 38, 0.12);
  transform: rotate(7deg);
}

.app-welcome::before {
  content: "";
  position: absolute;
  right: 88px;
  top: 28px;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: #75d7ff;
  transform: rotate(16deg);
  box-shadow: -74px 90px 0 #ffd55b, -40px 28px 0 #ff9da0;
}

.section-head h2 {
  color: #2a5d2d;
  font-size: 25px;
}

.topic-grid,
.map-grid {
  margin-top: 12px;
}

.topic-card,
.map-card {
  min-height: 132px;
  padding: 20px 48px 18px 20px;
  border-radius: 28px;
  overflow: visible;
}

.topic-card {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 222, 92, 0.48) 0 42px, transparent 43px),
    linear-gradient(180deg, #ffffff, #f8fff0);
}

.topic-card:nth-child(2n) {
  background:
    radial-gradient(circle at 100% 0, rgba(117, 215, 255, 0.45) 0 42px, transparent 43px),
    linear-gradient(180deg, #ffffff, #f0fbff);
}

.topic-card:nth-child(3n) {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 157, 159, 0.38) 0 42px, transparent 43px),
    linear-gradient(180deg, #ffffff, #fff5f5);
}

.quest-pin {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #83e87a, #45c843);
  box-shadow: 0 5px 0 #2ea53f, 0 10px 18px rgba(67, 157, 55, 0.2);
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
}

.topic-card .quest-pin,
.map-card .quest-pin {
  position: absolute;
  left: 18px;
  top: -14px;
}

.topic-card em {
  margin-left: 48px;
  color: #fff;
  background: linear-gradient(180deg, #ff815f, #ff5f4a);
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(181, 74, 43, 0.18);
}

.topic-card strong,
.map-card strong,
.timeline-item strong {
  color: #26382c;
}

.topic-card::after,
.map-card::after,
.profile-row-field::after {
  color: rgba(65, 168, 54, 0.5);
}

.map-card {
  background:
    radial-gradient(circle at 100% 0, rgba(143, 120, 246, 0.2) 0 48px, transparent 49px),
    linear-gradient(180deg, #ffffff, #fbfff2);
}

.map-card .quest-pin {
  background: linear-gradient(180deg, #ffdc64, #ff9d30);
  box-shadow: 0 5px 0 #d88522, 0 10px 18px rgba(209, 133, 34, 0.2);
}

.timeline-item {
  grid-template-columns: 64px 1fr;
  border-radius: 28px;
}

.timeline-dot {
  width: 38px;
  height: 38px;
  margin: 19px 0 0 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff7bd 0 8px, transparent 9px),
    linear-gradient(180deg, #82ea78, #45c843);
  box-shadow: 0 4px 0 #2fa640, 0 12px 18px rgba(68, 147, 54, 0.14);
}

.compare-card {
  background:
    radial-gradient(circle at 96% 8%, rgba(255, 224, 93, 0.56) 0 30px, transparent 31px),
    linear-gradient(180deg, #fff, #fbfff2);
}

.dimension-chips span.hit,
.peer-rank span.me {
  color: #257d31;
  background: #e7ffd0;
}

.score-bars div {
  background: #eef4e6;
  box-shadow: inset 0 2px 0 rgba(105, 126, 86, 0.08);
}

.score-bars i {
  background: linear-gradient(90deg, #ffe478, #ffb23e);
}

.score-bars div:nth-child(2) i {
  background: linear-gradient(90deg, #83e87a, #43ca41);
}

.profile-card {
  border-radius: 34px;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 224, 91, 0.55) 0 54px, transparent 55px),
    linear-gradient(180deg, #ffffff, #f7ffe9);
}

.profile-avatar {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #f3ffdc 0 10px, transparent 11px),
    radial-gradient(circle at 38% 54%, #24492f 0 3px, transparent 4px),
    radial-gradient(circle at 62% 54%, #24492f 0 3px, transparent 4px),
    linear-gradient(180deg, #9af174, var(--action-green));
  box-shadow: 0 6px 0 var(--action-green-dark), 0 16px 26px rgba(73, 184, 52, 0.22);
}

.profile-points {
  border-radius: 26px;
  background: linear-gradient(180deg, #76e86c, var(--action-green-dark));
  box-shadow: 0 6px 0 var(--action-green-deep), 0 16px 26px rgba(73, 184, 52, 0.24);
}

.profile-form-card,
.profile-password-card,
.settings-list,
.privacy-card,
.invite-card,
.profile-actions {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
}

.profile-form-card .field input,
.profile-form-card .field select,
.profile-password-card .field input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.settings-toolbar h2 {
  color: #1f2d22;
}

.settings-back-btn,
.editor-back-btn {
  border-radius: 20px;
}

.settings-row::after {
  color: rgba(64, 168, 58, 0.48);
}

.map-workspace {
  border: 0;
  background:
    linear-gradient(rgba(91, 179, 79, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 179, 79, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 50% 100%, rgba(180, 238, 111, 0.24), transparent 55%),
    #fffef7;
  background-size: 36px 36px, 36px 36px, auto, auto;
  box-shadow: 0 8px 0 rgba(129, 173, 91, 0.14), 0 24px 42px rgba(82, 112, 61, 0.13), inset 0 0 0 1px rgba(98, 170, 73, 0.12);
}

.connector-layer path {
  stroke: rgba(52, 158, 67, 0.48);
  stroke-width: 7;
}

.zoom-badge {
  border: 0;
  color: #24762c;
  background: #fff;
  box-shadow: 0 5px 0 rgba(148, 157, 128, 0.2), 0 12px 18px rgba(93, 118, 75, 0.12);
}

.node {
  border: 0;
  border-radius: 21px;
  box-shadow: 0 7px 0 rgba(64, 104, 50, 0.16), 0 17px 28px rgba(64, 104, 50, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.node.center {
  background: #fff !important;
  box-shadow: 0 7px 0 rgba(143, 158, 126, 0.18), 0 18px 28px rgba(64, 104, 50, 0.14), inset 0 0 0 2px rgba(89, 207, 79, 0.18);
}

.node.active-node {
  box-shadow: 0 0 0 5px rgba(255, 219, 85, 0.45), 0 0 28px rgba(255, 202, 55, 0.64), 0 7px 0 rgba(207, 151, 27, 0.22), 0 18px 32px rgba(126, 99, 31, 0.18);
}

.node-collapse {
  border: 0;
  color: #24762c;
  background: #fff;
  box-shadow: 0 4px 0 rgba(117, 137, 100, 0.18), 0 12px 18px rgba(94, 119, 77, 0.15);
}

.node-action-panel {
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 7px 0 rgba(143, 158, 126, 0.18), 0 22px 34px rgba(70, 91, 58, 0.2);
}

.node-action.speak {
  background: linear-gradient(180deg, #62dd55, #42c936);
  box-shadow: 0 6px 0 #2fa640, 0 13px 20px rgba(73, 184, 52, 0.22);
}

.node-action-panel.voice-listening .node-action.speak {
  background: linear-gradient(180deg, #7ce872, var(--action-green-dark));
  box-shadow: 0 6px 0 var(--action-green-deep), 0 13px 20px rgba(73, 184, 52, 0.22);
}

.node-action-panel.voice-recognizing .node-action.speak {
  background: linear-gradient(180deg, #63d965, #2f8f83);
  box-shadow: 0 6px 0 #24766c, 0 13px 20px rgba(47, 143, 131, 0.22);
}

.prompt-card {
  border: 0;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 224, 91, 0.5) 0 45px, transparent 46px),
    linear-gradient(180deg, #fff, #f7ffe9);
  box-shadow: 0 6px 0 rgba(191, 198, 143, 0.22), 0 18px 30px rgba(99, 126, 75, 0.11);
}

.prompt-item {
  border: 2px solid rgba(78, 128, 68, 0.12);
  background: #fff;
  box-shadow: 0 3px 0 rgba(148, 157, 128, 0.1);
}

.prompt-item.active {
  border-color: rgba(65, 200, 61, 0.78);
  background: #efffda;
  box-shadow: 0 4px 0 rgba(72, 166, 55, 0.18);
}

.bottom-nav {
  gap: 7px;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 7px 0 rgba(142, 151, 123, 0.16), 0 20px 42px rgba(70, 91, 58, 0.18);
}

.bottom-nav-item {
  color: #4d5f50;
}

.bottom-nav-item.active {
  color: #fff;
  background: linear-gradient(180deg, #72e86a, var(--action-green));
  box-shadow: 0 5px 0 var(--action-green-dark), 0 14px 22px rgba(73, 184, 52, 0.18);
}

.modal-backdrop {
  background: rgba(22, 43, 22, 0.42);
  backdrop-filter: blur(6px);
}

.modal {
  border-radius: 34px;
  background: #fffef7;
}

@media (min-width: 1024px) {
  .app-shell {
    border-radius: 38px;
  }

  .auth-layout {
    align-items: center;
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 82px;
  }

  .brand {
    max-width: 100%;
  }

  .app-hero-visual {
    margin-inline: -4px;
  }

  .app-hero h1 {
    font-size: 38px;
  }

  .topic-card,
  .map-card {
    min-height: 124px;
  }

  .node-action-panel {
    right: 12px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    var(--noise),
    linear-gradient(90deg, rgba(47, 143, 131, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(47, 143, 131, 0.035) 1px, transparent 1px),
    #ebe5d8;
  background-size: auto, 36px 36px, 36px 36px, auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition: transform 180ms var(--spring), box-shadow 220ms var(--spring), background 220ms var(--spring), color 220ms var(--spring), border-color 220ms var(--spring);
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:active {
  transform: translateY(1px) scale(0.99);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(89, 207, 79, 0.58);
  outline-offset: 3px;
}

.app-shell {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(90deg, rgba(47, 143, 131, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(47, 143, 131, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #fbf3e8 0%, #f6f1e6 42%, #eee9dd 100%);
  background-size: 38px 38px, 38px 38px, auto;
  box-shadow: 0 0 0 1px rgba(65, 81, 73, 0.07), 0 28px 90px rgba(74, 57, 32, 0.18);
  position: relative;
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: var(--noise);
  opacity: 0.22;
  mix-blend-mode: multiply;
}

.topbar {
  min-height: 68px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(47, 143, 131, 0.12);
  background: rgba(255, 251, 241, 0.82);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px) saturate(1.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background-image: url("/assets/logo.svg");
  background-color: #fffdf1;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex: 0 0 auto;
  box-shadow: 0 3px 8px rgba(29, 125, 53, 0.12), var(--inner-light);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.screen {
  width: 100%;
  margin: 0 auto;
  padding: 18px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.logged-in .screen {
  padding-top: 26px;
  padding-bottom: 112px;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-content: start;
  min-height: calc(100vh - 68px);
}

.app-auth {
  padding-top: 14px;
}

.app-hero {
  display: grid;
  gap: 16px;
  animation: softEnter 520ms var(--spring) both;
}

.app-hero-visual {
  position: relative;
  padding: 10px;
  border-radius: 28px;
  background: rgba(255, 253, 247, 0.72);
  border: 1px solid rgba(47, 143, 131, 0.12);
  box-shadow: var(--shadow), var(--inner-light);
  overflow: hidden;
}

.app-hero-visual::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  border: 2px dashed rgba(255, 210, 96, 0.72);
  pointer-events: none;
}

.app-hero img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 14px 30px rgba(74, 57, 32, 0.1);
  display: block;
}

.hero-sticker {
  position: absolute;
  z-index: 2;
  padding: 7px 12px;
  border-radius: 15px;
  color: #23443b;
  background: #ffd260;
  box-shadow: 0 10px 20px rgba(74, 57, 32, 0.15);
  font-size: 13px;
  font-weight: 900;
}

.sticker-one {
  left: 22px;
  top: 20px;
  transform: rotate(-5deg);
}

.sticker-two {
  right: 20px;
  bottom: 22px;
  background: #79d7e8;
  transform: rotate(4deg);
}

.hero-eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(47, 143, 131, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.app-hero h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0;
  text-wrap: balance;
}

.app-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 17px;
}

.hero-panel {
  display: grid;
  gap: 24px;
}

.hero-panel img {
  width: 100%;
  border-radius: 28px;
  box-shadow: var(--shadow);
  display: block;
}

.hero-copy {
  display: grid;
  gap: 14px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.65;
  max-width: 760px;
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent 42%),
    var(--panel);
  border: 1px solid rgba(64, 89, 80, 0.1);
  border-radius: 28px;
  box-shadow: var(--soft-shadow), var(--inner-light);
  backdrop-filter: blur(12px);
}

.auth-card {
  padding: 22px;
  display: grid;
  gap: 18px;
  animation: softEnter 620ms var(--spring) 80ms both;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 5px;
  border-radius: 999px;
  background: rgba(68, 86, 77, 0.09);
  box-shadow: inset 0 1px 4px rgba(74, 57, 32, 0.08);
}

.tab {
  min-height: 44px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.tab.active {
  color: var(--teal-dark);
  background: var(--paper);
  box-shadow: 0 8px 18px rgba(74, 57, 32, 0.1), var(--inner-light);
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(64, 89, 80, 0.14);
  border-radius: 16px;
  padding: 0 14px;
  font-size: 16px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transition: border-color 180ms var(--spring), box-shadow 180ms var(--spring), background 180ms var(--spring);
}

.field input:focus,
.field select:focus {
  border-color: rgba(47, 143, 131, 0.5);
  background: #fffefa;
  box-shadow: 0 0 0 4px rgba(47, 143, 131, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.82);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 9px 18px rgba(74, 57, 32, 0.08), var(--inner-light);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 13px 24px rgba(74, 57, 32, 0.12), var(--inner-light);
}

.btn.primary {
  color: #fffdf8;
  background: linear-gradient(135deg, #77e66b 0%, var(--action-green) 52%, var(--action-green-dark) 100%);
  box-shadow: 0 16px 32px rgba(73, 184, 52, 0.24), var(--inner-light);
}

.btn.yellow {
  color: var(--action-green-deep);
  background: linear-gradient(135deg, #f4ffdf 0%, #d8f9a8 48%, #bff277 100%);
  box-shadow: 0 12px 24px rgba(88, 172, 54, 0.16), var(--inner-light);
}

.btn.ghost {
  background: rgba(255, 253, 247, 0.62);
  color: var(--teal-dark);
}

.btn.danger {
  color: #853636;
  background: #ffe5e6;
}

.btn.wide {
  width: 100%;
}

.hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.code-box {
  min-height: 40px;
  padding: 10px 12px;
  background: #fff8de;
  border: 1px dashed #d19b2d;
  border-radius: 16px;
  color: #6b4c0d;
  font-weight: 800;
}

.dashboard {
  display: grid;
  gap: 26px;
}

.app-main {
  align-content: start;
}

.app-welcome {
  padding: 24px 22px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 210, 96, 0.28), transparent 38%),
    linear-gradient(180deg, rgba(255, 254, 249, 0.96), rgba(255, 250, 239, 0.9));
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow), var(--inner-light);
  border: 1px solid rgba(64, 89, 80, 0.1);
  position: relative;
  overflow: hidden;
  animation: softEnter 520ms var(--spring) both;
}

.app-welcome::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.32) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.32) 1px, transparent 1px),
    #79d7e8;
  background-size: 12px 12px;
  transform: rotate(7deg);
  box-shadow: 0 14px 24px rgba(74, 57, 32, 0.11);
}

.app-welcome span {
  color: var(--soft-muted);
  font-weight: 900;
}

.app-welcome h2 {
  margin: 6px 0 0;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

.app-welcome p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px;
}

.section-head h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: 0;
}

.section-head p {
  margin: 7px 0 0;
  color: var(--soft-muted);
}

.daily-topic-badge {
  align-self: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(47, 143, 131, 0.1);
  border: 1px solid rgba(47, 143, 131, 0.12);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.topic-grid,
.map-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.topic-card,
.map-card {
  min-height: 98px;
  padding: 18px 48px 18px 18px;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(255, 210, 96, 0.22) 0 8px, transparent 8px),
    rgba(255, 254, 249, 0.92);
  border: 1px solid rgba(64, 89, 80, 0.1);
  box-shadow: var(--soft-shadow), var(--inner-light);
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.topic-card:nth-child(2n) {
  background:
    linear-gradient(90deg, rgba(121, 215, 232, 0.35) 0 8px, transparent 8px),
    rgba(255, 254, 249, 0.92);
}

.topic-card:nth-child(3n) {
  background:
    linear-gradient(90deg, rgba(166, 223, 116, 0.35) 0 8px, transparent 8px),
    rgba(255, 254, 249, 0.92);
}

.topic-card:hover,
.map-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(74, 57, 32, 0.12), var(--inner-light);
}

.topic-card em {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 12px;
  color: #f05a28;
  background: #fff0e9;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.topic-card::after,
.map-card::after,
.profile-row-field::after {
  content: "›";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(47, 143, 131, 0.38);
  font-size: 30px;
  font-weight: 500;
}

.topic-card strong,
.map-card strong {
  font-size: 20px;
  line-height: 1.3;
}

.topic-card span,
.map-card span {
  color: var(--soft-muted);
  font-size: 14px;
  line-height: 1.5;
}

.topic-card:last-child,
.map-card:last-child {
  border-bottom: 1px solid rgba(64, 89, 80, 0.1);
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 26px;
  background: rgba(255, 254, 249, 0.72);
  box-shadow: var(--inner-light);
}

.editor {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  min-height: calc(100vh - 150px);
}

.map-workspace {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background:
    var(--noise),
    linear-gradient(rgba(47, 143, 131, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 143, 131, 0.055) 1px, transparent 1px),
    #fffdf8;
  background-size: 34px 34px;
  border: 1px solid rgba(64, 89, 80, 0.11);
  border-radius: 30px;
  box-shadow: var(--shadow), var(--inner-light);
}

.map-zoom-stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: left top;
  transition: transform 180ms ease;
}

.connector-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.connector-layer path {
  fill: none;
  stroke: rgba(47, 143, 131, 0.42);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px rgba(255, 253, 248, 0.9));
}

.zoom-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 5;
  min-width: 54px;
  padding: 6px 10px;
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(47, 143, 131, 0.16);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.node {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  width: 180px;
  min-height: 94px;
  padding: 14px;
  border-radius: 20px;
  border: 3px solid rgba(35, 55, 52, 0.08);
  box-shadow: 0 12px 0 rgba(74, 57, 32, 0.07), 0 16px 28px rgba(74, 57, 32, 0.14), var(--inner-light);
  display: grid;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  align-content: start;
  transition: transform 180ms var(--spring), box-shadow 220ms var(--spring), border-color 180ms var(--spring);
}

.node::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  pointer-events: none;
}

.node:hover {
  transform: translate(-50%, -52%) rotate(-0.5deg);
}

.node.center {
  border-color: rgba(47, 143, 131, 0.28);
}

.node.active-node {
  border-color: #f5b82e;
  box-shadow: 0 0 0 5px rgba(245, 184, 46, 0.28), 0 0 28px rgba(245, 184, 46, 0.5), 0 14px 0 rgba(74, 57, 32, 0.06), 0 18px 32px rgba(74, 57, 32, 0.16);
}

.node-action-panel {
  position: fixed;
  right: max(14px, calc((100vw - 460px) / 2 + 14px));
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(64, 89, 80, 0.13);
  box-shadow: 0 18px 34px rgba(74, 57, 32, 0.16), var(--inner-light);
  backdrop-filter: blur(14px) saturate(1.08);
}

.node-action {
  width: 156px;
  min-height: 58px;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 900;
  touch-action: none;
  user-select: none;
}

.node-action.speak {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(135deg, #2f8f83, #1f675f);
  box-shadow: 0 11px 18px rgba(47, 143, 131, 0.22);
}

.voice-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.voice-copy {
  display: grid;
  gap: 2px;
  text-align: left;
  line-height: 1.15;
}

.voice-copy strong {
  font-size: 15px;
  white-space: nowrap;
}

.voice-copy small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  white-space: nowrap;
}

.node-action-panel.voice-listening .node-action.speak {
  background: linear-gradient(135deg, #7be86f, var(--action-green-dark));
  animation: voicePulse 1s infinite;
}

.node-action-panel.voice-listening .voice-icon {
  color: var(--action-green-dark);
}

.node-action-panel.voice-recognizing .node-action.speak {
  background: linear-gradient(135deg, #63d965, #2f8f83);
}

.node-action-panel.voice-recognizing .voice-icon {
  color: #2f8f83;
  animation: spin 0.85s linear infinite;
}

.node-action-panel.voice-success .node-action.speak {
  background: #2e9d77;
}

.node-action-panel.voice-success .voice-icon {
  color: #2e9d77;
}

.node-action.delete {
  color: #853636;
  background: #ffe5e6;
}

.node-action:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

@keyframes voicePulse {
  0% { box-shadow: 0 0 0 0 rgba(89, 207, 79, 0.34); }
  70% { box-shadow: 0 0 0 12px rgba(89, 207, 79, 0); }
  100% { box-shadow: 0 0 0 0 rgba(89, 207, 79, 0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.node-title {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 12;
}

.node small {
  color: rgba(35, 55, 52, 0.68);
  line-height: 1.4;
  overflow: hidden;
}

.node-collapse {
  position: absolute;
  right: -12px;
  bottom: 50%;
  transform: translateY(50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--teal-dark);
  background: #fffdf8;
  border: 2px solid rgba(64, 89, 80, 0.14);
  box-shadow: 0 7px 14px rgba(74, 57, 32, 0.15);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.side-panel {
  padding: 18px;
  display: grid;
  gap: 16px;
  align-content: start;
  order: -1;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.editor-back-btn {
  min-height: 38px;
  padding-inline: 10px 12px;
  border: 1px solid rgba(16, 20, 18, 0.06);
  background: #fff;
  box-shadow: 0 8px 18px rgba(39, 55, 52, 0.08);
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 900;
}

.editor-back-btn span[aria-hidden] {
  font-size: 18px;
  line-height: 1;
}

.editor-delete-map-btn {
  min-height: 38px;
  padding-inline: 12px;
  font-size: 14px;
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(382px, calc(100% - 28px));
  transform: translateX(-50%);
  z-index: 15;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(64, 89, 80, 0.1);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.88);
  backdrop-filter: blur(20px) saturate(1.08);
  box-shadow: 0 18px 46px rgba(74, 57, 32, 0.16), var(--inner-light);
}

.bottom-nav-item {
  min-height: 58px;
  border-radius: 999px;
  color: #40584f;
  background: transparent;
  display: grid;
  place-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 900;
}

.bottom-nav-item span {
  font-size: 23px;
  line-height: 1;
}

.bottom-nav-item strong {
  font-size: 12px;
}

.bottom-nav-item.active {
  color: #fffdf8;
  background: linear-gradient(135deg, #76e86c, var(--action-green) 56%, var(--action-green-dark));
  box-shadow: 0 10px 22px rgba(73, 184, 52, 0.22), var(--inner-light);
}

.timeline-list {
  display: grid;
  gap: 12px;
  padding: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 254, 249, 0.92);
  text-align: left;
  border: 1px solid rgba(64, 89, 80, 0.1);
  border-radius: 24px;
  box-shadow: var(--soft-shadow), var(--inner-light);
  overflow: hidden;
}

.timeline-item:last-child {
  border-bottom: 1px solid rgba(64, 89, 80, 0.1);
}

.timeline-item::before {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #c8c8c8;
  border-top: 2px solid #c8c8c8;
  transform: translateY(-50%) rotate(45deg);
  background: transparent;
}

.timeline-dot {
  width: 30px;
  height: 30px;
  margin: 20px 0 0 16px;
  border-radius: 9px;
  background: #efefef;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(16, 20, 18, 0.04);
  z-index: 1;
}

.timeline-item > span:last-child {
  padding: 18px 44px 18px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 7px;
  position: relative;
}

.timeline-item strong {
  font-size: 20px;
}

.timeline-item small {
  color: var(--soft-muted);
  line-height: 1.45;
}

.compare-list {
  display: grid;
  gap: 14px;
}

.compare-card {
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 210, 96, 0.16), transparent 38%),
    rgba(255, 254, 249, 0.92);
  border: 1px solid rgba(64, 89, 80, 0.1);
  box-shadow: var(--soft-shadow), var(--inner-light);
  display: grid;
  gap: 14px;
}

.compare-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.compare-title strong {
  display: block;
  font-size: 19px;
}

.compare-title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.compare-title b {
  color: var(--teal-dark);
  font-size: 24px;
}

.dimension-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dimension-chips span {
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.76);
  border: 1px solid rgba(64, 89, 80, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dimension-chips span.hit {
  background: #e8f6f1;
  color: var(--teal-dark);
}

.score-bars {
  display: grid;
  gap: 8px;
}

.score-bars div {
  height: 28px;
  border-radius: 12px;
  background: rgba(47, 143, 131, 0.08);
  position: relative;
  overflow: hidden;
}

.score-bars i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--yellow);
}

.score-bars div:nth-child(2) i {
  background: var(--teal);
}

.score-bars span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding-left: 10px;
  font-size: 12px;
  font-weight: 900;
}

.score-parts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.score-parts span {
  padding: 9px 8px;
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.74);
  border: 1px solid rgba(64, 89, 80, 0.08);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.peer-rank {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.peer-rank span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.76);
  border: 1px solid rgba(64, 89, 80, 0.08);
  color: var(--ink);
  font-weight: 900;
}

.peer-rank span.me {
  background: #fff2cf;
  color: #7a5410;
}

.peer-rank small {
  color: var(--soft-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.score-rule {
  border-radius: 14px;
  background: #f7f7f5;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.score-rule summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.score-rule p {
  margin: 10px 0 6px;
}

.score-rule ul {
  margin: 0;
  padding-left: 18px;
}

.profile-card {
  padding: 24px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 210, 96, 0.22), transparent 42%),
    rgba(255, 254, 249, 0.92);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(135deg, #9cf176 0%, var(--action-green) 58%, var(--action-green-dark) 100%);
  background-size: 12px 12px, 12px 12px, auto;
  color: #fffdf8;
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(73, 184, 52, 0.2);
}

.profile-card h2 {
  margin: 0;
  font-size: 24px;
}

.profile-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.profile-main {
  min-width: 0;
}

.profile-points {
  min-width: 74px;
  padding: 12px 14px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(135deg, #74e86a 0%, var(--action-green) 52%, var(--action-green-dark) 100%);
  color: #fff;
  box-shadow: 0 16px 28px rgba(73, 184, 52, 0.24);
}

.profile-points strong,
.profile-points span {
  display: block;
}

.profile-points strong {
  font-size: 25px;
  line-height: 1;
}

.profile-points span {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 900;
}

.profile-form-card,
.profile-password-card {
  padding: 0;
  overflow: hidden;
  background: rgba(255, 254, 249, 0.92);
}

.profile-form-card .form,
.profile-password-card .form {
  gap: 0;
}

.profile-form-card .field,
.profile-password-card .field {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 0 42px 0 18px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.profile-form-card .field label,
.profile-password-card .field label {
  color: #1f1f1f;
  font-size: 17px;
  font-weight: 900;
}

.profile-form-card .field input,
.profile-form-card .field select,
.profile-password-card .field input {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #717171;
  background: transparent;
  text-align: right;
  appearance: none;
  box-shadow: none;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.profile-form-card .form > .field:last-of-type,
.profile-grid .field:last-child,
.profile-password-card .field:last-of-type {
  border-bottom: 1px solid var(--line);
}

.profile-form-card .btn.primary,
.profile-password-card .btn.primary {
  margin: 18px;
  width: calc(100% - 36px);
  border-radius: 999px;
}

.profile-card-head {
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.profile-card-head h3 {
  margin: 0;
  font-size: 20px;
}

.profile-card-head p {
  margin: 7px 0 0;
  color: var(--soft-muted);
  font-size: 13px;
  line-height: 1.5;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.profile-stats div {
  padding: 16px 10px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 52%),
    rgba(255, 254, 249, 0.92);
  text-align: center;
  border: 1px solid rgba(64, 89, 80, 0.1);
  box-shadow: var(--soft-shadow), var(--inner-light);
}

.profile-stats strong,
.profile-stats span {
  display: block;
}

.profile-stats strong {
  font-size: 24px;
  color: #222;
}

.profile-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.invite-card {
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(121, 215, 232, 0.18), transparent 42%),
    rgba(255, 254, 249, 0.92);
}

.invite-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px 18px;
}

.invite-code-box {
  min-width: 0;
}

.invite-code-box span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.invite-code-box strong {
  display: block;
  margin-top: 5px;
  color: #222;
  font-size: 22px;
  letter-spacing: 0;
}

.invite-copy {
  min-height: 46px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.8);
}

.profile-actions {
  padding: 14px;
  position: relative;
  background: rgba(255, 254, 249, 0.82);
}

.settings-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.settings-toolbar h2 {
  margin: 0;
  text-align: center;
  font-size: 24px;
}

.settings-back-btn {
  min-height: 42px;
  padding-inline: 12px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: var(--soft-shadow), var(--inner-light);
  color: var(--teal-dark);
}

.settings-list {
  padding: 0;
  overflow: hidden;
  background: rgba(255, 254, 249, 0.92);
}

.settings-row {
  width: 100%;
  min-height: 78px;
  padding: 17px 46px 17px 18px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  display: grid;
  gap: 5px;
  text-align: left;
  position: relative;
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row::after {
  content: "›";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #c8c8c8;
  font-size: 30px;
  font-weight: 500;
}

.settings-row span {
  font-size: 19px;
  font-weight: 900;
}

.settings-row small {
  color: var(--soft-muted);
  font-size: 13px;
  line-height: 1.45;
}

.privacy-card {
  padding: 20px;
  display: grid;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(47, 143, 131, 0.08), transparent 44%),
    rgba(255, 254, 249, 0.92);
}

.danger-zone {
  border-color: rgba(255, 59, 48, 0.08);
}

.privacy-card h3 {
  margin: 0;
  font-size: 20px;
}

.privacy-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.legal-links a {
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(47, 143, 131, 0.1);
  border: 1px solid rgba(47, 143, 131, 0.08);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.consent-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.consent-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--teal);
}

.legal-page {
  min-height: 100vh;
  padding: 20px;
  background: #fffdf8;
}

.legal-doc {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(43, 122, 120, 0.12);
  box-shadow: var(--shadow);
}

.legal-doc h1,
.legal-doc h2 {
  color: var(--teal-dark);
}

.legal-doc h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

.legal-doc h2 {
  margin: 24px 0 8px;
  font-size: 19px;
}

.legal-doc p {
  margin: 8px 0;
  color: var(--ink);
  line-height: 1.8;
}

.prompt-card {
  padding: 16px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(47, 143, 131, 0.08), transparent 46%),
    rgba(255, 254, 249, 0.92);
  border: 1px solid rgba(64, 89, 80, 0.1);
  box-shadow: var(--soft-shadow), var(--inner-light);
  display: grid;
  gap: 10px;
}

.prompt-panel {
  display: grid;
  gap: 14px;
}

.prompt-guidance {
  display: grid;
  gap: 12px;
}

.prompt-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.prompt-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  word-break: break-word;
}

.prompt-card p {
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
}

.prompt-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.prompt-hide-btn {
  min-height: 46px;
  padding-inline: 12px;
  background: rgba(255, 253, 247, 0.7);
  border: 1px solid rgba(64, 89, 80, 0.1);
}

.prompt-summary {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 254, 249, 0.86);
  border: 1px solid rgba(64, 89, 80, 0.1);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.prompt-summary strong {
  color: var(--teal-dark);
  white-space: nowrap;
}

@keyframes softEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

.record-box {
  display: grid;
  gap: 10px;
}

.record-button {
  min-height: 86px;
  border-radius: 20px;
  color: #fff;
  background: var(--teal);
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(43, 122, 120, 0.22);
}

.record-button.recording {
  background: linear-gradient(135deg, #7be86f, var(--action-green-dark));
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.quick-input {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.quick-input input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
}

.prompt-list {
  display: grid;
  gap: 8px;
}

.sample-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #fff8ea;
  border: 1px solid rgba(240, 90, 40, 0.18);
}

.sample-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sample-head div {
  display: grid;
  gap: 5px;
}

.sample-head span {
  color: #f05a28;
  font-size: 12px;
  font-weight: 900;
}

.sample-head strong {
  color: var(--ink);
  line-height: 1.35;
}

.sample-card p {
  margin: 0;
  color: var(--soft-muted);
  font-size: 13px;
  line-height: 1.55;
}

.sample-card ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.prompt-item {
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
}

.prompt-item.active {
  border-color: var(--teal);
  background: #f0fbf8;
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 28px));
  padding: 12px 16px;
  border-radius: 16px;
  background: #263d3a;
  color: #fff;
  box-shadow: var(--shadow);
  z-index: 30;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 31, 29, 0.28);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 20;
}

.modal {
  width: min(520px, 100%);
  padding: 22px;
  display: grid;
  gap: 14px;
}

.modal h3 {
  margin: 0;
  font-size: 26px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (min-width: 768px) {
  body {
    min-height: 100dvh;
    padding: 16px;
  }

  .app-shell {
    width: min(100%, 920px);
    min-height: calc(100dvh - 32px);
    border-radius: 32px;
  }

  .screen {
    padding: 26px;
  }

  .logged-in .screen {
    padding-bottom: 116px;
  }

  .auth-layout {
    width: min(100%, 840px);
    margin-inline: auto;
    align-content: center;
  }

  .app-hero h1 {
    font-size: 44px;
  }

  .dashboard {
    width: min(100%, 860px);
    margin-inline: auto;
  }

  .topic-grid,
  .map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compare-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

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

  .profile-form-card .profile-grid .field:first-child,
  .profile-form-card .profile-grid .field:last-child {
    border-bottom: 1px solid var(--line);
  }

  .editor {
    min-height: calc(100dvh - 178px);
  }

  .map-workspace {
    min-height: 640px;
  }

  .side-panel {
    order: -1;
  }

  .bottom-nav {
    width: min(560px, calc(100% - 56px));
  }

  .bottom-nav-item {
    min-height: 62px;
  }

  .node-action-panel {
    right: max(22px, calc((100vw - 920px) / 2 + 22px));
  }
}

@media (min-width: 1024px) {
  .app-shell {
    width: min(100%, 1120px);
  }

  .auth-layout {
    width: min(100%, 1040px);
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 30px;
    align-items: center;
  }

  .app-auth {
    padding-top: 0;
  }

  .app-hero h1 {
    font-size: 54px;
  }

  .auth-card {
    align-self: center;
  }

  .dashboard {
    width: min(100%, 1040px);
  }

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

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

  .topic-card,
  .map-card {
    min-height: 126px;
    align-content: start;
  }

  .timeline-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    bottom: calc(18px + env(safe-area-inset-bottom));
  }
}

@media (min-width: 1180px) {
  .app-shell {
    width: min(100%, 1280px);
  }

  .view-editor.app-shell {
    width: min(100%, 1440px);
  }

  .screen {
    padding: 32px;
  }

  .logged-in .screen {
    padding-bottom: 112px;
  }

  .dashboard {
    width: min(100%, 1160px);
  }

  .view-home .dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-welcome {
    padding: 30px;
  }

  .app-welcome h2 {
    font-size: 42px;
  }

  .editor {
    width: 100%;
    max-width: none;
    min-height: calc(100dvh - 180px);
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: stretch;
    gap: 22px;
  }

  .side-panel {
    order: 0;
    align-self: start;
    position: sticky;
    top: 92px;
    max-height: calc(100dvh - 206px);
    overflow: auto;
  }

  .map-workspace {
    min-height: calc(100dvh - 180px);
  }

  .prompt-list {
    max-height: 360px;
    overflow: auto;
    padding-right: 2px;
  }

  .node-action-panel {
    right: max(32px, calc((100vw - 1440px) / 2 + 32px));
    bottom: calc(106px + env(safe-area-inset-bottom));
  }
}

@media (min-width: 1440px) {
  .app-shell {
    margin-block: 20px;
    min-height: calc(100dvh - 40px);
  }

  .view-editor.app-shell {
    width: min(100%, 1520px);
  }

  .view-editor .editor {
    grid-template-columns: minmax(0, 1fr) 400px;
  }
}

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .app-shell {
    width: min(100%, 460px);
    min-height: 100vh;
    border-radius: 0;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand-subtitle {
    display: none;
  }

  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .screen {
    padding: 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-layout {
    min-height: auto;
  }

  .topic-grid,
  .map-grid {
    grid-template-columns: 1fr;
  }

  .field-row,
  .quick-input {
    grid-template-columns: 1fr;
  }

  .profile-card {
    grid-template-columns: auto 1fr;
  }

  .profile-points {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

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

  .invite-body {
    grid-template-columns: 1fr;
  }

  .node {
    width: 148px;
    min-height: 86px;
  }

  .node.center {
    width: 170px;
  }

  .node-title {
    font-size: 17px;
  }

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

  .peer-rank span {
    align-items: flex-start;
    flex-direction: column;
  }
}
