.sun-page {
  --shell-max: 520px;
  --nav-max: 520px;
  --page-bg: radial-gradient(
      circle at 20% 10%,
      rgba(255, 222, 189, 0.65),
      transparent 35%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 210, 150, 0.55),
      transparent 35%
    ),
    linear-gradient(180deg, #fff2e2 0%, #ffe2c8 50%, #f9d3ac 100%);
  /* Theme variables (sun defaults) */
  --sheet-start: #fff6eb;
  --sheet-end: #ffe9d3;
  --mission-start: #fff4e3;
  --mission-mid: #ffe6c9;
  --mission-end: #ffdcb3;
  --mission-shadow: 0 14px 36px rgba(130, 83, 34, 0.12);
  --text-strong: #4d2e16;
  --text-muted: #7a5637;
  --difficulty-bg: rgba(60, 43, 28, 0.08);
  --pill-start: #ffe1c3;
  --pill-end: #f9d2ad;
  --nav-start: rgba(255, 238, 216, 0.96);
  --nav-end: rgba(255, 223, 189, 0.98);
  --active-start: #ffe9bf;
  --active-end: #ffc57a;
  --icon-start: #ffe9c7;
  --icon-end: #ffd493;
  --icon-color: #c27a1a;
  --nav-icon-color: #6b3c18;
  --duration-inner: radial-gradient(circle, #fff4e5, #ffe6c9);
  --duration-text: #4f2f18;
  --hero-text: #5c3615;
  --hero-text-muted: #6e4623;
  --card-highlight: radial-gradient(
    circle at 80% 50%,
    rgba(255, 205, 133, 0.4),
    transparent 45%
  );
  --hero-overlay: linear-gradient(
    180deg,
    rgba(255, 232, 203, 0.35) 0%,
    rgba(255, 215, 176, 0.2) 45%,
    rgba(248, 196, 145, 0.45) 100%
  );
  --hero-disk: radial-gradient(
    circle,
    #ffe9c9 0%,
    #ffd89a 45%,
    rgba(255, 214, 138, 0.75) 70%,
    rgba(255, 214, 138, 0.2) 100%
  );
  --hero-disk-glow: rgba(255, 194, 102, 0.45);
  --nav-icon-start: #ffc879;
  --nav-icon-end: #f29c3e;
  --nav-border: rgba(255, 205, 150, 0.5);
  --nav-icon-bg: rgba(255, 230, 202, 0.7);
  font-family: "Manrope", "Space Grotesk", "SF Pro Text", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: #5c3b20;
  padding: 0;
  margin: 0;
}

html,
body.sun-page {
  margin: 0;
  padding: 0;
  display: block;
  justify-content: flex-start;
  align-items: stretch;
  min-height: 100vh;
}

.app-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--shell-max, 520px);
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 0 140px;
  position: relative;
}

.hero-banner {
  position: relative;
  height: 28vh;
  border-radius: 0 !important;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(141, 92, 42, 0.18);
  isolation: isolate;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  border-radius: 0 !important;
}

.is-home .hero-banner,
.is-home .tagline-pill {
  display: none;
}

.tagline-pill {
  margin: 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  width: calc(100% - 24px);
  position: absolute;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  text-align: center;
  background: linear-gradient(120deg, var(--pill-start), var(--pill-end));
  box-shadow: 0 12px 36px rgba(140, 86, 35, 0.15);
  color: var(--text-strong);
}

.tagline-pill .pill-icon {
  width: 34px;
  height: 34px;
  border-radius: 17px;
  background: radial-gradient(circle, #ffe9c9 0%, #f7c36a 100%);
  display: grid;
  place-items: center;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.6),
    0 8px 18px rgba(120, 75, 28, 0.18);
  font-size: 20px;
}

.pill-emoji {
  display: inline-block;
}

.tagline-pill .pill-text {
  font-weight: 700;
  font-size: 14px;
}

.page-sheet {
  position: relative;
  margin-top: -30px;
  background: transparent;
  border-radius: 30px 30px 0 0;
  padding: 20px 14px;
  margin-bottom: -160px;
  min-height: 100vh;
  box-shadow: 0 -8px 30px rgba(135, 82, 34, 0.08);
  overflow: visible;
  z-index: 3;
}

