:root {
  --gold-50: #fff9dd;
  --gold-100: #ffef9b;
  --gold-200: #ffd95a;
  --gold-300: #ffc21f;
  --gold-500: #e88c00;
  --gold-700: #8a4300;
  --red-500: #db332b;
  --red-700: #8a1713;
  --jade-500: #10a87a;
  --ink: #351c08;
  --muted: #8f6b52;
  --paper: rgba(255, 255, 246, 0.94);
  --line: rgba(191, 119, 19, 0.24);
  --shadow: 0 18px 44px rgba(160, 84, 0, 0.22);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: #ffd84a;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.34) 0 13%, transparent 13% 100%),
    repeating-linear-gradient(106deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 34px),
    radial-gradient(circle at 50% 0%, #fff394 0, #ffd951 26%, #ffc226 54%, #fff8df 100%);
  overflow-x: hidden;
}

.network-status {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: max(9px, env(safe-area-inset-top)) 14px 9px;
  color: #fff8dd;
  background: #62401f;
  border-bottom: 1px solid rgba(255, 224, 122, 0.42);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(16, 168, 122, 0.45);
  outline-offset: 2px;
}

.app-shell {
  --theme-outer: #ffd84a;
  --theme-top: #fff394;
  --theme-middle: #ffd951;
  --theme-accent: #ffc226;
  --theme-bottom: #fff8df;
  --theme-status-ink: #111;
  --theme-nav-ink: #633000;
  --theme-nav-shadow: 0 2px 0 rgba(255, 255, 255, 0.52);
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 14px 112px;
  background-color: var(--theme-outer);
  background-image:
    linear-gradient(125deg, rgba(255, 255, 255, 0.3) 0 13%, transparent 13% 100%),
    repeating-linear-gradient(106deg, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px 34px),
    radial-gradient(circle at 50% 0%, var(--theme-top) 0, var(--theme-middle) 26%, var(--theme-accent) 54%, var(--theme-bottom) 100%);
  box-shadow: 0 0 0 100vmax var(--theme-outer);
  transition: background-color 600ms ease, box-shadow 600ms ease;
  overflow: hidden;
}

.app-shell.theme-morning {
  --theme-outer: #ead4a7;
  --theme-top: #fff8dc;
  --theme-middle: #f5dda0;
  --theme-accent: #e8bd62;
  --theme-bottom: #fffaf0;
}

.app-shell.theme-day {
  --theme-outer: #ffd84a;
  --theme-top: #fff394;
  --theme-middle: #ffd951;
  --theme-accent: #ffc226;
  --theme-bottom: #fff8df;
}

.app-shell.theme-evening {
  --theme-outer: #d87924;
  --theme-top: #ffe59a;
  --theme-middle: #f5b14b;
  --theme-accent: #df7925;
  --theme-bottom: #fff0d2;
}

.app-shell.theme-night {
  --theme-outer: #182235;
  --theme-top: #536077;
  --theme-middle: #334158;
  --theme-accent: #233148;
  --theme-bottom: #172033;
  --theme-status-ink: #fff1ae;
  --theme-nav-ink: #ffe5a0;
  --theme-nav-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.app-shell.stats-active > :not(.phone-bar):not(.top-nav):not(.stats-page):not(.bottom-nav) {
  display: none !important;
}

.stats-page {
  margin-bottom: 14px;
  padding: 17px 16px;
}

.stats-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.stats-heading p,
.stats-heading h2 {
  margin: 0;
}

.stats-heading p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats-heading h2 {
  margin-top: 2px;
  color: #713300;
  font-size: 20px;
}

.stats-month-card {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 14px 13px;
  border: 1px solid rgba(220, 155, 32, 0.28);
  border-radius: 8px;
  background: rgba(255, 250, 224, 0.78);
}

.stats-month-card h3,
.stats-month-card p {
  margin: 0;
}

.stats-month-card h3 {
  color: var(--muted);
  font-size: 13px;
}

.stats-month-card > strong {
  color: #a65100;
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.stats-month-card p {
  color: #7b4a23;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.stats-month-progress {
  height: 8px;
  margin-top: 2px;
  overflow: hidden;
  border: 1px solid rgba(207, 136, 20, 0.26);
  border-radius: 99px;
  background: rgba(221, 146, 21, 0.14);
}

.stats-month-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd75b, #f0a000 54%, #b86a00);
  box-shadow: 0 0 14px rgba(240, 160, 0, 0.34);
  transition: width 0.35s ease;
}

.stats-month-progress.is-unavailable {
  border-color: rgba(132, 111, 82, 0.24);
  background: rgba(132, 111, 82, 0.12);
}

.stats-month-progress.is-unavailable span {
  box-shadow: none;
}

.stats-month-card .stats-month-average,
.stats-month-card .stats-month-average-worked-time,
.stats-month-card .stats-month-highest-income-day,
.stats-month-card .stats-month-activity-income,
.stats-month-card .stats-month-activity-paid-time {
  color: #7b4a23;
}

.stats-month-card .stats-month-gap {
  margin-top: 1px;
  color: #9a4b00;
}

.stats-month-card .stats-month-comparison {
  color: #7b4a23;
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(220, 155, 32, 0.22);
  border-radius: 8px;
  background: rgba(220, 155, 32, 0.16);
}

.stats-summary > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 8px;
  background: rgba(255, 255, 255, 0.68);
}

.stats-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.stats-summary strong {
  color: #793900;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.copy-weekly-report-button {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border: 1px solid rgba(210, 138, 25, 0.3);
  border-radius: 8px;
  color: #783900;
  background: rgba(255, 238, 167, 0.72);
  font-weight: 900;
}

.copy-weekly-report-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.stats-best-card {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 155, 32, 0.2);
  border-radius: 8px;
  background: rgba(255, 250, 224, 0.7);
}

