:root {
  color-scheme: dark;
  --bg: #333333;
  --bg-deep: #242424;
  --surface: #333333;
  --surface-soft: #3b3b3b;
  --surface-raised: #444444;
  --ink: #ffffff;
  --muted: #9fa4ac;
  --line: rgba(255, 255, 255, 0.1);
  --glow: rgba(110, 199, 59, 0.24);
  --lime: #6ec73b;
  --lime-ink: #ffffff;
  --teal: #6ec73b;
  --aqua: #4589d6;
  --pink: #ff595f;
  --orange: #ff8f00;
  --violet: #724e9b;
  --map-earth: #724e9b;
  --map-earth-soft: #c9a8ef;
  --danger: #ff595f;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.24);
  --radius: 12px;
  --page-pad: clamp(16px, 4.8vw, 22px);
  --tap-size: 44px;
  --icon-box: 30px;
  --icon-box-inline: 20px;
  --icon-box-compact: 34px;
  --icon-box-float: 54px;
  --tabbar-max: 380px;
  --bottom-safe-space: calc(128px + env(safe-area-inset-bottom));
  --icon-stroke: 2px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  width: 100%;
  margin: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(180deg, #333333 0%, #242424 100%);
  background-size: 34px 34px, 34px 34px, auto;
  color: var(--ink);
  overflow-x: hidden;
}

body.dialog-open {
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
}

.app-shell {
  position: relative;
  width: min(100vw, 430px);
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  overflow-x: clip;
  background:
    linear-gradient(180deg, rgba(51, 51, 51, 0.98), rgba(36, 36, 36, 0.99)),
    var(--bg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.app-shell::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 46%);
}

.screen {
  position: relative;
  z-index: 1;
  display: none;
  width: 100%;
  min-height: 100dvh;
  padding: calc(12px + env(safe-area-inset-top)) var(--page-pad) var(--bottom-safe-space);
}

.screen.active {
  display: block;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
}

.home-topbar {
  align-items: center;
  min-height: 42px;
  margin-bottom: 10px;
  gap: clamp(8px, 3vw, 14px);
}

.device-status {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.device-icons {
  letter-spacing: 0.5px;
}

.topbar > div {
  min-width: 0;
  flex: 1 1 auto;
}

.topbar.compact {
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.topbar.compact > div:first-child {
  display: grid;
  min-height: var(--tap-size);
  align-content: center;
}

.hud-pill {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  min-width: 0;
  max-width: 176px;
  min-height: 29px;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #26272c;
  padding: 4px 10px;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hud-pill span {
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.hud-pill strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  flex: 0 1 auto;
  align-self: center;
  color: #ffffff;
  font-size: clamp(15px, 4.1vw, 18px);
  font-weight: 900;
  letter-spacing: 1.6px;
  text-align: center;
}

.profile-action {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: var(--tap-size);
  height: var(--tap-size);
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  padding: 3px;
  box-shadow: 0 0 0 4px rgba(110, 199, 59, 0.14);
}

.profile-action img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.home-rule {
  height: 1px;
  margin-bottom: 13px;
  background: rgba(255, 255, 255, 0.1);
}

.checkin-card {
  display: grid;
  gap: 8px;
  min-height: 84px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    #2e3035;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.checkin-card > div:first-child {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.checkin-card h1 {
  font-size: 20px;
  line-height: 1.05;
}

h2 {
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
}

.small-action,
.route-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 76px;
  max-width: 132px;
  height: var(--tap-size);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.route-chip {
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar.compact .route-chip,
.topbar.compact .small-action {
  align-self: center;
  transform: translateY(9px);
}

.checkin-copy {
  margin-top: 3px;
  color: #d8ded2;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.checkin-progress {
  position: relative;
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.checkin-progress i {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime), #95df72);
  transition: width 240ms ease;
}

.checkin-progress span {
  position: absolute;
  right: 7px;
  top: 50%;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  transform: translateY(-50%);
}

.summary-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  min-height: 96px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #26272c;
}

.summary-pair article {
  display: grid;
  min-height: 96px;
  align-content: start;
  gap: 5px;
  padding: 11px 10px 10px;
  text-align: left;
}

.summary-pair article:first-child {
  background: var(--lime);
  color: #333333;
}

.summary-pair article + article {
  border-left: 1px solid var(--line);
}

.summary-pair strong {
  display: block;
  font-size: 20px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.summary-pair span {
  display: block;
  font-size: 12px;
  font-weight: 900;
}

.summary-pair small {
  display: -webkit-box;
  overflow: hidden;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  opacity: 0.78;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.summary-pair article + article small {
  color: var(--muted);
  opacity: 1;
}

.earth-time-panel {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 7px;
  margin-bottom: 12px;
}

.earth-time-panel article {
  min-width: 0;
  min-height: 60px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  padding: 10px;
}

.earth-time-panel span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.earth-time-panel strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.intent-row {
  display: block;
  margin-bottom: 18px;
}

.intent-search {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 58px;
  gap: 10px;
  border: 1px solid rgba(110, 199, 59, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(110, 199, 59, 0.14), rgba(255, 255, 255, 0.035)),
    #26272c;
  color: #ffffff;
  padding: 9px 13px;
  text-align: left;
}

.intent-search:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.intent-today-icon {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 11px;
  background: rgba(110, 199, 59, 0.2);
  color: var(--lime);
  font-size: 16px;
  line-height: 1;
}

.intent-today-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.intent-today-copy small {
  color: var(--lime);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
}

.intent-search strong {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.intent-search b {
  margin-left: auto;
  color: var(--lime);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.small-action {
  background: var(--surface-soft);
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.history-toggle {
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.history-toggle[aria-pressed="true"] {
  border-color: rgba(110, 199, 59, 0.55);
  background: rgba(110, 199, 59, 0.14);
  color: #ffffff;
}

.memory-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: -3px 0 10px;
}

.memory-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  padding: 3px;
}

.memory-tab {
  min-width: 0;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.memory-tab.active {
  background: rgba(110, 199, 59, 0.18);
  color: var(--lime);
  box-shadow:
    inset 0 0 0 1px rgba(110, 199, 59, 0.28),
    0 0 18px rgba(110, 199, 59, 0.12);
}

.log-compose-action {
  min-width: 74px;
  height: 40px;
  border-color: rgba(110, 199, 59, 0.34);
  background:
    linear-gradient(180deg, rgba(110, 199, 59, 0.2), rgba(110, 199, 59, 0.1)),
    rgba(255, 255, 255, 0.04);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(110, 199, 59, 0.08);
  white-space: nowrap;
}

.small-action:active,
.profile-action:active,
.primary-action:active,
.tab:active,
.star-node:active,
.map-node button:active,
.schedule-item button:active,
.form-item button:active,
.today-card button:active,
.rhythm-card button:active {
  transform: translateY(1px);
}

.scene-band {
  position: relative;
  display: grid;
  min-height: 316px;
  margin: 0 0 14px;
  padding: 14px 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  overflow: clip;
  contain: paint;
  background:
    radial-gradient(ellipse at 50% 72%, rgba(110, 199, 59, 0.105), transparent 48%),
    radial-gradient(ellipse at 50% 22%, rgba(69, 137, 214, 0.085), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 24%),
    linear-gradient(180deg, #34373a 0%, #292b2f 100%);
  background-size: auto;
  box-shadow: var(--shadow-soft);
}

.scene-band::before {
  position: absolute;
  inset: 13px;
  z-index: 0;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 10px;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(110, 199, 59, 0.085) 12% calc(12% + 1px), transparent calc(12% + 1px) 100%),
    linear-gradient(90deg, transparent 0 86%, rgba(69, 137, 214, 0.08) 86% calc(86% + 1px), transparent calc(86% + 1px) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(110, 199, 59, 0.04),
    inset 0 0 38px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.scene-band::after {
  position: absolute;
  left: 0;
  right: 0;
  top: 112px;
  z-index: 0;
  height: 138px;
  content: "";
  background:
    linear-gradient(8deg, transparent 0 27%, rgba(110, 199, 59, 0.12) 27% calc(27% + 1px), transparent calc(27% + 1px) 100%),
    linear-gradient(-10deg, transparent 0 58%, rgba(69, 137, 214, 0.105) 58% calc(58% + 1px), transparent calc(58% + 1px) 100%),
    linear-gradient(4deg, transparent 0 76%, rgba(255, 255, 255, 0.055) 76% calc(76% + 1px), transparent calc(76% + 1px) 100%);
  opacity: 0.64;
  pointer-events: none;
  transform: translate3d(-3%, 0, 0);
  animation: sceneLineDrift 16s ease-in-out infinite;
}

.orbit {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(110, 199, 59, 0.16);
  border-radius: 999px;
  pointer-events: none;
}

.orbit-a {
  width: min(78%, 278px);
  height: 88px;
  left: 10px;
  top: 52%;
  transform: rotate(-13deg);
  animation: sceneOrbitA 18s ease-in-out infinite;
}

.orbit-b {
  width: min(70%, 246px);
  height: 78px;
  right: 10px;
  top: 36%;
  transform: rotate(18deg);
  border-color: rgba(69, 137, 214, 0.15);
  animation: sceneOrbitB 20s ease-in-out infinite;
}

.scene-meta {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.scene-meta span {
  min-width: 0;
  max-width: 48%;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 17, 22, 0.56);
  color: var(--lime);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xiaoqi-img {
  --xiaoqi-x: 8px;
  --xiaoqi-y: 0px;
  position: relative;
  z-index: 2;
  align-self: end;
  justify-self: center;
  width: auto;
  height: clamp(214px, 58vw, 232px);
  max-width: 76%;
  margin-bottom: 6px;
  object-fit: contain;
  object-position: center bottom;
  filter: none;
  transform: translate3d(var(--xiaoqi-x), var(--xiaoqi-y), 0);
  animation: breathe 5s ease-in-out infinite;
}

.xiaoqi-img[data-form="outdoor"] {
  --xiaoqi-x: 6px;
  height: clamp(216px, 59vw, 236px);
  max-width: 76%;
}

.xiaoqi-img[data-form="quiet"] {
  --xiaoqi-x: -3px;
  --xiaoqi-y: 10px;
  height: clamp(184px, 47vw, 202px);
  max-width: 70%;
}

.speech {
  position: relative;
  z-index: 4;
  align-self: end;
  width: 100%;
  min-height: 54px;
  margin-top: 0;
  padding: 12px;
  border: 1px solid rgba(110, 199, 59, 0.24);
  border-radius: 12px;
  background: rgba(19, 20, 26, 0.88);
  color: #f1f5e6;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

@keyframes breathe {
  0%,
  100% {
    transform: translate3d(var(--xiaoqi-x), var(--xiaoqi-y), 0);
  }
  50% {
    transform: translate3d(var(--xiaoqi-x), calc(var(--xiaoqi-y) - 5px), 0);
  }
}

@keyframes sceneLineDrift {
  0%,
  100% {
    opacity: 0.52;
    transform: translate3d(-3%, 0, 0);
  }

  50% {
    opacity: 0.72;
    transform: translate3d(3%, -6px, 0);
  }
}

@keyframes sceneOrbitA {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-13deg);
  }

  50% {
    transform: translate3d(12px, -4px, 0) rotate(-10deg);
  }
}

@keyframes sceneOrbitB {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(18deg);
  }

  50% {
    transform: translate3d(-10px, 5px, 0) rotate(15deg);
  }
}

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

.status-tile {
  min-width: 0;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  padding: 10px 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.status-tile strong {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.status-tile strong span {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.status-tile .status-word {
  max-width: 72px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.15;
  text-align: right;
  white-space: normal;
}

.status-note {
  min-height: 30px;
  margin-top: 8px;
  color: #cbd0c4;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.meter {
  height: 8px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.meter i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
  transition: width 240ms ease;
}

.status-tile.low .meter i {
  background: var(--danger) !important;
}

.status-tile.mid .meter i {
  background: var(--orange) !important;
}

.action-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.primary-action {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 178px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, var(--lime), #5db334);
  color: var(--lime-ink);
  padding: 88px 12px 14px;
  text-align: left;
  isolation: isolate;
  box-shadow: 0 13px 24px rgba(0, 0, 0, 0.2), 0 0 20px var(--glow);
}

.primary-action:first-child {
  grid-column: auto;
  min-height: 178px;
}

.primary-action:nth-child(2) {
  min-height: 214px;
  padding-top: 124px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 35%),
    linear-gradient(135deg, #4589d6, #255a96);
  color: #ffffff;
  box-shadow: 0 13px 24px rgba(0, 0, 0, 0.22);
}

.primary-action:nth-child(3) {
  min-height: 178px;
  margin-top: -36px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 35%),
    linear-gradient(135deg, #724e9b, #4f3472);
  color: #ffffff;
  box-shadow: 0 13px 24px rgba(0, 0, 0, 0.22);
}

.primary-action:nth-child(4) {
  min-height: 214px;
  padding-top: 96px;
  padding-bottom: 44px;
}

.primary-action::before {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: -1;
  height: 58px;
  border-radius: 18px 18px 8px 8px;
  background:
    radial-gradient(circle at 18% 52%, rgba(255, 255, 255, 0.86) 0 11px, transparent 12px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.24));
  content: "";
  opacity: 0.78;
}

.primary-action:nth-child(2)::before,
.primary-action:nth-child(4)::before {
  height: 82px;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72) 0 34%, transparent 34% 42%, rgba(255, 255, 255, 0.82) 42% 63%, transparent 63%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent);
}

.primary-action::after {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  content: "";
}

.primary-action:nth-child(4)::after {
  bottom: 42px;
}

.action-logo {
  position: absolute;
  top: 17px;
  left: 17px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.12);
  font-style: normal;
  pointer-events: none;
}

.action-logo svg {
  display: block;
  width: 24px;
  height: 24px;
}

.primary-action span {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.12;
}

.primary-action small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  color: currentColor;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0.76;
}

.operation-panel {
  margin: 0 0 14px;
}

.operation-title {
  margin-bottom: 9px;
}

.operation-title span,
.map-list-title span,
.history-title span {
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
}

.operation-panel .action-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 0;
}

.operation-panel .primary-action,
.operation-panel .primary-action:first-child,
.operation-panel .primary-action:nth-child(2),
.operation-panel .primary-action:nth-child(3),
.operation-panel .primary-action:nth-child(4) {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: minmax(30px, auto) auto;
  column-gap: 10px;
  row-gap: 4px;
  align-content: center;
  align-items: center;
  min-height: 82px;
  margin-top: 0;
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.02)),
    #2d3034;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.operation-panel .primary-action::before {
  display: none;
}

.operation-panel .action-logo {
  position: relative;
  top: auto;
  left: auto;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.operation-panel .action-logo svg {
  width: 23px;
  height: 23px;
}

.operation-panel .primary-action::after {
  right: 11px;
  top: 13px;
  bottom: auto;
  width: 18px;
  height: 18px;
  border-top: 2px solid rgba(255, 255, 255, 0.72);
  border-right: 2px solid rgba(255, 255, 255, 0.46);
  border-radius: 0 8px 0 0;
  background: transparent;
  opacity: 0.82;
}

.operation-panel .primary-action:nth-child(1),
.operation-panel .primary-action:nth-child(4) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, #6ec73b, #3f8d29);
}

.operation-panel .primary-action:nth-child(2),
.operation-panel .primary-action:nth-child(8) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, #ff8f00, #a85f00);
}

.operation-panel .primary-action:nth-child(3),
.operation-panel .primary-action:nth-child(7) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, #ff595f, #9f3137);
}

.operation-panel .primary-action:nth-child(5),
.operation-panel .primary-action:nth-child(6) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, #4589d6, #275485);
}

.operation-panel .primary-action span {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin-top: 0;
  font-size: 15px;
  line-height: 1.15;
}

.operation-panel .primary-action small {
  grid-column: 2;
  grid-row: 2;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.2;
  opacity: 0.82;
}

.operation-panel .primary-action[aria-disabled="true"] {
  cursor: default;
}

.operation-panel .primary-action[aria-disabled="true"]:active {
  transform: none;
}

.operation-panel .primary-action[aria-disabled="true"]:focus-visible {
  outline: 2px solid rgba(229, 255, 87, 0.42);
  outline-offset: 2px;
}

.feed-panel,
.schedule-list,
.memory-list,
.form-list {
  margin-top: 14px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

#dayBadge {
  border-radius: 999px;
  background: rgba(229, 255, 87, 0.14);
  color: var(--lime);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.event-feed {
  display: grid;
  gap: 8px;
}

.feed-line,
.schedule-item,
.memory-card,
.form-item,
.map-node,
.bond-panel,
.wardrobe-preview,
.today-card,
.rhythm-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.feed-line {
  padding: 11px 12px;
  color: #e8ebdf;
  font-size: 13px;
  line-height: 1.45;
}

.feed-line small {
  display: block;
  margin-top: 6px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 800;
}

.map-canvas {
  display: grid;
  gap: 10px;
}

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

.map-current-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.map-current-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.map-current-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  overflow: hidden;
  padding: 12px;
  border-color: rgba(110, 199, 59, 0.28);
  background:
    linear-gradient(180deg, rgba(110, 199, 59, 0.13), rgba(255, 255, 255, 0.035)),
    #2d3034;
}

.map-current-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(110, 199, 59, 0.12), transparent 58%);
  content: "";
}