.theme-sun .page-sheet,
.theme-home .page-sheet,
.theme-move .page-sheet,
.theme-food .page-sheet,
.theme-social .page-sheet,
.theme-sleep .page-sheet {
  background: linear-gradient(
    180deg,
    var(--sheet-start) 0%,
    var(--sheet-end) 100%
  );
}

.is-home .page-sheet {
  margin-top: 0;
  border-radius: 0;
  box-shadow: none;
  padding-top: 28px;
  min-height: 100vh;
}

.sheet-heading {
  text-align: center;
  color: var(--text-strong);
  position: relative;
  padding-top: 6px;
}

.sheet-heading h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.sheet-heading p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.back-button {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 6;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  color: var(--text-strong);
}

.back-button .back-emoji {
  font-size: 20px;
  line-height: 1;
}

.missions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 4px 4px;
}

.mission-card {
  position: relative;
  padding: 14px 14px 24px;
  border-radius: 20px;
  background: linear-gradient(
    120deg,
    var(--mission-start),
    var(--mission-mid),
    var(--mission-end)
  );
  box-shadow: var(--mission-shadow);
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 180ms ease;
  min-height: unset;
  cursor: pointer;
}

.mission-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--card-highlight);
  pointer-events: none;
}

.mission-card:active {
  transform: translateY(1px) scale(0.997);
  box-shadow: 0 10px 24px rgba(130, 83, 34, 0.16);
}

.mission-card.completed {
  opacity: 0.6;
}

.confetti-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.confetti {
  position: absolute;
  width: 8px;
  height: 14px;
  background: var(--confetti-color, #f4b93c);
  border-radius: 2px;
  animation: confetti-burst 1s ease-out forwards;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.15));
}

@keyframes confetti-burst {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(0, -80px) rotate(320deg) scale(0.6);
    opacity: 0;
  }
}

.sun-page .nav .nav-primary .item svg {
  color: #6b3c18 !important;
  fill: currentColor;
}

.mission-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  z-index: 1;
}

.mission-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(140deg, var(--icon-start), var(--icon-end));
  display: grid;
  place-items: center;
  box-shadow: inset 0 6px 12px rgba(255, 255, 255, 0.6),
    0 8px 22px rgba(120, 80, 30, 0.16);
  color: var(--icon-color);
}

.mission-icon svg {
  width: 32px;
  height: 32px;
  color: inherit;
}

.mission-emoji {
  font-size: 28px;
  line-height: 1;
}

.mission-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mission-copy h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
}

.difficulty {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  background: var(--difficulty-bg);
}

.difficulty.easy {
  background: rgba(48, 154, 91, 0.18);
  color: #22613a;
}

.difficulty.medium {
  background: rgba(210, 146, 32, 0.2);
  color: #825100;
}

.difficulty.dedicated {
  background: rgba(199, 68, 37, 0.18);
  color: #8c2c0c;
}

.mission-copy .description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.35;
}

.mission-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 1;
  position: relative;
  padding-bottom: 0;
}

.hydration-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(140deg, #b8e9ff, #7fd3ff);
  color: #0f2a3a;
  font-weight: 800;
  font-size: 14px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6),
    0 8px 18px rgba(0, 140, 200, 0.2);
  white-space: nowrap;
}

.duration {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--duration-inner);
  display: grid;
  place-items: center;
  box-shadow: inset 0 6px 10px rgba(255, 255, 255, 0.7),
    0 10px 22px rgba(123, 82, 36, 0.14);
}

.duration .ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #f3ad42 0deg,
    #f8c061 270deg,
    rgba(243, 173, 66, 0.15) 330deg,
    rgba(243, 173, 66, 0.15) 360deg
  );
  mask: radial-gradient(circle at center, transparent 62%, #000 63%);
}

.duration .duration-text {
  position: relative;
  text-align: center;
  color: var(--duration-text);
  font-weight: 700;
  display: grid;
  gap: 2px;
}

.duration .value {
  font-size: 16px;
}

.duration .unit {
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.points-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 12px rgba(244, 181, 58, 0.55))
    drop-shadow(0 0 18px rgba(244, 181, 58, 0.35));
}

.points-badge svg {
  width: 100%;
  height: 100%;
}

.points-text {
  position: absolute;
  text-align: center;
  color: var(--text-strong);
  font-weight: 800;
  display: grid;
  place-items: center;
  gap: 1px;
}

.points-text .value {
  font-size: 20px;
}

.points-text small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: capitalize;
}