.stats-best-card h3,
.stats-best-card p {
  margin: 0;
}

.stats-best-card h3 {
  color: #713300;
  font-size: 13px;
}

.stats-best-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats-best-details {
  display: grid;
  gap: 3px;
}

.stats-best-details[hidden] {
  display: none;
}

.stats-best-details > strong {
  color: #793900;
  font-size: 14px;
}

.stats-best-details p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats-best-details b {
  color: #9c4e00;
}

.stats-chart {
  margin-top: 10px;
  padding: 10px 8px 8px;
  border: 1px solid rgba(220, 155, 32, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.stats-chart-empty {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.stats-chart-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  height: 118px;
}

.stats-chart-bar {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 22px;
  gap: 5px;
  min-width: 0;
  height: 100%;
  padding: 0 2px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.stats-chart-bar:focus-visible {
  outline: 2px solid #d78900;
  outline-offset: 1px;
}

.stats-chart-track {
  position: relative;
  display: block;
  align-self: stretch;
  min-height: 0;
  overflow: hidden;
  border-radius: 5px 5px 2px 2px;
  background: rgba(230, 174, 60, 0.1);
}

.stats-chart-fill {
  position: absolute;
  right: 4px;
  bottom: 0;
  left: 4px;
  display: block;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #ffd94e 0%, #e99100 100%);
  box-shadow: 0 3px 8px rgba(218, 132, 0, 0.2);
  transition: height 350ms ease;
}

.stats-chart-bar.today .stats-chart-fill {
  background: linear-gradient(180deg, #fff077 0%, #f07700 100%);
}

.stats-chart-weekday {
  align-self: center;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.stats-chart-detail {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-top: 7px;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 244, 196, 0.64);
  font-size: 11px;
}

.stats-chart-detail[hidden] {
  display: none;
}

.stats-chart-detail strong,
.stats-chart-detail b {
  color: #793900;
}

.stats-list {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.stats-day {
  display: grid;
  grid-template-columns: minmax(82px, 1.15fr) minmax(76px, 1fr) minmax(76px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid rgba(220, 155, 32, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.stats-date,
.stats-income,
.stats-duration {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.stats-day span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.stats-day strong {
  color: #793900;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.stats-status {
  justify-self: end;
  padding: 4px 6px;
  border-radius: 6px;
  color: #8b4b00 !important;
  background: rgba(255, 226, 121, 0.55);
  white-space: nowrap;
}

.stats-day[data-status="已完成"] .stats-status {
  color: #27613c !important;
  background: rgba(145, 211, 157, 0.28);
}

.stats-day[data-status="进行中"] .stats-status {
  color: #a04d00 !important;
  background: rgba(255, 187, 63, 0.3);
}

.phone-bar {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 800;
  color: var(--theme-status-ink);
}

.streak-badge {
  justify-self: start;
  min-width: 0;
  margin-left: 8px;
  padding: 3px 7px;
  border: 1px solid rgba(218, 139, 20, 0.2);
  border-radius: 8px;
  color: #7b3900;
  background: rgba(255, 248, 211, 0.76);
  font-size: 11px;
  font-weight: 900;
  line-height: 16px;
  white-space: nowrap;
}

.signal {
  display: inline-flex;
  align-items: end;
  gap: 3px;
  margin-right: 10px;
}

.signal i {
  width: 4px;
  border-radius: 99px;
  background: var(--theme-status-ink);
}

.signal i:nth-child(1) { height: 7px; }
.signal i:nth-child(2) { height: 10px; }
.signal i:nth-child(3) { height: 13px; }
.signal i:nth-child(4) { height: 16px; }

.wifi {
  position: relative;
  width: 24px;
  height: 18px;
  margin-right: 12px;
}

.wifi::before,
.wifi::after {
  content: "";
  position: absolute;
  left: 50%;
  border: 4px solid var(--theme-status-ink);
  border-color: var(--theme-status-ink) transparent transparent transparent;
  border-radius: 50%;
  transform: translateX(-50%);
}

.wifi::before {
  top: 0;
  width: 24px;
  height: 24px;
}

.wifi::after {
  top: 7px;
  width: 12px;
  height: 12px;
}

.battery {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 30px;
  height: 17px;
  border: 2px solid var(--theme-status-ink);
  border-radius: 5px;
  padding: 2px;
}

.battery::after {
  content: "";
  position: absolute;
  right: -5px;
  width: 3px;
  height: 8px;
  border-radius: 0 4px 4px 0;
  background: var(--theme-status-ink);
}

.battery i {
  width: 20px;
  height: 9px;
  border-radius: 3px;
  background: var(--theme-status-ink);
}

.top-nav {
  display: grid;
  grid-template-columns: 94px 1fr 94px;
  align-items: center;
  gap: 8px;
  margin: 6px 0 14px;
}

.top-nav h1 {
  margin: 0;
  text-align: center;
  color: var(--theme-nav-ink);
  font-size: 25px;
  font-weight: 900;
  text-shadow: var(--theme-nav-shadow);
}

.benefit-button,
.menu-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 245, 0.72);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8), 0 8px 22px rgba(183, 110, 0, 0.14);
  color: #6d3500;
  font-weight: 800;
}

.menu-pill b {
  width: 26px;
  height: 26px;
  border: 4px solid #6d3500;
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.45);
}

.panel,
.hero-card {
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 168px;
  margin-bottom: 14px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.38), transparent 42%),
    linear-gradient(135deg, #ffe474 0%, #ffc019 48%, #fff0a9 100%);
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -40px;
  width: 148px;
  height: 94px;
  border-radius: 60px 60px 0 0;
  background: rgba(255, 255, 255, 0.75);
}

.sparkle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sparkle-field span {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff;
  transform: rotate(45deg);
  animation: sparkle 2.2s ease-in-out infinite;
}

.sparkle-field span:nth-child(1) { top: 24px; left: 24px; }
.sparkle-field span:nth-child(2) { top: 58px; right: 22px; animation-delay: 0.6s; }
.sparkle-field span:nth-child(3) { bottom: 32px; left: 48%; animation-delay: 1s; }
.sparkle-field span:nth-child(4) { top: 88px; left: 12px; animation-delay: 1.4s; }

.mascot-wrap {
  position: relative;
  align-self: end;
  width: 148px;
  height: 154px;
  max-width: 100%;
  margin-left: -6px;
  z-index: 1;
}

.mascot {
  position: relative;
  width: 148px;
  height: 144px;
  max-width: 100%;
  transform-origin: center bottom;
  animation: mascotFloat 3.2s ease-in-out infinite;
}

.mascot-sign {
  position: absolute;
  right: 1px;
  top: 12px;
  z-index: 5;
  min-width: 48px;
  padding: 5px 7px;
  border: 2px solid rgba(255, 246, 175, 0.95);
  border-radius: 8px;
  color: #7a3300;
  background: linear-gradient(135deg, #fff5a8, #ffbd21);
  box-shadow: 0 8px 16px rgba(121, 63, 0, 0.22);
  font-size: 13px;
  font-weight: 950;
  text-align: center;
  transform: rotate(5deg) scale(0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mascot-wrap[data-state="working"] .coin-hand {
  animation: coinPulse 1.2s ease-in-out infinite;
}

.mascot-wrap[data-state="paused"] .mascot {
  animation: mascotRest 3.6s ease-in-out infinite;
}

.mascot-wrap[data-state="paused"] .eye {
  width: 18px;
  height: 3px;
  border-top-width: 3px;
}

.mascot-wrap[data-state="milestone"] .mascot,
.mascot-wrap[data-state="almostOffWork"] .mascot {
  animation: mascotCelebrate 0.75s ease-in-out infinite;
}

.mascot-wrap[data-state="milestone"] .mascot-sign,
.mascot-wrap[data-state="almostOffWork"] .mascot-sign,
.mascot-wrap[data-state="finished"] .mascot-sign,
.mascot-wrap[data-state="overtime"] .mascot-sign {
  opacity: 1;
  transform: rotate(5deg) scale(1);
}

.mascot-wrap[data-state="finished"] .mascot {
  animation: none;
  transform: translateY(4px) rotate(0deg);
}

.mascot-wrap[data-state="overtime"] .mascot-sign {
  color: #7a1d10;
  background: linear-gradient(135deg, #ffe0a8, #ff814d);
}

.mascot-wrap.mascot-work-ready[data-state="idle"] .mascot {
  animation: mascotReadyBreath 3.4s ease-in-out infinite;
}

.mascot-wrap.mascot-work-working[data-state="working"] .mascot {
  animation: none;
  transform: none;
}

.mascot-wrap.mascot-work-working[data-state="working"] .coin-hand,
.mascot-wrap.mascot-work-working[data-state="working"] .ingot {
  animation: mascotTreasureBounce 1.45s ease-in-out infinite;
}

.mascot-wrap.mascot-work-working[data-state="working"] .ingot {
  animation-delay: 0.16s;
}

.mascot-wrap.mascot-work-paused .mascot {
  animation: none;
  transform: translateY(3px);
}

.mascot-wrap.mascot-work-paused::after {
  content: "Zzz";
  position: absolute;
  top: 22px;
  left: 8px;
  z-index: 6;
  color: #8a4300;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  pointer-events: none;
  animation: mascotSleepZ 2.2s ease-in-out infinite;
}

.mascot-wrap.mascot-work-finished .mascot {
  animation: mascotFinishedOnce 0.72s ease-out 1 both;
}

.hat {
  position: absolute;
  left: 26px;
  top: 0;
  width: 104px;
  height: 58px;
  border-radius: 54px 54px 22px 22px;
  background:
    radial-gradient(circle at 66% 24%, #fff9aa 0 7px, #ffb800 8px 12px, transparent 13px),
    linear-gradient(135deg, #ff5e28, #ce1718 58%, #930e10);
  border: 2px solid #ffca45;
  box-shadow: inset 0 5px 8px rgba(255, 255, 255, 0.32), 0 8px 14px rgba(128, 25, 0, 0.2);
}

.hat span,
.hat i {
  position: absolute;
  top: 34px;
  width: 42px;
  height: 30px;
  border-radius: 20px 8px 22px 8px;
  background: linear-gradient(135deg, #ffce36, #e33b25);
  border: 2px solid #ffd96c;
  transform: rotate(-18deg);
}

.hat span { left: -34px; }
.hat i { right: -34px; transform: scaleX(-1) rotate(-18deg); }

.face {
  position: absolute;
  left: 30px;
  top: 36px;
  width: 96px;
  height: 86px;
  border-radius: 42% 42% 48% 48%;
  background: radial-gradient(circle at 46% 35%, #fff0c0, #ffc681 78%);
  border: 2px solid rgba(142, 63, 0, 0.18);
  box-shadow: inset 0 -10px 14px rgba(196, 82, 0, 0.12);
  z-index: 2;
}

.eye {
  position: absolute;
  top: 31px;
  width: 19px;
  height: 10px;
  border-top: 4px solid #351c08;
  border-radius: 50%;
}

.eye.left { left: 21px; transform: rotate(9deg); }
.eye.right { right: 21px; transform: rotate(-9deg); }

.cheek {
  position: absolute;
  top: 47px;
  width: 20px;
  height: 13px;
  border-radius: 50%;
  background: rgba(229, 57, 45, 0.32);
}

.cheek.left { left: 13px; }
.cheek.right { right: 13px; }

.mustache {
  position: absolute;
  left: 26px;
  top: 53px;
  width: 44px;
  height: 14px;
  border-radius: 0 0 50% 50%;
  background: #331908;
  clip-path: polygon(0 50%, 38% 0, 50% 42%, 62% 0, 100% 50%, 68% 80%, 50% 56%, 32% 80%);
}

.beard {
  position: absolute;
  left: 40px;
  top: 66px;
  width: 17px;
  height: 25px;
  border-radius: 50% 50% 60% 60%;
  background: #311504;
}

.robe {
  position: absolute;
  left: 20px;
  bottom: 0;
  width: 116px;
  height: 62px;
  border-radius: 34px 34px 16px 16px;
  background: linear-gradient(150deg, #ee3927, #aa1114);
  border: 2px solid #ffbf2f;
  box-shadow: inset 0 6px 8px rgba(255, 255, 255, 0.18);
  z-index: 1;
}

.robe i {
  position: absolute;
  left: 38px;
  top: 13px;
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #d5281f;
  background: linear-gradient(#fff5a6, #f8ad12);
  border-radius: 50%;
  font-style: normal;
  font-weight: 900;
  border: 2px solid #ffe87c;
}

.ingot {
  position: absolute;
  left: -1px;
  bottom: 16px;
  width: 45px;
  height: 30px;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 50% 20%, #fffacb, #f8b20c 60%, #b66300);
  border: 2px solid #ffe58a;
  transform: rotate(-12deg);
  z-index: 3;
}

.coin-hand {
  position: absolute;
  right: 7px;
  top: 62px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #a64a00;
  background: radial-gradient(circle at 34% 30%, #fff9b6, #ffbf15 55%, #db7900);
  border: 3px solid #fff0a2;
  font-weight: 900;
  box-shadow: 0 8px 13px rgba(131, 69, 0, 0.18);
  z-index: 4;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-left: 6px;
}

.hero-copy p {
  margin: 0 0 8px;
  color: #5c2d00;
  font-size: 16px;
  font-weight: 900;
}

.clock {
  margin-bottom: 12px;
  color: #713700;
  font-size: 36px;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.32);
}

.trigger-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: start;
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 248, 211, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 16px rgba(143, 79, 0, 0.12);
}

.trigger-chip span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #9b4500;
  background: linear-gradient(#fff89c, #f2a900);
  font-weight: 900;
}

.trigger-chip strong {
  font-size: 12px;
  color: #8a4300;
  white-space: nowrap;
}

.trigger-chip button {
  display: grid;
  place-items: center;
  width: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid rgba(138, 67, 0, 0.26);
  border-radius: 50%;
  color: rgba(138, 67, 0, 0.76);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.income-card,
.work-summary-card,
.goal-card,
.settings-card,
.activity-card,
.reference-card {
  margin-bottom: 14px;
  padding: 17px 16px;
}

.work-summary-card {
  border-color: rgba(236, 174, 38, 0.34);
  background: linear-gradient(145deg, rgba(255, 253, 240, 0.98), rgba(255, 245, 202, 0.94));
}

.work-summary-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.work-summary-heading h2 {
  margin: 0;
  color: #713300;
  font-size: 18px;
}

.work-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.work-summary-grid > div {
  min-width: 0;
  padding: 11px 10px;
  border: 1px solid rgba(220, 155, 32, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

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

.work-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.work-summary-grid .summary-comparison {
  margin-top: 5px;
  color: #956536;
  font-size: 11px;
  line-height: 1.35;
}

.work-summary-grid strong {
  margin-top: 5px;
  color: #9a4b00;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.work-summary-grid b {
  font: inherit;
}

.work-summary-comment {
  margin: 13px 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(202, 126, 11, 0.3);
  color: #713300;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  text-align: center;
}

.report-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.copy-report-button,
.share-report-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(210, 138, 25, 0.3);
  border-radius: 8px;
  color: #783900;
  background: rgba(255, 238, 167, 0.72);
  font-weight: 900;
}

.share-report-button {
  color: #fff9dc;
  background: linear-gradient(135deg, #d98200, #b85800);
}

.share-report-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.backup-export-button,
.backup-select-button {
  width: 100%;
  border: 1px solid rgba(210, 138, 25, 0.3);
  border-radius: 8px;
  color: #783900;
  background: rgba(255, 248, 214, 0.72);
  font-weight: 900;
}

.backup-select-button {
  background: rgba(255, 255, 255, 0.64);
}

.backup-preview {
  padding: 11px 12px;
  border: 1px solid rgba(210, 138, 25, 0.24);
  border-radius: 8px;
  background: rgba(255, 252, 235, 0.76);
}

.backup-preview h3 {
  margin: 0 0 8px;
  color: #713300;
  font-size: 14px;
}

.backup-preview dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.backup-preview dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.backup-preview dt,
.backup-preview dd {
  margin: 0;
  font-size: 12px;
}

.backup-preview dt {
  color: var(--muted);
  font-weight: 800;
}

.backup-preview dd {
  color: #793900;
  font-weight: 900;
}

.backup-restore-button {
  width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(176, 77, 20, 0.38);
  border-radius: 8px;
  color: #fffaf0;
  background: #a94d12;
  font-weight: 900;
}

.clear-data-button {
  width: 100%;
  border: 1px solid rgba(169, 28, 22, 0.32);
  border-radius: 8px;
  color: #9f2018;
  background: rgba(255, 247, 238, 0.58);
  font-weight: 900;
}

.pwa-install-button,
.pwa-ios-help-button {
  width: 100%;
  border: 1px solid rgba(16, 168, 122, 0.3);
  border-radius: 8px;
  color: #075f47;
  background: rgba(238, 255, 247, 0.76);
  font-weight: 900;
}

.pwa-ios-help-button {
  color: #6d4b15;
  border-color: rgba(210, 138, 25, 0.3);
  background: rgba(255, 250, 226, 0.72);
}

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

.income-status p,
.guide-copy,
.empty-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.income-status h2 {
  margin: 2px 0 0;
  color: #763900;
  font-size: 20px;
  font-weight: 900;
}

.title-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #a04d00;
  background: radial-gradient(circle at 35% 26%, #fff9bb, #ffbd13 58%, #d57900);
  border: 2px solid #ffe783;
  font-size: 19px;
  font-weight: 950;
}

.title-icon.bars {
  color: white;
  background: linear-gradient(135deg, var(--jade-500), #0b735d);
  border-color: rgba(255, 255, 255, 0.9);
}

.primary-amount {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 20px 0 14px;
  color: #9b4700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}

.privacy-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(210, 138, 25, 0.22);
  border-radius: 50%;
  color: #7b3900;
  background: rgba(255, 249, 220, 0.9);
  font-size: 20px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.privacy-toggle:focus-visible {
  outline: 3px solid rgba(231, 145, 0, 0.42);
  outline-offset: 2px;
}

.fun-conversion {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  margin: -6px 0 8px;
  color: #88501b;
}

.fun-conversion-text,
.fun-conversion-toggle {
  min-height: 44px;
  border: 0;
  color: inherit;
  background: transparent;
  font-weight: 800;
}

.fun-conversion-text {
  min-width: 0;
  padding: 0 4px;
  font-size: 14px;
}

.fun-conversion-text strong {
  color: #d57900;
  font-size: inherit;
}

.fun-conversion-toggle {
  width: 44px;
  flex: 0 0 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 20px;
}

.fun-conversion-text:focus-visible,
.fun-conversion-toggle:focus-visible {
  outline: 3px solid rgba(231, 145, 0, 0.35);
  outline-offset: 1px;
}

.fun-conversion-toggle:hover {
  background: rgba(255, 238, 167, 0.5);
}

.primary-amount span {
  font-size: 34px;
  font-weight: 950;
}

.primary-amount strong {
  min-width: 0;
  font-size: 72px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  background: linear-gradient(#f5b018, #8f3e00);
  -webkit-background-clip: text;
  color: transparent;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.primary-amount.is-compact strong {
  font-size: 58px;
}

.primary-amount[data-state="muted"] {
  opacity: 0.62;
}

.primary-amount[data-state="muted"] strong {
  font-size: 28px;
  color: var(--muted);
  background: none;
}

.primary-amount.money-glow strong {
  animation: moneyGlow 0.72s ease-out;
}

.empty-hint {
  min-height: 20px;
  text-align: center;
}

.realtime-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  padding: 11px 0;
  border-top: 1px solid rgba(209, 139, 35, 0.2);
  border-bottom: 1px solid rgba(209, 139, 35, 0.2);
}

.realtime-metrics div {
  min-width: 0;
  padding: 0 4px;
  text-align: center;
}

.realtime-metrics span,
.secondary-income-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.realtime-metrics strong {
  display: block;
  margin-top: 5px;
  color: #7b3900;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.secondary-income-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.secondary-income-grid div {
  min-width: 0;
  min-height: 58px;
  padding: 10px 11px;
  border: 1px solid rgba(209, 139, 35, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 244, 0.58);
}

.secondary-income-grid strong {
  display: block;
  margin-top: 6px;
  color: #b76400;
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.work-progress {
  min-height: 29px;
  margin-top: 14px;
}

.progress-copy {
  min-height: 17px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 17px;
  text-align: right;
}

.progress-track {
  height: 6px;
  border-radius: 99px;
  margin-top: 6px;
  background: rgba(218, 139, 20, 0.16);
  overflow: hidden;
}

.progress-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffbf1a, #ff7a18, #ffef86);
  box-shadow: 0 0 18px rgba(255, 174, 0, 0.55);
  transition: width 0.45s ease;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.action-row:has(.action-button + .action-button) {
  grid-template-columns: 1fr 1fr;
}

.action-button,
.primary-action,
.text-action,
.edit-entry {
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.action-button {
  min-height: 50px;
  padding: 0 14px;
}

.action-button.primary,
.primary-action {
  color: #fff7d8;
  background: linear-gradient(135deg, #fecc33, #f18400 50%, #d93a28);
  box-shadow: 0 12px 22px rgba(216, 94, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.action-button.secondary {
  color: #7b3900;
  background: rgba(255, 238, 167, 0.86);
  border: 1px solid rgba(210, 138, 25, 0.24);
}

.action-button.danger {
  color: #fff;
  background: linear-gradient(135deg, #e65a43, #a91c16);
}

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

.section-title h2 {
  margin: 0;
  color: #763900;
  font-size: 20px;
  font-weight: 900;
}

.text-action {
  min-height: 36px;
  padding: 0 10px;
  color: #8a4300;
  background: rgba(255, 238, 167, 0.68);
}

.guide-copy {
  margin-top: 12px;
}

.activity-total {
  min-height: 22px;
  margin: 10px 0 0;
  color: #9a4b00;
  font-size: 14px;
  font-weight: 900;
  line-height: 22px;
}

.settings-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.settings-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.settings-form label:first-child,
.settings-form .preference-fieldset,
.settings-form .form-error,
.settings-form button {
  grid-column: 1 / -1;
}

.settings-form span {
  color: #7b4a23;
  font-size: 14px;
  font-weight: 800;
}

.settings-form input {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(176, 104, 12, 0.28);
  border-radius: 8px;
  padding: 0 12px;
  color: #3b1c05;
  background: rgba(255, 255, 255, 0.84);
  outline: 0;
  box-shadow: inset 0 1px 3px rgba(170, 95, 0, 0.08);
}

.preference-fieldset {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
  padding: 11px;
  border: 1px solid rgba(176, 104, 12, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 244, 0.7);
}

.preference-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.settings-form .check-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.settings-form .check-row input {
  width: 22px;
  height: 22px;
  padding: 0;
  accent-color: #e88c00;
  box-shadow: none;
}

.settings-form .check-row span {
  font-size: 13px;
}

.settings-form .work-reminder-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(176, 104, 12, 0.16);
}

.settings-form .work-reminder-copy {
  display: grid;
  gap: 2px;
}

.settings-form .work-reminder-copy strong {
  color: #6f3608;
  font-size: 13px;
}

.settings-form .work-reminder-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.settings-form .preference-state {
  color: #9a4b00;
  font-size: 12px;
  white-space: nowrap;
}

.about-app {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(176, 104, 12, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 244, 0.7);
  overflow-wrap: anywhere;
}

.about-app h3,
.about-app p {
  margin: 0;
}

.about-app h3 {
  color: #6f3608;
  font-size: 15px;
}

.about-app p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.goal-main,
.active-activity {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(209, 139, 35, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 244, 0.74);
}

.goal-main p,
.active-activity p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.goal-main strong {
  display: block;
  margin-top: 5px;
  color: #743600;
  font-size: 17px;
  font-weight: 950;
}

.goal-progress {
  height: 9px;
  margin-top: 12px;
  border-radius: 99px;
  background: rgba(218, 139, 20, 0.16);
  overflow: hidden;
}

.goal-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffc51a, #10a87a);
  box-shadow: 0 0 16px rgba(16, 168, 122, 0.4);
  transition: width 0.45s ease;
}

.goal-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 11px;
}

.goal-meta span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.goal-meta b {
  color: #8a4300;
}

.goal-main .goal-estimate {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(209, 139, 35, 0.18);
  color: #8a4300;
  font-weight: 900;
}

.goal-presets,
.activity-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.goal-presets button,
.activity-presets button,
.mini-form button,
.activity-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #743600;
  background: rgba(255, 238, 167, 0.8);
  font-weight: 900;
}

.goal-presets button.active {
  color: #fff8d9;
  background: linear-gradient(135deg, #ffbf1a, #e87800);
}

.mini-form {
  display: grid;
  grid-template-columns: 58px 1fr 86px;
  gap: 8px;
  margin-top: 12px;
}

.mini-form input {
  min-width: 0;
  height: 44px;
  border: 1px solid rgba(176, 104, 12, 0.28);
  border-radius: 8px;
  padding: 0 10px;
  color: #3b1c05;
  background: rgba(255, 255, 255, 0.84);
}

#customGoalForm {
  grid-template-columns: 50px 1fr 82px 66px;
}

.active-activity {
  display: grid;
  gap: 12px;
}

.active-activity > div:first-child {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  column-gap: 9px;
}

#activeActivityIcon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff5a8, #ffbd21);
  font-size: 22px;
}

#activeActivityName {
  color: #733500;
  font-size: 17px;
  font-weight: 950;
}

.activity-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.activity-numbers span {
  min-height: 48px;
  padding: 9px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 246, 205, 0.68);
  font-size: 13px;
  font-weight: 800;
}

.activity-numbers b {
  display: block;
  margin-top: 3px;
  color: #8a4300;
  font-size: 16px;
}

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

.activity-actions button:last-child {
  color: #fff;
  background: linear-gradient(135deg, #e65a43, #a91c16);
}

.activity-history {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.activity-history p {
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  color: #74420e;
  background: rgba(255, 253, 244, 0.68);
  font-size: 13px;
  font-weight: 800;
}

.activity-history-toggle {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  color: #8a4300;
  background: rgba(255, 238, 167, 0.68);
  font-weight: 900;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--red-700);
  font-size: 13px;
  font-weight: 800;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
}

.edit-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 86px;
  margin-bottom: 14px;
  padding: 0 16px;
  color: #7b3900;
  text-align: left;
}

.settings-summary-copy {
  display: grid;
  gap: 5px;
}

.settings-summary-copy span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-summary-copy b {
  color: #7b3900;
}

.edit-entry strong {
  color: #e88c00;
  white-space: nowrap;
}

.gold-bars {
  position: relative;
  width: 37px;
  height: 28px;
}

.gold-bars::before,
.gold-bars::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, #fff39a, #ffb80b 56%, #c76800);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transform: skewX(-18deg);
}

.gold-bars::before {
  left: 2px;
  bottom: 2px;
}

.gold-bars::after {
  right: 0;
  top: 0;
}

.reference-list {
  display: grid;
  margin-top: 14px;
  border: 1px solid rgba(209, 139, 35, 0.22);
  border-radius: 8px;
  overflow: hidden;
}

.reference-list button {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  min-height: 54px;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(209, 139, 35, 0.22);
  color: var(--ink);
  background: rgba(255, 253, 244, 0.66);
  text-align: left;
}

.reference-list button:last-child {
  border-bottom: 0;
}

.reference-list span {
  font-size: 24px;
}

.reference-list b {
  font-size: 15px;
}

.reference-list strong {
  color: #ef9000;
  font-size: 17px;
  white-space: nowrap;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(398px, calc(100% - 28px));
  min-height: 66px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 34px rgba(142, 78, 0, 0.22);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.pwa-update-prompt {
  position: fixed;
  left: 50%;
  bottom: 94px;
  z-index: 24;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  width: min(398px, calc(100% - 28px));
  min-height: 56px;
  padding: 6px 8px 6px 14px;
  border: 1px solid rgba(255, 239, 155, 0.84);
  border-radius: 8px;
  color: #fffaf0;
  background: rgba(92, 40, 5, 0.94);
  box-shadow: 0 12px 28px rgba(75, 32, 0, 0.28);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.pwa-update-prompt strong {
  min-width: 0;
  font-size: 14px;
}

.pwa-update-prompt button {
  min-width: 64px;
  padding: 0 10px;
  border: 1px solid rgba(255, 220, 92, 0.54);
  border-radius: 8px;
  color: #632d00;
  background: #ffd84a;
  font-size: 13px;
  font-weight: 900;
}

.pwa-update-prompt button:last-child {
  color: #fff4c2;
  background: transparent;
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  color: #7c746d;
  background: transparent;
}

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

.bottom-nav b {
  font-size: 13px;
}

.bottom-nav button.active {
  color: #c76b00;
  background: rgba(255, 198, 31, 0.16);
}

.coin-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
}

.coin-drop {
  position: absolute;
  top: -60px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #a64d00;
  background:
    radial-gradient(circle at 35% 28%, #fffbd0 0 15%, #ffe45a 16% 36%, #ffb20c 58%, #bf6400 100%);
  border: 3px solid rgba(255, 246, 164, 0.9);
  box-shadow: 0 6px 12px rgba(143, 71, 0, 0.24), inset 0 -5px 5px rgba(156, 77, 0, 0.18);
  font-size: 16px;
  font-weight: 950;
  animation: coinFall var(--fall-duration, 1.9s) cubic-bezier(0.18, 0.68, 0.36, 0.98) forwards;
}

.coin-drop::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid rgba(168, 73, 0, 0.34);
  border-radius: 50%;
}

.fortune-burst {
  position: fixed;
  z-index: 31;
  left: 50%;
  top: 35%;
  width: 180px;
  height: 180px;
  border: 2px solid rgba(255, 248, 174, 0.92);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 20px #ffd33b, inset 0 0 18px rgba(255, 210, 48, 0.48);
  transform: translate(-50%, -50%) scale(0.3);
  animation: burst 0.8s ease-out forwards;
}

.celebration-card {
  position: fixed;
  left: 50%;
  top: 46%;
  z-index: 34;
  width: min(340px, calc(100% - 36px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  color: #642a00;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.82), transparent 38%),
    linear-gradient(135deg, #fff8c8, #ffc22d 62%, #ff8a19);
  box-shadow: 0 18px 44px rgba(113, 59, 0, 0.3);
  text-align: center;
  font-weight: 950;
  transform: translate(-50%, -50%) scale(0.86);
  animation: celebrationPop 2.4s ease forwards;
  pointer-events: none;
}

.celebration-card strong {
  display: block;
  margin-top: 7px;
  font-size: 20px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 72px;
  z-index: 35;
  min-width: 240px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #6b2b00;
  background: linear-gradient(135deg, #fff7c4, #ffc12a);
  box-shadow: 0 14px 26px rgba(122, 63, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  text-align: center;
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: opacity 0.26s ease, transform 0.26s ease;
  pointer-events: none;
}

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

@keyframes sparkle {
  0%, 100% { opacity: 0.28; transform: rotate(45deg) scale(0.62); }
  50% { opacity: 1; transform: rotate(45deg) scale(1.25); }
}

@keyframes mascotFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}

@keyframes mascotRest {
  0%, 100% { transform: translateY(3px) rotate(0deg); }
  50% { transform: translateY(0) rotate(-1deg); }
}

@keyframes mascotCelebrate {
  0%, 100% { transform: translateY(-2px) rotate(-2deg) scale(1); }
  50% { transform: translateY(-7px) rotate(2deg) scale(1.03); }
}

@keyframes mascotReadyBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.012); }
}

@keyframes mascotTreasureBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes mascotSleepZ {
  0%, 100% { opacity: 0.42; transform: translateY(0); }
  50% { opacity: 0.82; transform: translateY(-2px); }
}

@keyframes mascotFinishedOnce {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-2px) scale(1.025); }
}

@keyframes coinPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 13px rgba(131, 69, 0, 0.18); }
  50% { transform: scale(1.12); box-shadow: 0 10px 22px rgba(255, 181, 0, 0.42); }
}

@keyframes moneyGlow {
  0% { filter: drop-shadow(0 0 0 rgba(255, 185, 0, 0)); transform: scale(1); }
  45% { filter: drop-shadow(0 0 18px rgba(255, 185, 0, 0.82)); transform: scale(1.025); }
  100% { filter: drop-shadow(0 0 0 rgba(255, 185, 0, 0)); transform: scale(1); }
}

@keyframes coinFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -30px, 0) rotateY(0deg) rotateZ(0deg) scale(0.86);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate3d(var(--drift, 0px), calc(100vh + 100px), 0) rotateY(720deg) rotateZ(var(--spin, 280deg)) scale(1);
  }
}

@keyframes burst {
  0% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.24); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}

@keyframes celebrationPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.78); }
  12%, 82% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -56%) scale(0.96); }
}

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

  .top-nav {
    grid-template-columns: 82px 1fr 82px;
  }

  .top-nav h1 {
    font-size: 22px;
  }

  .hero-card {
    grid-template-columns: 38% 1fr;
    padding-left: 10px;
    padding-right: 10px;
  }

  .mascot-wrap {
    width: 134px;
    transform: scale(0.9);
    transform-origin: left bottom;
  }

  .mascot {
    margin-left: 0;
  }

  .clock {
    font-size: 31px;
  }

  .trigger-chip strong {
    font-size: 11px;
  }

  .primary-amount strong {
    font-size: 54px;
  }

  .primary-amount.is-compact strong {
    font-size: 46px;
  }

  .primary-amount[data-state="muted"] strong {
    font-size: 25px;
  }

  .realtime-metrics {
    gap: 2px;
  }

  .realtime-metrics span {
    font-size: 10px;
  }

  .realtime-metrics strong {
    font-size: 12px;
  }

  .secondary-income-grid span {
    font-size: 11px;
  }

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

  .settings-form {
    grid-template-columns: 1fr;
  }

  .settings-form label:first-child {
    grid-column: auto;
  }

  .preference-fieldset,
  .goal-presets,
  .activity-presets,
  .activity-numbers {
    grid-template-columns: 1fr;
  }

  .mini-form,
  #customGoalForm {
    grid-template-columns: 48px 1fr;
  }

  .mini-form button,
  #customGoalForm button {
    grid-column: 1 / -1;
  }
}

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

  .coin-drop,
  .fortune-burst {
    display: none;
  }

  .progress-track i {
    transition: none !important;
  }

  .stats-month-progress span {
    transition: none !important;
  }

  .mascot-wrap.mascot-work-ready .mascot,
  .mascot-wrap.mascot-work-working .mascot,
  .mascot-wrap.mascot-work-working .coin-hand,
  .mascot-wrap.mascot-work-working .ingot,
  .mascot-wrap.mascot-work-paused .mascot,
  .mascot-wrap.mascot-work-paused::after,
  .mascot-wrap.mascot-work-finished .mascot {
    animation: none !important;
  }
}

body.motion-off *,
body.motion-off *::before,
body.motion-off *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.001ms !important;
}

body.motion-off .coin-drop,
body.motion-off .fortune-burst {
  display: none;
}