.map-current-card.selected {
  border-color: rgba(69, 137, 214, 0.34);
  background:
    linear-gradient(180deg, rgba(69, 137, 214, 0.13), rgba(255, 255, 255, 0.035)),
    #2a3038;
}

.map-current-card.selected::before {
  background: linear-gradient(90deg, rgba(69, 137, 214, 0.13), transparent 58%);
}

.map-current-card.selected .map-current-indicator {
  border-color: rgba(69, 137, 214, 0.62);
  background:
    radial-gradient(circle at center, #ffffff 0 3px, #4589d6 4px 8px, rgba(69, 137, 214, 0.18) 9px 100%);
  box-shadow:
    0 0 0 5px rgba(69, 137, 214, 0.08),
    0 0 22px rgba(69, 137, 214, 0.28);
}

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

.map-current-indicator {
  display: block;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(110, 199, 59, 0.58);
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #ffffff 0 3px, var(--lime) 4px 8px, rgba(110, 199, 59, 0.18) 9px 100%);
  box-shadow:
    0 0 0 5px rgba(110, 199, 59, 0.08),
    0 0 22px rgba(110, 199, 59, 0.28);
}

.map-current-card h2 {
  margin: 5px 0;
}

.map-current-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.map-list-title {
  margin: 2px 0 -2px;
}

.night-dialog {
  display: grid;
  position: fixed;
  inset: 0;
  z-index: 60;
  place-items: end center;
  background: rgba(18, 19, 23, 0.56);
  padding: 18px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.night-dialog.hidden {
  display: none;
}

.night-dialog-card {
  display: grid;
  gap: 14px;
  width: min(100%, 420px);
  border: 1px solid rgba(110, 199, 59, 0.3);
  border-radius: calc(var(--radius) + 2px);
  background:
    radial-gradient(circle at 88% 0%, rgba(110, 199, 59, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    #25292c;
  padding: 16px;
  box-shadow: var(--shadow);
}

.night-dialog-card > div:first-child > span {
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
}

.night-dialog-card h2 {
  margin: 4px 0 7px;
  color: #ffffff;
  font-size: 20px;
}

.night-dialog-card p {
  color: #d8ded2;
  font-size: 13px;
  line-height: 1.5;
}

.night-summary {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
  padding: 11px;
}

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

.night-summary strong {
  color: #ffffff;
  font-weight: 800;
}

.night-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.night-dialog-actions button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: var(--lime);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.night-dialog-actions .ghost {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #d8ded2;
}

.map-travel-dialog {
  display: grid;
  position: fixed;
  inset: 0;
  z-index: 40;
  place-items: center;
  background: rgba(18, 19, 23, 0.48);
  padding: 18px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.map-travel-dialog.hidden {
  display: none;
}

.map-dialog-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(110, 199, 59, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(110, 199, 59, 0.12), rgba(255, 255, 255, 0.035)),
    #25292c;
  width: min(100%, 342px);
  padding: 13px;
  box-shadow: var(--shadow-soft);
}

.map-dialog-card span {
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
}

.map-dialog-card h2 {
  margin: 4px 0 6px;
  color: #ffffff;
  font-size: 18px;
}

.map-dialog-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.map-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.map-dialog-actions button {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  background: var(--lime);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.map-dialog-actions .ghost {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #d8ded2;
}

.star-map-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(110, 199, 59, 0.22);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 50% 48%, rgba(69, 137, 214, 0.105), transparent 62%),
    linear-gradient(180deg, rgba(69, 137, 214, 0.09), rgba(255, 255, 255, 0.03)),
    #282b30;
  background-size: auto;
  padding: 13px;
  box-shadow: var(--shadow);
}

.star-map-panel::before,
.star-map-panel::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.star-map-panel::before {
  inset: 13px;
  z-index: -1;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, rgba(110, 199, 59, 0.095), transparent 64%);
}

.star-map-panel::after {
  left: 18px;
  right: 18px;
  top: 58px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 199, 59, 0.32), transparent);
}