.undo-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  white-space: nowrap;
  padding: 8px 12px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.65)
  );
  color: var(--text-strong);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.theme-move .undo-btn {
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.1)
  );
  color: #eef1f6;
}

.theme-food .undo-btn {
  background: rgba(31, 90, 47, 0.1);
  color: #1f5a2f;
}

.theme-social .undo-btn {
  background: rgba(106, 54, 16, 0.12);
  color: #6a3610;
}

.theme-sleep .undo-btn {
  background: rgba(90, 17, 17, 0.12);
  color: #5a1111;
}

.mission-card .checkmark {
  display: none;
}

.sun-page {
}

.sun-page .nav {
  box-sizing: border-box;
  width: min(100%, var(--nav-max, 520px));
  max-width: 100%;
  left: 0;
  right: 0;
  margin: 0 auto;
  transform: none;
  background: linear-gradient(180deg, var(--nav-start), var(--nav-end));
  border-radius: 0;
  box-shadow: 0 -16px 40px rgba(130, 84, 39, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  padding: 0;
  border: none;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
  margin: 0;
}

@media (min-width: 768px) {
  .sun-page .nav {
    width: min(100%, var(--nav-max, 760px));
    max-width: var(--nav-max, 760px);
    left: 0;
    right: 0;
    margin: 0 auto;
    transform: none;
  }
}

.sun-page .nav .nav-primary .nav-items {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px 12px 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  width: 100%;
  justify-items: stretch;
}

.sun-page .nav .nav-secondary {
  padding: 8px 12px 0;
}

.sun-page .nav .nav-secondary .pillar-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.sun-page .nav .item {
  gap: 6px;
  padding: 10px 8px;
  border-radius: 14px;
  color: var(--icon-color, var(--text-muted));
  font-weight: 700;
  width: 100%;
  box-sizing: border-box;
}
.sun-page .nav .item .label {
  color: inherit;
  word-break: keep-all;
  white-space: nowrap;
}

.sun-page .nav .nav-secondary .item .icon {
  position: relative;
}

.nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f59e0b;
  color: #0f172a;
  font-size: 10px;
  display: none;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.nav-badge.done {
  background: #22c55e;
  color: #0f172a;
}

.nav-badge.warn {
  background: #f59e0b;
  color: #0f172a;
}

.sun-page .nav .nav-secondary .nav-badge {
  display: none;
}

.sun-page .nav .nav-secondary .item .nav-badge {
  display: grid;
}

.sun-page .nav .nav-points {
  background: transparent;
  padding: 4px 12px 10px;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.sun-page .nav .nav-points .chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, #ffda8c, #f4b93c);
  border-radius: 6px;
  padding: 4px 8px;
  color: #4d2e16;
}

.sun-page .nav .nav-points .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7a5637;
  font-weight: 800;
}

.sun-page .nav .nav-points .value {
  font-size: 13px;
  font-weight: 800;
}

