:root {
  color-scheme: light;
  --bg: #f4f2ef;
  --surface: #fffefd;
  --ink: #232833;
  --muted: #78808c;
  --line: #e8e2db;
  --orange: #ff6a1a;
  --orange-weak: #fff0e7;
  --mint: #2e8d78;
  --mint-weak: #e8f5f0;
  --blue: #355c9a;
  --shadow: 0 18px 45px rgba(31, 34, 38, 0.14);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.stage {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(320px, 430px);
  gap: 54px;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.brief {
  max-width: 390px;
}

.brief-kicker,
.eyebrow {
  margin: 0;
  color: var(--orange);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
}

.brief h1 {
  margin: 10px 0 18px;
  color: var(--orange);
  font-size: 72px;
  line-height: 0.98;
}

.brief p {
  margin: 0;
  color: #343a45;
  font-size: 19px;
  line-height: 1.8;
}

.brief-line {
  width: 72px;
  height: 4px;
  margin: 30px 0 18px;
  background: var(--orange);
}

.brief .brief-note {
  color: var(--muted);
  font-size: 14px;
}

.phone {
  position: relative;
  width: min(100%, 430px);
  height: min(880px, calc(100svh - 28px));
  min-height: 720px;
  overflow: hidden;
  --energy: var(--orange);
  --energy-weak: var(--orange-weak);
  --energy-border: #ffd5bf;
  background: var(--surface);
  border: 1px solid #ded8d0;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.phone.energy-medium {
  --energy: #d18420;
  --energy-weak: #fff6df;
  --energy-border: #f2cf81;
}

.phone.energy-stable {
  --energy: var(--mint);
  --energy-weak: var(--mint-weak);
  --energy-border: #b9decf;
}

.statusbar {
  height: 38px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0 24px 8px;
  color: #171c25;
  font-size: 13px;
  font-weight: 800;
}

.status-icons {
  color: #3d4450;
  font-weight: 700;
}

.mode-switch {
  position: absolute;
  top: 42px;
  left: 20px;
  right: 20px;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 254, 253, 0.92);
  backdrop-filter: blur(16px);
}

.mode-switch button {
  min-width: 0;
  height: 42px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.mode-switch button.active {
  background: #252a33;
  color: #fff;
}

.mode-switch span {
  font-size: 13px;
  font-weight: 900;
}

.mode-switch small {
  font-size: 10px;
  opacity: 0.82;
}

.screen {
  position: absolute;
  inset: 96px 0 78px;
  overflow-y: auto;
  padding: 18px 20px 26px;
  background: linear-gradient(180deg, rgba(255, 246, 241, 0.9), var(--surface) 180px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.screen::-webkit-scrollbar {
  width: 0;
}

.guardian-only {
  display: none;
}

.mode-guardian [data-screen="home"] > :not(.guardian-home) {
  display: none;
}

.mode-guardian .guardian-home {
  display: block;
}

.profile-guardian {
  display: none;
}

.mode-guardian .profile-protected {
  display: none;
}

.mode-guardian .profile-guardian {
  display: block;
}

.mode-protected .guardian-only {
  display: none !important;
}

.mode-guardian .tabbar {
  grid-template-columns: repeat(5, 1fr);
}

.mode-guardian .tabbar button[data-nav="signal"] {
  display: none;
}

.topbar,
.section-head,
.summary-row,
.task-card,
.contact-row,
.resource-list article,
.redeem-list button,
.settings-list button,
.current-address,
.temporary-place {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h2,
h3,
p {
  margin: 0;
}

.topbar h2 {
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.16;
  letter-spacing: 0;
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  transform: translateY(-1px);
  border-color: #f7b28f;
}

.icon-button.filled {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-signal {
  position: relative;
  min-height: 190px;
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 18px;
  align-items: center;
  padding: 22px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 106, 26, 0.12), rgba(46, 141, 120, 0.07)),
    #fffaf6;
  border: 1px solid #f1dfd2;
  border-radius: 8px;
  animation: rise 500ms ease both;
}

.guardian-hero {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid #f1dfd2;
  border-radius: 8px;
  background: #fffaf6;
}

.guardian-hero h3 {
  margin: 8px 0 10px;
  font-size: 24px;
  line-height: 1.16;
}

.guardian-hero p:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.guardian-hero > strong {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--energy);
  color: #fff;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.time-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.signal-copy h3 {
  margin: 8px 0 10px;
  max-width: 210px;
  font-size: 25px;
  line-height: 1.15;
}

.signal-copy p:last-child,
.map-panel p,
.ai-result,
.report-copy,
.resource-list p,
.safety-copy,
.story-card p,
.artifact-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.signal-orbit {
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
}

.signal-orbit span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--energy-border);
  border-radius: 50%;
  animation: pulse 2.7s ease-out infinite;
}

.signal-orbit span:nth-child(2) {
  inset: 14px;
  animation-delay: 280ms;
}

.signal-orbit span:nth-child(3) {
  inset: 28px;
  background: var(--energy);
  border-color: var(--energy);
  animation: none;
}

.signal-orbit strong {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.summary-row {
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0;
}

.summary-row div {
  min-width: 0;
  flex: 1;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-row span,
.section-head span,
.contact-row span,
.task-card span,
.redeem-list small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.summary-row strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

.metric-value {
  display: inline-flex !important;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.metric-value b {
  font: inherit;
}

.metric-unit {
  flex: 0 0 auto;
  color: currentColor;
  font-size: 0.62em;
  font-weight: 900;
  line-height: 1;
  opacity: 0.78;
}

.people-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.people-strip article {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.people-strip div {
  min-width: 0;
}

.people-strip strong,
.people-strip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-strip strong {
  font-size: 13px;
}

.people-strip small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.action-slab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 20px;
  padding: 18px;
  color: #fff;
  background: #252a33;
  border-radius: 8px;
}

.action-slab h3 {
  margin-top: 5px;
  font-size: 21px;
  line-height: 1.2;
}

.primary-action {
  min-width: 126px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

.section {
  margin-top: 20px;
}

.section.compact {
  padding-top: 2px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h3 {
  font-size: 17px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--orange);
  font-weight: 800;
  cursor: pointer;
}

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

.guardian-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.guardian-action-grid button {
  min-height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.guardian-action-grid button:hover {
  transform: translateY(-2px);
  border-color: #f7b28f;
}

.guardian-action-grid svg {
  color: var(--orange);
}

.guardian-action-grid span {
  font-size: 12px;
  font-weight: 850;
}

.guardian-queue {
  display: grid;
  gap: 10px;
}

.guardian-queue .section-head {
  margin-bottom: 2px;
}

.guardian-queue article {
  display: flex;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.guardian-queue b {
  color: var(--orange);
  font-size: 13px;
}

.guardian-queue strong,
.guardian-queue small {
  display: block;
}

.guardian-queue small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.quick-tile {
  height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.quick-tile svg {
  color: var(--orange);
}

.quick-tile span {
  font-size: 12px;
  font-weight: 800;
}

.quick-tile:hover,
.task-card:hover,
.redeem-list button:hover {
  transform: translateY(-2px);
  border-color: #f7b28f;
}

.ai-box {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 10px;
}

.ai-box input {
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

.ai-box input:focus {
  border-color: var(--orange);
}

.ai-result {
  margin-top: 10px;
}

.hold-button {
  position: relative;
  width: 100%;
  min-height: 70px;
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 14px 18px;
  overflow: hidden;
  border: 1px solid #ffd5bf;
  border-radius: 8px;
  background: var(--orange-weak);
  color: var(--orange);
  text-align: left;
  cursor: pointer;
}

.hold-button::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: rgba(255, 106, 26, 0.14);
  transition: width 700ms ease;
}

.hold-button.holding::before {
  width: 100%;
}

.hold-button span,
.hold-button small {
  position: relative;
  z-index: 1;
}

.hold-button span {
  font-size: 17px;
  font-weight: 900;
}

.hold-button small {
  color: #9c4a20;
  font-size: 12px;
  line-height: 1.45;
}

.signal-meter {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.meter-ring {
  width: 142px;
  height: 142px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  border: 12px solid var(--energy-weak);
  outline: 1px solid var(--energy-border);
  color: var(--energy);
}

.meter-ring span {
  display: block;
  font-size: 40px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.meter-ring small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.range-field {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.range-field input {
  width: 100%;
  accent-color: var(--energy);
}

#energy-copy {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.contact-list,
.task-stack,
.resource-list,
.redeem-list {
  display: grid;
  gap: 10px;
}

.contact-row,
.task-card,
.resource-list article,
.redeem-list button {
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange-weak);
  color: var(--orange);
  font-weight: 900;
}

.avatar.mini {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 12px;
}

.avatar.soft {
  background: #f4eefc;
  color: #7253a4;
}

.avatar.calm {
  background: var(--mint-weak);
  color: var(--mint);
}

.contact-row div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex: 0 0 44px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d9dce1;
  transition: background 160ms ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--orange);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.note-block {
  padding: 14px;
  border: 1px solid #ffd5bf;
  border-radius: 8px;
  background: var(--orange-weak);
}

.note-block p {
  color: #7d3d1e;
  font-size: 13px;
  line-height: 1.65;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.avatar.big {
  width: 46px;
  height: 46px;
  font-size: 17px;
}

.profile-hero div {
  min-width: 0;
}

.profile-hero strong,
.profile-hero p {
  display: block;
}

.profile-hero strong {
  color: var(--ink);
  font-size: 14px;
}

.profile-hero p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.current-address,
.temporary-place {
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.temporary-place {
  margin-top: 10px;
  background: #f8f6f2;
}

.current-address div,
.temporary-place div,
.settings-list button div {
  min-width: 0;
}

.current-address span,
.temporary-place span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.current-address strong,
.temporary-place strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
}

.current-address small,
.temporary-place small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.current-address button,
.temporary-place button,
.settings-form button,
.settings-list b {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #ffd5bf;
  border-radius: 8px;
  background: var(--orange-weak);
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
}

.current-address button,
.temporary-place button,
.settings-form button {
  cursor: pointer;
}

.settings-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.settings-form label {
  display: grid;
  gap: 6px;
}

.settings-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.settings-form input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.settings-form input:focus {
  border-color: #f7b28f;
  box-shadow: 0 0 0 3px rgba(255, 106, 26, 0.1);
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-list button {
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.settings-list button:hover {
  transform: translateY(-2px);
  border-color: #f7b28f;
}

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

.settings-list strong {
  font-size: 14px;
}

.settings-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.settings-list b {
  display: grid;
  place-items: center;
}

.task-card {
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.task-card svg {
  flex: 0 0 22px;
  color: var(--orange);
}

.task-card div {
  min-width: 0;
  flex: 1;
}

.task-card button {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--orange-weak);
  color: var(--orange);
  font-weight: 850;
  cursor: pointer;
}

.night-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.night-grid button {
  min-height: 78px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.night-grid button:hover {
  transform: translateY(-2px);
  border-color: #f7b28f;
}

.night-grid strong,
.night-grid span {
  display: block;
}

.night-grid strong {
  font-size: 14px;
}

.night-grid span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.smart-home {
  padding: 0;
}

.permission-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.permission-ribbon span {
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.smart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.smart-grid button {
  min-height: 98px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.smart-grid button:hover {
  transform: translateY(-2px);
  border-color: #f7b28f;
}

.smart-grid svg {
  color: var(--orange);
}

.smart-grid strong {
  font-size: 15px;
}

.smart-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.safety-copy {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  color: #4a515c;
  font-size: 13px;
}

.timeline li {
  padding-left: 24px;
  position: relative;
  line-height: 1.5;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}

.map-panel {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.map-grid {
  position: relative;
  height: 150px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(35, 40, 51, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(35, 40, 51, 0.08) 1px, transparent 1px),
    #f8f5f0;
  background-size: 26px 26px;
  overflow: hidden;
}

.map-grid::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 12px;
  top: 73px;
  height: 24px;
  border-top: 6px solid rgba(255, 106, 26, 0.28);
  transform: rotate(-18deg);
}

.pin {
  position: absolute;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(255, 106, 26, 0.25);
}

.pin.pharmacy {
  left: 18px;
  top: 30px;
}

.pin.school {
  right: 18px;
  top: 54px;
  background: var(--blue);
}

.pin.friend {
  left: 56px;
  bottom: 22px;
  background: var(--mint);
}

.map-panel h3 {
  margin: 6px 0 8px;
  font-size: 22px;
  line-height: 1.15;
}

.verification-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #cce8de;
  border-radius: 8px;
  background: var(--mint-weak);
}

.verification-panel span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.verification-panel b {
  flex: 0 0 auto;
  color: var(--mint);
  font-size: 13px;
}

.resource-list {
  margin-top: 14px;
}

.resource-list span {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--mint-weak);
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
}

.story-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.story-card h3 {
  margin: 6px 0 8px;
  font-size: 20px;
}

.token-pool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 138px;
  gap: 18px;
  align-items: end;
  padding: 22px;
  color: #fff;
  background: #252a33;
  border-radius: 8px;
}

.token-pool p {
  color: #f8cdb8;
  font-size: 13px;
  font-weight: 800;
}

.token-pool small {
  display: block;
  max-width: 210px;
  margin-top: 10px;
  color: #f6ded1;
  font-size: 12px;
  line-height: 1.55;
}

.token-pool strong {
  margin-top: 8px;
  font-size: 40px;
  line-height: 1;
}

.token-pool .token-total {
  display: flex !important;
  max-width: 100%;
}

.pool-bars {
  height: 116px;
  display: flex;
  align-items: end;
  justify-content: end;
  gap: 7px;
}

.pool-bars span {
  width: 17px;
  border-radius: 6px 6px 0 0;
  background: var(--orange);
  animation: grow 700ms ease both;
}

.pool-bars span:nth-child(even) {
  background: #62b69f;
}

.redeem-list {
  margin-top: 14px;
}

.redeem-list button {
  width: 100%;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.redeem-list svg {
  flex: 0 0 22px;
  color: var(--orange);
}

.redeem-list span {
  display: grid;
  gap: 2px;
}

.report-copy {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-list article {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.source-list article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--w);
  background: linear-gradient(90deg, rgba(255, 106, 26, 0.14), rgba(46, 141, 120, 0.08));
}

.source-list div,
.source-list b {
  position: relative;
  z-index: 1;
}

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

.source-list strong {
  font-size: 14px;
}

.source-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.source-list b {
  color: var(--orange);
  font-size: 15px;
}

.chain-list,
.ledger-list,
.artifact-status {
  display: grid;
  gap: 10px;
}

.token-chain .section-head,
.token-ledger .section-head,
.artifact-status .section-head {
  margin-bottom: 2px;
}

.chain-list button,
.ledger-list button,
.artifact-status article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.chain-list button {
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.chain-list button:hover,
.ledger-list button:hover {
  transform: translateY(-2px);
  border-color: #f7b28f;
}

.ledger-list button {
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.ledger-list time {
  flex: 0 0 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chain-list strong,
.chain-list span,
.ledger-list strong,
.ledger-list span,
.artifact-status strong,
.artifact-status span {
  display: block;
}

.chain-list span,
.ledger-list span,
.artifact-status span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.chain-list b,
.ledger-list b {
  color: var(--orange);
  font-size: 14px;
}

.budget-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee8e2;
}

.budget-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), #62b69f);
}

.budget-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
}

.budget-row strong {
  color: var(--orange);
  font-size: 22px;
}

.budget-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.artifact-status button {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #ffd5bf;
  border-radius: 8px;
  background: var(--orange-weak);
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.heatmap {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.heatmap-hours,
.heatmap-row {
  display: grid;
  grid-template-columns: 48px repeat(12, 1fr);
  gap: 5px;
  align-items: center;
}

.heatmap-hours {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}

.heatmap-hours span:not(:first-child) {
  grid-column: span 2;
}

.heatmap-row + .heatmap-row {
  margin-top: 7px;
}

.heatmap-row strong {
  overflow: hidden;
  color: #4a515c;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heatmap-row span {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #f1eee9;
}

.heatmap-row .l0 {
  background: #f1eee9;
}

.heatmap-row .l1 {
  background: #ffd8c4;
}

.heatmap-row .l2 {
  background: #ffad7d;
}

.heatmap-row .l3 {
  background: #ff7c34;
}

.heatmap-row .l4 {
  background: #d94f12;
}

.guardian-tokens {
  display: grid;
  gap: 10px;
}

.guardian-tokens .section-head {
  margin-bottom: 2px;
}

.guardian-tokens article {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.guardian-tokens div {
  min-width: 0;
  flex: 1;
}

.guardian-tokens small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.guardian-tokens b {
  color: var(--orange);
  font-size: 14px;
}

.guardian-tokens button,
.detail-link {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #ffd5bf;
  border-radius: 8px;
  background: var(--orange-weak);
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.artifact-panel {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid #f1dfd2;
  border-radius: 8px;
  background: #fffaf6;
}

.artifact-panel h3 {
  margin: 5px 0 8px;
  font-size: 19px;
}

.detail-link {
  margin-top: 10px;
}

.artifact-preview {
  height: 118px;
  display: grid;
  align-content: end;
  gap: 5px;
  padding: 10px;
  border-radius: 8px;
  background: #252a33;
}

.artifact-preview span {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: var(--orange);
}

.artifact-preview span:nth-child(2) {
  width: 82%;
  background: #62b69f;
}

.artifact-preview span:nth-child(3) {
  width: 68%;
  background: #ffad7d;
}

.artifact-preview span:nth-child(4) {
  width: 92%;
  background: #f6ded1;
}

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 254, 253, 0.94);
  backdrop-filter: blur(18px);
}

.tabbar button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8b929b;
  cursor: pointer;
}

.tabbar button.active {
  color: var(--orange);
  background: var(--orange-weak);
}

.tabbar svg {
  width: 21px;
  height: 21px;
}

.tabbar span {
  font-size: 11px;
  font-weight: 850;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 23, 28, 0.26);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 4;
}

.drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 12px 20px 22px;
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -20px 40px rgba(31, 34, 38, 0.16);
  transform: translateY(105%);
  transition: transform 230ms ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer.open {
  transform: translateY(0);
}

.drawer-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: #d7d2cb;
}

.drawer h3 {
  margin: 4px 0 14px;
  font-size: 21px;
}

.drawer-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.drawer-actions button,
.drawer-close {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.drawer-actions button:hover {
  border-color: var(--orange);
  color: var(--orange);
}

#drawer-result {
  min-height: 44px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.drawer-close {
  width: 100%;
  border: 0;
  background: var(--orange);
  color: #fff;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: rgba(20, 23, 28, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.detail-modal {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 7;
  max-height: min(680px, calc(100% - 28px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 -20px 50px rgba(31, 34, 38, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
  transition:
    opacity 190ms ease,
    transform 190ms ease;
}

.detail-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

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

.modal-head h3 {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.18;
}

.modal-body {
  overflow-y: auto;
  padding-right: 2px;
}

.success-hero {
  padding: 14px;
  border: 1px solid #cce8de;
  border-radius: 8px;
  background: var(--mint-weak);
}

.success-hero strong {
  display: block;
  color: var(--mint);
  font-size: 18px;
}

.success-hero p,
.detail-copy,
.modal-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.detail-grid article,
.detail-list article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-grid span,
.detail-list span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.detail-grid strong,
.detail-list strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.25;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.detail-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.detail-list b {
  flex: 0 0 auto;
  color: var(--orange);
  font-size: 13px;
}

.modal-heatmap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 5px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.modal-heatmap span {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #f1eee9;
}

.modal-heatmap .l1 {
  background: #ffd8c4;
}

.modal-heatmap .l2 {
  background: #ffad7d;
}

.modal-heatmap .l3 {
  background: #ff7c34;
}

.modal-heatmap .l4 {
  background: #d94f12;
}

.service-steps {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.service-steps li {
  position: relative;
  padding-left: 22px;
  color: #4a515c;
  font-size: 13px;
  line-height: 1.5;
}

.service-steps li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}

.artifact-options {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.artifact-options article {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.artifact-swatch {
  height: 54px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 106, 26, 0.35), rgba(46, 141, 120, 0.35)),
    #fffaf6;
}

.artifact-swatch.terrain {
  background:
    repeating-linear-gradient(0deg, #252a33 0 6px, #ffad7d 6px 10px, #62b69f 10px 14px),
    #252a33;
}

.artifact-swatch.thermal {
  background:
    radial-gradient(circle at 30% 28%, #d94f12, transparent 34%),
    radial-gradient(circle at 70% 62%, #62b69f, transparent 32%),
    #252a33;
}

@keyframes pulse {
  from {
    opacity: 0.92;
    transform: scale(0.8);
  }

  to {
    opacity: 0;
    transform: scale(1.22);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes grow {
  from {
    transform: scaleY(0.1);
    transform-origin: bottom;
  }

  to {
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

@media (max-width: 860px) {
  .stage {
    display: block;
    min-height: 100svh;
    padding: 0;
  }

  .brief {
    display: none;
  }

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

  .screen {
    padding-inline: 18px;
  }
}

@media (max-width: 380px) {
  .hero-signal {
    grid-template-columns: 1fr;
  }

  .signal-orbit {
    width: 96px;
    height: 96px;
    justify-self: start;
  }

  .quick-grid {
    gap: 8px;
  }

  .map-panel,
  .token-pool,
  .artifact-panel {
    grid-template-columns: 1fr;
  }

  .map-grid {
    height: 116px;
  }

  .smart-grid,
  .people-strip,
  .night-grid {
    grid-template-columns: 1fr;
  }
}

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