.star-map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.star-map-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
}

.star-map-head h2 {
  font-size: 17px;
}

.star-map-head strong {
  flex: 0 0 auto;
  border: 1px solid rgba(110, 199, 59, 0.26);
  border-radius: 999px;
  background: rgba(110, 199, 59, 0.13);
  color: var(--lime);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 900;
}

.star-map-weather {
  margin-bottom: 10px;
  color: #d8ded2;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.map-layer-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.map-layer-chip {
  display: grid;
  min-height: 62px;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  padding: 8px;
}

.map-layer-chip[data-layer="inner"] {
  grid-column: 1 / -1;
  min-height: 56px;
}

.map-layer-chip span,
.map-layer-list-head span {
  color: var(--lime);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.map-layer-chip strong,
.map-layer-list-head strong {
  margin-top: 5px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.map-layer-chip small,
.map-layer-list-head small {
  margin-top: 4px;
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-layer-chip[data-layer="outer"] span,
.map-layer-list[data-layer="outer"] .map-layer-list-head span {
  color: #9fc8f4;
}

.map-layer-chip[data-layer="earth"] span,
.map-layer-list[data-layer="earth"] .map-layer-list-head span {
  color: var(--map-earth-soft);
}

.map-layer-chip.active {
  border-color: rgba(110, 199, 59, 0.32);
  background: rgba(110, 199, 59, 0.12);
}

.map-layer-chip.selected:not(.active) {
  border-color: rgba(69, 137, 214, 0.28);
  background: rgba(69, 137, 214, 0.09);
}

.star-map-visual {
  position: relative;
  height: clamp(278px, 75vw, 318px);
  overflow: hidden;
  overflow: clip;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 52%, rgba(110, 199, 59, 0.065), transparent 56%),
    radial-gradient(circle at 78% 65%, rgba(69, 137, 214, 0.05), transparent 42%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    #22252a;
  background-size: auto, auto, 42px 42px, 42px 42px, auto, auto;
}

.map-zone {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.28);
}

.map-zone span {
  display: none;
}

.zone-inner {
  left: 9%;
  top: 20%;
  width: 62%;
  height: 66%;
  border-color: rgba(110, 199, 59, 0.105);
  border-radius: 36% 34% 42% 38%;
  background: rgba(110, 199, 59, 0.032);
}

.zone-outer {
  right: 5%;
  top: 42%;
  width: 36%;
  height: 41%;
  border-color: rgba(69, 137, 214, 0.12);
  border-radius: 999px;
  background: rgba(69, 137, 214, 0.035);
}

.zone-earth {
  left: 29%;
  top: 4%;
  width: 42%;
  height: 21%;
  border-color: rgba(114, 78, 155, 0.24);
  border-radius: 18px;
  background: rgba(114, 78, 155, 0.07);
}

.map-ring,
.map-axis,
.star-map-lines {
  position: absolute;
  pointer-events: none;
}

.map-ring {
  left: 50%;
  top: 50%;
  border: 1px solid rgba(110, 199, 59, 0.11);
  border-radius: 999px;
  transform: translate(-50%, -50%) rotate(-12deg);
}

.ring-inner {
  width: 58%;
  height: 38%;
  animation: mapOrbitInner 22s linear infinite;
}

.ring-outer {
  width: 88%;
  height: 66%;
  border-color: rgba(69, 137, 214, 0.12);
  opacity: 0.7;
  transform: translate(-50%, -50%) rotate(13deg);
  animation: mapOrbitOuter 28s linear infinite reverse;
}

.map-axis {
  left: 50%;
  top: 50%;
  background: rgba(255, 255, 255, 0.035);
  transform: translate(-50%, -50%);
  z-index: 0;
}

.axis-x {
  width: 84%;
  height: 1px;
}

.axis-y {
  width: 1px;
  height: 76%;
}

.star-map-lines {
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.star-map-lines line {
  opacity: 0.55;
  stroke: rgba(255, 255, 255, 0.11);
  stroke-width: 0.75;
  stroke-linecap: round;
}

.star-map-lines line.active {
  opacity: 1;
  stroke: rgba(110, 199, 59, 0.62);
  stroke-dasharray: 5 7;
  stroke-dashoffset: 0;
  stroke-width: 1.25;
  animation: mapRouteFlow 5s linear infinite;
}

.star-node {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  z-index: 3;
  display: grid;
  align-content: center;
  align-items: center;
  justify-items: center;
  place-items: center;
  width: 82px;
  min-width: 82px;
  height: 64px;
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(35, 38, 43, 0.92);
  color: #ffffff;
  padding: 7px 6px 6px;
  text-align: center;
  transform: translate(-50%, -50%);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  isolation: isolate;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}

.star-node:active {
  transform: translate(-50%, calc(-50% + 1px)) scale(0.985);
}

.star-node::before,
.star-node::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.star-node > * {
  position: relative;
  z-index: 2;
}

.star-node .node-code {
  color: var(--lime);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.star-node[data-layer="outer"] .node-code {
  color: #9fc8f4;
}

.star-node[data-layer="earth"] .node-code {
  color: var(--map-earth-soft);
}

.star-node strong {
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.star-node small {
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(69, 137, 214, 0.16);
  color: #9fc8f4;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
}

.star-node.current {
  z-index: 5;
  border-color: rgba(110, 199, 59, 0.74);
  background:
    linear-gradient(180deg, rgba(110, 199, 59, 0.24), rgba(35, 38, 43, 0.94)),
    #262b28;
  animation: mapCurrentGlow 2.8s ease-in-out infinite;
  box-shadow:
    0 0 0 3px rgba(110, 199, 59, 0.12),
    0 14px 24px rgba(0, 0, 0, 0.3);
}

.star-node.current::before {
  inset: 3px;
  z-index: 0;
  border: 1px solid rgba(110, 199, 59, 0.54);
  border-radius: 11px;
  opacity: 0.54;
  animation: mapCurrentPulse 2.4s ease-out infinite;
}

.star-node.current::after {
  right: 8px;
  top: 7px;
  z-index: 1;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(110, 199, 59, 0.28),
    0 0 15px rgba(255, 255, 255, 0.62);
}

.star-node.current small {
  background: var(--lime);
  color: #333333;
}

.star-node.selected:not(.current) {
  z-index: 4;
  border-color: rgba(69, 137, 214, 0.78);
  background:
    linear-gradient(180deg, rgba(69, 137, 214, 0.24), rgba(35, 38, 43, 0.94)),
    #242a33;
  box-shadow:
    0 0 0 3px rgba(69, 137, 214, 0.14),
    0 14px 24px rgba(0, 0, 0, 0.28);
}

.star-node.selected:not(.current)::before {
  inset: 3px;
  border: 1px solid rgba(69, 137, 214, 0.46);
  border-radius: 11px;
  opacity: 0.7;
}

.star-node.selected:not(.current) small {
  background: rgba(69, 137, 214, 0.86);
  color: #ffffff;
}

.star-node.light small {
  background: rgba(69, 137, 214, 0.18);
  color: #9fc8f4;
}

.star-node.later,
.star-node.silent {
  opacity: 0.72;
}

.star-node.later small,
.star-node.silent small {
  background: rgba(255, 255, 255, 0.09);
  color: var(--muted);
}

.star-map-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.star-map-legend span {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #d8ded2;
  padding: 7px 6px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.map-layer-list {
  display: grid;
  position: relative;
  gap: 8px;
  padding-left: 12px;
}

.map-layer-list + .map-layer-list {
  margin-top: 10px;
}

.map-layer-list::before {
  position: absolute;
  left: 2px;
  top: 4px;
  bottom: 6px;
  width: 3px;
  border-radius: 999px;
  background: rgba(110, 199, 59, 0.52);
  content: "";
}

.map-layer-list[data-layer="outer"]::before {
  background: rgba(69, 137, 214, 0.55);
}

.map-layer-list[data-layer="earth"]::before {
  background: rgba(114, 78, 155, 0.72);
}

.map-layer-list-head {
  display: grid;
  position: relative;
  min-height: 50px;
  align-content: center;
  border: 1px solid rgba(110, 199, 59, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(110, 199, 59, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
  padding: 8px 10px 8px 42px;
}

.map-layer-list-head::before {
  position: absolute;
  left: 10px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 9px;
  background: rgba(110, 199, 59, 0.2);
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
  content: "1";
  transform: translateY(-50%);
}

.map-layer-list[data-layer="outer"] .map-layer-list-head {
  border-color: rgba(69, 137, 214, 0.2);
  background:
    linear-gradient(90deg, rgba(69, 137, 214, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
}

.map-layer-list[data-layer="outer"] .map-layer-list-head::before {
  background: rgba(69, 137, 214, 0.2);
  color: #9fc8f4;
  content: "2";
}

.map-layer-list[data-layer="earth"] .map-layer-list-head {
  border-color: rgba(114, 78, 155, 0.28);
  background:
    linear-gradient(90deg, rgba(114, 78, 155, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
}

.map-layer-list[data-layer="earth"] .map-layer-list-head::before {
  background: rgba(114, 78, 155, 0.24);
  color: var(--map-earth-soft);
  content: "3";
}

.map-node {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 90px;
  padding: 12px;
}

.map-node h2,
.schedule-item h2,
.memory-card h2,
.form-item h2 {
  margin-bottom: 5px;
  color: #ffffff;
}

.map-node p,
.schedule-item p,
.memory-card p,
.form-item p,
.wardrobe-copy p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.map-node .meta,
.schedule-item .meta,
.form-item .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.tag {
  border-radius: 999px;
  background: rgba(69, 137, 214, 0.15);
  color: #9fc8f4;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.tag.warn {
  background: rgba(255, 155, 54, 0.16);
  color: #ffc27a;
}

.tag.soft {
  background: rgba(255, 89, 95, 0.14);
  color: #ffb0b3;
}

.tag.selected-tag {
  background: rgba(110, 199, 59, 0.18);
  color: #bdf29b;
}

.map-node button,
.schedule-item button,
.form-item button,
.today-card button,
.rhythm-card button,
.schedule-primary-btn,
.schedule-action button,
.schedule-footer button {
  min-width: 62px;
  min-height: var(--tap-size);
  border: 0;
  border-radius: var(--radius);
  background: var(--lime);
  color: var(--lime-ink);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(229, 255, 87, 0.16);
}

.map-node.current {
  border-color: rgba(110, 199, 59, 0.44);
  background:
    radial-gradient(circle at 88% 16%, rgba(110, 199, 59, 0.2), transparent 20%),
    linear-gradient(180deg, rgba(110, 199, 59, 0.13), rgba(255, 255, 255, 0.035));
}

.map-node.selected {
  border-color: rgba(69, 137, 214, 0.5);
  background:
    radial-gradient(circle at 88% 18%, rgba(69, 137, 214, 0.2), transparent 20%),
    linear-gradient(180deg, rgba(69, 137, 214, 0.12), rgba(255, 255, 255, 0.035));
}

.map-node.current button,
.schedule-item.done button,
.form-item button:disabled,
.today-card button:disabled,
.schedule-primary-btn:disabled,
.schedule-action button:disabled,
.schedule-footer button:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  box-shadow: none;
}

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

.today-card,
.rhythm-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.today-card {
  border-color: rgba(110, 199, 59, 0.28);
  background:
    linear-gradient(180deg, rgba(110, 199, 59, 0.14), rgba(255, 255, 255, 0.035)),
    #2d3034;
}

.today-card.done {
  border-color: rgba(255, 255, 255, 0.12);
}

.today-head {
  display: grid;
  gap: 6px;
}

.today-head span {
  color: var(--lime);
  font-size: 12px;
  font-weight: 900;
}

.today-head strong {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.25;
}

.today-card p,
.rhythm-card p {
  color: #d8ded2;
  font-size: 13px;
  line-height: 1.5;
}

.today-card > button,
.rhythm-card > button {
  width: 100%;
  min-height: 46px;
}

.backup-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.backup-row .ghost-action {
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #e8ebdf;
  box-shadow: none;
}

.rhythm-card h2 {
  margin-bottom: -4px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.schedule-item.done {
  opacity: 0.68;
}

.schedule-hero,
.schedule-progress-panel,
.schedule-footer,
.schedule-action {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-block: 74px 128px;
  box-shadow: var(--shadow-soft);
}

.schedule-hero {
  display: grid;
  gap: 10px;
  overflow: hidden;
  border-color: rgba(110, 199, 59, 0.34);
  background:
    linear-gradient(180deg, rgba(110, 199, 59, 0.16), rgba(255, 255, 255, 0.045)),
    #2d3034;
  padding: 14px;
}

.schedule-hero.done {
  border-color: rgba(255, 255, 255, 0.12);
}

.schedule-hero.schedule-focus-target,
.schedule-action.schedule-focus-target {
  border-color: rgba(110, 199, 59, 0.72);
  box-shadow:
    0 0 0 3px rgba(110, 199, 59, 0.16),
    0 18px 34px rgba(110, 199, 59, 0.16);
  animation: scheduleFocusPulse 1.5s ease-out;
}

.schedule-hero-kicker,
.schedule-progress-head,
.schedule-progress-stats,
.schedule-group-head,
.action-title-line,
.action-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schedule-hero-kicker span,
.schedule-progress-head span,
.schedule-footer span {
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
}

.schedule-hero-kicker strong,
.schedule-progress-head em {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d8ded2;
  padding: 5px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.schedule-hero-kicker {
  align-items: flex-start;
}

.schedule-hero-kicker span {
  flex: 0 0 auto;
}

.schedule-hero-kicker strong {
  max-width: 76%;
  line-height: 1.25;
  text-align: right;
  white-space: normal;
}

.schedule-progress-stats {
  align-items: flex-start;
}

.schedule-hero h2 {
  color: #ffffff;
  font-size: 20px;
  line-height: 1.2;
}

.schedule-hero p,
.schedule-rhythm-note,
.schedule-footer p,
.schedule-group-head p,
.action-copy p {
  color: #d8ded2;
  font-size: 13px;
  line-height: 1.45;
}

.schedule-rhythm-note {
  border: 1px solid rgba(110, 199, 59, 0.22);
  border-radius: 8px;
  background: rgba(110, 199, 59, 0.08);
  padding: 8px 9px;
  color: #e8ebdf;
  font-weight: 800;
}

.schedule-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.schedule-hero-meta span {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #e8ebdf;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 900;
}

.schedule-primary-btn {
  width: 100%;
}

.schedule-primary-btn.move,
.schedule-action button.move {
  border: 1px solid rgba(69, 137, 214, 0.38);
  background: rgba(69, 137, 214, 0.16);
  color: #cfe7ff;
  box-shadow: 0 8px 16px rgba(69, 137, 214, 0.13);
}

.schedule-primary-btn.blocked,
.schedule-action button.blocked {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.08);
  color: #d8ded2;
  box-shadow: none;
}

.schedule-primary-btn.light,
.schedule-action button.light {
  border: 1px solid rgba(255, 143, 0, 0.34);
  background: rgba(255, 143, 0, 0.16);
  color: #ffd6a0;
  box-shadow: 0 8px 16px rgba(255, 143, 0, 0.12);
}

.schedule-progress-panel {
  display: grid;
  gap: 9px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
}

.schedule-progress-head strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
}

.schedule-progress-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.schedule-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), #9ee67b);
}

.schedule-progress-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.schedule-track {
  display: grid;
  gap: 12px;
}

.schedule-group {
  display: grid;
  gap: 8px;
}

.schedule-group-head {
  align-items: flex-start;
  padding: 2px 2px 0;
}

.group-symbol {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: var(--icon-box-compact);
  height: var(--icon-box-compact);
  border: 1px solid rgba(var(--group-rgb), 0.36);
  border-radius: 10px;
  background: rgba(var(--group-rgb), 0.16);
  color: var(--group-color);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.schedule-group-head div {
  min-width: 0;
  flex: 1 1 auto;
}

.schedule-group-head h2 {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.15;
}

.schedule-group-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.schedule-group-head strong {
  flex: 0 0 auto;
  min-width: 36px;
  color: var(--group-color);
  font-size: 20px;
  line-height: 1;
  text-align: right;
}

.schedule-action {
  display: grid;
  gap: 9px;
  border-color: rgba(255, 255, 255, 0.095);
  background:
    linear-gradient(180deg, rgba(var(--group-rgb), 0.1), rgba(255, 255, 255, 0.035)),
    #2b2e33;
  padding: 11px;
}

.schedule-action.featured {
  border-color: rgba(var(--group-rgb), 0.46);
}

.schedule-action.move {
  border-color: rgba(69, 137, 214, 0.36);
}

.action-reason,
.form-reason {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  border: 1px solid rgba(255, 143, 0, 0.32);
  border-radius: 10px;
  background: rgba(255, 143, 0, 0.08);
  padding: 10px 11px;
  color: #f4dfbf;
  font-size: 12px;
  line-height: 1.55;
  outline: none;
}

.action-reason strong {
  color: #ffbe68;
  font-size: 12px;
}

.action-reason p {
  margin: 0;
  color: #f2e1c6;
}

.action-reason span,
.form-reason {
  color: #d8ded2;
}

.reason-next {
  justify-self: start;
  min-height: 32px;
  border: 1px solid rgba(110, 199, 59, 0.45);
  border-radius: 8px;
  background: rgba(110, 199, 59, 0.12);
  color: #c7f4ae;
  padding: 6px 9px;
  font: inherit;
  font-weight: 700;
}

.reason-next.close-day {
  border-color: rgba(255, 190, 104, 0.38);
  background: rgba(255, 190, 104, 0.1);
  color: #ffe0ab;
}

.action-reason-focus,
.form-reason-focus {
  border-color: rgba(110, 199, 59, 0.9);
  box-shadow: 0 0 0 3px rgba(110, 199, 59, 0.18), 0 12px 24px rgba(0, 0, 0, 0.16);
}
.schedule-action.blocked {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.026)),
    #272a2f;
}

.schedule-action.light {
  border-color: rgba(255, 143, 0, 0.32);
}

.schedule-action.done {
  opacity: 0.68;
}

@keyframes scheduleFocusPulse {
  0% {
    transform: translateY(2px) scale(0.99);
  }

  38% {
    transform: translateY(0) scale(1.01);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

.schedule-action-top {
  display: grid;
  grid-template-columns: var(--icon-box-compact) minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.action-symbol {
  display: grid;
  place-items: center;
  width: var(--icon-box-compact);
  height: var(--icon-box-compact);
  border: 1px solid rgba(var(--group-rgb), 0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--group-color);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.action-copy {
  min-width: 0;
}

.action-title-line {
  justify-content: flex-start;
  gap: 7px;
}

.action-title-line h3 {
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-title-line span,
.readiness-pill {
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.action-title-line span {
  background: rgba(var(--group-rgb), 0.18);
  color: var(--group-color);
}

.action-copy p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.readiness-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #d8ded2;
}

.readiness-pill.ok {
  background: rgba(110, 199, 59, 0.16);
  color: var(--lime);
}

.readiness-pill.light {
  background: rgba(255, 143, 0, 0.16);
  color: #ffc27a;
}

.readiness-pill.move {
  background: rgba(69, 137, 214, 0.16);
  color: #9fc8f4;
}

.readiness-pill.later,
.readiness-pill.hold {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.readiness-pill.done {
  background: rgba(69, 137, 214, 0.16);
  color: #9fc8f4;
}

.impact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.impact-row span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: #e8ebdf;
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 900;
}

.impact-row .up {
  background: rgba(110, 199, 59, 0.14);
  color: var(--lime);
}

.impact-row .down {
  background: rgba(255, 89, 95, 0.12);
  color: #ffb0b3;
}

.action-place {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.action-place span {
  max-width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #d8ded2;
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.action-place .weather-good {
  background: rgba(110, 199, 59, 0.15);
  color: var(--lime);
}

.action-place .weather-soft {
  background: rgba(69, 137, 214, 0.14);
  color: #9fc8f4;
}

.action-place .weather-caution {
  background: rgba(255, 143, 0, 0.15);
  color: #ffc27a;
}

.action-place .weather-block {
  background: rgba(255, 89, 95, 0.13);
  color: #ffb0b3;
}

.schedule-action button {
  flex: 0 0 auto;
  min-width: 88px;
  white-space: nowrap;
}

.schedule-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
}

.night-close-card {
  border-color: rgba(110, 199, 59, 0.22);
  background:
    linear-gradient(100deg, rgba(110, 199, 59, 0.09), transparent 48%),
    rgba(255, 255, 255, 0.045);
}

.night-close-card.done {
  border-color: rgba(110, 199, 59, 0.12);
  background:
    linear-gradient(100deg, rgba(110, 199, 59, 0.05), transparent 48%),
    rgba(255, 255, 255, 0.03);
}

.night-close-card.done span {
  color: #a7bc9b;
}

.schedule-footer h2 {
  margin: 4px 0 5px;
  color: #ffffff;
  font-size: 16px;
}

.schedule-footer button {
  min-width: 88px;
}

.bond-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
}

.bond-panel div {
  min-height: 84px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.bond-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bond-panel strong {
  display: block;
  margin-top: 10px;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
}

.memory-overview {
  margin-top: 8px;
}

.memory-overview div {
  min-height: 68px;
  padding: 10px 9px;
}

.memory-overview span {
  font-size: 11px;
}

.memory-overview strong {
  margin-top: 8px;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
}

.memory-list {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.memory-list::before {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 13px;
  width: 1px;
  content: "";
  background: linear-gradient(180deg, rgba(110, 199, 59, 0.7), rgba(110, 199, 59, 0.08));
}

.memory-list.hidden {
  display: none;
}

.memory-mode-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 2px 0;
  border: 1px solid rgba(110, 199, 59, 0.12);
  border-radius: 999px;
  background: rgba(110, 199, 59, 0.07);
  padding: 6px 10px;
  color: #c9d2c1;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.memory-mode-note::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px rgba(110, 199, 59, 0.45);
  content: "";
}

.memory-card {
  position: relative;
  padding: 12px 12px 12px 34px;
  overflow: hidden;
}

.memory-card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 58px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(110, 199, 59, 0.48));
}

.memory-dot {
  position: absolute;
  top: 16px;
  left: 9px;
  z-index: 1;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(36, 36, 36, 0.9);
  border-radius: 50%;
  background: var(--lime);
  box-shadow:
    0 0 0 3px rgba(110, 199, 59, 0.14),
    0 0 16px rgba(110, 199, 59, 0.3);
}

.memory-empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.032);
}

.memory-card time {
  display: block;
  margin-top: 9px;
  color: #bceea2;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
}

.history-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.history-panel.hidden {
  display: none;
}

.history-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(110, 199, 59, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.045);
  padding: 12px 12px 12px 36px;
}

.history-card h2 {
  margin-bottom: 6px;
  color: #ffffff;
}

.history-card p {
  color: #cbd0c4;
  font-size: 13px;
  line-height: 1.45;
}

.history-card time {
  display: block;
  margin-top: 8px;
  color: #bceea2;
  font-size: 11px;
  font-weight: 900;
}

.history-card.muted {
  opacity: 0.78;
}

.history-mark {
  position: absolute;
  top: 14px;
  left: 12px;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(110, 199, 59, 0.62);
  border-radius: 4px;
  background: rgba(110, 199, 59, 0.12);
  transform: rotate(45deg);
}

.wardrobe-preview {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 158px;
  overflow: hidden;
  padding: 14px 12px;
}

.wardrobe-sketch {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 146px;
  overflow: hidden;
  border: 1px solid rgba(110, 199, 59, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    rgba(255, 255, 255, 0.04);
  background-size: 18px 18px, 18px 18px, auto;
}

.wardrobe-sketch img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 10px 6px;
  filter: drop-shadow(0 3px 7px rgba(110, 199, 59, 0.2));
}

.wardrobe-copy h2 {
  margin-bottom: 8px;
}

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

.form-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.tabbar {
  position: fixed;
  left: 50vw;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  width: min(calc(100vw - 24px), var(--tabbar-max));
  height: 78px;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  overflow: visible;
  transform: translateX(-50%);
  padding: 8px 10px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 25px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035)),
    rgba(31, 33, 39, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(110, 199, 59, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tabbar::before,
.tabbar::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.tabbar::before {
  left: 22px;
  right: 22px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 199, 59, 0.64), transparent);
}

.tabbar::after {
  left: 28%;
  right: 28%;
  bottom: -8px;
  height: 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(8px);
}

.tab {
  position: relative;
  display: grid;
  grid-template-rows: 32px 16px;
  align-content: center;
  justify-items: center;
  min-width: 0;
  min-height: 59px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  padding: 6px 0 4px;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.tab:focus {
  outline: none;
}

.tab:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(110, 199, 59, 0.34);
}

.tab .tab-icon {
  position: relative;
  display: grid;
  isolation: isolate;
  flex: 0 0 auto;
  place-items: center;
  width: var(--icon-box);
  height: var(--icon-box);
  margin: 0 auto 2px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: currentColor;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 16px rgba(110, 199, 59, 0);
}

.tab small {
  display: block;
  font-size: 11px;
  font-weight: 900;
  line-height: 16px;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.tab.active {
  color: var(--lime);
  background: rgba(110, 199, 59, 0.08);
}

.tab.active .tab-icon {
  border-color: rgba(110, 199, 59, 0.34);
  background: rgba(110, 199, 59, 0.16);
  color: var(--lime);
  text-shadow: 0 0 16px var(--glow);
}

.tab:nth-child(3) {
  grid-template-rows: 50px 16px;
  min-height: 70px;
  margin-top: -16px;
  color: var(--lime-ink);
  background: transparent;
}

.tab:nth-child(3):focus-visible {
  box-shadow: none;
}

.tab:nth-child(3):focus-visible .tab-icon::before {
  box-shadow:
    0 13px 22px rgba(0, 0, 0, 0.38),
    0 0 0 2px rgba(110, 199, 59, 0.35),
    0 0 28px var(--glow);
}

.tab:nth-child(3) .tab-icon {
  position: relative;
  width: var(--icon-box-float);
  height: var(--icon-box-float);
  margin-bottom: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 24px;
  text-shadow: none;
}

.tab:nth-child(3) .tab-icon::before {
  position: absolute;
  inset: 8px;
  z-index: -1;
  border: 4px solid #202228;
  border-radius: 14px;
  background: var(--lime);
  box-shadow:
    0 13px 22px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 24px var(--glow);
  content: "";
  transform: rotate(45deg);
}

.tab:nth-child(3).active .tab-icon,
.tab:nth-child(3) .tab-icon {
  color: #ffffff;
}

.tab:nth-child(3) small {
  margin-top: 0;
  border-radius: 999px;
  background: rgba(31, 33, 39, 0.86);
  color: var(--muted);
  padding: 1px 7px;
  line-height: 14px;
}

.tab:nth-child(3).active small {
  background: rgba(110, 199, 59, 0.13);
  color: var(--lime);
}

.tab .tab-icon::before,
.tab .tab-icon::after {
  position: absolute;
  left: 50%;
  top: 50%;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.tab .tab-icon::after {
  z-index: 1;
  width: 25px;
  height: 25px;
  background: currentColor;
  filter: drop-shadow(0 0 7px rgba(110, 199, 59, 0));
  -webkit-mask: var(--tab-icon-mask) center / contain no-repeat;
  mask: var(--tab-icon-mask) center / contain no-repeat;
}

.tab.active .tab-icon::after {
  filter: drop-shadow(0 0 8px rgba(110, 199, 59, 0.42));
}

.tab-home {
  --tab-icon-mask: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 15.2 16 6.2l10.5 9'/%3E%3Cpath d='M8.2 13.5v12h15.6v-12'/%3E%3Cpath d='M13.4 25.5v-7h5.2v7'/%3E%3Cpath d='m24 5.2 1.35 3.05 3.15.32-2.38 2.15.68 3.08L24 12.17l-2.8 1.63.68-3.08-2.38-2.15 3.15-.32L24 5.2Z'/%3E%3C/g%3E%3C/svg%3E");
}

.tab-map {
  --tab-icon-mask: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 4.8c5 0 8.7 3.7 8.7 8.4 0 6.1-8.7 14-8.7 14s-8.7-7.9-8.7-14c0-4.7 3.7-8.4 8.7-8.4Z'/%3E%3Ccircle cx='16' cy='13.2' r='3'/%3E%3Cpath d='M7 25.8c2.5-1.8 5.5-2.4 9-1.7 3.5.7 6.5.1 9-1.7'/%3E%3C/g%3E%3C/svg%3E");
}

.tab-log {
  --tab-icon-mask: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 13.2h7.1l2.2 2.8h11.7v9.7a2 2 0 0 1-2 2h-17a2 2 0 0 1-2-2V13.2Z'/%3E%3Cpath d='M8.2 13.2V8.8a2 2 0 0 1 2-2h8.7l4.9 4.9v4.3'/%3E%3Cpath d='M18.9 7v5h4.9'/%3E%3Cpath d='M11.5 20.5h8.8M11.5 24h5.8'/%3E%3Cpath d='M26.4 17.6v6.2'/%3E%3C/g%3E%3C/svg%3E");
}

.tab-form {
  --tab-icon-mask: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.3 6.5 7 8.8l-2 8.7 4 1.1 1.3-4.5v12h11.4v-12l1.3 4.5 4-1.1-2-8.7-4.3-2.3'/%3E%3Cpath d='M11.3 6.5c1 2.1 2.6 3.2 4.7 3.2s3.7-1.1 4.7-3.2'/%3E%3Cpath d='M13 6.3h6l-3 3.4-3-3.4Z'/%3E%3Cpath d='M12.6 21.3h6.8'/%3E%3Cpath d='m25.8 22.6.62 1.45 1.48.6-1.48.6-.62 1.45-.62-1.45-1.48-.6 1.48-.6.62-1.45Z'/%3E%3C/g%3E%3C/svg%3E");
}

.tab .tab-icon.tab-card::after {
  width: 27px;
  height: 27px;
  background: currentColor;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.34));
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='3.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 6.8h17.8a3.2 3.2 0 0 1 3.2 3.2v20a3.2 3.2 0 0 1-3.2 3.2H11A3.2 3.2 0 0 1 7.8 30V10A3.2 3.2 0 0 1 11 6.8Z'/%3E%3Cpath d='M26.2 6.8v6.4H32'/%3E%3Cpath d='m20 12.4 2.4 5.2 5.6.6-4.2 3.7 1.2 5.5-5-2.9-5 2.9 1.2-5.5-4.2-3.7 5.6-.6L20 12.4Z'/%3E%3Cpath d='M11.8 11.6h5.2M11.8 29h4.4'/%3E%3Cpath d='m31.6 24.6.7 1.6 1.7.7-1.7.7-.7 1.6-.7-1.6-1.7-.7 1.7-.7.7-1.6Z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='3.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 6.8h17.8a3.2 3.2 0 0 1 3.2 3.2v20a3.2 3.2 0 0 1-3.2 3.2H11A3.2 3.2 0 0 1 7.8 30V10A3.2 3.2 0 0 1 11 6.8Z'/%3E%3Cpath d='M26.2 6.8v6.4H32'/%3E%3Cpath d='m20 12.4 2.4 5.2 5.6.6-4.2 3.7 1.2 5.5-5-2.9-5 2.9 1.2-5.5-4.2-3.7 5.6-.6L20 12.4Z'/%3E%3Cpath d='M11.8 11.6h5.2M11.8 29h4.4'/%3E%3Cpath d='m31.6 24.6.7 1.6 1.7.7-1.7.7-.7 1.6-.7-1.6-1.7-.7 1.7-.7.7-1.6Z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(108px + env(safe-area-inset-bottom));
  z-index: 30;
  width: min(88vw, 362px);
  min-height: 42px;
  padding: 11px 13px;
  border: 1px solid rgba(110, 199, 59, 0.22);
  border-radius: var(--radius);
  background: rgba(20, 21, 27, 0.94);
  color: #ffffff;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes mapCurrentPulse {
  0% {
    opacity: 0.48;
    transform: scale(0.96);
  }

  72%,
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes mapCurrentGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(110, 199, 59, 0.12),
      0 14px 24px rgba(0, 0, 0, 0.3);
  }

  50% {
    box-shadow:
      0 0 0 5px rgba(110, 199, 59, 0.2),
      0 0 24px rgba(110, 199, 59, 0.24),
      0 14px 24px rgba(0, 0, 0, 0.3);
  }
}

@keyframes mapRouteFlow {
  to {
    stroke-dashoffset: -24;
  }
}

@keyframes mapOrbitInner {
  to {
    transform: translate(-50%, -50%) rotate(348deg);
  }
}

@keyframes mapOrbitOuter {
  to {
    transform: translate(-50%, -50%) rotate(373deg);
  }
}

@media (min-height: 780px) {
  .scene-band {
    min-height: 328px;
  }

  .xiaoqi-img {
    height: 240px;
  }

  .xiaoqi-img[data-form="outdoor"] {
    height: 244px;
  }

  .xiaoqi-img[data-form="quiet"] {
    height: 198px;
  }
}

@media (max-width: 360px) {
  :root {
    --tabbar-max: 346px;
    --page-pad: 12px;
  }

  .screen {
    padding-left: 12px;
    padding-right: 12px;
  }

  h1 {
    font-size: 25px;
  }

  .status-grid,
  .action-strip {
    gap: 7px;
  }

  .primary-action,
  .status-tile {
    padding-left: 9px;
    padding-right: 9px;
  }

  .wardrobe-preview {
    grid-template-columns: 96px 1fr;
  }

  .wardrobe-sketch {
    width: 96px;
    height: 125px;
  }

  .schedule-hero h2 {
    font-size: 19px;
  }

  .hud-pill {
    max-width: 158px;
    padding-inline: 9px;
  }

  .brand-mark {
    font-size: 15px;
    letter-spacing: 1.2px;
  }

  .profile-action {
    width: 42px;
    height: 42px;
  }

  .summary-pair strong {
    font-size: 18px;
  }

  .earth-time-panel {
    gap: 6px;
  }

  .earth-time-panel article {
    padding: 9px 8px;
  }

  .earth-time-panel strong {
    font-size: 17px;
  }

  .star-node {
    width: 78px;
    min-width: 78px;
    height: 62px;
    min-height: 62px;
  }

  .tabbar {
    width: min(calc(100vw - 20px), var(--tabbar-max));
    padding-inline: 8px;
  }

  .tab small {
    font-size: 10.5px;
  }

  .schedule-action-top {
    grid-template-columns: var(--icon-box-compact) minmax(0, 1fr);
  }

  .action-symbol {
    width: var(--icon-box-compact);
    height: var(--icon-box-compact);
  }

  .readiness-pill {
    grid-column: 2;
    justify-self: start;
  }

  .action-footer,
  .schedule-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .schedule-action button,
  .schedule-footer button {
    width: 100%;
  }

  .night-dialog {
    padding: 12px;
  }

  .night-dialog-card {
    width: 100%;
  }

  .night-dialog-actions {
    grid-template-columns: 1fr;
  }

  .log-compose-action {
    min-width: 68px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .memory-tab {
    padding-inline: 7px;
    font-size: 11.5px;
  }

  .memory-overview div {
    min-height: 64px;
    padding-inline: 7px;
  }

  .memory-overview strong {
    font-size: 16px;
  }
}

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