/* Home theme */
.theme-home {
  --page-bg: linear-gradient(180deg, #fff6ed 0%, #ffe9d8 50%, #ffd9b8 100%);
  --sheet-start: #fffdf9;
  --sheet-end: #ffeedd;
  --mission-start: #fff9f1;
  --mission-mid: #ffe7cc;
  --mission-end: #ffd7ad;
  --mission-shadow: 0 14px 36px rgba(200, 120, 60, 0.14);
  --text-strong: #4d2e16;
  --text-muted: #7a5637;
  --difficulty-bg: rgba(140, 90, 40, 0.12);
  --pill-start: #ffe3c9;
  --pill-end: #ffd1a6;
  --active-start: #ffdba6;
  --active-end: #ffb96a;
  --icon-start: #ffe3c9;
  --icon-end: #ffc894;
  --icon-color: #8a4c17;
  --duration-inner: radial-gradient(circle, #fff7ec, #ffe3c9);
  --duration-text: #4d2e16;
  --card-highlight: radial-gradient(
    circle at 80% 50%,
    rgba(255, 205, 150, 0.32),
    transparent 45%
  );
  --hero-text: #4d2e16;
  --hero-text-muted: #7a5637;
}

.theme-tools {
  --page-bg: linear-gradient(180deg, #fff6ed 0%, #ffe9d8 50%, #ffd9b8 100%);
  --sheet-start: #fffdf9;
  --sheet-end: #ffeedd;
  --mission-start: #fff9f1;
  --mission-mid: #ffe7cc;
  --mission-end: #ffd7ad;
  --mission-shadow: 0 14px 36px rgba(200, 120, 60, 0.14);
  --text-strong: #4d2e16;
  --text-muted: #7a5637;
  --difficulty-bg: rgba(140, 90, 40, 0.12);
  --pill-start: #ffe3c9;
  --pill-end: #ffd1a6;
  --active-start: #ffdba6;
  --active-end: #ffb96a;
  --icon-start: #ffe3c9;
  --icon-end: #ffc894;
  --icon-color: #8a4c17;
  --duration-inner: radial-gradient(circle, #fff7ec, #ffe3c9);
  --duration-text: #4d2e16;
}

.home-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 4px 12px;
}

.is-tools .hero-banner,
.is-settings .hero-banner,
.is-tools .tagline-pill,
.is-settings .tagline-pill {
  display: none !important;
}

.is-tools .page-sheet,
.is-settings .page-sheet {
  margin-top: 0;
  padding-top: 16px;
  overflow: visible;
  min-height: auto;
  padding-bottom: 200px;
}

.settings-card {
  background: linear-gradient(135deg, #fff9f1, #fff);
  border: 1px solid #e9e2d8;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: #4d2e16;
  margin-bottom: 6px;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #5c3b20;
}

.settings-row span:first-child {
  color: #7a5637;
}

.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.home-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 12px;
  align-items: center;
  background-color: #f4f6fb;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.lift-card {
  margin-top: 10px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 233, 210, 0.6), #fff7ed);
  border: 1px solid rgba(255, 205, 150, 0.35);
  box-shadow: 0 16px 36px rgba(140, 90, 40, 0.14);
  color: #4d2e16;
  display: grid;
  gap: 14px;
}

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

.lift-header h3 {
  margin: 0;
  font-size: 18px;
}

.lift-header p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #4b5568;
}

.target-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0 4px;
}

.target-text {
  font-size: 12px;
  color: #4b5568;
  font-weight: 700;
}

.target-picker {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 4px;
  background: #fffaf3;
  border: 1px solid rgba(255, 188, 120, 0.5);
  border-radius: 12px;
  padding: 6px 8px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.target-btn {
  border: none;
  background: linear-gradient(140deg, #ffcc87, #f4b93c);
  color: #4d2e16;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.target-input {
  width: 64px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 188, 120, 0.5);
  border-radius: 10px;
  text-align: center;
  font-weight: 800;
  background: #fff;
}

.target-prefix,
.target-suffix {
  font-size: 11px;
  font-weight: 800;
  color: #4b5568;
}

.lift-rows {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  width: 100%;
}

.lift-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 188, 120, 0.5);
}

.lift-row-label {
  font-weight: 800;
  color: #4d2e16;
}

.lift-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.lift-row input {
  padding: 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 188, 120, 0.5);
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  background: #fffaf3;
}

.lift-save-all {
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(140deg, #ffd899, #f4b93c);
  color: #4d2e16;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(140, 90, 40, 0.16);
  width: 100%;
}

.lift-panel {
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.lift-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 14px;
  color: #1f2430;
  margin-bottom: 6px;
}

.lift-latest {
  font-size: 12px;
  color: #4b5568;
}

.lift-empty {
  font-size: 12px;
  color: #4b5568;
}

.lift-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.lift-chart-canvas {
  width: 100%;
  max-width: 100%;
  height: 320px;
  display: block;
}

.lift-chart {
  width: 100%;
  height: 90px;
}

@media (max-width: 560px) {
  .lift-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .target-bar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .target-picker {
    width: 100%;
  }

  .lift-row {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .lift-inputs {
    grid-template-columns: 1fr 1fr;
  }

  .lift-save-all {
    width: 100%;
  }
}

.is-loading .missions {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.home-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(0, 0, 0, 0.08),
    rgba(255, 255, 255, 0.25) 40%,
    rgba(255, 255, 255, 0.4) 90%
  );
  pointer-events: none;
  opacity: 1;
}

.home-row.row-risk::after {
  background: linear-gradient(
    120deg,
    rgba(255, 140, 100, 0.28),
    rgba(255, 200, 160, 0.35) 45%,
    rgba(255, 255, 255, 0.3) 90%
  );
}

.home-row.row-today::after {
  background: linear-gradient(
    120deg,
    rgba(120, 255, 200, 0.25),
    rgba(200, 255, 230, 0.28) 45%,
    rgba(255, 255, 255, 0.3) 90%
  );
}

.home-row.row-today {
  box-shadow: 0 12px 32px rgba(0, 180, 120, 0.28),
    0 0 0 3px rgba(0, 200, 130, 0.35);
}

.home-row.row-risk {
  box-shadow: 0 12px 32px rgba(255, 120, 80, 0.28),
    0 0 0 3px rgba(255, 170, 120, 0.35);
}

.home-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.home-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f121a;
  letter-spacing: -0.01em;
}

.home-dots {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.home-dot {
  height: 26px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  place-items: center;
  color: #0f121a;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  position: relative;
}

.home-dot.done {
  background: linear-gradient(140deg, var(--row-accent, #8bc34a), #f4b93c);
  color: #0f121a;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.dot-badge {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #0f172a;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.dot-badge.success {
  background: #4ade80;
}

.dot-badge.warn {
  background: #fcd34d;
  color: #7a4a00;
}

.home-streak {
  justify-self: end;
  text-align: right;
  color: #0f121a;
  display: grid;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.home-streak .count {
  font-size: 20px;
  font-weight: 800;
}

.home-streak .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.streak-alert {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-top: 2px;
  filter: drop-shadow(0 0 8px rgba(255, 191, 71, 0.6));
}

.streak-alert svg {
  width: 24px;
  height: 24px;
}

.sheet-heading .total-points {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-muted);
  font-weight: 700;
}

.account-panel {
  margin-top: 6px;
  background: linear-gradient(
    140deg,
    rgba(255, 230, 202, 0.9),
    rgba(255, 210, 170, 0.85)
  );
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(140, 90, 40, 0.14);
  display: grid;
  gap: 12px;
  color: #4d2e16;
}

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a5637;
}

.account-id {
  font-size: 14px;
  font-weight: 700;
}

.account-points {
  text-align: right;
  background: rgba(255, 255, 255, 0.5);
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.account-points .value {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.account-points .hint {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #7a5637;
}

.account-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.account-btn {
  border: none;
  background: rgba(255, 255, 255, 0.7);
  color: #4d2e16;
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6),
    0 6px 16px rgba(140, 90, 40, 0.12);
}

.account-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

.points-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  padding: 10px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.points-summary .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7a5637;
  font-weight: 800;
}

.points-summary .value {
  font-size: 18px;
  font-weight: 800;
  color: #4d2e16;
}

.sun-page .nav .icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--icon-bg, var(--nav-icon-bg));
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6);
  color: var(--icon-color, var(--nav-icon-color));
  font-size: 18px;
}

.sun-page .nav .item.active {
  background: linear-gradient(140deg, var(--active-start), var(--active-end));
  color: var(--text-strong);
  box-shadow: 0 10px 20px rgba(120, 74, 28, 0.16),
    inset 0 1px 4px rgba(255, 255, 255, 0.8);
}

.sun-page .nav .item.completed .icon {
  position: relative;
}

.sun-page .nav .item.completed .icon::after {
  content: "✔";
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4ade80;
  color: #0f172a;
  font-size: 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sun-page .nav .item.active .icon {
  background: linear-gradient(
    140deg,
    var(--icon-start, var(--nav-icon-start)),
    var(--icon-end, var(--nav-icon-end))
  );
  box-shadow: inset 0 3px 6px rgba(255, 255, 255, 0.55),
    0 6px 16px rgba(120, 74, 28, 0.2);
}

.icon-emoji {
  display: inline-block;
  line-height: 1;
}

/* Theme overrides via CSS variables */
.theme-move {
  --page-bg: linear-gradient(180deg, #e7e9ee 0%, #d8dce4 45%, #c7cbd4 100%);
  --sheet-start: #f4f6fb;
  --sheet-end: #e6e9f1;
  --mission-start: #f1f3f8;
  --mission-mid: #e2e6ee;
  --mission-end: #d3d8e3;
  --mission-shadow: 0 14px 36px rgba(80, 90, 110, 0.22);
  --text-strong: #1f2430;
  --text-muted: #4b5568;
  --difficulty-bg: rgba(63, 79, 104, 0.14);
  --pill-start: #dfe4f0;
  --pill-end: #c8cedd;
  --active-start: #cfd6e6;
  --active-end: #aeb8cf;
  --icon-start: #dfe4f0;
  --icon-end: #c8cedd;
  --icon-color: #1f2430;
  --duration-inner: radial-gradient(circle, #eef1f6, #dfe4f0);
  --duration-text: #1f2430;
  --card-highlight: radial-gradient(
    circle at 80% 50%,
    rgba(140, 160, 200, 0.12),
    transparent 45%
  );
  --hero-overlay: linear-gradient(
    180deg,
    rgba(230, 235, 244, 0.6) 0%,
    rgba(210, 218, 232, 0.4) 45%,
    rgba(190, 200, 220, 0.55) 100%
  );
  --hero-disk: radial-gradient(
    circle,
    #f0f2f7 0%,
    #dfe3ec 45%,
    rgba(200, 210, 225, 0.7) 70%,
    rgba(200, 210, 225, 0.25) 100%
  );
  --hero-disk-glow: rgba(150, 170, 200, 0.35);
  --hero-text: #1f2430;
  --hero-text-muted: #4b5568;
}

.theme-food {
  --sheet-start: #f2fff5;
  --sheet-end: #e2f3e7;
  --mission-start: #e3f7e7;
  --mission-mid: #c5ebcf;
  --mission-end: #a7ddb7;
  --mission-shadow: 0 14px 36px rgba(34, 97, 58, 0.14);
  --text-strong: #1f5a2f;
  --text-muted: #2f7a44;
  --difficulty-bg: rgba(31, 90, 47, 0.12);
  --pill-start: #c8f1d0;
  --pill-end: #9adfa7;
  --page-bg: linear-gradient(180deg, #f2fff5 0%, #e2f3e7 50%, #d4e9da 100%);
  --active-start: #b7edc1;
  --active-end: #76d58a;
  --icon-start: #bff0c5;
  --icon-end: #8fdfa0;
  --icon-color: #2f7a44;
  --duration-inner: radial-gradient(circle, #eaffef, #c8f1d0);
  --duration-text: #1f5a2f;
  --card-highlight: radial-gradient(
    circle at 80% 50%,
    rgba(145, 208, 161, 0.35),
    transparent 45%
  );
  --hero-overlay: linear-gradient(
    180deg,
    rgba(210, 255, 225, 0.45) 0%,
    rgba(188, 241, 207, 0.3) 45%,
    rgba(150, 220, 177, 0.5) 100%
  );
  --hero-disk: radial-gradient(
    circle,
    #def7e5 0%,
    #b6e5c8 45%,
    rgba(134, 201, 150, 0.7) 70%,
    rgba(134, 201, 150, 0.25) 100%
  );
  --hero-disk-glow: rgba(120, 190, 140, 0.35);
  --hero-text: #1f5a2f;
  --hero-text-muted: #2f7a44;
}

.theme-social {
  --sheet-start: #fff3e8;
  --sheet-end: #ffe1c8;
  --mission-start: #ffe4cb;
  --mission-mid: #ffd0a5;
  --mission-end: #ffb270;
  --mission-shadow: 0 14px 36px rgba(106, 54, 16, 0.16);
  --text-strong: #6a3610;
  --text-muted: #8a4b20;
  --difficulty-bg: rgba(106, 54, 16, 0.12);
  --pill-start: #ffd7b3;
  --pill-end: #ffb87a;
  --page-bg: linear-gradient(180deg, #fff3e8 0%, #ffe1c8 50%, #ffd1a6 100%);
  --active-start: #ffd196;
  --active-end: #f8a54d;
  --icon-start: #ffd7aa;
  --icon-end: #f6b26a;
  --icon-color: #a35c1c;
  --duration-inner: radial-gradient(circle, #fff4e8, #ffdcbf);
  --duration-text: #6a3610;
  --card-highlight: radial-gradient(
    circle at 80% 50%,
    rgba(255, 201, 143, 0.35),
    transparent 45%
  );
  --hero-overlay: linear-gradient(
    180deg,
    rgba(255, 220, 190, 0.4) 0%,
    rgba(255, 200, 150, 0.25) 45%,
    rgba(245, 170, 110, 0.45) 100%
  );
  --hero-disk: radial-gradient(
    circle,
    #ffe0bf 0%,
    #ffc68e 45%,
    rgba(245, 170, 110, 0.7) 70%,
    rgba(245, 170, 110, 0.25) 100%
  );
  --hero-disk-glow: rgba(245, 170, 110, 0.35);
  --hero-text: #6a3610;
  --hero-text-muted: #8a4b20;
}

.theme-sleep {
  --sheet-start: #fff1f1;
  --sheet-end: #ffdcdc;
  --mission-start: #ffd4d4;
  --mission-mid: #ffb4b4;
  --mission-end: #ed7c7c;
  --mission-shadow: 0 14px 36px rgba(90, 17, 17, 0.16);
  --text-strong: #5a1111;
  --text-muted: #7a2424;
  --difficulty-bg: rgba(90, 17, 17, 0.12);
  --pill-start: #ffd1d1;
  --pill-end: #f7a6a6;
  --page-bg: linear-gradient(180deg, #fff1f1 0%, #ffdcdc 50%, #f7c3c3 100%);
  --active-start: #ffb3b3;
  --active-end: #e86a6a;
  --icon-start: #ffc2c2;
  --icon-end: #e47b7b;
  --icon-color: #8c1e1e;
  --duration-inner: radial-gradient(circle, #ffeaea, #ffc9c9);
  --duration-text: #5a1111;
  --card-highlight: radial-gradient(
    circle at 80% 50%,
    rgba(244, 170, 170, 0.35),
    transparent 45%
  );
  --hero-overlay: linear-gradient(
    180deg,
    rgba(255, 210, 210, 0.4) 0%,
    rgba(245, 170, 170, 0.25) 45%,
    rgba(240, 140, 140, 0.45) 100%
  );
  --hero-disk: radial-gradient(
    circle,
    #ffd7d7 0%,
    #ffb7b7 45%,
    rgba(240, 140, 140, 0.7) 70%,
    rgba(240, 140, 140, 0.25) 100%
  );
  --hero-disk-glow: rgba(240, 140, 140, 0.35);
  --hero-text: #5a1111;
  --hero-text-muted: #7a2424;
}

@media (max-width: 430px) {
  .app-shell {
    padding-left: 0;
    padding-right: 0;
  }

  .hero-banner {
    border-radius: 0;
  }
}

@media (min-width: 900px) {
  .sun-page {
    --shell-max: 760px;
    --nav-max: 640px;
  }

  .app-shell {
    padding: 0 28px 180px;
  }

  .hero-banner {
    height: 520px;
    border-radius: 0;
  }

  .tagline-pill {
    width: calc(100% - 40px);
  }

  .sun-page .nav {
    width: min(var(--nav-max), 100%);
  }

  .missions {
    flex-direction: column;
  }
}

@media (min-width: 1200px) {
  .sun-page {
    --shell-max: 960px;
    --nav-max: 720px;
  }

  .hero-banner {
    height: 560px;
  }

  .tagline-pill {
    width: calc(100% - 60px);
  }
}
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(1px);
}

.loading-overlay.show {
  display: flex;
}

.loading-spinner {
  width: 52px;
  height: 52px;
  border: 5px solid rgba(255, 205, 150, 0.35);
  border-top-color: #f29c3e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 16px 120px;
  background: linear-gradient(180deg, #fff6ed 0%, #ffe9d8 50%, #ffd9b8 100%);
}

.auth-card {
  width: min(420px, 100%);
  background: #fffdf9;
  border: 1px solid rgba(255, 205, 150, 0.45);
  border-radius: 18px;
  padding: 18px 18px 22px;
  box-shadow: 0 18px 36px rgba(130, 84, 39, 0.14);
  display: grid;
  gap: 12px;
}

.auth-header h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: #4d2e16;
}

.auth-header p {
  margin: 4px 0 0;
  color: #7a5637;
  font-weight: 600;
  font-size: 14px;
}

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

.auth-toggle button {
  border: 1px solid rgba(255, 205, 150, 0.65);
  background: #fff;
  padding: 10px;
  border-radius: 12px;
  font-weight: 800;
  color: #4d2e16;
  cursor: pointer;
}

.auth-toggle .active {
  background: linear-gradient(140deg, #ffdba6, #f4b93c);
  box-shadow: 0 8px 20px rgba(130, 84, 39, 0.12);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #4d2e16;
  font-weight: 800;
  font-size: 13px;
}

.auth-form input {
  border: 1px solid rgba(255, 205, 150, 0.65);
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fffaf3;
}

.auth-error {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(232, 106, 106, 0.15);
  color: #5a1111;
  font-weight: 700;
  border: 1px solid rgba(232, 106, 106, 0.3);
}

.auth-submit {
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(140deg, #ffdba6, #f4b93c);
  color: #4d2e16;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(130, 84, 39, 0.16);
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
