:root {
  color-scheme: dark;
  --bg: #08110f;
  --panel: rgba(14, 24, 22, 0.86);
  --panel-strong: rgba(18, 32, 28, 0.96);
  --line: rgba(222, 255, 235, 0.14);
  --text: #eefbf2;
  --muted: #9bb1a5;
  --green: #39f88f;
  --amber: #ffd45f;
  --red: #ff5a72;
  --blue: #54b8ff;
  --ink: #07110f;
  --accent: var(--green);
  --accent-2: var(--amber);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* Premium access and language settings */
.app-language-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--accent, #43f38a) 34%, transparent);
  border-radius: 16px;
  background: rgba(4, 17, 14, 0.58);
}

.app-language-setting > span { display: grid; gap: 3px; }
.app-language-setting b { font-size: 15px; color: var(--text, #effff6); }
.app-language-setting small { color: var(--muted, #94aa9f); }
.app-language-setting select {
  min-width: 150px;
  min-height: 44px;
  padding: 0 38px 0 14px;
  color: var(--text, #effff6);
  border: 1px solid color-mix(in srgb, var(--accent, #43f38a) 42%, transparent);
  border-radius: 12px;
  background: #07130f;
  font: inherit;
}

.premium-settings-group { position: relative; display: grid; gap: 16px; }
[data-premium-module] { position: relative; }
.premium-module-locked { isolation: isolate; }
.premium-module-locked > :not(.premium-lock-overlay) {
  filter: saturate(0.72) brightness(0.78);
  opacity: 0.72;
}

.premium-lock-overlay {
  position: absolute;
  inset: 8px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1px solid rgba(255, 213, 101, 0.58);
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(3, 15, 12, 0.38), rgba(8, 21, 18, 0.78));
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.premium-lock-overlay > span {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 10px;
  min-width: min(280px, 88%);
  padding: 12px 16px;
  border: 1px solid rgba(255, 223, 135, 0.75);
  border-radius: 14px;
  color: #fff8de;
  background: linear-gradient(120deg, rgba(23, 17, 5, 0.94), rgba(13, 40, 30, 0.94));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.34), 0 0 24px rgba(255, 197, 61, 0.12);
}

.premium-lock-overlay i {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-style: normal;
  background: linear-gradient(135deg, #ffe178, #55f4a2);
  color: #102016;
  box-shadow: 0 0 18px rgba(255, 220, 110, 0.42);
}

.premium-lock-overlay b { font-size: 15px; }
.premium-lock-overlay small { color: rgba(255, 248, 222, 0.72); }

.premium-paywall-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: min(880px, calc(100dvh - 28px));
  padding: 0;
  overflow: auto;
  color: #effff6;
  border: 1px solid rgba(97, 249, 174, 0.5);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(64, 255, 178, 0.2), transparent 36%),
    linear-gradient(160deg, #071813, #08100e 58%, #171205);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62), 0 0 48px rgba(50, 255, 169, 0.12);
}

.premium-paywall-dialog::backdrop { background: rgba(1, 8, 6, 0.78); backdrop-filter: blur(10px); }
.premium-paywall-hero { position: relative; height: 120px; overflow: hidden; display: grid; place-items: center; }
.premium-paywall-hero span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  color: #102018;
  background: linear-gradient(135deg, #69f7ba, #ffe169 65%, #ff8e78);
  font-weight: 1000;
  letter-spacing: 0.08em;
  box-shadow: 0 0 45px rgba(102, 255, 186, 0.42);
}
.premium-paywall-hero i { position: absolute; width: 220px; height: 220px; border: 1px solid rgba(108, 255, 190, 0.2); border-radius: 50%; }
.premium-paywall-hero i:nth-of-type(2) { width: 160px; height: 160px; transform: rotate(45deg); }
.premium-paywall-hero i:nth-of-type(3) { width: 112px; height: 112px; border-color: rgba(255, 220, 103, 0.35); }
.premium-paywall-head { padding: 0 28px 18px; text-align: center; }
.premium-paywall-head small { color: #6cf9bc; letter-spacing: 0.16em; font-weight: 800; }
.premium-paywall-head h2 { margin: 8px 0 6px; font-size: clamp(25px, 5vw, 34px); }
.premium-paywall-head p { margin: 0; color: #9fb4aa; }
.premium-paywall-benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 22px; }
.premium-paywall-benefits span {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 9px;
  padding: 13px;
  border: 1px solid rgba(99, 238, 172, 0.18);
  border-radius: 14px;
  background: rgba(5, 24, 18, 0.78);
}
.premium-paywall-benefits span:last-child { grid-column: 1 / -1; }
.premium-paywall-benefits i { grid-row: 1 / 3; color: #ffd75f; font-style: normal; font-size: 11px; font-weight: 900; }
.premium-paywall-benefits b { font-size: 14px; }
.premium-paywall-benefits small { color: #8da49a; line-height: 1.4; }
.premium-paywall-price { display: grid; place-items: center; gap: 2px; margin: 20px 22px 8px; }
.premium-paywall-price strong { font-size: 32px; color: #ffe06d; }
.premium-paywall-price span { color: #a9bbb2; font-size: 12px; }
.premium-paywall-status { min-height: 20px; margin: 0 22px 8px; text-align: center; color: #ffd974; }
.premium-paywall-actions { display: grid; gap: 9px; padding: 0 22px; }
.premium-paywall-actions button { min-height: 48px; border-radius: 14px; font: inherit; font-weight: 850; cursor: pointer; }
.premium-purchase-button { border: 0; color: #102017; background: linear-gradient(100deg, #50e9ff, #54f1a2 55%, #ffe36c); box-shadow: 0 9px 30px rgba(65, 246, 169, 0.25); }
.premium-restore-button { color: #effff6; border: 1px solid rgba(100, 244, 177, 0.42); background: rgba(7, 30, 22, 0.8); }
.premium-close-button { color: #91a99e; border: 0; background: transparent; }
.premium-paywall-footnote { display: block; padding: 9px 22px 24px; text-align: center; color: #758a80; }
.premium-paywall-actions button:disabled { opacity: 0.55; cursor: wait; }

body[data-theme="moonlight"] .premium-paywall-dialog {
  border-color: rgba(255, 163, 207, 0.75);
  background: radial-gradient(circle at 50% 0%, rgba(255, 140, 198, 0.34), transparent 38%), linear-gradient(155deg, #372059, #1b1536 65%, #321c3f);
}
body[data-theme="pocket"] .premium-paywall-dialog,
body[data-theme="pocket"] .premium-lock-overlay > span,
body[data-theme="pocket"] .app-language-setting,
body[data-theme="pocket"] .app-language-setting select { border-radius: 0; box-shadow: 4px 4px 0 #26382e; }

body.is-english .premium-paywall-benefits b,
body.is-english .premium-lock-overlay b { letter-spacing: 0; }

@media (max-width: 620px) {
  .app-language-setting { align-items: stretch; flex-direction: column; }
  .app-language-setting select { width: 100%; }
  .premium-paywall-benefits { grid-template-columns: 1fr; }
  .premium-paywall-benefits span:last-child { grid-column: auto; }
  .premium-paywall-hero { height: 96px; }
  .premium-paywall-head { padding-inline: 20px; }
}

/* Share loop · report card, privacy controls and local funnel diagnostics. */
.city-report-launch {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid rgba(66, 255, 170, 0.34);
  border-radius: 14px;
  background:
    linear-gradient(115deg, rgba(8, 27, 24, 0.96), rgba(5, 16, 23, 0.96)),
    rgba(5, 18, 17, 0.92);
  box-shadow: inset 3px 0 0 #38f69a, inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.city-report-launch::after {
  content: "";
  position: absolute;
  inset: -80% -12% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82, 226, 255, 0.16), transparent 68%);
  pointer-events: none;
}

.city-report-launch > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.city-report-launch > div > small {
  color: #55f8b0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.city-report-launch > div > strong {
  color: #f4fff9;
  font-size: 0.94rem;
  font-weight: 1000;
}

.city-report-launch > div > span {
  overflow: hidden;
  color: rgba(224, 244, 238, 0.65);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-report-launch > button {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  min-width: 124px;
  min-height: 52px;
  place-content: center;
  gap: 2px;
  border: 1px solid rgba(255, 231, 115, 0.5);
  border-radius: 11px;
  color: #071711;
  background: linear-gradient(105deg, #57f1ff, #47f59a 55%, #ffe36f);
  box-shadow: 0 9px 24px rgba(45, 238, 164, 0.15);
  font-weight: 1000;
}

.city-report-launch > button small {
  font-size: 0.5rem;
  opacity: 0.68;
}

.city-report-launch > button:active {
  transform: translateY(1px) scale(0.985);
}

body.theme-moonlight .city-report-launch {
  border-color: rgba(255, 135, 186, 0.5);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 221, 112, 0.16), transparent 42%),
    linear-gradient(115deg, rgba(70, 29, 93, 0.97), rgba(31, 28, 77, 0.97));
  box-shadow: inset 3px 0 0 #ff86b7, inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 12px 30px rgba(49, 17, 69, 0.18);
}

body.theme-moonlight .city-report-launch > div > small { color: #ffdd70; }
body.theme-moonlight .city-report-launch > button {
  border-color: rgba(255, 255, 255, 0.34);
  color: #3b1947;
  background: linear-gradient(105deg, #ff83b4, #ffc96e 52%, #74ecc6);
}

.city-report-dialog {
  width: min(650px, calc(100vw - 24px));
  max-height: min(94svh, 920px);
}

.city-report-dialog-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
}

.city-report-dialog-head .celebrity-settings-close {
  width: auto !important;
  min-width: 64px !important;
  max-width: none !important;
  padding: 0 14px !important;
  overflow: visible;
  white-space: nowrap;
  line-height: 1;
}

.city-report-dialog-body {
  display: grid;
  gap: 12px;
  overflow-y: auto;
}

.city-report-dialog .city-report-dialog-body {
  overflow-x: hidden;
}

.city-report-canvas-shell {
  width: min(100%, 390px);
  margin-inline: auto;
  padding: 7px;
  border: 1px solid rgba(83, 244, 174, 0.3);
  border-radius: 18px;
  background: rgba(2, 11, 14, 0.8);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.city-report-canvas-shell canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #061513;
}

.city-report-privacy-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(128, 164, 158, 0.22);
  border-radius: 12px;
  background: rgba(5, 17, 19, 0.75);
  cursor: pointer;
}

.city-report-privacy-toggle > span {
  display: grid;
  gap: 2px;
}

.city-report-privacy-toggle b { color: #eafff4; font-size: 0.72rem; }
.city-report-privacy-toggle small { color: var(--muted); font-size: 0.54rem; }
.city-report-privacy-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.city-report-privacy-toggle > i {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: 180ms ease;
}

.city-report-privacy-toggle > i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #eafff5;
  transition: 180ms ease;
}

.city-report-privacy-toggle input:checked + i {
  border-color: rgba(73, 244, 159, 0.7);
  background: rgba(73, 244, 159, 0.3);
}

.city-report-privacy-toggle input:checked + i::after {
  left: 22px;
  background: #6affb2;
}

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

.city-report-actions button {
  min-height: 44px;
  border: 1px solid rgba(112, 190, 164, 0.34);
  border-radius: 10px;
  color: #eafff4;
  background: rgba(12, 32, 31, 0.88);
  font-size: 0.62rem;
  font-weight: 900;
}

.city-report-actions .city-report-primary-action {
  color: #06140e;
  background: linear-gradient(105deg, #5ce8ff, #52f19c 56%, #ffe375);
}

.city-report-disclaimer,
.app-disclaimer {
  color: rgba(201, 218, 213, 0.5);
  font-size: 0.5rem;
  line-height: 1.6;
  text-align: center;
}

.app-disclaimer {
  width: min(1180px, calc(100% - 28px));
  margin: 12px auto 20px;
  padding-top: 10px;
  border-top: 1px solid rgba(121, 161, 149, 0.13);
}

.app-disclaimer nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 6px;
}

.app-disclaimer a {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 3px;
}

body.theme-moonlight .city-report-canvas-shell,
body.theme-moonlight .city-report-privacy-toggle {
  border-color: rgba(255, 143, 188, 0.32);
  background: rgba(43, 21, 65, 0.78);
}

body.theme-moonlight .city-report-privacy-toggle b { color: #fff5f8; }

body.theme-moonlight .city-report-actions button {
  border-color: rgba(255, 162, 199, 0.34);
  background: rgba(58, 31, 81, 0.9);
}

body.theme-moonlight .city-report-actions .city-report-primary-action {
  color: #391543;
  background: linear-gradient(105deg, #ff8fb9, #ffc96f 55%, #76e8c4);
}

.spread-analytics-settings {
  grid-column: 1 / -1;
  padding: 13px;
  border: 1px solid rgba(88, 233, 174, 0.2);
  border-radius: 12px;
  background: rgba(7, 20, 21, 0.72);
}

.spread-analytics-settings[hidden] {
  display: none !important;
}

.spread-analytics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.spread-analytics-grid > span {
  display: grid;
  min-width: 0;
  min-height: 58px;
  align-content: center;
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(124, 174, 159, 0.16);
  border-radius: 9px;
  background: rgba(0, 8, 10, 0.34);
  text-align: center;
}

.spread-analytics-grid small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.48rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spread-analytics-grid strong {
  color: #61f3ac;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
}

.spread-analytics-settings > p {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 0.5rem;
  line-height: 1.55;
}

body.theme-moonlight .spread-analytics-settings {
  border-color: rgba(255, 140, 185, 0.25);
  background: rgba(59, 29, 78, 0.56);
}

body.theme-moonlight .spread-analytics-grid strong { color: #ffd775; }

@media (max-width: 640px) {
  .city-report-launch { gap: 9px; padding: 11px 12px; }
  .city-report-launch > div > span { max-width: 210px; }
  .city-report-launch > button { min-width: 94px; min-height: 48px; }
  .city-report-dialog { width: calc(100vw - 16px); max-height: 94svh; }
  .city-report-dialog-body { padding: 10px !important; }
  .city-report-canvas-shell { width: min(100%, 330px); }
  .city-report-actions { grid-template-columns: 1fr 1fr; }
  .city-report-actions .city-report-primary-action { grid-column: 1 / -1; }
  .spread-analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spread-analytics-grid > span:last-child { grid-column: 1 / -1; }
}

.work-hours-setting { align-items: center; }
.work-hours-inputs { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.work-hours-inputs input {
  width: 112px;
  min-height: 44px;
  padding: 8px 10px;
  color: #effff6;
  border: 1px solid rgba(82, 255, 173, 0.34);
  border-radius: 12px;
  background: rgba(2, 16, 13, 0.72);
  font: inherit;
  font-weight: 800;
  text-align: center;
}
.work-hours-inputs i { color: #75a294; font-style: normal; }

dialog.session-settlement-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: auto;
  color: #effff6;
  border: 1px solid rgba(94, 255, 180, 0.55);
  border-radius: 24px;
  background: radial-gradient(circle at 50% 0, rgba(58, 255, 164, 0.18), transparent 38%), linear-gradient(155deg, #071b15, #07110e 70%, #171307);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62), 0 0 32px rgba(55, 255, 166, 0.12);
}
dialog.session-settlement-dialog::backdrop { background: rgba(0, 8, 6, 0.78); backdrop-filter: blur(12px); }
.session-settlement-head { padding: 24px 24px 18px; }
.session-settlement-head h2 { margin: 4px 0; font-size: 27px; }
.session-settlement-head small { color: #53f5aa; font-weight: 900; letter-spacing: .16em; }
.session-settlement-head p { margin: 0; color: #9cb8ad; font-size: 13px; }
.session-settlement-body { display: grid; gap: 16px; padding: 6px 24px 24px; }
.session-settlement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.session-settlement-grid article { display: grid; gap: 7px; padding: 17px; border: 1px solid rgba(90, 255, 179, 0.24); border-radius: 17px; background: rgba(4, 29, 22, 0.72); }
.session-settlement-grid small, .session-settlement-grid span { color: #91b1a4; }
.session-settlement-grid strong { color: #69ffb6; font-size: 24px; }
.session-actual-income { display: grid; gap: 10px; }
.session-actual-income > span { display: flex; justify-content: space-between; gap: 12px; }
.session-actual-income small { color: #86a89a; }
.session-actual-income > div { display: grid; grid-template-columns: auto 1fr; align-items: center; min-height: 58px; border: 1px solid rgba(255, 210, 88, 0.45); border-radius: 15px; background: rgba(8, 20, 16, 0.82); overflow: hidden; }
.session-actual-income i { padding: 0 16px; color: #ffd45f; font-style: normal; font-weight: 900; }
.session-actual-income input { width: 100%; min-width: 0; height: 58px; padding: 0 16px; color: #fff7dc; border: 0; border-left: 1px solid rgba(255, 210, 88, 0.22); outline: 0; background: transparent; font: inherit; font-size: 20px; font-weight: 900; }
.session-settlement-total { display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; border-radius: 15px; background: linear-gradient(105deg, rgba(65, 255, 172, 0.13), rgba(255, 211, 81, 0.1)); }
.session-settlement-total strong { color: #ffe071; font-size: 25px; }
.session-settlement-note { margin: 0; color: #9bb6ab; font-size: 13px; line-height: 1.55; }
.session-settlement-confirm { min-height: 62px; color: #092017; border: 0; border-radius: 16px; background: linear-gradient(105deg, #55eaff, #4dffa7 60%, #ffe36c); box-shadow: 0 12px 30px rgba(65, 255, 170, 0.18); font: inherit; font-weight: 950; }
.session-settlement-confirm span, .session-settlement-confirm small { display: block; }
.session-settlement-confirm span { font-size: 20px; }
.session-settlement-confirm small { margin-top: 3px; opacity: .7; }
body.theme-moonlight dialog.session-settlement-dialog { border-color: rgba(255, 151, 205, .72); background: radial-gradient(circle at 50% 0, rgba(255, 139, 200, .28), transparent 42%), linear-gradient(155deg, #342151, #1a1531 72%, #342034); }
body.theme-moonlight .session-settlement-confirm { color: #421a40; background: linear-gradient(105deg, #ffd56e, #ff91ca 56%, #aaa0ff); }
body.theme-pocket dialog.session-settlement-dialog { color: #1d3328; border: 4px solid #263c31; border-radius: 3px; background: #ced8c4; box-shadow: 8px 8px 0 #263c31; }
body.theme-pocket .session-settlement-grid article, body.theme-pocket .session-actual-income > div { border: 2px solid #385043; border-radius: 2px; background: #edf1e8; }
body.theme-pocket .session-settlement-grid strong, body.theme-pocket .session-actual-income input { color: #1d3328; }
body.theme-pocket .session-settlement-confirm { color: #172f23; border: 3px solid #263c31; border-radius: 2px; background: #e6a437; box-shadow: 4px 4px 0 #263c31; }

@media (max-width: 560px) {
  .work-hours-setting { align-items: stretch; }
  .work-hours-inputs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); width: 100%; justify-content: stretch; }
  .work-hours-inputs input { width: 100%; min-width: 0; }
  .session-settlement-head { padding: 20px 18px 14px; }
  .session-settlement-body { padding: 4px 18px 18px; }
  .session-settlement-grid strong { font-size: 21px; }
  .session-actual-income > span { display: grid; gap: 2px; }
}

.income-node-name {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  border-radius: 7px;
  outline: 0;
  background: color-mix(in srgb, var(--accent) 6%, rgba(0, 0, 0, 0.2));
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
}
.income-node-name:focus { border-color: rgba(57, 248, 143, 0.72); box-shadow: 0 0 0 3px rgba(57, 248, 143, 0.11); }
.income-node-status {
  display: grid;
  place-items: center;
  padding: 0 5px;
  color: #092017 !important;
  background: linear-gradient(100deg, #5affb4, #dfff6c) !important;
  box-shadow: 0 8px 20px rgba(68, 255, 172, 0.16) !important;
  font-size: 0.66rem;
  line-height: 1.05;
  text-align: center;
}

/* Income and interaction dashboard layout. */
.income-overview {
  position: absolute;
  top: 12px;
  right: clamp(16px, 3vw, 36px);
  left: clamp(16px, 3vw, 36px);
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid rgba(136, 235, 180, 0.26);
  border-radius: 8px;
  background: rgba(4, 14, 12, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 22px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.income-overview-item {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.income-overview-item > span {
  color: #b9d2c2;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.income-overview-item strong {
  overflow: hidden;
  color: #f7fff9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(1.02rem, 2.2vw, 1.3rem);
  font-weight: 950;
  line-height: 1.06;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.income-overview-actual strong {
  color: var(--green);
}

.income-overview-goal strong {
  color: var(--amber);
}

.income-overview-item small {
  overflow: hidden;
  color: rgba(224, 241, 231, 0.62);
  font-size: 0.55rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.income-overview-divider {
  width: 1px;
  background: rgba(221, 255, 235, 0.16);
}

.income-goal-meter {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.32);
}

.income-goal-meter i {
  display: block;
  width: var(--rank-fill, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--amber);
  box-shadow: 0 0 9px rgba(255, 212, 95, 0.58);
  transition: width 420ms cubic-bezier(0.18, 0.84, 0.28, 1);
}

.collection-console {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 clamp(18px, 4vw, 46px) 18px;
}

.workday-countdowns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 clamp(18px, 4vw, 46px) 10px;
}

.workday-countdowns[hidden],
.workday-countdown-card[hidden] {
  display: none;
}

.workday-countdown-card {
  --countdown-accent: #ffd45f;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--countdown-accent) 28%, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--countdown-accent) 9%, rgba(5, 12, 11, 0.94)), rgba(5, 12, 11, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.work-time-countdown-card {
  --countdown-accent: #58efbd;
}

.workday-countdown-card::after {
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--countdown-accent), transparent);
  content: "";
  opacity: 0.68;
}

.workday-countdown-card > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.workday-countdown-card span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(238, 247, 241, 0.88);
  font-size: 0.62rem;
  font-weight: 950;
}

.workday-countdown-card span b {
  overflow: hidden;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workday-countdown-card span i {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--countdown-accent) 54%, transparent);
  border-radius: 6px;
  color: #102017;
  background: var(--countdown-accent);
  font-size: 0.52rem;
  font-style: normal;
  box-shadow: 0 0 12px color-mix(in srgb, var(--countdown-accent) 24%, transparent);
}

.workday-countdown-card small {
  overflow: hidden;
  color: color-mix(in srgb, var(--countdown-accent) 58%, rgba(236, 246, 240, 0.6));
  font-size: 0.48rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workday-countdown-card strong {
  flex: 0 0 auto;
  color: var(--countdown-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.86rem, 2vw, 1.08rem);
  font-weight: 1000;
  letter-spacing: 0.03em;
  text-shadow: 0 0 12px color-mix(in srgb, var(--countdown-accent) 38%, transparent);
}

.workday-countdown-card[data-phase="arrived"] {
  filter: saturate(0.78);
}

.workday-countdown-card[data-phase="arrived"] strong {
  font-size: 0;
  opacity: 0.58;
}

.workday-countdown-card[data-phase="arrived"] strong::after {
  content: "✓";
  font-size: 1rem;
}

.daily-goal-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
  margin: 0 clamp(18px, 4vw, 46px) 12px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 212, 95, 0.28);
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  background: linear-gradient(110deg, rgba(255, 212, 95, 0.1), rgba(8, 18, 15, 0.94) 62%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.daily-goal-panel::before,
.daily-goal-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
}

.daily-goal-panel::before {
  inset: -180%;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 226, 126, 0.28) 0 4deg, transparent 4deg 14deg);
  transform: scale(0.18) rotate(0);
}

.daily-goal-panel::after {
  top: -60%;
  bottom: -60%;
  left: -35%;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 221, 0.72), transparent);
  transform: skewX(-18deg);
}

.daily-goal-copy {
  display: grid;
  gap: 2px;
}

.daily-goal-copy span,
.daily-goal-progress small {
  color: rgba(235, 246, 239, 0.66);
  font-size: 0.6rem;
  font-weight: 850;
}

.daily-goal-copy strong {
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.04rem;
  font-weight: 950;
  line-height: 1.1;
}

.daily-goal-progress {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.daily-goal-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.daily-goal-progress-head > span {
  overflow: hidden;
  color: rgba(235, 246, 239, 0.74);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-goal-progress-head > div {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.daily-goal-progress-head small {
  overflow: hidden;
  color: #f6df93;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-goal-progress-head strong {
  flex: 0 0 auto;
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.08rem;
  font-weight: 1000;
  text-shadow: 0 0 10px rgba(255, 212, 95, 0.34);
}

.income-goal-reward {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 7;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.5);
}

.income-goal-reward b {
  color: #fff7c9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 1000;
  line-height: 1;
  text-shadow:
    0 0 8px rgba(255, 212, 95, 0.9),
    0 0 24px rgba(255, 129, 83, 0.66);
}

.income-goal-reward small {
  margin-top: 3px;
  color: #fff5d1;
  font-size: 0.5rem;
  font-weight: 1000;
  letter-spacing: 0.16em;
}

.income-goal-stamp {
  display: none;
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 2px solid #ff745f;
  border-radius: 4px;
  color: #ff8b73;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 0.62rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  opacity: 0;
  text-shadow: 0 0 7px rgba(255, 90, 114, 0.36);
  transform: rotate(-7deg) scale(1.6);
  pointer-events: none;
}

.daily-goal-panel.is-complete {
  border-color: rgba(57, 248, 143, 0.58);
  border-left-color: var(--green);
  background: linear-gradient(110deg, rgba(57, 248, 143, 0.12), rgba(8, 18, 15, 0.96) 62%);
}

.daily-goal-panel.is-complete .daily-goal-progress-head strong {
  color: var(--green);
  text-shadow: 0 0 12px rgba(57, 248, 143, 0.52);
}

.daily-goal-panel.is-complete .income-goal-meter i {
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.daily-goal-panel.is-complete .income-goal-stamp {
  display: inline-flex;
  opacity: 0.9;
  transform: rotate(-7deg) scale(1);
}

.daily-goal-panel.reward-stage {
  animation: income-goal-stage-hit 1050ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.daily-goal-panel.reward-stage::after,
.daily-goal-panel.reward-major::after,
.daily-goal-panel.reward-complete::after {
  opacity: 1;
  animation: income-goal-sweep 900ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.daily-goal-panel.reward-stage .daily-goal-progress-head strong {
  animation: income-goal-percent-pop 920ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.daily-goal-panel.reward-stage .income-goal-reward {
  animation: income-goal-reward-pop 1100ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.daily-goal-panel.reward-major,
.daily-goal-panel.reward-complete {
  animation: income-goal-major-hit 1900ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.daily-goal-panel.reward-major::before,
.daily-goal-panel.reward-complete::before {
  opacity: 1;
  animation: income-goal-rays 1800ms cubic-bezier(0.14, 0.82, 0.22, 1) both;
}

.daily-goal-panel.reward-major .income-goal-reward,
.daily-goal-panel.reward-complete .income-goal-reward {
  animation: income-goal-major-reward 1900ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.daily-goal-panel.reward-complete .income-goal-stamp {
  animation: income-goal-stamp-in 1500ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

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

.daily-goal-sources span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  color: rgba(230, 241, 234, 0.62);
  font-size: 0.5rem;
  font-weight: 800;
  white-space: nowrap;
}

.daily-goal-sources i {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px rgba(57, 248, 143, 0.62);
}

.daily-goal-source-extra i {
  background: var(--amber);
  box-shadow: 0 0 7px rgba(255, 212, 95, 0.62);
}

.daily-goal-sources b {
  overflow: hidden;
  color: #eafff1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.52rem;
  text-overflow: ellipsis;
}

.fortune-console {
  margin: 0 clamp(18px, 4vw, 46px) 18px;
}

.fortune-console .collection-unit {
  max-width: 560px;
  margin: 0 auto;
}

.break-games {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0 clamp(18px, 4vw, 46px) 12px;
}

.break-game {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 17, 15, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.break-game-luck {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border-color: rgba(255, 212, 95, 0.46);
  background:
    radial-gradient(circle at 9% 16%, rgba(255, 212, 95, 0.15), transparent 24%),
    radial-gradient(circle at 92% 85%, rgba(255, 90, 114, 0.11), transparent 28%),
    linear-gradient(112deg, rgba(80, 48, 8, 0.3), rgba(7, 17, 15, 0.92) 58%);
}

.break-game-fortune {
  position: relative;
  overflow: hidden;
  border-color: rgba(212, 151, 255, 0.38);
  background:
    radial-gradient(circle at 12% 20%, rgba(211, 135, 255, 0.16), transparent 26%),
    radial-gradient(circle at 90% 88%, rgba(255, 118, 154, 0.11), transparent 30%),
    linear-gradient(112deg, rgba(36, 20, 49, 0.78), rgba(7, 17, 15, 0.94) 64%);
}

.break-game-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.break-game-head span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.break-game-head strong {
  overflow: hidden;
  color: #eafff1;
  font-size: 0.7rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.luck-tools {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}

.luck-start-button {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  grid-template-rows: 1fr auto;
  gap: 4px;
  min-height: 104px;
  padding: 6px;
  border: 1px solid rgba(255, 226, 126, 0.72);
  border-radius: 7px;
  color: #fff0b8;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 226, 126, 0.26), transparent 34%),
    linear-gradient(160deg, rgba(110, 62, 10, 0.78), rgba(24, 10, 8, 0.94));
  box-shadow:
    inset 0 0 18px rgba(255, 212, 95, 0.12),
    0 0 16px rgba(255, 157, 57, 0.12);
}

.luck-start-button::after {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -70%;
  width: 48%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 225, 0.54), transparent);
  transform: rotate(16deg);
  animation: wealth-button-shine 2600ms ease-in-out infinite;
}

.luck-start-button span {
  display: grid;
  width: 56px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(255, 247, 201, 0.86);
  border-radius: 6px;
  color: #321106;
  background: linear-gradient(135deg, #fff5b8 0%, #ffd45f 46%, #ff765c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 5px 14px rgba(255, 103, 70, 0.34);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.94rem;
  font-weight: 1000;
  letter-spacing: 0.04em;
}

.luck-start-button small {
  color: #ffe9a2;
  font-size: 0.56rem;
  font-weight: 1000;
  line-height: 1;
}

.luck-start-button:disabled span {
  animation: luck-start-roll 640ms cubic-bezier(0.18, 0.84, 0.28, 1) infinite;
}

.lottery-machine {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 212, 95, 0.34);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 212, 95, 0.11), transparent 52%),
    rgba(1, 10, 12, 0.7);
  box-shadow: inset 0 0 18px rgba(255, 212, 95, 0.05);
}

.lottery-machine::before {
  content: "";
  position: absolute;
  top: -45%;
  bottom: -45%;
  left: -36%;
  z-index: 6;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgba(255, 250, 202, 0.4), transparent);
  opacity: 0;
  transform: skewX(-18deg);
  pointer-events: none;
}

.lottery-machine.is-rolling {
  border-color: rgba(255, 226, 126, 0.62);
  box-shadow:
    inset 0 0 22px rgba(255, 212, 95, 0.12),
    0 0 14px rgba(255, 212, 95, 0.1);
  animation:
    slot-machine-rumble 180ms steps(2, end) infinite,
    lottery-machine-pulse 680ms steps(2, end) infinite;
}

.lottery-machine[data-mode="powerball"].is-rolling,
.lottery-machine[data-mode="mega"].is-rolling {
  animation: lottery-ball-machine-glow 920ms ease-in-out infinite;
}

.lottery-machine.is-rolling::before {
  opacity: 1;
  animation: wealth-machine-scan 880ms linear infinite;
}

.lottery-machine.is-rolling .lottery-mode-button {
  pointer-events: none;
  opacity: 0.55;
}

.lottery-machine.is-rolling .lottery-digits {
  border-color: rgba(255, 229, 139, 0.56);
  box-shadow:
    inset 0 4px 9px rgba(0, 0, 0, 0.58),
    inset 0 -4px 9px rgba(0, 0, 0, 0.58),
    0 0 18px rgba(255, 212, 95, 0.16);
}

.lottery-machine.is-settled {
  animation: lottery-machine-finale 1250ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.lottery-machine.is-settled::after {
  content: "暴富密码已锁定";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  padding: 6px 10px;
  border: 1px solid rgba(255, 245, 189, 0.86);
  border-radius: 6px;
  color: #1e1607;
  background: linear-gradient(90deg, #fff2a0, var(--amber) 44%, #ff8466);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.16),
    0 0 28px rgba(255, 212, 95, 0.58);
  font-size: 0.6rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: none;
  animation: lottery-settled-banner 1250ms cubic-bezier(0.18, 0.82, 0.26, 1) both;
}

.lottery-machine.is-settled .lottery-digits {
  animation: lottery-digits-finale 1100ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.lottery-machine.is-settled .lottery-reel {
  animation: lottery-jackpot-glow 920ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.lottery-machine.is-settled .lottery-reel:nth-child(2) { animation-delay: 55ms; }
.lottery-machine.is-settled .lottery-reel:nth-child(3) { animation-delay: 110ms; }
.lottery-machine.is-settled .lottery-reel:nth-child(4) { animation-delay: 165ms; }
.lottery-machine.is-settled .lottery-reel:nth-child(5) { animation-delay: 220ms; }
.lottery-machine.is-settled .lottery-reel:nth-child(6) { animation-delay: 275ms; }
.lottery-machine.is-settled .lottery-reel:nth-child(7) { animation-delay: 330ms; }

.lottery-machine-head,
.lottery-mode {
  display: flex;
  align-items: center;
}

.lottery-machine-head {
  align-items: stretch;
  flex-direction: column;
  gap: 4px;
}

.lottery-mode {
  gap: 3px;
  flex-wrap: wrap;
}

.lottery-mode-button {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(255, 212, 95, 0.28);
  border-radius: 5px;
  color: rgba(240, 248, 241, 0.68);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.54rem;
  font-weight: 900;
}

.lottery-mode-button-wide {
  padding-inline: 9px;
  font-size: 0.5rem;
  letter-spacing: -0.01em;
}

.lottery-mode-button[aria-pressed="true"] {
  border-color: rgba(255, 237, 166, 0.84);
  color: #261707;
  background: linear-gradient(135deg, #fff0a6, var(--amber));
  box-shadow: 0 0 12px rgba(255, 212, 95, 0.18);
}

.lottery-machine-head > small {
  overflow: hidden;
  color: rgba(213, 236, 223, 0.6);
  font-size: 0.52rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.lottery-digits {
  display: grid;
  grid-template-columns: repeat(var(--lottery-columns, 7), minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 229, 139, 0.2);
  border-radius: 7px;
  background: rgba(0, 4, 5, 0.7);
  box-shadow:
    inset 0 4px 9px rgba(0, 0, 0, 0.5),
    inset 0 -4px 9px rgba(0, 0, 0, 0.5);
}

.lottery-digits i {
  --lottery-reel-height: 40px;
  position: relative;
  display: block;
  height: var(--lottery-reel-height);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 212, 95, 0.46);
  border-radius: 5px;
  color: #301908;
  background: linear-gradient(135deg, #fff1aa, var(--amber));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 -1px 0 rgba(84, 43, 2, 0.24);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 1000;
}

.lottery-reel-static,
.lottery-reel-track b {
  display: grid;
  width: 100%;
  height: var(--lottery-reel-height);
  flex: 0 0 var(--lottery-reel-height);
  place-items: center;
  color: inherit;
  font: inherit;
}

.lottery-reel-track {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  flex-direction: column;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.lottery-reel.is-pending {
  opacity: 0;
  transform: translateY(7px) scale(0.72);
}

.lottery-reel.is-active {
  animation: lottery-reel-appear 260ms cubic-bezier(0.18, 0.84, 0.28, 1) both;
}

.lottery-reel.is-spinning {
  color: var(--amber);
  background: rgba(12, 13, 6, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.46),
    0 0 12px rgba(255, 212, 95, 0.32);
}

.lottery-reel.is-spinning .lottery-reel-static {
  text-shadow:
    0 -18px 0 rgba(255, 212, 95, 0.18),
    0 18px 0 rgba(255, 212, 95, 0.16),
    0 0 8px rgba(255, 212, 95, 0.72);
  animation: lottery-digit-spin 116ms steps(2, end) infinite;
}

.lottery-reel::before,
.lottery-reel::after {
  position: absolute;
  z-index: 2;
  right: 0;
  left: 0;
  height: 24%;
  content: "";
  pointer-events: none;
}

.lottery-reel::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(71, 39, 5, 0.44), transparent);
}

.lottery-reel::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(71, 39, 5, 0.38), transparent);
}

.lottery-digits[data-mode="welfare"] i.is-special {
  border-color: rgba(171, 228, 255, 0.78);
  color: #071d2b;
  background: linear-gradient(135deg, #dff7ff, #54b8ff);
}

.lottery-digits[data-mode="powerball"] i:not(.is-special),
.lottery-digits[data-mode="mega"] i:not(.is-special) {
  border-color: rgba(237, 243, 247, 0.82);
  color: #142027;
  background: linear-gradient(145deg, #ffffff, #cad7dd);
}

.lottery-digits[data-mode="powerball"],
.lottery-digits[data-mode="mega"] {
  gap: 5px;
  padding: 5px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 62%),
    rgba(0, 4, 7, 0.78);
}

.lottery-digits[data-mode="powerball"] .lottery-reel,
.lottery-digits[data-mode="mega"] .lottery-reel {
  width: var(--lottery-reel-height);
  justify-self: center;
  border-radius: 50%;
  box-shadow:
    inset -4px -5px 9px rgba(26, 36, 40, 0.24),
    inset 4px 4px 7px rgba(255, 255, 255, 0.62),
    0 5px 10px rgba(0, 0, 0, 0.34);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.lottery-digits[data-mode="powerball"] .lottery-reel::before,
.lottery-digits[data-mode="mega"] .lottery-reel::before {
  top: 3px;
  right: auto;
  left: 6px;
  width: 8px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.76);
  filter: blur(0.4px);
}

.lottery-digits[data-mode="powerball"] .lottery-reel::after,
.lottery-digits[data-mode="mega"] .lottery-reel::after {
  display: none;
}

.lottery-digits[data-mode="powerball"] .lottery-reel.is-active,
.lottery-digits[data-mode="mega"] .lottery-reel.is-active {
  animation: lottery-ball-arrive 420ms cubic-bezier(0.16, 0.9, 0.24, 1.22) both;
}

.lottery-digits[data-mode="powerball"] .lottery-reel.is-spinning,
.lottery-digits[data-mode="mega"] .lottery-reel.is-spinning {
  color: #15232a;
  background: linear-gradient(145deg, #fff, #b9c9d0);
  box-shadow:
    inset -4px -5px 9px rgba(26, 36, 40, 0.28),
    inset 4px 4px 7px rgba(255, 255, 255, 0.72),
    0 0 15px rgba(210, 240, 255, 0.48);
}

.lottery-digits[data-mode="powerball"] .lottery-reel.is-spinning .lottery-reel-static,
.lottery-digits[data-mode="mega"] .lottery-reel.is-spinning .lottery-reel-static {
  text-shadow: 0 0 7px rgba(64, 132, 159, 0.46);
  animation: lottery-ball-number-roll 360ms linear infinite;
}

.lottery-digits[data-mode="powerball"] i.is-special {
  border-color: rgba(255, 183, 176, 0.9);
  color: #fff8f1;
  background: linear-gradient(145deg, #ff6b65, #9f1320);
}

.lottery-digits[data-mode="mega"] i.is-special {
  border-color: rgba(255, 235, 156, 0.92);
  color: #382105;
  background: linear-gradient(145deg, #fff1a1, #e3a91a);
}

.lottery-digits i.is-locked {
  z-index: 3;
  border-color: rgba(57, 248, 143, 0.78);
  color: #062016;
  background: linear-gradient(135deg, #caffde, var(--green));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 0 13px rgba(57, 248, 143, 0.5);
  animation: lottery-digit-lock 240ms cubic-bezier(0.18, 0.84, 0.28, 1) both;
}

.lottery-digits[data-mode="powerball"] i.is-special.is-locked {
  border-color: #ffc2ba;
  color: #fff;
  background: linear-gradient(145deg, #ff776f, #b21522);
  box-shadow: 0 0 16px rgba(255, 73, 82, 0.64);
}

.lottery-digits[data-mode="mega"] i.is-special.is-locked {
  border-color: #fff0a8;
  color: #3b2605;
  background: linear-gradient(145deg, #fff3a8, #e4ad1d);
  box-shadow: 0 0 16px rgba(255, 210, 66, 0.62);
}

.lottery-digits[data-mode="powerball"] i:not(.is-special).is-locked,
.lottery-digits[data-mode="mega"] i:not(.is-special).is-locked {
  border-color: rgba(231, 250, 255, 0.96);
  color: #10232b;
  background: linear-gradient(145deg, #ffffff, #c6d7dd);
  box-shadow:
    inset -4px -5px 9px rgba(26, 36, 40, 0.22),
    inset 4px 4px 7px rgba(255, 255, 255, 0.74),
    0 0 15px rgba(116, 220, 255, 0.64);
}

.fortune-layout {
  display: grid;
  grid-template-columns: minmax(150px, 0.78fr) minmax(0, 1.62fr);
  gap: 8px;
}

.fortune-draw-stage,
.fortune-result {
  --fortune-tone: #d6a84e;
  --fortune-label-bg: #e9bd5f;
  --fortune-label-ink: #35120e;
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--fortune-tone) 58%, rgba(255, 255, 255, 0.08));
  border-radius: 9px;
  background:
    radial-gradient(circle at 12% 45%, color-mix(in srgb, var(--fortune-tone) 16%, transparent), transparent 28%),
    linear-gradient(118deg, rgba(74, 18, 14, 0.96), rgba(25, 12, 9, 0.97) 54%, rgba(13, 22, 16, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 30px color-mix(in srgb, var(--fortune-tone) 5%, transparent);
}

.fortune-draw-stage {
  display: grid;
  min-height: 192px;
  grid-template-rows: auto 1fr auto auto;
  gap: 4px;
  padding: 9px;
}

.fortune-stage-label,
.fortune-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.fortune-stage-label span {
  color: #fff5d9;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 0.68rem;
  font-weight: 1000;
  letter-spacing: 0.16em;
}

.fortune-stage-label small {
  color: rgba(244, 230, 248, 0.55);
  font-size: 0.45rem;
  font-weight: 800;
}

.fortune-vessel {
  position: relative;
  width: 104px;
  height: 94px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  transform-origin: 50% 84%;
}

.fortune-vessel:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--fortune-tone) 82%, white 16%);
  outline-offset: 7px;
  border-radius: 18px;
}

.fortune-vessel:disabled {
  cursor: wait;
}

.fortune-vessel::before,
.fortune-vessel::after {
  content: "";
  position: absolute;
  z-index: 3;
  right: 13px;
  bottom: 0;
  left: 13px;
}

.fortune-vessel::before {
  height: 60px;
  border: 1px solid rgba(238, 194, 97, 0.7);
  border-radius: 6px 6px 15px 15px;
  background:
    linear-gradient(90deg, rgba(255, 226, 153, 0.16), transparent 24%, transparent 76%, rgba(22, 6, 4, 0.3)),
    linear-gradient(160deg, #9b382d, #541c18 58%, #28100e);
  box-shadow:
    inset 0 0 0 4px rgba(255, 226, 153, 0.035),
    inset 0 -12px 22px rgba(25, 5, 4, 0.3),
    0 7px 18px rgba(48, 20, 14, 0.5);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}

.fortune-vessel::after {
  bottom: 55px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(238, 194, 97, 0.46);
  background: linear-gradient(#c26745, #6a241c 55%, #32120f);
  box-shadow:
    inset 0 1px 0 rgba(255, 225, 171, 0.28),
    0 0 9px rgba(126, 64, 41, 0.42);
}

.fortune-vessel > em {
  position: absolute;
  z-index: 5;
  bottom: 17px;
  left: 50%;
  color: #f5d477;
  font-family: "STKaiti", "KaiTi", "FangSong", "STSong", serif;
  font-size: 1.08rem;
  font-style: normal;
  font-weight: 1000;
  text-shadow: 0 1px 2px rgba(20, 7, 5, 0.8);
  transform: translateX(-50%);
}

.fortune-sticks {
  position: absolute;
  z-index: 1;
  top: 3px;
  left: 50%;
  width: 72px;
  height: 52px;
  transform: translateX(-50%);
}

.fortune-sticks i {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 5px;
  height: 58px;
  border: 1px solid rgba(255, 244, 205, 0.46);
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(#f6dfa1, #d0924f 64%, #8d4d29);
  box-shadow: 0 0 5px rgba(222, 174, 111, 0.22);
  transform: translateX(calc((var(--stick) - 2) * 8px)) rotate(calc((var(--stick) - 2) * 5deg));
  transform-origin: 50% 100%;
}

.fortune-drawn-stick {
  position: absolute;
  z-index: 2;
  bottom: 46px;
  left: 50%;
  display: grid;
  width: 16px;
  height: 76px;
  place-items: start center;
  padding-top: 5px;
  border: 1px solid rgba(255, 248, 215, 0.7);
  border-radius: 4px 4px 2px 2px;
  color: #42150f;
  background: linear-gradient(90deg, #c7804e, #f2d89c 48%, #b96540);
  box-shadow: 0 0 16px rgba(220, 170, 101, 0.3);
  font-family: "STKaiti", "KaiTi", "FangSong", "STSong", serif;
  opacity: 0;
  transform: translate(-50%, 36px) rotate(2deg);
}

.fortune-drawn-stick b {
  font-size: 0.68rem;
  line-height: 1;
}

.fortune-draw-stage.has-result .fortune-drawn-stick {
  opacity: 1;
  transform: translate(-50%, -13px) rotate(2deg);
}

.fortune-outcome {
  position: relative;
  z-index: 2;
  display: grid;
  width: 118px;
  height: 154px;
  min-height: 154px;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  justify-self: center;
  overflow: hidden;
  padding: 12px 10px 11px;
  border: 1px solid transparent;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(-26px) rotate(2deg) scale(0.84);
  transform-origin: 50% 50%;
  visibility: hidden;
}

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

.fortune-outcome::before {
  inset: 6px;
  border: 2px double rgba(139, 33, 28, 0.62);
}

.fortune-outcome::after {
  display: none;
}

.fortune-outcome.is-visible {
  border-color: rgba(196, 137, 48, 0.95);
  color: #5e1714;
  background:
    linear-gradient(90deg, transparent 0 8px, rgba(143, 35, 32, 0.12) 8px 11px, transparent 11px calc(100% - 11px), rgba(143, 35, 32, 0.12) calc(100% - 11px) calc(100% - 8px), transparent calc(100% - 8px)),
    linear-gradient(160deg, #faebb5, #edcf7e 68%, #d7a84c);
  box-shadow:
    inset 0 0 24px rgba(117, 46, 22, 0.12),
    0 13px 26px rgba(0, 0, 0, 0.34);
  opacity: 1;
  transform: translateY(0) rotate(0) scale(1);
  visibility: visible;
}

.fortune-outcome > small,
.fortune-outcome > span {
  position: relative;
  z-index: 1;
  color: #8b211c;
  font-family: "STKaiti", "KaiTi", "FangSong", "STSong", serif;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.fortune-outcome > small {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(143, 47, 43, 0.34);
  font-size: 0.48rem;
}

.fortune-outcome > span {
  font-size: 0.39rem;
  letter-spacing: 0.12em;
}

.fortune-draw-stage.is-presenting .fortune-outcome {
  animation: fortune-lingqian-reveal 1500ms cubic-bezier(0.18, 0.84, 0.22, 1) both;
}

.fortune-result {
  display: grid;
  min-height: 192px;
  align-content: center;
  gap: 7px;
  padding: 11px 12px;
}

.fortune-result::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -80% -20%;
  background: conic-gradient(from 180deg, transparent, color-mix(in srgb, var(--fortune-tone) 13%, transparent), transparent 30%);
  animation: fortune-aura 9s linear infinite;
}

.fortune-result[data-tone="gold"], .fortune-draw-stage[data-tone="gold"] { --fortune-tone: #d6a84e; }
.fortune-result[data-tone="cyan"], .fortune-draw-stage[data-tone="cyan"] { --fortune-tone: #79aa91; }
.fortune-result[data-tone="violet"], .fortune-draw-stage[data-tone="violet"] { --fortune-tone: #9a7aa5; }
.fortune-result[data-tone="green"], .fortune-draw-stage[data-tone="green"] { --fortune-tone: #7ea36e; }
.fortune-result[data-tone="rose"], .fortune-draw-stage[data-tone="rose"] { --fortune-tone: #bf7770; }
.fortune-result[data-tone="amber"], .fortune-draw-stage[data-tone="amber"] { --fortune-tone: #c78d4d; }
.fortune-result[data-tone="red"], .fortune-draw-stage[data-tone="red"] { --fortune-tone: #bd594b; }
.fortune-result[data-tone="pink"], .fortune-draw-stage[data-tone="pink"] { --fortune-tone: #b87b83; }

.fortune-auspice {
  flex: 0 0 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #251c17;
  background: transparent;
  box-shadow: none;
  font-family: "STKaiti", "KaiTi", "FangSong", "STSong", serif;
  font-size: 1.38rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

.fortune-result-state {
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--fortune-tone) 32%, transparent);
  border-radius: 999px;
  color: color-mix(in srgb, var(--fortune-tone) 72%, white 18%);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.46rem;
  font-weight: 900;
}

.fortune-sequence {
  color: color-mix(in srgb, var(--fortune-tone) 66%, white 14%);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.fortune-sigil {
  position: relative;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--fortune-tone) 72%, white 12%);
  border-radius: 50%;
  color: #fff8e3;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--fortune-tone) 30%, #231027), rgba(14, 7, 18, 0.96) 68%);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.025),
    0 0 20px color-mix(in srgb, var(--fortune-tone) 32%, transparent);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 1.2rem;
  font-weight: 1000;
  text-shadow: 0 0 10px var(--fortune-tone);
}

.fortune-sigil::before,
.fortune-sigil::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px dashed color-mix(in srgb, var(--fortune-tone) 42%, transparent);
  border-radius: 50%;
}

.fortune-sigil::after {
  inset: 6px;
  border-style: solid;
  opacity: 0.28;
}

.fortune-oracle-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
}

.fortune-oracle-label {
  color: color-mix(in srgb, var(--fortune-tone) 76%, white 16%);
  font-size: 0.46rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.fortune-result b {
  display: block;
  overflow: hidden;
  color: #fff4d4;
  font-size: 0.82rem;
  font-weight: 1000;
  text-overflow: ellipsis;
  text-shadow: 0 0 13px color-mix(in srgb, var(--fortune-tone) 35%, transparent);
  white-space: nowrap;
}

.fortune-result p {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(244, 241, 248, 0.78);
  font-size: 0.58rem;
  font-weight: 750;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.fortune-oracle-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 2px;
}

.fortune-oracle-footer span,
.fortune-oracle-footer em {
  overflow: hidden;
  border-radius: 999px;
  font-size: 0.46rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fortune-oracle-footer span {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid rgba(227, 193, 132, 0.28);
  color: var(--fortune-label-bg);
  background: rgba(227, 193, 132, 0.08);
}

.fortune-oracle-footer em {
  min-width: 0;
  color: rgba(245, 232, 249, 0.66);
}

.fortune-result-placeholder {
  display: grid;
  min-height: 67px;
  align-content: center;
  gap: 5px;
  padding: 8px 9px;
  border: 1px dashed color-mix(in srgb, var(--fortune-tone) 30%, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  background: color-mix(in srgb, var(--fortune-tone) 5%, rgba(0, 0, 0, 0.18));
  transition: opacity 240ms ease, transform 240ms ease;
}

.fortune-result-placeholder b {
  font-size: 0.7rem;
  text-align: center;
}

.fortune-result-placeholder p {
  display: block;
  font-size: 0.52rem;
  text-align: center;
  -webkit-line-clamp: unset;
}

.fortune-result.is-interpreted .fortune-oracle-copy {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.fortune-result.is-interpreted .fortune-result-placeholder {
  display: none;
}

.fortune-interpret-button {
  position: relative;
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid rgba(227, 193, 132, 0.58);
  border-radius: 7px;
  color: var(--fortune-label-ink);
  background: var(--fortune-label-bg);
  box-shadow: 0 8px 22px rgba(227, 193, 132, 0.16);
  font-size: 0.6rem;
  font-weight: 1000;
  letter-spacing: 0.1em;
}

.fortune-interpret-button::before {
  display: none;
}

.fortune-interpret-button span,
.fortune-interpret-button i {
  position: relative;
  z-index: 1;
}

.fortune-interpret-button i {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(48, 19, 28, 0.36);
  border-radius: 50%;
  font-size: 0.5rem;
  font-style: normal;
}

.fortune-interpret-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.fortune-result.is-drawing {
  animation: fortune-channeling 5200ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-draw-stage.is-drawing {
  animation: fortune-channeling 5200ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-draw-stage.is-drawing .fortune-outcome {
  opacity: 0;
  visibility: hidden;
}

.fortune-draw-stage.is-drawing .fortune-vessel {
  animation: fortune-vessel-ritual 5200ms linear both;
}

.fortune-draw-stage.is-drawing .fortune-sticks i {
  animation: fortune-sticks-rattle 112ms cubic-bezier(0.3, 0, 0.7, 1) infinite alternate;
  animation-delay: calc(var(--stick) * -27ms);
}

.fortune-draw-stage.is-drawing .fortune-drawn-stick {
  animation: fortune-stick-draw 5200ms cubic-bezier(0.2, 0.88, 0.24, 1) both;
}

.fortune-result.is-drawing .fortune-oracle-copy {
  animation: fortune-copy-channeling 160ms steps(2, end) infinite;
}

.fortune-result.is-revealed {
  animation: fortune-reveal 1450ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-result.is-ready .fortune-result-placeholder {
  animation: fortune-ready-pulse 1200ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-result.is-unsealing {
  animation: fortune-unsealing 2600ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-draw-stage.is-revealed .fortune-drawn-stick {
  animation: fortune-stick-reveal 900ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-draw-button {
  position: relative;
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  width: 100%;
  margin-top: 7px;
  border: 1px solid rgba(255, 221, 169, 0.34);
  border-radius: 7px;
  color: #fff3c6;
  background: linear-gradient(100deg, #8e2d25, #b33e30 52%, #7a241e);
  box-shadow: 0 6px 18px rgba(99, 23, 18, 0.28);
  font-size: 0.61rem;
  font-weight: 1000;
  letter-spacing: 0.06em;
}

.fortune-draw-button::before {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -40%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.68), transparent);
  transform: rotate(18deg);
  animation: fortune-button-shine 2400ms ease-in-out infinite;
}

.fortune-draw-button span,
.fortune-draw-button i {
  position: relative;
  z-index: 1;
}

.fortune-draw-button i {
  font-size: 0.72rem;
  font-style: normal;
  animation: fortune-button-star 1300ms ease-in-out infinite;
}

.lottery-machine button:disabled,
.fortune-draw-button:disabled {
  cursor: default;
  filter: saturate(0.7) brightness(0.86);
}

.fortune-layout {
  display: block;
}

.fortune-draw-stage.fortune-unified {
  display: grid;
  min-height: 0;
  grid-template-rows: auto auto auto auto;
  gap: 7px;
  padding: 11px 12px;
}

.fortune-unified .fortune-ritual {
  display: grid;
  min-height: 132px;
  padding-top: 12px;
  place-items: center;
}

.fortune-unified.has-result .fortune-ritual {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
}

.fortune-vessel-slot {
  display: grid;
  width: 126px;
  align-self: end;
  justify-items: center;
  gap: 7px;
}

.fortune-vessel-slot > small {
  color: color-mix(in srgb, var(--fortune-tone) 62%, white 16%);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  transition: color 180ms ease, transform 180ms ease;
}

.fortune-vessel-slot:hover > small {
  color: color-mix(in srgb, var(--fortune-tone) 84%, white 16%);
  transform: translateY(-1px);
}

.fortune-unified.has-result .fortune-vessel-slot {
  grid-column: 1;
  grid-row: 1;
}

.fortune-unified.has-result .fortune-outcome {
  grid-column: 2;
  grid-row: 1;
  width: 118px;
}

.fortune-actions {
  display: grid;
  width: min(330px, 100%);
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  justify-self: center;
}

.fortune-unified.has-result:not(.is-interpreted) .fortune-actions {
  grid-template-columns: minmax(0, 1fr);
}

.fortune-unified .fortune-draw-button {
  margin-top: 0;
}

.fortune-unified.has-result .fortune-draw-button {
  min-height: 28px;
  align-self: center;
  border-color: rgba(238, 194, 97, 0.34);
  background: linear-gradient(100deg, rgba(128, 38, 31, 0.92), rgba(170, 54, 42, 0.92) 52%, rgba(107, 31, 26, 0.92));
  box-shadow: 0 4px 11px rgba(87, 19, 15, 0.22);
  font-size: 0.51rem;
  opacity: 0.82;
}

.fortune-unified .fortune-interpret-button {
  display: none;
}

.fortune-unified.has-result:not(.is-interpreted) .fortune-interpret-button {
  display: flex;
  min-height: 46px;
  border-color: rgba(194, 100, 82, 0.76);
  color: #fff8e9;
  background: linear-gradient(135deg, #b34f43, #7c2b27);
  box-shadow: 0 10px 26px rgba(111, 33, 29, 0.26);
  font-size: 0.8rem;
  transition: opacity 320ms ease, transform 320ms ease;
}

.fortune-unified.is-presenting .fortune-interpret-button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.fortune-unified.is-interpreted .fortune-actions {
  display: none;
}

@media (min-width: 760px) {
  .fortune-unified .fortune-ritual {
    min-height: 164px;
    padding-top: 20px;
  }

  .fortune-unified.has-result .fortune-ritual {
    grid-template-columns: 166px minmax(0, 1fr);
    gap: 22px;
  }

  .fortune-vessel-slot {
    width: 160px;
    gap: 9px;
  }

  .fortune-vessel {
    width: 132px;
    height: 118px;
  }

  .fortune-vessel::before,
  .fortune-vessel::after {
    right: 17px;
    left: 17px;
  }

  .fortune-vessel::before {
    height: 74px;
    border-radius: 10px 10px 21px 21px;
  }

  .fortune-vessel::after {
    bottom: 68px;
    height: 11px;
  }

  .fortune-vessel > em {
    bottom: 21px;
    font-size: 1.32rem;
  }

  .fortune-sticks {
    top: 4px;
    width: 90px;
    height: 66px;
  }

  .fortune-sticks i {
    width: 6px;
    height: 73px;
    transform: translateX(calc((var(--stick) - 2) * 10px)) rotate(calc((var(--stick) - 2) * 5deg));
  }

  .fortune-drawn-stick {
    bottom: 58px;
    width: 20px;
    height: 96px;
    padding-top: 7px;
  }

  .fortune-drawn-stick b {
    font-size: 0.78rem;
  }

  .fortune-draw-stage.has-result .fortune-drawn-stick {
    transform: translate(-50%, -16px) rotate(2deg);
  }

  .fortune-outcome,
  .fortune-unified.has-result .fortune-outcome {
    width: 128px;
    height: 166px;
    min-height: 166px;
  }

  .fortune-auspice {
    min-width: 0;
    padding: 0;
    font-size: 1.55rem;
  }

  .fortune-actions {
    width: min(380px, 100%);
  }

  .fortune-unified.has-result:not(.is-interpreted) .fortune-interpret-button {
    min-height: 54px;
    font-size: 0.92rem;
  }
}

/* Cashflow network v2: one visual connection and three compact utilities. */
.control-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch;
  gap: 8px;
}

.control-strip .work-toggle-button {
  width: 100%;
  min-height: 58px;
  justify-content: center;
}

.cashflow-quick-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(180px, 1.5fr) minmax(0, 1fr);
  gap: 7px;
}

.cashflow-quick-actions > button,
.cashflow-quick-actions .ticker-live-income {
  width: 100%;
  min-width: 0;
  min-height: 46px;
}

.cashflow-quick-actions > button,
.cashflow-quick-actions .ticker-live-income > button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
}

.cashflow-quick-actions button span { font-weight: 950; }
.cashflow-quick-actions button small {
  color: color-mix(in srgb, currentColor 65%, transparent);
  font-size: 0.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.cashflow-quick-actions .ticker-live-income-amount,
.cashflow-quick-actions .ticker-live-income > button {
  height: 46px;
}

.cashflow-quick-actions .ticker-live-income > button {
  width: 92px;
  flex-basis: 92px;
  line-height: 1;
}

.overtime-action {
  border-color: rgba(255, 197, 81, 0.44);
  color: #ffe8a1;
  background: linear-gradient(145deg, rgba(255, 190, 69, 0.13), rgba(255, 100, 75, 0.08)), rgba(5, 16, 14, 0.9);
}

.overtime-action.is-active {
  color: #1d1407;
  background: linear-gradient(135deg, #ffd769, #ff875e);
  box-shadow: 0 0 24px rgba(255, 166, 76, 0.3);
}

#cashflowLiveHint {
  color: rgba(222, 239, 229, 0.55);
  font-size: 0.62rem;
  font-weight: 800;
}

.income-node-schedule {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
}

.income-node-schedule > label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.income-node-schedule > label > span:first-child {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 850;
}

.income-node-schedule select,
.income-node-schedule input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding-inline: 7px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  font-size: 0.62rem;
  font-weight: 800;
}

.income-node-time-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.income-node-time-range i { color: var(--muted); font-style: normal; }
.source-row .income-daily-target { grid-row: 3; }
.source-row .income-progress { grid-row: 4; }

.ledger-correction-card,
.ledger-contribution-summary {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 6%, rgba(0, 0, 0, 0.2));
}

.ledger-correction-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.ledger-correction-card div { display: grid; gap: 3px; }
.ledger-correction-card small,
.ledger-contribution-summary small { color: var(--muted); font-size: 0.56rem; }
.ledger-correction-card strong { font-size: 0.68rem; }
.ledger-correction-card button {
  min-height: 36px;
  border: 1px solid rgba(255, 211, 89, 0.42);
  border-radius: 7px;
  padding-inline: 10px;
  color: #152019;
  background: linear-gradient(135deg, var(--green), var(--amber));
  font-size: 0.62rem;
  font-weight: 950;
}

.ledger-contribution-summary header,
.ledger-contribution-summary article {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ledger-contribution-summary header { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.ledger-contribution-summary article > span { display: grid; min-width: 0; gap: 2px; }
.ledger-contribution-summary article b { overflow: hidden; font-size: 0.66rem; text-overflow: ellipsis; white-space: nowrap; }
.ledger-contribution-summary article strong { color: var(--green); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.ledger-contribution-summary article strong.is-negative { color: #ff8d84; }

@media (max-width: 640px) {
  .cashflow-quick-actions { grid-template-columns: minmax(0, 0.8fr) minmax(165px, 1.55fr) minmax(0, 1fr); gap: 5px; }
  .cashflow-quick-actions > button { padding-inline: 4px; }
  .cashflow-quick-actions .ticker-live-income > button { width: 80px; flex-basis: 80px; }
  .income-node-schedule { grid-template-columns: minmax(0, 1fr); }
  .income-node-schedule > label:last-child { grid-column: 1; }
  .ledger-correction-card { grid-template-columns: minmax(0, 1fr); }
  .ledger-correction-card button { width: 100%; }
}

.fortune-good-hit .fortune-auspice {
  animation: fortune-good-auspice 1200ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-good-small {
  animation: fortune-good-small-hit 1500ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-good-medium {
  animation: fortune-good-medium-hit 1900ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-good-major {
  animation: fortune-good-major-hit 2400ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-unified > * {
  position: relative;
  z-index: 1;
}

.fortune-good-major::after {
  position: absolute;
  z-index: 0;
  inset: -110%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 226, 126, 0.3) 0 4deg, transparent 4deg 13deg);
  content: "";
  opacity: 0;
  pointer-events: none;
  animation: fortune-good-rays 2200ms cubic-bezier(0.14, 0.82, 0.22, 1) both;
}

.fortune-unified .fortune-result {
  display: none;
  min-height: 0;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid rgba(186, 124, 44, 0.86);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(143, 35, 32, 0.08), transparent 12%, transparent 88%, rgba(143, 35, 32, 0.08)),
    linear-gradient(155deg, #f7e9b9, #e9ce82);
  box-shadow:
    inset 0 0 22px rgba(109, 76, 43, 0.07),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.fortune-unified .fortune-result::before {
  display: none;
}

.fortune-unified .fortune-result.is-interpreted,
.fortune-unified .fortune-result.is-unsealing {
  display: grid;
}

.fortune-unified .fortune-result.is-unsealing {
  min-height: 112px;
}

.fortune-unified .fortune-result.is-unsealing::after {
  display: grid;
  min-height: 92px;
  place-items: center;
  border: 1px dashed rgba(143, 47, 43, 0.36);
  border-radius: 2px;
  color: #8f2f2b;
  background: rgba(255, 247, 213, 0.48);
  content: "展开 · 解签 · 明意";
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.22em;
  animation: fortune-unseal-text 2600ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-unified .fortune-result.is-unsealing .fortune-result-head,
.fortune-unified .fortune-result.is-unsealing .fortune-oracle-copy {
  display: none;
}

.fortune-unified .fortune-result.is-interpreted .fortune-oracle-copy {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.fortune-unified .fortune-result .fortune-oracle-label,
.fortune-unified .fortune-result .fortune-sequence {
  color: #8f2f2b;
}

.fortune-unified .fortune-result b {
  color: #2c2119;
  text-shadow: none;
}

.fortune-unified .fortune-result p,
.fortune-unified .fortune-result .fortune-oracle-footer em {
  color: #665647;
}

.fortune-unified .fortune-result .fortune-oracle-footer span {
  border-color: rgba(143, 47, 43, 0.28);
  color: #8f2f2b;
  background: rgba(143, 47, 43, 0.055);
}

.fortune-draw-stage.is-reading .fortune-result-head {
  animation: fortune-reading-line 720ms 120ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-draw-stage.is-reading .fortune-sequence,
.fortune-draw-stage.is-reading .fortune-result b,
.fortune-draw-stage.is-reading .fortune-result p,
.fortune-draw-stage.is-reading .fortune-oracle-footer {
  animation: fortune-reading-line 860ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.fortune-draw-stage.is-reading .fortune-sequence { animation-delay: 280ms; }
.fortune-draw-stage.is-reading .fortune-result b { animation-delay: 460ms; }
.fortune-draw-stage.is-reading .fortune-result p { animation-delay: 650ms; }
.fortune-draw-stage.is-reading .fortune-oracle-footer { animation-delay: 860ms; }

.break-game-fortune {
  width: min(94%, 860px);
  justify-self: center;
  padding: 9px;
  border-color: rgba(57, 248, 143, 0.3);
  background:
    radial-gradient(circle at 10% 18%, rgba(57, 248, 143, 0.1), transparent 27%),
    radial-gradient(circle at 92% 86%, rgba(84, 184, 255, 0.09), transparent 31%),
    linear-gradient(112deg, rgba(9, 35, 27, 0.76), rgba(5, 15, 13, 0.96) 64%);
}

.fortune-draw-stage,
.fortune-result {
  --fortune-tone: #ffd45f;
  --fortune-label-bg: #39f88f;
  --fortune-label-ink: #061b12;
  border-color: color-mix(in srgb, var(--fortune-tone) 42%, rgba(57, 248, 143, 0.18));
  border-radius: 8px;
  background:
    linear-gradient(rgba(57, 248, 143, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 248, 143, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 12% 44%, color-mix(in srgb, var(--fortune-tone) 10%, transparent), transparent 32%),
    linear-gradient(118deg, rgba(4, 24, 18, 0.98), rgba(3, 13, 12, 0.98) 58%, rgba(5, 18, 22, 0.97));
  background-size: 18px 18px, 18px 18px, auto, auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 3px 0 0 color-mix(in srgb, var(--fortune-tone) 60%, var(--accent));
}

.fortune-result[data-tone="gold"], .fortune-draw-stage[data-tone="gold"] { --fortune-tone: #ffd45f; }
.fortune-result[data-tone="cyan"], .fortune-draw-stage[data-tone="cyan"] { --fortune-tone: #54b8ff; }
.fortune-result[data-tone="violet"], .fortune-draw-stage[data-tone="violet"] { --fortune-tone: #b38cff; }
.fortune-result[data-tone="green"], .fortune-draw-stage[data-tone="green"] { --fortune-tone: #39f88f; }
.fortune-result[data-tone="rose"], .fortune-draw-stage[data-tone="rose"] { --fortune-tone: #ff8095; }
.fortune-result[data-tone="amber"], .fortune-draw-stage[data-tone="amber"] { --fortune-tone: #ffb35f; }
.fortune-result[data-tone="red"], .fortune-draw-stage[data-tone="red"] { --fortune-tone: #ff5a72; }
.fortune-result[data-tone="pink"], .fortune-draw-stage[data-tone="pink"] { --fortune-tone: #ff8ac1; }

.fortune-draw-stage.fortune-unified {
  gap: 6px;
  padding: 9px 10px;
}

.fortune-unified .fortune-ritual {
  min-height: 120px;
  padding-top: 9px;
}

.fortune-stage-label span,
.fortune-vessel > em,
.fortune-drawn-stick,
.fortune-outcome > small,
.fortune-outcome > span,
.fortune-auspice {
  font-family: inherit;
}

.fortune-stage-label span {
  color: #eafff1;
  letter-spacing: 0.08em;
}

.fortune-stage-label small {
  color: rgba(211, 236, 223, 0.64);
}

.fortune-vessel::before {
  border-color: color-mix(in srgb, var(--fortune-tone) 62%, var(--accent));
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent 25%, transparent 76%, rgba(0, 0, 0, 0.28)),
    linear-gradient(160deg, #2c634a, #123526 58%, #071510);
  box-shadow:
    inset 0 0 0 4px rgba(57, 248, 143, 0.025),
    inset 0 -12px 22px rgba(0, 8, 5, 0.34),
    0 7px 18px rgba(0, 8, 5, 0.5);
}

.fortune-vessel::after {
  border-color: color-mix(in srgb, var(--fortune-tone) 44%, var(--accent));
  background: linear-gradient(#63bc87, #24563e 55%, #0a2017);
  box-shadow:
    inset 0 1px 0 rgba(222, 255, 235, 0.24),
    0 0 10px rgba(57, 248, 143, 0.24);
}

.fortune-vessel > em {
  color: var(--fortune-tone);
  text-shadow: 0 0 10px color-mix(in srgb, var(--fortune-tone) 46%, transparent);
}

.fortune-vessel-slot > small {
  color: color-mix(in srgb, var(--fortune-tone) 60%, #dfffee 30%);
}

.fortune-outcome::before {
  border-color: color-mix(in srgb, var(--fortune-tone) 42%, var(--accent));
}

.fortune-outcome.is-visible {
  border-color: color-mix(in srgb, var(--fortune-tone) 70%, white 8%);
  color: #eafff1;
  background:
    linear-gradient(90deg, transparent 0 8px, rgba(57, 248, 143, 0.06) 8px 10px, transparent 10px calc(100% - 10px), rgba(57, 248, 143, 0.06) calc(100% - 10px) calc(100% - 8px), transparent calc(100% - 8px)),
    linear-gradient(160deg, rgba(19, 48, 38, 0.98), rgba(5, 22, 18, 0.98));
  box-shadow:
    inset 0 0 24px color-mix(in srgb, var(--fortune-tone) 8%, transparent),
    0 13px 26px rgba(0, 0, 0, 0.34);
}

.fortune-outcome > small,
.fortune-outcome > span {
  color: color-mix(in srgb, var(--fortune-tone) 66%, #eafff1 24%);
  letter-spacing: 0.08em;
}

.fortune-outcome > small {
  border-bottom-color: color-mix(in srgb, var(--fortune-tone) 30%, transparent);
}

.fortune-auspice {
  color: #f3fff7;
  letter-spacing: 0.06em;
  text-shadow: 0 0 15px color-mix(in srgb, var(--fortune-tone) 48%, transparent);
}

.fortune-unified.has-result:not(.is-interpreted) .fortune-interpret-button {
  border-color: color-mix(in srgb, var(--fortune-tone) 62%, var(--accent));
  color: #061b12;
  background: linear-gradient(105deg, #6fe6ff, #62f4a2);
  box-shadow: 0 10px 26px rgba(57, 248, 143, 0.16);
}

.fortune-unified .fortune-result {
  border-color: color-mix(in srgb, var(--fortune-tone) 48%, rgba(57, 248, 143, 0.18));
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--fortune-tone) 8%, transparent), transparent 42%),
    linear-gradient(145deg, rgba(8, 30, 24, 0.98), rgba(3, 15, 13, 0.98));
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, var(--fortune-tone) 60%, var(--accent)),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.fortune-unified .fortune-result .fortune-oracle-label,
.fortune-unified .fortune-result .fortune-sequence {
  color: color-mix(in srgb, var(--fortune-tone) 70%, white 14%);
}

.fortune-unified .fortune-result b {
  color: #effff4;
  text-shadow: 0 0 12px color-mix(in srgb, var(--fortune-tone) 28%, transparent);
}

.fortune-unified .fortune-result p,
.fortune-unified .fortune-result .fortune-oracle-footer em {
  color: rgba(222, 244, 232, 0.72);
}

.fortune-unified .fortune-result .fortune-oracle-footer span {
  border-color: color-mix(in srgb, var(--fortune-tone) 32%, transparent);
  color: color-mix(in srgb, var(--fortune-tone) 76%, white 12%);
  background: color-mix(in srgb, var(--fortune-tone) 7%, transparent);
}

.fortune-unified .fortune-result.is-unsealing::after {
  border-color: color-mix(in srgb, var(--fortune-tone) 34%, transparent);
  color: color-mix(in srgb, var(--fortune-tone) 76%, white 12%);
  background: rgba(3, 18, 14, 0.72);
  content: "展开 · 解读 · 提示";
}

@media (min-width: 760px) {
  .fortune-unified .fortune-ritual {
    min-height: 148px;
    padding-top: 14px;
  }

  .fortune-unified.has-result .fortune-ritual {
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 18px;
  }

  .fortune-vessel-slot {
    width: 146px;
  }

  .fortune-vessel {
    width: 118px;
    height: 106px;
  }

  .fortune-outcome,
  .fortune-unified.has-result .fortune-outcome {
    width: 116px;
    height: 150px;
    min-height: 150px;
  }
}

@media (max-width: 640px) {
  .break-game-fortune {
    width: 100%;
  }
}

.collection-unit {
  --collection: #65e89a;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 7px;
  align-items: center;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--collection) 46%, rgba(222, 255, 235, 0.12));
  border-left: 3px solid var(--collection);
  border-radius: 8px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--collection) 12%, transparent), rgba(8, 18, 15, 0.96) 58%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.collection-fortune {
  --collection: #ffad66;
}

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

.collection-copy > span:first-child {
  color: color-mix(in srgb, var(--collection) 76%, white);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.collection-copy strong {
  overflow: hidden;
  color: #f8fff9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1.06;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-copy small {
  overflow: hidden;
  color: rgba(230, 245, 235, 0.62);
  font-size: 0.54rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-meter {
  display: block;
  height: 3px;
  margin-top: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
}

.collection-meter i {
  display: block;
  width: var(--rank-fill, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--collection);
  box-shadow: 0 0 8px color-mix(in srgb, var(--collection) 70%, transparent);
  transition: width 420ms cubic-bezier(0.18, 0.84, 0.28, 1);
}

.collection-badge {
  position: relative;
  display: grid;
  width: 44px;
  height: 49px;
  place-items: center;
  color: var(--collection);
}

.collection-badge > i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--collection) 78%, white);
  border-radius: 7px;
  color: #112018;
  background: linear-gradient(135deg, color-mix(in srgb, var(--collection) 58%, white), var(--collection));
  box-shadow: 0 0 0 3px rgba(4, 14, 12, 0.76), 0 0 16px color-mix(in srgb, var(--collection) 36%, transparent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 1000;
}

.collection-badge b {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 3px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--collection) 72%, white);
  border-radius: 50%;
  color: #102018;
  background: var(--collection);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.5rem;
  font-weight: 1000;
}

.collection-action {
  position: relative;
  grid-column: 1 / -1;
  min-height: 34px;
  overflow: visible;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 950;
}

.collection-action b {
  position: absolute;
  top: -8px;
  right: -7px;
  z-index: 2;
  display: grid;
  min-width: 31px;
  height: 19px;
  padding: 0 4px;
  place-items: center;
  border: 1px solid rgba(255, 240, 170, 0.86);
  border-radius: 6px;
  color: #3f1905;
  background: linear-gradient(135deg, #fff2a6, var(--amber));
  box-shadow: 0 4px 14px rgba(255, 212, 95, 0.28);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.53rem;
  font-weight: 1000;
  line-height: 1;
}

.collection-action.is-rewarding {
  animation: action-button-beat 760ms cubic-bezier(0.18, 0.84, 0.28, 1) both;
}

.collection-unit.is-rewarding {
  animation: stat-card-beat 760ms cubic-bezier(0.18, 0.84, 0.28, 1) both;
}

.collection-unit.is-rewarding strong {
  animation: stat-number-pop 760ms cubic-bezier(0.18, 0.84, 0.28, 1) both;
}

.daily-income-goal-setting {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 9px;
  border: 1px solid rgba(255, 212, 95, 0.28);
  border-radius: 8px;
  background: rgba(255, 212, 95, 0.055);
}

.daily-income-goal-setting > span,
.daily-income-goal-setting > small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
}

.daily-income-goal-setting > small {
  text-align: right;
}

.daily-income-goal-setting > div {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.22);
}

.daily-income-goal-setting i {
  padding-left: 8px;
  color: var(--amber);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 950;
}

.daily-income-goal-setting input {
  min-width: 0;
  height: 32px;
  border: 0;
  padding-inline: 6px 8px;
  background: transparent;
  box-shadow: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
}

.workday-countdown-settings {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid rgba(98, 244, 162, 0.2);
  border-radius: 8px;
  background: rgba(98, 244, 162, 0.045);
}

.workday-countdown-settings .compact-head {
  padding: 0 0 3px;
}

.workday-countdown-settings .compact-head h2 {
  font-size: 0.72rem;
}

.workday-countdown-settings .compact-head > span,
.workday-countdown-settings > small {
  color: var(--muted);
  font-size: 0.52rem;
  font-weight: 800;
}

.countdown-head-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.countdown-head-actions > span {
  color: var(--muted);
  font-size: 0.52rem;
  font-weight: 800;
}

.countdown-add-button {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(98, 244, 162, 0.34);
  border-radius: 7px;
  color: var(--green);
  background: rgba(98, 244, 162, 0.07);
  font-size: 0.82rem;
  font-weight: 1000;
}

.countdown-add-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.countdown-editor {
  display: grid;
  gap: 7px;
}

.countdown-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.16);
}

.countdown-setting-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: rgba(238, 247, 241, 0.78);
  font-size: 0.61rem;
  font-weight: 850;
}

.countdown-toggle-control {
  position: relative;
  display: block;
  width: 27px;
  height: 16px;
  flex: 0 0 auto;
}

.countdown-toggle-control input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.countdown-toggle-control i {
  position: relative;
  display: block;
  width: 27px;
  height: 16px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 180ms ease, border-color 180ms ease;
}

.countdown-toggle-control i::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.66);
  content: "";
  transition: transform 180ms ease, background 180ms ease;
}

.countdown-toggle-control input:checked + i {
  border-color: rgba(98, 244, 162, 0.46);
  background: rgba(98, 244, 162, 0.2);
}

.countdown-toggle-control input:checked + i::after {
  background: var(--green);
  box-shadow: 0 0 7px rgba(98, 244, 162, 0.42);
  transform: translateX(11px);
}

.countdown-toggle-control input:focus-visible + i {
  outline: 2px solid rgba(111, 230, 255, 0.72);
  outline-offset: 2px;
}

.countdown-label-input {
  width: min(116px, 100%);
  min-width: 52px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(238, 247, 241, 0.9);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  font-size: 0.62rem;
  font-weight: 900;
}

.countdown-label-input:hover,
.countdown-label-input:focus {
  border-color: rgba(98, 244, 162, 0.24);
  background: rgba(0, 0, 0, 0.2);
}

.countdown-setting-row input[type="time"] {
  width: 92px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--amber);
  background: rgba(0, 0, 0, 0.24);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 900;
  color-scheme: dark;
}

.countdown-work-window {
  display: grid;
  width: 116px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--amber);
  background: rgba(0, 0, 0, 0.24);
  font: 900 0.62rem/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.countdown-cutoff-badge {
  grid-column: 1 / 3;
  width: max-content;
  padding: 3px 7px;
  border: 1px solid rgba(98, 244, 162, 0.24);
  border-radius: 999px;
  color: rgba(218, 245, 228, 0.76);
  background: rgba(98, 244, 162, 0.06);
  font-size: 0.46rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.countdown-setting-delete {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  color: rgba(237, 247, 241, 0.58);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.7rem;
}

.countdown-setting-delete:hover,
.countdown-setting-delete:focus-visible {
  border-color: rgba(255, 108, 126, 0.42);
  color: #ff9aaa;
}

.countdown-empty {
  padding: 14px 10px;
  border: 1px dashed rgba(98, 244, 162, 0.2);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.54rem;
  text-align: center;
}

@media (max-width: 640px) {
  .income-overview {
    top: 8px;
    right: 10px;
    left: 10px;
    gap: 8px;
    padding: 8px 10px;
  }

  .income-overview-item > span {
    font-size: 0.54rem;
  }

  .income-overview-item strong {
    font-size: 0.92rem;
  }

  .income-overview-item small {
    font-size: 0.48rem;
  }

  .collection-console {
    gap: 7px;
    margin: 0 12px 12px;
  }

  .workday-countdowns {
    gap: 6px;
    margin: 0 12px 8px;
  }

  .workday-countdown-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 50px;
    gap: 6px;
    padding: 7px 8px;
  }

  .workday-countdown-card span {
    gap: 4px;
    font-size: 0.52rem;
  }

  .workday-countdown-card span i {
    width: 18px;
    height: 18px;
    font-size: 0.46rem;
  }

  .workday-countdown-card small {
    font-size: 0.42rem;
  }

  .workday-countdown-card strong {
    justify-self: start;
    font-size: clamp(0.7rem, 3.4vw, 0.88rem);
    letter-spacing: 0;
  }

  .daily-goal-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    margin: 0 12px 10px;
    padding: 9px;
  }

  .daily-goal-copy strong {
    font-size: 0.92rem;
  }

  .daily-goal-progress-head > span {
    font-size: 0.52rem;
  }

  .daily-goal-progress-head strong {
    font-size: 0.9rem;
  }

  .daily-goal-progress-head > div {
    gap: 5px;
  }

  .income-goal-stamp {
    padding: 2px 5px;
    border-width: 1px;
    font-size: 0.48rem;
  }

  .daily-goal-sources {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .daily-goal-sources span {
    overflow: hidden;
    font-size: 0.43rem;
  }

  .daily-goal-sources b {
    font-size: 0.44rem;
  }

  .fortune-console {
    margin: 0 12px 12px;
  }

  .break-games {
    gap: 7px;
    margin: 0 12px 10px;
  }

  .break-game {
    padding: 8px;
  }

  .break-game-luck {
    padding: 10px;
  }

  .break-game-head {
    gap: 4px;
    margin-bottom: 6px;
  }

  .break-game-head span {
    font-size: 0.48rem;
  }

  .break-game-head strong {
    font-size: 0.61rem;
  }

  .luck-tools {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
  }

  .luck-start-button {
    min-height: 86px;
    padding: 4px;
  }

  .luck-start-button span {
    width: 46px;
    height: 40px;
    font-size: 0.78rem;
  }

  .lottery-machine {
    gap: 6px;
    padding: 7px;
  }

  .lottery-digits {
    gap: 4px;
    padding: 4px;
  }

  .lottery-digits i {
    --lottery-reel-height: 32px;
    height: var(--lottery-reel-height);
    font-size: 0.72rem;
  }

  .fortune-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .fortune-draw-stage {
    min-height: 184px;
  }

  .fortune-draw-stage.fortune-unified {
    padding: 9px;
  }

  .fortune-unified .fortune-ritual {
    min-height: 124px;
    padding-top: 9px;
  }

  .fortune-unified.has-result .fortune-ritual {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 8px;
  }

  .fortune-vessel-slot {
    width: 108px;
  }

  .fortune-vessel-slot > small {
    font-size: 0.43rem;
  }

  .fortune-unified.has-result:not(.is-interpreted) .fortune-interpret-button {
    min-height: 42px;
    font-size: 0.72rem;
  }

  .fortune-result {
    min-height: 174px;
    gap: 6px;
    padding: 10px;
  }

  .fortune-result b {
    font-size: 0.72rem;
  }

  .fortune-result p {
    font-size: 0.53rem;
  }

  .fortune-oracle-footer em {
    display: none;
  }

  .collection-unit {
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 5px;
    padding: 8px;
  }

  .collection-copy strong {
    font-size: 0.92rem;
  }

  .collection-copy > span:first-child {
    font-size: 0.55rem;
  }

  .collection-copy small {
    font-size: 0.48rem;
  }

  .collection-badge {
    width: 36px;
    height: 42px;
  }

  .collection-badge > i {
    width: 26px;
    height: 26px;
    font-size: 0.63rem;
  }

  .collection-badge b {
    min-width: 17px;
    height: 17px;
    font-size: 0.46rem;
  }

  .collection-action {
    min-height: 32px;
    font-size: 0.66rem;
  }

  .daily-income-goal-setting {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .daily-income-goal-setting > small {
    grid-column: 1 / -1;
    text-align: left;
  }
}

/* Progress HUD: compact dual-track cards with collectible rank seals. */
.merit-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.merit-stats > .merit-stat {
  --hud: #ffd45f;
  --hud-soft: rgba(255, 212, 95, 0.15);
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 76px;
  padding: 10px 10px 9px 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--hud) 50%, rgba(220, 255, 235, 0.16));
  border-left: 3px solid var(--hud);
  border-radius: 8px;
  background: linear-gradient(112deg, var(--hud-soft), rgba(4, 14, 12, 0.94) 48%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 8px 20px rgba(0, 0, 0, 0.2);
}

.merit-stats > .merit-stat::after {
  inset: -35% auto -35% -50%;
  width: 24%;
}

.merit-stat-merit {
  --hud: #65e89a !important;
  --hud-soft: rgba(101, 232, 154, 0.18) !important;
}

.merit-stat-income {
  --hud: #54b8ff !important;
  --hud-soft: rgba(84, 184, 255, 0.18) !important;
}

.merit-stat-income strong {
  color: #dff4ff !important;
}

.today-income-live {
  display: grid;
  min-width: 36px;
  min-height: 21px;
  place-items: center;
  border: 1px solid rgba(84, 184, 255, 0.54);
  border-radius: 6px;
  color: #bfe8ff;
  background: rgba(84, 184, 255, 0.1);
  box-shadow: 0 0 14px rgba(84, 184, 255, 0.14);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.5rem;
  font-weight: 1000;
  letter-spacing: 0.06em;
}

.merit-stat-fortune {
  --hud: #ffad66 !important;
  --hud-soft: rgba(255, 132, 86, 0.18) !important;
  justify-items: initial;
  text-align: left;
}

.stat-value {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
}

.merit-stats .stat-kicker {
  color: color-mix(in srgb, var(--hud) 72%, white);
  font-size: 0.61rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.merit-stats .merit-stat strong {
  overflow: hidden;
  color: #f8fff9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(1.05rem, 2.1vw, 1.32rem);
  font-weight: 950;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merit-stats .merit-stat small {
  position: static;
  max-width: none;
  overflow: hidden;
  color: rgba(234, 248, 239, 0.72);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meter {
  display: block;
  width: calc(100% - 4px);
  height: 3px;
  margin-top: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.rank-meter i {
  display: block;
  width: var(--rank-fill, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--hud);
  box-shadow: 0 0 8px color-mix(in srgb, var(--hud) 78%, transparent);
  transition: width 420ms cubic-bezier(0.18, 0.84, 0.28, 1);
}

.merit-stats .rank-badge {
  position: relative;
  top: auto;
  right: auto;
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  height: 56px;
  place-items: center;
  margin-left: 7px;
  color: var(--hud);
}

.rank-badge .badge-seal {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--hud) 80%, white);
  border-radius: 7px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hud) 58%, white), var(--hud));
  box-shadow: 0 0 0 4px rgba(4, 14, 12, 0.75), 0 0 18px color-mix(in srgb, var(--hud) 40%, transparent);
  transform: rotate(45deg);
}

.rank-badge .badge-seal i {
  color: #102018;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.83rem;
  font-style: normal;
  font-weight: 1000;
  transform: rotate(-45deg);
}

.merit-stats .rank-badge b {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  min-width: 21px;
  height: 21px;
  padding: 0 4px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--hud) 72%, white);
  border-radius: 50%;
  color: #102018;
  background: var(--hud);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.58rem;
  font-weight: 1000;
  line-height: 1;
}

.rank-badge[data-rank="none"] .badge-seal,
.rank-badge[data-rank="none"] b {
  filter: grayscale(1);
  opacity: 0.68;
}

.rank-badge[data-rank="none"] .badge-seal i {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.merit-stat[data-rank="2"] .badge-seal,
.merit-stat[data-rank="3"] .badge-seal {
  box-shadow: 0 0 0 4px rgba(4, 14, 12, 0.75), 0 0 22px color-mix(in srgb, var(--hud) 55%, transparent);
}

.merit-stat[data-rank="4"] .badge-seal,
.merit-stat[data-rank="5"] .badge-seal,
.merit-stat[data-rank="6"] .badge-seal,
.merit-stat[data-rank="7"] .badge-seal,
.merit-stat[data-rank="8"] .badge-seal,
.merit-stat[data-rank="9"] .badge-seal {
  animation: badge-idle-glow 2.8s ease-in-out infinite;
}

@keyframes badge-idle-glow {
  50% { filter: brightness(1.18); box-shadow: 0 0 0 4px rgba(4, 14, 12, 0.75), 0 0 26px color-mix(in srgb, var(--hud) 72%, transparent); }
}

@media (max-width: 640px) {
  .merit-stats {
    gap: 7px;
  }

  .merit-stats > .merit-stat {
    min-height: 66px;
    padding: 8px 7px 7px 9px;
  }

  .merit-stats .merit-stat strong {
    font-size: 0.98rem;
  }

  .merit-stats .stat-kicker {
    font-size: 0.56rem;
  }

  .merit-stats .merit-stat small {
    font-size: 0.51rem;
  }

  .merit-stats .rank-badge {
    flex-basis: 39px;
    width: 39px;
    min-width: 39px;
    height: 47px;
    margin-left: 3px;
  }

  .rank-badge .badge-seal {
    width: 29px;
    height: 29px;
    border-radius: 6px;
  }

  .rank-badge .badge-seal i {
    font-size: 0.68rem;
  }

  .merit-stats .rank-badge b {
    min-width: 18px;
    height: 18px;
    font-size: 0.5rem;
  }

}

/* 2026-07 rhythm games, merit counter, and pop-fortune visual layer. */
.merit-action .merit-button-count {
  top: -9px;
  right: -8px;
  min-width: 30px;
  height: 20px;
  padding-inline: 6px;
  border-color: rgba(255, 235, 139, 0.96);
  color: #fff5bf;
  background: #192b46;
  box-shadow:
    0 0 0 2px rgba(5, 16, 14, 0.92),
    0 5px 14px rgba(0, 0, 0, 0.34),
    0 0 12px rgba(255, 212, 95, 0.2);
  font-size: 0.52rem;
  letter-spacing: -0.02em;
}

.fortune-draw-stage.fortune-unified {
  gap: 7px;
  padding: 10px 12px 11px;
  border-color: color-mix(in srgb, var(--fortune-tone) 38%, rgba(72, 240, 195, 0.42));
  background:
    radial-gradient(circle at 20% 48%, rgba(0, 228, 219, 0.1), transparent 28%),
    radial-gradient(circle at 78% 48%, rgba(255, 53, 150, 0.08), transparent 30%),
    linear-gradient(112deg, rgba(3, 28, 27, 0.98), rgba(5, 16, 21, 0.99) 54%, rgba(20, 7, 28, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(89, 246, 197, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.fortune-stage-label span {
  color: #f2fff7;
}

.fortune-stage-label small {
  color: rgba(226, 244, 236, 0.66);
}

.fortune-unified .fortune-ritual {
  min-height: 176px;
  grid-template-columns: 184px 132px;
  place-content: center;
  align-items: center;
  gap: 24px;
  padding: 0;
}

.fortune-unified:not(.has-result) .fortune-ritual {
  grid-template-columns: 184px;
}

.fortune-vessel-slot {
  width: 184px;
  gap: 3px;
  margin: 0;
  scale: 1;
}

.fortune-vessel {
  width: 176px;
  height: 176px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform-origin: 50% 80%;
}

.fortune-vessel-art {
  inset: 0;
  overflow: visible;
  border-radius: 0;
}

.fortune-vessel-art img {
  object-fit: contain;
  mix-blend-mode: normal;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.42));
}

.fortune-drawn-stick {
  z-index: 7;
  bottom: 22px;
  width: 58px;
  height: 174px;
  opacity: 0;
  transform: translate(-50%, 74px) rotate(4deg) scale(0.78);
}

.fortune-drawn-stick img {
  object-fit: contain;
  mix-blend-mode: normal;
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.48));
}

.fortune-drawn-stick b {
  top: 20px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff0a4;
  font-size: 0.68rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.fortune-draw-stage.has-result .fortune-drawn-stick {
  opacity: 1;
  transform: translate(-50%, -48px) rotate(-3deg) scale(1);
}

.fortune-unified.has-result .fortune-ritual {
  grid-template-columns: 184px 132px;
  gap: 24px;
}

.fortune-unified.has-result .fortune-outcome,
.fortune-outcome {
  position: relative;
  width: 124px;
  height: 124px;
  min-height: 124px;
  padding: 18px 12px;
  overflow: hidden;
  border: 2px solid rgba(255, 221, 112, 0.76);
  border-radius: 50%;
  color: #fff7cf;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.17), transparent 24%),
    linear-gradient(145deg, #ff3f91, #ad1e74 56%, #172850);
  box-shadow:
    inset 0 0 0 4px rgba(22, 43, 72, 0.3),
    0 0 0 3px rgba(255, 54, 144, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.3);
}

.fortune-outcome small,
.fortune-outcome span {
  color: rgba(255, 246, 214, 0.74);
}

.fortune-outcome strong {
  color: #fff6c7;
  font-size: clamp(1rem, 2vw, 1.32rem);
  text-shadow: 0 2px 0 rgba(28, 20, 53, 0.55);
}

.fortune-draw-stage.is-drawing .fortune-vessel {
  animation: fortune-pop-vessel-shake 5200ms cubic-bezier(0.22, 0.04, 0.2, 1) both;
  filter: none;
}

.fortune-draw-stage.is-drawing .fortune-vessel-art img {
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.42));
  opacity: 1;
}

.fortune-draw-stage.is-drawing .fortune-drawn-stick {
  animation: fortune-pop-stick-draw 5200ms cubic-bezier(0.18, 0.86, 0.24, 1) both;
  filter: none;
}

.fortune-vessel-status {
  max-width: 184px;
  padding: 3px 8px;
  border: 1px solid rgba(74, 237, 202, 0.16);
  border-radius: 999px;
  background: rgba(2, 13, 17, 0.64);
}

.reaction-game-card,
.bubble-launch-card {
  min-height: 222px;
  border-color: rgba(82, 235, 186, 0.22);
  background:
    radial-gradient(circle at 15% 12%, rgba(67, 244, 185, 0.08), transparent 30%),
    rgba(2, 14, 15, 0.72);
}

.reaction-game-card.is-fever {
  border-color: rgba(255, 222, 101, 0.68);
  box-shadow:
    inset 0 0 30px rgba(255, 56, 145, 0.08),
    0 0 24px rgba(255, 212, 95, 0.12);
}

.reaction-rhythm {
  display: grid;
  gap: 7px;
  min-height: 120px;
  padding: 8px;
  border: 1px solid rgba(221, 255, 237, 0.12);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.26);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.22);
}

.reaction-callout {
  display: grid;
  min-height: 30px;
  place-content: center;
  text-align: center;
}

.reaction-callout strong {
  color: #effff4;
  font-size: 0.88rem;
  font-weight: 1000;
  line-height: 1;
}

.reaction-callout small {
  margin-top: 3px;
  color: rgba(222, 243, 232, 0.54);
  font-size: 0.46rem;
  font-weight: 850;
}

.reaction-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.reaction-lane {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 58px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(207, 250, 225, 0.16);
  border-radius: 8px;
  color: rgba(236, 249, 240, 0.48);
  background: linear-gradient(180deg, rgba(35, 65, 61, 0.5), rgba(4, 15, 15, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  touch-action: manipulation;
}

.reaction-lane span {
  position: relative;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 1000;
}

.reaction-lane i {
  position: absolute;
  inset: auto 12% 7px;
  height: 3px;
  border-radius: 999px;
  background: rgba(208, 244, 224, 0.12);
}

.reaction-lane.is-target {
  border-color: #ffe887;
  color: #241805;
  background: linear-gradient(145deg, #fff4a6, #ffd45f 54%, #ff8a57);
  box-shadow: 0 0 24px rgba(255, 212, 95, 0.52);
  animation: reaction-lane-target 430ms cubic-bezier(0.16, 0.88, 0.24, 1) infinite alternate;
}

.reaction-lane.is-target i {
  background: #452606;
}

.reaction-lane.is-stop {
  border-color: rgba(255, 97, 118, 0.72);
  color: #fff0f2;
  background: linear-gradient(180deg, rgba(156, 24, 51, 0.9), rgba(62, 8, 24, 0.96));
  box-shadow: 0 0 18px rgba(255, 60, 92, 0.18);
  animation: reaction-lane-stop 330ms ease-in-out infinite alternate;
}

.reaction-lane.is-perfect,
.reaction-lane.is-good,
.reaction-lane.is-hit {
  border-color: rgba(103, 255, 184, 0.9);
  color: #062217;
  background: linear-gradient(145deg, #c0ffda, #44f895);
  animation: reaction-lane-hit 300ms cubic-bezier(0.16, 0.9, 0.24, 1.2) both;
}

.reaction-lane.is-wrong {
  border-color: #ff7083;
  color: #fff0f2;
  background: #7a142b;
  animation: reaction-lane-wrong 280ms ease-out both;
}

.reaction-rhythm.is-perfect .reaction-callout strong {
  color: #fff0a0;
  text-shadow: 0 0 14px rgba(255, 212, 95, 0.66);
}

.reaction-rhythm.is-good .reaction-callout strong,
.reaction-rhythm.is-hit .reaction-callout strong,
.reaction-rhythm.is-safe .reaction-callout strong {
  color: #84ffc1;
}

.reaction-rhythm.is-wrong .reaction-callout strong,
.reaction-rhythm.is-miss .reaction-callout strong {
  color: #ff8796;
}

.reaction-fever {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.reaction-fever > span,
.bubble-fever > span {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.reaction-fever i,
.bubble-fever i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #54e5ff, #5eff9d 45%, #ffd45f 72%, #ff3f91);
  box-shadow: 0 0 12px rgba(255, 63, 145, 0.5);
  transition: width 180ms ease-out;
}

.reaction-fever b,
.bubble-fever b {
  color: rgba(233, 249, 239, 0.64);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.43rem;
  font-weight: 900;
  white-space: nowrap;
}

.reaction-rhythm.is-fever .reaction-fever b {
  color: #fff09c;
}

.reaction-game-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bubble-preview {
  min-height: 112px;
  background:
    radial-gradient(circle at 50% 52%, rgba(41, 246, 173, 0.12), transparent 34%),
    rgba(0, 0, 0, 0.24);
}

.bubble-preview img {
  width: 102px;
  height: 102px;
  animation-duration: 2.1s;
}

.bubble-preview span {
  color: #fff0a2;
}

.bubble-game-overlay {
  background:
    radial-gradient(circle at 50% 58%, rgba(0, 238, 177, 0.06), transparent 42%),
    rgba(0, 9, 9, 0.5);
  backdrop-filter: blur(2.5px) saturate(0.84);
}

.bubble-game-overlay.is-fever {
  background:
    radial-gradient(circle at 50% 58%, rgba(255, 51, 147, 0.14), transparent 42%),
    radial-gradient(circle at 50% 28%, rgba(255, 216, 87, 0.1), transparent 28%),
    rgba(0, 9, 12, 0.48);
}

.bubble-game-hud {
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr) 38px;
}

.bubble-game-scoreboard {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bubble-fever {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin: 7px 20px 0;
  padding: 5px 8px;
  border: 1px solid rgba(93, 246, 182, 0.14);
  border-radius: 7px;
  background: rgba(2, 14, 15, 0.72);
}

.bubble-game-overlay.is-fever .bubble-fever {
  border-color: rgba(255, 222, 102, 0.48);
  box-shadow: 0 0 22px rgba(255, 63, 145, 0.12);
}

.bubble-game-overlay.is-fever .bubble-fever b {
  color: #fff09c;
}

.bubble-target {
  overflow: visible;
}

.bubble-target img {
  border-radius: 50%;
  clip-path: circle(49% at 50% 50%);
}

.bubble-target::after {
  position: absolute;
  inset: 5%;
  border: 1px solid transparent;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.bubble-target.is-gold img {
  filter: sepia(0.72) saturate(2.1) hue-rotate(350deg) brightness(1.32);
}

.bubble-target.is-gold::after {
  border-color: rgba(255, 235, 133, 0.84);
  box-shadow: 0 0 26px rgba(255, 212, 95, 0.74), inset 0 0 18px rgba(255, 212, 95, 0.2);
}

.bubble-target.is-chain img {
  filter: hue-rotate(118deg) saturate(1.65) brightness(1.15);
}

.bubble-target.is-chain::after {
  border-color: rgba(103, 239, 255, 0.72);
  box-shadow: 0 0 22px rgba(103, 239, 255, 0.5);
}

.bubble-target.is-time img {
  filter: hue-rotate(282deg) saturate(1.7) brightness(1.18);
}

.bubble-target.is-time::after {
  border-color: rgba(255, 96, 176, 0.74);
  box-shadow: 0 0 22px rgba(255, 64, 161, 0.46);
}

.bubble-special-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  min-width: 22px;
  height: 22px;
  padding-inline: 4px;
  place-items: center;
  border: 1px solid rgba(255, 246, 194, 0.82);
  border-radius: 999px;
  color: #fff6ca;
  background: rgba(8, 25, 27, 0.72);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  font-size: 0.48rem;
  font-weight: 1000;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.bubble-combo-burst {
  position: fixed;
  top: 34%;
  left: 50%;
  z-index: 15;
  color: #fff2a6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(1.3rem, 5.5vw, 3.2rem);
  font-weight: 1000;
  letter-spacing: 0.04em;
  opacity: 0;
  text-align: center;
  text-shadow: 0 0 24px rgba(255, 212, 95, 0.66), 0 3px 0 rgba(18, 30, 44, 0.7);
  transform: translate(-50%, -50%) scale(0.7);
  pointer-events: none;
}

.bubble-combo-burst[data-tone="fever"] {
  color: #ff77b7;
  text-shadow: 0 0 24px rgba(255, 63, 145, 0.72), 0 3px 0 rgba(18, 30, 44, 0.72);
}

.bubble-combo-burst[data-tone="gold"] {
  color: #fff3a8;
}

.bubble-combo-burst.show {
  animation: bubble-combo-impact 760ms cubic-bezier(0.16, 0.9, 0.24, 1.1) both;
}

.bubble-beat-pulse {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: min(58vw, 440px);
  aspect-ratio: 1;
  border: 2px solid rgba(93, 246, 182, 0.28);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.34);
  pointer-events: none;
}

.bubble-beat-pulse.show {
  animation: bubble-beat-wave 520ms ease-out both;
}

.bubble-game-overlay.is-impact .bubble-game-arena {
  animation: bubble-arena-impact 180ms ease-out both;
}

@keyframes fortune-pop-vessel-shake {
  0%, 4% { transform: translate3d(0, 0, 0) rotate(0deg); }
  8% { transform: translate3d(-5px, 1px, 0) rotate(-3.5deg); }
  12% { transform: translate3d(5px, -2px, 0) rotate(3.8deg); }
  16% { transform: translate3d(-6px, 0, 0) rotate(-4.2deg); }
  20% { transform: translate3d(6px, -3px, 0) rotate(4.5deg); }
  26% { transform: translate3d(-7px, 1px, 0) rotate(-4.8deg); }
  32% { transform: translate3d(7px, -3px, 0) rotate(5deg); }
  39% { transform: translate3d(-7px, 0, 0) rotate(-5.2deg); }
  46% { transform: translate3d(7px, -4px, 0) rotate(5.4deg); }
  54% { transform: translate3d(-6px, 0, 0) rotate(-4.6deg); }
  62% { transform: translate3d(6px, -3px, 0) rotate(4.4deg); }
  70% { transform: translate3d(-5px, 0, 0) rotate(-3.8deg); }
  77% { transform: translate3d(5px, -2px, 0) rotate(3.5deg); }
  84% { transform: translate3d(-3px, 0, 0) rotate(-2.2deg); }
  90% { transform: translate3d(3px, -1px, 0) rotate(2deg); }
  96% { transform: translate3d(-1px, 0, 0) rotate(-0.8deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

@keyframes fortune-pop-stick-draw {
  0%, 68% { opacity: 0; transform: translate(-50%, 74px) rotate(5deg) scale(0.78); }
  76% { opacity: 1; transform: translate(-50%, 42px) rotate(-4deg) scale(0.9); }
  86% { opacity: 1; transform: translate(-50%, -58px) rotate(3deg) scale(1.05); }
  94% { opacity: 1; transform: translate(-50%, -44px) rotate(-3deg) scale(0.98); }
  100% { opacity: 1; transform: translate(-50%, -48px) rotate(-3deg) scale(1); }
}

@keyframes reaction-lane-target {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-2px) scale(1.045); }
}

@keyframes reaction-lane-stop {
  from { filter: saturate(0.92); }
  to { filter: saturate(1.22); }
}

@keyframes reaction-lane-hit {
  0% { transform: scale(0.9); }
  62% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes reaction-lane-wrong {
  0%, 100% { transform: translateX(0); }
  28% { transform: translateX(-4px); }
  62% { transform: translateX(4px); }
}

@keyframes bubble-combo-impact {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.62); }
  24% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  68% { opacity: 1; transform: translate(-50%, -54%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -74%) scale(0.92); }
}

@keyframes bubble-beat-wave {
  0% { opacity: 0.66; transform: translate(-50%, -50%) scale(0.34); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); }
}

@keyframes bubble-arena-impact {
  0%, 100% { transform: translate3d(0, 0, 0); }
  38% { transform: translate3d(-2px, 1px, 0); }
  72% { transform: translate3d(2px, -1px, 0); }
}

@media (max-width: 640px) {
  .merit-action .merit-button-count {
    top: -8px;
    right: -5px;
  }

  .fortune-draw-stage.fortune-unified {
    padding: 9px 9px 10px;
  }

  .fortune-unified .fortune-ritual {
    min-height: 166px;
    grid-template-columns: 148px 112px;
    gap: 10px;
  }

  .fortune-unified:not(.has-result) .fortune-ritual {
    grid-template-columns: 148px;
  }

  .fortune-vessel-slot {
    width: 148px;
    margin: 0;
    scale: 1;
  }

  .fortune-vessel {
    width: 142px;
    height: 150px;
  }

  .fortune-vessel-status {
    max-width: 148px;
  }

  .fortune-unified.has-result .fortune-ritual {
    grid-template-columns: 148px 112px;
    gap: 10px;
  }

  .fortune-unified.has-result .fortune-outcome,
  .fortune-outcome {
    width: 106px;
    height: 106px;
    min-height: 106px;
    padding: 14px 9px;
  }

  .fortune-drawn-stick {
    bottom: 20px;
    width: 48px;
    height: 148px;
  }

  .fortune-drawn-stick b {
    top: 17px;
    width: 19px;
    height: 19px;
    font-size: 0.58rem;
  }

  .fortune-draw-stage.has-result .fortune-drawn-stick {
    transform: translate(-50%, -42px) rotate(-3deg) scale(1);
  }

  .mini-game-grid {
    grid-template-columns: 1fr;
  }

  .reaction-game-card,
  .bubble-launch-card {
    min-height: 226px;
  }

  .reaction-lane {
    min-height: 64px;
  }

  .bubble-game-hud {
    grid-template-columns: 64px minmax(0, 1fr) 34px;
    gap: 4px;
    margin-inline: 8px;
    padding: 8px;
  }

  .bubble-game-hud-title small {
    display: none;
  }

  .bubble-game-hud-title strong {
    font-size: 0.68rem;
  }

  .bubble-game-scoreboard {
    gap: 2px;
  }

  .bubble-game-scoreboard span {
    padding: 4px 2px;
    font-size: 0.43rem;
  }

  .bubble-game-close {
    width: 32px;
    height: 32px;
  }

  .bubble-fever {
    margin-inline: 12px;
  }

  .bubble-special-mark {
    min-width: 20px;
    height: 20px;
    font-size: 0.43rem;
  }
}

@media (min-width: 981px) {
  body.theme-pocket .personal-products-panel {
    width: auto !important;
    max-width: none !important;
    margin-inline: 32px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fortune-draw-stage.is-drawing .fortune-vessel,
  .fortune-draw-stage.is-drawing .fortune-drawn-stick,
  .reaction-lane,
  .bubble-combo-burst,
  .bubble-beat-pulse,
  .bubble-game-arena {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Pixel completion v4: final cascade guard for the handheld theme. */
body.theme-pocket :is(
  .icon-button,
  .personal-products-settings,
  .celebrity-reset,
  .ticker-live-income-amount,
  .celebrity-money,
  .lottery-reel,
  .lottery-reel.is-special,
  #fortuneDrawnMark,
  .fortune-interpret-orbit,
  .fortune-phase-rail span i
) {
  border-radius: 2px !important;
  filter: none !important;
}

body.theme-pocket :is(#soundButton > span, #adminToggle > span, #personalTargetSettingsButton, #celebrityProductSettingsButton) {
  font-family: "SFMono-Regular", "PingFang SC", ui-monospace, monospace !important;
  font-size: 0.74rem !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-art {
  will-change: transform;
  animation: pocket-agent-keytap-v4 920ms steps(6, end) both !important;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-message {
  animation: pocket-agent-message-v4 920ms steps(2, end) both !important;
}

body.theme-pocket :is(
  .lottery-reel,
  .lottery-reel.is-special,
  .lottery-digits[data-mode="powerball"] .lottery-reel,
  .lottery-digits[data-mode="mega"] .lottery-reel
) {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #e0e5d9 !important;
  background-image: none !important;
  box-shadow: 2px 2px 0 rgba(38, 52, 41, 0.38) !important;
}

body.theme-pocket :is(
  .lottery-reel.is-special,
  .lottery-digits[data-mode="powerball"] .lottery-reel.is-special,
  .lottery-digits[data-mode="mega"] .lottery-reel.is-special
) {
  background: #e0a03a !important;
}

body.theme-pocket .celebrity-terminal .celebrity-income-core .celebrity-money,
body.theme-pocket .celebrity-panel.is-running .celebrity-terminal .celebrity-income-core .celebrity-money {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  padding: 8px 10px !important;
  background: #bdc8b4 !important;
  background-image: none !important;
  box-shadow: inset 2px 2px 0 rgba(38, 52, 41, 0.2) !important;
}

body.theme-pocket :is(
  .celebrity-ticker-character,
  .celebrity-ticker-character.is-changing,
  .celebrity-panel.is-running .celebrity-money strong
) {
  filter: none !important;
  text-shadow: none !important;
}

body.theme-pocket .celebrity-ticker-character.is-changing {
  animation: pocket-digit-tick-v4 160ms steps(3, end) both !important;
}

body.theme-pocket .celebrity-income-core {
  min-height: 148px !important;
  padding-block: 10px !important;
}

body.theme-pocket :is(.celebrity-milestone-fx, .reward-toast, #chargeGain, #comboBurst) {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #e0a03a !important;
  background-image: none !important;
  box-shadow: 4px 4px 0 #263429 !important;
  filter: none !important;
  text-shadow: none !important;
}

body.theme-pocket :is(.celebrity-milestone-fx, .reward-toast)::before,
body.theme-pocket :is(.celebrity-milestone-fx, .reward-toast)::after {
  display: none !important;
}

body.theme-pocket .ledger-chart-column > i,
body.theme-pocket .ledger-chart-column > i::before,
body.theme-pocket .ledger-chart-column > i::after {
  border-radius: 0 !important;
  background: #d28a22 !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.theme-pocket dialog.app-settings-dialog :is(
  .source-row,
  .income-daily-target,
  .income-progress,
  .daily-income-goal-setting > div,
  .income-calendar-settings,
  .income-proration-setting,
  .custom-holiday-form,
  .custom-holiday-list > span,
  .workday-countdown-settings,
  .countdown-setting-row,
  .sedentary-reminder-setting,
  .auto-click-settings,
  .spread-analytics-settings,
  .spread-analytics-grid > span
) {
  border-color: #526053 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #bdc8b4 !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.theme-pocket dialog.app-settings-dialog .source-row:is(.is-active, .is-paused) {
  border-color: #263429 !important;
  box-shadow: inset 4px 0 0 #e0a03a !important;
}

body.theme-pocket dialog.app-settings-dialog :is(
  .countdown-toggle-control i,
  .sedentary-reminder-setting > i,
  .auto-click-switch span
),
body.theme-pocket .city-report-privacy-toggle > i {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  background: #9eab96 !important;
  background-image: none !important;
  box-shadow: none !important;
  transition: background 160ms steps(2, end) !important;
}

body.theme-pocket dialog.app-settings-dialog :is(
  .countdown-toggle-control i::after,
  .sedentary-reminder-setting > i::after,
  .auto-click-switch span::after
),
body.theme-pocket .city-report-privacy-toggle > i::after {
  border-radius: 1px !important;
  background: #e0e5d9 !important;
  box-shadow: none !important;
  transition: transform 160ms steps(2, end), left 160ms steps(2, end) !important;
}

body.theme-pocket dialog.app-settings-dialog :is(
  .countdown-toggle-control input:checked + i,
  .sedentary-reminder-setting input:checked + i,
  .auto-click-switch input:checked + span
),
body.theme-pocket .city-report-privacy-toggle input:checked + i {
  background: #e0a03a !important;
}

@media (min-width: 981px) {
  body.theme-pocket .ticker-stage {
    grid-template-columns: minmax(520px, 1.15fr) minmax(360px, 0.85fr) !important;
    grid-template-areas: "agent status" "agent money" "agent entry" !important;
    grid-template-rows: auto minmax(92px, auto) auto !important;
    column-gap: clamp(28px, 5vw, 78px) !important;
    row-gap: 7px !important;
    min-height: 286px !important;
    padding: 14px clamp(38px, 6vw, 92px) 18px !important;
  }

  body.theme-pocket .pixel-agent-stage {
    grid-area: agent;
    width: 100% !important;
    max-width: 720px;
    min-height: 210px !important;
    grid-template-columns: minmax(320px, 1fr) minmax(170px, 0.5fr) !important;
  }

  body.theme-pocket .pixel-agent-art { height: 210px !important; }
  body.theme-pocket .ticker-stage > .live-label { grid-area: status; align-self: end; }
  body.theme-pocket .money-wrap {
    grid-area: money;
    width: 100% !important;
    min-height: 92px !important;
    justify-self: stretch !important;
  }
  body.theme-pocket .per-second {
    grid-area: entry;
    width: 100% !important;
    align-self: start;
    justify-self: stretch !important;
  }
  body.theme-pocket .per-second .ticker-live-income { width: 100% !important; }
}

@media (max-width: 640px) {
  body.theme-pocket .ticker-stage { padding-bottom: 6px !important; }
  body.theme-pocket .pixel-agent-stage { min-height: 118px !important; }
  body.theme-pocket .pixel-agent-art { height: 118px !important; }
  body.theme-pocket .pixel-agent-message { min-height: 52px !important; padding: 6px !important; }
  body.theme-pocket .money-wrap { min-height: 58px !important; }
  body.theme-pocket .control-strip > button { min-height: 46px !important; }
  body.theme-pocket .city-report-launch { padding: 8px 9px !important; }
  body.theme-pocket .personal-products-panel { padding: 6px !important; }
  body.theme-pocket .pocket-life-scene { min-height: 98px !important; }
  body.theme-pocket .pocket-life-scene img,
  body.theme-pocket .pocket-garden-scene img { height: 82px !important; }
  body.theme-pocket .break-game-mini-games :is(.breathing-preview, .worry-crusher-preview) { height: 106px !important; }
  body.theme-pocket .break-game-mini-games .mini-game-start { min-height: 42px !important; }
  body.theme-pocket .celebrity-income-core { min-height: 132px !important; padding-block: 8px !important; }
  body.theme-pocket dialog.app-settings-dialog .celebrity-settings-dialog-body { gap: 8px !important; padding: 10px !important; }
  body.theme-pocket dialog.app-settings-dialog :is(
    .app-title-setting,
    .daily-income-goal-setting,
    .income-calendar-settings,
    .workday-countdown-settings,
    .admin-moods,
    .auto-click-settings,
    .spread-analytics-settings
  ) { padding: 8px !important; }
}

@keyframes pocket-agent-keytap-v4 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  14% { transform: translate3d(-1px, 0, 0); }
  28% { transform: translate3d(-1px, 2px, 0); }
  42% { transform: translate3d(0, 0, 0); }
  56% { transform: translate3d(1px, 0, 0); }
  70% { transform: translate3d(1px, 2px, 0); }
  84% { transform: translate3d(0, 0, 0); }
}

@keyframes pocket-agent-message-v4 {
  0%, 100% { background-color: #e1e6da; }
  35%, 72% { background-color: #e0c178; }
}

@keyframes pocket-digit-tick-v4 {
  0% { transform: translateY(-2px); }
  50% { transform: translateY(1px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-art,
  body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-message,
  body.theme-pocket .celebrity-ticker-character.is-changing {
    animation: none !important;
    transform: none !important;
  }
}

/* 2026-08-01 pocket readability, proportions and character interactions. */
@font-face {
  font-family: "Pocket Pixel Number";
  src: url("./assets/pixelify-sans-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

body.theme-pocket {
  --pocket-readable-ink: #142018;
  --pocket-readable-muted: #344438;
  --pocket-readable-surface: #d7decf;
  font-size: 14px;
  line-height: 1.5;
}

body.theme-pocket :where(small) {
  color: var(--pocket-readable-muted) !important;
  font-size: clamp(0.64rem, 1.5vw, 0.74rem) !important;
  line-height: 1.4 !important;
}

body.theme-pocket :where(p, label) {
  color: var(--pocket-readable-ink) !important;
  font-size: clamp(0.72rem, 1.7vw, 0.84rem) !important;
  line-height: 1.55 !important;
}

body.theme-pocket :where(button, input, select, textarea) {
  font-size: clamp(0.72rem, 1.6vw, 0.86rem) !important;
}

body.theme-pocket :is(
  .eyebrow,
  .city-report-launch > div > small,
  .income-history-kicker,
  .break-game-head > span,
  .zodiac-horoscope-head > div > small,
  .pocket-life-head small,
  .pocket-life-card-head small,
  .celebrity-terminal-head
) {
  color: #324236 !important;
  font-size: clamp(0.62rem, 1.4vw, 0.72rem) !important;
  letter-spacing: 0.1em !important;
}

body.theme-pocket :is(
  .workday-countdown-card span,
  .personal-product small,
  .personal-product strong,
  .zodiac-lucky-note span,
  .zodiac-ratings span,
  .pocket-life-dashboard small,
  .pocket-life-dashboard strong,
  .pocket-life-meters small,
  .pocket-life-meters strong,
  .pocket-life-status,
  .mini-game-card > p,
  .celebrity-product small,
  .celebrity-product strong,
  .ledger-summary small,
  .ledger-summary strong,
  .ledger-board small,
  .ledger-board b
) {
  color: #223126 !important;
  font-size: clamp(0.68rem, 1.55vw, 0.8rem) !important;
  line-height: 1.45 !important;
}

body.theme-pocket :is(button, input, select, textarea):disabled {
  color: #37463a !important;
  opacity: 0.82 !important;
}

body.theme-pocket .pixel-agent-art {
  appearance: none;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: transparent;
  box-shadow: none !important;
  cursor: not-allowed;
  opacity: 1 !important;
}

body.theme-pocket .pixel-agent-stage.is-interaction-ready .pixel-agent-art {
  cursor: pointer;
}

body.theme-pocket .pixel-agent-stage.is-interaction-ready .pixel-agent-art:focus-visible {
  outline: 3px solid #914637;
  outline-offset: 2px;
}

body.theme-pocket .pixel-agent-console {
  display: grid;
  min-width: 0;
  gap: 7px;
}

body.theme-pocket .pixel-agent-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

body:not(.theme-pocket) .pixel-agent-controls {
  display: none;
}

body.theme-pocket .pixel-agent-controls button {
  display: grid;
  min-width: 0;
  min-height: 42px;
  align-content: center;
  gap: 1px;
  padding: 5px 6px;
  border: 2px solid #263429;
  border-radius: 2px;
  color: #17231a;
  background: #c1ccb6;
  box-shadow: 2px 2px 0 #263429;
  font-weight: 950;
  text-align: center;
}

body.theme-pocket .pixel-agent-controls button span {
  font-size: clamp(0.72rem, 1.7vw, 0.82rem);
  line-height: 1.2;
}

body.theme-pocket .pixel-agent-controls button small {
  font-size: clamp(0.58rem, 1.2vw, 0.66rem) !important;
  line-height: 1.2 !important;
}

body.theme-pocket .pixel-agent-controls button:not(:disabled):active {
  background: #e0a03a;
  box-shadow: none;
  transform: translate(2px, 2px);
}

body.theme-pocket .pixel-agent-controls button:disabled {
  background: #aeb9a4;
  box-shadow: none;
}

body.theme-pocket .pixel-agent-stage.is-stretching .pixel-agent-art {
  will-change: transform;
  animation: pocket-agent-stretch-readable 1320ms steps(8, end) both !important;
}

body.theme-pocket .pixel-agent-stage.is-stretching .pixel-agent-message {
  animation: pocket-agent-stretch-message-readable 1320ms steps(3, end) both !important;
}

body.theme-pocket .celebrity-money > strong,
body.theme-pocket .celebrity-ticker-character {
  font-family: "Pocket Pixel Number", "SFMono-Regular", ui-monospace, monospace !important;
  font-weight: 700 !important;
  letter-spacing: 0.015em !important;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: none;
}

body.theme-pocket .celebrity-ticker-character {
  color: #142018 !important;
  text-shadow: 2px 2px 0 rgba(102, 120, 101, 0.42) !important;
}

body.theme-pocket .celebrity-ticker-character.is-changing {
  color: #8a520e !important;
  text-shadow: 2px 2px 0 rgba(224, 160, 58, 0.28) !important;
}

body.theme-pocket .celebrity-money > span {
  color: #8a520e !important;
  font-size: clamp(1.45rem, 5vw, 2.45rem) !important;
}

body.theme-pocket .pocket-life-grid {
  align-items: stretch;
}

body.theme-pocket .pocket-life-card {
  display: flex !important;
  min-height: 100%;
  flex-direction: column;
}

body.theme-pocket .pocket-life-card-head h4 {
  color: #142018 !important;
  font-size: clamp(0.82rem, 1.9vw, 1rem) !important;
  line-height: 1.3 !important;
}

body.theme-pocket .pocket-life-scene,
body.theme-pocket .pocket-garden-scene {
  min-height: 122px !important;
}

body.theme-pocket .pocket-life-scene .pocket-life-pet-art {
  width: 78% !important;
  height: 98px !important;
  max-width: 280px !important;
}

body.theme-pocket .pocket-life-scene .pocket-life-garden-art {
  width: 96% !important;
  height: 98px !important;
  max-width: 330px !important;
}

body.theme-pocket .pocket-life-speech {
  max-width: 78%;
  color: #142018 !important;
  background: #e4e9df !important;
  font-size: clamp(0.64rem, 1.5vw, 0.72rem) !important;
  line-height: 1.35 !important;
}

body.theme-pocket .pocket-life-meters {
  gap: 7px !important;
}

body.theme-pocket .pocket-life-meters > span {
  grid-template-columns: 40px minmax(0, 1fr) 30px !important;
  gap: 6px !important;
}

body.theme-pocket .pocket-life-actions {
  margin-top: auto !important;
  padding-top: 12px;
}

body.theme-pocket .pocket-life-enter {
  min-height: 54px !important;
}

body.theme-pocket .pocket-life-enter span {
  font-size: clamp(0.8rem, 1.9vw, 0.96rem) !important;
}

body.theme-pocket .break-game-fortune {
  width: min(calc(100% - 24px), 680px) !important;
  min-height: 0 !important;
  padding: 10px !important;
}

body.theme-pocket .break-game-fortune .fortune-unified {
  padding: 9px !important;
}

body.theme-pocket .break-game-fortune .fortune-stage-label {
  margin-bottom: 6px !important;
  padding-bottom: 6px !important;
}

body.theme-pocket .break-game-fortune .fortune-stage-label > span {
  color: #142018 !important;
  font-size: clamp(0.88rem, 2vw, 1.02rem) !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-ritual {
  min-height: 140px !important;
  grid-template-columns: 30px minmax(92px, 0.82fr) minmax(136px, 1.18fr) !important;
  gap: 7px !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-core:not(.fortune-sign-button) {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 98px !important;
  height: 98px !important;
  min-width: 98px !important;
  min-height: 98px !important;
}

body.theme-pocket .break-game-fortune .fortune-core-glyph {
  width: 46px !important;
  height: 46px !important;
  font-size: 1.8rem !important;
}

body.theme-pocket .break-game-fortune .fortune-core-touch {
  min-width: 82px !important;
  padding: 5px 6px !important;
}

body.theme-pocket .break-game-fortune .fortune-result-panel {
  min-height: 124px !important;
}

body.theme-pocket .break-game-fortune .fortune-outcome {
  min-height: 118px !important;
  padding: 7px !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-value {
  font-size: 0.76rem !important;
}

body.theme-pocket .break-game-fortune .fortune-auspice {
  color: #142018 !important;
  font-size: clamp(1.7rem, 5vw, 2.5rem) !important;
  line-height: 1 !important;
}

body.theme-pocket .break-game-fortune .fortune-outcome > p {
  color: #2f4033 !important;
  font-size: clamp(0.64rem, 1.5vw, 0.74rem) !important;
  line-height: 1.4 !important;
}

body.theme-pocket .break-game-fortune .fortune-actions {
  margin-top: 7px !important;
}

body.theme-pocket .break-game-fortune .fortune-interpret-button {
  min-height: 43px !important;
  font-size: clamp(0.78rem, 1.8vw, 0.92rem) !important;
}

@media (max-width: 640px) {
  body.theme-pocket :where(small) {
    font-size: 0.66rem !important;
  }

  body.theme-pocket .pixel-agent-stage {
    min-height: 146px !important;
    grid-template-columns: minmax(178px, 1.25fr) minmax(132px, 0.88fr) !important;
    gap: 6px !important;
  }

  body.theme-pocket .pixel-agent-art {
    height: 132px !important;
  }

  body.theme-pocket .pixel-agent-message {
    min-height: 54px !important;
    padding: 7px !important;
    font-size: 0.68rem !important;
  }

  body.theme-pocket .pixel-agent-controls {
    gap: 4px;
  }

  body.theme-pocket .pixel-agent-controls button {
    min-height: 48px;
    padding: 5px 3px;
  }

  body.theme-pocket .pixel-agent-controls button span {
    font-size: 0.68rem;
  }

  body.theme-pocket .pixel-agent-controls button small {
    font-size: 0.58rem !important;
  }

  body.theme-pocket .pocket-life-station {
    padding: 9px !important;
  }

  body.theme-pocket .pocket-life-card {
    padding: 8px !important;
  }

  body.theme-pocket .pocket-life-card-head h4 {
    font-size: 0.76rem !important;
  }

  body.theme-pocket .pocket-life-scene,
  body.theme-pocket .pocket-garden-scene {
    min-height: 112px !important;
  }

  body.theme-pocket .pocket-life-scene .pocket-life-pet-art {
    width: 80% !important;
    height: 90px !important;
  }

  body.theme-pocket .pocket-life-scene .pocket-life-garden-art {
    width: 98% !important;
    height: 90px !important;
  }

  body.theme-pocket .pocket-life-meters > span {
    grid-template-columns: 31px minmax(0, 1fr) 22px !important;
    gap: 4px !important;
  }

  body.theme-pocket .pocket-life-meters small,
  body.theme-pocket .pocket-life-meters strong {
    font-size: 0.64rem !important;
  }

  body.theme-pocket .pocket-life-actions {
    padding-top: 14px;
  }

  body.theme-pocket .break-game-fortune {
    width: calc(100% - 24px) !important;
    padding: 8px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-unified {
    padding: 7px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-stage-label > small {
    display: block !important;
    font-size: 0.62rem !important;
  }

  body.theme-pocket .break-game-fortune .fortune-energy-ritual {
    min-height: 126px !important;
    grid-template-columns: 26px minmax(82px, 0.78fr) minmax(122px, 1.22fr) !important;
    gap: 4px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-phase-rail {
    gap: 8px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-phase-rail b {
    display: none !important;
  }

  body.theme-pocket .break-game-fortune .fortune-energy-core:not(.fortune-sign-button) {
    width: 86px !important;
    height: 86px !important;
    min-width: 86px !important;
    min-height: 86px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-core-glyph {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.55rem !important;
  }

  body.theme-pocket .break-game-fortune .fortune-core-touch {
    min-width: 74px !important;
    padding: 4px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-vessel-status {
    padding: 3px 5px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-result-panel,
  body.theme-pocket .break-game-fortune .fortune-outcome {
    min-height: 108px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-outcome {
    grid-template-rows: auto minmax(42px, 1fr) auto auto !important;
    padding: 6px 5px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-auspice {
    font-size: 1.72rem !important;
  }

  body.theme-pocket .break-game-fortune .fortune-interpret-button {
    min-height: 40px !important;
  }
}

@keyframes pocket-agent-stretch-readable {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  16% { transform: translate3d(0, 2px, 0) scale(0.99, 1.01); }
  32% { transform: translate3d(-2px, -4px, 0) scale(1.015) rotate(-0.7deg); }
  48% { transform: translate3d(2px, -5px, 0) scale(1.02) rotate(0.7deg); }
  64% { transform: translate3d(-1px, -3px, 0) scale(1.01) rotate(-0.35deg); }
  82% { transform: translate3d(0, 1px, 0) scale(0.995); }
}

@keyframes pocket-agent-stretch-message-readable {
  0%, 100% { background-color: #e1e6da; }
  34%, 72% { background-color: #e0c178; }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-pocket .pixel-agent-stage.is-stretching .pixel-agent-art,
  body.theme-pocket .pixel-agent-stage.is-stretching .pixel-agent-message {
    animation: none !important;
    transform: none !important;
  }
}

/* Pixel completion v3: square surfaces, compact modules, and intermittent work gestures. */
body.theme-pocket {
  --pocket-surface: #c6d0bb;
  --pocket-surface-raised: #d7decf;
  --pocket-surface-muted: #bdc8b4;
  --pocket-line: #263429;
  --pocket-highlight: #e0a03a;
}

body.theme-pocket .icon-button,
body.theme-pocket .personal-products-settings,
body.theme-pocket .celebrity-reset,
body.theme-pocket .ticker-live-income-amount,
body.theme-pocket .celebrity-money {
  border-radius: 2px !important;
}

body.theme-pocket #soundButton > span,
body.theme-pocket #adminToggle > span,
body.theme-pocket #personalTargetSettingsButton,
body.theme-pocket #celebrityProductSettingsButton {
  font-family: "SFMono-Regular", "PingFang SC", ui-monospace, monospace !important;
  font-size: 0.74rem;
  font-weight: 950;
  line-height: 1;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-art {
  will-change: transform;
  animation: pocket-agent-keytap-v3 920ms steps(6, end) both !important;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-message {
  animation: pocket-agent-message-v3 920ms steps(2, end) both;
}

body.theme-pocket .lottery-reel,
body.theme-pocket .lottery-reel.is-special,
body.theme-pocket .lottery-digits[data-mode="powerball"] .lottery-reel,
body.theme-pocket .lottery-digits[data-mode="mega"] .lottery-reel {
  border: 2px solid var(--pocket-line) !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #e0e5d9 !important;
  background-image: none !important;
  box-shadow: 2px 2px 0 rgba(38, 52, 41, 0.38) !important;
  filter: none !important;
}

body.theme-pocket .lottery-reel.is-special,
body.theme-pocket .lottery-digits[data-mode="powerball"] .lottery-reel.is-special,
body.theme-pocket .lottery-digits[data-mode="mega"] .lottery-reel.is-special {
  background: var(--pocket-highlight) !important;
}

body.theme-pocket .fortune-phase-rail span i,
body.theme-pocket #fortuneDrawnMark,
body.theme-pocket .fortune-interpret-orbit {
  border-radius: 2px !important;
  filter: none !important;
  box-shadow: none !important;
}

body.theme-pocket .celebrity-terminal .celebrity-income-core .celebrity-money,
body.theme-pocket .celebrity-panel.is-running .celebrity-terminal .celebrity-income-core .celebrity-money {
  border: 2px solid var(--pocket-line) !important;
  border-radius: 2px !important;
  padding: 8px 10px !important;
  background: var(--pocket-surface-muted) !important;
  box-shadow: inset 2px 2px 0 rgba(38, 52, 41, 0.2) !important;
}

body.theme-pocket .celebrity-ticker-character,
body.theme-pocket .celebrity-ticker-character.is-changing,
body.theme-pocket .celebrity-panel.is-running .celebrity-money strong {
  filter: none !important;
  text-shadow: none !important;
  will-change: transform;
}

body.theme-pocket .celebrity-ticker-character.is-changing {
  animation: pocket-digit-tick-v3 160ms steps(3, end) both !important;
}

body.theme-pocket .celebrity-income-core {
  min-height: 154px !important;
  padding-block: 12px !important;
}

body.theme-pocket .celebrity-milestone-fx,
body.theme-pocket .reward-toast,
body.theme-pocket #chargeGain,
body.theme-pocket #comboBurst {
  border: 2px solid var(--pocket-line) !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: var(--pocket-highlight) !important;
  background-image: none !important;
  box-shadow: 4px 4px 0 var(--pocket-line) !important;
  filter: none !important;
  text-shadow: none !important;
}

body.theme-pocket .celebrity-milestone-fx::before,
body.theme-pocket .celebrity-milestone-fx::after,
body.theme-pocket .reward-toast::before,
body.theme-pocket .reward-toast::after {
  display: none !important;
}

body.theme-pocket .ledger-chart-column > i,
body.theme-pocket .ledger-chart-column > i::before,
body.theme-pocket .ledger-chart-column > i::after {
  border-radius: 0 !important;
  background: var(--pocket-highlight) !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.theme-pocket dialog.app-settings-dialog :is(
  .source-row,
  .income-daily-target,
  .income-progress,
  .daily-income-goal-setting > div,
  .income-calendar-settings,
  .income-proration-setting,
  .custom-holiday-form,
  .custom-holiday-list > span,
  .workday-countdown-settings,
  .countdown-setting-row,
  .sedentary-reminder-setting,
  .auto-click-settings,
  .spread-analytics-settings,
  .spread-analytics-grid > span
) {
  border-color: #526053 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: var(--pocket-surface-muted) !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.theme-pocket dialog.app-settings-dialog .source-row.is-active,
body.theme-pocket dialog.app-settings-dialog .source-row.is-paused {
  border-color: var(--pocket-line) !important;
  box-shadow: inset 4px 0 0 var(--pocket-highlight) !important;
}

body.theme-pocket dialog.app-settings-dialog :is(
  .income-proration-setting,
  .custom-holiday-form,
  .sedentary-reminder-setting,
  .countdown-setting-row,
  .spread-analytics-grid > span
) :is(b, small, span, strong) {
  color: #27342a !important;
  text-shadow: none !important;
}

body.theme-pocket dialog.app-settings-dialog .income-progress::before {
  background: var(--pocket-highlight) !important;
  background-image: none !important;
  box-shadow: none !important;
  transition-timing-function: steps(4, end);
}

body.theme-pocket dialog.app-settings-dialog :is(
  .countdown-toggle-control i,
  .sedentary-reminder-setting > i,
  .auto-click-switch span
),
body.theme-pocket .city-report-privacy-toggle > i {
  border: 2px solid var(--pocket-line) !important;
  border-radius: 2px !important;
  background: #9eab96 !important;
  background-image: none !important;
  box-shadow: none !important;
  transition: background 160ms steps(2, end) !important;
}

body.theme-pocket dialog.app-settings-dialog :is(
  .countdown-toggle-control i::after,
  .sedentary-reminder-setting > i::after,
  .auto-click-switch span::after
),
body.theme-pocket .city-report-privacy-toggle > i::after {
  border-radius: 1px !important;
  background: #e0e5d9 !important;
  box-shadow: none !important;
  transition: transform 160ms steps(2, end), left 160ms steps(2, end) !important;
}

body.theme-pocket dialog.app-settings-dialog :is(
  .countdown-toggle-control input:checked + i,
  .sedentary-reminder-setting input:checked + i,
  .auto-click-switch input:checked + span
),
body.theme-pocket .city-report-privacy-toggle input:checked + i {
  background: var(--pocket-highlight) !important;
}

body.theme-pocket dialog.app-settings-dialog .theme-option,
body.theme-pocket dialog.app-settings-dialog .income-goal-auto-button,
body.theme-pocket dialog.app-settings-dialog .custom-holiday-form button {
  border: 2px solid var(--pocket-line) !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background-image: none !important;
  box-shadow: 2px 2px 0 var(--pocket-line) !important;
}

body.theme-pocket dialog.app-settings-dialog .theme-option:not(.active) {
  background: #c1ccb6 !important;
}

@media (min-width: 981px) {
  body.theme-pocket .ticker-stage {
    grid-template-columns: minmax(520px, 1.15fr) minmax(360px, 0.85fr);
    grid-template-areas:
      "agent status"
      "agent money"
      "agent entry";
    grid-template-rows: auto minmax(92px, auto) auto;
    column-gap: clamp(28px, 5vw, 78px);
    row-gap: 7px;
    min-height: 286px;
    padding: 14px clamp(38px, 6vw, 92px) 18px;
  }

  body.theme-pocket .pixel-agent-stage {
    grid-area: agent;
    width: 100%;
    max-width: 720px;
    min-height: 210px;
    grid-template-columns: minmax(320px, 1fr) minmax(170px, 0.5fr);
  }

  body.theme-pocket .pixel-agent-art { height: 210px; }
  body.theme-pocket .ticker-stage > .live-label { grid-area: status; align-self: end; }
  body.theme-pocket .money-wrap { grid-area: money; min-height: 92px; }
  body.theme-pocket .per-second { grid-area: entry; align-self: start; }
}

@media (max-width: 640px) {
  body.theme-pocket .ticker-stage { padding-bottom: 6px; }
  body.theme-pocket .pixel-agent-stage { min-height: 118px; }
  body.theme-pocket .pixel-agent-art { height: 118px; }
  body.theme-pocket .pixel-agent-message { min-height: 52px; padding: 6px; }
  body.theme-pocket .money-wrap { min-height: 58px; }
  body.theme-pocket .control-strip > button { min-height: 46px; }
  body.theme-pocket .city-report-launch { padding: 8px 9px; }
  body.theme-pocket .personal-products-panel { padding: 6px; }
  body.theme-pocket .pocket-life-scene { min-height: 98px; }
  body.theme-pocket .pocket-life-scene img,
  body.theme-pocket .pocket-garden-scene img { height: 82px; }
  body.theme-pocket .break-game-mini-games .breathing-preview,
  body.theme-pocket .break-game-mini-games .worry-crusher-preview { height: 106px; }
  body.theme-pocket .break-game-mini-games .mini-game-start { min-height: 42px; }
  body.theme-pocket .celebrity-income-core { min-height: 136px !important; padding-block: 9px !important; }
  body.theme-pocket .celebrity-terminal .celebrity-income-core .celebrity-money > strong {
    font-size: clamp(1.2rem, var(--celebrity-number-fluid, 18cqw), var(--celebrity-number-max, 4.2rem)) !important;
  }
  body.theme-pocket dialog.app-settings-dialog .celebrity-settings-dialog-body { gap: 8px !important; padding: 10px !important; }
  body.theme-pocket dialog.app-settings-dialog :is(
    .app-title-setting,
    .daily-income-goal-setting,
    .income-calendar-settings,
    .workday-countdown-settings,
    .admin-moods,
    .auto-click-settings,
    .spread-analytics-settings
  ) { padding: 8px !important; }
  body.theme-pocket dialog.app-settings-dialog .source-row { padding: 8px; }
}

@keyframes pocket-agent-keytap-v3 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  14% { transform: translate3d(-1px, 0, 0); }
  28% { transform: translate3d(-1px, 2px, 0); }
  42% { transform: translate3d(0, 0, 0); }
  56% { transform: translate3d(1px, 0, 0); }
  70% { transform: translate3d(1px, 2px, 0); }
  84% { transform: translate3d(0, 0, 0); }
}

@keyframes pocket-agent-message-v3 {
  0%, 100% { background-color: #e1e6da; }
  35%, 72% { background-color: #e0c178; }
}

@keyframes pocket-digit-tick-v3 {
  0% { transform: translateY(-2px); }
  50% { transform: translateY(1px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-art,
  body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-message,
  body.theme-pocket .celebrity-ticker-character.is-changing {
    animation: none !important;
    transform: none !important;
  }
}

/* FINAL unified timer reminders, modal settings and balanced break-game proportions. */
body.personal-settings-open {
  overflow: hidden;
}

body.timer-reminder-active {
  overflow-x: hidden;
}

.settings-backdrop {
  display: none !important;
}

dialog.app-settings-dialog {
  inset: 0 !important;
  width: min(640px, calc(100vw - 32px)) !important;
  max-height: min(84dvh, 760px) !important;
  margin: auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  transition: none !important;
}

dialog.app-settings-dialog[open] {
  display: grid !important;
}

dialog.app-settings-dialog.is-swipe-returning {
  transform: translate3d(var(--settings-swipe-x, 0), 0, 0) !important;
  transition: none !important;
  will-change: transform;
}

dialog.app-settings-dialog .admin-drawer-head {
  position: static;
  margin: 0;
}

.app-settings-dialog-body {
  gap: 12px;
}

.app-settings-dialog-body > * {
  min-width: 0;
}

dialog.personal-target-settings {
  width: min(520px, calc(100vw - 32px));
  max-height: min(72dvh, 520px);
}

.personal-target-settings-body {
  padding-top: 18px;
}

.personal-target-settings .personal-target-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr) 88px;
  gap: 8px;
  margin: 0;
}

.personal-target-settings-tip {
  color: rgba(220, 244, 233, 0.56);
  font-size: 0.6rem;
  font-weight: 750;
}

.timer-reminder-readout {
  position: relative;
  z-index: 3;
  display: grid;
  min-width: 0;
  place-items: center;
  gap: 3px;
}

.timer-reminder-readout > strong {
  color: var(--countdown-accent, #58efbd);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.62rem, 2.15vw, 0.84rem);
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.timer-reminder-readout > button {
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 231, 125, 0.68);
  border-radius: 999px;
  color: #2a1803;
  background: linear-gradient(135deg, #fff08b, #ffbd57);
  box-shadow: inset 0 1px 0 rgba(255, 255, 238, 0.74), 0 4px 10px rgba(255, 175, 58, 0.2);
  font-size: 0.46rem;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.workday-countdown-card[data-phase="alerting"] {
  --countdown-accent: #ffda55;
  position: relative;
  isolation: isolate;
  min-height: 72px;
  overflow: hidden;
  border-width: 2px !important;
  border-color: #ffdc59 !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 91, 91, 0.26), transparent 38%),
    radial-gradient(circle at 82% 86%, rgba(73, 255, 174, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(70, 19, 19, 0.98), rgba(40, 35, 9, 0.98) 52%, rgba(5, 44, 33, 0.98)) !important;
  animation: sedentaryReminderAlarm 920ms cubic-bezier(0.22, 0.7, 0.28, 1) infinite !important;
}

.workday-countdown-card[data-phase="alerting"] > span,
.workday-countdown-card[data-phase="alerting"] .timer-reminder-readout {
  position: relative;
  z-index: 3;
}

.workday-countdown-card[data-phase="alerting"]::before {
  position: absolute;
  z-index: 1;
  top: -70%;
  bottom: -70%;
  left: -52%;
  display: block !important;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 214, 0.86), transparent);
  content: "" !important;
  opacity: 0;
  pointer-events: none;
  transform: rotate(18deg);
  animation: sedentaryReminderSweep 1450ms ease-in-out infinite;
}

.workday-countdown-card[data-phase="alerting"]::after {
  z-index: 2;
  inset: 2px !important;
  height: auto !important;
  border: 1px solid rgba(255, 246, 164, 0.44);
  border-radius: 5px;
  background: none !important;
  box-shadow: inset 0 0 18px rgba(255, 216, 72, 0.12);
  opacity: 1;
  pointer-events: none;
  animation: sedentaryReminderFrame 920ms ease-in-out infinite alternate;
}

.workday-countdown-card[data-phase="alerting"] .timer-reminder-readout > strong {
  color: #fff7b7 !important;
  font-family: inherit;
  font-size: clamp(0.58rem, 2vw, 0.72rem);
  letter-spacing: 0.04em;
  text-shadow: 0 0 9px rgba(255, 239, 119, 0.78), 0 0 22px rgba(255, 96, 74, 0.5);
  animation: sedentaryReminderText 620ms ease-in-out infinite alternate;
}

.workday-countdown-card[data-phase="alerting"] .timer-reminder-readout > button {
  animation: sedentaryReminderDismiss 760ms ease-in-out infinite alternate;
}

.fortune-outcome-head {
  justify-content: flex-end;
}

.break-game-luck {
  min-height: 170px;
  padding: 15px;
}

.break-game-luck .luck-tools {
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 13px;
}

.break-game-luck .luck-start-button,
.break-game-luck .lottery-machine {
  min-height: 122px;
}

.break-game-luck .lottery-digits i {
  --lottery-reel-height: 44px;
}

.break-game-fortune {
  width: min(94%, 780px);
  justify-self: center;
  padding: 9px;
}

.break-game-fortune .fortune-unified {
  padding: 10px !important;
}

.break-game-fortune .fortune-unified .fortune-stage-label {
  margin-bottom: 7px !important;
  padding-bottom: 6px !important;
}

.break-game-fortune .fortune-energy-ritual,
.break-game-fortune .fortune-unified .fortune-energy-ritual {
  min-height: 176px;
}

.break-game-fortune .fortune-unified .fortune-energy-core:not(.fortune-sign-button) {
  width: 138px !important;
  height: 138px !important;
  min-width: 138px;
  min-height: 138px;
}

.break-game-fortune .fortune-unified .fortune-result-panel {
  min-height: 168px;
}

.break-game-mini-games .mini-game-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 640px) {
  dialog.app-settings-dialog,
  dialog.personal-target-settings {
    width: calc(100vw - 20px) !important;
    max-height: min(88dvh, 760px) !important;
  }

  .personal-target-settings .personal-target-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.88fr);
  }

  .personal-target-settings .personal-target-form > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .workday-countdown-card[data-phase="alerting"] {
    min-height: 76px;
  }

  .break-game-luck {
    min-height: 166px;
    padding: 12px;
  }

  .break-game-luck .luck-tools {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 9px;
  }

  .break-game-luck .luck-start-button,
  .break-game-luck .lottery-machine {
    min-height: 120px;
  }

  .break-game-luck .lottery-machine {
    padding: 9px;
  }

  .break-game-luck .lottery-digits {
    gap: 4px;
    padding: 5px;
  }

  .break-game-luck .lottery-digits i {
    --lottery-reel-height: 42px;
  }

  .break-game-fortune {
    width: 96%;
    padding: 7px;
  }

  .break-game-fortune .fortune-unified {
    padding: 8px !important;
  }

  .break-game-fortune .fortune-unified .fortune-stage-label {
    margin-bottom: 5px !important;
    padding-bottom: 5px !important;
  }

  .break-game-fortune .fortune-energy-ritual,
  .break-game-fortune .fortune-unified .fortune-energy-ritual {
    grid-template-columns: 28px minmax(108px, 0.82fr) minmax(132px, 1.18fr) !important;
    gap: 4px;
    min-height: 164px;
  }

  .break-game-fortune .fortune-phase-rail {
    gap: 12px;
  }

  .break-game-fortune .fortune-unified .fortune-energy-core:not(.fortune-sign-button) {
    width: 116px !important;
    height: 116px !important;
    min-width: 116px;
    min-height: 116px;
  }

  .break-game-fortune .fortune-core-glyph {
    width: 50px;
    height: 50px;
    font-size: 1.76rem;
  }

  .break-game-fortune .fortune-unified .fortune-result-panel {
    min-height: 154px;
  }

  .break-game-fortune .fortune-unified .fortune-result-panel .fortune-outcome {
    grid-template-rows: auto minmax(52px, 1fr) auto auto !important;
    padding: 7px 6px 6px !important;
  }

  .break-game-mini-games .mini-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  .break-game-mini-games .mini-game-card {
    min-height: 0 !important;
    padding: 8px;
  }

  .break-game-mini-games .mini-game-card > p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.52rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .break-game-mini-games .mini-game-card-head {
    display: grid;
  }

  .break-game-mini-games .mini-game-card-head > span {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 24px;
    margin: 0;
  }
}

/* Pocket theme final pixel pass: override later mini-game and overlay rules. */
body.theme-pocket .break-game-mini-games .mini-game-card,
body.theme-pocket .break-game-mini-games .breathing-launch-card,
body.theme-pocket .break-game-mini-games .worry-crusher-launch-card {
  color: #17231a !important;
  background: #d7decf !important;
  background-image: none !important;
  box-shadow: 2px 2px 0 #263429 !important;
}

body.theme-pocket .break-game-mini-games .mini-game-card-head h3,
body.theme-pocket .break-game-mini-games .mini-game-card-head small,
body.theme-pocket .break-game-mini-games .mini-game-card-head > span,
body.theme-pocket .break-game-mini-games .mini-game-card > p {
  color: #263429 !important;
  text-shadow: none !important;
}

body.theme-pocket .break-game-mini-games .breathing-preview,
body.theme-pocket .break-game-mini-games .worry-crusher-preview {
  height: 118px;
  border: 2px solid #334237;
  border-radius: 2px;
  background: #bdc8b4 !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.theme-pocket .break-game-mini-games .breathing-preview-orbit {
  width: 68px;
  height: 68px;
  border: 2px solid #263429;
  border-radius: 2px;
  color: #17231a;
  background: #d6ddce !important;
  box-shadow: 3px 3px 0 rgba(38, 52, 41, 0.4);
  animation: none !important;
}

body.theme-pocket .break-game-mini-games .breathing-preview-orbit::before,
body.theme-pocket .break-game-mini-games .breathing-preview-orbit::after,
body.theme-pocket .break-game-mini-games .breathing-preview-orbit i,
body.theme-pocket .break-game-mini-games .worry-preview-pointer,
body.theme-pocket .break-game-mini-games .worry-preview-impact {
  display: none;
}

body.theme-pocket .break-game-mini-games .breathing-preview-orbit b,
body.theme-pocket .break-game-mini-games .breathing-preview-copy {
  color: #263429;
  text-shadow: none;
}

body.theme-pocket .break-game-mini-games .breathing-preview-copy i {
  height: 2px;
  background: #526053;
}

body.theme-pocket .break-game-mini-games .worry-preview-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
  padding: 16px 7px 8px;
}

body.theme-pocket .break-game-mini-games .worry-preview-items i,
body.theme-pocket .break-game-mini-games .worry-preview-items i:nth-child(n) {
  position: relative;
  top: auto;
  min-width: 0;
  margin: 0;
  padding: 8px 2px;
  border: 2px solid #263429;
  border-color: #263429 !important;
  border-radius: 2px;
  color: #17231a !important;
  background: #d6ddce !important;
  background-image: none !important;
  filter: none !important;
  box-shadow: 2px 2px 0 rgba(38, 52, 41, 0.36) !important;
  animation: none !important;
}

body.theme-pocket .break-game-mini-games .worry-preview-items i::before,
body.theme-pocket .break-game-mini-games .worry-preview-items i::after {
  display: none !important;
}

body.theme-pocket .break-game-mini-games .worry-preview-items i b {
  color: #17231a !important;
  font-size: 0.58rem;
}

body.theme-pocket .break-game-mini-games .worry-preview-items i em {
  position: static;
  color: #8b3f34;
  font-size: 0.46rem;
  opacity: 1;
  text-shadow: none;
}

body.theme-pocket .celebrity-terminal {
  background: #c0cab5 !important;
  background-image: none !important;
}

body.theme-pocket .break-game-fortune .fortune-unified,
body.theme-pocket .break-game-fortune .fortune-energy-ritual,
body.theme-pocket .break-game-fortune .fortune-energy-panel,
body.theme-pocket .break-game-fortune .fortune-result-panel,
body.theme-pocket .break-game-fortune .fortune-outcome,
body.theme-pocket .break-game-fortune .fortune-result {
  border-color: #263429 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #d7decf !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-core {
  border: 3px solid #263429 !important;
  border-radius: 3px !important;
  color: #17231a !important;
  background: #e0a03a !important;
  background-image: none !important;
  box-shadow: 3px 3px 0 #263429 !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-core *,
body.theme-pocket .break-game-fortune .fortune-outcome *,
body.theme-pocket .break-game-fortune .fortune-result *,
body.theme-pocket .break-game-fortune .fortune-stage-label * {
  color: #17231a !important;
  text-shadow: none !important;
}

body.theme-pocket .break-game-fortune .fortune-phase-rail span i {
  border-color: #263429 !important;
  color: #17231a !important;
  background: #c2cdb7 !important;
  box-shadow: none !important;
}

body.theme-pocket .break-game-fortune .fortune-phase-rail span.is-active i {
  background: #e0a03a !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-meter,
body.theme-pocket .break-game-fortune .fortune-energy-meter i {
  border-color: #263429 !important;
  background: #9eab96 !important;
  box-shadow: none !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-meter i {
  background: #d28a22 !important;
}

body.theme-pocket .zodiac-horoscope,
body.theme-pocket .zodiac-daily-card,
body.theme-pocket .zodiac-copy-panel,
body.theme-pocket .zodiac-lucky-note span,
body.theme-pocket .zodiac-ratings span {
  border-color: #263429 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #d7decf !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

body.theme-pocket .zodiac-daily-card *,
body.theme-pocket .zodiac-horoscope-head *,
body.theme-pocket .zodiac-copy-panel * {
  color: #17231a !important;
  text-shadow: none !important;
}

body.theme-pocket .zodiac-ratings i,
body.theme-pocket .zodiac-ratings i b {
  border-color: #263429 !important;
  background: #9eab96 !important;
  box-shadow: none !important;
}

body.theme-pocket .zodiac-ratings i b {
  background: #d28a22 !important;
}

body.theme-pocket .immersive-game-overlay {
  color: #17231a;
  background: #98a68f !important;
  background-image: none !important;
}

body.theme-pocket .breathing-shell,
body.theme-pocket .worry-crusher-shell,
body.theme-pocket .immersive-game-hud,
body.theme-pocket .breathing-stage,
body.theme-pocket .worry-crusher-stage,
body.theme-pocket .game-start-gate,
body.theme-pocket .game-start-card,
body.theme-pocket .immersive-game-result {
  border-color: #263429 !important;
  border-radius: 3px !important;
  color: #17231a !important;
  background: #d1d9c7 !important;
  background-image: none !important;
  box-shadow: 3px 3px 0 rgba(38, 52, 41, 0.48) !important;
  backdrop-filter: none !important;
  text-shadow: none !important;
}

body.theme-pocket .game-start-card *,
body.theme-pocket .immersive-game-title *,
body.theme-pocket .immersive-game-scoreboard * {
  color: #17231a !important;
}

body.theme-pocket .game-start-emblem {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #e0a03a !important;
  background-image: none !important;
  box-shadow: 2px 2px 0 #263429 !important;
}

body.theme-pocket .immersive-game-overlay button {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #e0a03a !important;
  background-image: none !important;
  box-shadow: 2px 2px 0 #263429 !important;
  text-shadow: none !important;
}

body.theme-pocket .immersive-game-overlay *,
body.theme-pocket .immersive-game-overlay *::before,
body.theme-pocket .immersive-game-overlay *::after {
  text-shadow: none !important;
}

/* Final authority for the seven-stage selector after legacy celebrity sizing. */
.celebrity-head-actions select { width: clamp(158px, 20vw, 220px); }
@media (max-width: 640px) {
  .celebrity-head-actions select {
    width: min(190px, calc(100vw - 154px));
    font-size: 0.58rem;
  }
}

/* Seven-stage wealth journey: one accumulated day unlocks the next experience. */
.celebrity-head-actions select {
  width: clamp(158px, 20vw, 220px);
}

.celebrity-head-actions select option:disabled {
  color: rgba(210, 229, 222, 0.46);
}

.celebrity-terminal-head > span {
  overflow: hidden;
  max-width: calc(100% - 54px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.celebrity-tier-progress {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 6px;
  margin-top: 9px;
  padding: 9px 10px;
  border: 1px solid rgba(84, 184, 255, 0.2);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(31, 93, 111, 0.12), rgba(6, 28, 31, 0.62));
}

.celebrity-tier-progress[hidden] { display: none !important; }

.celebrity-custom-lock {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 217, 91, 0.28);
  border-radius: 11px;
  color: #ffe78d;
  background: linear-gradient(135deg, rgba(255, 203, 63, 0.1), rgba(23, 70, 57, 0.28));
}

.celebrity-custom-lock[hidden] { display: none !important; }
.celebrity-custom-lock > span { font-size: 1.15rem; filter: drop-shadow(0 0 8px rgba(255, 218, 91, 0.32)); }
.celebrity-custom-lock > div { display: grid; gap: 2px; }
.celebrity-custom-lock strong { font-size: 0.67rem; }
.celebrity-custom-lock small { color: rgba(224, 240, 232, 0.58); font-size: 0.54rem; }

.celebrity-custom-form.is-locked {
  opacity: 0.42;
  filter: grayscale(0.7);
  pointer-events: none;
  user-select: none;
}

.celebrity-tier-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.celebrity-tier-progress > div span {
  overflow: hidden;
  color: #dffcff;
  font-size: 0.59rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.celebrity-tier-progress > div b {
  flex: 0 0 auto;
  color: #ffe278;
  font: 900 0.55rem ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.celebrity-tier-progress > i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.36);
}

.celebrity-tier-progress > i b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #52d9ff, #53ffac 58%, #ffe565);
  box-shadow: 0 0 15px rgba(83, 255, 172, 0.5);
  transition: width 320ms linear;
}

.celebrity-tier-progress > small {
  color: rgba(212, 238, 230, 0.58);
  font-size: 0.52rem;
  font-weight: 850;
}

.celebrity-tier-progress.is-complete {
  border-color: rgba(255, 224, 103, 0.5);
  background: linear-gradient(135deg, rgba(255, 205, 73, 0.13), rgba(60, 255, 172, 0.1));
  box-shadow: 0 0 24px rgba(255, 218, 84, 0.1);
}

.celebrity-tier-progress.is-complete > small { color: #ffe99b; }
.celebrity-panel.is-tier-complete .celebrity-terminal-head b { color: #ffe36f; }

body.theme-moonlight .celebrity-tier-progress {
  border-color: rgba(255, 151, 190, 0.34);
  background: linear-gradient(135deg, rgba(255, 118, 170, 0.13), rgba(110, 91, 255, 0.13), rgba(68, 225, 188, 0.1));
}

body.theme-moonlight .celebrity-custom-lock {
  border-color: rgba(255, 218, 95, 0.42);
  color: #fff0a6;
  background: linear-gradient(135deg, rgba(255, 111, 145, 0.13), rgba(159, 132, 255, 0.13), rgba(84, 229, 186, 0.1));
}

body.theme-moonlight .celebrity-tier-progress > div span { color: #fff5c8; }
body.theme-moonlight .celebrity-tier-progress > div b { color: var(--dopa-yellow); }
body.theme-moonlight .celebrity-tier-progress > i b {
  background: linear-gradient(90deg, var(--dopa-coral), var(--dopa-yellow), var(--dopa-mint), #9f84ff);
}

body.theme-moonlight .celebrity-tier-progress.is-complete {
  border-color: rgba(255, 226, 107, 0.6);
  box-shadow: 0 0 28px rgba(255, 118, 171, 0.16);
}

@media (max-width: 640px) {
  .celebrity-head-actions select {
    width: min(190px, calc(100vw - 154px));
    font-size: 0.58rem;
  }

  .celebrity-tier-progress { padding: 8px; }
  .celebrity-tier-progress > div span { font-size: 0.54rem; }
  .celebrity-tier-progress > div b { font-size: 0.49rem; }
}

/* Mini games wait for an explicit confirmation before timers and effects begin. */
.game-start-gate {
  position: absolute;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 44px);
  background:
    radial-gradient(circle at 50% 44%, rgba(83, 255, 190, 0.16), transparent 34%),
    linear-gradient(150deg, rgba(4, 27, 21, 0.9), rgba(2, 13, 12, 0.96));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: opacity 180ms ease, visibility 180ms ease;
  touch-action: manipulation;
}

.game-start-gate[hidden] { display: none !important; }

.game-start-card {
  display: grid;
  width: min(390px, 88vw);
  justify-items: center;
  gap: 9px;
  padding: clamp(24px, 6vw, 38px);
  border: 1px solid rgba(116, 255, 205, 0.34);
  border-radius: 26px;
  color: #f0fff9;
  background:
    linear-gradient(145deg, rgba(20, 74, 57, 0.72), rgba(4, 28, 22, 0.94)),
    rgba(4, 26, 20, 0.92);
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4), inset 0 1px rgba(255, 255, 255, 0.09);
  animation: gameStartCardArrive 420ms cubic-bezier(.18,.9,.22,1.18) both;
}

.game-start-emblem {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin-bottom: 3px;
  border: 1px solid rgba(255, 230, 132, 0.72);
  border-radius: 50%;
  color: #fff3ad;
  background: radial-gradient(circle at 36% 30%, rgba(255, 239, 164, 0.28), rgba(30, 106, 77, 0.5) 48%, rgba(4, 31, 24, 0.92));
  font-size: 1.55rem;
  font-weight: 1000;
  box-shadow: 0 0 32px rgba(92, 255, 192, 0.2), inset 0 0 22px rgba(255, 232, 129, 0.08);
}

.game-start-card > small {
  color: rgba(213, 248, 234, 0.62);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.game-start-card > strong {
  font-size: clamp(1.45rem, 6vw, 2rem);
  letter-spacing: 0.08em;
}

.game-start-card > p {
  margin: 0 0 12px;
  color: rgba(220, 248, 237, 0.68);
  font-size: 0.72rem;
}

.game-start-card > button {
  width: min(270px, 100%);
  min-height: 54px;
  border: 1px solid rgba(255, 241, 171, 0.62);
  border-radius: 17px;
  color: #082719;
  background: linear-gradient(100deg, #51e7ca, #6bffad 54%, #ffe776);
  font-size: 1rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  box-shadow: 0 12px 32px rgba(63, 245, 173, 0.22), inset 0 1px rgba(255, 255, 255, 0.58);
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.game-start-card > button:hover,
.game-start-card > button:focus-visible {
  filter: brightness(1.08) saturate(1.08);
  box-shadow: 0 15px 40px rgba(63, 245, 173, 0.34), 0 0 0 4px rgba(102, 255, 183, 0.14);
  transform: translateY(-2px);
  outline: 0;
}

.game-start-card > button:active { transform: translateY(1px) scale(0.985); }
.immersive-game-overlay.is-awaiting-start .breathing-control { animation: none !important; transform: scale(0.72); }
.immersive-game-overlay.is-awaiting-start .worry-crusher-arena { pointer-events: none; }

body.theme-moonlight .game-start-gate {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 128, 183, 0.22), transparent 34%),
    linear-gradient(150deg, rgba(52, 30, 83, 0.92), rgba(18, 16, 53, 0.97));
}

body.theme-moonlight .game-start-card {
  border-color: rgba(255, 191, 215, 0.48);
  background: linear-gradient(145deg, rgba(113, 62, 128, 0.72), rgba(38, 28, 77, 0.95));
  box-shadow: 0 24px 70px rgba(24, 8, 52, 0.46), inset 0 1px rgba(255, 255, 255, 0.12);
}

body.theme-moonlight .game-start-emblem {
  border-color: rgba(255, 219, 128, 0.78);
  color: #fff4c0;
  background: radial-gradient(circle at 36% 30%, #ffd78d, #ef81af 52%, #7154c2);
  box-shadow: 0 0 34px rgba(255, 123, 180, 0.34);
}

body.theme-moonlight .game-start-card > button {
  color: #421d4c;
  background: linear-gradient(100deg, #ff91ba, #ffd76f 54%, #9cf0dc);
  box-shadow: 0 12px 34px rgba(255, 113, 172, 0.28);
}

@keyframes gameStartCardArrive {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .game-start-card { animation-duration: 1ms !important; }
}

/* TRUE EOF authority · stable dopamine surfaces */
.zodiac-orbit {
  animation-play-state: paused !important;
}

.virtual-shop-launch::after {
  animation-iteration-count: 2 !important;
}

dialog.virtual-shop-dialog,
body.theme-moonlight dialog.virtual-shop-dialog {
  inset: auto !important;
  top: 50% !important;
  left: 50% !important;
  height: min(88svh, 860px) !important;
  max-height: none !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
}

dialog.virtual-shop-dialog[open] {
  animation: virtualShopDialogFadeIn 180ms ease-out both !important;
}

dialog.virtual-shop-dialog .virtual-shop-dialog-body {
  min-height: 0;
  max-height: none !important;
  overflow-x: hidden;
  overflow-y: auto;
}

body.theme-moonlight .break-game-fortune .fortune-outcome,
body.theme-moonlight .break-game-fortune .fortune-lingqian-slip {
  border-color: rgba(255, 255, 255, 0.14) !important;
  background:
    radial-gradient(circle at 85% 15%, rgba(84, 229, 186, 0.1), transparent 34%),
    rgba(8, 15, 39, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.theme-moonlight .break-game-fortune .fortune-phase-rail span.is-active i {
  border-color: rgba(255, 231, 142, 0.82) !important;
  color: #4b1b4c !important;
  background: linear-gradient(145deg, #fff2a8, #ff9aaf 58%, #9b76ff) !important;
  box-shadow: 0 0 18px rgba(255, 111, 145, 0.34) !important;
}

body.theme-moonlight .break-game-fortune .fortune-phase-rail span.is-active b {
  color: #ffd95f !important;
}

@media (max-width: 640px) {
  dialog.virtual-shop-dialog,
  body.theme-moonlight dialog.virtual-shop-dialog {
    width: calc(100vw - 16px) !important;
    height: min(92svh, 860px) !important;
  }

  body.theme-moonlight .break-game-fortune {
    width: 100% !important;
    padding: 11px !important;
  }

  body.theme-moonlight .break-game-fortune .fortune-stage-label {
    display: grid !important;
    justify-items: start;
    gap: 3px;
  }

  body.theme-moonlight .break-game-fortune .fortune-stage-label small {
    display: block !important;
    max-width: none;
    text-align: left;
  }
}

/* Performance and layout authority · 2026-07-30
   Keep inactive dashboards quiet, defer off-screen paint, and make the shop modal
   independent from the browser chrome's changing dynamic viewport. */
body.theme-moonlight:not(.is-running) .ticker-stage::before {
  animation-play-state: paused !important;
}

.zodiac-orbit {
  animation-play-state: paused;
}

.virtual-shop-launch::after {
  animation-iteration-count: 2;
}

.break-games,
.celebrity-panel,
.income-history-panel {
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}

dialog.virtual-shop-dialog,
body.theme-moonlight dialog.virtual-shop-dialog {
  inset: auto !important;
  top: 50% !important;
  left: 50% !important;
  width: min(920px, calc(100vw - 28px));
  height: min(88svh, 860px);
  max-width: 920px;
  max-height: none !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  contain: layout paint;
  isolation: isolate;
}

dialog.virtual-shop-dialog[open] {
  animation: virtualShopDialogFadeIn 180ms ease-out both !important;
}

dialog.virtual-shop-dialog .virtual-shop-dialog-body {
  min-height: 0;
  max-height: none !important;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

@keyframes virtualShopDialogFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 640px) {
  dialog.virtual-shop-dialog,
  body.theme-moonlight dialog.virtual-shop-dialog {
    width: calc(100vw - 16px);
    height: min(92svh, 860px);
  }
}

/* Moonlight Garden · 今日花签
   Reuse the dopamine card language established by 星座运势 while preserving
   the existing hold / reveal / interpret ritual and its state animations. */
body.theme-moonlight .break-game-fortune {
  --flower-coral: #ff6f91;
  --flower-yellow: #ffd95f;
  --flower-mint: #54e5ba;
  --flower-purple: #9a72ff;
  width: min(96%, 800px);
  padding: 14px;
  border: 1px solid rgba(255, 127, 177, 0.5);
  border-radius: 20px;
  background:
    radial-gradient(circle at 4% 2%, rgba(255, 217, 95, 0.23), transparent 30%),
    radial-gradient(circle at 97% 6%, rgba(84, 229, 186, 0.2), transparent 28%),
    radial-gradient(circle at 88% 94%, rgba(255, 111, 145, 0.22), transparent 36%),
    linear-gradient(135deg, rgba(68, 25, 90, 0.98), rgba(31, 25, 77, 0.98) 48%, rgba(16, 55, 70, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11), 0 18px 48px rgba(8, 1, 28, 0.28);
}

body.theme-moonlight .break-game-fortune > .break-game-head {
  align-items: end;
  margin-bottom: 11px;
  padding: 0 2px;
}

body.theme-moonlight .break-game-fortune > .break-game-head span {
  color: var(--flower-yellow);
  font-family: inherit;
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: 0.16em;
}

body.theme-moonlight .break-game-fortune > .break-game-head strong {
  color: #fff9ef;
  font-family: inherit;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
}

body.theme-moonlight .break-game-fortune .fortune-unified {
  padding: 13px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 17px !important;
  background:
    radial-gradient(circle at 35% 45%, rgba(154, 114, 255, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(12, 18, 49, 0.7), rgba(9, 24, 43, 0.68)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-moonlight .break-game-fortune .fortune-unified::before {
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 217, 95, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 229, 186, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}

body.theme-moonlight .break-game-fortune .fortune-stage-label {
  margin-bottom: 10px !important;
  padding: 0 1px 9px !important;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.theme-moonlight .break-game-fortune .fortune-stage-label span {
  color: #fff5c8 !important;
  font-family: inherit;
  font-size: 0.82rem !important;
  letter-spacing: 0.04em;
}

body.theme-moonlight .break-game-fortune .fortune-stage-label small {
  color: rgba(255, 249, 246, 0.68) !important;
  font-size: 0.54rem !important;
}

body.theme-moonlight .break-game-fortune .fortune-phase-rail::before {
  background: linear-gradient(transparent, rgba(255, 217, 95, 0.48), transparent);
}

body.theme-moonlight .break-game-fortune .fortune-phase-rail span {
  color: rgba(235, 245, 255, 0.4);
}

body.theme-moonlight .break-game-fortune .fortune-phase-rail span i {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.64);
  background: rgba(15, 20, 55, 0.86);
}

body.theme-moonlight .break-game-fortune .fortune-phase-rail span.is-active {
  color: var(--flower-yellow);
}

body.theme-moonlight .break-game-fortune .fortune-phase-rail span.is-active i {
  border-color: rgba(255, 231, 142, 0.82);
  color: #4b1b4c;
  background: linear-gradient(145deg, #fff2a8, #ff9aaf 58%, #9b76ff);
  box-shadow: 0 0 18px rgba(255, 111, 145, 0.34);
}

body.theme-moonlight .break-game-fortune .fortune-energy-core {
  border: 1px solid rgba(255, 240, 173, 0.5) !important;
  background:
    radial-gradient(circle, rgba(255, 245, 189, 0.34) 0 10%, rgba(255, 111, 145, 0.2) 31%, rgba(154, 114, 255, 0.13) 56%, transparent 73%) !important;
  box-shadow: 0 0 44px rgba(255, 111, 145, 0.2) !important;
}

body.theme-moonlight .break-game-fortune .fortune-core-orbit {
  border-color: rgba(84, 229, 186, 0.32);
}

body.theme-moonlight .break-game-fortune .fortune-core-halo {
  border-color: rgba(255, 217, 95, 0.3);
}

body.theme-moonlight .break-game-fortune .fortune-core-glyph {
  border-color: rgba(255, 248, 205, 0.7);
  color: #4f174d;
  background: linear-gradient(145deg, #fff5b6, #ffae7a 48%, #ff7aad);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 12px 28px rgba(255, 87, 153, 0.3);
}

body.theme-moonlight .break-game-fortune .fortune-core-touch b,
body.theme-moonlight .break-game-fortune .fortune-vessel-status small {
  color: #fff1b5;
}

body.theme-moonlight .break-game-fortune .fortune-result-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background:
    radial-gradient(circle at 85% 15%, rgba(84, 229, 186, 0.1), transparent 34%),
    rgba(8, 15, 39, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.theme-moonlight .break-game-fortune .fortune-auspice,
body.theme-moonlight .break-game-fortune #fortuneDrawnMark {
  color: var(--flower-yellow);
  text-shadow: 0 0 20px rgba(255, 217, 95, 0.3);
}

body.theme-moonlight .break-game-fortune .fortune-energy-meter {
  background: rgba(255, 255, 255, 0.1);
}

body.theme-moonlight .break-game-fortune .fortune-energy-meter i {
  background: linear-gradient(90deg, var(--flower-coral), var(--flower-yellow), var(--flower-mint));
  box-shadow: 0 0 12px rgba(255, 111, 145, 0.34);
}

body.theme-moonlight .break-game-fortune .fortune-interpret-button {
  border: 1px solid rgba(255, 234, 148, 0.64);
  border-radius: 13px;
  color: #4a1949;
  background: linear-gradient(105deg, #ff7eaa, #ffdb69 52%, #63e4c1);
  box-shadow: 0 12px 26px rgba(16, 7, 45, 0.28), inset 0 1px 0 rgba(255,255,255,.45);
}

body.theme-moonlight .break-game-fortune .fortune-result {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background: rgba(10, 16, 41, 0.68);
}

body.theme-moonlight .break-game-fortune .fortune-oracle-label {
  color: var(--flower-mint);
  letter-spacing: 0.12em;
}

body.theme-moonlight .break-game-fortune .fortune-oracle-copy b {
  color: #fff5c8;
}

body.theme-moonlight .break-game-fortune .fortune-oracle-copy p,
body.theme-moonlight .break-game-fortune .fortune-oracle-footer em {
  color: rgba(255, 249, 246, 0.76);
}

body.theme-moonlight .break-game-fortune .fortune-oracle-footer span {
  color: #ffb7c8;
}

@media (max-width: 640px) {
  body.theme-moonlight .break-game-fortune {
    width: 100%;
    padding: 11px;
    border-radius: 18px;
  }

  body.theme-moonlight .break-game-fortune .fortune-unified {
    padding: 10px !important;
    border-radius: 15px !important;
  }

  body.theme-moonlight .break-game-fortune .fortune-stage-label {
    display: grid !important;
    justify-items: start;
    gap: 3px;
  }

  body.theme-moonlight .break-game-fortune .fortune-stage-label small {
    display: block !important;
  }
}

/* Moonlight Garden final authority: neutralize late legacy green/blue accents. */
body.theme-moonlight #adminPanel .admin-close-button,
body.theme-moonlight dialog.celebrity-settings-dialog .celebrity-settings-close {
  border-color: rgba(244, 213, 158, 0.36) !important;
  color: #f9dce3 !important;
  background: rgba(255, 248, 250, 0.055) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.theme-moonlight .break-game-fortune .fortune-outcome,
body.theme-moonlight .break-game-fortune .fortune-lingqian-slip {
  border-color: rgba(244, 213, 158, 0.2) !important;
  background:
    radial-gradient(circle at 50% 28%, rgba(242, 167, 184, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(198, 179, 245, 0.07), rgba(242, 167, 184, 0.035)),
    rgba(22, 13, 27, 0.92) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.theme-moonlight .fortune-energy-meter {
  background: rgba(255, 248, 250, 0.08) !important;
}

body.theme-moonlight .fortune-energy-meter i {
  background: linear-gradient(90deg, #c6b3f5, #f2a7b8, #f4d59e) !important;
  box-shadow: 0 0 12px rgba(242, 167, 184, 0.26) !important;
}

body.theme-moonlight .fortune-phase-rail span.is-active i,
body.theme-moonlight .fortune-phase-rail span.is-active b {
  color: #f4d59e !important;
  border-color: rgba(244, 213, 158, 0.58) !important;
}

body.theme-moonlight .breathing-preview,
body.theme-moonlight .worry-crusher-preview {
  border-color: rgba(244, 213, 158, 0.18) !important;
  background:
    radial-gradient(circle at 50% 44%, rgba(198, 179, 245, 0.08), transparent 38%),
    rgba(18, 11, 22, 0.48) !important;
}

body.theme-moonlight .breathing-preview-orbit,
body.theme-moonlight .breathing-preview-orbit::before,
body.theme-moonlight .breathing-preview-orbit::after {
  border-color: rgba(198, 179, 245, 0.32) !important;
  box-shadow: 0 0 20px rgba(198, 179, 245, 0.12) !important;
}

body.theme-moonlight .breathing-preview-orbit b {
  color: #f6dce3 !important;
}

body.theme-moonlight .worry-preview-pointer,
body.theme-moonlight .worry-preview-impact {
  color: #f4d59e !important;
  border-color: rgba(244, 213, 158, 0.42) !important;
}

/* Moonlight Garden theme: adult, feminine, calm and quietly luxurious. */
body.theme-moonlight {
  --bg: #17101c;
  --panel: rgba(33, 21, 38, 0.88);
  --panel-strong: rgba(42, 25, 47, 0.97);
  --line: rgba(244, 213, 158, 0.22);
  --text: #fff8fa;
  --muted: #cbbdce;
  --green: #f2a7b8;
  --amber: #f4d59e;
  --red: #e680a3;
  --blue: #c6b3f5;
  --ink: #2b1825;
  --accent: #f2a7b8;
  --accent-2: #f4d59e;
  color: var(--text);
  background:
    radial-gradient(circle at 13% 7%, rgba(198, 179, 245, 0.23), transparent 29%),
    radial-gradient(circle at 86% 19%, rgba(242, 167, 184, 0.18), transparent 26%),
    radial-gradient(circle at 50% 78%, rgba(136, 223, 192, 0.08), transparent 33%),
    linear-gradient(155deg, #130d18 0%, #211426 48%, #171019 100%);
}

body.theme-moonlight::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 38%, rgba(255, 244, 247, 0.025) 45%, transparent 52%),
    radial-gradient(circle at 74% 10%, rgba(255, 248, 235, 0.1) 0 1px, transparent 2px),
    radial-gradient(circle at 25% 32%, rgba(255, 248, 235, 0.08) 0 1px, transparent 2px);
  background-size: auto, 76px 76px, 112px 112px;
  content: "";
  pointer-events: none;
}

body.theme-moonlight .hero-panel,
body.theme-moonlight .income-history-panel,
body.theme-moonlight dialog.celebrity-settings-dialog {
  border-color: rgba(244, 213, 158, 0.27);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(242, 167, 184, 0.045), transparent 36%),
    linear-gradient(315deg, rgba(198, 179, 245, 0.045), transparent 34%),
    rgba(27, 17, 31, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 250, 0.055),
    0 28px 82px rgba(10, 5, 13, 0.5);
}

body.theme-moonlight .topbar {
  padding-top: 26px;
}

body.theme-moonlight .eyebrow {
  color: #f2a7b8;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-shadow: 0 0 20px rgba(242, 167, 184, 0.34);
}

body.theme-moonlight #appTitle {
  color: #fff9fa;
  font-family: "Songti SC", "STSong", "PingFang SC", serif;
  font-weight: 760;
  letter-spacing: 0.035em;
  text-shadow: 0 8px 30px rgba(242, 167, 184, 0.12);
}

body.theme-moonlight .icon-button,
body.theme-moonlight .personal-products-settings,
body.theme-moonlight .celebrity-reset {
  border-color: rgba(244, 213, 158, 0.28);
  border-radius: 13px;
  color: #fff5f8;
  background: rgba(255, 248, 250, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.theme-moonlight .ticker-stage::before {
  inset: 10% 13%;
  border-color: rgba(244, 213, 158, 0.16);
  background:
    repeating-conic-gradient(
      from 12deg,
      rgba(242, 167, 184, 0.13) 0deg 5deg,
      transparent 5deg 16deg,
      rgba(198, 179, 245, 0.11) 16deg 21deg,
      transparent 21deg 38deg
    );
  mask-image: radial-gradient(circle, transparent 0 43%, #000 45% 66%, transparent 68%);
  opacity: 0.76;
  animation: moonlightGardenOrbit 20s linear infinite;
  animation-play-state: running;
}

body.theme-moonlight .live-label {
  border-color: rgba(242, 167, 184, 0.36);
  color: #fff2f6;
  background: rgba(242, 167, 184, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 34px rgba(26, 11, 24, 0.22);
}

body.theme-moonlight .live-dot,
body.theme-moonlight.is-running .live-dot {
  background: #f2a7b8;
  box-shadow: 0 0 15px rgba(242, 167, 184, 0.72);
}

body.theme-moonlight .currency {
  color: #f4d59e;
  text-shadow: 0 0 24px rgba(244, 213, 158, 0.38);
}

body.theme-moonlight .money-ticker,
body.theme-moonlight .money-ticker.stopwatch-ticker {
  color: #fff9fa;
  font-family: "SF Pro Rounded", "SF Pro Display", ui-rounded, "PingFang SC", system-ui, sans-serif;
  font-weight: 780;
  text-shadow:
    0 0 16px rgba(242, 167, 184, 0.42),
    0 0 52px rgba(198, 179, 245, 0.24);
}

body.theme-moonlight .stopwatch-digit.is-fraction {
  color: #f5b7c6;
}

body.theme-moonlight .ticker-live-income-amount,
body.theme-moonlight .ticker-live-income button {
  border-color: rgba(244, 213, 158, 0.3);
  border-radius: 12px;
}

body.theme-moonlight .ticker-live-income button {
  color: #2b1825;
  background: linear-gradient(100deg, #f2a7b8, #f4d59e 52%, #9adfc8);
  box-shadow: 0 10px 26px rgba(242, 167, 184, 0.18);
}

body.theme-moonlight .control-strip .primary-button,
body.theme-moonlight .control-strip .charge-button,
body.theme-moonlight .control-strip .utility-action {
  border: 1px solid rgba(255, 247, 249, 0.14);
  border-radius: 14px;
  color: #2c1826;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 12px 28px rgba(21, 10, 21, 0.22);
}

body.theme-moonlight .control-strip .primary-button {
  background: linear-gradient(105deg, #f2a7b8, #f4d59e);
}

body.theme-moonlight .control-strip .charge-button {
  background: linear-gradient(105deg, #c6b3f5, #f2a7b8 52%, #9adfc8);
}

body.theme-moonlight .control-strip .reset-today-button:not(.is-confirming) {
  color: #3d2231 !important;
  border-color: rgba(244, 213, 158, 0.46) !important;
  background: linear-gradient(105deg, #f0b3c0, #f4d59e) !important;
}

body.theme-moonlight .control-strip .reset-today-button.is-confirming {
  color: #fff7f8 !important;
  border-color: rgba(230, 128, 163, 0.7) !important;
  background: linear-gradient(105deg, #9a496d, #d97598) !important;
}

body.theme-moonlight .daily-goal-panel {
  border-color: rgba(244, 213, 158, 0.33);
  border-radius: 16px;
  background:
    linear-gradient(100deg, rgba(242, 167, 184, 0.095), rgba(198, 179, 245, 0.045) 54%, rgba(244, 213, 158, 0.07)),
    rgba(30, 18, 33, 0.8);
  box-shadow: inset 3px 0 0 #f2a7b8, inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.theme-moonlight .daily-goal-progress-head > span,
body.theme-moonlight .daily-goal-progress-head > span b,
body.theme-moonlight .daily-goal-progress-head strong {
  color: #f9d4dc;
}

body.theme-moonlight .income-goal-meter {
  background: rgba(255, 248, 250, 0.08);
}

body.theme-moonlight .income-goal-meter i,
body.theme-moonlight .personal-product-progress i {
  background: linear-gradient(90deg, #f2a7b8, #c6b3f5 52%, #f4d59e);
  box-shadow: 0 0 16px rgba(242, 167, 184, 0.28);
}

body.theme-moonlight .income-goal-stamp {
  border-color: #e680a3;
  color: #f4a5bc;
  background: rgba(87, 35, 60, 0.28);
}

body.theme-moonlight .workday-countdown-card {
  border-color: rgba(244, 213, 158, 0.2);
  border-radius: 14px;
  background: rgba(255, 248, 250, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

body.theme-moonlight .workday-countdown-card > span i {
  color: #311d2b;
  background: linear-gradient(135deg, #f2a7b8, #f4d59e);
  box-shadow: 0 7px 18px rgba(242, 167, 184, 0.18);
}

body.theme-moonlight .workday-countdown-card strong {
  color: #f6c3cf;
  text-shadow: 0 0 12px rgba(242, 167, 184, 0.25);
}

body.theme-moonlight .workday-countdown-card[data-phase="alerting"] {
  border-color: rgba(230, 128, 163, 0.72) !important;
  box-shadow: 0 0 26px rgba(230, 128, 163, 0.25), inset 0 0 20px rgba(230, 128, 163, 0.08) !important;
}

body.theme-moonlight .personal-products-panel {
  border-color: rgba(242, 167, 184, 0.24);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(242, 167, 184, 0.065), rgba(198, 179, 245, 0.03));
}

body.theme-moonlight .personal-products-title,
body.theme-moonlight .personal-product strong {
  color: #fff2f6;
}

body.theme-moonlight .personal-products-title i {
  background: #f2a7b8;
  box-shadow: 0 0 12px rgba(242, 167, 184, 0.68);
}

body.theme-moonlight .personal-products-head strong,
body.theme-moonlight .personal-product > div:nth-of-type(2) strong {
  color: #f4d59e;
}

body.theme-moonlight .personal-product {
  border-color: rgba(244, 213, 158, 0.15);
  border-radius: 12px;
  background: rgba(17, 10, 20, 0.28);
}

body.theme-moonlight .personal-product-icon {
  border-color: rgba(255, 248, 250, 0.28);
  color: #2d1926;
  background: linear-gradient(135deg, #f2a7b8, #f4d59e);
}

body.theme-moonlight .break-game {
  border-color: rgba(244, 213, 158, 0.22);
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgba(242, 167, 184, 0.045), transparent 46%),
    rgba(22, 14, 27, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.theme-moonlight .break-game-head span,
body.theme-moonlight .mini-game-card small,
body.theme-moonlight .fortune-stage-label small {
  color: #cdbfce;
}

body.theme-moonlight .break-game-head strong,
body.theme-moonlight .fortune-stage-label span,
body.theme-moonlight .mini-game-card h3 {
  color: #fff2f6;
  font-family: "Songti SC", "STSong", "PingFang SC", serif;
  letter-spacing: 0.035em;
}

body.theme-moonlight .break-game-luck {
  border-color: rgba(244, 213, 158, 0.36);
  background:
    radial-gradient(circle at 13% 58%, rgba(244, 213, 158, 0.12), transparent 25%),
    linear-gradient(115deg, rgba(242, 167, 184, 0.08), rgba(198, 179, 245, 0.035));
}

body.theme-moonlight .luck-start-button {
  border-color: rgba(244, 213, 158, 0.46);
  border-radius: 14px;
  color: #321d2a;
  background: linear-gradient(155deg, #f7d9df, #f2a7b8 46%, #f4d59e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56), 0 16px 34px rgba(242, 167, 184, 0.18);
}

body.theme-moonlight .lottery-machine,
body.theme-moonlight .lottery-digits {
  border-color: rgba(244, 213, 158, 0.2);
  border-radius: 13px;
  background: rgba(19, 11, 23, 0.42);
}

body.theme-moonlight .lottery-mode-button {
  border-color: rgba(244, 213, 158, 0.25);
  color: #dccfdc;
  background: rgba(255, 248, 250, 0.045);
}

body.theme-moonlight .lottery-mode-button[aria-pressed="true"] {
  color: #301a28;
  background: linear-gradient(135deg, #f2a7b8, #f4d59e);
  box-shadow: 0 8px 18px rgba(242, 167, 184, 0.2);
}

body.theme-moonlight .lottery-reel {
  border-color: rgba(244, 213, 158, 0.42);
  color: #49283a;
  background: linear-gradient(145deg, #fff9fa, #f6dce3 52%, #f4d59e);
  box-shadow: inset 0 1px 0 white, 0 6px 16px rgba(14, 7, 16, 0.22);
}

body.theme-moonlight .fortune-unified {
  border-color: rgba(242, 167, 184, 0.25) !important;
  border-radius: 15px !important;
  background:
    radial-gradient(circle at 31% 43%, rgba(198, 179, 245, 0.085), transparent 27%),
    rgba(17, 10, 21, 0.34) !important;
}

body.theme-moonlight .fortune-phase-rail span i,
body.theme-moonlight .fortune-energy-core,
body.theme-moonlight .fortune-core-glyph {
  border-color: rgba(244, 213, 158, 0.42);
}

body.theme-moonlight .fortune-energy-core {
  background:
    radial-gradient(circle, rgba(244, 213, 158, 0.3) 0 8%, rgba(242, 167, 184, 0.15) 30%, rgba(198, 179, 245, 0.08) 56%, transparent 72%);
  box-shadow: 0 0 42px rgba(242, 167, 184, 0.16);
}

body.theme-moonlight .fortune-core-glyph {
  color: #452537;
  background: linear-gradient(145deg, #fff6f8, #f2a7b8 52%, #f4d59e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 0 24px rgba(242, 167, 184, 0.3);
}

body.theme-moonlight .fortune-result-panel,
body.theme-moonlight .fortune-result {
  border-color: rgba(244, 213, 158, 0.2);
  border-radius: 13px;
  background: rgba(255, 248, 250, 0.03);
}

body.theme-moonlight .fortune-auspice,
body.theme-moonlight #fortuneDrawnMark,
body.theme-moonlight .fortune-oracle-copy > b {
  color: #f4d59e;
  text-shadow: 0 0 18px rgba(244, 213, 158, 0.24);
}

body.theme-moonlight .fortune-interpret-button {
  border-color: rgba(244, 213, 158, 0.34);
  border-radius: 13px;
  color: #351e2c;
  background: linear-gradient(105deg, #f2a7b8, #f4d59e);
  box-shadow: 0 12px 30px rgba(242, 167, 184, 0.16);
}

body.theme-moonlight .mini-game-card {
  border-color: rgba(244, 213, 158, 0.16);
  border-radius: 14px;
  background: rgba(255, 248, 250, 0.028);
}

body.theme-moonlight .mini-game-start {
  border-radius: 11px;
  color: #321d2a;
  background: linear-gradient(100deg, #c6b3f5, #f2a7b8 54%, #f4d59e);
}

body.theme-moonlight .celebrity-panel {
  border-color: rgba(198, 179, 245, 0.52);
  border-radius: 17px;
  background:
    radial-gradient(circle at 76% 7%, rgba(242, 167, 184, 0.12), transparent 26%),
    linear-gradient(145deg, rgba(198, 179, 245, 0.095), transparent 42%),
    rgba(16, 10, 23, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 22px 60px rgba(9, 5, 13, 0.42);
}

body.theme-moonlight .celebrity-title,
body.theme-moonlight .celebrity-income-label,
body.theme-moonlight .celebrity-purchase-head > span {
  color: #f5d9e0;
}

body.theme-moonlight .celebrity-title > i,
body.theme-moonlight .celebrity-income-label i,
body.theme-moonlight .celebrity-purchase-head i {
  background: #f2a7b8;
  box-shadow: 0 0 14px rgba(242, 167, 184, 0.62);
}

body.theme-moonlight .celebrity-terminal {
  border-color: rgba(198, 179, 245, 0.22);
  border-radius: 14px;
  background: rgba(10, 7, 17, 0.52);
}

body.theme-moonlight .celebrity-money strong {
  color: #fff9fa;
  text-shadow: 0 0 18px rgba(242, 167, 184, 0.46), 0 0 48px rgba(198, 179, 245, 0.22);
}

body.theme-moonlight .celebrity-product {
  border-color: rgba(244, 213, 158, 0.15);
  border-radius: 12px;
  background: rgba(255, 248, 250, 0.025);
}

body.theme-moonlight .income-history-panel.admin-calendar {
  border-color: rgba(244, 213, 158, 0.26);
  background:
    linear-gradient(130deg, rgba(242, 167, 184, 0.055), transparent 42%),
    rgba(27, 17, 31, 0.9);
}

body.theme-moonlight .income-history-kicker {
  color: #f2a7b8;
  letter-spacing: 0.15em;
}

body.theme-moonlight .income-history-panel h2,
body.theme-moonlight .ledger-summary strong,
body.theme-moonlight .ledger-chart-head strong {
  color: #fff2f6;
}

body.theme-moonlight .ledger-summary article,
body.theme-moonlight .ledger-board {
  border-color: rgba(244, 213, 158, 0.15);
  border-radius: 13px;
  background: rgba(255, 248, 250, 0.028);
}

body.theme-moonlight .ledger-settings-button,
body.theme-moonlight .ledger-range-tabs button[aria-selected="true"] {
  border-color: rgba(242, 167, 184, 0.45);
  color: #3c2231;
  background: linear-gradient(105deg, #f2a7b8, #f4d59e);
}

body.theme-moonlight dialog.celebrity-settings-dialog {
  border-color: rgba(244, 213, 158, 0.34);
  color: #fff7f9;
  background:
    linear-gradient(145deg, rgba(242, 167, 184, 0.085), transparent 30%),
    #211527;
}

body.theme-moonlight .celebrity-settings-dialog-head {
  border-bottom-color: rgba(244, 213, 158, 0.16);
  background: rgba(255, 248, 250, 0.025);
}

body.theme-moonlight .celebrity-settings-dialog-head > div > span {
  color: #f2a7b8;
}

body.theme-moonlight .celebrity-settings-close,
body.theme-moonlight .admin-close-button {
  border-color: rgba(244, 213, 158, 0.24);
  border-radius: 11px;
  color: #f9dce3;
  background: rgba(255, 248, 250, 0.055);
}

body.theme-moonlight input,
body.theme-moonlight select,
body.theme-moonlight .app-title-setting,
body.theme-moonlight .daily-income-goal-setting,
body.theme-moonlight .income-calendar-settings,
body.theme-moonlight .workday-countdown-settings,
body.theme-moonlight .auto-click-settings,
body.theme-moonlight .admin-moods {
  border-color: rgba(244, 213, 158, 0.17);
}

body.theme-moonlight input,
body.theme-moonlight select {
  color: #fff5f7;
  background-color: rgba(12, 7, 15, 0.36);
}

body.theme-moonlight .admin-theme-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.theme-moonlight .theme-option {
  min-height: 50px;
  border-color: rgba(244, 213, 158, 0.18);
  border-radius: 12px;
  color: #d7c8d8;
  background: rgba(255, 248, 250, 0.035);
}

body.theme-moonlight .theme-option-moonlight,
.theme-option-moonlight,
.theme-option-cyber {
  display: grid;
  align-content: center;
  gap: 2px;
}

.theme-option-moonlight small,
.theme-option-cyber small {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 750;
}

body.theme-suction .theme-option-cyber.active {
  border-color: rgba(57, 248, 143, 0.68);
  color: #06140f;
  background: linear-gradient(105deg, #39f88f, #55e8d0 58%, #ffd45f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 24px rgba(57, 248, 143, 0.16);
}

body.theme-suction .theme-option-cyber.active small {
  color: rgba(4, 25, 17, 0.7);
}

body.theme-moonlight .theme-option.active {
  border-color: rgba(244, 213, 158, 0.52);
  color: #351f2e;
  background: linear-gradient(105deg, #f2a7b8, #f4d59e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 10px 24px rgba(242, 167, 184, 0.15);
}

body.theme-moonlight .theme-option.active small {
  color: rgba(53, 31, 46, 0.72);
}

body.theme-moonlight .settings-backdrop {
  background: rgba(18, 9, 21, 0.7);
  backdrop-filter: blur(10px);
}

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

@media (max-width: 640px) {
  body.theme-moonlight .hero-panel,
  body.theme-moonlight .income-history-panel {
    border-radius: 16px;
  }

  body.theme-moonlight #appTitle {
    max-width: calc(100vw - 132px);
    font-size: 1.18rem;
    line-height: 1.16;
  }

  body.theme-moonlight .ticker-stage::before {
    inset: 8% 8%;
  }

  body.theme-moonlight .money-ticker {
    font-size: clamp(3.5rem, 18vw, 5.25rem);
  }

  body.theme-moonlight .control-strip .primary-button,
  body.theme-moonlight .control-strip .charge-button,
  body.theme-moonlight .control-strip .utility-action {
    border-radius: 12px;
  }

  body.theme-moonlight .daily-goal-panel,
  body.theme-moonlight .personal-products-panel,
  body.theme-moonlight .break-game,
  body.theme-moonlight .celebrity-panel {
    border-radius: 14px;
  }

  body.theme-moonlight .fortune-energy-core {
    box-shadow: 0 0 28px rgba(242, 167, 184, 0.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-moonlight .ticker-stage::before {
    animation: none;
  }
}

/* FINAL interaction authority: centered lottery values, stable dialogs and timed fortune reset. */
body.ledger-settings-open {
  overflow: hidden;
}

.income-history-head .ledger-settings-button {
  display: inline-grid;
  min-width: 58px;
  height: 32px;
  padding: 0 13px;
  place-items: center;
  border: 1px solid rgba(82, 242, 168, 0.42);
  border-radius: 9px;
  color: #dcfff0;
  background: rgba(57, 248, 143, 0.1);
  box-shadow: inset 0 1px 0 rgba(231, 255, 244, 0.08);
  font-size: 0.66rem;
  font-weight: 950;
}

.income-history-head .ledger-settings-button:hover,
.income-history-head .ledger-settings-button:focus-visible,
.income-history-head .ledger-settings-button[aria-expanded="true"] {
  border-color: rgba(255, 215, 106, 0.78);
  color: #211508;
  background: linear-gradient(135deg, #fff0a1, #64f2ad);
  box-shadow: 0 0 18px rgba(57, 248, 143, 0.18);
}

dialog.ledger-settings-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(84dvh, 760px);
  border-color: rgba(255, 215, 106, 0.5);
}

.ledger-settings-dialog-body {
  gap: 12px;
}

.ledger-settings-status {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 215, 106, 0.22);
  border-radius: 999px;
  color: rgba(237, 250, 242, 0.72);
  background: rgba(255, 215, 106, 0.07);
  font-size: 0.58rem;
  font-weight: 850;
}

dialog.ledger-settings-dialog .ledger-days {
  max-height: none;
  padding-right: 2px;
  overflow: visible;
}

dialog.app-settings-dialog[open] {
  scale: 1 !important;
  transform: none !important;
  animation: appSettingsStableIn 180ms ease both !important;
}

@keyframes appSettingsStableIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.workday-countdown-card[data-phase="alerting"] {
  cursor: pointer;
  touch-action: manipulation;
}

.workday-countdown-card[data-phase="alerting"]:focus-visible {
  outline: 2px solid rgba(255, 244, 157, 0.9);
  outline-offset: 3px;
}

.lottery-digits {
  align-items: center;
  justify-content: center;
}

.lottery-reel {
  display: grid !important;
  place-items: center !important;
}

.lottery-reel-static {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  place-items: center !important;
  line-height: 1 !important;
  text-align: center !important;
}

.lottery-digits[data-mode="powerball"],
.lottery-digits[data-mode="mega"] {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

.lottery-digits[data-mode="powerball"] .lottery-reel,
.lottery-digits[data-mode="mega"] .lottery-reel {
  width: min(100%, var(--lottery-reel-height)) !important;
  height: auto !important;
  aspect-ratio: 1;
}

.fortune-unified.has-result:not(.is-charging) .fortune-energy-value {
  visibility: hidden;
  opacity: 0;
}

.fortune-unified.is-charging .fortune-energy-value {
  visibility: visible;
  opacity: 1;
}

.fortune-unified.is-disintegrating .fortune-outcome,
.fortune-result.is-disintegrating {
  pointer-events: none;
  animation: fortuneReadingDissolve 1150ms cubic-bezier(0.44, 0, 0.78, 0.36) both !important;
}

.fortune-result.is-disintegrating .fortune-oracle-copy,
.fortune-unified.is-disintegrating .fortune-auspice,
.fortune-unified.is-disintegrating .fortune-lingqian-slip > p {
  animation: fortuneReadingInkFade 900ms ease-in both !important;
}

@keyframes fortuneReadingDissolve {
  0% {
    opacity: 1;
    filter: grayscale(0) blur(0);
    clip-path: inset(0 0 0 0);
    transform: translate3d(0, 0, 0) scale(1);
  }
  46% {
    opacity: 0.68;
    filter: grayscale(0.72) blur(1.2px);
    clip-path: inset(0 0 18% 0);
    transform: translate3d(3px, -3px, 0) scale(0.985);
  }
  100% {
    opacity: 0;
    filter: grayscale(1) blur(7px);
    clip-path: inset(0 0 96% 0);
    transform: translate3d(14px, -13px, 0) scale(0.94);
  }
}

@keyframes fortuneReadingInkFade {
  0%, 18% { opacity: 1; letter-spacing: inherit; filter: blur(0); }
  100% { opacity: 0; letter-spacing: 0.2em; filter: blur(5px); }
}

@media (max-width: 640px) {
  .income-history-head .ledger-settings-button {
    min-width: 54px;
    height: 30px;
    padding-inline: 11px;
  }

  dialog.ledger-settings-dialog {
    width: calc(100vw - 20px);
    max-height: 88dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.app-settings-dialog[open],
  .fortune-unified.is-disintegrating .fortune-outcome,
  .fortune-result.is-disintegrating,
  .fortune-result.is-disintegrating .fortune-oracle-copy,
  .fortune-unified.is-disintegrating .fortune-auspice,
  .fortune-unified.is-disintegrating .fortune-lingqian-slip > p {
    animation-duration: 1ms !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workday-countdown-card[data-phase="alerting"],
  .workday-countdown-card[data-phase="alerting"]::before,
  .workday-countdown-card[data-phase="alerting"]::after,
  .workday-countdown-card[data-phase="alerting"] .timer-reminder-readout > strong,
  .workday-countdown-card[data-phase="alerting"] .timer-reminder-readout > button {
    animation-duration: 1500ms !important;
  }
}

/* FINAL fortune feedback v3: one larger result region, faster reveal, graded good-sign reward. */
.fortune-unified .fortune-energy-ritual {
  grid-template-columns: minmax(62px, 0.5fr) minmax(146px, 0.95fr) minmax(176px, 1.35fr) !important;
  gap: 10px;
}

.fortune-unified .fortune-result-panel {
  align-content: stretch;
  min-height: 194px;
  padding: 8px !important;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 106, 0.2) !important;
  border-radius: 16px;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 213, 97, 0.09), transparent 36%),
    linear-gradient(145deg, rgba(10, 38, 29, 0.76), rgba(3, 15, 13, 0.9)) !important;
  box-shadow: inset 0 1px 0 rgba(219, 255, 234, 0.05) !important;
}

.fortune-unified .fortune-result-panel .fortune-outcome {
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "head head"
    "auspice mark"
    "meter meter"
    "hint hint" !important;
  grid-template-rows: auto minmax(74px, 1fr) auto auto !important;
  align-items: center;
  align-content: stretch;
  gap: 6px 9px !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 11px 12px 10px !important;
  overflow: visible;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(145deg, rgba(255, 215, 106, 0.035), rgba(73, 255, 168, 0.025)) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  clip-path: none !important;
  transform: none !important;
  visibility: visible !important;
}

.fortune-outcome-head {
  grid-area: head;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 215, 106, 0.13);
}

.fortune-outcome-head > small {
  color: rgba(236, 251, 242, 0.68) !important;
  font-size: 0.66rem !important;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.fortune-outcome-head .fortune-energy-value {
  flex: 0 0 auto;
  gap: 1px;
}

.fortune-outcome-head .fortune-energy-value strong {
  color: var(--ritual-gold);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1;
}

.fortune-outcome-head .fortune-energy-value span {
  color: rgba(255, 223, 125, 0.68);
  font-size: 0.55rem;
}

.fortune-unified .fortune-result-panel .fortune-auspice {
  grid-area: auspice !important;
  align-self: center;
  color: var(--ritual-gold) !important;
  font-family: "STKaiti", "KaiTi", "FangSong", serif;
  font-size: clamp(1.8rem, 4.8vw, 2.55rem) !important;
  font-weight: 1000;
  line-height: 1 !important;
  letter-spacing: 0.08em !important;
  text-shadow: 0 0 22px rgba(255, 211, 87, 0.3);
}

.fortune-unified .fortune-result-panel #fortuneDrawnMark {
  grid-area: mark !important;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid rgba(255, 211, 101, 0.55);
  border-radius: 50%;
  color: rgba(255, 220, 120, 0.82) !important;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 0.88rem !important;
  line-height: 1;
  transform: rotate(-7deg);
}

.fortune-result-panel .fortune-energy-meter {
  grid-area: meter;
  width: 100%;
  height: 6px;
  margin: 0;
}

.fortune-unified .fortune-result-panel .fortune-outcome > p {
  grid-area: hint;
  margin: 0;
  color: rgba(219, 244, 229, 0.45);
  font-size: 0.54rem;
  line-height: 1.35;
}

.fortune-unified.is-charging .fortune-result-panel .fortune-outcome,
.fortune-unified.is-drawing .fortune-result-panel .fortune-outcome,
.fortune-unified.is-opening .fortune-result-panel .fortune-outcome {
  animation: none !important;
  opacity: 1 !important;
  clip-path: none !important;
  transform: none !important;
}

.fortune-unified.is-charging .fortune-result-panel .fortune-auspice,
.fortune-unified.is-charging .fortune-result-panel #fortuneDrawnMark {
  opacity: 0.28 !important;
}

.fortune-unified.is-drawing .fortune-result-panel .fortune-auspice,
.fortune-unified.is-drawing .fortune-result-panel #fortuneDrawnMark,
.fortune-unified.is-opening .fortune-result-panel .fortune-auspice,
.fortune-unified.is-opening .fortune-result-panel #fortuneDrawnMark {
  opacity: 0 !important;
  transform: scale(0.82) rotate(-7deg) !important;
}

.fortune-unified.is-opening .fortune-core-wrap .fortune-core-glyph {
  animation-duration: 430ms !important;
}

.fortune-unified.is-revealed .fortune-result-panel .fortune-auspice {
  animation: fortuneSealLanding 620ms cubic-bezier(0.16, 0.9, 0.2, 1.2) both !important;
}

.fortune-unified.is-revealed .fortune-result-panel #fortuneDrawnMark {
  animation: fortuneResultMark 560ms 70ms cubic-bezier(0.16, 0.9, 0.2, 1.18) both !important;
}

.fortune-unified.fortune-good-hit.fortune-good-small .fortune-result-panel {
  animation: fortuneResultGlowSmall 1500ms ease-out both !important;
}

.fortune-unified.fortune-good-hit.fortune-good-medium .fortune-result-panel {
  animation: fortuneResultGlowMedium 1900ms ease-out both !important;
}

.fortune-unified.fortune-good-hit.fortune-good-major .fortune-result-panel {
  animation: fortuneResultGlowMajor 2400ms ease-out both !important;
}

@keyframes fortuneResultMark {
  0% { opacity: 0; transform: scale(1.7) rotate(-18deg); }
  54% { opacity: 1; transform: scale(0.88) rotate(-4deg); }
  76% { transform: scale(1.08) rotate(-9deg); }
  100% { opacity: 1; transform: scale(1) rotate(-7deg); }
}

@keyframes fortuneResultGlowSmall {
  0% { border-color: rgba(255, 215, 106, 0.2); box-shadow: inset 0 1px 0 rgba(219, 255, 234, 0.05); }
  22% { border-color: rgba(255, 221, 122, 0.78); box-shadow: inset 0 0 26px rgba(255, 209, 81, 0.12), 0 0 24px rgba(255, 209, 81, 0.24); }
  100% { border-color: rgba(255, 215, 106, 0.2); box-shadow: inset 0 1px 0 rgba(219, 255, 234, 0.05); }
}

@keyframes fortuneResultGlowMedium {
  0% { border-color: rgba(255, 215, 106, 0.2); box-shadow: inset 0 1px 0 rgba(219, 255, 234, 0.05); transform: scale(0.98); }
  17% { border-color: rgba(255, 228, 136, 0.92); box-shadow: inset 0 0 36px rgba(255, 209, 81, 0.18), 0 0 38px rgba(255, 209, 81, 0.34); transform: scale(1.018); }
  42% { border-color: rgba(91, 255, 174, 0.7); box-shadow: inset 0 0 28px rgba(91, 255, 174, 0.13), 0 0 24px rgba(91, 255, 174, 0.22); transform: scale(0.997); }
  100% { border-color: rgba(255, 215, 106, 0.2); box-shadow: inset 0 1px 0 rgba(219, 255, 234, 0.05); transform: scale(1); }
}

@keyframes fortuneResultGlowMajor {
  0% { border-color: rgba(255, 215, 106, 0.2); box-shadow: inset 0 1px 0 rgba(219, 255, 234, 0.05); transform: scale(0.96); }
  12% { border-color: #fff1a4; box-shadow: inset 0 0 48px rgba(255, 215, 95, 0.24), 0 0 56px rgba(255, 215, 95, 0.52); transform: scale(1.035); }
  28% { border-color: rgba(102, 238, 255, 0.86); box-shadow: inset 0 0 42px rgba(102, 238, 255, 0.18), 0 0 42px rgba(102, 238, 255, 0.32); transform: scale(0.99); }
  48% { border-color: rgba(104, 255, 177, 0.84); box-shadow: inset 0 0 36px rgba(104, 255, 177, 0.17), 0 0 34px rgba(104, 255, 177, 0.27); transform: scale(1.012); }
  100% { border-color: rgba(255, 215, 106, 0.2); box-shadow: inset 0 1px 0 rgba(219, 255, 234, 0.05); transform: scale(1); }
}

@media (max-width: 640px) {
  .fortune-unified .fortune-energy-ritual {
    grid-template-columns: 32px minmax(122px, 0.82fr) minmax(148px, 1.18fr) !important;
    gap: 6px;
    min-height: 198px;
  }

  .fortune-unified .fortune-phase-rail {
    justify-items: center;
    padding-left: 0;
  }

  .fortune-unified .fortune-phase-rail::before {
    margin-left: 0;
  }

  .fortune-unified .fortune-phase-rail span {
    display: block;
    transform: none;
  }

  .fortune-unified .fortune-phase-rail span b {
    display: none;
  }

  .fortune-unified .fortune-core-wrap .fortune-energy-core:not(.fortune-sign-button) {
    width: min(34vw, 136px) !important;
    height: min(34vw, 136px) !important;
    min-width: 122px;
    min-height: 122px;
  }

  .fortune-unified .fortune-core-glyph {
    width: 56px;
    height: 56px;
    font-size: 1.95rem;
  }

  .fortune-unified .fortune-result-panel {
    min-height: 184px;
    padding: 5px !important;
    border-radius: 13px;
  }

  .fortune-unified .fortune-result-panel .fortune-outcome {
    grid-template-columns: minmax(0, 1fr) 29px !important;
    grid-template-rows: auto minmax(66px, 1fr) auto auto !important;
    gap: 5px 6px !important;
    padding: 9px 8px 8px !important;
  }

  .fortune-outcome-head {
    padding-bottom: 6px;
  }

  .fortune-outcome-head > small {
    font-size: 0.6rem !important;
  }

  .fortune-outcome-head .fortune-energy-value strong {
    font-size: 0.8rem;
  }

  .fortune-unified .fortune-result-panel .fortune-auspice {
    font-size: clamp(1.55rem, 7vw, 2rem) !important;
    letter-spacing: 0.04em !important;
  }

  .fortune-unified .fortune-result-panel #fortuneDrawnMark {
    display: grid !important;
    width: 29px;
    height: 29px;
    font-size: 0.76rem !important;
  }

  .fortune-unified .fortune-result-panel .fortune-outcome > p {
    display: block;
    font-size: 0.48rem;
  }
}

@media (max-width: 360px) {
  .fortune-unified .fortune-energy-ritual {
    grid-template-columns: 28px minmax(108px, 0.78fr) minmax(132px, 1.22fr) !important;
    gap: 4px;
  }

  .fortune-unified .fortune-core-wrap .fortune-energy-core:not(.fortune-sign-button) {
    width: 114px !important;
    height: 114px !important;
    min-width: 114px;
    min-height: 114px;
  }

  .fortune-unified .fortune-result-panel .fortune-outcome {
    padding-inline: 6px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fortune-unified.is-revealed .fortune-result-panel .fortune-auspice,
  .fortune-unified.is-revealed .fortune-result-panel #fortuneDrawnMark,
  .fortune-unified.fortune-good-hit .fortune-result-panel {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Absolute fortune stability: no idle/result flashes from legacy aura layers. */
.fortune-unified:not(.is-charging) .fortune-energy-core,
.fortune-unified:not(.is-charging) .fortune-core-orbit,
.fortune-unified:not(.is-charging) .fortune-core-halo,
.fortune-unified:not(.is-charging) .fortune-energy-core > img,
.fortune-unified:not(.is-charging) .fortune-energy-panel,
.fortune-unified:not(.is-charging) .fortune-outcome,
.fortune-unified:not(.is-charging) .fortune-result,
.fortune-unified:not(.is-charging) .fortune-result::before,
.fortune-unified:not(.is-charging) .fortune-result::after,
.fortune-unified:not(.is-charging) .fortune-interpret-button::before,
.fortune-unified:not(.is-charging) .fortune-interpret-button::after {
  animation: none !important;
  filter: none !important;
}

.fortune-unified.is-revealed .fortune-energy-core,
.fortune-unified.is-revealed .fortune-outcome {
  animation: none !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

.fortune-unified:not(.is-interpreting) .fortune-interpret-transition,
.fortune-unified:not(.is-interpreting) .fortune-interpret-transition *,
.fortune-unified:not(.is-interpreting) .fortune-interpret-transition::before,
.fortune-unified:not(.is-interpreting) .fortune-interpret-transition::after {
  animation: none !important;
}

.fortune-unified:not(.is-charging):not(.is-interpreting):not(.is-reading) *,
.fortune-unified:not(.is-charging):not(.is-interpreting):not(.is-reading) *::before,
.fortune-unified:not(.is-charging):not(.is-interpreting):not(.is-reading) *::after {
  animation-play-state: paused !important;
}

/* High-player million-billion scale: compact enough to keep every digit visible. */
.celebrity-panel {
  container-type: inline-size;
}

.celebrity-income-core {
  min-height: 188px !important;
  padding-block: 18px !important;
}

.celebrity-terminal .celebrity-income-core .celebrity-money {
  width: 100%;
  min-width: 0;
  justify-content: center;
  gap: 3px;
}

.celebrity-terminal .celebrity-income-core .celebrity-money > span {
  flex: 0 0 auto;
  font-size: clamp(1.55rem, 6.5cqw, 2.4rem) !important;
}

.celebrity-terminal .celebrity-income-core .celebrity-money > strong {
  flex: 0 1 auto;
  width: max-content;
  min-width: 0;
  max-width: calc(100% - 32px);
  overflow: visible !important;
  font-size: clamp(1.35rem, var(--celebrity-number-fluid, 20cqw), var(--celebrity-number-max, 5.1rem)) !important;
  line-height: 0.9 !important;
  letter-spacing: -0.05em !important;
  font-variant-numeric: tabular-nums;
  text-overflow: clip !important;
}

.celebrity-income-rings {
  width: 220px !important;
  height: 124px !important;
}

.celebrity-panel.has-no-products > .celebrity-purchase-head,
.celebrity-panel.has-no-products > .celebrity-products {
  display: none !important;
}

.celebrity-panel.has-no-products .celebrity-product-settings[hidden] {
  margin: 0;
}

@media (max-width: 640px) {
  .celebrity-income-core { min-height: 172px !important; }
  .celebrity-terminal .celebrity-income-core .celebrity-money > strong {
    font-size: clamp(1.3rem, var(--celebrity-number-fluid, 20cqw), var(--celebrity-number-max, 4.9rem)) !important;
  }
}

/* Reset action: restrained warning at rest, explicit danger only during confirmation. */
.control-strip .reset-today-button {
  display: inline-grid;
  min-width: 104px;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 1px solid rgba(255, 196, 91, 0.52);
  color: #ffe5a3;
  background:
    linear-gradient(145deg, rgba(255, 208, 92, 0.12), rgba(255, 120, 72, 0.055)),
    rgba(12, 21, 18, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 190, 0.09),
    0 7px 18px rgba(62, 34, 7, 0.16);
  line-height: 1;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 140ms ease;
}

.reset-today-button span {
  font-size: 0.72rem;
  font-weight: 950;
}

.reset-today-button small {
  color: rgba(255, 232, 176, 0.54);
  font-size: 0.46rem;
  font-weight: 800;
}

.control-strip .reset-today-button:hover,
.control-strip .reset-today-button:focus-visible {
  border-color: rgba(255, 214, 118, 0.82);
  color: #fff0bd;
  background:
    linear-gradient(145deg, rgba(255, 211, 104, 0.18), rgba(255, 112, 77, 0.09)),
    rgba(14, 24, 20, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 248, 208, 0.13), 0 0 18px rgba(255, 185, 74, 0.14);
}

.control-strip .reset-today-button.is-confirming {
  border-color: rgba(255, 112, 112, 0.88);
  color: #fff4ec;
  background: linear-gradient(135deg, rgba(255, 72, 92, 0.72), rgba(164, 36, 52, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 225, 218, 0.22), 0 0 0 2px rgba(255, 89, 105, 0.12), 0 8px 22px rgba(91, 16, 28, 0.28);
}

/* Income calendar, holiday controls, and complete countdown-card content. */
.daily-income-goal-setting {
  grid-template-columns: 82px minmax(0, 1fr);
}

.daily-income-goal-setting > small {
  grid-column: 1 / -1;
  text-align: left;
}

.daily-income-goal-setting > div {
  overflow: hidden;
}

.daily-income-goal-setting input:disabled {
  color: rgba(232, 244, 237, 0.46);
  cursor: not-allowed;
}

.income-goal-auto-button {
  flex: 0 0 auto;
  margin-right: 4px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 218, 104, 0.28);
  border-radius: 6px;
  color: #ffe994;
  background: rgba(255, 214, 86, 0.08);
  font-size: 0.5rem;
  font-weight: 900;
}

.income-calendar-settings {
  display: grid;
  gap: 7px;
  margin: -5px 0 14px;
  padding: 10px;
  border: 1px solid rgba(255, 212, 95, 0.18);
  border-radius: 8px;
  background: rgba(255, 212, 95, 0.035);
}

.income-proration-setting,
.custom-holiday-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(116px, auto);
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.16);
}

.income-proration-setting > span,
.custom-holiday-form > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.income-proration-setting b,
.custom-holiday-form b {
  color: #f4fff8;
  font-size: 0.66rem;
}

.income-proration-setting small,
.custom-holiday-form small {
  color: rgba(218, 238, 226, 0.52);
  font-size: 0.5rem;
  line-height: 1.35;
}

.income-proration-setting select,
.custom-holiday-form input {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid rgba(255, 222, 109, 0.2);
  border-radius: 6px;
  color: #ffe991;
  background: rgba(2, 11, 9, 0.8);
  font-size: 0.58rem;
  font-weight: 850;
  color-scheme: dark;
}

.custom-holiday-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
}

.custom-holiday-form button,
.custom-holiday-list button {
  border: 1px solid rgba(255, 214, 91, 0.24);
  border-radius: 6px;
  color: #ffeb9a;
  background: rgba(255, 203, 68, 0.08);
  font-size: 0.5rem;
  font-weight: 900;
}

.custom-holiday-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.custom-holiday-list > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 8px;
  border: 1px solid rgba(255, 212, 95, 0.15);
  border-radius: 999px;
  color: rgba(242, 251, 246, 0.76);
  background: rgba(255, 212, 95, 0.045);
  font-size: 0.52rem;
}

.custom-holiday-list > small {
  color: rgba(220, 237, 227, 0.46);
  font-size: 0.5rem;
}

.work-time-display-setting {
  margin-top: 8px;
}

.work-time-display-setting + .sedentary-reminder-setting {
  margin-top: 0;
}

.control-strip .work-toggle-button.is-holiday:disabled {
  border-color: rgba(255, 213, 104, 0.32);
  color: #ffe89b;
  background: linear-gradient(145deg, rgba(255, 209, 96, 0.12), rgba(71, 52, 18, 0.28));
  cursor: not-allowed;
  filter: none;
  opacity: 0.82;
}

.income-start-button:disabled {
  color: rgba(255, 231, 153, 0.7);
  cursor: not-allowed;
  opacity: 0.72;
}

.daily-goal-panel.is-holiday {
  border-color: rgba(255, 215, 105, 0.25);
  background: linear-gradient(110deg, rgba(74, 51, 12, 0.16), rgba(5, 16, 13, 0.88));
}

.daily-goal-panel.is-holiday .daily-goal-progress-head strong,
.daily-goal-panel.is-holiday .daily-goal-progress-head > span b {
  color: #ffe28a;
}

.workday-countdowns {
  grid-template-columns: repeat(var(--countdown-columns, 3), minmax(0, 1fr));
}

.workday-countdown-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  min-height: 72px;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 8px 6px;
}

.workday-countdown-card > span {
  width: 100%;
  max-width: none;
  justify-content: center;
}

.workday-countdown-card > span b {
  overflow: visible;
  max-width: none;
  color: rgba(241, 250, 245, 0.9);
  font-size: clamp(0.52rem, 1.9vw, 0.65rem);
  line-height: 1.2;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
}

.workday-countdown-card > strong,
.workday-countdown-card[data-phase="arrived"] > strong {
  overflow: visible;
  width: 100%;
  margin-left: 0;
  font-size: clamp(0.72rem, 2.7vw, 1rem);
  line-height: 1.1;
  text-align: center;
  text-overflow: clip;
}

@media (max-width: 640px) {
  .income-proration-setting,
  .custom-holiday-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .workday-countdown-card {
    min-height: 76px;
    gap: 5px;
    padding: 8px 3px;
  }

  .workday-countdown-card > span {
    gap: 3px;
  }

  .workday-countdown-card > span i {
    width: 18px;
    height: 18px;
  }

  .workday-countdown-card > span b {
    font-size: clamp(0.47rem, 2.75vw, 0.58rem);
  }

  .workday-countdown-card > strong,
  .workday-countdown-card[data-phase="arrived"] > strong {
    font-size: clamp(0.67rem, 3.45vw, 0.84rem);
  }
}

.reset-today-button.is-confirming small {
  color: rgba(255, 245, 235, 0.78);
}

.control-strip .reset-today-button:active {
  transform: scale(0.97);
}

/* Fortune stability: keep one compositing path and avoid filter swaps while charging. */
.fortune-energy-core::before {
  filter: none !important;
}

.fortune-energy-core::after,
.fortune-core-orbit,
.fortune-core-halo,
.fortune-energy-core > img {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition: none !important;
}

.fortune-unified:not(.is-charging) .fortune-energy-core > img,
.fortune-unified.is-charging .fortune-energy-core > img {
  filter: drop-shadow(0 0 10px rgba(255, 210, 83, 0.54)) !important;
}

.fortune-unified.is-charging .fortune-energy-core > img {
  animation: fortuneTokenChargeStable 900ms ease-in-out infinite alternate !important;
  will-change: transform;
}

.fortune-unified.is-charging .fortune-core-halo {
  animation: fortuneCorePulseStable 900ms ease-in-out infinite alternate !important;
  will-change: transform, opacity;
}

@keyframes fortuneTokenChargeStable {
  from { transform: translate3d(0, -4%, 0) scale(1); }
  to { transform: translate3d(0, -8%, 0) scale(1.045); }
}

@keyframes fortuneCorePulseStable {
  from { transform: translateZ(0) scale(0.99); opacity: 0.72; }
  to { transform: translateZ(0) scale(1.05); opacity: 1; }
}

@media (max-width: 640px) {
  .control-strip .reset-today-button {
    min-width: 0;
    padding-inline: 3px;
  }

  .reset-today-button span { font-size: 0.68rem; }
  .reset-today-button small { font-size: 0.43rem; }
}

/* Fortune stability pass: keep celebration particles, remove panel-wide light flicker. */
.fortune-good-small,
.fortune-good-medium,
.fortune-good-major {
  animation: none !important;
  filter: none !important;
  transform: none !important;
}

.fortune-good-major::after {
  display: none !important;
  content: none !important;
}

.fortune-unified.is-revealed .fortune-energy-core {
  animation: fortuneCoreSettle 520ms cubic-bezier(.18,.86,.24,1.2) both !important;
  filter: none !important;
}

.fortune-unified.is-revealed .fortune-outcome {
  animation: fortuneOutcomeSettle 560ms cubic-bezier(.18,.86,.24,1.16) both !important;
  filter: none !important;
}

.fortune-interpret-transition.show {
  animation: fortuneInterpretVeilStable 1s cubic-bezier(.2,.72,.26,1) both !important;
}

.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-choosing):not(.is-revealed):not(.is-interpreting):not(.is-reading),
.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-choosing):not(.is-revealed):not(.is-interpreting):not(.is-reading) .fortune-energy-panel,
.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-choosing):not(.is-revealed):not(.is-interpreting):not(.is-reading) .fortune-outcome {
  filter: none !important;
}

@keyframes fortuneCoreSettle {
  0% { transform: scale(0.94); }
  58% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

@keyframes fortuneOutcomeSettle {
  0% { transform: translateY(7px) scale(0.97); }
  65% { transform: translateY(-1px) scale(1.01); }
  100% { transform: none; }
}

@keyframes fortuneInterpretVeilStable {
  0% { opacity: 0; transform: scale(0.985); }
  18%, 78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.012); }
}

/* Breathing v2: continuous two-phase rhythm with clear color transitions. */
.breathing-preview-orbit { animation-duration: 10s; }

.breathing-stage {
  --breath-primary: #69e8ff;
  --breath-secondary: #68ffc2;
  --breath-deep: #0a786e;
  isolation: isolate;
  transition: color 650ms ease, box-shadow 650ms ease;
}

.breathing-stage::before,
.breathing-stage::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0;
  transition: opacity 720ms ease;
  pointer-events: none;
}

.breathing-stage::before {
  background:
    radial-gradient(circle at 50% 48%, rgba(83, 224, 255, 0.27), transparent 28%),
    radial-gradient(circle at 24% 20%, rgba(86, 255, 199, 0.14), transparent 32%),
    linear-gradient(160deg, rgba(4, 39, 48, 0.76), rgba(2, 15, 20, 0.32));
}

.breathing-stage::after {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 202, 105, 0.22), transparent 30%),
    radial-gradient(circle at 78% 26%, rgba(196, 119, 255, 0.13), transparent 34%),
    linear-gradient(160deg, rgba(44, 22, 50, 0.62), rgba(20, 13, 25, 0.28));
}

.breathing-stage.phase-inhale {
  --breath-primary: #69e8ff;
  --breath-secondary: #68ffc2;
  --breath-deep: #087c76;
}
.breathing-stage.phase-exhale {
  --breath-primary: #ffd27a;
  --breath-secondary: #d7a0ff;
  --breath-deep: #744483;
}
.breathing-stage.phase-inhale::before { opacity: 1; }
.breathing-stage.phase-exhale::after { opacity: 1; }

.breathing-copy strong {
  color: var(--breath-primary);
  text-shadow: 0 0 20px color-mix(in srgb, var(--breath-primary) 38%, transparent);
  transition: color 620ms ease, text-shadow 620ms ease;
}

.breathing-control {
  transition: filter 620ms ease;
}

.breathing-ring {
  border-color: color-mix(in srgb, var(--breath-primary) 48%, transparent);
  box-shadow:
    0 0 42px color-mix(in srgb, var(--breath-primary) 17%, transparent),
    inset 0 0 30px color-mix(in srgb, var(--breath-secondary) 10%, transparent);
  transition: border-color 620ms ease, box-shadow 620ms ease;
}

.breathing-core {
  border-color: color-mix(in srgb, var(--breath-primary) 76%, white 12%);
  background:
    radial-gradient(circle at 40% 32%, color-mix(in srgb, var(--breath-primary) 46%, white 8%), color-mix(in srgb, var(--breath-secondary) 26%, transparent) 42%, color-mix(in srgb, var(--breath-deep) 88%, #061815));
  box-shadow:
    0 0 56px color-mix(in srgb, var(--breath-primary) 28%, transparent),
    inset 0 0 32px color-mix(in srgb, var(--breath-secondary) 20%, transparent);
  transition: border-color 620ms ease, background 620ms ease, box-shadow 620ms ease;
}

.breathing-core b { min-width: 4.5em; text-align: center; }
.breathing-progress i { background: linear-gradient(90deg, #62e9ff, #63ffc0 42%, #ffd47c 70%, #c993ff); }
.breathing-stage > p { color: color-mix(in srgb, var(--breath-primary) 72%, white 20%); font-weight: 850; transition: color 620ms ease; }
.breathing-stage.phase-inhale .breathing-control { animation: breathingIn 4s cubic-bezier(.35,.08,.25,1) forwards; }
.breathing-stage.phase-exhale .breathing-control { animation: breathingOut 6s cubic-bezier(.42,0,.22,1) forwards; }
.breathing-stage.phase-inhale .breathing-ring-two { animation: breathingOrbit 8s linear infinite; }
.breathing-stage.phase-exhale .breathing-ring-two { animation: breathingOrbit 12s linear reverse infinite; }

.breathing-stage.is-phase-shift .breathing-ring-one::after {
  position: absolute;
  inset: -2px;
  border: 2px solid var(--breath-primary);
  border-radius: 50%;
  content: "";
  animation: breathingPhaseWave 760ms ease-out both;
  box-shadow: 0 0 24px color-mix(in srgb, var(--breath-primary) 45%, transparent);
}

@keyframes breathingPhaseWave {
  0% { opacity: 0.9; transform: scale(0.72); }
  100% { opacity: 0; transform: scale(1.42); }
}

/* Worry crusher v3: richer critical hit, combo and full-screen payoff. */
.worry-crusher-stage {
  background:
    radial-gradient(circle at 50% 42%, rgba(60, 255, 163, 0.13), transparent 40%),
    radial-gradient(circle at 84% 18%, rgba(255, 196, 69, 0.07), transparent 24%),
    linear-gradient(rgba(69, 255, 169, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 255, 169, 0.045) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px, 28px 28px;
}

.worry-impact em:nth-of-type(2) {
  inset: -54px;
  border-width: 2px;
  border-style: dashed;
  animation-delay: 70ms;
  animation-duration: 720ms;
}

.worry-impact > strong {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: 25px;
  min-width: max-content;
  color: #fff2a1;
  font: 1000 0.6rem ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.08em;
  transform: translateX(-50%);
  text-shadow: 0 0 13px #ffb72f;
  animation: worryImpactCritical 720ms cubic-bezier(.12,.86,.2,1.2) both;
}

.worry-impact > i {
  width: 9px;
  height: 9px;
  background: var(--impact-hue, currentColor);
  box-shadow: 0 0 12px var(--impact-hue, currentColor);
}

.worry-impact.is-combo { color: #65ffc0; }
.worry-impact.is-mega { color: #ffe26f; }
.worry-impact.is-mega em { border-width: 7px; animation-duration: 900ms; }
.worry-impact.is-mega b { font-size: 2rem; }
.worry-impact.is-mega > strong { color: #fff7c5; font-size: 0.86rem; }

.worry-screen-blast {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(255, 225, 103, 0.34), rgba(70, 255, 177, 0.12) 28%, transparent 64%);
  animation: worryScreenBlast 980ms ease-out both;
  pointer-events: none;
}

.worry-screen-blast > span {
  position: relative;
  z-index: 3;
  padding: 10px 16px;
  border: 1px solid rgba(255, 242, 177, 0.72);
  border-radius: 12px;
  color: #fff5bc;
  background: rgba(4, 25, 18, 0.72);
  font-size: clamp(1.15rem, 7vw, 3rem);
  font-weight: 1000;
  letter-spacing: 0.13em;
  text-shadow: 0 0 24px #ffc942, 0 4px 0 rgba(55, 22, 0, 0.52);
  box-shadow: 0 0 70px rgba(255, 203, 55, 0.25);
  animation: worryScreenTitle 900ms cubic-bezier(.12,.9,.18,1.25) both;
}

.worry-screen-blast > em {
  position: absolute;
  width: min(48vw, 320px);
  height: min(48vw, 320px);
  border: 5px solid #ffe676;
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(255, 219, 82, 0.6), inset 0 0 34px rgba(82, 255, 177, 0.34);
  animation: worryScreenRing 820ms ease-out both;
}

.worry-screen-blast > i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: min(38vh, 240px);
  border-radius: 999px;
  background: linear-gradient(#fff7b7, #ffbd39 35%, transparent 78%);
  transform-origin: 50% 0;
  transform: rotate(var(--blast-angle));
  animation: worryScreenRay 760ms ease-out both;
}

.worry-screen-blast.is-mega {
  background: radial-gradient(circle at 50% 50%, rgba(255, 247, 188, 0.68), rgba(255, 188, 53, 0.26) 24%, rgba(82, 255, 177, 0.13) 46%, transparent 72%);
}

.worry-crusher-stage.is-heavy-impact { animation: worryStageHeavyPunch 340ms ease-out; }
.worry-target.is-crushed { animation: worryTargetCriticalCrush 380ms cubic-bezier(.12,.82,.2,1) both; }

@keyframes worryImpactCritical {
  0% { opacity: 0; transform: translate(-50%, 12px) scale(0.35); }
  28%, 66% { opacity: 1; transform: translate(-50%, -5px) scale(1.18); }
  100% { opacity: 0; transform: translate(-50%, -48px) scale(0.82); }
}
@keyframes worryScreenBlast { 0% { opacity: 0; } 12%, 62% { opacity: 1; } 100% { opacity: 0; } }
@keyframes worryScreenTitle { 0% { opacity: 0; transform: scale(0.28) rotate(-8deg); } 30% { opacity: 1; transform: scale(1.15) rotate(2deg); } 58% { transform: scale(0.98); } 100% { opacity: 0; transform: translateY(-38px) scale(0.92); } }
@keyframes worryScreenRing { 0% { opacity: 1; transform: scale(0.15); } 100% { opacity: 0; transform: scale(2.8); } }
@keyframes worryScreenRay { 0% { opacity: 1; scale: 1 0.12; } 100% { opacity: 0; scale: 1 1.35; } }
@keyframes worryStageHeavyPunch { 18% { transform: scale(1.025) rotate(-0.5deg); filter: saturate(1.5); } 42% { transform: scale(0.985) rotate(0.4deg); } 72% { transform: scale(1.008); } }
@keyframes worryTargetCriticalCrush { 0% { opacity: 1; } 32% { opacity: 1; transform: rotate(var(--worry-tilt)) scale(1.58); filter: brightness(2.4) saturate(1.7); } 100% { opacity: 0; transform: rotate(calc(var(--worry-tilt) + 34deg)) scale(0.08); } }

@media (prefers-reduced-motion: reduce) {
  .breathing-stage.is-phase-shift .breathing-ring-one::after,
  .worry-screen-blast,
  .worry-screen-blast *,
  .worry-crusher-stage.is-heavy-impact { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}

/* Color perception + marble breaker */
.color-sense-launch-card,
.marble-launch-card {
  position: relative;
  min-height: 292px !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 54%, rgba(76, 255, 180, 0.1), transparent 42%),
    linear-gradient(145deg, rgba(7, 31, 24, 0.98), rgba(2, 13, 11, 0.99)) !important;
}

.color-sense-launch-card > p,
.marble-launch-card > p {
  margin: 8px 0 10px;
  color: rgba(224, 246, 233, 0.62);
  font-size: 0.63rem;
  line-height: 1.45;
}

.color-sense-preview,
.marble-game-preview {
  position: relative;
  height: 154px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 85, 0.2);
  border-radius: 14px;
  background: rgba(2, 13, 11, 0.88);
  isolation: isolate;
}

.color-sense-preview > b,
.marble-game-preview > b {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  z-index: 5;
  color: rgba(255, 235, 154, 0.86);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow: 0 2px 5px #000;
}

.color-sense-preview-wheel {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #ff294f, #ffca28, #54dd21, #10d2bc, #1687ff, #682df2, #ff25b5, #ff294f);
  box-shadow: 0 0 22px rgba(70, 255, 181, 0.18);
  transform: translateX(-50%);
}

.color-sense-preview-wheel::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: inherit;
  background: #061712;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.color-sense-preview-wheel i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  background: #19b8b2;
  box-shadow: 0 0 18px rgba(25, 184, 178, 0.7);
  transform: translate(-50%, -50%);
}

.marble-preview-bricks {
  position: absolute;
  top: 16px;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(3, 48px);
  gap: 6px;
  transform: translateX(-50%);
}

.marble-preview-bricks i {
  height: 18px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 6px;
  background: #ffca55;
  box-shadow: 0 0 10px rgba(255, 202, 85, 0.32);
}

.marble-preview-bricks i:nth-child(2n) { background: #67deb8; }
.marble-preview-bricks i:nth-child(3n) { background: #ff7f76; }
.marble-preview-ball {
  position: absolute;
  top: 69px;
  left: calc(50% + 34px);
  width: 15px;
  height: 15px;
  border: 2px solid #fff8cd;
  border-radius: 50%;
  background: #ffe077;
  box-shadow: 0 0 16px #ffd455;
  animation: marblePreviewBounce 1.5s ease-in-out infinite alternate;
}
.marble-preview-paddle {
  position: absolute;
  bottom: 31px;
  left: 50%;
  width: 92px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.72);
  border-radius: 999px;
  background: #54efaa;
  box-shadow: 0 0 16px rgba(84,239,170,0.5);
  transform: translateX(-50%);
}

.color-game-overlay,
.marble-game-overlay {
  display: block;
  overflow: auto;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  overscroll-behavior: contain;
}

.color-game-overlay[hidden],
.marble-game-overlay[hidden] { display: none !important; }

.color-game-shell,
.marble-game-shell {
  width: min(100%, 760px);
  min-height: calc(100dvh - 16px);
  margin: 0 auto;
  border: 1px solid rgba(77, 255, 176, 0.22);
  border-radius: 20px;
  background: rgba(2, 15, 12, 0.72);
  box-shadow: 0 18px 60px rgba(0,0,0,0.42);
}

.color-game-hud,
.marble-game-hud { margin: 8px; }

.color-game-stage {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: clamp(12px, 3vh, 30px) 12px 20px;
}

.color-game-copy { display: grid; gap: 4px; text-align: center; }
.color-game-copy strong { color: #f2fff8; font-size: clamp(0.9rem, 2.8vw, 1.15rem); }
.color-game-copy small { color: rgba(218, 244, 229, 0.58); font-size: 0.66rem; }

#colorWheelCanvas {
  display: block;
  width: min(76vw, 440px);
  height: min(76vw, 440px);
  max-width: 100%;
  cursor: crosshair;
  touch-action: none;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,0.32));
}

.color-game-feedback {
  min-width: min(88vw, 360px);
  padding: 10px 16px;
  border: 1px solid rgba(83, 255, 177, 0.16);
  border-radius: 999px;
  background: rgba(1, 9, 7, 0.58);
  color: rgba(225, 248, 234, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
}
.color-game-feedback.is-hit { border-color: rgba(255, 222, 102, 0.6); color: #ffe477; }
.color-game-feedback.is-miss { border-color: rgba(255, 116, 110, 0.5); color: #ffaaa2; }
.color-game-feedback.is-pop { animation: colorFeedbackPop 0.38s ease-out; }

.marble-game-stage {
  position: relative;
  width: min(100%, 440px);
  margin: 4px auto 0;
  padding: 0 8px 12px;
}

#marbleGameCanvas {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 150px);
  aspect-ratio: 360 / 560;
  border: 1px solid rgba(255, 216, 92, 0.24);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.38), inset 0 0 0 1px rgba(75,255,175,0.05);
  touch-action: none;
  cursor: ew-resize;
}

.marble-game-guide {
  position: absolute;
  top: 52%;
  left: 50%;
  display: grid;
  gap: 4px;
  min-width: 210px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 222, 105, 0.38);
  border-radius: 12px;
  background: rgba(2, 16, 13, 0.9);
  color: #ffe47a;
  text-align: center;
  transform: translate(-50%, -50%);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}
.marble-game-guide small { color: rgba(229,246,236,0.66); font-size: 0.62rem; }
.marble-game-guide.is-hidden { opacity: 0; transform: translate(-50%, -60%); }

.marble-game-burst {
  position: absolute;
  z-index: 8;
  top: 42%;
  left: 50%;
  color: #ffe36f;
  font-size: clamp(1rem, 5vw, 1.45rem);
  font-weight: 1000;
  text-shadow: 0 0 20px rgba(255, 212, 66, 0.72), 0 3px 8px #000;
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.marble-game-burst[data-tone="miss"] { color: #ff9d95; }
.marble-game-burst[data-tone="wave"] { color: #65ffb5; }
.marble-game-burst.show { animation: marbleBurst 0.72s ease-out both; }

.color-game-result,
.marble-game-result {
  position: fixed;
  z-index: 1200;
  top: 50%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: min(84vw, 330px);
  padding: 24px;
  border: 1px solid rgba(255, 222, 102, 0.48);
  border-radius: 18px;
  background: rgba(3, 21, 16, 0.97);
  box-shadow: 0 22px 70px rgba(0,0,0,0.64), 0 0 45px rgba(79,255,178,0.1);
  transform: translate(-50%, -50%);
}

@keyframes marblePreviewBounce {
  from { transform: translate(-38px, 15px); }
  to { transform: translate(22px, -20px); }
}
@keyframes colorFeedbackPop {
  45% { transform: scale(1.05); filter: brightness(1.35); }
}
@keyframes marbleBurst {
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  70% { opacity: 1; transform: translate(-50%, -70%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -105%) scale(0.9); }
}

@media (max-width: 640px) {
  .color-sense-launch-card,
  .marble-launch-card { min-height: 292px !important; }
  .color-sense-preview,
  .marble-game-preview { height: 145px; }
  .color-game-shell,
  .marble-game-shell { min-height: calc(100dvh - 16px); border-radius: 16px; }
  .color-game-stage { padding-top: 8px; gap: 7px; }
  #colorWheelCanvas { width: min(83vw, 360px); height: min(83vw, 360px); }
  .marble-game-stage { width: min(100%, 382px); }
}

@media (prefers-reduced-motion: reduce) {
  .marble-preview-ball { animation-duration: 3s !important; }
}

/* Final cascade: keep the July game and lottery revisions after legacy styles. */
.lottery-digits[data-mode="powerball"] .lottery-reel:not(.is-special).is-locked,
.lottery-digits[data-mode="powerball"] .lottery-reel:not(.is-special).is-gold-locked {
  z-index: 4;
  border-color: #fff0a8;
  color: #3a2405;
  background: linear-gradient(145deg, #fff8c8 0%, #ffd45f 42%, #cf870d 100%);
  box-shadow:
    inset -4px -5px 9px rgba(102, 57, 0, 0.24),
    inset 4px 4px 7px rgba(255, 255, 255, 0.8),
    0 0 0 2px rgba(255, 212, 95, 0.2),
    0 0 22px rgba(255, 212, 95, 0.82);
  animation: lottery-powerball-gold-lock 520ms cubic-bezier(0.16, 0.92, 0.24, 1.16) both;
}

.lottery-digits[data-mode="powerball"] .lottery-reel.is-special.is-locked {
  z-index: 4;
  border-color: #ffc3bc;
  color: #fffaf5;
  background: linear-gradient(145deg, #ff8279 0%, #d72c38 48%, #8e0c18 100%);
  box-shadow:
    inset -4px -5px 9px rgba(79, 3, 10, 0.32),
    inset 4px 4px 7px rgba(255, 255, 255, 0.42),
    0 0 0 2px rgba(255, 102, 105, 0.18),
    0 0 22px rgba(255, 68, 79, 0.78);
  animation: lottery-powerball-red-lock 560ms cubic-bezier(0.16, 0.92, 0.24, 1.14) both;
}

.fortune-draw-stage.fortune-unified {
  border-color: color-mix(in srgb, var(--fortune-tone) 48%, rgba(93, 245, 170, 0.22));
  background:
    radial-gradient(circle at 18% 48%, rgba(47, 171, 123, 0.12), transparent 29%),
    radial-gradient(circle at 78% 20%, color-mix(in srgb, var(--fortune-tone) 9%, transparent), transparent 28%),
    linear-gradient(124deg, rgba(4, 23, 19, 0.98), rgba(5, 14, 14, 0.98) 58%, rgba(15, 14, 9, 0.98));
}

.fortune-unified .fortune-ritual {
  min-height: 130px;
}

.fortune-vessel-slot {
  width: 142px;
  margin-block: -2px;
  scale: 1;
}

.fortune-vessel {
  width: 132px;
  height: 132px;
  overflow: visible;
  border-radius: 24px;
  transform-origin: 50% 82%;
}

.fortune-vessel::before,
.fortune-vessel::after,
.fortune-vessel > em,
.fortune-sticks {
  display: none;
}

.fortune-drawn-stick {
  bottom: 24px;
  width: 30px;
  height: 122px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  transform: translate(-50%, 48px) rotate(3deg) scale(0.84);
}

.fortune-draw-stage.has-result .fortune-drawn-stick {
  opacity: 1;
  transform: translate(-50%, -36px) rotate(2deg) scale(1);
}

.fortune-draw-stage.is-drawing .fortune-vessel {
  animation: fortune-vessel-premium-shake 5200ms cubic-bezier(0.24, 0.04, 0.2, 1) both;
  filter: none;
}

.fortune-draw-stage.is-drawing .fortune-drawn-stick {
  animation: fortune-premium-stick-draw 5200ms cubic-bezier(0.18, 0.84, 0.24, 1) both;
  filter: none;
}

@media (max-width: 640px) {
  .fortune-unified .fortune-ritual {
    min-height: 112px;
  }

  .fortune-vessel-slot {
    width: 116px;
    margin-block: -5px;
    scale: 1;
  }

  .fortune-vessel {
    width: 108px;
    height: 108px;
  }

  .fortune-drawn-stick {
    bottom: 18px;
    width: 25px;
    height: 102px;
  }

  .fortune-draw-stage.has-result .fortune-drawn-stick {
    transform: translate(-50%, -30px) rotate(2deg) scale(1);
  }

  .fortune-unified.has-result .fortune-ritual {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 4px;
  }
}

/* July 2026: native special balls, premium fortune vessel, and break-time games. */
.lottery-digits[data-mode="powerball"] .lottery-reel:not(.is-special).is-locked {
  z-index: 4;
  border-color: #fff0a8;
  color: #3a2405;
  background: linear-gradient(145deg, #fff8c8 0%, #ffd45f 42%, #cf870d 100%);
  box-shadow:
    inset -4px -5px 9px rgba(102, 57, 0, 0.24),
    inset 4px 4px 7px rgba(255, 255, 255, 0.8),
    0 0 0 2px rgba(255, 212, 95, 0.2),
    0 0 22px rgba(255, 212, 95, 0.82);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.58);
  animation: lottery-powerball-gold-lock 520ms cubic-bezier(0.16, 0.92, 0.24, 1.16) both;
}

.lottery-digits[data-mode="powerball"] .lottery-reel.is-special.is-locked {
  z-index: 4;
  border-color: #ffc3bc;
  color: #fffaf5;
  background: linear-gradient(145deg, #ff8279 0%, #d72c38 48%, #8e0c18 100%);
  box-shadow:
    inset -4px -5px 9px rgba(79, 3, 10, 0.32),
    inset 4px 4px 7px rgba(255, 255, 255, 0.42),
    0 0 0 2px rgba(255, 102, 105, 0.18),
    0 0 22px rgba(255, 68, 79, 0.78);
  text-shadow: 0 1px 2px rgba(54, 0, 4, 0.48);
  animation: lottery-powerball-red-lock 560ms cubic-bezier(0.16, 0.92, 0.24, 1.14) both;
}

.lottery-digits[data-mode="mega"] .lottery-reel:not(.is-special).is-spinning {
  border-color: rgba(237, 252, 255, 0.98);
  background: linear-gradient(145deg, #ffffff 0%, #eaf7fb 38%, #b9ced7 100%);
  box-shadow:
    inset -5px -6px 10px rgba(18, 44, 54, 0.28),
    inset 5px 5px 8px rgba(255, 255, 255, 0.9),
    0 0 0 2px rgba(115, 223, 255, 0.14),
    0 0 22px rgba(112, 220, 255, 0.64);
}

.lottery-digits[data-mode="mega"] .lottery-reel:not(.is-special).is-spinning .lottery-reel-static {
  color: #10242c;
  text-shadow:
    0 -21px 0 rgba(24, 66, 80, 0.24),
    0 21px 0 rgba(24, 66, 80, 0.22),
    0 0 10px rgba(70, 183, 224, 0.68);
  animation: lottery-mega-number-roll 88ms steps(2, end) infinite;
}

.lottery-digits[data-mode="mega"] .lottery-reel:not(.is-special).is-locked {
  z-index: 4;
  border-color: #f4fdff;
  color: #0d222a;
  background: linear-gradient(145deg, #ffffff 0%, #effbff 44%, #bfd2da 100%);
  box-shadow:
    inset -5px -6px 10px rgba(18, 44, 54, 0.24),
    inset 5px 5px 8px rgba(255, 255, 255, 0.92),
    0 0 0 3px rgba(115, 223, 255, 0.18),
    0 0 26px rgba(112, 220, 255, 0.82);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: lottery-mega-white-lock 640ms cubic-bezier(0.16, 0.92, 0.24, 1.2) both;
}

.lottery-digits[data-mode="mega"] .lottery-reel.is-special.is-locked {
  z-index: 4;
  border-color: #fff2ae;
  color: #3a2505;
  background: linear-gradient(145deg, #fff8bd 0%, #ffd45f 44%, #d99810 100%);
  box-shadow:
    inset -4px -5px 9px rgba(102, 57, 0, 0.22),
    inset 4px 4px 7px rgba(255, 255, 255, 0.78),
    0 0 0 2px rgba(255, 212, 95, 0.22),
    0 0 24px rgba(255, 212, 95, 0.84);
  animation: lottery-mega-gold-lock 620ms cubic-bezier(0.16, 0.92, 0.24, 1.18) both;
}

.fortune-draw-stage.fortune-unified {
  border-color: color-mix(in srgb, var(--fortune-tone) 48%, rgba(93, 245, 170, 0.22));
  background:
    radial-gradient(circle at 18% 48%, rgba(47, 171, 123, 0.12), transparent 29%),
    radial-gradient(circle at 78% 20%, color-mix(in srgb, var(--fortune-tone) 9%, transparent), transparent 28%),
    linear-gradient(124deg, rgba(4, 23, 19, 0.98), rgba(5, 14, 14, 0.98) 58%, rgba(15, 14, 9, 0.98));
}

.fortune-unified .fortune-ritual {
  min-height: 130px;
}

.fortune-vessel-slot {
  width: 142px;
  margin-block: -2px;
  scale: 1;
}

.fortune-vessel {
  width: 132px;
  height: 132px;
  overflow: visible;
  border-radius: 24px;
  transform-origin: 50% 82%;
}

.fortune-vessel::before,
.fortune-vessel::after,
.fortune-vessel > em,
.fortune-sticks {
  display: none;
}

.fortune-vessel-art {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: 24px;
  pointer-events: none;
}

.fortune-vessel-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
  user-select: none;
  -webkit-user-drag: none;
}

.fortune-drawn-stick {
  z-index: 6;
  bottom: 24px;
  width: 30px;
  height: 122px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #f8e6a6;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  transform: translate(-50%, 48px) rotate(3deg) scale(0.84);
  pointer-events: none;
}

.fortune-drawn-stick img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
}

.fortune-drawn-stick b {
  position: absolute;
  top: 15px;
  left: 50%;
  z-index: 2;
  color: #fff2b7;
  font-family: "STKaiti", "KaiTi", "FangSong", serif;
  font-size: 0.58rem;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  transform: translateX(-50%);
}

.fortune-draw-stage.has-result .fortune-drawn-stick {
  opacity: 1;
  transform: translate(-50%, -36px) rotate(2deg) scale(1);
}

.fortune-draw-stage.is-drawing .fortune-vessel {
  animation: fortune-vessel-premium-shake 5200ms cubic-bezier(0.24, 0.04, 0.2, 1) both;
}

.fortune-draw-stage.is-drawing .fortune-drawn-stick {
  animation: fortune-premium-stick-draw 5200ms cubic-bezier(0.18, 0.84, 0.24, 1) both;
}

.break-game-mini-games {
  position: relative;
  overflow: hidden;
  padding: 12px;
  border-color: rgba(91, 237, 170, 0.34);
  background:
    radial-gradient(circle at 16% 12%, rgba(63, 238, 167, 0.1), transparent 28%),
    radial-gradient(circle at 86% 84%, rgba(111, 230, 255, 0.08), transparent 30%),
    rgba(4, 15, 14, 0.94);
}

.mini-games-head {
  margin-bottom: 10px;
}

.mini-game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.mini-game-card {
  position: relative;
  overflow: hidden;
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(219, 255, 235, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.mini-game-card-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
}

.mini-game-card-head > div {
  min-width: 0;
}

.mini-game-card-head small {
  display: block;
  color: var(--green);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.mini-game-card-head h3 {
  overflow: hidden;
  margin: 2px 0 0;
  color: #effff4;
  font-size: 0.82rem;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-game-card-head > span {
  flex: 0 0 auto;
  color: rgba(230, 246, 237, 0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.5rem;
  font-weight: 850;
  white-space: nowrap;
}

.reaction-pad {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 78px;
  place-content: center;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(226, 255, 239, 0.14);
  border-radius: 8px;
  color: rgba(237, 249, 241, 0.74);
  background: rgba(0, 0, 0, 0.24);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.24);
  touch-action: manipulation;
}

.reaction-pad span {
  font-size: 1.02rem;
  font-weight: 1000;
  line-height: 1;
}

.reaction-pad small {
  color: currentColor;
  font-size: 0.5rem;
  font-weight: 850;
  opacity: 0.7;
}

.reaction-pad.is-ready {
  border-color: rgba(93, 240, 163, 0.38);
  color: #c8ffe0;
  background: rgba(31, 115, 78, 0.28);
}

.reaction-pad.is-red {
  border-color: rgba(255, 102, 112, 0.72);
  color: #fff0f0;
  background: rgba(137, 20, 34, 0.68);
  box-shadow: inset 0 0 28px rgba(255, 69, 82, 0.2), 0 0 18px rgba(255, 69, 82, 0.16);
  animation: reaction-warning 420ms ease-in-out infinite alternate;
}

.reaction-pad.is-gold {
  border-color: rgba(255, 240, 174, 0.9);
  color: #2e1b04;
  background: linear-gradient(135deg, #fff2a6, #ffd45f 52%, #ff9e4a);
  box-shadow: 0 0 24px rgba(255, 212, 95, 0.46);
  animation: reaction-target 360ms cubic-bezier(0.16, 0.86, 0.24, 1) infinite alternate;
}

.reaction-pad.is-hit,
.reaction-pad.is-safe {
  border-color: rgba(106, 255, 181, 0.82);
  color: #0b271b;
  background: linear-gradient(135deg, #b9ffd7, #39f88f);
  animation: reaction-hit 300ms cubic-bezier(0.16, 0.9, 0.24, 1.18) both;
}

.reaction-pad.is-wrong,
.reaction-pad.is-miss {
  border-color: rgba(255, 130, 139, 0.62);
  color: #ffe8ea;
  background: rgba(119, 24, 36, 0.68);
  animation: reaction-wrong 300ms ease-out both;
}

.reaction-pad.is-finished {
  border-color: rgba(111, 230, 255, 0.44);
  color: #dffaff;
  background: rgba(35, 92, 105, 0.32);
}

.mini-game-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.mini-game-stats span {
  overflow: hidden;
  color: rgba(225, 242, 232, 0.6);
  font-size: 0.48rem;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-game-stats b {
  color: #effff4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.mini-game-start {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(109, 245, 179, 0.52);
  border-radius: 7px;
  color: #082019;
  background: linear-gradient(105deg, #6fe6ff, #62f4a2);
  box-shadow: 0 5px 15px rgba(57, 248, 143, 0.12);
  font-size: 0.58rem;
  font-weight: 1000;
}

.mini-game-start:disabled {
  cursor: wait;
  filter: grayscale(0.6);
  opacity: 0.62;
}

.bubble-launch-card {
  grid-template-rows: auto 1fr auto auto;
}

.bubble-preview {
  position: relative;
  display: grid;
  min-height: 78px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(111, 230, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.bubble-preview img {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  clip-path: circle(49% at 50% 50%);
  object-fit: contain;
  mix-blend-mode: screen;
  filter: saturate(1.15);
  animation: bubble-preview-float 2.8s ease-in-out infinite;
}

.bubble-preview span {
  position: absolute;
  right: 8px;
  bottom: 7px;
  color: rgba(209, 255, 233, 0.66);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.45rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
}

.bubble-launch-card p {
  min-height: 2.4em;
  margin: 0;
  color: rgba(225, 241, 232, 0.58);
  font-size: 0.48rem;
  font-weight: 750;
  line-height: 1.38;
}

body.bubble-game-open {
  overflow: hidden;
}

.bubble-game-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: hidden;
  background: rgba(0, 9, 9, 0.46);
  backdrop-filter: blur(2px) saturate(0.88);
  opacity: 0;
  transition: opacity 180ms ease-out;
}

.bubble-game-overlay.is-open {
  opacity: 1;
}

.bubble-game-hud {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  margin: max(12px, env(safe-area-inset-top)) 12px 0;
  padding: 10px 11px;
  border: 1px solid rgba(97, 244, 170, 0.36);
  border-radius: 9px;
  background: rgba(3, 17, 15, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 30px rgba(0, 0, 0, 0.3);
}

.bubble-game-hud-title {
  display: grid;
  gap: 1px;
}

.bubble-game-hud-title small {
  color: var(--green);
  font-size: 0.46rem;
  font-weight: 900;
}

.bubble-game-hud-title strong {
  color: #effff4;
  font-size: 0.82rem;
}

.bubble-game-scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.bubble-game-scoreboard span {
  overflow: hidden;
  padding: 5px 6px;
  border: 1px solid rgba(222, 255, 235, 0.1);
  border-radius: 6px;
  color: rgba(228, 245, 234, 0.62);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.52rem;
  font-weight: 850;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bubble-game-scoreboard b {
  color: #fff0a6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.bubble-game-close {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(222, 255, 235, 0.18);
  border-radius: 7px;
  color: #eafff1;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  font-size: 1.1rem;
  line-height: 1;
}

.bubble-game-arena {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  touch-action: none;
}

.bubble-target {
  position: absolute;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  animation: bubble-target-float var(--bubble-life) linear both;
  will-change: transform, opacity;
}

.bubble-target img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  clip-path: circle(49% at 50% 50%);
  object-fit: contain;
  mix-blend-mode: screen;
  filter: hue-rotate(var(--bubble-hue)) saturate(1.18);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.bubble-target.is-popped {
  z-index: 8;
  pointer-events: none;
  animation: bubble-target-pop 250ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.bubble-target.is-popped img {
  animation: bubble-image-pop 250ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.bubble-pop-value {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #fff1a7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.62rem;
  font-weight: 1000;
  text-shadow: 0 0 8px rgba(255, 212, 95, 0.74);
  transform: translate(-50%, -50%);
  animation: bubble-score-rise 250ms ease-out both;
}

.bubble-game-count-in {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 14;
  color: #fff2ad;
  font-size: clamp(2rem, 8vw, 4.6rem);
  font-weight: 1000;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.5);
  text-shadow: 0 0 24px rgba(255, 212, 95, 0.58);
}

.bubble-game-count-in.show {
  animation: bubble-count-in 720ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.bubble-game-result {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 16;
  display: grid;
  width: min(300px, calc(100vw - 36px));
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(255, 225, 125, 0.62);
  border-radius: 10px;
  color: #effff4;
  background: rgba(3, 18, 15, 0.94);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.52), 0 0 28px rgba(57, 248, 143, 0.12);
  text-align: center;
  transform: translate(-50%, -50%);
  animation: bubble-result-in 380ms cubic-bezier(0.16, 0.9, 0.24, 1.12) both;
}

.bubble-game-result[hidden] {
  display: none;
}

.bubble-game-result small {
  color: var(--green);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.bubble-game-result strong {
  color: #fff2a6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.65rem;
}

.bubble-game-result span {
  color: rgba(226, 245, 233, 0.68);
  font-size: 0.65rem;
  font-weight: 850;
}

.bubble-game-result button {
  min-height: 38px;
  border: 1px solid rgba(107, 245, 180, 0.52);
  border-radius: 7px;
  color: #082019;
  background: linear-gradient(105deg, #6fe6ff, #62f4a2);
  font-size: 0.65rem;
  font-weight: 1000;
}

@keyframes lottery-powerball-red-lock {
  0% { transform: translateY(-8px) rotate(-18deg) scale(0.72); filter: brightness(2.2); }
  34% { transform: translateY(1px) rotate(8deg) scale(1.26); filter: brightness(1.5); }
  64% { transform: translateY(-1px) rotate(-3deg) scale(0.95); filter: brightness(1.08); }
  100% { transform: translateY(0) rotate(0) scale(1); filter: brightness(1); }
}

@keyframes lottery-mega-number-roll {
  0% { transform: translateY(-10px) scaleY(1.18); filter: blur(0.9px); }
  50% { transform: translateY(10px) scaleY(0.82); filter: blur(1.4px); }
  100% { transform: translateY(-10px) scaleY(1.18); filter: blur(0.9px); }
}

@keyframes lottery-mega-white-lock {
  0% { transform: translateY(-12px) rotate(-24deg) scale(0.62); filter: blur(1.4px) brightness(2.5); }
  28% { transform: translateY(2px) rotate(10deg) scale(1.3); filter: blur(0) brightness(1.7); }
  52% { transform: translateY(-3px) rotate(-5deg) scale(0.92); }
  72% { transform: translateY(1px) rotate(2deg) scale(1.08); }
  100% { transform: translateY(0) rotate(0) scale(1); filter: brightness(1); }
}

@keyframes lottery-mega-gold-lock {
  0% { transform: translateY(-10px) rotate(18deg) scale(0.66); filter: brightness(2.7); }
  32% { transform: translateY(2px) rotate(-8deg) scale(1.3); filter: brightness(1.82); }
  58% { transform: translateY(-2px) rotate(4deg) scale(0.94); }
  78% { transform: translateY(1px) rotate(-1deg) scale(1.07); }
  100% { transform: translateY(0) rotate(0) scale(1); filter: brightness(1); }
}

@keyframes fortune-vessel-premium-shake {
  0% { transform: translate3d(0, 0, 0) rotate(0) scale(1); }
  5% { transform: translate3d(0, 3px, 0) rotate(0) scale(0.97); }
  10% { transform: translate3d(-3px, -5px, 0) rotate(-5deg) scale(1.01); }
  15% { transform: translate3d(5px, -8px, 0) rotate(7deg) scale(1.02); }
  20% { transform: translate3d(-6px, -4px, 0) rotate(-8deg) scale(1.015); }
  25% { transform: translate3d(7px, -9px, 0) rotate(9deg) scale(1.025); }
  31% { transform: translate3d(-8px, -5px, 0) rotate(-10deg) scale(1.02); }
  37% { transform: translate3d(8px, -10px, 0) rotate(10deg) scale(1.03); }
  43% { transform: translate3d(-9px, -5px, 0) rotate(-10.5deg) scale(1.025); }
  49% { transform: translate3d(9px, -10px, 0) rotate(10.5deg) scale(1.035); }
  55% { transform: translate3d(-8px, -6px, 0) rotate(-9deg) scale(1.03); }
  61% { transform: translate3d(8px, -11px, 0) rotate(8.5deg) scale(1.035); }
  67% { transform: translate3d(-7px, -5px, 0) rotate(-7.5deg) scale(1.025); }
  72% { transform: translate3d(8px, -12px, 0) rotate(8deg) scale(1.04); }
  76% { transform: translate3d(-7px, -3px, 0) rotate(-6.5deg) scale(1.01); }
  80% { transform: translate3d(5px, -8px, 0) rotate(5deg) scale(1.025); }
  84% { transform: translate3d(-3px, -2px, 0) rotate(-3deg) scale(0.99); }
  89% { transform: translate3d(2px, -4px, 0) rotate(1.8deg) scale(1.01); }
  94% { transform: translate3d(-1px, 1px, 0) rotate(-0.8deg) scale(0.995); }
  100% { transform: translate3d(0, 0, 0) rotate(0) scale(1); }
}

@keyframes fortune-premium-stick-draw {
  0%, 68% { opacity: 0; transform: translate(-50%, 48px) rotate(8deg) scale(0.82); }
  74% { opacity: 1; transform: translate(-50%, -62px) rotate(-5deg) scale(1.06); }
  82% { transform: translate(-50%, -28px) rotate(4deg) scale(0.96); }
  90% { transform: translate(-50%, -42px) rotate(-1deg) scale(1.02); }
  100% { opacity: 1; transform: translate(-50%, -36px) rotate(2deg) scale(1); }
}

@keyframes reaction-warning {
  to { transform: scale(1.018); box-shadow: inset 0 0 34px rgba(255, 69, 82, 0.28), 0 0 22px rgba(255, 69, 82, 0.2); }
}

@keyframes reaction-target {
  from { transform: scale(0.98); }
  to { transform: scale(1.03); box-shadow: 0 0 30px rgba(255, 212, 95, 0.58); }
}

@keyframes reaction-hit {
  0% { transform: scale(0.9); }
  52% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes reaction-wrong {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-5px); }
  62% { transform: translateX(5px); }
}

@keyframes bubble-preview-float {
  50% { transform: translateY(-4px) scale(1.04); }
}

@keyframes bubble-target-float {
  0% { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.48); }
  10% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  84% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--bubble-drift-x), var(--bubble-drift-y), 0) scale(1.06); }
}

@keyframes bubble-target-pop {
  0% { opacity: 1; transform: scale(1); }
  55% { opacity: 0.92; transform: scale(1.28); }
  100% { opacity: 0; transform: scale(1.54); }
}

@keyframes bubble-image-pop {
  100% { opacity: 0; filter: hue-rotate(var(--bubble-hue)) saturate(1.8) brightness(1.8); }
}

@keyframes bubble-score-rise {
  100% { opacity: 0; transform: translate(-50%, -145%) scale(1.18); }
}

@keyframes bubble-count-in {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  32%, 68% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -68%) scale(1.18); }
}

@keyframes bubble-result-in {
  0% { opacity: 0; transform: translate(-50%, -44%) scale(0.72); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 640px) {
  .fortune-unified .fortune-ritual {
    min-height: 112px;
  }

  .fortune-vessel-slot {
    width: 116px;
    margin-block: -5px;
    scale: 1;
  }

  .fortune-vessel {
    width: 108px;
    height: 108px;
  }

  .fortune-drawn-stick {
    bottom: 18px;
    width: 25px;
    height: 102px;
  }

  .fortune-drawn-stick b {
    top: 13px;
    font-size: 0.52rem;
  }

  .fortune-draw-stage.has-result .fortune-drawn-stick {
    transform: translate(-50%, -30px) rotate(2deg) scale(1);
  }

  .fortune-unified.has-result .fortune-ritual {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 4px;
  }

  .break-game-mini-games {
    padding: 9px;
  }

  .mini-game-grid {
    gap: 6px;
  }

  .mini-game-card {
    gap: 6px;
    padding: 8px;
  }

  .mini-game-card-head h3 {
    font-size: 0.72rem;
  }

  .mini-game-card-head > span {
    font-size: 0.43rem;
  }

  .reaction-pad,
  .bubble-preview {
    min-height: 70px;
  }

  .reaction-pad span {
    font-size: 0.88rem;
  }

  .bubble-preview img {
    width: 72px;
    height: 72px;
  }

  .bubble-launch-card p {
    font-size: 0.44rem;
  }

  .mini-game-start {
    min-height: 32px;
    padding-inline: 5px;
    font-size: 0.52rem;
  }

  .bubble-game-hud {
    grid-template-columns: 72px minmax(0, 1fr) 34px;
    gap: 6px;
    margin-inline: 8px;
    padding: 8px;
  }

  .bubble-game-hud-title strong {
    font-size: 0.68rem;
  }

  .bubble-game-scoreboard {
    gap: 3px;
  }

  .bubble-game-scoreboard span {
    padding: 4px 2px;
    font-size: 0.43rem;
  }

  .bubble-game-close {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 420px) {
  .mini-game-card-head {
    display: grid;
    gap: 2px;
  }

  .mini-game-card-head > span {
    justify-self: start;
  }

  .bubble-launch-card p {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fortune-draw-stage.is-drawing .fortune-vessel,
  .fortune-draw-stage.is-drawing .fortune-drawn-stick,
  .lottery-digits[data-mode="mega"] .lottery-reel,
  .lottery-digits[data-mode="powerball"] .lottery-reel,
  .reaction-pad,
  .bubble-preview img,
  .bubble-target {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* July 2026: compact fortune ritual, Powerball lock-in, and desktop income board. */
.daily-goal-progress-head > span b {
  margin-left: 6px;
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 1000;
}

.daily-goal-panel.is-complete .daily-goal-progress-head > span b {
  color: var(--green);
}

.fortune-draw-stage.fortune-unified {
  gap: 4px;
  padding: 8px 10px;
}

.fortune-stage-label {
  align-items: flex-start;
}

.fortune-stage-label small {
  width: min(72%, 330px);
  line-height: 1.35;
  text-align: right;
  white-space: normal;
}

.fortune-unified .fortune-ritual {
  min-height: 104px;
  padding-top: 2px;
}

.fortune-unified:not(.has-result) .fortune-outcome {
  display: none;
}

.fortune-vessel-slot {
  width: 116px;
  align-self: center;
  gap: 3px;
  margin-block: -5px;
  scale: 0.88;
}

.fortune-vessel-status {
  display: flex;
  max-width: 150px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: color-mix(in srgb, var(--fortune-tone) 58%, white 14%);
  line-height: 1.2;
  white-space: nowrap;
}

.fortune-vessel-status small {
  color: inherit;
  font-size: 0.43rem;
  font-weight: 900;
}

.fortune-vessel-status span {
  color: rgba(230, 246, 237, 0.35);
  font-size: 0.42rem;
}

.fortune-unified.has-result .fortune-ritual {
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px;
}

.fortune-unified.has-result .fortune-outcome,
.fortune-outcome {
  width: 106px;
  height: 136px;
  min-height: 136px;
  padding: 10px 8px 9px;
}

.fortune-unified.has-result .fortune-vessel-slot {
  align-self: center;
}

.fortune-draw-stage.is-drawing,
.fortune-result.is-drawing,
.fortune-result.is-drawing .fortune-oracle-copy {
  animation: none;
  filter: none;
}

.fortune-draw-stage.is-drawing .fortune-ritual {
  place-content: center;
  place-items: center;
}

.fortune-draw-stage.is-drawing .fortune-vessel-slot {
  align-self: center;
  justify-self: center;
}

.fortune-draw-stage .fortune-vessel:disabled {
  opacity: 1;
  filter: none;
}

.fortune-draw-stage.is-drawing .fortune-vessel {
  animation: fortune-vessel-natural-shake 5200ms linear both;
  filter: none;
}

.fortune-draw-stage.is-drawing .fortune-sticks i {
  animation: fortune-sticks-natural-rattle 112ms cubic-bezier(0.3, 0, 0.7, 1) infinite alternate;
  animation-delay: calc(var(--stick) * -27ms);
  filter: none;
}

.fortune-draw-stage.is-drawing .fortune-drawn-stick {
  animation: fortune-stick-natural-draw 5200ms cubic-bezier(0.2, 0.88, 0.24, 1) both;
  filter: none;
}

.fortune-celebration {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.fortune-celebration.is-active {
  opacity: 1;
}

.fortune-celebration-spark {
  position: absolute;
  top: var(--spark-y);
  left: var(--spark-x);
  width: 3px;
  height: 11px;
  border-radius: 999px;
  background: var(--spark-color);
  box-shadow: 0 0 7px var(--spark-color);
  opacity: 0;
  transform-origin: 50% 100%;
  animation: fortune-celebration-spark 1050ms cubic-bezier(0.12, 0.72, 0.24, 1) var(--spark-delay) both;
}

.fortune-celebration.is-medium .fortune-celebration-spark {
  animation-duration: 1250ms;
}

.fortune-celebration.is-major .fortune-celebration-spark {
  width: 4px;
  height: 14px;
  animation-duration: 1500ms;
}

.lottery-digits[data-mode="powerball"] .lottery-reel.is-spinning .lottery-reel-static {
  color: #17252a;
  text-shadow:
    0 -19px 0 rgba(27, 53, 63, 0.2),
    0 19px 0 rgba(27, 53, 63, 0.18),
    0 0 8px rgba(82, 174, 207, 0.52);
  animation: lottery-powerball-number-roll 116ms steps(2, end) infinite;
}

.lottery-digits[data-mode="powerball"] .lottery-reel.is-locked,
.lottery-digits[data-mode="powerball"] .lottery-reel.is-special.is-locked,
.lottery-digits[data-mode="powerball"] .lottery-reel:not(.is-special).is-locked {
  z-index: 4;
  border-color: #fff0a8;
  color: #3a2405;
  background: linear-gradient(145deg, #fff6b7 0%, #ffd45f 42%, #d79512 100%);
  box-shadow:
    inset -4px -5px 9px rgba(102, 57, 0, 0.24),
    inset 4px 4px 7px rgba(255, 255, 255, 0.76),
    0 0 0 2px rgba(255, 212, 95, 0.2),
    0 0 22px rgba(255, 212, 95, 0.82);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.58);
  animation: lottery-powerball-gold-lock 520ms cubic-bezier(0.16, 0.92, 0.24, 1.16) both;
}

.lottery-digits[data-mode="powerball"] .lottery-reel.is-gold-locked {
  animation: none;
}

.lottery-machine[data-mode="powerball"].is-settled .lottery-reel {
  animation: lottery-jackpot-glow 920ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.lottery-machine[data-mode="powerball"].is-settled .lottery-reel:nth-child(2) { animation-delay: 55ms; }
.lottery-machine[data-mode="powerball"].is-settled .lottery-reel:nth-child(3) { animation-delay: 110ms; }
.lottery-machine[data-mode="powerball"].is-settled .lottery-reel:nth-child(4) { animation-delay: 165ms; }
.lottery-machine[data-mode="powerball"].is-settled .lottery-reel:nth-child(5) { animation-delay: 220ms; }
.lottery-machine[data-mode="powerball"].is-settled .lottery-reel:nth-child(6) { animation-delay: 275ms; }

.income-history-panel.admin-calendar {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(57, 248, 143, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(57, 248, 143, 0.07), transparent 44%),
    rgba(5, 15, 13, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 28px rgba(57, 248, 143, 0.035);
}

.income-history-head {
  align-items: flex-end;
  padding: 0;
  border: 0;
}

.income-history-head > div {
  display: grid;
  gap: 3px;
}

.income-history-head h2 {
  color: #effff4;
  font-size: 1rem;
}

.income-history-head .income-history-kicker {
  color: var(--green);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.income-history-head > span {
  font-size: 0.62rem;
}

.income-history-panel .ledger-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.income-history-panel .ledger-summary article {
  position: relative;
  overflow: hidden;
  padding: 10px;
  border-color: rgba(222, 255, 235, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.income-history-panel .ledger-summary article::after {
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--amber));
  content: "";
  opacity: 0.7;
}

.income-history-panel .ledger-summary strong {
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-board {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(222, 255, 235, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.ledger-range-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.ledger-range-tabs button {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(222, 255, 235, 0.12);
  border-radius: 6px;
  color: rgba(226, 242, 232, 0.65);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  font-size: 0.62rem;
  font-weight: 950;
}

.ledger-range-tabs button.active,
.ledger-range-tabs button[aria-selected="true"] {
  border-color: rgba(98, 244, 162, 0.52);
  color: #082017;
  background: linear-gradient(105deg, #6fe6ff, #62f4a2);
}

.ledger-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ledger-chart-head span {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 900;
}

.ledger-chart-head strong {
  overflow: hidden;
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-chart {
  display: grid;
  height: 138px;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  align-items: stretch;
  gap: 6px;
  padding-top: 4px;
}

.ledger-chart-column {
  display: grid;
  min-width: 0;
  grid-template-rows: 17px minmax(0, 1fr) 18px;
  align-items: end;
  justify-items: center;
  gap: 3px;
}

.ledger-chart-column > b {
  overflow: hidden;
  width: 100%;
  color: rgba(228, 245, 234, 0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.46rem;
  font-weight: 850;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-chart-column > i {
  width: min(26px, 64%);
  height: var(--ledger-bar-height);
  min-height: 2px;
  align-self: end;
  border: 1px solid rgba(255, 230, 139, 0.28);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--amber), var(--green));
  box-shadow: 0 0 10px rgba(57, 248, 143, 0.15);
  transition: height 320ms cubic-bezier(0.18, 0.84, 0.28, 1);
}

.ledger-chart-column > small {
  overflow: hidden;
  width: 100%;
  color: var(--muted);
  font-size: 0.48rem;
  font-weight: 850;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.income-history-panel .ledger-days {
  max-height: 360px;
}

@keyframes fortune-vessel-natural-shake {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  7% { transform: translate3d(-4px, -2px, 0) rotate(-4.5deg); }
  14% { transform: translate3d(5px, -5px, 0) rotate(5.2deg); }
  22% { transform: translate3d(-6px, -3px, 0) rotate(-6deg); }
  31% { transform: translate3d(6px, -6px, 0) rotate(6.2deg); }
  41% { transform: translate3d(-7px, -4px, 0) rotate(-6.8deg); }
  52% { transform: translate3d(7px, -7px, 0) rotate(6.8deg); }
  63% { transform: translate3d(-6px, -4px, 0) rotate(-5.8deg); }
  74% { transform: translate3d(5px, -8px, 0) rotate(4.6deg); }
  83% { transform: translate3d(-3px, -3px, 0) rotate(-2.8deg); }
  91% { transform: translate3d(2px, 0, 0) rotate(1.2deg); }
}

@keyframes fortune-sticks-natural-rattle {
  0% {
    transform: translateX(calc((var(--stick) - 2) * 8px - 1px)) translateY(1px) rotate(calc((var(--stick) - 2) * 5deg - 1.8deg));
  }
  100% {
    transform: translateX(calc((var(--stick) - 2) * 8px + 2px)) translateY(-7px) rotate(calc((var(--stick) - 2) * 5deg + 2.4deg));
  }
}

@keyframes fortune-stick-natural-draw {
  0%, 68% {
    opacity: 0;
    transform: translate(-50%, 38px) rotate(8deg) scale(0.84);
  }
  76% {
    opacity: 1;
    transform: translate(-50%, -36px) rotate(-5deg) scale(1.08);
  }
  88% {
    transform: translate(-50%, -8px) rotate(4deg) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -13px) rotate(2deg) scale(1);
  }
}

@keyframes fortune-celebration-spark {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scaleY(0.2);
  }
  13% {
    opacity: 1;
  }
  72% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--spark-dx)), calc(-50% + var(--spark-dy))) rotate(210deg) scaleY(0.72);
  }
}

@keyframes lottery-powerball-number-roll {
  0% {
    transform: translateY(-7px) scaleY(1.14);
    filter: blur(0.7px);
  }
  50% {
    transform: translateY(7px) scaleY(0.88);
    filter: blur(1.1px);
  }
  100% {
    transform: translateY(-7px) scaleY(1.14);
    filter: blur(0.7px);
  }
}

@keyframes lottery-powerball-gold-lock {
  0% {
    color: #fff;
    background: #fff;
    transform: translateY(-7px) rotate(-16deg) scale(0.78);
    filter: brightness(2.5);
  }
  34% {
    transform: translateY(1px) rotate(7deg) scale(1.24);
    filter: brightness(1.85) saturate(1.35);
  }
  64% {
    transform: translateY(-1px) rotate(-3deg) scale(0.96);
    filter: brightness(1.12);
  }
  100% {
    transform: translateY(0) rotate(0) scale(1);
    filter: brightness(1);
  }
}

@media (min-width: 760px) {
  .fortune-unified .fortune-ritual {
    min-height: 118px;
    padding-top: 3px;
  }

  .fortune-vessel-slot {
    width: 136px;
    scale: 0.86;
  }

  .fortune-unified.has-result .fortune-ritual {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 12px;
  }

  .fortune-unified.has-result .fortune-outcome,
  .fortune-outcome {
    width: 112px;
    height: 144px;
    min-height: 144px;
  }
}

@media (max-width: 640px) {
  .fortune-draw-stage {
    min-height: 0;
  }

  .fortune-draw-stage.fortune-unified {
    gap: 3px;
    padding: 7px 8px;
  }

  .fortune-stage-label {
    gap: 5px;
  }

  .fortune-stage-label small {
    width: 68%;
    font-size: 0.4rem;
  }

  .fortune-unified .fortune-ritual {
    min-height: 98px;
    padding-top: 0;
  }

  .fortune-vessel-slot {
    width: 104px;
    margin-block: -7px;
    scale: 0.82;
  }

  .fortune-unified.has-result .fortune-ritual {
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 3px;
  }

  .fortune-unified.has-result .fortune-outcome,
  .fortune-outcome {
    width: 94px;
    height: 122px;
    min-height: 122px;
    padding: 8px 6px 7px;
  }

  .fortune-auspice {
    font-size: 1.12rem;
  }

  .fortune-unified.has-result:not(.is-interpreted) .fortune-interpret-button {
    min-height: 38px;
  }

  .income-history-panel.admin-calendar {
    gap: 9px;
    margin: 0 12px 12px;
    padding: 11px;
  }

  .income-history-panel .ledger-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .income-history-panel .ledger-summary article {
    padding: 9px 8px;
  }

  .income-history-panel .ledger-summary strong {
    font-size: 0.78rem;
  }

  .ledger-board {
    gap: 7px;
    padding: 8px;
  }

  .ledger-chart {
    height: 116px;
    gap: 3px;
  }

  .ledger-chart-column {
    grid-template-rows: 15px minmax(0, 1fr) 16px;
    gap: 2px;
  }

  .ledger-chart-column > b {
    font-size: 0.4rem;
  }

  .ledger-chart-column > small {
    font-size: 0.41rem;
  }

  .ledger-chart-column > i {
    width: min(22px, 66%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fortune-celebration-spark,
  .lottery-digits[data-mode="powerball"] .lottery-reel.is-locked {
    animation-duration: 1ms !important;
  }
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 22% 18%, rgba(57, 248, 143, 0.14), transparent 30%),
    linear-gradient(145deg, #07110f 0%, #101817 43%, #14120d 100%);
}

body.theme-platform {
  --panel: rgba(21, 36, 52, 0.84);
  --panel-strong: rgba(18, 31, 48, 0.96);
  --line: rgba(255, 241, 150, 0.2);
  --muted: #b8c7d6;
  --accent: #ffd45f;
  --accent-2: #54b8ff;
  background:
    linear-gradient(180deg, rgba(84, 184, 255, 0.28) 0%, transparent 42%),
    linear-gradient(145deg, #102d58 0%, #162447 45%, #1b1713 100%);
}

body.theme-loot {
  --panel: rgba(31, 21, 38, 0.86);
  --panel-strong: rgba(35, 22, 42, 0.96);
  --line: rgba(255, 212, 95, 0.19);
  --muted: #cbb9cf;
  --accent: #ff5a72;
  --accent-2: #ffd45f;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 212, 95, 0.18), transparent 31%),
    linear-gradient(145deg, #1a1028 0%, #2b1730 48%, #14100d 100%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

#burstCanvas {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: none;
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
  padding: 18px;
}

.hero-panel,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(280px, 1fr) auto auto auto;
  min-height: calc(100vh - 36px);
  overflow: hidden;
}

.topbar,
.section-head,
.control-strip {
  padding-inline: clamp(18px, 4vw, 46px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.45rem, 2.5vw, 2.45rem);
  line-height: 1.05;
}

#appTitle {
  max-width: min(620px, calc(100vw - 150px));
  overflow-wrap: anywhere;
}

h2 {
  font-size: 1rem;
}

.top-actions,
.control-strip,
.field-row {
  display: flex;
  align-items: center;
}

.top-actions {
  gap: 10px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.theme-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.theme-option.active {
  border-color: color-mix(in srgb, var(--accent) 72%, white 6%);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
}

.ticker-stage {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 30px clamp(14px, 4vw, 46px);
  isolation: isolate;
}

.ticker-stage::before {
  content: "";
  position: absolute;
  inset: 8% 8%;
  z-index: -1;
  border: 1px solid rgba(57, 248, 143, 0.14);
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 0deg,
      color-mix(in srgb, var(--accent) 18%, transparent) 0deg 8deg,
      transparent 8deg 18deg,
      color-mix(in srgb, var(--accent-2) 16%, transparent) 18deg 25deg,
      transparent 25deg 42deg
    );
  mask-image: radial-gradient(circle, transparent 0 38%, #000 40% 68%, transparent 70%);
  animation: intake 12s linear infinite;
  animation-play-state: paused;
  opacity: 0.7;
}

.scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms ease;
}

body.theme-suction .scene-suction,
body.theme-platform .scene-platform,
body.theme-loot .scene-loot {
  opacity: 1;
}

.scene-suction span {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--accent-2);
  box-shadow: 0 0 20px var(--accent-2);
  animation: orbit 4.8s linear infinite;
  animation-play-state: paused;
}

.scene-suction span:nth-child(1) {
  left: 16%;
  top: 20%;
}

.scene-suction span:nth-child(2) {
  right: 14%;
  top: 24%;
  animation-duration: 6.2s;
}

.scene-suction span:nth-child(3) {
  left: 20%;
  bottom: 18%;
  animation-duration: 5.4s;
  display: none;
}

.skyline {
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 255, 255, 0.1) 8% 15%, transparent 15% 27%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 18px, transparent 18px 42px);
}

.coin-block {
  position: absolute;
  left: calc(50% - 28px);
  bottom: 17%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 3px solid #7b4d14;
  border-radius: 8px;
  color: #4b2907;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 38%),
    #f6b13c;
  font-size: 1.6rem;
  font-weight: 1000;
  box-shadow: 0 10px 0 #7b4d14;
}

.coin-block.bump {
  animation: block-bump 260ms ease-out;
}

.pixel-floor {
  position: absolute;
  inset: auto 0 0;
  height: 46px;
  background:
    linear-gradient(180deg, #49c06a 0 9px, transparent 9px),
    repeating-linear-gradient(90deg, #8b5732 0 32px, #6e3f25 32px 64px);
}

.chest {
  position: absolute;
  left: calc(50% - 52px);
  bottom: 14%;
  width: 104px;
  height: 70px;
  border: 2px solid rgba(255, 212, 95, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #9b3650 0 46%, #5e2442 46% 100%);
  box-shadow: 0 18px 60px rgba(255, 90, 114, 0.35);
}

.chest span {
  position: absolute;
  left: calc(50% - 12px);
  top: 28px;
  width: 24px;
  height: 20px;
  border-radius: 4px;
  background: var(--accent-2);
}

.chest.open {
  animation: chest-pop 520ms ease-out;
}

.loot-glow {
  position: absolute;
  left: calc(50% - 110px);
  bottom: 7%;
  width: 220px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 212, 95, 0.28), transparent 65%);
  animation: glow-pulse 1.5s ease-in-out infinite;
  animation-play-state: paused;
}

.is-running .ticker-stage::before,
.is-running .scene-suction span,
.is-running .loot-glow {
  animation-play-state: running;
}

.live-label {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: 999px;
  color: #dfffe9;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.ticker-stage > .live-label.is-terminal-status {
  justify-self: center;
  min-height: 26px;
  margin-left: 0;
  padding: 4px 10px;
  transform: none;
  color: var(--muted);
  font-size: 0.68rem;
}

.live-label.is-terminal-status .live-dot {
  width: 7px;
  height: 7px;
  background: var(--muted);
  box-shadow: none;
  animation: none;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
}

.is-running .live-dot {
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
  animation: blink 1s steps(2) infinite;
}

.money-wrap {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(8px, 1.6vw, 16px);
  width: 100%;
  min-height: clamp(92px, 18vw, 190px);
  text-align: center;
}

.currency {
  color: var(--accent-2);
  font-size: clamp(2rem, 5vw, 5.4rem);
  font-weight: 900;
  text-shadow: 0 0 28px rgba(255, 212, 95, 0.45);
}

.money-ticker {
  max-width: 100%;
  color: #f6fff8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(4rem, 13vw, 11.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow:
    0 0 18px rgba(57, 248, 143, 0.45),
    0 0 60px rgba(57, 248, 143, 0.24);
  transform-origin: center;
  transition: color 140ms ease;
}

.money-ticker.stopwatch-ticker {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  perspective: 520px;
}

.stopwatch-character {
  display: inline-grid;
  place-items: center;
}

.stopwatch-digit {
  position: relative;
  isolation: isolate;
  width: 0.62em;
  height: 0.94em;
  overflow: hidden;
  line-height: 0.94;
  transform-origin: 50% 55%;
}

.stopwatch-digit::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  content: attr(data-previous);
  opacity: 0;
  pointer-events: none;
}

.stopwatch-digit.is-ticking {
  animation: stopwatch-digit-in 190ms cubic-bezier(0.16, 0.78, 0.28, 1) both;
}

.stopwatch-digit.is-ticking::before {
  animation: stopwatch-digit-out 190ms cubic-bezier(0.16, 0.78, 0.28, 1) both;
}

.stopwatch-separator {
  min-width: 0.31em;
  line-height: 0.94;
}

.stopwatch-separator.is-decimal {
  min-width: 0.28em;
}

.stopwatch-digit.is-fraction {
  color: color-mix(in srgb, var(--accent) 82%, white 18%);
}

.is-running .money-ticker.stopwatch-ticker .stopwatch-digit.is-fraction {
  text-shadow:
    0 0 13px rgba(57, 248, 143, 0.6),
    0 0 36px rgba(57, 248, 143, 0.28);
}

.money-ticker.boom {
  color: var(--accent-2);
  animation: boom 720ms cubic-bezier(0.17, 0.84, 0.44, 1);
}

.is-charging .money-ticker {
  color: #f6fff8;
  text-shadow:
    0 0 18px rgba(84, 184, 255, 0.72),
    0 0 70px rgba(57, 248, 143, 0.36);
  animation: star-charge 620ms steps(2, end) infinite;
}

.is-charging .currency {
  opacity: 0.32;
  filter: saturate(0.6);
}

.money-ticker.charge-release {
  color: #54b8ff;
}

.money-ticker.slot-reveal {
  color: var(--accent-2);
  animation: slot-reel var(--slot-duration, 1180ms) cubic-bezier(0.12, 0.78, 0.18, 1);
}

.is-slot-reveal .money-wrap {
  animation: money-pool-collect var(--charge-release-duration, 820ms) cubic-bezier(0.12, 0.78, 0.18, 1);
}

.charge-coin-stream {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
}

.charge-coin-stream span {
  position: absolute;
  left: 50%;
  top: 52%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #8b5b0a;
  border-radius: 50%;
  color: #573407;
  background: linear-gradient(145deg, #fff2a8, #ffd45f 46%, #e89b22);
  box-shadow:
    0 4px 0 #8b5b0a,
    0 0 24px rgba(255, 212, 95, 0.72);
  font-weight: 1000;
  opacity: 0;
  transform: translate(calc(-50% + var(--x)), 18px) scale(0.72);
  will-change: transform, opacity;
}

.is-charging .charge-coin-stream,
.is-slot-reveal .charge-coin-stream {
  opacity: 1;
}

.is-charging .charge-coin-stream span {
  animation: charge-coin-hop 760ms cubic-bezier(0.22, 0.82, 0.28, 1) infinite;
  animation-delay: calc(var(--i) * -92ms);
}

.is-slot-reveal .charge-coin-stream span {
  animation: charge-coin-cash-in 920ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
  animation-delay: calc(var(--i) * 44ms);
}

.charge-gain {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: calc(100% + 10px);
  z-index: 7;
  display: inline-grid;
  place-items: center;
  min-width: 122px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 212, 95, 0.72);
  border-radius: 999px;
  color: #291607;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), transparent 38%),
    linear-gradient(90deg, var(--amber), var(--green));
  box-shadow:
    0 14px 44px rgba(255, 212, 95, 0.34),
    0 0 76px rgba(57, 248, 143, 0.26);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.9rem, 2vw, 1.35rem);
  font-weight: 1000;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px) scale(0.72);
}

.charge-gain.show {
  animation: gain-collect var(--gain-duration, 1180ms) cubic-bezier(0.12, 0.78, 0.18, 1) forwards;
}

.combo-burst {
  position: absolute;
  left: 50%;
  top: 30%;
  z-index: 2;
  min-width: 160px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 58%, transparent);
  border-radius: 999px;
  color: var(--ink);
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 12px 42px color-mix(in srgb, var(--accent) 28%, transparent);
  font-size: 1rem;
  font-weight: 1000;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 22px) scale(0.92);
}

.combo-burst.show {
  animation: combo-pop 820ms ease-out;
}

.per-second {
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-strip {
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
  padding-bottom: 24px;
}

.merit-stats {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  position: absolute;
  top: 12px;
  bottom: auto;
  right: clamp(16px, 3vw, 36px);
  left: clamp(16px, 3vw, 36px);
  z-index: 4;
  pointer-events: none;
}

.merit-stats > div {
  display: grid;
  position: relative;
  gap: 1px;
  min-width: 150px;
  padding: 11px 13px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 224, 113, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 244, 184, 0.2), transparent 42%),
    linear-gradient(90deg, rgba(255, 212, 95, 0.14), transparent 68%),
    rgba(4, 14, 12, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 248, 209, 0.12), 0 10px 24px rgba(0, 0, 0, 0.18);
  transform-origin: center;
}

.rank-badge {
  position: absolute;
  top: 8px;
  right: 9px;
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 34px;
  color: #fff4c4;
  text-align: center;
}

.rank-badge i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(255, 236, 154, 0.8);
  border-radius: 50%;
  color: #402208;
  background: linear-gradient(135deg, #fff5bd, var(--amber));
  box-shadow: 0 3px 10px rgba(255, 212, 95, 0.24);
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 1000;
}

.rank-badge b {
  min-width: 18px;
  color: #fff4c4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.58rem;
  font-weight: 1000;
  line-height: 1;
}

.rank-badge-fortune i {
  border-color: rgba(255, 197, 152, 0.86);
  color: #4c160a;
  background: linear-gradient(135deg, #fff0b0, #ff9762);
  box-shadow: 0 3px 10px rgba(255, 123, 87, 0.25);
}

.rank-badge[data-rank="none"] i {
  border-color: rgba(220, 238, 229, 0.32);
  color: #b7c6bd;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.merit-stat small {
  right: 49px;
  bottom: 8px;
  max-width: calc(100% - 56px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merit-stat.is-rank-up .rank-badge i {
  animation: rank-badge-unlock 980ms cubic-bezier(0.18, 0.84, 0.28, 1) both;
}

.utility-action.is-auto-managed {
  filter: saturate(0.68) brightness(0.82);
}

.utility-action:disabled {
  cursor: default;
  opacity: 0.78;
}

.merit-stats > div::after {
  content: "";
  position: absolute;
  inset: -35% auto -35% -46%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.52), transparent);
  opacity: 0;
  pointer-events: none;
  transform: skewX(-18deg);
}

.merit-stats span {
  color: #e4d7af;
  font-size: 0.68rem;
  font-weight: 850;
}

.merit-stats strong {
  overflow: hidden;
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.32rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merit-stat-merit strong {
  color: var(--amber);
}

.merit-stat-fortune {
  justify-items: end;
  text-align: right;
  overflow: visible !important;
  border-color: rgba(255, 142, 103, 0.62) !important;
  background:
    linear-gradient(225deg, rgba(255, 90, 114, 0.28), transparent 54%),
    linear-gradient(270deg, rgba(255, 185, 94, 0.14), transparent 70%),
    rgba(4, 14, 12, 0.88) !important;
}

.merit-stat-fortune strong {
  color: #ffbd72;
}

.merit-stats small {
  position: absolute;
  right: 9px;
  bottom: 8px;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 800;
}

.merit-stats .merit-stat small {
  right: 49px;
  bottom: 8px;
  max-width: calc(100% - 56px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes rank-badge-unlock {
  0% { transform: scale(0.7) rotate(-18deg); filter: brightness(1); }
  42% { transform: scale(1.45) rotate(12deg); filter: brightness(1.65); }
  72% { transform: scale(0.94) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); filter: brightness(1); }
}

.action-tick-flash {
  position: absolute;
  top: -39px;
  right: -12px;
  z-index: 5;
  display: grid;
  place-items: center;
  min-width: 46px;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 246, 185, 0.84);
  border-radius: 7px;
  color: #2d1905;
  background: linear-gradient(135deg, #fff2a8, var(--amber) 64%, #f5a333);
  box-shadow: 0 8px 18px rgba(255, 212, 95, 0.34);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 1000;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.72);
  white-space: nowrap;
}

.fortune-action .action-tick-flash {
  min-width: 60px;
  border-color: rgba(255, 239, 182, 0.86);
  color: #3a1308;
  background: linear-gradient(135deg, #fff2ad, #ffbd72 60%, #ff845e);
  box-shadow: 0 8px 18px rgba(255, 111, 91, 0.36);
}

.action-tick-flash.show {
  animation: action-tick-rise 760ms cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

.merit-stat.is-rewarding {
  animation: stat-card-beat 760ms cubic-bezier(0.18, 0.84, 0.28, 1) both;
}

.merit-stat.is-rewarding strong {
  animation: stat-number-pop 760ms cubic-bezier(0.18, 0.84, 0.28, 1) both;
}

.merit-stat.is-rewarding::after {
  animation: stat-card-shine 680ms ease-out both;
}

.utility-action.is-rewarding {
  animation: action-button-beat 760ms cubic-bezier(0.18, 0.84, 0.28, 1) both;
}

.utility-action.is-rewarding b {
  animation: action-badge-beat 760ms cubic-bezier(0.18, 0.84, 0.28, 1) both;
}

@media (min-width: 1201px) {
  .merit-stats {
    right: calc(clamp(18px, 4vw, 46px) + 12px);
    left: calc(clamp(18px, 4vw, 46px) + 12px);
  }
}

.primary-button,
.ghost-button,
.burst-button,
.charge-button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.primary-button {
  color: var(--ink);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 34px rgba(57, 248, 143, 0.24);
}

.primary-button.is-paused-action {
  color: #1b0b09;
  background: linear-gradient(90deg, var(--red), var(--amber));
  box-shadow: 0 14px 34px rgba(255, 90, 114, 0.2);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.utility-action {
  position: relative;
  min-width: 82px;
  min-height: 44px;
  overflow: visible;
  border: 1px solid rgba(222, 255, 235, 0.2);
  border-radius: 8px;
  color: #effff4;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  font-weight: 900;
}

.merit-action {
  min-width: 82px;
  padding: 0 12px;
  border-color: rgba(255, 239, 153, 0.8);
  border-radius: 8px;
  color: #2b1805;
  background: linear-gradient(135deg, #fff0a0, var(--amber) 48%, #f4a62b);
  box-shadow: 0 10px 24px rgba(255, 212, 95, 0.24);
  font-size: 0.78rem;
}

.merit-action:hover {
  filter: brightness(1.08);
}

.utility-action b {
  position: absolute;
  top: -8px;
  right: -10px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid rgba(255, 245, 187, 0.74);
  border-radius: 6px;
  color: #251708;
  background: linear-gradient(135deg, var(--amber), #fff1a3);
  box-shadow: 0 4px 14px rgba(255, 212, 95, 0.24);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.58rem;
  font-weight: 1000;
  line-height: 1;
}

.merit-action b {
  top: -7px;
  right: -9px;
  min-width: 24px;
  height: 18px;
  border-color: rgba(255, 250, 206, 0.9);
  color: #fff9d4;
  background: #4c2a08;
  box-shadow: 0 3px 10px rgba(76, 42, 8, 0.36);
  font-size: 0.55rem;
}

.fortune-action {
  border-color: rgba(255, 155, 116, 0.68);
  color: #fff7e8;
  background: linear-gradient(135deg, #ff5a72, #ff814b 56%, #ffcc5c);
  box-shadow: 0 10px 24px rgba(255, 90, 114, 0.22);
}

.fortune-action b {
  color: #3f1905;
  border-color: rgba(255, 240, 170, 0.86);
  background: linear-gradient(135deg, #fff2a6, var(--amber));
  box-shadow: 0 4px 14px rgba(255, 212, 95, 0.28);
}

.burst-button {
  color: #1b0b09;
  background: linear-gradient(90deg, var(--red), var(--amber));
}

.charge-button {
  min-width: 138px;
  color: var(--ink);
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent-2) 28%, transparent);
}

.charge-button.ready {
  animation: charge-ready 1.1s ease-in-out infinite;
}

.charge-button.charging {
  color: #efffff;
  background: linear-gradient(90deg, #1677ff, var(--accent));
  box-shadow:
    0 14px 34px rgba(84, 184, 255, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.compact {
  min-height: 36px;
  padding-inline: 12px;
}

.full {
  width: 100%;
}

.personal-products-panel {
  width: calc(100% - 430px);
  max-width: 660px;
  margin: 0 0 18px clamp(18px, 4vw, 46px);
  padding: 12px;
  border: 1px solid rgba(57, 248, 143, 0.3);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(57, 248, 143, 0.08), rgba(255, 212, 95, 0.035));
  box-shadow: inset 0 0 24px rgba(57, 248, 143, 0.035);
}

.personal-products-head,
.personal-products-head > div,
.personal-products-title {
  display: flex;
  align-items: center;
}

.personal-products-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.personal-products-head > div {
  min-width: 0;
  gap: 10px;
}

.personal-products-title {
  gap: 6px;
  color: #dfffee;
  font-size: 0.72rem;
  font-weight: 950;
}

.personal-products-title i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(57, 248, 143, 0.72);
}

.personal-products-head strong {
  overflow: hidden;
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-products-settings {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid rgba(57, 248, 143, 0.26);
  border-radius: 6px;
  color: var(--green);
  background: rgba(57, 248, 143, 0.07);
  font-size: 0.84rem;
}

.personal-products-settings.active {
  color: #102018;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--amber));
}

.personal-target-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) 54px;
  gap: 5px;
  margin-bottom: 8px;
}

.personal-target-form[hidden] {
  display: none;
}

.personal-target-form input,
.personal-target-form label,
.personal-target-form button {
  height: 34px;
}

.personal-target-form input {
  padding-inline: 8px;
  font-size: 0.7rem;
}

.personal-target-form label {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.22);
}

.personal-target-form label span {
  padding-left: 7px;
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 900;
}

.personal-target-form label input {
  height: 32px;
  border: 0;
  background: transparent;
}

.personal-target-form button {
  border-radius: 7px;
  color: #102018;
  background: linear-gradient(135deg, var(--green), var(--amber));
  font-size: 0.68rem;
  font-weight: 950;
}

.personal-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 188px;
  overflow: auto;
}

.personal-product {
  --personal-product-progress: 0%;
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(74px, 0.78fr);
  align-items: center;
  gap: 4px 7px;
  min-width: 0;
  padding: 7px 28px 7px 7px;
  border: 1px solid rgba(57, 248, 143, 0.13);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.14);
}

.personal-product-delete {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 90, 114, 0.24);
  border-radius: 5px;
  color: #ff9cab;
  background: rgba(255, 90, 114, 0.08);
  font-size: 0.76rem;
  font-weight: 900;
}

.personal-product-icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(57, 248, 143, 0.45);
  border-radius: 6px;
  color: #102018;
  background: linear-gradient(135deg, var(--green), var(--amber));
  font-size: 0.68rem;
  font-weight: 1000;
}

.personal-product > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.personal-product > div:nth-of-type(2) {
  justify-items: end;
  text-align: right;
}

.personal-product strong,
.personal-product small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-product strong {
  color: #eafff2;
  font-size: 0.68rem;
}

.personal-product > div:nth-of-type(2) strong {
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.personal-product small {
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 800;
}

.personal-product-progress {
  position: relative;
  grid-column: 2 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.personal-product-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--personal-product-progress);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transition: width 160ms linear;
}

.personal-product.hit {
  animation: personal-product-hit 560ms ease-out;
}

.personal-products-empty,
.personal-products-more {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.personal-products-empty {
  grid-column: 1 / -1;
  padding: 10px;
  text-align: center;
}

.personal-products-more {
  margin-top: 7px;
  text-align: right;
}

.celebrity-panel {
  --celebrity-power: 8%;
  position: absolute;
  top: 104px;
  right: clamp(18px, 4vw, 46px);
  z-index: 3;
  width: min(360px, calc(100% - 36px));
  overflow: hidden;
  isolation: isolate;
  padding: 14px;
  border: 1px solid rgba(84, 184, 255, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(128deg, rgba(84, 184, 255, 0.18), transparent 42%),
    linear-gradient(312deg, rgba(255, 90, 114, 0.17), transparent 46%),
    rgba(3, 8, 17, 0.94);
  box-shadow:
    0 0 0 1px rgba(255, 212, 95, 0.13),
    0 22px 62px rgba(0, 0, 0, 0.48),
    0 0 34px rgba(84, 184, 255, 0.18),
    inset 0 0 42px rgba(84, 184, 255, 0.08);
  backdrop-filter: blur(16px);
}

.celebrity-panel::before {
  content: "";
  position: absolute;
  inset: -34% -55%;
  z-index: 1;
  background: linear-gradient(108deg, transparent 38%, rgba(84, 184, 255, 0.3) 48%, transparent 58%);
  pointer-events: none;
  transform: translateX(-55%);
  animation: celebrity-scan 2.8s ease-in-out infinite;
}

.celebrity-panel::after {
  content: "";
  position: absolute;
  inset: auto 8% -1px;
  z-index: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--amber), var(--red), transparent);
  box-shadow: 0 0 22px var(--blue);
  animation: celebrity-edge 1.6s ease-in-out infinite;
}

.celebrity-panel > :not(.celebrity-streaks):not(.celebrity-grid) {
  position: relative;
  z-index: 2;
}

.celebrity-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(84, 184, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 184, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.7;
  transform: perspective(260px) rotateX(52deg) scale(1.35) translateY(24%);
  transform-origin: bottom;
  animation: celebrity-grid-flow 2.2s linear infinite;
}

.celebrity-streaks {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.celebrity-streaks span {
  position: absolute;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #8b5b0a;
  border-radius: 50%;
  color: #573407;
  background: linear-gradient(145deg, #fff2a8, #ffd45f 48%, #e89b22);
  box-shadow: 0 0 18px rgba(255, 212, 95, 0.46);
  font-size: 0.68rem;
  font-weight: 1000;
  opacity: 0;
  animation: celebrity-coin-fly 1.85s linear infinite;
}

.celebrity-streaks span:nth-child(1) {
  top: 28%;
  animation-delay: -0.2s;
}

.celebrity-streaks span:nth-child(2) {
  top: 48%;
  animation-delay: -1.1s;
}

.celebrity-streaks span:nth-child(3) {
  top: 68%;
  animation-delay: -1.7s;
}

.celebrity-streaks span:nth-child(4) {
  top: 82%;
  animation-delay: -2.15s;
}

.celebrity-streaks span:nth-child(5) {
  top: 38%;
  animation-delay: -0.65s;
}

.celebrity-streaks span:nth-child(6) {
  top: 90%;
  animation-delay: -1.42s;
}

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

.celebrity-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d8f3ff;
  font-size: 0.78rem;
  font-weight: 1000;
}

.celebrity-title i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 14px var(--red);
  animation: celebrity-live 780ms steps(2, end) infinite;
  animation-play-state: paused;
}

.is-running .celebrity-title i {
  animation-play-state: running;
}

.celebrity-head select {
  min-width: 142px;
  border-color: rgba(255, 212, 95, 0.38);
  background: rgba(2, 5, 12, 0.76);
  box-shadow: inset 0 0 16px rgba(255, 212, 95, 0.05);
}

select {
  min-width: 138px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.42);
  outline: none;
}

.celebrity-versus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}

.celebrity-fighter {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 66px;
  padding: 8px;
  border: 1px solid rgba(84, 184, 255, 0.34);
  border-radius: 7px;
  overflow: hidden;
  background: rgba(84, 184, 255, 0.08);
}

.celebrity-fighter.is-star {
  border-color: rgba(255, 90, 114, 0.4);
  background: rgba(255, 90, 114, 0.09);
}

.celebrity-fighter > span {
  position: absolute;
  left: 8px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--blue);
  font-size: 0.57rem;
  font-weight: 1000;
  box-shadow: 0 0 14px currentColor;
}

.celebrity-fighter.is-star > span {
  color: var(--red);
}

.celebrity-fighter small {
  min-height: 24px;
  padding-left: 30px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 24px;
}

.celebrity-fighter strong {
  align-self: end;
  overflow: hidden;
  color: #e9f9ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.celebrity-fighter.is-star strong {
  color: #ffe9a9;
}

.celebrity-vs {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--amber);
  border-radius: 7px;
  color: #231407;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 0 24px rgba(255, 212, 95, 0.52);
  transform: rotate(45deg);
  animation: celebrity-vs-pulse 820ms steps(2, end) infinite;
}

.celebrity-vs b {
  font-size: 0.75rem;
  transform: rotate(-45deg);
}

.celebrity-vs i {
  position: absolute;
  inset: -8px;
  border: 1px dashed rgba(255, 212, 95, 0.5);
  border-radius: 8px;
  animation: celebrity-vs-spin 3s linear infinite;
}

.celebrity-money {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 7px;
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 212, 95, 0.3);
  border-radius: 7px;
  color: var(--accent-2);
  background: rgba(255, 212, 95, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent-2) 42%, transparent);
}

.celebrity-money small {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 900;
}

.is-running .celebrity-money {
  animation: celebrity-money-glow 1.4s ease-in-out infinite;
}

.celebrity-money span {
  font-size: 1.1rem;
  font-weight: 1000;
}

.celebrity-money strong {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1;
  text-overflow: ellipsis;
}

.celebrity-money.pop strong {
  animation: mini-punch 220ms ease-out;
}

.celebrity-race {
  display: grid;
  gap: 6px;
  margin-top: 11px;
}

.celebrity-race-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.celebrity-race-head strong {
  color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  text-shadow: 0 0 12px color-mix(in srgb, var(--accent-2) 56%, transparent);
}

.celebrity-race-track {
  position: relative;
  height: 10px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.celebrity-race-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--celebrity-power);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--amber), var(--red));
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent-2) 62%, transparent);
  transition: width 300ms ease-out;
}

.celebrity-race-track i {
  position: absolute;
  left: clamp(4px, calc(var(--celebrity-power) - 9px), calc(100% - 14px));
  top: 50%;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #30180b;
  background: var(--accent-2);
  box-shadow: 0 0 18px var(--accent-2);
  font-size: 0.65rem;
  font-style: normal;
  transform: translateY(-50%);
  transition: left 300ms ease-out;
}

.celebrity-meta {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 8px;
  margin-top: 10px;
}

.celebrity-meta span {
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(2, 5, 12, 0.62);
  font-size: 0.76rem;
  font-weight: 900;
}

.celebrity-panel p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

/* Lightweight wealth radar: one moving layer, no continuous nested effects. */
.celebrity-panel {
  width: min(380px, calc(100% - 36px));
  border-color: rgba(84, 184, 255, 0.5);
  background:
    linear-gradient(135deg, rgba(84, 184, 255, 0.1), transparent 46%),
    rgba(3, 9, 16, 0.96);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.46), inset 0 0 28px rgba(84, 184, 255, 0.05);
}

.celebrity-panel::before {
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--amber));
  opacity: 0.9;
  transform: none;
  animation: none;
}

.celebrity-panel::after {
  inset: auto 12px 0;
  height: 1px;
  opacity: 0.65;
  animation: none;
}

.celebrity-panel > .celebrity-scanline {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.celebrity-scanline::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -36%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(84, 184, 255, 0.14), transparent);
  transform: skewX(-18deg);
}

.is-running .celebrity-scanline::after {
  animation: celebrity-radar-scan 3.8s linear infinite;
}

.celebrity-title {
  color: #bcecff;
}

.celebrity-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.celebrity-head-actions select {
  width: clamp(118px, 12vw, 142px);
  min-width: 0;
}

.celebrity-reset {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(84, 184, 255, 0.38);
  border-radius: 7px;
  color: #d8f6ff;
  background: rgba(84, 184, 255, 0.08);
  font-size: 1.1rem;
  font-weight: 900;
}

.celebrity-reset.active {
  border-color: var(--green);
  color: var(--green);
  background: rgba(57, 248, 143, 0.12);
}

.celebrity-terminal {
  margin-top: 12px;
  padding: 10px 0 12px;
  border-top: 1px solid rgba(84, 184, 255, 0.17);
  border-bottom: 1px solid rgba(84, 184, 255, 0.17);
}

.celebrity-terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
}

.celebrity-terminal-head b {
  color: var(--green);
  font-size: 0.6rem;
}

.celebrity-terminal .celebrity-money {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.celebrity-terminal .celebrity-money strong {
  overflow: hidden;
  color: #e9fbff;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.celebrity-session {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.celebrity-session > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 850;
}

.celebrity-session b {
  overflow: hidden;
  color: #dfffe9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.celebrity-session button {
  min-width: 72px;
  height: 30px;
  border: 1px solid rgba(57, 248, 143, 0.56);
  border-radius: 7px;
  color: #102018;
  background: linear-gradient(135deg, var(--green), var(--amber));
  box-shadow: 0 7px 18px rgba(57, 248, 143, 0.18);
  font-size: 0.66rem;
  font-weight: 1000;
}

.celebrity-session button:disabled {
  border-color: rgba(84, 184, 255, 0.42);
  color: #bbecff;
  background: rgba(84, 184, 255, 0.12);
  box-shadow: none;
}

.celebrity-products {
  display: grid;
  gap: 6px;
  max-height: 230px;
  margin-top: 10px;
  padding-right: 2px;
  overflow: auto;
}

.celebrity-product-settings {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid rgba(57, 248, 143, 0.24);
  border-radius: 7px;
  background: rgba(2, 8, 12, 0.88);
}

.celebrity-product-settings[hidden] {
  display: none;
}

.celebrity-product-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.celebrity-product-settings-head strong {
  color: #e9fbff;
  font-size: 0.72rem;
}

.celebrity-product-settings-head span {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
}

.celebrity-custom-form {
  display: grid;
  gap: 6px;
}

.celebrity-custom-form label {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.celebrity-custom-form label > span {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 800;
}

.celebrity-custom-form input,
.celebrity-custom-form select {
  width: 100%;
  min-width: 0;
  height: 32px;
  border-radius: 6px;
  padding: 0 7px;
  font-size: 0.68rem;
}

.celebrity-custom-target-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 48px;
  align-items: end;
  gap: 5px;
}

.celebrity-custom-target-row button {
  height: 32px;
  border-radius: 6px;
  color: #102018;
  background: linear-gradient(135deg, var(--green), var(--amber));
  font-size: 0.68rem;
  font-weight: 1000;
}

.celebrity-product-divider {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(84, 184, 255, 0.14);
}

.celebrity-product-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr) 34px;
  align-items: end;
  gap: 5px;
}

.celebrity-product-form label {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.celebrity-product-form label > span {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 800;
}

.celebrity-product-form input,
.celebrity-product-editor input {
  height: 32px;
  border-radius: 6px;
  padding: 0 7px;
  font-size: 0.68rem;
}

.celebrity-product-form > button,
.celebrity-product-editor button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--green), var(--amber));
  font-size: 1rem;
  font-weight: 1000;
}

.celebrity-product-editor {
  display: grid;
  gap: 5px;
  max-height: 150px;
  overflow: auto;
}

.celebrity-product-editor article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.76fr) 32px;
  align-items: center;
  gap: 5px;
}

.celebrity-editor-price {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
}

.celebrity-editor-price small {
  padding-left: 6px;
  color: var(--amber);
  font-size: 0.66rem;
  font-weight: 900;
}

.celebrity-editor-price input {
  border: 0;
  background: transparent;
}

.celebrity-product-editor button {
  color: #ffe9ee;
  background: rgba(255, 90, 114, 0.16);
}

.celebrity-product {
  --product-progress: 0%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(92px, 0.9fr);
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(84, 184, 255, 0.15);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.celebrity-product-icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 212, 95, 0.48);
  border-radius: 7px;
  color: #211407;
  background: linear-gradient(135deg, var(--amber), var(--green));
  font-size: 0.66rem;
  font-weight: 1000;
}

.celebrity-product > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.celebrity-product > div:nth-of-type(2) {
  justify-items: end;
  text-align: right;
}

.celebrity-product > div > strong {
  overflow: hidden;
  color: #eaf9ff;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.celebrity-product > div:nth-of-type(2) > strong {
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
}

.celebrity-product small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.celebrity-product-progress {
  position: relative;
  grid-column: 2 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.celebrity-product-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--product-progress);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--amber));
  transition: width 140ms linear;
}

.celebrity-product.hit {
  animation: celebrity-product-hit 520ms ease-out;
}

.celebrity-product.hit > div:nth-of-type(2) > strong {
  color: var(--green);
}

.is-running .celebrity-money,
.celebrity-money.pop strong,
.celebrity-panel.star-dominating .celebrity-fighter.is-star {
  animation: none;
}

.celebrity-speedboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding-top: 11px;
}

.celebrity-speedboard article {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.celebrity-speedboard article:last-child {
  text-align: right;
}

.celebrity-speedboard span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.celebrity-speedboard strong {
  overflow: hidden;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.celebrity-speedboard article:last-child strong {
  color: var(--amber);
}

.celebrity-speedboard > i {
  color: var(--green);
  font-size: 1rem;
  font-style: normal;
  text-align: center;
}

.celebrity-race {
  margin-top: 10px;
}

.celebrity-race-track {
  height: 7px;
}

.celebrity-meta {
  grid-template-columns: 1fr 1fr;
  margin-top: 9px;
}

.celebrity-meta span {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.68rem;
}

.celebrity-meta span:last-child {
  text-align: right;
}

.celebrity-panel.user-leading {
  border-color: rgba(57, 248, 143, 0.62);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.46), inset 0 0 24px rgba(57, 248, 143, 0.06);
}

.celebrity-panel.user-leading {
  border-color: rgba(57, 248, 143, 0.78);
  box-shadow: 0 0 36px rgba(57, 248, 143, 0.22), 0 22px 62px rgba(0, 0, 0, 0.48);
}

.celebrity-panel.star-dominating .celebrity-fighter.is-star {
  animation: celebrity-star-charge 1.15s ease-in-out infinite;
}

.high-player-leaderboard {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(84, 184, 255, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(84, 184, 255, 0.1), transparent 42%),
    rgba(3, 9, 16, 0.94);
  box-shadow: inset 0 0 28px rgba(84, 184, 255, 0.05);
}

.high-player-leaderboard-head,
.leaderboard-actions,
.high-player-card-head,
.high-player-card-rate {
  display: flex;
  align-items: center;
}

.high-player-leaderboard-head {
  justify-content: space-between;
  gap: 12px;
}

.leaderboard-kicker {
  color: var(--blue);
  font-size: 0.62rem;
  font-weight: 950;
}

.high-player-leaderboard h2 {
  margin-top: 3px;
  color: #e9fbff;
  font-size: 1rem;
}

.leaderboard-actions {
  gap: 8px;
}

.leaderboard-actions strong {
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.76rem;
}

.high-player-settings {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(84, 184, 255, 0.16);
}

.high-player-settings[hidden] {
  display: none;
}

.high-player-form,
.high-player-editor article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr) 86px 52px;
  align-items: center;
  gap: 6px;
}

.high-player-form input,
.high-player-form select,
.high-player-editor input,
.high-player-editor select {
  width: 100%;
  height: 34px;
  min-width: 0;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 0.72rem;
}

.high-player-form label,
.high-player-editor .high-player-income {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
}

.high-player-form label span,
.high-player-editor .high-player-income small {
  padding-left: 7px;
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 900;
}

.high-player-form label input,
.high-player-editor .high-player-income input {
  border: 0;
  background: transparent;
}

.high-player-form button {
  height: 34px;
  border-radius: 6px;
  color: #102018;
  background: linear-gradient(135deg, var(--green), var(--amber));
  font-size: 0.72rem;
  font-weight: 950;
}

.high-player-editor {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.high-player-editor button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  justify-self: end;
  border: 1px solid rgba(255, 90, 114, 0.3);
  border-radius: 6px;
  color: #ffb1bd;
  background: rgba(255, 90, 114, 0.1);
  font-size: 0.9rem;
  font-weight: 950;
}

.high-player-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.high-player-card,
.high-player-empty {
  border: 1px solid rgba(84, 184, 255, 0.2);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.16);
}

.high-player-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.high-player-card-head {
  gap: 7px;
  min-width: 0;
}

.high-player-rank {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 6px;
  color: #132018;
  background: linear-gradient(135deg, var(--amber), var(--green));
  font-size: 0.68rem;
  font-weight: 1000;
}

.high-player-card-head strong {
  overflow: hidden;
  color: #eaf9ff;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.high-player-card-rate {
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.high-player-card-rate b {
  overflow: hidden;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.high-player-total {
  overflow: hidden;
  color: #e9fbff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.3rem;
  font-weight: 950;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.high-player-empty {
  grid-column: 1 / -1;
  padding: 16px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

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

.section-head span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: min(390px, calc(100% - 36px));
  max-height: none;
  overflow: auto;
  padding: 22px;
  background: var(--panel-strong);
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 40px));
  transition: opacity 180ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.settings-open {
  overflow: hidden;
}

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

.admin-drawer-head {
  position: sticky;
  top: -22px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -22px -22px 14px;
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 19, 17, 0.96);
}

.admin-drawer-head > div {
  display: grid;
  gap: 3px;
}

.admin-drawer-head span {
  color: var(--green);
  font-size: 0.58rem;
  font-weight: 900;
}

.admin-drawer-head h2 {
  font-size: 1.05rem;
}

.admin-close-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.2rem;
}

.app-title-setting {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid rgba(84, 184, 255, 0.18);
  border-radius: 8px;
  background: rgba(84, 184, 255, 0.045);
}

.app-title-setting > span,
.app-title-setting > small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
}

.app-title-setting > small {
  text-align: right;
}

.app-title-setting input {
  height: 34px;
  padding-inline: 8px;
  font-size: 0.72rem;
}

.source-editor {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.ticker-live-income {
  display: flex;
  align-items: center;
  gap: 4px;
  width: min(220px, 100%);
  min-width: 0;
}

.ticker-live-income-amount {
  display: flex;
  align-items: center;
  width: auto;
  flex: 1 1 auto;
  height: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 212, 95, 0.48);
  border-radius: 7px;
  background: rgba(2, 9, 10, 0.78);
  box-shadow: inset 0 0 16px rgba(255, 212, 95, 0.06);
}

.ticker-live-income-amount > span {
  padding-left: 8px;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 950;
}

.ticker-live-income-amount input {
  height: 32px;
  border: 0;
  padding-inline: 5px;
  background: transparent;
  font-size: 0.72rem;
  box-shadow: none;
}

.ticker-live-income > button {
  display: grid;
  place-items: center;
  width: 68px;
  height: 34px;
  flex: 0 0 68px;
  border-radius: 7px;
  color: #102018;
  background: linear-gradient(135deg, var(--green), var(--amber));
  box-shadow: 0 0 18px rgba(255, 212, 95, 0.22);
  font-size: 0.72rem;
  font-weight: 1000;
}

.live-income-winning .ticker-stage::after {
  content: "JACKPOT · 资金注入";
  position: absolute;
  left: 50%;
  top: 6px;
  z-index: 6;
  padding: 5px 10px;
  border: 1px solid rgba(255, 212, 95, 0.62);
  border-radius: 7px;
  color: #211407;
  background: linear-gradient(90deg, var(--amber), var(--green));
  box-shadow: 0 0 42px rgba(255, 212, 95, 0.38);
  font-size: 0.68rem;
  font-weight: 1000;
  transform: translateX(-50%);
  animation: live-income-banner 10s ease both;
}

.live-income-winning .money-wrap {
  animation: live-income-pulse 680ms steps(2, end) infinite;
}

.live-income-winning .charge-coin-stream span {
  top: 18%;
  animation: live-income-coin-rain 920ms cubic-bezier(0.16, 0.86, 0.24, 1) infinite;
  animation-delay: calc(var(--i) * -108ms);
}

.live-income-finale .ticker-stage {
  animation: live-income-finale-stage 1250ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.live-income-finale .ticker-stage::after {
  content: "已入账";
  position: absolute;
  left: 50%;
  top: 6px;
  z-index: 6;
  padding: 7px 15px;
  border: 1px solid rgba(255, 212, 95, 0.7);
  border-radius: 7px;
  color: #251908;
  background: linear-gradient(90deg, var(--amber), var(--green));
  box-shadow: 0 0 38px rgba(255, 212, 95, 0.36);
  font-size: 0.82rem;
  font-weight: 1000;
  transform: translateX(-50%);
  animation: income-settled-banner 1500ms cubic-bezier(0.18, 0.82, 0.26, 1) both;
}

.live-income-finale .money-wrap::before,
.live-income-finale .money-wrap::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: -1;
  width: 120px;
  height: 120px;
  border: 3px solid var(--amber);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.2);
  animation: live-income-finale-ring 1050ms cubic-bezier(0.12, 0.76, 0.2, 1) both;
}

.live-income-finale .money-wrap::after {
  border-color: var(--green);
  animation-delay: 120ms;
}

.money-ticker.jackpot-final {
  color: #fff8c9;
  text-shadow:
    0 0 0.18em rgba(255, 212, 95, 0.92),
    0 0 0.58em rgba(57, 248, 143, 0.72);
  animation: live-income-final-number 1250ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
}

.money-ticker.live-slot-ticker {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  letter-spacing: 0;
}

.live-slot-character {
  display: inline-grid;
  place-items: center;
  min-width: 0.62em;
  font-variant-numeric: tabular-nums;
}

.live-slot-digit {
  min-width: 0.64em;
  border-block: 1px solid rgba(255, 212, 95, 0.34);
  border-radius: 6px;
  background: rgba(2, 8, 10, 0.72);
  box-shadow:
    inset 0 0.12em 0 rgba(255, 255, 255, 0.08),
    inset 0 -0.12em 0 rgba(0, 0, 0, 0.42),
    0 0 0.24em rgba(255, 212, 95, 0.12);
}

.live-slot-digit.waiting {
  opacity: 0;
  transform: translateY(-0.9em) scale(0.62);
  filter: blur(3px);
}

.live-slot-separator {
  min-width: 0.28em;
  color: rgba(255, 255, 255, 0.52);
}

.live-slot-digit.spinning {
  color: var(--amber);
  text-shadow:
    0 -0.55em 0 rgba(255, 212, 95, 0.2),
    0 0.55em 0 rgba(255, 212, 95, 0.18),
    0 0 0.28em rgba(255, 212, 95, 0.68);
  animation:
    live-slot-digit-enter 420ms cubic-bezier(0.2, 0.9, 0.24, 1) both,
    live-slot-digit-spin 120ms steps(2, end) 420ms infinite;
}

.live-slot-digit.locked {
  color: var(--green);
  border-color: rgba(57, 248, 143, 0.7);
  background: rgba(57, 248, 143, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(57, 248, 143, 0.2),
    0 0 0.34em rgba(57, 248, 143, 0.58);
  text-shadow: 0 0 0.25em rgba(57, 248, 143, 0.82);
  animation: live-slot-digit-lock 440ms cubic-bezier(0.2, 0.9, 0.24, 1) both;
}

.income-editor-head {
  min-height: 38px;
}

.income-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-income-button {
  width: 36px;
  height: 36px;
}

.add-income-button {
  color: var(--ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 24%, transparent);
  font-size: 1.25rem;
  font-weight: 1000;
}

.effect-settings {
  border-top: 1px solid var(--line);
}

input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

input:focus {
  border-color: rgba(57, 248, 143, 0.7);
  box-shadow: 0 0 0 3px rgba(57, 248, 143, 0.12);
}

.field-row {
  gap: 8px;
}

.field-row span {
  flex: 0 0 auto;
}

.source-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 60px 32px;
  align-items: end;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.source-row.is-active {
  border-color: color-mix(in srgb, var(--accent) 54%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, 0.045));
  box-shadow: inset 3px 0 0 var(--accent);
}

.source-row.is-paused {
  border-color: color-mix(in srgb, var(--accent-2) 48%, transparent);
  box-shadow: inset 3px 0 0 var(--accent-2);
}

.income-field {
  display: grid;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
  gap: 5px;
}

.income-field > span:first-child {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.income-config-controls {
  display: grid;
  min-width: 0;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 5px;
}

.income-config-controls select {
  min-width: 0;
  height: 40px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: none;
  font-size: 0.7rem;
  font-weight: 900;
}

.income-config-controls select:focus {
  border-color: rgba(57, 248, 143, 0.7);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(57, 248, 143, 0.12);
}

.income-daily-target {
  display: flex;
  min-width: 0;
  grid-column: 1 / -1;
  grid-row: 2;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 27px;
  padding: 0 7px;
  border: 1px solid rgba(255, 212, 95, 0.16);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.16);
}

.income-daily-target span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.income-daily-target strong {
  overflow: hidden;
  padding: 0;
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 25px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.income-input-shell {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.22);
}

.income-input-shell:focus-within {
  border-color: rgba(57, 248, 143, 0.7);
  box-shadow: 0 0 0 3px rgba(57, 248, 143, 0.12);
}

.income-input-shell input {
  min-width: 0;
  height: 38px;
  border: 0;
  padding: 0 7px;
  background: transparent;
  box-shadow: none;
  font-variant-numeric: tabular-nums;
}

.income-input-shell input:focus {
  border: 0;
  box-shadow: none;
}

.income-input-shell small {
  flex: 0 0 auto;
  padding-right: 7px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.income-input-shell.amount-input small {
  padding-right: 0;
  padding-left: 8px;
  color: var(--accent-2);
  font-size: 0.84rem;
}

.income-start-button {
  grid-column: 2;
  grid-row: 1;
  height: 40px;
  border-radius: 7px;
  font-weight: 900;
}

.income-start-button {
  color: var(--ink);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 20%, transparent);
}

.income-start-button.is-active {
  color: #1b0b09;
  background: linear-gradient(90deg, var(--red), var(--amber));
  box-shadow: 0 10px 24px rgba(255, 90, 114, 0.2);
}

.income-delete-button {
  display: grid;
  grid-column: 3;
  grid-row: 1;
  place-items: center;
  width: 32px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 90, 114, 0.28);
  border-radius: 7px;
  color: #ff9cab;
  background: rgba(255, 90, 114, 0.08);
  font-size: 1rem;
  font-weight: 950;
}

.income-progress {
  position: relative;
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  grid-row: 3;
  height: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.24);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
}

.income-progress::before {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: var(--income-progress, 0%);
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent);
  transition: width 180ms linear;
}

.income-progress span {
  position: relative;
  z-index: 1;
  overflow: hidden;
  max-width: calc(100% - 12px);
  color: var(--accent-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-moods,
.admin-burst,
.admin-calendar {
  display: grid;
  gap: 10px;
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--line);
}

.ledger-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ledger-summary article,
.ledger-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.ledger-summary article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 11px 10px;
}

.ledger-summary span,
.ledger-day-date {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.ledger-summary strong {
  color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.08rem;
  line-height: 1;
}

.ledger-days {
  display: grid;
  gap: 7px;
  max-height: 310px;
  overflow: auto;
}

.ledger-calendar {
  display: grid;
  gap: 8px;
}

.ledger-calendar summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  list-style: none;
}

.ledger-calendar summary::-webkit-details-marker {
  display: none;
}

.ledger-calendar summary::after {
  content: "+";
  margin-left: 8px;
  color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ledger-calendar[open] summary::after {
  content: "-";
}

.ledger-day {
  min-height: 48px;
  overflow: hidden;
  transition: border-color 180ms ease, background 180ms ease;
}

.ledger-day.is-today {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  background: color-mix(in srgb, var(--accent) 6%, rgba(255, 255, 255, 0.045));
}

.ledger-day-view,
.ledger-day-editor {
  display: grid;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.ledger-day-view {
  grid-template-columns: minmax(104px, 0.8fr) minmax(110px, 1fr) auto;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.ledger-day-view:hover,
.ledger-day-view:focus-visible {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.ledger-day-view strong {
  overflow: hidden;
  color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-day-view > i {
  color: color-mix(in srgb, var(--accent) 74%, white 10%);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 950;
}

.ledger-day-editor {
  grid-template-columns: minmax(96px, 0.72fr) minmax(118px, 1fr) auto;
  min-height: 48px;
  padding: 8px 10px;
}

.ledger-day-date {
  display: grid;
  gap: 2px;
}

.ledger-day-date small {
  color: color-mix(in srgb, var(--accent) 68%, var(--muted));
  font-size: 0.58rem;
  font-weight: 900;
}

.ledger-day-input-shell {
  display: flex;
  min-width: 0;
  min-height: 32px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.22);
}

.ledger-day-input-shell:focus-within {
  border-color: color-mix(in srgb, var(--accent) 72%, white 8%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 10%, transparent);
}

.ledger-day-input-shell i {
  color: var(--accent-2);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 950;
}

.ledger-day-input-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 950;
}

.ledger-day-actions {
  display: flex;
  gap: 4px;
}

.ledger-day-actions button {
  min-width: 42px;
  min-height: 30px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--line));
  border-radius: 6px;
  color: #092018;
  background: linear-gradient(105deg, #6fe6ff, #62f4a2);
  box-shadow: none;
  font-size: 0.58rem;
  font-weight: 950;
}

.ledger-day-actions button:last-child {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.ledger-day.is-invalid {
  border-color: rgba(255, 90, 114, 0.76);
  background: rgba(255, 90, 114, 0.08);
}

.admin-calendar {
  border-bottom: 0;
}

.compact-head {
  padding-inline: 0;
}

.admin-theme-list,
.burst-style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

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

.burst-interval {
  display: grid;
  gap: 7px;
}

.burst-interval > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.theme-option,
.burst-style-option {
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.82rem;
  font-weight: 900;
}

.burst-style-option.active {
  border-color: color-mix(in srgb, var(--accent-2) 72%, white 8%);
  background: color-mix(in srgb, var(--accent-2) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-2) 28%, transparent);
}

.reward-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 12;
  display: grid;
  gap: 3px;
  min-width: 220px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 212, 95, 0.48);
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(90deg, var(--amber), var(--green));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 28px) scale(0.96);
}

.reward-toast.show {
  animation: toast 2400ms ease forwards;
}

.reward-toast span {
  font-size: 0.82rem;
  font-weight: 900;
}

.reward-toast strong {
  font-size: 1.55rem;
  line-height: 1;
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

@keyframes punch {
  45% {
    transform: scale(1.018) translateY(-2px);
  }
}

@keyframes mini-punch {
  45% {
    transform: scale(1.04) translateY(-1px);
  }
}

@keyframes celebrity-scan {
  0%,
  22% {
    opacity: 0;
    transform: translateX(-55%);
  }
  48% {
    opacity: 1;
  }
  78%,
  100% {
    opacity: 0;
    transform: translateX(55%);
  }
}

@keyframes celebrity-coin-fly {
  0% {
    left: -28px;
    opacity: 0;
    transform: translateY(8px) rotate(0deg) scale(0.72);
  }
  16%,
  76% {
    opacity: 0.82;
  }
  100% {
    left: calc(100% + 28px);
    opacity: 0;
    transform: translateY(-12px) rotate(360deg) scale(1);
  }
}

@keyframes celebrity-live {
  50% {
    opacity: 0.35;
    transform: scale(0.78);
  }
}

@keyframes celebrity-money-glow {
  50% {
    color: #fff4b8;
    text-shadow:
      0 0 14px rgba(255, 212, 95, 0.72),
      0 0 34px rgba(255, 90, 114, 0.28);
    transform: translateY(-1px);
  }
}

@keyframes celebrity-edge {
  50% {
    opacity: 0.45;
    transform: scaleX(0.72);
  }
}

@keyframes celebrity-radar-scan {
  to {
    transform: translateX(410%) skewX(-18deg);
  }
}

@keyframes celebrity-product-hit {
  45% {
    border-color: rgba(57, 248, 143, 0.72);
    background: rgba(57, 248, 143, 0.1);
    transform: translateX(-2px);
  }
}

@keyframes personal-product-hit {
  45% {
    border-color: rgba(255, 212, 95, 0.72);
    background: rgba(57, 248, 143, 0.12);
    transform: translateY(-1px);
  }
}

@keyframes stat-tick-rise {
  0% {
    opacity: 0;
    transform: translateY(13px) scale(0.72);
  }
  18% {
    opacity: 1;
    transform: translateY(-2px) scale(1.12);
  }
  38% {
    transform: translateY(1px) scale(0.98);
  }
  70% {
    opacity: 1;
    transform: translateY(-12px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px) scale(0.94);
  }
}

@keyframes action-tick-rise {
  0% { opacity: 0; transform: translateY(12px) scale(0.72); }
  18% { opacity: 1; transform: translateY(-4px) scale(1.12); }
  42% { transform: translateY(1px) scale(0.98); }
  72% { opacity: 1; transform: translateY(-9px) scale(1); }
  100% { opacity: 0; transform: translateY(-18px) scale(0.94); }
}

@keyframes luck-start-roll {
  0% { transform: rotate(0) scale(1); }
  24% { transform: rotate(-5deg) scale(1.13); filter: brightness(1.5); }
  50% { transform: rotate(4deg) scale(0.94); }
  76% { transform: rotate(-2deg) scale(1.08); filter: brightness(1.3); }
  100% { transform: rotate(0) scale(1); }
}

@keyframes wealth-button-shine {
  0%, 52% { left: -70%; opacity: 0; }
  62% { opacity: 0.9; }
  82%, 100% { left: 130%; opacity: 0; }
}

@keyframes wealth-machine-scan {
  from { left: -36%; }
  to { left: 120%; }
}

@keyframes slot-machine-rumble {
  0% { transform: translateX(-0.35px); }
  50% { transform: translateX(0.35px); }
  100% { transform: translateX(-0.35px); }
}

@keyframes lottery-machine-pulse {
  50% {
    filter: brightness(1.22);
    box-shadow:
      inset 0 0 28px rgba(255, 212, 95, 0.18),
      0 0 20px rgba(255, 212, 95, 0.18);
  }
}

@keyframes lottery-reel-appear {
  0% {
    opacity: 0;
    transform: translateY(7px) scale(0.72);
    filter: brightness(0.72);
  }
  58% {
    opacity: 1;
    transform: translateY(-2px) scale(1.08);
    filter: brightness(1.42);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes lottery-digit-spin {
  0% {
    transform: translateY(-4px) scaleY(1.12);
    filter: blur(0.9px) brightness(1.45);
  }
  50% {
    transform: translateY(4px) scaleY(0.9);
    filter: blur(1.35px) brightness(1.18);
  }
  100% {
    transform: translateY(-4px) scaleY(1.12);
    filter: blur(0.9px) brightness(1.45);
  }
}

@keyframes lottery-digit-lock {
  0% { transform: translateY(-6px) scale(1.26) rotateX(38deg); filter: brightness(2.2); }
  55% { transform: translateY(2px) scale(0.92) rotateX(-8deg); filter: brightness(1.28); }
  100% { transform: translateY(0) scale(1) rotateX(0); filter: brightness(1.08); }
}

@keyframes lottery-machine-finale {
  0% { filter: brightness(1); transform: scale(1); }
  12% { filter: brightness(2.15) saturate(1.45); transform: scale(1.025); }
  28% { filter: brightness(1.12); transform: scale(0.992); }
  48% { filter: brightness(1.72) saturate(1.3); transform: scale(1.012); }
  100% { filter: brightness(1); transform: scale(1); }
}

@keyframes lottery-ball-machine-glow {
  0%, 100% {
    border-color: rgba(204, 235, 247, 0.42);
    box-shadow:
      inset 0 0 16px rgba(112, 204, 238, 0.08),
      0 0 10px rgba(112, 204, 238, 0.08);
    transform: translateY(0);
  }
  50% {
    border-color: rgba(229, 249, 255, 0.86);
    box-shadow:
      inset 0 0 26px rgba(112, 204, 238, 0.18),
      0 0 20px rgba(112, 204, 238, 0.24);
    transform: translateY(-1px);
  }
}

@keyframes lottery-ball-arrive {
  0% { opacity: 0; transform: translateY(-20px) rotate(-100deg) scale(0.48); filter: blur(2px) brightness(1.8); }
  46% { opacity: 1; transform: translateY(3px) rotate(18deg) scale(1.12); filter: blur(0) brightness(1.26); }
  72% { transform: translateY(-2px) rotate(-6deg) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); filter: brightness(1); }
}

@keyframes lottery-ball-number-roll {
  0% { filter: blur(0); transform: translateY(-1px) rotate(-2deg) scale(1); }
  50% { filter: blur(0.5px); transform: translateY(1px) rotate(2deg) scale(1.06); }
  100% { filter: blur(0); transform: translateY(-1px) rotate(-2deg) scale(1); }
}

@keyframes lottery-settled-banner {
  0% { opacity: 0; transform: translate(-50%, -36%) scale(0.72); }
  18%, 68% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -74%) scale(0.9); }
}

@keyframes lottery-digits-finale {
  0% { transform: scale(0.9); filter: brightness(2); }
  22% { transform: scale(1.08); filter: brightness(1.55); }
  46% { transform: scale(0.97); filter: brightness(1.14); }
  72% { transform: scale(1.025); filter: brightness(1.2); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes lottery-jackpot-glow {
  0% {
    color: #2d1806;
    filter: brightness(2.4);
    transform: translateY(-7px) scale(1.22);
  }
  36% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.54),
      0 0 20px rgba(255, 212, 95, 0.78);
    transform: translateY(2px) scale(0.94);
  }
  70% {
    transform: translateY(-1px) scale(1.06);
  }
  100% {
    filter: brightness(1);
    transform: translateY(0) scale(1);
  }
}

@keyframes income-goal-stage-hit {
  0% { transform: scale(1); filter: brightness(1); }
  20% { transform: scale(1.025); filter: brightness(1.65) saturate(1.35); }
  46% { transform: scale(0.992); filter: brightness(1.08); }
  70% { transform: scale(1.01); filter: brightness(1.24); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes income-goal-sweep {
  0% { left: -35%; opacity: 0; }
  18% { opacity: 1; }
  100% { left: 118%; opacity: 0; }
}

@keyframes income-goal-percent-pop {
  0% { transform: translateY(0) scale(1); }
  24% { color: #fff8cd; transform: translateY(-4px) scale(1.28); filter: brightness(1.9); }
  54% { transform: translateY(1px) scale(0.94); }
  78% { transform: translateY(-1px) scale(1.06); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

@keyframes income-goal-reward-pop {
  0% { opacity: 0; transform: translate(-50%, -26%) scale(0.45); }
  20%, 58% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -78%) scale(0.86); }
}

@keyframes income-goal-major-hit {
  0% { transform: scale(1); filter: brightness(1); }
  10% { transform: scale(1.045) rotate(-0.5deg); filter: brightness(2.2) saturate(1.5); }
  22% { transform: scale(0.975) rotate(0.4deg); filter: brightness(1.1); }
  38% { transform: scale(1.03); filter: brightness(1.75) saturate(1.35); }
  58% { transform: scale(0.992); filter: brightness(1.15); }
  76% { transform: scale(1.012); filter: brightness(1.35); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes income-goal-rays {
  0% { opacity: 0; transform: scale(0.12) rotate(0); }
  16%, 58% { opacity: 0.85; }
  100% { opacity: 0; transform: scale(1.1) rotate(34deg); }
}

@keyframes income-goal-major-reward {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.28) rotate(-8deg); }
  16% { opacity: 1; transform: translate(-50%, -50%) scale(1.35) rotate(2deg); }
  32% { transform: translate(-50%, -50%) scale(0.92) rotate(0); }
  48%, 70% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -72%) scale(0.88); }
}

@keyframes income-goal-stamp-in {
  0%, 42% { opacity: 0; transform: rotate(-20deg) scale(2.4); filter: blur(2px); }
  58% { opacity: 1; transform: rotate(-7deg) scale(0.82); filter: blur(0); }
  72% { transform: rotate(-7deg) scale(1.12); }
  100% { opacity: 0.9; transform: rotate(-7deg) scale(1); }
}

@keyframes fortune-aura {
  to { transform: rotate(360deg); }
}

@keyframes fortune-channeling {
  0%, 100% {
    border-color: color-mix(in srgb, var(--fortune-tone) 42%, rgba(255, 255, 255, 0.08));
    filter: brightness(1);
    transform: scale(1);
  }
  22% {
    filter: brightness(1.42) saturate(1.3);
    transform: scale(1.012);
  }
  48% {
    filter: brightness(0.86);
    transform: scale(0.992);
  }
  74% {
    filter: brightness(1.58) saturate(1.45);
    transform: scale(1.016);
  }
}

@keyframes fortune-vessel-shake {
  0% { transform: translateX(-2px) rotate(-1.5deg); }
  50% { transform: translateX(2px) rotate(1.5deg); }
  100% { transform: translateX(-1px) rotate(-0.8deg); }
}

@keyframes fortune-vessel-ritual {
  0% { filter: brightness(0.9); transform: translate3d(0, 0, 0) rotate(0) scale(1); }
  4% { transform: translate3d(-3px, -2px, 0) rotate(-4deg) scale(1.01); }
  8% { transform: translate3d(4px, -5px, 0) rotate(5deg) scale(1.015); }
  12% { transform: translate3d(-5px, -3px, 0) rotate(-5.8deg) scale(1.02); }
  16% { transform: translate3d(5px, -6px, 0) rotate(6deg) scale(1.02); }
  20% { transform: translate3d(-6px, -3px, 0) rotate(-6.4deg) scale(1.025); }
  24% { transform: translate3d(6px, -7px, 0) rotate(6.6deg) scale(1.025); }
  28% { filter: brightness(1.18); transform: translate3d(-6px, -4px, 0) rotate(-6.8deg) scale(1.03); }
  32% { transform: translate3d(7px, -7px, 0) rotate(7deg) scale(1.03); }
  36% { transform: translate3d(-7px, -4px, 0) rotate(-7.2deg) scale(1.035); }
  40% { transform: translate3d(7px, -8px, 0) rotate(7.3deg) scale(1.035); }
  44% { filter: brightness(1.34); transform: translate3d(-7px, -4px, 0) rotate(-7.1deg) scale(1.04); }
  48% { transform: translate3d(7px, -8px, 0) rotate(7deg) scale(1.04); }
  52% { transform: translate3d(-6px, -5px, 0) rotate(-6.5deg) scale(1.045); }
  56% { transform: translate3d(6px, -8px, 0) rotate(6deg) scale(1.045); }
  60% { filter: brightness(1.5); transform: translate3d(-5px, -5px, 0) rotate(-5.2deg) scale(1.05); }
  64% { transform: translate3d(5px, -8px, 0) rotate(4.6deg) scale(1.05); }
  68% { transform: translate3d(-4px, -5px, 0) rotate(-4deg) scale(1.055); }
  72% { filter: brightness(1.72); transform: translate3d(3px, -10px, 0) rotate(2.6deg) scale(1.065); }
  76% { transform: translate3d(-2px, -4px, 0) rotate(-1.8deg) scale(1.035); }
  82% { transform: translate3d(1px, 1px, 0) rotate(0.8deg) scale(0.985); }
  90% { transform: translate3d(-1px, -1px, 0) rotate(-0.4deg) scale(1.015); }
  100% { filter: brightness(1); transform: translate3d(0, 0, 0) rotate(0) scale(1); }
}

@keyframes fortune-sticks-rattle {
  0% {
    transform: translateX(calc((var(--stick) - 2) * 8px - 1px)) translateY(1px) rotate(calc((var(--stick) - 2) * 5deg - 1.8deg));
    filter: brightness(1);
  }
  100% {
    transform: translateX(calc((var(--stick) - 2) * 8px + 2px)) translateY(-7px) rotate(calc((var(--stick) - 2) * 5deg + 2.4deg));
    filter: brightness(1.36);
  }
}

@keyframes fortune-stick-draw {
  0%, 68% {
    opacity: 0;
    transform: translate(-50%, 38px) rotate(8deg) scale(0.84);
  }
  76% {
    opacity: 1;
    transform: translate(-50%, -36px) rotate(-5deg) scale(1.08);
    filter: brightness(1.72);
  }
  88% {
    transform: translate(-50%, -8px) rotate(4deg) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -13px) rotate(2deg) scale(1);
    filter: brightness(1);
  }
}

@keyframes fortune-stick-reveal {
  0% {
    opacity: 0.45;
    transform: translate(-50%, -30px) rotate(-8deg) scale(1.18);
    filter: brightness(2.2);
  }
  38% {
    opacity: 1;
    transform: translate(-50%, -8px) rotate(5deg) scale(0.94);
  }
  68% {
    transform: translate(-50%, -16px) rotate(-1deg) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -13px) rotate(2deg) scale(1);
    filter: brightness(1);
  }
}

@keyframes fortune-sigil-channeling {
  to { transform: rotate(360deg); filter: hue-rotate(26deg) brightness(1.45); }
}

@keyframes fortune-copy-channeling {
  50% { opacity: 0.48; transform: translateX(1px); filter: blur(0.8px); }
}

@keyframes fortune-reveal {
  0% {
    opacity: 0.52;
    transform: translateY(5px) scale(0.96);
    filter: blur(2px);
  }
  18% {
    opacity: 1;
    transform: translateY(-3px) scale(1.025);
    filter: blur(0);
    box-shadow: 0 0 32px color-mix(in srgb, var(--fortune-tone) 36%, transparent);
  }
  42% {
    transform: translateY(1px) scale(0.992);
  }
  68% {
    transform: translateY(-1px) scale(1.008);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes fortune-sigil-reveal {
  0% { opacity: 0; transform: rotate(-90deg) scale(0.42); filter: brightness(2.4); }
  34% { opacity: 1; transform: rotate(8deg) scale(1.22); }
  62% { transform: rotate(-3deg) scale(0.94); }
  100% { transform: rotate(0) scale(1); filter: brightness(1); }
}

@keyframes fortune-lingqian-reveal {
  0%, 12% {
    opacity: 0;
    transform: translateY(-28px) rotate(3deg) scale(0.82);
    filter: blur(1px);
  }
  42% {
    opacity: 1;
    transform: translateY(5px) rotate(-1.2deg) scale(1.03);
    filter: blur(0);
  }
  68% {
    transform: translateY(-2px) rotate(0.6deg) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
    filter: blur(0);
  }
}

@keyframes fortune-good-auspice {
  0% { opacity: 0.28; letter-spacing: 0.22em; transform: scale(0.92); filter: blur(1px); }
  24% { opacity: 1; letter-spacing: 0.1em; transform: scale(1.08); filter: blur(0); }
  48% { transform: scale(0.985); }
  72% { transform: scale(1.015); }
  100% { opacity: 1; letter-spacing: 0.08em; transform: scale(1); filter: blur(0); }
}

@keyframes fortune-good-small-hit {
  0% { box-shadow: 0 0 0 rgba(227, 193, 132, 0); }
  18% { box-shadow: 0 0 24px rgba(227, 193, 132, 0.24); }
  48% { box-shadow: 0 0 12px rgba(227, 193, 132, 0.12); }
  100% { box-shadow: 0 0 0 rgba(227, 193, 132, 0); }
}

@keyframes fortune-good-medium-hit {
  0% { transform: scale(1); }
  12% { transform: scale(1.018); box-shadow: 0 0 34px rgba(227, 193, 132, 0.3); }
  26% { transform: scale(0.992); }
  44% { transform: scale(1.012); box-shadow: 0 0 20px rgba(227, 193, 132, 0.18); }
  70% { box-shadow: 0 0 8px rgba(227, 193, 132, 0.08); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(227, 193, 132, 0); }
}

@keyframes fortune-good-major-hit {
  0% { transform: scale(1); }
  8% { transform: scale(1.03) rotate(-0.4deg); box-shadow: 0 0 52px rgba(227, 193, 132, 0.46); }
  18% { transform: scale(0.982) rotate(0.3deg); }
  32% { transform: scale(1.024); box-shadow: 0 0 36px rgba(227, 193, 132, 0.32); }
  48% { transform: scale(0.994); }
  64% { transform: scale(1.014); box-shadow: 0 0 26px rgba(227, 193, 132, 0.24); }
  82% { box-shadow: 0 0 12px rgba(227, 193, 132, 0.1); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(227, 193, 132, 0); }
}

@keyframes fortune-good-rays {
  0% { opacity: 0; transform: scale(0.12) rotate(0); }
  14%, 58% { opacity: 0.8; }
  100% { opacity: 0; transform: scale(0.72) rotate(32deg); }
}

@keyframes fortune-ready-pulse {
  0% { opacity: 0.45; transform: scale(0.94); filter: brightness(1.9); }
  32% { opacity: 1; transform: scale(1.025); filter: brightness(1.38); }
  62% { transform: scale(0.992); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes fortune-unsealing {
  0% { filter: brightness(1); transform: scale(1); }
  20% { transform: scale(0.985); }
  42% { box-shadow: 0 0 24px rgba(227, 193, 132, 0.16); transform: scale(1.012); }
  68% { box-shadow: 0 0 38px rgba(227, 193, 132, 0.24); transform: scale(1.025); }
  86% { transform: scale(0.996); }
  100% { filter: brightness(1); transform: scale(1); }
}

@keyframes fortune-unseal-text {
  0%, 12% { opacity: 0; letter-spacing: 0.34em; transform: scaleX(0.42); }
  28% { opacity: 0.64; transform: scaleX(0.82); }
  46% { opacity: 1; letter-spacing: 0.22em; transform: scaleX(1); }
  64% { opacity: 0.54; }
  78% { opacity: 1; }
  100% { opacity: 0.72; transform: scaleX(1); }
}

@keyframes fortune-reading-line {
  0% { opacity: 0; transform: translateY(12px); filter: blur(2px); }
  58% { opacity: 1; transform: translateY(-1px); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes fortune-interpret-shine {
  0%, 58% { transform: translateX(-120%); opacity: 0; }
  68% { opacity: 1; }
  88%, 100% { transform: translateX(120%); opacity: 0; }
}

@keyframes fortune-button-shine {
  0%, 55% { left: -40%; opacity: 0; }
  64% { opacity: 0.92; }
  84%, 100% { left: 116%; opacity: 0; }
}

@keyframes fortune-button-star {
  50% { color: #fff7cf; transform: rotate(180deg) scale(1.28); text-shadow: 0 0 10px #fff; }
}

@keyframes action-button-beat {
  0%, 100% { transform: translateY(0) scale(1); }
  24% { transform: translateY(-2px) scale(1.05); }
  48% { transform: translateY(1px) scale(0.985); }
  72% { transform: translateY(-1px) scale(1.02); }
}

@keyframes action-badge-beat {
  0%, 100% { transform: scale(1); }
  26% { transform: scale(1.22) rotate(-5deg); }
  56% { transform: scale(0.94) rotate(2deg); }
}

@keyframes stat-card-beat {
  0% { transform: scale(1); }
  24% { transform: scale(1.06); }
  48% { transform: scale(0.985); }
  72% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

@keyframes stat-number-pop {
  0%, 100% { filter: brightness(1); transform: translateY(0); }
  30% { filter: brightness(1.36); transform: translateY(-2px) scale(1.08); }
  56% { filter: brightness(1.12); transform: translateY(1px) scale(0.99); }
}

@keyframes stat-card-shine {
  0% { opacity: 0; transform: translateX(0) skewX(-18deg); }
  18% { opacity: 0.72; }
  100% { opacity: 0; transform: translateX(560%) skewX(-18deg); }
}

@keyframes live-income-banner {
  0% {
    opacity: 0;
    transform: translate(-50%, 14px) scale(0.72);
  }
  10%,
  82% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -18px) scale(0.9);
  }
}

@keyframes live-income-pulse {
  50% {
    transform: scale(1.045);
    filter: brightness(1.3);
  }
}

@keyframes income-settled-banner {
  0% {
    opacity: 0;
    transform: translate(-50%, 10px) scale(0.78);
  }
  22%,
  72% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -8px) scale(0.92);
  }
}

@keyframes live-income-finale-stage {
  0% {
    filter: brightness(1);
  }
  12% {
    filter: brightness(2.15) saturate(1.45);
  }
  28% {
    filter: brightness(1.15);
  }
  48% {
    filter: brightness(1.75) saturate(1.3);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes live-income-finale-ring {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.18);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(4.2);
  }
}

@keyframes live-income-final-number {
  0% {
    opacity: 0.35;
    transform: scale(0.72) rotate(-2deg);
  }
  24% {
    opacity: 1;
    transform: scale(1.2) rotate(1deg);
  }
  44% {
    transform: scale(0.94) rotate(0);
  }
  68% {
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes live-income-coin-rain {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), -154px) scale(0.62) rotate(-18deg);
  }
  18%,
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 22px) scale(0.22) rotate(28deg);
  }
}

@keyframes live-slot-digit-enter {
  0% {
    opacity: 0;
    transform: translateY(-0.8em) scale(0.72);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0.6px);
  }
}

@keyframes live-slot-digit-spin {
  50% {
    transform: translateY(0.16em) scaleY(1.08);
    filter: blur(1.2px) brightness(1.35);
  }
}

@keyframes live-slot-digit-lock {
  0% {
    transform: translateY(-0.32em) scale(1.28) rotateX(38deg);
    filter: brightness(2.2);
  }
  55% {
    transform: translateY(0.1em) scale(0.92) rotateX(-8deg);
  }
  100% {
    transform: translateY(0) scale(1) rotateX(0);
    filter: brightness(1.2);
  }
}

@keyframes celebrity-grid-flow {
  to {
    background-position: 0 22px, 22px 0;
  }
}

@keyframes celebrity-vs-pulse {
  50% {
    filter: brightness(1.35);
    transform: rotate(45deg) scale(1.08);
  }
}

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

@keyframes celebrity-star-charge {
  50% {
    border-color: rgba(255, 212, 95, 0.76);
    box-shadow: inset 0 0 18px rgba(255, 90, 114, 0.18), 0 0 18px rgba(255, 90, 114, 0.16);
    transform: translateY(-1px);
  }
}

@keyframes boom {
  30% {
    transform: scale(1.08) rotate(-0.4deg);
    text-shadow:
      0 0 20px rgba(255, 212, 95, 0.82),
      0 0 90px rgba(255, 90, 114, 0.5);
  }
}

@keyframes star-charge {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.72;
  }
  25% {
    transform: translateY(-7px) scale(1.035);
    opacity: 1;
  }
  50% {
    transform: translateY(3px) scale(0.99);
    color: #54b8ff;
  }
  75% {
    transform: translateY(-4px) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes stopwatch-digit-in {
  0% {
    opacity: 0;
    transform: translateY(0.72em) rotateX(-38deg);
    filter: blur(1px);
  }
  68% {
    opacity: 1;
    transform: translateY(-0.05em) rotateX(2deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0);
    filter: blur(0);
  }
}

@keyframes stopwatch-digit-out {
  0% {
    opacity: 0.76;
    transform: translateY(0) rotateX(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-0.7em) rotateX(34deg);
    filter: blur(1px);
  }
}

@keyframes money-pool-collect {
  0% {
    transform: scale(0.98);
    filter: brightness(1);
  }
  34% {
    transform: scale(1.08) translateY(-4px);
    filter: brightness(1.42);
  }
  72% {
    transform: scale(1.025) translateY(1px);
    filter: brightness(1.18);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes charge-coin-hop {
  0%,
  100% {
    opacity: 0.38;
    transform: translate(calc(-50% + var(--x)), 22px) scale(0.72) rotate(-12deg);
  }
  24% {
    opacity: 1;
  }
  52% {
    opacity: 1;
    transform: translate(calc(-50% + var(--x)), -58px) scale(1.08) rotate(12deg);
  }
  76% {
    opacity: 0.86;
  }
}

@keyframes charge-coin-cash-in {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), -168px) scale(0.7) rotate(-18deg);
  }
  18% {
    opacity: 1;
  }
  64% {
    opacity: 1;
    transform: translate(calc(-50% + var(--x)), -22px) scale(1) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 18px) scale(0.18) rotate(24deg);
  }
}

@keyframes charge-ready {
  50% {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px color-mix(in srgb, var(--accent-2) 42%, transparent);
  }
}

@keyframes gain-collect {
  0% {
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.62);
    filter: blur(2px) brightness(1);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.08);
    filter: blur(0) brightness(1.24);
  }
  46% {
    opacity: 1;
    transform: translate(-50%, -4px) scale(1);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -10px) scale(0.9);
    filter: blur(0) brightness(1.16);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -20px) scale(0.72);
    filter: blur(3px) brightness(1.8);
  }
}

@keyframes slot-reel {
  0% {
    transform: translateY(-14px) scale(0.98);
    filter: blur(2px) brightness(1.1);
    text-shadow:
      0 0 26px rgba(255, 212, 95, 0.7),
      0 0 90px rgba(255, 90, 114, 0.4);
  }
  18%,
  48% {
    transform: translateY(8px) scale(1.06);
    filter: blur(1.6px) brightness(1.35);
  }
  68% {
    transform: translateY(-3px) scale(1.03);
    filter: blur(0.6px) brightness(1.22);
  }
  88% {
    transform: translateY(0) scale(1.01);
    filter: blur(0) brightness(1.1);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: blur(0) brightness(1);
  }
}

@keyframes combo-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, 22px) scale(0.92);
  }
  18%,
  72% {
    opacity: 1;
    transform: translate(-50%, -4px) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -28px) scale(0.98);
  }
}

@keyframes toast {
  0% {
    opacity: 0;
    transform: translate(-50%, 28px) scale(0.96);
  }
  12%,
  82% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -12px) scale(0.98);
  }
}

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

@keyframes orbit {
  50% {
    transform: translate(22vw, 16vh) scale(0.64) rotate(180deg);
    opacity: 0.48;
  }
  100% {
    transform: translate(0, 0) scale(1) rotate(360deg);
  }
}

@keyframes block-bump {
  45% {
    transform: translateY(-18px);
  }
}

@keyframes chest-pop {
  35% {
    transform: translateY(-10px) scale(1.08);
  }
}

@keyframes glow-pulse {
  50% {
    transform: scale(1.16);
    opacity: 0.55;
  }
}

@media (min-width: 981px) {
  .ticker-stage {
    padding-top: clamp(220px, 31vh, 285px);
    padding-bottom: 24px;
  }

  .ticker-stage > .live-label {
    justify-self: center;
    margin-left: 0;
    transform: none;
  }
}

@media (min-width: 1201px) {
  .ticker-stage > .live-label {
    justify-self: center;
    margin-left: 0;
    transform: none;
  }

  .ticker-stage > .money-wrap,
  .ticker-stage > .per-second {
    justify-self: start;
    width: calc(100% - 430px);
  }

  .ticker-stage > .money-wrap .money-ticker {
    font-size: clamp(3.2rem, 5.5vw, 4.8rem);
  }

  .ticker-stage > .money-wrap .currency {
    font-size: clamp(2rem, 3.4vw, 3.4rem);
  }
}

@media (min-width: 981px) and (max-width: 1200px) {
  .ticker-stage {
    padding-top: 30px;
  }

  .ticker-stage > .live-label {
    transform: none;
  }

  .celebrity-panel {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
    max-width: none;
    margin: 0 14px 18px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: auto;
  }

  .admin-panel {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: min(86vh, 720px);
    border-radius: 8px;
    transform: translateY(calc(100% + 20px));
  }

  .admin-panel.open {
    transform: translateY(0);
  }

  .celebrity-panel {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
    margin: 0 14px 18px;
  }

  .personal-products-panel {
    width: auto;
    max-width: none;
    margin: 0 14px 14px;
  }
}

@media (min-width: 641px) and (max-width: 980px) {
  .ticker-stage {
    padding-top: 112px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    min-height: 100svh;
    padding: 0;
  }

  .hero-panel {
    grid-template-rows: auto 282px auto auto auto;
    width: 100%;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
  }

  .hero-panel,
  .admin-panel,
  .celebrity-panel {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
    backdrop-filter: none;
  }

  .personal-products-panel {
    contain: layout paint;
    width: auto;
    margin: 0 12px 12px;
    padding: 9px;
  }

  .merit-stats {
    top: 8px;
    bottom: auto;
    right: 10px;
    left: 10px;
    gap: 8px;
  }

  .live-label {
    justify-self: center;
    margin-left: 0;
  }

  .per-second {
    transform: translateY(-20px);
  }

  .merit-stats > div {
    min-width: 118px;
    padding: 8px 10px 7px;
  }

  .merit-stats span {
    font-size: 0.61rem;
  }

  .merit-stats strong {
    font-size: 1.08rem;
  }

  .merit-stats small {
    right: 7px;
    bottom: 6px;
    font-size: 0.5rem;
  }

  .merit-stats .merit-stat small {
    right: 42px;
    bottom: 6px;
    max-width: calc(100% - 49px);
  }

  .celebrity-panel {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    margin: 0 12px 12px;
    padding: 12px;
    contain: layout paint;
  }

  .high-player-leaderboard {
    margin: 0 12px 12px;
    padding: 12px;
  }

  .high-player-list {
    grid-template-columns: 1fr;
  }

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

  .high-player-editor article {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) 68px 30px;
    gap: 4px;
  }

  .high-player-editor button {
    width: 30px;
  }

  .ticker-stage::before,
  .scene-suction span,
  .loot-glow,
  .celebrity-title i,
  .celebrity-scanline::after {
    animation: none !important;
  }

  .ticker-stage::before {
    opacity: 0.38;
  }

  .is-running .ticker-stage::before {
    animation: intake 18s linear infinite !important;
  }

  .scene-suction span {
    box-shadow: none;
  }

  .admin-calendar {
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
  }

  .topbar,
  .section-head,
  .control-strip {
    padding-inline: 14px;
  }

  .topbar {
    align-items: flex-start;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 4px;
  }

  #appTitle {
    max-width: calc(100vw - 118px);
    font-size: 1.1rem;
    line-height: 1.15;
  }

  .money-ticker {
    font-size: var(--ticker-fit-size, 3.25rem);
  }

  .currency {
    font-size: 1.65rem;
  }

  .ticker-stage {
    min-height: 282px;
    align-content: start;
    gap: 7px;
    padding: 82px 14px 10px;
  }

  .ticker-stage::before {
    inset: 5% 10%;
  }

  .money-wrap {
    min-height: 74px;
  }

  .per-second {
    width: 100%;
    transform: none;
  }

  .ticker-live-income {
    display: flex;
    width: min(212px, 100%);
    gap: 4px;
  }

  .ticker-live-income-amount {
    width: auto;
    height: 30px;
  }

  .ticker-live-income-amount input {
    height: 28px;
    font-size: 0.68rem;
  }

  .ticker-live-income > button {
    width: 66px;
    height: 30px;
    flex-basis: 66px;
    font-size: 0.68rem;
  }

  .control-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding-top: 8px;
    padding-bottom: 12px;
  }

  .control-strip .primary-button,
  .control-strip .ghost-button,
  .control-strip .burst-button,
  .control-strip .utility-action,
  .control-strip .charge-button {
    min-width: 0;
    min-height: 40px;
    padding-inline: 4px;
    font-size: 0.76rem;
  }

  .control-strip .merit-action {
    min-width: 0;
    min-height: 40px;
    padding-inline: 4px;
    font-size: 0.72rem;
  }

  .charge-coin-stream {
    transform: scale(0.72);
    transform-origin: center;
  }

  .admin-panel {
    padding: 16px 12px;
  }

  .admin-drawer-head {
    top: -16px;
    margin: -16px -12px 12px;
    padding: 14px 12px 10px;
  }

  .source-row {
    grid-template-columns: minmax(0, 1fr) 56px 30px;
    gap: 4px;
    padding: 8px;
  }

  .income-daily-target strong {
    font-size: 0.64rem;
  }

  .income-delete-button {
    width: 30px;
  }

  .income-field > span:first-child {
    font-size: 0.66rem;
  }

  .income-config-controls {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 3px;
  }

  .income-config-controls select {
    padding-inline: 3px;
    font-size: 0.62rem;
  }

  .income-input-shell input {
    padding-inline: 5px;
  }

  .income-input-shell small {
    padding-right: 5px;
    font-size: 0.62rem;
  }

  .income-input-shell.amount-input small {
    padding-left: 6px;
  }

  .income-start-button {
    padding-inline: 4px;
    font-size: 0.82rem;
  }

  .ledger-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .ledger-summary article {
    gap: 5px;
    padding: 9px 6px;
  }

  .ledger-summary span {
    font-size: 0.62rem;
  }

  .ledger-summary strong {
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ledger-day-view {
    grid-template-columns: minmax(88px, 0.72fr) minmax(94px, 1fr) auto;
    gap: 7px;
    padding-inline: 8px;
  }

  .ledger-day-date {
    font-size: 0.64rem;
  }

  .ledger-day-editor {
    grid-template-columns: minmax(82px, 0.68fr) minmax(102px, 1fr) auto;
    gap: 5px;
    padding-inline: 8px;
  }

  .ledger-day-actions {
    gap: 3px;
  }

  .ledger-day-actions button {
    min-width: 36px;
    padding-inline: 4px;
    font-size: 0.54rem;
  }

  .ledger-day-input-shell {
    padding-inline: 6px;
  }

  .ledger-day-input-shell input {
    font-size: 0.7rem;
  }

  .personal-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .personal-products-head {
    margin-bottom: 6px;
  }

  .personal-product {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 3px 6px;
    padding: 6px;
  }

  .personal-product-icon {
    width: 25px;
    height: 25px;
  }

  .personal-product > div:nth-of-type(2) {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
    gap: 4px;
    text-align: left;
  }

  .personal-product-progress {
    grid-column: 1 / -1;
  }

  .celebrity-head {
    display: grid;
    gap: 7px;
  }

  .celebrity-title {
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .celebrity-head-actions {
    width: 100%;
  }

  .celebrity-head-actions select {
    flex: 1 1 auto;
    width: auto;
  }

  .celebrity-terminal {
    margin-top: 8px;
    padding-block: 8px;
  }

  .celebrity-meta {
    grid-template-columns: 1fr 1fr;
  }
}

/* Keep the HUD rules after legacy responsive styles. */
/* Keep the new lottery and fortune states after the same legacy layer. */
.lottery-digits[data-mode="powerball"] .lottery-reel:not(.is-special).is-locked,
.lottery-digits[data-mode="powerball"] .lottery-reel:not(.is-special).is-gold-locked {
  z-index: 4;
  border-color: #fff0a8;
  color: #3a2405;
  background: linear-gradient(145deg, #fff8c8 0%, #ffd45f 42%, #cf870d 100%);
  box-shadow:
    inset -4px -5px 9px rgba(102, 57, 0, 0.24),
    inset 4px 4px 7px rgba(255, 255, 255, 0.8),
    0 0 0 2px rgba(255, 212, 95, 0.2),
    0 0 22px rgba(255, 212, 95, 0.82);
  animation: lottery-powerball-gold-lock 520ms cubic-bezier(0.16, 0.92, 0.24, 1.16) both;
}

.lottery-digits[data-mode="powerball"] .lottery-reel.is-special.is-locked {
  z-index: 4;
  border-color: #ffc3bc;
  color: #fffaf5;
  background: linear-gradient(145deg, #ff8279 0%, #d72c38 48%, #8e0c18 100%);
  box-shadow:
    inset -4px -5px 9px rgba(79, 3, 10, 0.32),
    inset 4px 4px 7px rgba(255, 255, 255, 0.42),
    0 0 0 2px rgba(255, 102, 105, 0.18),
    0 0 22px rgba(255, 68, 79, 0.78);
  animation: lottery-powerball-red-lock 560ms cubic-bezier(0.16, 0.92, 0.24, 1.14) both;
}

.lottery-digits[data-mode="mega"] .lottery-reel:not(.is-special).is-spinning {
  border-color: rgba(237, 252, 255, 0.98);
  background: linear-gradient(145deg, #ffffff 0%, #eaf7fb 38%, #b9ced7 100%);
  box-shadow:
    inset -5px -6px 10px rgba(18, 44, 54, 0.28),
    inset 5px 5px 8px rgba(255, 255, 255, 0.9),
    0 0 0 2px rgba(115, 223, 255, 0.14),
    0 0 22px rgba(112, 220, 255, 0.64);
}

.lottery-digits[data-mode="mega"] .lottery-reel:not(.is-special).is-spinning .lottery-reel-static {
  color: #10242c;
  text-shadow:
    0 -21px 0 rgba(24, 66, 80, 0.24),
    0 21px 0 rgba(24, 66, 80, 0.22),
    0 0 10px rgba(70, 183, 224, 0.68);
  animation: lottery-mega-number-roll 88ms steps(2, end) infinite;
}

.lottery-digits[data-mode="mega"] .lottery-reel:not(.is-special).is-locked {
  z-index: 4;
  border-color: #f4fdff;
  color: #0d222a;
  background: linear-gradient(145deg, #ffffff 0%, #effbff 44%, #bfd2da 100%);
  box-shadow:
    inset -5px -6px 10px rgba(18, 44, 54, 0.24),
    inset 5px 5px 8px rgba(255, 255, 255, 0.92),
    0 0 0 3px rgba(115, 223, 255, 0.18),
    0 0 26px rgba(112, 220, 255, 0.82);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: lottery-mega-white-lock 640ms cubic-bezier(0.16, 0.92, 0.24, 1.2) both;
}

.lottery-digits[data-mode="mega"] .lottery-reel.is-special.is-locked {
  z-index: 4;
  border-color: #fff2ae;
  color: #3a2505;
  background: linear-gradient(145deg, #fff8bd 0%, #ffd45f 44%, #d99810 100%);
  box-shadow:
    inset -4px -5px 9px rgba(102, 57, 0, 0.22),
    inset 4px 4px 7px rgba(255, 255, 255, 0.78),
    0 0 0 2px rgba(255, 212, 95, 0.22),
    0 0 24px rgba(255, 212, 95, 0.84);
  animation: lottery-mega-gold-lock 620ms cubic-bezier(0.16, 0.92, 0.24, 1.18) both;
}

.fortune-draw-stage.fortune-unified {
  border-color: color-mix(in srgb, var(--fortune-tone) 48%, rgba(93, 245, 170, 0.22));
  background:
    radial-gradient(circle at 18% 48%, rgba(47, 171, 123, 0.12), transparent 29%),
    radial-gradient(circle at 78% 20%, color-mix(in srgb, var(--fortune-tone) 9%, transparent), transparent 28%),
    linear-gradient(124deg, rgba(4, 23, 19, 0.98), rgba(5, 14, 14, 0.98) 58%, rgba(15, 14, 9, 0.98));
}

.fortune-unified .fortune-ritual {
  min-height: 130px;
}

.fortune-vessel-slot {
  width: 142px;
  margin-block: -2px;
  scale: 1;
}

.fortune-vessel {
  width: 132px;
  height: 132px;
  overflow: visible;
  border-radius: 24px;
  transform-origin: 50% 82%;
}

.fortune-vessel::before,
.fortune-vessel::after,
.fortune-vessel > em,
.fortune-sticks {
  display: none;
}

.fortune-drawn-stick {
  bottom: 24px;
  width: 30px;
  height: 122px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  transform: translate(-50%, 48px) rotate(3deg) scale(0.84);
}

.fortune-draw-stage.has-result .fortune-drawn-stick {
  opacity: 1;
  transform: translate(-50%, -36px) rotate(2deg) scale(1);
}

.fortune-draw-stage.is-drawing .fortune-vessel {
  animation: fortune-vessel-premium-shake 5200ms cubic-bezier(0.24, 0.04, 0.2, 1) both;
  filter: none;
}

.fortune-draw-stage.is-drawing .fortune-drawn-stick {
  animation: fortune-premium-stick-draw 5200ms cubic-bezier(0.18, 0.84, 0.24, 1) both;
  filter: none;
}

@media (max-width: 640px) {
  .fortune-unified .fortune-ritual {
    min-height: 112px;
  }

  .fortune-vessel-slot {
    width: 116px;
    margin-block: -5px;
    scale: 1;
  }

  .fortune-vessel {
    width: 108px;
    height: 108px;
  }

  .fortune-drawn-stick {
    bottom: 18px;
    width: 25px;
    height: 102px;
  }

  .fortune-draw-stage.has-result .fortune-drawn-stick {
    transform: translate(-50%, -30px) rotate(2deg) scale(1);
  }

  .fortune-unified.has-result .fortune-ritual {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 4px;
  }
}

.merit-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.merit-stats > .merit-stat-fortune {
  overflow: hidden !important;
  background: linear-gradient(112deg, var(--hud-soft), rgba(4, 14, 12, 0.94) 48%) !important;
}

.merit-stats .merit-stat small {
  position: static;
  right: auto;
  bottom: auto;
  max-width: none;
  overflow: hidden;
  color: rgba(234, 248, 239, 0.72);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .merit-stats {
    gap: 7px;
  }

  .merit-stats > .merit-stat {
    min-height: 66px;
    padding: 8px 7px 7px 9px;
  }

  .merit-stats .merit-stat strong {
    font-size: 0.98rem;
  }

  .merit-stats .stat-kicker {
    font-size: 0.56rem;
  }

  .merit-stats .merit-stat small {
    font-size: 0.51rem;
  }

  .merit-stats .rank-badge {
    flex-basis: 39px;
    width: 39px;
    min-width: 39px;
    height: 47px;
    margin-left: 3px;
  }

  .rank-badge .badge-seal {
    width: 29px;
    height: 29px;
    border-radius: 6px;
  }

  .rank-badge .badge-seal i {
    font-size: 0.68rem;
  }

  .merit-stats .rank-badge b {
    min-width: 18px;
    height: 18px;
    font-size: 0.5rem;
  }
}

/* Final phone interaction sizing: keep touch games full-width after all legacy layers. */
@media (max-width: 640px) {
  .mini-game-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .reaction-game-card,
  .bubble-launch-card {
    min-height: 226px;
  }

  .reaction-lane {
    min-height: 68px;
  }
}

/* ===== Dopamine garden · 幸运绽放 / 星座运势 / 闪耀买手店 ===== */
body.theme-moonlight .break-game-luck {
  border-color: rgba(255, 143, 190, 0.58);
  background:
    radial-gradient(circle at 8% 20%, rgba(255, 215, 91, 0.24), transparent 27%),
    radial-gradient(circle at 92% 15%, rgba(96, 240, 216, 0.18), transparent 30%),
    radial-gradient(circle at 78% 92%, rgba(255, 95, 166, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(72, 27, 84, 0.94), rgba(24, 20, 63, 0.96) 54%, rgba(16, 43, 59, 0.96));
  box-shadow: inset 0 0 0 1px rgba(255, 225, 241, 0.08), 0 18px 48px rgba(20, 6, 42, 0.28);
}

body.theme-moonlight .break-game-luck .break-game-head strong {
  color: #fff0f7;
  text-shadow: 0 0 18px rgba(255, 105, 171, 0.34);
}

body.theme-moonlight .luck-tools {
  grid-template-columns: 108px minmax(0, 1fr);
}

body.theme-moonlight .luck-start-button {
  min-height: 116px;
  padding: 12px 8px 9px;
  border: 1px solid rgba(255, 231, 133, 0.78);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.3), transparent 34%),
    linear-gradient(150deg, #ff6a9f, #9b6cff 56%, #28d9c0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -18px 34px rgba(39, 15, 81, 0.22),
    0 12px 30px rgba(255, 84, 151, 0.26);
}

body.theme-moonlight .luck-start-button::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.66), transparent);
}

body.theme-moonlight .luck-start-button span {
  width: 72px;
  height: 72px;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: #4f164c;
  background: linear-gradient(145deg, #fff9d8 0%, #ffde70 42%, #ff9fbd 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.82),
    0 0 0 5px rgba(255, 255, 255, 0.1),
    0 10px 24px rgba(71, 16, 87, 0.28);
  font-family: inherit;
  font-size: 0.72rem;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-align: center;
  word-break: break-all;
}

body.theme-moonlight .luck-start-button small {
  color: #fffdf2;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 8px rgba(47, 18, 72, 0.42);
}

.fortune-celebration.is-peach {
  z-index: 12;
  background: linear-gradient(to bottom, rgba(255, 128, 185, 0.08), transparent 52%);
}

.fortune-celebration-bloom {
  position: absolute;
  top: 38%;
  left: 50%;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 224, 127, 0.82);
  border-radius: 50%;
  box-shadow: 0 0 32px 12px rgba(255, 119, 181, 0.34);
  transform: translate(-50%, -50%);
  animation: peach-bloom-wave 1100ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
}

.fortune-celebration-petal {
  position: absolute;
  top: -20px;
  left: var(--petal-x);
  width: 13px;
  height: 18px;
  background: url("./assets/peach-petal.png") center / contain no-repeat;
  opacity: 0;
  filter: hue-rotate(calc(var(--petal-color-index) * 8deg));
  transform: translate3d(0, -12px, 0) rotate(0deg) scale(var(--petal-scale));
  animation: peach-petal-fall var(--petal-duration) cubic-bezier(0.18, 0.62, 0.36, 1) var(--petal-delay) both;
}

.fortune-celebration.is-peach .fortune-celebration-title {
  top: 37%;
  z-index: 2;
  padding: 8px 16px;
  border: 1px solid rgba(255, 232, 152, 0.62);
  border-radius: 999px;
  color: #fff9df;
  background: linear-gradient(100deg, rgba(149, 55, 126, 0.9), rgba(255, 95, 155, 0.9));
  box-shadow: 0 10px 34px rgba(57, 11, 68, 0.34), 0 0 26px rgba(255, 118, 179, 0.28);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  animation: peach-title-arrive 1250ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
}

.zodiac-horoscope {
  --zodiac-coral: #ff6f91;
  --zodiac-yellow: #ffd95f;
  --zodiac-mint: #54e5ba;
  --zodiac-purple: #9a72ff;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(255, 127, 177, 0.5);
  border-radius: 20px;
  background:
    radial-gradient(circle at 4% 2%, rgba(255, 217, 95, 0.24), transparent 30%),
    radial-gradient(circle at 98% 8%, rgba(84, 229, 186, 0.22), transparent 28%),
    radial-gradient(circle at 88% 94%, rgba(255, 111, 145, 0.25), transparent 36%),
    linear-gradient(135deg, rgba(68, 25, 90, 0.98), rgba(31, 25, 77, 0.98) 48%, rgba(16, 55, 70, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11), 0 18px 48px rgba(8, 1, 28, 0.28);
}

.zodiac-horoscope-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.zodiac-horoscope-head > div small,
.virtual-shop-section-head small {
  display: block;
  margin-bottom: 3px;
  color: var(--zodiac-yellow);
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.zodiac-horoscope-head h3 {
  margin: 0;
  color: #fff9ef;
  font-size: 1.08rem;
  line-height: 1;
  letter-spacing: 0.04em;
}

.zodiac-select-shell {
  display: grid;
  grid-template-columns: auto 132px;
  align-items: center;
  gap: 8px;
  color: rgba(255, 248, 242, 0.72);
  font-size: 0.56rem;
  font-weight: 850;
}

.zodiac-select-shell select {
  width: 132px;
  min-height: 38px;
  padding: 0 30px 0 12px;
  border: 1px solid rgba(255, 224, 124, 0.54);
  border-radius: 12px;
  color: #fff8dd;
  background: rgba(32, 20, 66, 0.88);
  font-size: 0.64rem;
  font-weight: 900;
}

.zodiac-orbit {
  position: absolute;
  top: -66px;
  right: 20%;
  z-index: -1;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 222, 118, 0.14);
  border-radius: 50%;
  opacity: 0.72;
  animation: zodiac-orbit-spin 22s linear infinite;
}

.zodiac-orbit i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--zodiac-yellow);
  box-shadow: 0 0 16px rgba(255, 217, 95, 0.75);
}

.zodiac-orbit i:nth-child(1) { top: 12px; left: 42px; }
.zodiac-orbit i:nth-child(2) { right: 7px; bottom: 64px; background: var(--zodiac-mint); }
.zodiac-orbit i:nth-child(3) { bottom: 15px; left: 35px; background: var(--zodiac-coral); }

.zodiac-daily-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 96px minmax(0, 1.4fr) minmax(180px, 0.8fr);
  grid-template-areas:
    "mark copy lucky"
    "ratings ratings ratings";
  align-items: stretch;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 17px;
  background: rgba(10, 16, 41, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.zodiac-daily-card.is-refreshing {
  animation: zodiac-card-refresh 720ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
}

.zodiac-sign-mark {
  grid-area: mark;
  display: grid;
  min-height: 94px;
  place-items: center;
  border: 1px solid rgba(255, 248, 205, 0.64);
  border-radius: 26px 12px 26px 12px;
  color: #4f174d;
  background: linear-gradient(145deg, #fff5b6, #ffae7a 48%, #ff7aad);
  box-shadow: 0 12px 26px rgba(255, 87, 153, 0.24);
  font-size: 1rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.zodiac-daily-copy {
  grid-area: copy;
  align-self: center;
}

.zodiac-daily-copy > span {
  color: rgba(231, 255, 248, 0.66);
  font-size: 0.54rem;
  font-weight: 800;
}

.zodiac-daily-copy > strong {
  display: block;
  margin: 6px 0;
  color: #fff5c8;
  font-size: 0.98rem;
  line-height: 1.25;
}

.zodiac-daily-copy p {
  margin: 0;
  color: rgba(255, 249, 246, 0.78);
  font-size: 0.64rem;
  line-height: 1.65;
}

.zodiac-lucky-note {
  grid-area: lucky;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.zodiac-lucky-note span {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
}

.zodiac-lucky-note span:last-child { grid-column: 1 / -1; }
.zodiac-lucky-note small { color: rgba(255, 255, 255, 0.56); font-size: 0.47rem; }
.zodiac-lucky-note b { color: #fff2a8; font-size: 0.64rem; }

.zodiac-ratings {
  grid-area: ratings;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 4px;
}

.zodiac-rating {
  display: grid;
  grid-template-columns: auto 1fr 22px;
  align-items: center;
  gap: 6px;
}

.zodiac-rating small,
.zodiac-rating strong { color: rgba(255, 255, 255, 0.74); font-size: 0.48rem; }
.zodiac-rating strong { color: #fff0a5; text-align: right; }
.zodiac-rating i { height: 5px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.zodiac-rating i b { display: block; width: var(--zodiac-rating); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--zodiac-coral), var(--zodiac-yellow), var(--zodiac-mint)); box-shadow: 0 0 9px rgba(255, 153, 142, 0.36); }

/* Cyber City horoscope: align with the green/amber terminal system used by the surrounding modules. */
body.theme-suction .zodiac-horoscope {
  --zodiac-coral: #39f88f;
  --zodiac-yellow: #ffd45f;
  --zodiac-mint: #55e8d0;
  --zodiac-purple: #54b8ff;
  border-color: rgba(57, 248, 143, 0.34);
  border-radius: 10px;
  background:
    radial-gradient(circle at 5% 2%, rgba(57, 248, 143, 0.11), transparent 31%),
    radial-gradient(circle at 96% 8%, rgba(84, 184, 255, 0.09), transparent 30%),
    linear-gradient(135deg, rgba(4, 23, 19, 0.98), rgba(4, 14, 14, 0.98) 54%, rgba(5, 20, 26, 0.98));
  box-shadow: inset 0 1px 0 rgba(226, 255, 239, 0.06), 0 16px 42px rgba(0, 0, 0, 0.25);
}

body.theme-suction .zodiac-horoscope-head > div small {
  color: var(--green);
  text-shadow: 0 0 14px rgba(57, 248, 143, 0.24);
}

body.theme-suction .zodiac-horoscope-head h3 { color: #effff4; }
body.theme-suction .zodiac-select-shell { color: rgba(223, 246, 233, 0.62); }

body.theme-suction .zodiac-select-shell select {
  border-color: rgba(57, 248, 143, 0.34);
  border-radius: 8px;
  color: #effff4;
  background: rgba(2, 14, 12, 0.86);
  box-shadow: inset 0 0 18px rgba(57, 248, 143, 0.035);
}

body.theme-suction .zodiac-orbit {
  border-color: rgba(57, 248, 143, 0.15);
  opacity: 0.5;
}

body.theme-suction .zodiac-orbit i {
  background: var(--green);
  box-shadow: 0 0 16px rgba(57, 248, 143, 0.6);
}

body.theme-suction .zodiac-orbit i:nth-child(2) { background: var(--blue); }
body.theme-suction .zodiac-orbit i:nth-child(3) { background: var(--amber); }

body.theme-suction .zodiac-daily-card {
  border-color: rgba(136, 235, 180, 0.22);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(57, 248, 143, 0.035), transparent 48%),
    rgba(1, 13, 12, 0.78);
  box-shadow: inset 0 1px 0 rgba(226, 255, 239, 0.055), inset 0 0 28px rgba(57, 248, 143, 0.025);
}

body.theme-suction .zodiac-sign-mark {
  border-color: rgba(255, 212, 95, 0.48);
  border-radius: 8px;
  color: #082018;
  background: linear-gradient(145deg, #dbffe9, #55e8b0 48%, #ffd45f);
  box-shadow: 0 10px 24px rgba(57, 248, 143, 0.16);
}

body.theme-suction .zodiac-daily-copy > span { color: rgba(185, 210, 194, 0.68); }
body.theme-suction .zodiac-daily-copy > strong { color: #fff0a8; }
body.theme-suction .zodiac-daily-copy p { color: rgba(228, 245, 234, 0.76); }

body.theme-suction .zodiac-lucky-note span {
  border-color: rgba(136, 235, 180, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

body.theme-suction .zodiac-lucky-note small { color: rgba(185, 210, 194, 0.58); }
body.theme-suction .zodiac-lucky-note b { color: var(--amber); }
body.theme-suction .zodiac-rating small { color: rgba(222, 245, 231, 0.68); }
body.theme-suction .zodiac-rating strong { color: var(--amber); }
body.theme-suction .zodiac-rating i { background: rgba(222, 255, 235, 0.1); }

body.theme-suction .zodiac-rating i b {
  background: linear-gradient(90deg, var(--green), #55e8d0 58%, var(--amber));
  box-shadow: 0 0 9px rgba(57, 248, 143, 0.26);
}

.virtual-shop-launch {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title badge" "copy badge";
  align-items: center;
  width: 100%;
  margin: 10px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 221, 105, 0.62);
  border-radius: 14px;
  color: #38133f;
  text-align: left;
  background: linear-gradient(105deg, #ff7fa7, #ffd75e 44%, #61eac3 76%, #8b7bff);
  box-shadow: 0 12px 28px rgba(15, 6, 42, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.virtual-shop-launch::after {
  content: "";
  position: absolute;
  inset: -100% auto -100% -30%;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.64), transparent);
  transform: rotate(18deg);
  animation: virtual-shop-shine 2800ms ease-in-out infinite;
}

.virtual-shop-launch > span { grid-area: title; font-size: 0.82rem; font-weight: 1000; }
.virtual-shop-launch > small { grid-area: copy; margin-top: 2px; color: rgba(49, 22, 59, 0.72); font-size: 0.52rem; font-weight: 800; }
.virtual-shop-launch > b { grid-area: badge; padding: 7px 9px; border: 1px solid rgba(54, 21, 72, 0.26); border-radius: 999px; font-size: 0.48rem; letter-spacing: 0.12em; }

dialog.virtual-shop-dialog {
  width: min(920px, calc(100vw - 28px));
  max-width: 920px;
  max-height: min(88vh, 860px);
  overflow: hidden;
  border-color: rgba(255, 133, 178, 0.54);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 215, 92, 0.19), transparent 28%),
    radial-gradient(circle at 95% 4%, rgba(93, 234, 195, 0.18), transparent 32%),
    linear-gradient(145deg, #251638, #121b35 56%, #102e32);
}

.virtual-shop-dialog-head {
  border-bottom-color: rgba(255, 151, 190, 0.28);
  background: linear-gradient(100deg, rgba(255, 102, 155, 0.14), rgba(255, 213, 91, 0.08), rgba(84, 229, 186, 0.1));
}

.virtual-shop-dialog-body {
  overflow: auto;
  display: grid;
  gap: 14px;
  max-height: calc(min(88vh, 860px) - 104px);
  padding: 16px;
}

.virtual-shop-wallet {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "label balance" "note balance";
  align-items: center;
  gap: 2px 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 235, 153, 0.6);
  border-radius: 15px;
  background: linear-gradient(105deg, rgba(255, 104, 157, 0.96), rgba(255, 205, 84, 0.96) 49%, rgba(77, 220, 186, 0.96));
  box-shadow: 0 12px 30px rgba(7, 4, 24, 0.26);
}

.virtual-shop-wallet > span { grid-area: label; color: rgba(51, 18, 50, 0.75); font-size: 0.56rem; font-weight: 900; }
.virtual-shop-wallet > strong { grid-area: balance; color: #38133f; font-size: clamp(1.05rem, 3.2vw, 1.62rem); font-weight: 1000; text-align: right; }
.virtual-shop-wallet > small { grid-area: note; color: rgba(51, 18, 50, 0.62); font-size: 0.5rem; font-weight: 800; }

.virtual-shop-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.virtual-shop-section-head strong { color: #fff8ed; font-size: 0.8rem; }
.virtual-shop-section-head > span { color: rgba(236, 245, 242, 0.55); font-size: 0.52rem; font-weight: 750; }

.virtual-shop-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.virtual-shop-product {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  grid-template-areas: "mark copy delete" "mark buy buy";
  gap: 8px 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: virtual-shop-product-arrive 520ms cubic-bezier(0.16, 0.84, 0.24, 1) calc(var(--shop-index) * 32ms) both;
}

.virtual-shop-product-mark {
  grid-area: mark;
  display: grid;
  width: 52px;
  min-height: 72px;
  place-items: center;
  border-radius: 13px;
  color: #431841;
  background: linear-gradient(145deg, #ffe36b, #ff86aa 52%, #8d79ff);
  box-shadow: 0 10px 20px rgba(4, 3, 20, 0.22);
  font-size: 0.86rem;
  font-weight: 1000;
}

.virtual-shop-product-copy { grid-area: copy; min-width: 0; }
.virtual-shop-product-copy small { display: block; color: #65e8c3; font-size: 0.45rem; font-weight: 900; letter-spacing: 0.06em; }
.virtual-shop-product-copy strong { display: block; overflow: hidden; margin: 3px 0 4px; color: #fff9f5; font-size: 0.66rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.virtual-shop-product-copy span { color: rgba(244, 245, 244, 0.56); font-size: 0.48rem; }
.virtual-shop-product-copy span b { color: #ffe386; }

.virtual-shop-buy {
  grid-area: buy;
  min-height: 33px;
  border: 0;
  border-radius: 10px;
  color: #39163d;
  background: linear-gradient(100deg, #ff8bae, #ffdd69 52%, #69e6c4);
  font-size: 0.56rem;
  font-weight: 1000;
}

.virtual-shop-buy:disabled {
  color: rgba(230, 238, 235, 0.5);
  background: rgba(255, 255, 255, 0.08);
  cursor: not-allowed;
}

.virtual-shop-delete {
  grid-area: delete;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(255, 139, 168, 0.36);
  border-radius: 8px;
  color: #ff9ab2;
  background: rgba(64, 18, 46, 0.58);
}

.virtual-shop-custom,
.virtual-shop-history {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 15px;
  background: rgba(4, 10, 25, 0.32);
}

.virtual-shop-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.8fr) auto;
  gap: 8px;
}

.virtual-shop-form label { display: grid; gap: 5px; }
.virtual-shop-form label > span { color: rgba(240, 247, 244, 0.64); font-size: 0.5rem; font-weight: 850; }
.virtual-shop-form input { width: 100%; min-height: 40px; border-radius: 10px; }
.virtual-shop-form > button { align-self: end; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; color: #3b163d; background: linear-gradient(110deg, #ffdc69, #67e5c2); font-size: 0.56rem; font-weight: 1000; }

.virtual-shop-history-list { display: grid; gap: 6px; }
.virtual-shop-history-list article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.055); }
.virtual-shop-history-list article > span { overflow: hidden; color: rgba(255, 252, 248, 0.84); font-size: 0.57rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.virtual-shop-history-list article small { margin-left: 8px; color: rgba(255, 255, 255, 0.38); font-size: 0.45rem; }
.virtual-shop-history-list article strong { flex: none; color: #ffb1c6; font-size: 0.56rem; }
.virtual-shop-history-empty { display: grid; gap: 4px; padding: 16px; border: 1px dashed rgba(255, 222, 116, 0.3); border-radius: 11px; text-align: center; }
.virtual-shop-history-empty b { color: #fff0a3; font-size: 0.65rem; }
.virtual-shop-history-empty span { color: rgba(244, 247, 246, 0.54); font-size: 0.5rem; }

.virtual-purchase-celebration {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  color: #411640;
  text-align: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.92), rgba(255, 228, 107, 0.92) 26%, rgba(255, 118, 166, 0.93) 58%, rgba(75, 38, 132, 0.96));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.virtual-purchase-celebration.show {
  visibility: visible;
  animation: virtual-purchase-celebrate 2200ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
}

.virtual-purchase-celebration small { font-size: 0.56rem; font-weight: 1000; letter-spacing: 0.2em; }
.virtual-purchase-celebration strong { max-width: 620px; font-size: clamp(1.25rem, 4vw, 2.2rem); line-height: 1.25; }
.virtual-purchase-celebration span { padding: 8px 14px; border: 1px solid rgba(66, 24, 66, 0.22); border-radius: 999px; font-size: 0.64rem; font-weight: 900; }

@keyframes peach-petal-fall {
  0% { opacity: 0; transform: translate3d(0, -12px, 0) rotate(0deg) scale(var(--petal-scale)); }
  12% { opacity: 0.96; }
  100% { opacity: 0; transform: translate3d(var(--petal-drift), 390px, 0) rotate(var(--petal-rotation)) scale(var(--petal-scale)); }
}

@keyframes peach-bloom-wave {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.25); }
  40% { opacity: 0.94; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(8); }
}

@keyframes peach-title-arrive {
  0% { opacity: 0; transform: translate(-50%, 12px) scale(0.72); }
  28%, 72% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -8px) scale(1.04); }
}

@keyframes zodiac-orbit-spin { to { transform: rotate(360deg); } }
@keyframes zodiac-card-refresh {
  0% { opacity: 0.42; transform: translateY(8px) scale(0.985); filter: saturate(0.6); }
  100% { opacity: 1; transform: none; filter: saturate(1); }
}
@keyframes virtual-shop-shine {
  0%, 55% { left: -32%; opacity: 0; }
  66% { opacity: 0.9; }
  86%, 100% { left: 118%; opacity: 0; }
}
@keyframes virtual-shop-product-arrive {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes virtual-purchase-celebrate {
  0% { opacity: 0; transform: scale(0.94); }
  12%, 78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.04); }
}

@media (max-width: 640px) {
  body.theme-moonlight .luck-tools { grid-template-columns: 94px minmax(0, 1fr); gap: 8px; }
  body.theme-moonlight .luck-start-button { min-height: 104px; padding-inline: 5px; }
  body.theme-moonlight .luck-start-button span { width: 62px; height: 62px; padding: 10px; font-size: 0.63rem; }

  .zodiac-horoscope { padding: 12px; border-radius: 16px; }
  .zodiac-horoscope-head { align-items: center; margin-bottom: 10px; }
  .zodiac-horoscope-head h3 { font-size: 0.88rem; }
  .zodiac-select-shell { grid-template-columns: 1fr; gap: 3px; }
  .zodiac-select-shell > span { display: none; }
  .zodiac-select-shell select { width: 116px; min-height: 34px; font-size: 0.58rem; }
  .zodiac-daily-card {
    grid-template-columns: 70px minmax(0, 1fr);
    grid-template-areas: "mark copy" "lucky lucky" "ratings ratings";
    gap: 9px;
    padding: 10px;
  }
  .zodiac-sign-mark { min-height: 74px; border-radius: 20px 10px 20px 10px; font-size: 0.78rem; }
  .zodiac-daily-copy > strong { margin: 4px 0; font-size: 0.72rem; }
  .zodiac-daily-copy p { display: -webkit-box; overflow: hidden; font-size: 0.54rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .zodiac-lucky-note { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .zodiac-lucky-note span:last-child { grid-column: auto; }
  .zodiac-lucky-note span { min-height: 40px; padding: 6px; }
  .zodiac-lucky-note small { font-size: 0.4rem; }
  .zodiac-lucky-note b { overflow: hidden; font-size: 0.52rem; text-overflow: ellipsis; white-space: nowrap; }
  .zodiac-ratings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; }

  .virtual-shop-launch { margin: 8px 0 10px; padding: 10px 12px; }
  dialog.virtual-shop-dialog { width: calc(100vw - 16px); max-height: 92vh; border-radius: 18px; }
  .virtual-shop-dialog-head { padding: 13px 14px; }
  .virtual-shop-dialog-head h2 { font-size: 0.88rem; }
  .virtual-shop-dialog-head p { display: none; }
  .virtual-shop-dialog-body { max-height: calc(92vh - 76px); padding: 10px; gap: 11px; }
  .virtual-shop-wallet { padding: 11px 12px; }
  .virtual-shop-wallet > strong { font-size: 0.98rem; }
  .virtual-shop-products { grid-template-columns: 1fr; gap: 7px; }
  .virtual-shop-product { grid-template-columns: 45px minmax(0, 1fr) auto; padding: 9px; }
  .virtual-shop-product-mark { width: 45px; min-height: 66px; }
  .virtual-shop-product-copy strong { font-size: 0.61rem; }
  .virtual-shop-form { grid-template-columns: 1fr 0.8fr; }
  .virtual-shop-form > button { grid-column: 1 / -1; }
  .virtual-shop-section-head > span { max-width: 48%; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  .fortune-celebration-petal,
  .fortune-celebration-bloom,
  .zodiac-orbit,
  .virtual-shop-launch::after,
  .virtual-shop-product { animation: none !important; }
  .virtual-purchase-celebration.show { animation-duration: 800ms !important; }
}

/* ===== Ritual games v3 · 聚宝仪式 ===== */
.break-game-fortune {
  --ritual-gold: #ffd76a;
  --ritual-green: #54ffad;
  --ritual-ink: #04120f;
}

.fortune-unified {
  position: relative;
  min-height: 0 !important;
  padding: 14px !important;
  overflow: hidden;
  border: 1px solid rgba(83, 255, 172, 0.36) !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 50% 32%, rgba(51, 255, 151, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(7, 31, 24, 0.98), rgba(2, 12, 11, 0.99)) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 215, 106, 0.08), 0 16px 40px rgba(0, 0, 0, 0.28);
  isolation: isolate;
  touch-action: manipulation;
}

.fortune-unified::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(76, 255, 168, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 255, 168, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

.fortune-unified .fortune-stage-label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px !important;
  padding: 0 1px 9px !important;
  border-bottom: 1px solid rgba(83, 255, 172, 0.16);
}

.fortune-unified .fortune-stage-label span {
  color: #f2fff8 !important;
  font-size: 0.92rem !important;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.fortune-unified .fortune-stage-label small {
  color: rgba(218, 248, 230, 0.62) !important;
  font-size: 0.64rem !important;
}

.fortune-energy-ritual {
  display: grid !important;
  grid-template-columns: minmax(70px, 0.7fr) minmax(150px, 1.25fr) minmax(112px, 0.9fr) !important;
  grid-template-rows: 1fr !important;
  grid-auto-flow: column !important;
  align-items: stretch;
  gap: 12px;
  min-height: 236px;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
}

.fortune-phase-rail {
  display: grid;
  align-content: center;
  gap: 20px;
  padding-left: 3px;
}

.fortune-phase-rail::before {
  content: "";
  position: absolute;
  width: 1px;
  height: 112px;
  margin-left: 12px;
  background: linear-gradient(transparent, rgba(255, 215, 106, 0.45), transparent);
}

.fortune-phase-rail span {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 25px 1fr;
  align-items: center;
  gap: 6px;
  color: rgba(211, 238, 221, 0.36);
  transition: color 180ms ease, transform 180ms ease;
}

.fortune-phase-rail span i {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(86, 255, 175, 0.22);
  border-radius: 50%;
  background: #071b16;
  font-size: 0.54rem;
  font-style: normal;
  font-weight: 950;
}

.fortune-phase-rail span b {
  font-size: 0.62rem;
  white-space: nowrap;
}

.fortune-phase-rail span.is-active {
  color: var(--ritual-gold);
  transform: translateX(3px);
}

.fortune-phase-rail span.is-active i {
  border-color: var(--ritual-gold);
  box-shadow: 0 0 18px rgba(255, 215, 106, 0.38);
}

.fortune-core-wrap {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 0;
}

.fortune-energy-core {
  position: relative !important;
  display: grid !important;
  width: min(31vw, 182px) !important;
  height: min(31vw, 182px) !important;
  min-width: 150px;
  min-height: 150px;
  padding: 0 !important;
  place-items: center;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.fortune-energy-core::before,
.fortune-energy-core::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.fortune-energy-core::before {
  inset: 8%;
  background: conic-gradient(from -90deg, var(--ritual-gold) calc(var(--fortune-charge, 0) * 1turn), rgba(76, 255, 168, 0.12) 0);
  -webkit-mask: radial-gradient(circle, transparent 57%, #000 59% 66%, transparent 68%);
  mask: radial-gradient(circle, transparent 57%, #000 59% 66%, transparent 68%);
  filter: drop-shadow(0 0 9px rgba(255, 215, 106, calc(var(--fortune-charge, 0) * 0.7)));
  transform: rotate(-90deg);
}

.fortune-energy-core::after {
  inset: 21%;
  border: 1px solid rgba(89, 255, 177, 0.22);
  background: radial-gradient(circle, rgba(255, 215, 106, 0.12), rgba(5, 34, 25, 0.72) 56%, rgba(3, 16, 13, 0.96) 72%);
  box-shadow: inset 0 0 26px rgba(76, 255, 168, 0.12), 0 0 calc(9px + var(--fortune-charge, 0) * 30px) rgba(75, 255, 170, 0.2);
}

.fortune-core-orbit,
.fortune-core-halo {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.fortune-core-orbit {
  inset: 2%;
  border: 1px dashed rgba(255, 215, 106, 0.25);
}

.fortune-core-halo {
  inset: 15%;
  border: 1px solid rgba(79, 255, 171, 0.18);
  box-shadow: 0 0 28px rgba(55, 255, 158, 0.1);
}

.fortune-energy-core > img {
  position: relative !important;
  z-index: 3;
  width: 30% !important;
  height: 69% !important;
  object-fit: contain !important;
  filter: drop-shadow(0 0 10px rgba(255, 210, 83, 0.54));
  transform: translateY(-4%);
  user-select: none;
}

.fortune-core-touch {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 13%;
  display: grid;
  min-width: 88px;
  padding: 5px 12px 4px;
  border: 1px solid rgba(255, 215, 106, 0.35);
  border-radius: 999px;
  background: rgba(5, 23, 18, 0.9);
  color: var(--ritual-gold);
  transform: translateX(-50%);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.fortune-core-touch b { font-size: 0.64rem; line-height: 1.15; }
.fortune-core-touch small { color: rgba(232, 249, 238, 0.5); font-size: 0.48rem; }

.fortune-core-wrap .fortune-vessel-status {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: -4px;
  color: rgba(227, 247, 235, 0.56) !important;
  font-size: 0.58rem;
}

.fortune-core-wrap .fortune-vessel-status small:first-child { color: var(--ritual-gold); font-weight: 900; }

.fortune-energy-panel {
  display: grid;
  grid-template-columns: 1fr !important;
  grid-auto-flow: row !important;
  align-content: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(77, 255, 170, 0.16);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(10, 38, 29, 0.62), rgba(3, 15, 13, 0.76));
}

.fortune-energy-value { display: flex; align-items: baseline; color: var(--ritual-gold); }
.fortune-energy-value small { margin-right: auto; color: rgba(222, 246, 231, 0.58); font-size: 0.58rem; }
.fortune-energy-value strong { font-family: "SFMono-Regular", Consolas, monospace; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1; }
.fortune-energy-value span { font-size: 0.65rem; font-weight: 900; }
.fortune-energy-meter { height: 7px; margin: 9px 0 7px; overflow: hidden; border-radius: 999px; background: rgba(69, 255, 160, 0.1); }
.fortune-energy-meter i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #36f59d, #ffe070); box-shadow: 0 0 12px rgba(255, 220, 97, 0.68); transition: width 40ms linear; }
.fortune-energy-panel > p { margin: 0; color: rgba(219, 244, 229, 0.46); font-size: 0.55rem; line-height: 1.35; }

.fortune-energy-panel .fortune-outcome {
  position: static !important;
  inset: auto !important;
  display: grid !important;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 8px;
  min-height: 66px !important;
  margin-top: 13px !important;
  padding: 9px 10px !important;
  border: 1px solid rgba(255, 215, 106, 0.24) !important;
  border-radius: 11px !important;
  background: rgba(255, 215, 106, 0.045) !important;
  opacity: 1 !important;
  transform: none !important;
  width: auto !important;
  height: auto !important;
  writing-mode: horizontal-tb !important;
}

.fortune-energy-panel .fortune-outcome small { color: rgba(233, 248, 239, 0.5) !important; font-size: 0.51rem !important; }
.fortune-energy-panel .fortune-outcome strong { grid-row: 2; color: var(--ritual-gold) !important; font-size: 1.2rem !important; letter-spacing: 0.12em; }
.fortune-energy-panel .fortune-outcome span { grid-row: 1 / span 2; font-family: "SFMono-Regular", Consolas, monospace; color: rgba(255, 215, 106, 0.62); font-size: 1rem; font-weight: 950; }

.fortune-unified .fortune-actions { margin-top: 10px !important; }
.fortune-unified .fortune-result { margin-top: 10px !important; }

.fortune-unified.is-charging .fortune-core-orbit { animation: fortuneCoreSpin 2.4s linear infinite; }
.fortune-unified.is-charging .fortune-core-halo { animation: fortuneCorePulse 0.72s ease-in-out infinite alternate; }
.fortune-unified.is-charging .fortune-energy-core > img { animation: fortuneTokenCharge 0.72s ease-in-out infinite alternate; }
.fortune-unified.is-drawing .fortune-core-orbit,
.fortune-unified.is-choosing .fortune-core-orbit { animation: fortuneCoreSpin 0.62s linear infinite; border-style: solid; border-color: rgba(255, 215, 106, 0.75); }
.fortune-unified.is-drawing .fortune-energy-core > img,
.fortune-unified.is-choosing .fortune-energy-core > img { animation: fortuneTokenResolve 0.34s ease-in-out infinite alternate; }
.fortune-unified.is-revealed .fortune-energy-core { animation: fortuneCoreReveal 0.68s cubic-bezier(.18,.88,.25,1.4); }
.fortune-unified.is-revealed .fortune-outcome { animation: fortuneOutcomeReveal 0.72s cubic-bezier(.18,.88,.25,1.25); }

@keyframes fortuneCoreSpin { to { transform: rotate(360deg); } }
@keyframes fortuneCorePulse { to { transform: scale(1.08); box-shadow: 0 0 42px rgba(72, 255, 168, 0.3); } }
@keyframes fortuneTokenCharge { to { transform: translateY(-10%) scale(1.06); filter: drop-shadow(0 0 20px rgba(255, 219, 98, 0.9)); } }
@keyframes fortuneTokenResolve { to { transform: translateY(-8%) rotate(2deg) scale(1.05); } }
@keyframes fortuneCoreReveal { 45% { transform: scale(1.13); filter: brightness(1.55); } }
@keyframes fortuneOutcomeReveal { from { opacity: 0; transform: translateY(10px) scale(0.94); } }

/* Three-track reaction redesign */
.reaction-game-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 211, 85, 0.09), transparent 36%),
    linear-gradient(155deg, rgba(8, 31, 25, 0.98), rgba(3, 13, 12, 0.99)) !important;
}

.reaction-rhythm {
  position: relative;
  min-height: 220px !important;
  padding: 48px 8px 10px !important;
  overflow: hidden;
  border-color: rgba(255, 214, 91, 0.22) !important;
  background:
    linear-gradient(90deg, transparent 32.5%, rgba(81, 255, 171, 0.08) 33%, transparent 33.5%, transparent 66%, rgba(81, 255, 171, 0.08) 66.5%, transparent 67%),
    linear-gradient(180deg, rgba(5, 22, 18, 0.92), rgba(2, 11, 10, 0.98)) !important;
}

.reaction-rhythm::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background: repeating-linear-gradient(0deg, transparent 0 22px, rgba(80, 255, 170, 0.06) 23px 24px);
  pointer-events: none;
}

.reaction-callout { top: 8px !important; z-index: 8; }
.reaction-callout strong { color: #ffe47c !important; text-shadow: 0 0 14px rgba(255, 217, 93, 0.45); }

.reaction-lanes { position: relative; z-index: 2; height: 158px !important; gap: 7px !important; }
.reaction-lane {
  position: relative !important;
  min-height: 158px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(79, 255, 169, 0.16) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(6, 26, 21, 0.45), rgba(10, 38, 29, 0.84)) !important;
  box-shadow: inset 0 -20px 28px rgba(49, 255, 151, 0.045) !important;
  touch-action: manipulation;
}

.reaction-lane > b {
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  color: rgba(216, 245, 228, 0.48);
  font-size: 0.55rem;
}

.reaction-lane > i {
  position: absolute !important;
  right: 9px !important;
  bottom: 23px !important;
  left: 9px !important;
  width: auto !important;
  height: 13px !important;
  border: 1px solid rgba(255, 220, 99, 0.36) !important;
  border-radius: 5px !important;
  background: linear-gradient(180deg, rgba(255, 223, 107, 0.05), rgba(255, 199, 54, 0.18)) !important;
  box-shadow: 0 0 12px rgba(255, 215, 88, 0.12) !important;
}

.reaction-node {
  position: absolute;
  z-index: 3;
  top: -50px;
  left: 50%;
  display: block;
  width: 46px;
  height: 46px;
  opacity: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.reaction-node img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 11px rgba(255, 214, 72, 0.65)); }
.reaction-lane.is-target { border-color: rgba(255, 219, 92, 0.55) !important; box-shadow: inset 0 0 24px rgba(255, 207, 67, 0.08), 0 0 15px rgba(255, 213, 76, 0.15) !important; }
.reaction-lane.is-target .reaction-node { opacity: 1; animation: reactionNodeDrop var(--reaction-drop-ms, 760ms) linear both; }
.reaction-lane.is-target > i { animation: reactionTargetBeat 0.38s ease-in-out infinite alternate; }
.reaction-rhythm.is-stop .reaction-lane { border-color: rgba(255, 94, 97, 0.24) !important; background: linear-gradient(180deg, rgba(52, 8, 12, 0.4), rgba(19, 5, 8, 0.9)) !important; }
.reaction-rhythm.is-stop .reaction-lane > i { border-color: rgba(255, 84, 88, 0.56) !important; background: rgba(255, 55, 62, 0.2) !important; box-shadow: 0 0 17px rgba(255, 55, 62, 0.25) !important; }
.reaction-lane.is-perfect .reaction-node,
.reaction-lane.is-good .reaction-node,
.reaction-lane.is-hit .reaction-node { top: auto; bottom: 13px; opacity: 1; animation: reactionNodeBurst 0.42s ease-out both; }
.reaction-lane.is-wrong { animation: reactionLaneWrong 0.32s ease; }

.reaction-combo-flash {
  position: absolute;
  z-index: 12;
  top: 47%;
  left: 50%;
  color: #fff2a8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 1.7rem;
  font-weight: 1000;
  letter-spacing: -0.05em;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  text-shadow: 0 0 14px #ffcc42, 0 4px 0 rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.reaction-combo-flash.show { animation: reactionComboFlash 0.72s cubic-bezier(.16,.88,.25,1.3); }
.reaction-combo-flash[data-tone="fever"] { color: #78ffc0; text-shadow: 0 0 20px #34ee98; }

@keyframes reactionNodeDrop { from { top: -50px; transform: translateX(-50%) scale(0.72); } 76% { top: calc(100% - 72px); transform: translateX(-50%) scale(1); } to { top: calc(100% - 64px); transform: translateX(-50%) scale(1.08); } }
@keyframes reactionTargetBeat { to { transform: scaleY(1.25); filter: brightness(1.4); } }
@keyframes reactionNodeBurst { 55% { transform: translateX(-50%) scale(1.5); filter: brightness(1.8); } to { transform: translateX(-50%) scale(2); opacity: 0; } }
@keyframes reactionLaneWrong { 33% { transform: translateX(-4px); } 66% { transform: translateX(4px); } }
@keyframes reactionComboFlash { 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); } 70% { opacity: 1; transform: translate(-50%, -65%) scale(1); } to { opacity: 0; transform: translate(-50%, -90%) scale(0.92); } }

/* Wealth burst redesign */
.bubble-game-overlay {
  background:
    radial-gradient(circle at 50% 43%, rgba(24, 128, 80, 0.2), transparent 44%),
    linear-gradient(155deg, #061b15 0%, #020b0a 58%, #07130f 100%) !important;
}

.bubble-game-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(78, 255, 168, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 255, 168, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

.bubble-game-hud,
.bubble-fever,
.bubble-wave-progress { position: relative; z-index: 20; }

.bubble-wave-progress {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: min(680px, calc(100% - 24px));
  margin: 7px auto 0;
  padding: 7px 10px;
  border: 1px solid rgba(255, 217, 91, 0.22);
  border-radius: 10px;
  background: rgba(3, 20, 15, 0.72);
  color: rgba(232, 249, 239, 0.7);
}

.bubble-wave-progress b { color: #ffe47b; font-size: 0.68rem; }
.bubble-wave-progress span { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255, 218, 89, 0.1); }
.bubble-wave-progress span i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #42f6a1, #ffe069); box-shadow: 0 0 12px rgba(255, 214, 75, 0.5); transition: width 160ms ease; }
.bubble-wave-progress em { color: #7dffc0; font-size: 0.58rem; font-style: normal; font-weight: 850; }

.bubble-game-arena { z-index: 5 !important; }
.bubble-target {
  border: 0 !important;
  background: transparent !important;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.32));
  transition: filter 120ms ease;
  touch-action: none;
}
.bubble-target img { width: 100% !important; height: 100% !important; object-fit: contain !important; pointer-events: none; }
.bubble-target.is-gold { filter: drop-shadow(0 0 12px rgba(255, 212, 64, 0.74)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4)); }
.bubble-target.is-gold img { filter: none !important; animation: wealthOrbPulse 0.68s ease-in-out infinite alternate; }
.bubble-target.is-chain { filter: hue-rotate(65deg) drop-shadow(0 0 9px rgba(72, 255, 174, 0.5)); }
.bubble-target.is-time { filter: hue-rotate(-32deg) drop-shadow(0 0 9px rgba(120, 203, 255, 0.55)); }
.bubble-target.is-wave-cleared { pointer-events: none; animation: bubbleWaveVacuum 0.34s ease-in both !important; }
.bubble-game-overlay.is-wave-clear::after {
  content: "清 屏 暴 击";
  position: fixed;
  z-index: 40;
  top: 50%;
  left: 50%;
  padding: 14px 20px;
  border: 1px solid rgba(255, 224, 108, 0.5);
  border-radius: 12px;
  background: rgba(4, 24, 17, 0.78);
  color: #fff0a3;
  font-size: clamp(1.2rem, 7vw, 2.6rem);
  font-weight: 1000;
  letter-spacing: 0.18em;
  transform: translate(-50%, -50%);
  text-shadow: 0 0 20px rgba(255, 207, 55, 0.8);
  box-shadow: 0 0 80px rgba(255, 196, 43, 0.2);
  animation: bubbleWaveTitle 0.8s cubic-bezier(.16,.88,.25,1.2) both;
  pointer-events: none;
}
.bubble-combo-burst[data-tone="wave"] { color: #fff0a1 !important; text-shadow: 0 0 20px #ffc52e !important; }

@keyframes wealthOrbPulse { to { transform: scale(1.08) rotate(4deg); filter: brightness(1.18); } }
@keyframes bubbleWaveVacuum { to { opacity: 0; transform: translate(calc(50vw - var(--bubble-x, 0px)), calc(50vh - var(--bubble-y, 0px))) scale(0.18); } }
@keyframes bubbleWaveTitle { from { opacity: 0; transform: translate(-50%, -50%) scale(0.45); } 35% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } to { opacity: 0; transform: translate(-50%, -72%) scale(0.98); } }

@media (max-width: 640px) {
  .fortune-unified { padding: 11px !important; border-radius: 15px !important; }
  .fortune-unified .fortune-stage-label { align-items: flex-start; flex-direction: column; gap: 3px; }
  .fortune-energy-ritual { grid-template-columns: 48px minmax(138px, 1fr) minmax(92px, 1fr) !important; grid-template-rows: 1fr !important; gap: 5px; min-height: 202px; }
  .fortune-phase-rail { gap: 15px; }
  .fortune-phase-rail::before { height: 92px; margin-left: 10px; }
  .fortune-phase-rail span { grid-template-columns: 21px 1fr; gap: 3px; }
  .fortune-phase-rail span i { width: 21px; height: 21px; font-size: 0.47rem; }
  .fortune-phase-rail span b { font-size: 0.48rem; white-space: normal; line-height: 1.05; }
  .fortune-energy-core { width: 142px !important; height: 142px !important; min-width: 142px; min-height: 142px; }
  .fortune-core-touch { min-width: 76px; padding: 4px 8px; }
  .fortune-core-touch b { font-size: 0.56rem; }
  .fortune-energy-panel { padding: 8px 7px; border-radius: 11px; }
  .fortune-energy-value { flex-wrap: wrap; }
  .fortune-energy-value small { flex-basis: 100%; margin-bottom: 4px; }
  .fortune-energy-value strong { font-size: 1.2rem; }
  .fortune-energy-panel > p { display: none; }
  .fortune-energy-panel .fortune-outcome { grid-template-columns: 1fr !important; min-height: 59px !important; margin-top: 9px !important; padding: 7px !important; }
  .fortune-energy-panel .fortune-outcome small,
  .fortune-energy-panel .fortune-outcome strong { writing-mode: horizontal-tb !important; }
  .fortune-energy-panel .fortune-outcome span { display: none; }
  .fortune-energy-panel .fortune-outcome strong { font-size: 0.92rem !important; letter-spacing: 0.06em; }
  .fortune-core-wrap .fortune-vessel-status { gap: 3px; font-size: 0.49rem; }
  .fortune-core-wrap .fortune-vessel-status span { display: none; }
  .fortune-core-wrap .fortune-vessel-status small:last-child { display: none; }

  .reaction-game-card { min-height: 300px !important; }
  .reaction-rhythm { min-height: 212px !important; }
  .reaction-lanes { height: 150px !important; }
  .reaction-lane { min-height: 150px !important; }
  .reaction-node { width: 43px; height: 43px; }

  .bubble-game-hud { padding: 10px 11px !important; }
  .bubble-game-scoreboard { gap: 5px !important; }
  .bubble-wave-progress { grid-template-columns: auto 1fr; width: calc(100% - 18px); }
  .bubble-wave-progress em { grid-column: 1 / -1; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .fortune-unified.is-charging .fortune-core-orbit,
  .fortune-unified.is-charging .fortune-core-halo,
  .fortune-unified.is-charging .fortune-energy-core > img,
  .reaction-lane.is-target .reaction-node,
  .bubble-target.is-gold img { animation-duration: 1.5s !important; }
}

/* ===== Ritual games v4 · 金币风暴 / 一刀暴富 ===== */
.fortune-energy-ritual,
.fortune-core-wrap {
  border: 0 !important;
  outline: 0 !important;
  background-image: none !important;
  box-shadow: none !important;
}

.fortune-energy-ritual {
  clip-path: inset(2px) !important;
}

.fortune-energy-ritual::before,
.fortune-core-wrap::before,
.fortune-core-wrap::after {
  display: none !important;
  content: none !important;
}

.fortune-energy-ritual::after {
  content: "" !important;
  position: absolute !important;
  z-index: 20 !important;
  inset: 6px !important;
  display: block !important;
  border: 2px solid rgba(4, 20, 16, 0.98) !important;
  background: none !important;
  pointer-events: none !important;
}

.fortune-energy-core,
.fortune-energy-core *,
.fortune-energy-core img {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

.fortune-energy-core img {
  pointer-events: none !important;
  -webkit-user-drag: none !important;
}

.fortune-unified::before {
  display: none !important;
}

.fortune-core-wrap .fortune-vessel-status {
  display: none !important;
}

.fortune-energy-panel {
  border: 0 !important;
  background: rgba(4, 22, 17, 0.48) !important;
}

.coin-storm-launch-card,
.slash-launch-card {
  position: relative;
  min-height: 292px !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 58%, rgba(255, 211, 78, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(7, 31, 24, 0.98), rgba(2, 13, 11, 0.99)) !important;
}

.coin-storm-launch-card > p,
.slash-launch-card > p {
  margin: 8px 0 10px;
  color: rgba(224, 246, 233, 0.58);
  font-size: 0.63rem;
  line-height: 1.45;
}

.coin-storm-preview,
.slash-preview {
  position: relative;
  height: 154px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 85, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 78%, rgba(67, 255, 164, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(4, 19, 16, 0.75), rgba(2, 10, 9, 0.95));
  isolation: isolate;
}

.coin-storm-preview::before,
.slash-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(77, 255, 168, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 255, 168, 0.07) 1px, transparent 1px);
  background-size: 25px 25px;
}

.coin-storm-preview .preview-bowl {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 118px;
  height: 76px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 14px rgba(255, 201, 54, 0.36));
}

.preview-coin {
  position: absolute;
  display: block;
  width: 44px;
  height: 44px;
  animation: previewCoinFall 2.1s ease-in-out infinite;
}

.preview-coin img { width: 100%; height: 100%; object-fit: contain; }
.preview-coin-one { top: 6px; left: 18%; }
.preview-coin-two { top: 18px; left: 46%; width: 52px; height: 52px; animation-delay: -0.75s; }
.preview-coin-three { top: 3px; right: 17%; width: 48px; height: 48px; animation-delay: -1.25s; }

.coin-storm-preview > b,
.slash-preview > b {
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  z-index: 4;
  color: rgba(255, 235, 154, 0.8);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow: 0 2px 5px #000;
}

.slash-preview-ingot,
.slash-preview-envelope {
  position: absolute;
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(255, 201, 46, 0.42));
}

.slash-preview-ingot { top: 16px; left: 21%; transform: rotate(-14deg); animation: previewSlashTarget 1.8s ease-in-out infinite alternate; }
.slash-preview-envelope { top: 18px; right: 20%; transform: rotate(13deg); animation: previewSlashTarget 1.8s ease-in-out -0.9s infinite alternate; }
.slash-preview > span {
  position: absolute;
  z-index: 3;
  top: 68px;
  left: 18%;
  width: 64%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #effff8 36%, #ffe077 52%, transparent);
  transform: rotate(-14deg);
  filter: drop-shadow(0 0 8px rgba(255, 235, 141, 0.8));
  animation: previewSlashLine 1.25s ease-in-out infinite;
}

@keyframes previewCoinFall { 0%, 100% { transform: translateY(-8px) rotate(-8deg); } 50% { transform: translateY(28px) rotate(10deg); } }
@keyframes previewSlashTarget { to { transform: translateY(-10px) rotate(8deg) scale(1.06); } }
@keyframes previewSlashLine { 0%, 100% { opacity: 0.25; transform: translateX(-18px) rotate(-14deg) scaleX(0.7); } 50% { opacity: 1; transform: translateX(18px) rotate(-14deg) scaleX(1.08); } }

.immersive-game-overlay {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(24, 132, 80, 0.2), transparent 45%),
    linear-gradient(155deg, #061c15, #020b0a 60%, #07130f);
  transition: opacity 180ms ease;
  isolation: isolate;
  touch-action: none;
}

.immersive-game-overlay[hidden] { display: none !important; }
.immersive-game-overlay.is-open { opacity: 1; }
.immersive-game-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(80, 255, 172, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 255, 172, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
}

.immersive-game-hud {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr 46px;
  align-items: center;
  gap: 14px;
  margin: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(78, 255, 172, 0.25);
  border-radius: 14px;
  background: rgba(4, 22, 17, 0.88);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.immersive-game-title { display: grid; gap: 1px; }
.immersive-game-title small { color: #61ffaf; font-size: 0.56rem; font-weight: 900; }
.immersive-game-title strong { color: #f3fff8; font-size: 1rem; }
.immersive-game-scoreboard { display: grid; grid-template-columns: repeat(4, minmax(62px, 1fr)); gap: 7px; }
.immersive-game-scoreboard span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid rgba(75, 255, 169, 0.12);
  border-radius: 8px;
  color: rgba(224, 246, 233, 0.55);
  font-size: 0.56rem;
  background: rgba(0, 0, 0, 0.18);
}
.immersive-game-scoreboard b { color: #ffe06e; font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.86rem; }
.immersive-game-close {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 217, 92, 0.55);
  border-radius: 11px;
  background: rgba(6, 24, 19, 0.92);
  color: #effff7;
  font-size: 1.35rem;
}

.immersive-fever {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 0 10px 8px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 218, 87, 0.16);
  border-radius: 10px;
  background: rgba(3, 18, 14, 0.72);
}
.immersive-fever span { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255, 216, 77, 0.1); }
.immersive-fever i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #41f6a0, #ffe36d); box-shadow: 0 0 13px rgba(255, 218, 75, 0.56); transition: width 140ms ease; }
.immersive-fever b { color: #ffe57c; font-size: 0.62rem; }

.coin-storm-arena,
.slash-game-arena {
  position: relative;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
}

.coin-storm-arena::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 32px;
  left: 8%;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(58, 255, 157, 0.11), transparent 67%);
  pointer-events: none;
}

.coin-storm-guide,
.slash-game-guide {
  position: absolute;
  z-index: 12;
  top: 43%;
  left: 50%;
  display: grid;
  gap: 4px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 220, 105, 0.25);
  border-radius: 12px;
  background: rgba(4, 24, 18, 0.76);
  color: #ffe681;
  text-align: center;
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}
.coin-storm-guide small,
.slash-game-guide small { color: rgba(229, 248, 237, 0.58); font-size: 0.58rem; }
.coin-storm-guide.is-hidden,
.slash-game-guide.is-hidden { opacity: 0; transform: translate(-50%, -42%) scale(0.94); }

.coin-storm-bowl {
  position: absolute;
  z-index: 10;
  bottom: 10px;
  left: var(--bowl-x, 50%);
  width: clamp(104px, 22vw, 150px);
  height: clamp(66px, 14vw, 96px);
  transform: translateX(-50%);
  transition: left 45ms linear, filter 120ms ease;
  pointer-events: none;
}
.coin-storm-bowl img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 16px rgba(255, 205, 51, 0.5)); pointer-events: none; }
.coin-storm-overlay.is-fever .coin-storm-bowl { filter: drop-shadow(0 0 18px rgba(64, 255, 165, 0.78)); }

.coin-storm-item,
.slash-target {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  will-change: transform;
  pointer-events: none;
}
.coin-storm-item img,
.slash-target img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.coin-storm-item.is-coin,
.slash-target.is-coin { filter: drop-shadow(0 0 9px rgba(255, 211, 57, 0.62)); }
.coin-storm-item.is-ingot,
.slash-target.is-ingot { filter: drop-shadow(0 0 13px rgba(255, 210, 51, 0.72)); }
.coin-storm-item.is-red,
.slash-target.is-red { filter: drop-shadow(0 0 10px rgba(255, 75, 72, 0.42)); }
.coin-storm-item.is-rare,
.slash-target.is-rare { filter: drop-shadow(0 0 18px rgba(255, 217, 70, 0.9)); }
.coin-storm-item.is-cold,
.slash-target.is-cold { filter: grayscale(0.72) hue-rotate(135deg) drop-shadow(0 0 10px rgba(111, 184, 255, 0.5)); opacity: 0.86; }
.coin-storm-item.is-collected { animation: coinStormCollect 0.3s ease-out both; }
.coin-storm-value,
.slash-value {
  position: absolute;
  top: 45%;
  left: 50%;
  min-width: max-content;
  color: #fff0a4;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 950;
  transform: translate(-50%, -50%);
  text-shadow: 0 0 10px #ffbd25, 0 2px 3px #000;
}

.immersive-count-in,
.immersive-combo-burst {
  position: fixed;
  z-index: 80;
  top: 50%;
  left: 50%;
  color: #fff0a4;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1.7rem, 8vw, 3.7rem);
  font-weight: 1000;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  text-shadow: 0 0 20px rgba(255, 205, 47, 0.86), 0 4px 0 rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.immersive-count-in.show { animation: immersiveCountIn 0.5s cubic-bezier(.17,.88,.25,1.2); }
.immersive-combo-burst.show { animation: immersiveBurst 0.78s cubic-bezier(.17,.88,.25,1.2); }
.immersive-combo-burst[data-tone="fever"] { color: #72ffb9; text-shadow: 0 0 22px #25ee8d; }
.immersive-combo-burst[data-tone="cold"] { color: #91d7ff; text-shadow: 0 0 18px #3b96ff; }

.immersive-game-result {
  position: fixed;
  z-index: 90;
  top: 50%;
  left: 50%;
  display: grid;
  min-width: min(330px, calc(100vw - 32px));
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(255, 220, 101, 0.42);
  border-radius: 18px;
  background: rgba(4, 25, 18, 0.96);
  color: #effff6;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 70px rgba(255, 198, 37, 0.15), 0 22px 60px rgba(0, 0, 0, 0.55);
}
.immersive-game-result[hidden] { display: none !important; }
.immersive-game-result small { color: #64ffad; font-size: 0.62rem; }
.immersive-game-result strong { color: #ffe477; font-size: 1.8rem; }
.immersive-game-result span { color: rgba(225, 247, 234, 0.62); font-size: 0.68rem; }
.immersive-game-result button { margin-top: 6px; padding: 10px 16px; border: 1px solid rgba(255, 222, 102, 0.45); border-radius: 10px; background: linear-gradient(110deg, #53ecab, #ffe16a); color: #082016; font-weight: 950; }

.coin-storm-overlay.is-impact .coin-storm-bowl { animation: bowlImpact 0.16s ease; }
.coin-storm-overlay.is-jackpot::after,
.slash-game-overlay.is-jackpot::after {
  content: "";
  position: fixed;
  z-index: 60;
  inset: -20%;
  background: radial-gradient(circle, rgba(255, 238, 143, 0.5), rgba(255, 191, 34, 0.16) 28%, transparent 56%);
  animation: jackpotFlash 0.45s ease-out both;
  pointer-events: none;
}

.slash-game-overlay {
  display: grid !important;
  grid-template-rows: auto auto 1fr;
  touch-action: none;
}
.slash-game-overlay[hidden] { display: none !important; }
.slash-game-overlay .bubble-game-hud { position: relative; z-index: 30; }
.slash-game-overlay .bubble-fever { position: relative; z-index: 30; }
.slash-game-arena { z-index: 5; }
.slash-trail-layer { position: fixed; z-index: 35; inset: 0; overflow: hidden; pointer-events: none; }
.slash-trail {
  position: absolute;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #effff8 26%, #ffe681 64%, transparent);
  transform-origin: 0 50%;
  filter: drop-shadow(0 0 7px rgba(255, 231, 132, 0.92));
  animation: slashTrailFade 0.22s ease-out both;
}
.slash-target { z-index: 12; }
.slash-target.is-sliced { animation: slashTargetSplit 0.3s cubic-bezier(.18,.85,.3,1) both; }
.slash-game-overlay.is-impact .slash-game-arena { animation: slashScreenImpact 0.15s ease; }

@keyframes coinStormCollect { 45% { transform: scale(1.45); filter: brightness(1.8); } to { transform: translateY(-18px) scale(0.5); opacity: 0; } }
@keyframes bowlImpact { 45% { transform: translateX(-50%) scale(1.08); filter: brightness(1.35); } }
@keyframes immersiveCountIn { 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.14); } to { opacity: 0; transform: translate(-50%, -70%) scale(0.95); } }
@keyframes immersiveBurst { 24% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 70% { opacity: 1; transform: translate(-50%, -62%) scale(1); } to { opacity: 0; transform: translate(-50%, -90%) scale(0.88); } }
@keyframes jackpotFlash { from { opacity: 0; transform: scale(0.4); } 35% { opacity: 1; } to { opacity: 0; transform: scale(1.18); } }
@keyframes slashTrailFade { from { opacity: 1; transform-origin: left; } to { opacity: 0; filter: blur(2px); } }
@keyframes slashTargetSplit { 45% { filter: brightness(1.8); transform: scale(1.3) rotate(14deg); } to { opacity: 0; transform: scale(1.75) rotate(28deg); } }
@keyframes slashScreenImpact { 50% { transform: scale(1.008); filter: brightness(1.12); } }

@media (max-width: 640px) {
  .coin-storm-launch-card,
  .slash-launch-card { min-height: 292px !important; }
  .coin-storm-preview,
  .slash-preview { height: 145px; }
  .immersive-game-hud { grid-template-columns: 1fr 40px; gap: 7px; margin: 7px; padding: 8px; }
  .immersive-game-title { grid-column: 1; }
  .immersive-game-scoreboard { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .immersive-game-scoreboard span { display: grid; gap: 1px; padding: 5px; text-align: center; }
  .immersive-game-close { grid-column: 2; grid-row: 1; width: 38px; height: 38px; }
  .immersive-fever { margin: 0 7px 6px; grid-template-columns: 1fr; gap: 4px; padding: 6px 8px; }
  .immersive-fever b { text-align: center; }
  .coin-storm-bowl { bottom: 6px; }
  .coin-storm-guide,
  .slash-game-guide { min-width: 210px; }
  .slash-game-overlay .bubble-game-hud { margin: 7px !important; padding: 8px !important; }
  .slash-game-overlay .bubble-fever { margin: 0 7px 6px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .preview-coin,
  .slash-preview-ingot,
  .slash-preview-envelope,
  .slash-preview > span { animation-duration: 2.8s !important; }
}

/* Final fortune performance guard — must remain after legacy animation layers. */
.fortune-draw-stage.fortune-unified.is-drawing,
.fortune-unified .fortune-result.is-drawing {
  animation: none !important;
  filter: none !important;
}

.fortune-unified .fortune-result.is-interpreted::after {
  display: none !important;
  content: none !important;
  border: 0 !important;
}

.fortune-unified .fortune-result.is-interpreted {
  outline: 0 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2) !important;
}

.fortune-interpret-button:focus:not(:focus-visible) {
  outline: 0;
}

/* Keep the inner fortune controls frameless in every draw state on iOS. */
.fortune-unified .fortune-ritual.fortune-energy-ritual,
.fortune-unified .fortune-energy-panel {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.fortune-unified .fortune-ritual.fortune-energy-ritual {
  clip-path: none !important;
  background: none !important;
}

.fortune-unified .fortune-ritual.fortune-energy-ritual::before,
.fortune-unified .fortune-ritual.fortune-energy-ritual::after,
.fortune-unified .fortune-energy-panel::before,
.fortune-unified .fortune-energy-panel::after,
.fortune-unified .fortune-energy-panel .fortune-outcome::before,
.fortune-unified .fortune-energy-panel .fortune-outcome::after {
  display: none !important;
  content: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.fortune-interpret-button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.fortune-unified.is-presenting .fortune-interpret-button {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

/* Readability pass: enlarge the complete interface, with extra emphasis on timers and fortune copy. */
html {
  font-size: 18px;
}

.workday-countdown-card {
  min-height: 68px;
}

.workday-countdown-card span {
  font-size: 0.72rem;
}

.workday-countdown-card span i {
  width: 24px;
  height: 24px;
  font-size: 0.62rem;
}

.workday-countdown-card small {
  font-size: 0.6rem;
}

.workday-countdown-card strong {
  font-size: clamp(1.05rem, 2.5vw, 1.32rem);
}

.fortune-unified .fortune-result {
  gap: 8px;
  padding: 14px 15px;
}

.fortune-unified .fortune-result .fortune-oracle-label,
.fortune-unified .fortune-result .fortune-sequence {
  font-size: 0.68rem;
}

.fortune-unified .fortune-result b {
  font-size: 0.96rem;
  line-height: 1.35;
  white-space: normal;
}

.fortune-unified .fortune-result p {
  display: block;
  overflow: visible;
  font-size: 0.72rem;
  line-height: 1.62;
  -webkit-line-clamp: unset;
}

.fortune-unified .fortune-oracle-footer {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 7px;
}

.fortune-unified .fortune-oracle-footer span,
.fortune-unified .fortune-oracle-footer em {
  overflow: visible;
  font-size: 0.64rem;
  line-height: 1.45;
  text-overflow: clip;
  white-space: normal;
}

@media (max-width: 640px) {
  .workday-countdown-card {
    min-height: 72px;
    gap: 7px;
    padding: 9px 10px;
  }

  .workday-countdown-card span {
    font-size: 0.68rem;
  }

  .workday-countdown-card span i {
    width: 22px;
    height: 22px;
    font-size: 0.58rem;
  }

  .workday-countdown-card small {
    font-size: 0.56rem;
  }

  .workday-countdown-card strong {
    font-size: clamp(1rem, 5vw, 1.18rem);
    letter-spacing: 0.01em;
  }

  .fortune-unified .fortune-result {
    min-height: 0;
    padding: 13px;
  }

  .fortune-unified .fortune-result .fortune-oracle-label,
  .fortune-unified .fortune-result .fortune-sequence {
    font-size: 0.66rem;
  }

  .fortune-unified .fortune-result b {
    font-size: 0.92rem;
  }

  .fortune-unified .fortune-result p {
    font-size: 0.7rem;
  }

  .fortune-unified .fortune-oracle-footer em {
    display: block;
    flex-basis: 100%;
  }
}

/* Compact countdown bars: name and live countdown share one line. */
.workday-countdowns {
  gap: 7px;
}

.workday-countdown-card {
  min-height: 46px;
  gap: 7px;
  padding: 7px 9px;
}

.workday-countdown-card span {
  min-width: 0;
  gap: 5px;
  font-size: 0.64rem;
}

.workday-countdown-card span i {
  width: 21px;
  height: 21px;
  font-size: 0.54rem;
}

.workday-countdown-card strong,
.workday-countdown-card[data-phase="arrived"] strong {
  overflow: hidden;
  min-width: 0;
  font-size: clamp(0.76rem, 2.15vw, 1.05rem);
  letter-spacing: 0;
  text-overflow: clip;
  opacity: 1;
  white-space: nowrap;
}

.workday-countdown-card[data-phase="arrived"] strong::after {
  content: none;
}

@media (max-width: 640px) {
  .workday-countdowns {
    margin-inline: 12px;
  }

  .workday-countdown-card span {
    font-size: 0.58rem;
  }

  .workday-countdown-card span i {
    width: 19px;
    height: 19px;
    font-size: 0.5rem;
  }

  .workday-countdown-card strong,
  .workday-countdown-card[data-phase="arrived"] strong {
    font-size: clamp(0.68rem, 3.8vw, 0.9rem);
  }
}

/* Goal completion stamp is larger and brought toward the center. */
.income-goal-stamp {
  padding: 4px 10px;
  border-width: 2px;
  font-size: 0.7rem;
  transform: translateX(-10px) rotate(-6deg) scale(1.6);
}

@media (max-width: 640px) {
  .income-goal-stamp {
    padding: 3px 7px;
    border-width: 2px;
    font-size: 0.58rem;
    transform: translateX(-5px) rotate(-6deg) scale(1.5);
  }
}

/* Work-time interaction: keep the live-income hero intact and share the countdown-card language. */
.work-toggle-button {
  display: inline-grid;
  min-width: 118px;
  place-items: center;
  align-content: center;
  gap: 1px;
  line-height: 1;
}

.work-toggle-button span {
  font-size: 0.86rem;
  font-weight: 950;
}

.work-toggle-button small {
  font-size: 0.52rem;
  font-weight: 850;
  opacity: 0.62;
}

.reset-today-button {
  color: rgba(238, 250, 243, 0.76);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.72rem;
  font-weight: 850;
}

.ledger-summary article > small {
  overflow: hidden;
  color: rgba(165, 205, 181, 0.66);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.54rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .control-strip .work-toggle-button {
    min-width: 0;
    padding-inline: 3px;
  }

  .work-toggle-button span {
    font-size: 0.74rem;
  }

  .work-toggle-button small {
    font-size: 0.48rem;
  }

  .income-history-panel .ledger-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-day-view {
    grid-template-columns: minmax(128px, 1fr) minmax(86px, 0.7fr) auto;
  }

  .ledger-day-date small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.celebrity-products-empty,
.celebrity-products-editor-empty {
  display: grid;
  min-height: 54px;
  place-items: center;
  padding: 12px;
  border: 1px dashed rgba(91, 235, 173, 0.2);
  border-radius: 9px;
  color: rgba(220, 245, 231, 0.55);
  font-size: 0.62rem;
  text-align: center;
}

/* High-tier wealth ticker and milestone spectacle. */
.celebrity-ticker-character {
  display: inline-block;
  min-width: 0.58em;
  text-align: center;
  will-change: transform, filter;
}

.celebrity-ticker-character.is-separator {
  min-width: 0.3em;
}

.celebrity-ticker-character.is-changing {
  animation: celebrityDigitRush 220ms cubic-bezier(.12,.86,.25,1.3);
}

.celebrity-panel.is-running .celebrity-money strong {
  filter: drop-shadow(0 0 8px rgba(84, 255, 177, 0.38));
}

.celebrity-milestone-fx {
  position: absolute;
  z-index: 45;
  top: 50%;
  left: 50%;
  display: grid;
  min-width: min(320px, calc(100% - 30px));
  gap: 4px;
  padding: 21px 24px;
  border: 2px solid rgba(255, 226, 116, 0.8);
  border-radius: 16px;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 238, 150, 0.3), transparent 48%),
    linear-gradient(135deg, rgba(42, 22, 3, 0.98), rgba(5, 31, 22, 0.98));
  color: #fff4b2;
  text-align: center;
  transform: translate(-50%, -50%) scale(0.55) rotate(-4deg);
  box-shadow: 0 0 0 999px rgba(0, 7, 5, 0.58), 0 0 65px rgba(255, 205, 55, 0.48);
  pointer-events: none;
}

.celebrity-milestone-fx small {
  color: #6affb7;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.2em;
}

.celebrity-milestone-fx strong {
  font: 1000 clamp(2.1rem, 8vw, 4.2rem)/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-shadow: 0 0 22px rgba(255, 213, 68, 0.78);
}

.celebrity-milestone-fx span {
  color: rgba(241, 255, 246, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
}

.celebrity-milestone-fx.show {
  animation: celebrityMilestoneBlast 2.2s cubic-bezier(.13,.8,.22,1) both;
}

.celebrity-milestone-fx::before,
.celebrity-milestone-fx::after {
  position: absolute;
  inset: -13px;
  border: 1px solid rgba(255, 230, 125, 0.42);
  border-radius: 22px;
  content: "";
  opacity: 0;
  pointer-events: none;
}

.celebrity-milestone-fx::after {
  inset: -25px;
  border-style: dashed;
}

.celebrity-milestone-fx.show::before {
  animation: celebrityMilestoneRing 1.25s ease-out 120ms both;
}

.celebrity-milestone-fx.show::after {
  animation: celebrityMilestoneRing 1.55s ease-out 260ms both;
}

.celebrity-milestone-fx[data-tier="1"] {
  border-color: rgba(107, 255, 184, 0.82);
  background: linear-gradient(135deg, rgba(4, 45, 31, 0.98), rgba(3, 24, 26, 0.98));
  box-shadow: 0 0 0 999px rgba(0, 7, 5, 0.48), 0 0 52px rgba(67, 255, 168, 0.34);
}

.celebrity-milestone-fx[data-tier="2"] {
  border-color: rgba(109, 225, 255, 0.88);
  background: radial-gradient(circle at 50% 0%, rgba(91, 230, 255, 0.28), transparent 48%), linear-gradient(135deg, rgba(4, 32, 47, 0.98), rgba(3, 30, 24, 0.98));
  box-shadow: 0 0 0 999px rgba(0, 7, 9, 0.54), 0 0 65px rgba(71, 222, 255, 0.42);
}

.celebrity-milestone-fx[data-tier="3"] {
  border-color: rgba(255, 220, 92, 0.94);
  background: radial-gradient(circle at 50% 0%, rgba(255, 223, 94, 0.34), transparent 48%), linear-gradient(135deg, rgba(52, 20, 4, 0.99), rgba(20, 8, 49, 0.99) 56%, rgba(2, 34, 23, 0.99));
  box-shadow: 0 0 0 999px rgba(4, 2, 12, 0.65), 0 0 82px rgba(255, 201, 48, 0.56), 0 0 130px rgba(153, 92, 255, 0.22);
}

.celebrity-milestone-fx[data-tier="4"] {
  min-width: min(390px, calc(100% - 22px));
  padding-block: 27px;
  border-width: 3px;
  border-color: #fff0a2;
  background: radial-gradient(circle at 50% -8%, rgba(255, 248, 190, 0.58), transparent 46%), conic-gradient(from 210deg at 50% 45%, rgba(86, 255, 179, 0.26), rgba(255, 203, 49, 0.4), rgba(171, 106, 255, 0.35), rgba(86, 255, 179, 0.26)), rgba(28, 10, 2, 0.99);
  box-shadow: 0 0 0 999px rgba(0, 4, 4, 0.76), 0 0 95px rgba(255, 221, 81, 0.8), 0 0 180px rgba(83, 255, 177, 0.36);
}

.celebrity-milestone-fx[data-tier="4"] strong {
  font-size: clamp(2.75rem, 10vw, 5.4rem);
  color: #fffbd7;
  text-shadow: 0 0 12px #fff, 0 0 34px #ffd64d, 0 0 70px rgba(83, 255, 177, 0.72);
}

.celebrity-milestone-fx[data-tier="4"].show {
  animation: celebrityMilestoneMajorBlast 3s cubic-bezier(.12,.82,.18,1) both;
}

.celebrity-panel.is-milestone-hit {
  animation: celebrityPanelImpact 620ms ease-out;
}

.celebrity-panel.is-milestone-major {
  animation: celebrityPanelMajorImpact 1.15s cubic-bezier(.12,.84,.2,1) both;
}

@keyframes celebrityDigitRush {
  0% { opacity: 0.2; transform: translateY(-0.9em) scaleY(1.7); filter: blur(3px) brightness(1.8); }
  64% { opacity: 1; transform: translateY(0.08em) scaleY(0.9); filter: blur(0) brightness(1.5); }
  100% { transform: translateY(0) scaleY(1); filter: none; }
}

@keyframes celebrityMilestoneBlast {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.45) rotate(-6deg); filter: brightness(2.2); }
  13%, 64% { opacity: 1; }
  24% { transform: translate(-50%, -50%) scale(1.1) rotate(2deg); }
  35% { transform: translate(-50%, -50%) scale(0.98) rotate(0); }
  80% { opacity: 1; transform: translate(-50%, -58%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -82%) scale(0.92); }
}

@keyframes celebrityPanelImpact {
  20% { transform: translateX(-4px); filter: brightness(1.45); }
  45% { transform: translateX(4px); }
  70% { transform: translateX(-2px); }
}

@keyframes celebrityMilestoneRing {
  0% { opacity: 0.95; transform: scale(0.72) rotate(-3deg); }
  74% { opacity: 0.34; }
  100% { opacity: 0; transform: scale(1.24) rotate(4deg); }
}

@keyframes celebrityMilestoneMajorBlast {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.18) rotate(-10deg); filter: brightness(3) blur(8px); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.16) rotate(2deg); filter: brightness(2.1) blur(0); }
  24% { transform: translate(-50%, -50%) scale(0.96) rotate(-1deg); }
  36%, 72% { opacity: 1; transform: translate(-50%, -50%) scale(1.02) rotate(0); filter: brightness(1.12); }
  86% { opacity: 1; transform: translate(-50%, -58%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -88%) scale(0.88); filter: brightness(1.6); }
}

@keyframes celebrityPanelMajorImpact {
  0%, 100% { transform: none; filter: none; }
  16% { transform: scale(1.018) rotate(-0.35deg); filter: brightness(1.62) saturate(1.4); }
  34% { transform: scale(0.99) rotate(0.3deg); }
  55% { transform: translateX(-4px) scale(1.006); filter: brightness(1.25); }
  72% { transform: translateX(4px); }
}

/* New launch cards. */
.salary-machine-launch-card,
.worry-crusher-launch-card {
  position: relative;
  min-height: 292px !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 205, 66, 0.14), transparent 45%),
    linear-gradient(145deg, rgba(7, 31, 24, 0.98), rgba(2, 13, 11, 0.99)) !important;
}

.salary-machine-launch-card > p,
.worry-crusher-launch-card > p {
  margin: 8px 0 10px;
  color: rgba(224, 246, 233, 0.68);
  font-size: 0.66rem;
  line-height: 1.5;
}

.salary-machine-preview,
.worry-crusher-preview {
  position: relative;
  height: 150px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 85, 0.24);
  border-radius: 14px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 194, 42, 0.13), transparent 52%), #020e0b;
}

.salary-machine-preview > b,
.worry-crusher-preview > b {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  color: #ffe98f;
  font-size: 0.61rem;
  text-align: center;
}

.salary-preview-machine {
  position: absolute;
  top: 20px;
  left: 50%;
  display: grid;
  width: 94px;
  height: 80px;
  place-items: center;
  border: 2px solid #ffd956;
  border-radius: 16px;
  background: linear-gradient(145deg, #256e4b, #082a20);
  color: #ffe478;
  font-size: 2rem;
  font-weight: 1000;
  transform: translateX(-50%);
  box-shadow: 0 0 28px rgba(255, 206, 52, 0.26);
}

.salary-preview-machine b {
  position: absolute;
  right: 14px;
  bottom: -10px;
  left: 14px;
  height: 16px;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffe988, #e49b18);
  animation: salaryPreviewPrint 0.56s linear infinite;
}

.salary-preview-coins i {
  position: absolute;
  top: 14px;
  left: calc(50% + var(--preview-x, 0px));
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid #fff0a6;
  border-radius: 50%;
  background: #f0b62c;
  color: #5b3300;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 1000;
  animation: salaryPreviewCoin 1.15s ease-in infinite;
}

.salary-preview-coins i:nth-child(1) { --preview-x: -72px; animation-delay: -0.2s; }
.salary-preview-coins i:nth-child(2) { --preview-x: 47px; animation-delay: -0.65s; }
.salary-preview-coins i:nth-child(3) { --preview-x: 12px; animation-delay: -0.95s; }

.worry-preview-items i {
  position: absolute;
  top: 18px;
  left: 50%;
  padding: 9px 12px;
  border: 1px solid rgba(255, 111, 95, 0.7);
  border-radius: 10px;
  color: #ffd4cd;
  background: rgba(89, 19, 19, 0.72);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 950;
  animation: worryPreviewDrop 1.5s ease-in infinite;
}

.worry-preview-items i:nth-child(1) { margin-left: -90px; }
.worry-preview-items i:nth-child(2) { margin-left: -20px; animation-delay: -0.55s; }
.worry-preview-items i:nth-child(3) { margin-left: 45px; animation-delay: -1s; }

.worry-preview-crusher {
  position: absolute;
  bottom: 32px;
  left: 50%;
  display: grid;
  width: 112px;
  height: 42px;
  place-items: center;
  border: 2px solid #66ffb5;
  border-radius: 13px;
  color: #062118;
  background: linear-gradient(110deg, #55ecac, #ffe36f);
  font-size: 0.78rem;
  font-weight: 1000;
  transform: translateX(-50%);
  box-shadow: 0 0 24px rgba(81, 245, 170, 0.25);
}

@keyframes salaryPreviewPrint { 50% { transform: translateY(12px); filter: brightness(1.4); } }
@keyframes salaryPreviewCoin { from { transform: translate(-50%, -28px) rotate(0); opacity: 0; } 30% { opacity: 1; } to { transform: translate(-50%, 88px) rotate(180deg); opacity: 0; } }
@keyframes worryPreviewDrop { 0%, 100% { transform: translateY(-22px) scale(0.82); opacity: 0; } 35% { opacity: 1; } 72% { transform: translateY(58px) scale(1); opacity: 1; } 86% { transform: translateY(68px) scale(1.45); opacity: 0; } }

/* Salary machine and worry crusher immersive playfields. */
.salary-machine-overlay,
.worry-crusher-overlay {
  display: grid;
  grid-template-rows: 1fr;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 202, 53, 0.14), transparent 42%),
    linear-gradient(155deg, #061c15, #020b0a 60%, #07130f);
}

.salary-machine-overlay[hidden],
.worry-crusher-overlay[hidden] {
  display: none !important;
}

.salary-machine-shell,
.worry-crusher-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100dvh;
}

.salary-machine-stage,
.worry-crusher-stage {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  touch-action: none;
}

.salary-machine-copy {
  position: absolute;
  z-index: 10;
  top: 5%;
  display: grid;
  gap: 3px;
  color: #effff7;
  text-align: center;
}

.salary-machine-copy strong { font-size: clamp(1rem, 4vw, 1.45rem); }
.salary-machine-copy small { color: rgba(223, 247, 233, 0.62); font-size: 0.64rem; }

.salary-machine-device {
  position: absolute;
  top: 22%;
  left: 50%;
  display: grid;
  width: min(310px, 78vw);
  height: 180px;
  place-items: center;
  border: 2px solid rgba(255, 219, 92, 0.62);
  border-radius: 26px;
  background: linear-gradient(145deg, #174d38, #061b15 65%);
  transform: translateX(-50%);
  box-shadow: inset 0 0 32px rgba(64, 255, 169, 0.08), 0 22px 60px rgba(0, 0, 0, 0.38);
}

.salary-machine-device span { position: absolute; top: 16px; color: #64ffb1; font-size: 0.62rem; font-weight: 950; letter-spacing: 0.24em; }
.salary-machine-device b { color: #ffe477; font: 1000 clamp(1.8rem, 8vw, 3.6rem)/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-shadow: 0 0 22px rgba(255, 211, 57, 0.52); }
.salary-machine-device i { position: absolute; right: 48px; bottom: -12px; left: 48px; height: 22px; border: 2px solid #ffe792; border-radius: 4px; background: linear-gradient(#ffd85b, #da8e0c); }

.salary-machine-press {
  position: absolute;
  z-index: 20;
  bottom: 14%;
  left: 50%;
  display: grid;
  width: min(230px, 62vw);
  min-height: 92px;
  place-items: center;
  gap: 1px;
  border: 3px solid #ffe899;
  border-radius: 999px;
  color: #182006;
  background: radial-gradient(circle at 45% 25%, #fff3a6, #ffd54b 48%, #f48d25);
  transform: translateX(-50%);
  box-shadow: 0 10px 0 #8a4a0b, 0 18px 45px rgba(255, 187, 38, 0.28);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.salary-machine-press span { font-size: 1.2rem; font-weight: 1000; }
.salary-machine-press small { font-size: 0.5rem; font-weight: 950; letter-spacing: 0.16em; }
.salary-machine-press.is-pressing { transform: translate(-50%, 8px) scale(0.96); box-shadow: 0 2px 0 #8a4a0b, 0 0 48px rgba(255, 215, 73, 0.48); filter: brightness(1.12); }

.salary-machine-fever {
  position: absolute;
  right: 10%;
  bottom: 5%;
  left: 10%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 9px;
}
.salary-machine-fever > span { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,0.08); }
.salary-machine-fever i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #45f2a3, #ffe45c, #ff6e57); transition: width 100ms linear; }
.salary-machine-fever b { color: #ffe988; font-size: 0.62rem; }

.salary-machine-coins { position: absolute; z-index: 15; inset: 0; overflow: hidden; pointer-events: none; }
.salary-machine-coins i {
  position: absolute;
  bottom: 22%;
  left: 50%;
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  padding-inline: 5px;
  border: 2px solid #fff0a4;
  border-radius: 999px;
  color: #573000;
  background: #f4b72d;
  font: normal 1000 0.66rem ui-monospace, monospace;
  animation: salaryCoinBurst 0.72s ease-out both;
}

.salary-machine-feedback {
  position: absolute;
  top: 55%;
  left: 50%;
  z-index: 18;
  padding: 7px 13px;
  border-radius: 999px;
  color: #fff0a0;
  background: rgba(5, 24, 18, 0.78);
  font-size: 0.68rem;
  font-weight: 950;
  transform: translateX(-50%);
  pointer-events: none;
}
.salary-machine-feedback.pop { animation: salaryFeedbackPop 360ms ease-out; }
.salary-machine-stage.is-printing .salary-machine-device { animation: salaryMachineShake 120ms steps(2, end) infinite; }
.salary-machine-stage.is-jackpot::after,
.worry-crusher-stage.is-clear::after { content: ""; position: absolute; z-index: 40; inset: 0; background: radial-gradient(circle, rgba(255,239,156,0.62), rgba(77,255,173,0.2) 30%, transparent 62%); animation: salaryJackpotFlash 600ms ease-out both; pointer-events: none; }
.salary-machine-overlay.is-fever .salary-machine-device { border-color: #ff6f5c; box-shadow: 0 0 65px rgba(255, 184, 40, 0.36); }

.worry-crusher-guide {
  position: absolute;
  z-index: 20;
  top: 44%;
  left: 50%;
  display: grid;
  gap: 3px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 223, 104, 0.32);
  border-radius: 13px;
  color: #ffec91;
  background: rgba(3, 24, 17, 0.88);
  text-align: center;
  transform: translate(-50%, -50%);
  transition: 180ms ease;
  pointer-events: none;
}
.worry-crusher-guide small { color: rgba(228,248,237,0.6); font-size: 0.58rem; }
.worry-crusher-guide.is-hidden { opacity: 0; transform: translate(-50%, -42%) scale(0.92); }

.worry-crusher-arena { position: absolute; inset: 0 0 62px; overflow: hidden; touch-action: none; }
.worry-target {
  position: absolute;
  z-index: 10;
  display: grid;
  min-width: 82px;
  min-height: 58px;
  place-items: center;
  padding: 8px 11px;
  border: 2px solid rgba(255, 118, 102, 0.7);
  border-radius: 16px;
  color: #ffe2dc;
  background: linear-gradient(145deg, rgba(119, 29, 31, 0.96), rgba(49, 9, 15, 0.96));
  transform: rotate(var(--worry-tilt));
  box-shadow: 0 8px 22px rgba(0,0,0,0.3), inset 0 1px rgba(255,255,255,0.14);
  animation: worryTargetArrive 260ms cubic-bezier(.17,.9,.25,1.25), worryTargetPulse 820ms ease-in-out 260ms infinite alternate;
  touch-action: manipulation;
}
.worry-target span { font-size: 0.82rem; font-weight: 1000; }
.worry-target small { color: rgba(255,218,207,0.65); font-size: 0.46rem; font-weight: 900; }
.worry-target.is-reward { border-color: #ffe574; color: #163120; background: linear-gradient(145deg, #6cffb8, #ffe16a); box-shadow: 0 0 28px rgba(255, 220, 72, 0.34); }
.worry-target.is-crushed { pointer-events: none; animation: worryTargetCrush 300ms ease-out both; }
.worry-target > b { position: absolute; color: #fff3a6; font: 1000 0.75rem ui-monospace, monospace; text-shadow: 0 0 12px #ffbd30; }

.worry-crusher-machine {
  position: absolute;
  z-index: 18;
  right: 6%;
  bottom: 16px;
  left: 6%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(80, 255, 172, 0.32);
  border-radius: 13px;
  background: rgba(3, 25, 18, 0.94);
}
.worry-crusher-machine span { color: #dff9eb; font-size: 0.58rem; font-weight: 900; }
.worry-crusher-machine > i { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,0.08); }
.worry-crusher-machine b { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #52f5aa, #ffe267, #ff735e); transition: width 110ms linear; }

.worry-crusher-burst {
  position: fixed;
  z-index: 70;
  top: 50%;
  left: 50%;
  color: #ffe98e;
  font-size: clamp(1.4rem, 7vw, 3.2rem);
  font-weight: 1000;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  text-shadow: 0 0 22px rgba(255,200,48,0.8), 0 4px #341400;
  pointer-events: none;
}
.worry-crusher-burst[data-tone="reward"] { color: #75ffc0; text-shadow: 0 0 22px #27eb90; }
.worry-crusher-burst[data-tone="fever"] { color: #fff3a5; font-size: clamp(1.8rem, 9vw, 4rem); }
.worry-crusher-burst.show { animation: worryBurstShow 720ms cubic-bezier(.15,.86,.22,1.16); }

@keyframes salaryCoinBurst { from { opacity: 1; transform: translate(-50%, 0) rotate(0); } to { opacity: 0; transform: translate(calc(-50% + var(--coin-x)), -220px) rotate(var(--coin-r)); } }
@keyframes salaryFeedbackPop { 50% { transform: translateX(-50%) scale(1.22); filter: brightness(1.6); } }
@keyframes salaryMachineShake { 50% { transform: translateX(calc(-50% + 2px)) rotate(0.5deg); } }
@keyframes salaryJackpotFlash { from { opacity: 0; transform: scale(0.35); } 35% { opacity: 1; } to { opacity: 0; transform: scale(1.25); } }
@keyframes worryTargetArrive { from { opacity: 0; transform: rotate(var(--worry-tilt)) scale(0.3); } }
@keyframes worryTargetPulse { to { filter: brightness(1.22); transform: rotate(var(--worry-tilt)) scale(1.06); } }
@keyframes worryTargetCrush { 45% { opacity: 1; transform: rotate(var(--worry-tilt)) scale(1.48); filter: brightness(2); } to { opacity: 0; transform: rotate(calc(var(--worry-tilt) + 20deg)) scale(0.25); } }
@keyframes worryBurstShow { 18%, 64% { opacity: 1; } 26% { transform: translate(-50%, -50%) scale(1.18); } to { opacity: 0; transform: translate(-50%, -90%) scale(0.88); } }

body.immersive-game-open { overflow: hidden; }

@media (max-width: 640px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel,
  .hero-panel > * {
    min-width: 0;
  }

  .salary-machine-hud,
  .worry-crusher-hud { grid-template-columns: 1fr 40px; }
  .salary-machine-scoreboard,
  .worry-crusher-scoreboard { grid-column: 1 / -1; grid-row: 2; }
  .salary-machine-device { top: 19%; height: 160px; }
  .salary-machine-press { bottom: 15%; min-height: 82px; }
  .salary-machine-feedback { top: 52%; }
  .worry-target { min-width: 72px; min-height: 52px; padding: 7px 9px; }
  .worry-target span { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  .celebrity-milestone-fx.show,
  .celebrity-milestone-fx.show::before,
  .celebrity-milestone-fx.show::after,
  .celebrity-panel.is-milestone-hit,
  .celebrity-panel.is-milestone-major,
  .celebrity-ticker-character.is-changing,
  .salary-machine-stage.is-printing .salary-machine-device,
  .worry-target { animation-duration: 500ms !important; animation-iteration-count: 1 !important; }
}

/* Calm breathing replaces the former salary machine. */
.breathing-launch-card {
  position: relative;
  min-height: 292px !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(73, 228, 191, 0.14), transparent 44%),
    linear-gradient(145deg, rgba(7, 31, 28, 0.98), rgba(2, 13, 13, 0.99)) !important;
}

.breathing-launch-card > p {
  margin: 8px 0 10px;
  color: rgba(224, 246, 238, 0.68);
  font-size: 0.66rem;
  line-height: 1.5;
}

.breathing-preview {
  position: relative;
  display: grid;
  height: 150px;
  margin-top: 8px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(95, 238, 202, 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 46%, rgba(84, 242, 199, 0.13), transparent 48%),
    linear-gradient(180deg, rgba(4, 25, 22, 0.78), rgba(2, 12, 12, 0.96));
}

.breathing-preview-orbit {
  position: absolute;
  top: 18px;
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 1px solid rgba(112, 255, 217, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(84, 235, 196, 0.24), rgba(21, 94, 78, 0.12) 54%, transparent 56%);
  box-shadow: 0 0 30px rgba(77, 229, 189, 0.16);
  animation: breathingPreview 8s ease-in-out infinite;
}

.breathing-preview-orbit::before,
.breathing-preview-orbit::after,
.breathing-preview-orbit i {
  position: absolute;
  border: 1px solid rgba(110, 255, 216, 0.2);
  border-radius: 50%;
  content: "";
}

.breathing-preview-orbit::before { inset: -9px; }
.breathing-preview-orbit::after { inset: -18px; opacity: 0.55; }
.breathing-preview-orbit i { inset: 12px; background: rgba(85, 235, 194, 0.08); }
.breathing-preview-orbit b { position: relative; z-index: 2; color: #dffff4; font-size: 0.72rem; letter-spacing: 0.12em; }

.breathing-preview-copy {
  position: absolute;
  right: 16px;
  bottom: 10px;
  left: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  color: rgba(220, 249, 239, 0.68);
  font-size: 0.55rem;
}

.breathing-preview-copy i { height: 1px; background: linear-gradient(90deg, rgba(85, 239, 198, 0.12), rgba(85, 239, 198, 0.65), rgba(85, 239, 198, 0.12)); }

@keyframes breathingPreview {
  0%, 100% { transform: scale(0.72); opacity: 0.72; filter: brightness(0.88); }
  48%, 62% { transform: scale(1.08); opacity: 1; filter: brightness(1.18); }
}

.breathing-overlay {
  display: grid;
  grid-template-rows: 1fr;
  background:
    radial-gradient(circle at 50% 48%, rgba(65, 224, 187, 0.16), transparent 43%),
    linear-gradient(155deg, #061c19, #020c0c 60%, #071612) !important;
}

.breathing-overlay[hidden] { display: none !important; }
.breathing-shell { display: grid; grid-template-rows: auto 1fr; min-height: 100dvh; }
.breathing-scoreboard { grid-template-columns: repeat(3, minmax(72px, 1fr)); }

.breathing-stage {
  --breath-scale: 0.72;
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(85, 242, 202, 0.1), transparent 28%),
    repeating-radial-gradient(circle at 50% 48%, transparent 0 54px, rgba(89, 245, 204, 0.035) 55px 56px);
}

.breathing-copy {
  position: absolute;
  z-index: 8;
  top: 7%;
  display: grid;
  gap: 5px;
  color: #eefff9;
  text-align: center;
}

.breathing-copy small { color: rgba(215, 246, 236, 0.58); font-size: 0.62rem; letter-spacing: 0.14em; }
.breathing-copy strong { font-size: clamp(1.08rem, 4vw, 1.55rem); letter-spacing: 0.08em; }

.breathing-control {
  position: relative;
  display: grid;
  width: min(260px, 66vw);
  height: min(260px, 66vw);
  min-width: 210px;
  min-height: 210px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #effff9;
  transform: scale(0.72);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.breathing-ring {
  position: absolute;
  border: 1px solid rgba(103, 255, 214, 0.3);
  border-radius: 50%;
  box-shadow: 0 0 36px rgba(72, 233, 190, 0.14), inset 0 0 28px rgba(72, 233, 190, 0.08);
}

.breathing-ring-one { inset: 0; }
.breathing-ring-two { inset: 13%; border-style: dashed; opacity: 0.68; }
.breathing-core {
  position: relative;
  z-index: 3;
  display: grid;
  width: 58%;
  height: 58%;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(178, 255, 235, 0.55);
  border-radius: 50%;
  background: radial-gradient(circle at 42% 35%, rgba(149, 255, 229, 0.42), rgba(35, 147, 122, 0.42) 45%, rgba(8, 57, 49, 0.88));
  box-shadow: 0 0 46px rgba(70, 236, 194, 0.24), inset 0 0 26px rgba(213, 255, 243, 0.13);
}
.breathing-core b { font-size: 1.12rem; letter-spacing: 0.14em; }
.breathing-core small { color: rgba(224, 251, 243, 0.58); font-size: 0.5rem; }
.breathing-stage.phase-inhale .breathing-control { animation: breathingIn 4s ease-in-out forwards; }
.breathing-stage.phase-hold .breathing-control { animation: breathingHold 2s ease-in-out forwards; }
.breathing-stage.phase-exhale .breathing-control { animation: breathingOut 6s ease-in-out forwards; }
.breathing-stage.phase-inhale .breathing-ring-two { animation: breathingOrbit 9s linear infinite; }
.breathing-stage.phase-exhale .breathing-ring-two { animation: breathingOrbit 12s linear reverse infinite; }
.breathing-overlay.is-paused .breathing-control,
.breathing-overlay.is-paused .breathing-ring-two { animation-play-state: paused !important; }
.breathing-overlay.is-paused .breathing-control { filter: saturate(0.65); }

.breathing-progress {
  position: absolute;
  right: 10%;
  bottom: 10%;
  left: 10%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(225, 255, 246, 0.08);
}
.breathing-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #43e9b5, #a6f7df, #ffe68a); box-shadow: 0 0 14px rgba(104, 244, 204, 0.38); }
.breathing-stage > p { position: absolute; bottom: 5%; margin: 0; color: rgba(219, 247, 238, 0.58); font-size: 0.62rem; }
.breathing-result strong { color: #9effd9; }

@keyframes breathingIn { from { transform: scale(0.72); filter: brightness(0.86); } to { transform: scale(1.08); filter: brightness(1.16); } }
@keyframes breathingHold { from, to { transform: scale(1.08); filter: brightness(1.16); } 50% { transform: scale(1.1); filter: brightness(1.22); } }
@keyframes breathingOut { from { transform: scale(1.08); filter: brightness(1.16); } to { transform: scale(0.72); filter: brightness(0.86); } }
@keyframes breathingOrbit { to { transform: rotate(360deg); } }

/* Worry crusher preview now demonstrates direct critical hits. */
.worry-crusher-preview {
  cursor: crosshair;
  background:
    radial-gradient(circle at 50% 58%, rgba(255, 206, 61, 0.12), transparent 40%),
    linear-gradient(180deg, rgba(5, 24, 20, 0.8), rgba(2, 12, 11, 0.97));
}

.worry-preview-items i {
  top: 10px;
  display: grid;
  min-width: 60px;
  place-items: center;
  padding: 9px 11px;
  animation: worryPreviewCritical 2.4s cubic-bezier(.2,.8,.24,1) infinite;
}
.worry-preview-items i b { font-size: 0.68rem; }
.worry-preview-items i em {
  position: absolute;
  color: #fff2a2;
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 1000;
  opacity: 0;
  text-shadow: 0 0 10px #ffb82c;
}
.worry-preview-items i:nth-child(1) { margin-left: -96px; animation-delay: 0s; }
.worry-preview-items i:nth-child(2) { margin-left: -30px; animation-delay: -1.6s; }
.worry-preview-items i:nth-child(3) { margin-left: 38px; animation-delay: -0.8s; }

.worry-preview-pointer {
  position: absolute;
  z-index: 8;
  top: 72px;
  left: 50%;
  width: 22px;
  height: 22px;
  border: 2px solid #fff0a0;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(255, 214, 77, 0.7);
  animation: worryPreviewPointer 2.4s ease-in-out infinite;
}
.worry-preview-pointer::before,
.worry-preview-pointer::after { position: absolute; top: 50%; left: 50%; background: #fff4ba; content: ""; transform: translate(-50%, -50%); }
.worry-preview-pointer::before { width: 30px; height: 1px; }
.worry-preview-pointer::after { width: 1px; height: 30px; }
.worry-preview-pointer i { position: absolute; inset: -8px; border: 1px solid rgba(255, 227, 114, 0.45); border-radius: 50%; animation: worryPreviewPointerRing 0.8s ease-out infinite; }

.worry-preview-impact {
  position: absolute;
  z-index: 7;
  top: 78px;
  left: 50%;
  width: 6px;
  height: 6px;
  animation: worryPreviewImpactMove 2.4s ease-in-out infinite;
}
.worry-preview-impact i { position: absolute; width: 3px; height: 28px; border-radius: 999px; background: linear-gradient(#fff5b6, #ffb82c, transparent); transform-origin: 50% 0; animation: worryPreviewSpark 0.8s ease-out infinite; }
.worry-preview-impact i:nth-child(2) { transform: rotate(60deg); }
.worry-preview-impact i:nth-child(3) { transform: rotate(120deg); }
.worry-preview-impact i:nth-child(4) { transform: rotate(180deg); }
.worry-preview-impact i:nth-child(5) { transform: rotate(240deg); }
.worry-preview-impact i:nth-child(6) { transform: rotate(300deg); }

@keyframes worryPreviewCritical {
  0% { opacity: 0; transform: translateY(-28px) scale(0.72); }
  18% { opacity: 1; }
  62% { opacity: 1; transform: translateY(58px) scale(1); filter: brightness(1); }
  70% { opacity: 1; transform: translateY(58px) scale(1.55) rotate(6deg); filter: brightness(2.2); }
  78%, 100% { opacity: 0; transform: translateY(68px) scale(0.25) rotate(20deg); }
}
@keyframes worryPreviewPointer {
  0%, 100% { transform: translate(-82px, 20px) scale(0.72); opacity: 0.2; }
  23% { transform: translate(-82px, 0) scale(1); opacity: 1; }
  34% { transform: translate(-15px, 18px) scale(0.72); }
  56% { transform: translate(-15px, 0) scale(1); }
  67% { transform: translate(54px, 18px) scale(0.72); }
  88% { transform: translate(54px, 0) scale(1); opacity: 1; }
}
@keyframes worryPreviewPointerRing { from { opacity: 0.85; transform: scale(0.35); } to { opacity: 0; transform: scale(1.5); } }
@keyframes worryPreviewImpactMove { 0%, 33%, 100% { transform: translateX(-82px); } 34%, 66% { transform: translateX(-15px); } 67%, 99% { transform: translateX(54px); } }
@keyframes worryPreviewSpark { from { opacity: 1; scale: 0.3; } to { opacity: 0; scale: 1.2; } }

/* Idle motion guard: these areas animate only while the user is interacting. */
.luck-start-button:not(:disabled)::after {
  opacity: 0 !important;
  animation: none !important;
}
.luck-start-button:disabled::after {
  opacity: 1;
  animation: wealth-button-shine 880ms linear infinite;
}
.break-game-luck .lottery-machine:not(.is-rolling):not(.is-settled),
.break-game-luck .lottery-machine:not(.is-rolling):not(.is-settled) *,
.break-game-luck .lottery-machine:not(.is-rolling):not(.is-settled)::before,
.break-game-luck .lottery-machine:not(.is-rolling):not(.is-settled)::after {
  animation: none !important;
}
.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-choosing):not(.is-revealed):not(.is-interpreting):not(.is-reading) .fortune-energy-core,
.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-choosing):not(.is-revealed):not(.is-interpreting):not(.is-reading) .fortune-core-orbit,
.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-choosing):not(.is-revealed):not(.is-interpreting):not(.is-reading) .fortune-core-halo,
.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-choosing):not(.is-revealed):not(.is-interpreting):not(.is-reading) .fortune-energy-core > img,
.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-choosing):not(.is-revealed):not(.is-interpreting):not(.is-reading) .fortune-outcome {
  animation: none !important;
}

@media (max-width: 640px) {
  .breathing-hud { grid-template-columns: 1fr 40px; }
  .breathing-scoreboard { grid-column: 1 / -1; grid-row: 2; }
  .breathing-control { width: min(230px, 68vw); height: min(230px, 68vw); min-width: 190px; min-height: 190px; }
  .breathing-copy { top: 5%; }
  .breathing-preview { height: 145px; }
}

@media (prefers-reduced-motion: reduce) {
  .breathing-preview-orbit { animation-duration: 12s !important; }
  .worry-preview-items i,
  .worry-preview-pointer,
  .worry-preview-impact,
  .worry-preview-impact i { animation-duration: 4s !important; }
}

/* Final requested alignment: keep the goal card untouched and center only its stamp. */
.income-goal-stamp {
  position: absolute;
  z-index: 4;
  top: 9px;
  left: 50%;
  transform: translateX(-50%) rotate(-6deg) scale(1.6);
}

.daily-goal-panel.is-complete .income-goal-stamp {
  transform: translateX(-50%) rotate(-7deg) scale(1);
}

@keyframes income-goal-stamp-in {
  0%, 42% { opacity: 0; transform: translateX(-50%) rotate(-20deg) scale(2.4); filter: blur(2px); }
  58% { opacity: 1; transform: translateX(-50%) rotate(-7deg) scale(0.82); filter: blur(0); }
  72% { transform: translateX(-50%) rotate(-7deg) scale(1.12); }
  100% { opacity: 0.9; transform: translateX(-50%) rotate(-7deg) scale(1); }
}

@media (max-width: 640px) {
  .income-goal-stamp {
    top: 9px;
    transform: translateX(-50%) rotate(-6deg) scale(1.5);
  }

  .daily-goal-panel.is-complete .income-goal-stamp {
    transform: translateX(-50%) rotate(-7deg) scale(1);
  }
}

/* Countdown name and value remain adjacent on one compact line. */
.workday-countdown-card {
  justify-content: flex-start;
}

.workday-countdown-card > span {
  flex: 0 1 auto;
  width: auto;
  max-width: calc(100% - 86px);
}

.workday-countdown-card > span b {
  max-width: 7em;
}

.workday-countdown-card > strong,
.workday-countdown-card[data-phase="arrived"] > strong {
  flex: 0 0 auto;
  margin-left: 2px;
}

@media (max-width: 640px) {
  .workday-countdown-card {
    gap: 4px;
  }

  .workday-countdown-card > span {
    max-width: calc(100% - 76px);
  }

  .workday-countdown-card > span b {
    max-width: 5.4em;
  }
}

/* One-second fortune interpretation veil before the text is revealed. */
.fortune-interpret-transition {
  position: absolute !important;
  z-index: 70 !important;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--fortune-tone) 24%, transparent), transparent 34%),
    linear-gradient(145deg, rgba(3, 18, 14, 0.97), rgba(2, 10, 9, 0.98));
  color: #fff0a0;
  visibility: hidden;
  pointer-events: none;
}

.fortune-interpret-transition.show {
  visibility: visible;
  animation: fortuneInterpretVeil 1s cubic-bezier(.16,.82,.24,1) both;
}

.fortune-interpret-transition b {
  font-size: 1rem;
  font-weight: 1000;
  letter-spacing: 0.2em;
  text-shadow: 0 0 18px color-mix(in srgb, var(--fortune-tone) 72%, transparent);
}

.fortune-interpret-transition small {
  color: rgba(229, 249, 237, 0.66);
  font-size: 0.56rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.fortune-interpret-orbit {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  margin-bottom: 3px;
  border: 1px solid color-mix(in srgb, var(--fortune-tone) 48%, transparent);
  border-radius: 50%;
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--fortune-tone) 10%, transparent), 0 0 28px color-mix(in srgb, var(--fortune-tone) 18%, transparent);
}

.fortune-interpret-orbit::after {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--fortune-tone) 72%, white 8%);
  border-radius: 10px;
  color: var(--fortune-tone);
  background: rgba(5, 24, 18, 0.86);
  content: "解";
  font-size: 1.08rem;
  font-weight: 1000;
  transform: rotate(45deg);
}

.fortune-interpret-orbit i {
  position: absolute;
  inset: var(--orbit-inset, 0);
  border: 1px dashed color-mix(in srgb, var(--fortune-tone) 34%, transparent);
  border-radius: 50%;
  animation: fortuneInterpretOrbit 1.05s linear infinite;
}

.fortune-interpret-orbit i:nth-child(1) { --orbit-inset: 0; }
.fortune-interpret-orbit i:nth-child(2) { --orbit-inset: -7px; animation-direction: reverse; animation-duration: 0.8s; }
.fortune-interpret-orbit i:nth-child(3) { --orbit-inset: -14px; animation-duration: 1.35s; }

.fortune-unified.is-interpreting .fortune-result.is-unsealing::after {
  display: none;
}

@keyframes fortuneInterpretVeil {
  0% { opacity: 0; transform: scale(0.96); filter: brightness(0.7); }
  16%, 78% { opacity: 1; }
  38% { transform: scale(1); filter: brightness(1.25); }
  100% { opacity: 0; transform: scale(1.025); filter: brightness(1.65); }
}

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

/* High-player mode: one centered, emotionally amplified income core. */
.celebrity-panel {
  background:
    radial-gradient(circle at 50% 46%, rgba(57, 248, 143, 0.13), transparent 35%),
    linear-gradient(135deg, rgba(84, 184, 255, 0.1), transparent 46%),
    rgba(3, 9, 16, 0.97);
}

.celebrity-terminal {
  position: relative;
  display: grid;
  min-height: 228px;
  align-content: space-between;
  margin-top: 10px;
  padding: 12px 10px 11px;
  overflow: hidden;
  border: 1px solid rgba(84, 184, 255, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(rgba(84, 184, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 184, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(57, 248, 143, 0.09), transparent 48%),
    rgba(1, 10, 12, 0.76);
  background-size: 24px 24px, 24px 24px, auto, auto;
}

.celebrity-terminal::after {
  position: absolute;
  z-index: 0;
  top: -45%;
  bottom: -45%;
  left: -30%;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(190, 255, 222, 0.22), transparent);
  content: "";
  opacity: 0;
  transform: skewX(-19deg);
  pointer-events: none;
}

.celebrity-panel.is-running .celebrity-terminal::after {
  animation: celebrityIncomeSweep 2.2s ease-in-out infinite;
}

.celebrity-terminal-head,
.celebrity-income-core,
.celebrity-session {
  position: relative;
  z-index: 3;
}

.celebrity-terminal-head {
  padding-inline: 2px;
}

.celebrity-income-core {
  position: relative;
  display: grid;
  min-height: 126px;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 17px 3px 13px;
  text-align: center;
}

.celebrity-income-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #bfffe0;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.celebrity-income-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 13px var(--green);
}

.celebrity-income-core > small {
  color: rgba(203, 239, 221, 0.42);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.celebrity-terminal .celebrity-income-core .celebrity-money {
  display: flex;
  max-width: 100%;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin: 3px 0;
  padding: 0;
  border: 0;
  background: transparent;
  animation: none;
}

.celebrity-terminal .celebrity-income-core .celebrity-money > span {
  color: #ffe36f;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  text-shadow: 0 0 18px rgba(255, 215, 72, 0.52);
}

.celebrity-terminal .celebrity-income-core .celebrity-money > strong {
  overflow: hidden;
  max-width: 100%;
  color: #f5fff8;
  font-size: clamp(2.15rem, 6.4vw, 3.6rem);
  line-height: 0.95;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow:
    0 0 10px rgba(107, 255, 182, 0.72),
    0 0 34px rgba(57, 248, 143, 0.28);
}

.celebrity-panel.is-running .celebrity-income-core .celebrity-money {
  animation: celebrityIncomeCoreBeat 0.86s ease-in-out infinite alternate;
}

.celebrity-income-rings {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 150px;
  height: 90px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.celebrity-income-rings i {
  position: absolute;
  inset: var(--ring-inset, 0);
  border: 1px solid rgba(76, 255, 170, 0.13);
  border-radius: 50%;
  opacity: 0.35;
}

.celebrity-income-rings i:nth-child(1) { --ring-inset: 0; }
.celebrity-income-rings i:nth-child(2) { --ring-inset: -13px; }
.celebrity-income-rings i:nth-child(3) { --ring-inset: -26px; }

.celebrity-panel.is-running .celebrity-income-rings i {
  animation: celebrityIncomeRing 1.7s ease-out infinite;
}
.celebrity-panel.is-running .celebrity-income-rings i:nth-child(2) { animation-delay: 0.34s; }
.celebrity-panel.is-running .celebrity-income-rings i:nth-child(3) { animation-delay: 0.68s; }

.celebrity-session {
  margin-top: 3px;
  padding-top: 9px;
  border-top: 1px solid rgba(84, 184, 255, 0.11);
}

.celebrity-product-settings {
  margin-top: 8px;
}

.celebrity-ticker-character.is-changing {
  animation: celebrityDigitRush 180ms cubic-bezier(.1,.88,.2,1.35);
}

@keyframes celebrityIncomeSweep {
  0%, 12% { left: -30%; opacity: 0; }
  24% { opacity: 1; }
  62% { opacity: 0.7; }
  82%, 100% { left: 112%; opacity: 0; }
}

@keyframes celebrityIncomeCoreBeat {
  from { transform: scale(0.99); filter: brightness(1); }
  to { transform: scale(1.014); filter: brightness(1.16); }
}

@keyframes celebrityIncomeRing {
  0% { opacity: 0.52; transform: scale(0.72); }
  72% { opacity: 0.08; }
  100% { opacity: 0; transform: scale(1.22); }
}

/* Worry crusher: tactile impact rings, shards, screen punch and stronger rewards. */
.worry-crusher-stage {
  background:
    radial-gradient(circle at 50% 42%, rgba(60, 255, 163, 0.09), transparent 42%),
    linear-gradient(rgba(69, 255, 169, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 255, 169, 0.035) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
}

.worry-crusher-impact-layer {
  position: absolute;
  z-index: 42;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.worry-impact {
  position: absolute;
  width: 1px;
  height: 1px;
  color: #ff9a82;
  pointer-events: none;
}

.worry-impact em {
  position: absolute;
  inset: -37px;
  border: 4px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  animation: worryImpactRing 520ms ease-out both;
  box-shadow: 0 0 20px currentColor;
}

.worry-impact b {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  color: #fff4c7;
  font-size: 1.4rem;
  font-weight: 1000;
  transform: translate(-50%, -50%);
  text-shadow: 0 0 14px currentColor, 0 3px 0 rgba(52, 12, 5, 0.62);
  animation: worryImpactGlyph 600ms cubic-bezier(.1,.86,.2,1.25) both;
}

.worry-impact > i {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
  transform: rotate(var(--impact-angle));
  animation: worryImpactShard 620ms ease-out both;
}

.worry-impact > small {
  position: absolute;
  top: 20px;
  left: 0;
  min-width: max-content;
  color: #fff0a1;
  font: 1000 0.8rem ui-monospace, SFMono-Regular, Consolas, monospace;
  transform: translateX(-50%);
  text-shadow: 0 0 12px #ffb72f;
  animation: worryImpactScore 680ms ease-out both;
}

.worry-impact.is-reward,
.worry-impact.is-combo {
  color: #63ffb3;
}

.worry-impact.is-combo em {
  border-width: 6px;
  animation-duration: 680ms;
}

.worry-target {
  transition: filter 100ms ease, box-shadow 100ms ease;
}

.worry-target::before,
.worry-target::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 70%;
  background: rgba(255, 228, 204, 0.24);
  content: "";
  transform: translate(-50%, -50%) rotate(34deg);
  pointer-events: none;
}

.worry-target::after {
  height: 52%;
  transform: translate(-50%, -50%) rotate(-48deg);
}

.worry-target:active {
  filter: brightness(1.6) saturate(1.35);
  transform: rotate(var(--worry-tilt)) scale(0.9);
  box-shadow: 0 0 36px currentColor;
}

.worry-target.is-reward {
  animation: worryTargetArrive 260ms cubic-bezier(.17,.9,.25,1.25), worryRewardPulse 520ms ease-in-out 260ms infinite alternate;
}

.worry-crusher-stage.is-impact {
  animation: worryStagePunch 180ms ease-out;
}

.worry-crusher-machine {
  box-shadow: 0 0 24px rgba(53, 244, 156, 0.1), inset 0 0 16px rgba(57, 248, 143, 0.035);
}

.worry-crusher-machine b {
  box-shadow: 0 0 18px rgba(255, 215, 71, 0.55);
}

.worry-crusher-burst {
  -webkit-text-stroke: 1px rgba(255, 246, 195, 0.34);
}

.worry-crusher-burst.show {
  animation: worryBurstShow 820ms cubic-bezier(.12,.88,.2,1.2);
}

@keyframes worryImpactRing {
  0% { opacity: 0.95; transform: scale(0.22); }
  78% { opacity: 0.42; }
  100% { opacity: 0; transform: scale(1.85); }
}

@keyframes worryImpactGlyph {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-18deg); }
  28% { opacity: 1; transform: translate(-50%, -50%) scale(1.5) rotate(6deg); }
  62% { opacity: 1; transform: translate(-50%, -62%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -130%) scale(0.72); }
}

@keyframes worryImpactShard {
  0% { opacity: 1; transform: rotate(var(--impact-angle)) translateX(8px) scale(1.2); }
  100% { opacity: 0; transform: rotate(var(--impact-angle)) translateX(var(--impact-distance)) scale(0.3); }
}

@keyframes worryImpactScore {
  0% { opacity: 0; transform: translate(-50%, 5px) scale(0.5); }
  24%, 64% { opacity: 1; transform: translate(-50%, -4px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -40px) scale(0.86); }
}

@keyframes worryStagePunch {
  32% { transform: scale(1.012); filter: brightness(1.24) saturate(1.16); }
  70% { transform: scale(0.997); }
}

@keyframes worryRewardPulse {
  to { filter: brightness(1.3) saturate(1.25); transform: rotate(var(--worry-tilt)) scale(1.1); box-shadow: 0 0 36px rgba(255, 225, 89, 0.55); }
}

@media (max-width: 640px) {
  .celebrity-terminal {
    min-height: 216px;
    padding-inline: 8px;
  }

  .celebrity-terminal .celebrity-income-core .celebrity-money > strong {
    font-size: clamp(1.85rem, 9.2vw, 2.65rem);
  }

  .fortune-interpret-orbit {
    width: 68px;
    height: 68px;
  }

  .worry-target {
    min-width: 78px;
    min-height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fortune-interpret-transition.show,
  .celebrity-panel.is-running .celebrity-income-core .celebrity-money,
  .celebrity-panel.is-running .celebrity-income-rings i,
  .worry-crusher-stage.is-impact,
  .worry-impact * {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Final motion authority for the 99-sign, breathing and critical-hit update. */
.fortune-good-small,
.fortune-good-medium,
.fortune-good-major {
  animation: none !important;
  filter: none !important;
  transform: none !important;
}
.fortune-good-major::after { display: none !important; content: none !important; }
.fortune-unified.is-revealed .fortune-energy-core { animation: fortuneCoreSettle 520ms cubic-bezier(.18,.86,.24,1.2) both !important; filter: none !important; }
.fortune-unified.is-revealed .fortune-outcome { animation: fortuneOutcomeSettle 560ms cubic-bezier(.18,.86,.24,1.16) both !important; filter: none !important; }
.fortune-interpret-transition.show { animation: fortuneInterpretVeilStable 1s cubic-bezier(.2,.72,.26,1) both !important; }

.breathing-stage.phase-inhale {
  --breath-primary: #69e8ff;
  --breath-secondary: #68ffc2;
  --breath-deep: #087c76;
}
.breathing-stage.phase-exhale {
  --breath-primary: #ffd27a;
  --breath-secondary: #d7a0ff;
  --breath-deep: #744483;
}
.breathing-stage.phase-inhale::before { opacity: 1 !important; }
.breathing-stage.phase-inhale::after { opacity: 0 !important; }
.breathing-stage.phase-exhale::before { opacity: 0 !important; }
.breathing-stage.phase-exhale::after { opacity: 1 !important; }
.breathing-copy strong { color: var(--breath-primary) !important; text-shadow: 0 0 20px color-mix(in srgb, var(--breath-primary) 38%, transparent) !important; }
.breathing-ring { border-color: color-mix(in srgb, var(--breath-primary) 48%, transparent) !important; box-shadow: 0 0 42px color-mix(in srgb, var(--breath-primary) 17%, transparent), inset 0 0 30px color-mix(in srgb, var(--breath-secondary) 10%, transparent) !important; }
.breathing-core { border-color: color-mix(in srgb, var(--breath-primary) 76%, white 12%) !important; background: radial-gradient(circle at 40% 32%, color-mix(in srgb, var(--breath-primary) 46%, white 8%), color-mix(in srgb, var(--breath-secondary) 26%, transparent) 42%, color-mix(in srgb, var(--breath-deep) 88%, #061815)) !important; box-shadow: 0 0 56px color-mix(in srgb, var(--breath-primary) 28%, transparent), inset 0 0 32px color-mix(in srgb, var(--breath-secondary) 20%, transparent) !important; }
.breathing-stage > p { color: color-mix(in srgb, var(--breath-primary) 72%, white 20%) !important; font-weight: 850; }
.breathing-stage.phase-inhale .breathing-control { animation: breathingIn 4s cubic-bezier(.35,.08,.25,1) forwards !important; }
.breathing-stage.phase-exhale .breathing-control { animation: breathingOut 6s cubic-bezier(.42,0,.22,1) forwards !important; }
.breathing-stage.phase-inhale .breathing-ring-two { animation: breathingOrbit 8s linear infinite !important; }
.breathing-stage.phase-exhale .breathing-ring-two { animation: breathingOrbit 12s linear reverse infinite !important; }

.worry-impact em:nth-of-type(2) { inset: -54px !important; border-width: 2px !important; border-style: dashed; animation-delay: 70ms; animation-duration: 720ms !important; }
.worry-impact > i { width: 9px !important; height: 9px !important; background: var(--impact-hue, currentColor) !important; box-shadow: 0 0 12px var(--impact-hue, currentColor) !important; }
.worry-impact.is-mega { color: #ffe26f !important; }
.worry-impact.is-mega b { font-size: 2rem !important; }
.worry-crusher-stage.is-heavy-impact { animation: worryStageHeavyPunch 340ms ease-out !important; }
.worry-target.is-crushed { animation: worryTargetCriticalCrush 380ms cubic-bezier(.12,.82,.2,1) both !important; }

/* Purchase-power board: two simple cards per row, up to six configurable entries. */
.celebrity-purchase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: #e9fff4;
}

.celebrity-purchase-head > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 950;
}

.celebrity-purchase-head > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #55f0aa;
  box-shadow: 0 0 12px rgba(85, 240, 170, 0.78);
}

.celebrity-purchase-head small {
  color: rgba(218, 242, 229, 0.5);
  font-size: 0.56rem;
  font-weight: 800;
}

.celebrity-products {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  max-height: none !important;
  overflow: visible !important;
}

.celebrity-product {
  grid-template-columns: 32px minmax(0, 1fr) !important;
  gap: 4px 8px !important;
  min-width: 0;
  padding: 9px !important;
}

.celebrity-product > .celebrity-product-icon {
  grid-row: 1 / span 2;
}

.celebrity-product > div {
  min-width: 0;
  text-align: left !important;
}

.celebrity-product > div:nth-of-type(2) {
  grid-column: 2;
}

.celebrity-product > div strong,
.celebrity-product > div small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.celebrity-product-progress {
  grid-column: 1 / -1;
}

.celebrity-products-empty {
  grid-column: 1 / -1;
}

/* KPI is a high-value target with a dedicated scanner and premium impact palette. */
.worry-target-kpi {
  isolation: isolate;
  border-color: #b68aff !important;
  color: #fff4b3 !important;
  background:
    linear-gradient(135deg, rgba(130, 69, 225, 0.97), rgba(58, 12, 95, 0.98) 58%, rgba(19, 8, 44, 0.98)) !important;
  box-shadow: 0 0 0 1px rgba(255, 223, 105, 0.32), 0 0 28px rgba(163, 105, 255, 0.5), inset 0 0 18px rgba(255, 225, 99, 0.1) !important;
  animation: worryTargetArrive 260ms cubic-bezier(.17,.9,.25,1.25), worryKpiThreat 720ms ease-in-out 260ms infinite alternate !important;
}

.worry-target-kpi > span,
.worry-target-kpi > small {
  position: relative;
  z-index: 3;
}

.worry-target-kpi > span {
  letter-spacing: 0.12em;
  text-shadow: 0 0 13px rgba(255, 226, 106, 0.8);
}

.worry-target-aura,
.worry-target-aura i {
  position: absolute;
  z-index: 1;
  inset: -7px;
  border: 1px solid rgba(190, 143, 255, 0.6);
  border-radius: 20px;
  pointer-events: none;
}

.worry-target-aura {
  overflow: hidden;
  animation: worryKpiOrbit 2.2s linear infinite;
}

.worry-target-aura i:nth-child(1) { inset: 5px; border-color: rgba(255, 229, 112, 0.35); animation: worryKpiScan 1.05s ease-in-out infinite; }
.worry-target-aura i:nth-child(2) { inset: -14px 35%; border-width: 0 1px; border-radius: 0; border-color: rgba(255, 235, 144, 0.62); }
.worry-target-aura i:nth-child(3) { inset: 35% -14px; border-width: 1px 0; border-radius: 0; border-color: rgba(185, 126, 255, 0.75); }

.worry-impact.is-kpi {
  color: #b388ff !important;
}

.worry-impact.is-kpi em {
  border-color: currentColor;
  box-shadow: 0 0 28px currentColor, inset 0 0 18px rgba(255, 230, 105, 0.25);
  animation-duration: 720ms !important;
}

.worry-impact.is-kpi em:nth-of-type(2) {
  border-color: #ffe66f !important;
}

.worry-impact.is-kpi > strong {
  color: #fff1a0;
  letter-spacing: 0.12em;
  text-shadow: 0 0 16px #9d6fff;
}

.worry-crusher-burst[data-tone="kpi"] {
  color: #fff0a0;
  font-size: clamp(1.7rem, 8vw, 3.8rem);
  text-shadow: 0 0 16px #b27cff, 0 0 34px #7444e5, 0 4px #28104c;
}

.worry-crusher-stage.is-kpi-break {
  animation: worryKpiStageBreak 520ms cubic-bezier(.1,.8,.2,1) !important;
}

.worry-preview-items i:nth-child(2) {
  border-color: #b38aff !important;
  color: #fff0a6 !important;
  background: linear-gradient(145deg, rgba(130, 65, 224, 0.96), rgba(40, 8, 75, 0.98)) !important;
  box-shadow: 0 0 24px rgba(168, 105, 255, 0.48) !important;
  animation-name: worryPreviewKpiCritical !important;
}

@keyframes worryKpiThreat {
  to { filter: brightness(1.3) saturate(1.28); transform: rotate(var(--worry-tilt)) scale(1.09); box-shadow: 0 0 0 2px rgba(255, 226, 108, 0.45), 0 0 42px rgba(160, 92, 255, 0.72), inset 0 0 22px rgba(255, 226, 108, 0.18); }
}

@keyframes worryKpiOrbit { to { transform: rotate(360deg); } }
@keyframes worryKpiScan { 50% { inset: -2px; opacity: 0.2; } }
@keyframes worryKpiStageBreak {
  18% { transform: scale(1.018) rotate(0.3deg); filter: brightness(1.7) hue-rotate(14deg); }
  38% { transform: translateX(-5px) scale(0.996); }
  58% { transform: translateX(5px) scale(1.006); }
  78% { transform: translateX(-2px); }
}

@keyframes worryPreviewKpiCritical {
  0%, 46% { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1); }
  54% { opacity: 1; transform: translateY(-5px) scale(1.16); filter: brightness(1.8); }
  61% { opacity: 0; transform: scale(1.48) rotate(8deg); filter: brightness(2.5); }
  76% { opacity: 0; transform: translateY(-16px) scale(0.7); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .celebrity-purchase-head small { font-size: 0.5rem; }
  .celebrity-product { padding: 7px !important; }
  .celebrity-product > .celebrity-product-icon { width: 28px; height: 28px; }
  .celebrity-product > div strong { font-size: 0.62rem; }
  .celebrity-product > div small { font-size: 0.48rem; }
}

/* Final high-player authority: larger wealth ticker, stronger digit rush and true pause state. */
.celebrity-income-core {
  min-height: 154px !important;
  overflow: hidden;
}

.celebrity-terminal .celebrity-income-core .celebrity-money > span {
  font-size: clamp(1.65rem, 4.8vw, 2.25rem) !important;
}

.celebrity-terminal .celebrity-income-core .celebrity-money > strong {
  color: #f8fff9 !important;
  font-size: clamp(2.85rem, 8.4vw, 4.8rem) !important;
  font-weight: 1000;
  letter-spacing: -0.055em;
  text-shadow:
    0 0 7px rgba(255, 255, 255, 0.88),
    0 0 18px rgba(85, 255, 177, 0.85),
    0 0 52px rgba(39, 224, 139, 0.48) !important;
}

.celebrity-panel.is-running .celebrity-terminal .celebrity-income-core .celebrity-money > strong {
  animation: celebrityTickerDominance 520ms ease-in-out infinite alternate;
}

.celebrity-panel.is-running .celebrity-income-core::after {
  position: absolute;
  z-index: 5;
  top: 26%;
  left: -35%;
  width: 28%;
  height: 48%;
  background: linear-gradient(90deg, transparent, rgba(255, 243, 151, 0.28), rgba(102, 255, 185, 0.42), transparent);
  content: "";
  filter: blur(4px);
  transform: skewX(-18deg);
  animation: celebrityTickerLightCut 1.35s cubic-bezier(.2,.72,.26,1) infinite;
  pointer-events: none;
}

.celebrity-ticker-character.is-changing {
  position: relative;
  color: #fff4a0;
  animation: celebrityDigitPowerRush 300ms cubic-bezier(.08,.86,.18,1.38) both !important;
  text-shadow: 0 0 12px #fff5b8, 0 0 30px #4cffad;
}

.celebrity-session button {
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.celebrity-session button[aria-pressed="true"] {
  border-color: rgba(255, 218, 100, 0.72);
  color: #fff1b0;
  background: linear-gradient(135deg, rgba(255, 178, 51, 0.24), rgba(255, 91, 99, 0.18));
  box-shadow: 0 0 20px rgba(255, 202, 67, 0.2);
}

.celebrity-session button:active {
  transform: scale(0.94);
  filter: brightness(1.3);
}

.celebrity-panel.is-paused .celebrity-terminal-head b {
  color: #ffd36d;
}

.celebrity-panel.is-paused .celebrity-income-rings i,
.celebrity-panel.is-paused .celebrity-scanline::after {
  animation-play-state: paused !important;
}

@keyframes celebrityTickerDominance {
  from { transform: perspective(240px) translateZ(0) scale(0.992); filter: brightness(1); }
  to { transform: perspective(240px) translateZ(7px) scale(1.018); filter: brightness(1.22) saturate(1.18); }
}

@keyframes celebrityDigitPowerRush {
  0% { opacity: 0; transform: translateY(-1.15em) scale(0.68, 2.25) rotateX(72deg); filter: blur(5px) brightness(2.8); }
  46% { opacity: 1; transform: translateY(0.13em) scale(1.2, 0.82) rotateX(-12deg); filter: blur(0) brightness(2.25); }
  72% { transform: translateY(-0.04em) scale(0.96, 1.1) rotateX(4deg); }
  100% { transform: translateY(0) scale(1) rotateX(0); filter: brightness(1.18); }
}

@keyframes celebrityTickerLightCut {
  0%, 8% { left: -35%; opacity: 0; }
  22% { opacity: 1; }
  68% { opacity: 0.9; }
  88%, 100% { left: 115%; opacity: 0; }
}

/* One fixed work-end countdown plus an independent hourly sedentary reminder. */
.countdown-setting-row.is-fixed-countdown {
  grid-template-columns: minmax(0, 1fr) 27px 116px;
}

.countdown-fixed-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #eaf8ef;
  font-size: 0.68rem;
  font-weight: 900;
}

.countdown-fixed-label i {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 6px;
  color: #1f1706;
  background: linear-gradient(135deg, #ffe46e, #ffb74d);
  font-size: 0.55rem;
  font-style: normal;
}

.sedentary-reminder-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(81, 232, 188, 0.2);
  border-radius: 8px;
  background: rgba(35, 139, 111, 0.055);
  cursor: pointer;
}

.sedentary-reminder-setting > span {
  display: grid;
  gap: 2px;
}
.sedentary-reminder-setting b { color: #e8fff4; font-size: 0.68rem; }
.sedentary-reminder-setting small { color: rgba(212, 242, 227, 0.54); font-size: 0.54rem; }
.sedentary-reminder-setting input { position: absolute; opacity: 0; pointer-events: none; }
.sedentary-reminder-setting > i {
  position: relative;
  width: 38px;
  height: 21px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: 180ms ease;
}
.sedentary-reminder-setting > i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #b6c8be;
  content: "";
  transition: 180ms ease;
}
.sedentary-reminder-setting input:checked + i { background: linear-gradient(90deg, #36d99a, #ffe26b); box-shadow: 0 0 14px rgba(69, 235, 166, 0.24); }
.sedentary-reminder-setting input:checked + i::after { left: 20px; background: #fff9d5; }
.sedentary-reminder-setting input:focus-visible + i { outline: 2px solid #fff19a; outline-offset: 2px; }

.sedentary-reminder-card {
  --countdown-accent: #58efbd;
}

.sedentary-reminder-active .sedentary-reminder-card {
  animation: sedentaryReminderAlert 780ms cubic-bezier(.16,.82,.2,1.16) 3;
}

@keyframes sedentaryReminderAlert {
  45% { transform: scale(1.025); border-color: #fff08a; filter: brightness(1.45); box-shadow: 0 0 30px rgba(77, 244, 178, 0.32); }
}

@media (max-width: 640px) {
  .celebrity-income-core { min-height: 142px !important; }
  .celebrity-terminal .celebrity-income-core .celebrity-money > strong { font-size: clamp(2.45rem, 11.6vw, 4rem) !important; }
  .countdown-setting-row.is-fixed-countdown { grid-template-columns: minmax(0, 1fr) 27px 104px; }
  .countdown-work-window { width: 104px; font-size: 0.58rem; }
}

@media (prefers-reduced-motion: reduce) {
  .celebrity-panel.is-running .celebrity-income-core::after,
  .celebrity-panel.is-running .celebrity-terminal .celebrity-income-core .celebrity-money > strong {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* FINAL authority: fortune stability and fitted high-player display. */
.fortune-unified:not(.is-charging) .fortune-energy-core,
.fortune-unified:not(.is-charging) .fortune-core-orbit,
.fortune-unified:not(.is-charging) .fortune-core-halo,
.fortune-unified:not(.is-charging) .fortune-energy-core > img,
.fortune-unified:not(.is-charging) .fortune-energy-panel,
.fortune-unified:not(.is-charging) .fortune-outcome,
.fortune-unified:not(.is-charging) .fortune-result,
.fortune-unified:not(.is-charging) .fortune-result::before,
.fortune-unified:not(.is-charging) .fortune-result::after,
.fortune-unified:not(.is-charging) .fortune-interpret-button::before,
.fortune-unified:not(.is-charging) .fortune-interpret-button::after,
.fortune-unified.is-revealed .fortune-energy-core,
.fortune-unified.is-revealed .fortune-outcome {
  animation: none !important;
  filter: none !important;
}

.fortune-unified.is-revealed .fortune-energy-core,
.fortune-unified.is-revealed .fortune-outcome {
  opacity: 1 !important;
  transform: none !important;
}

.fortune-celebration.is-active,
.fortune-celebration.is-active * {
  animation-play-state: running !important;
}

/* Keep the hidden milestone overlay out of layout flow. */
.celebrity-panel > .celebrity-milestone-fx {
  position: absolute !important;
}

.celebrity-income-core {
  min-height: 188px !important;
  padding-block: 18px !important;
}

.celebrity-terminal .celebrity-income-core .celebrity-money > span {
  font-size: clamp(1.55rem, 6.5cqw, 2.4rem) !important;
}

.celebrity-terminal .celebrity-income-core .celebrity-money > strong {
  font-size: clamp(1.3rem, var(--celebrity-number-fluid, 20cqw), var(--celebrity-number-max, 5.1rem)) !important;
  line-height: 0.9 !important;
  letter-spacing: -0.05em !important;
}

.celebrity-terminal .celebrity-income-core .celebrity-ticker-character {
  font-size: inherit !important;
}

@media (max-width: 640px) {
  .celebrity-income-core { min-height: 172px !important; }
  .celebrity-terminal .celebrity-income-core .celebrity-money > strong {
    font-size: clamp(1.25rem, var(--celebrity-number-fluid, 20cqw), var(--celebrity-number-max, 4.9rem)) !important;
  }
}

/* FINAL interaction authority: stable fortune compositing and reset confirmation colors. */
.fortune-energy-core::before {
  filter: none !important;
}

.fortune-energy-core::after,
.fortune-core-orbit,
.fortune-core-halo,
.fortune-energy-core > img {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.fortune-unified:not(.is-charging) .fortune-energy-core > img,
.fortune-unified.is-charging .fortune-energy-core > img {
  filter: drop-shadow(0 0 10px rgba(255, 210, 83, 0.54)) !important;
}

.fortune-unified.is-charging .fortune-energy-core > img {
  animation: fortuneTokenChargeStable 900ms ease-in-out infinite alternate !important;
  will-change: transform;
}

.fortune-unified.is-charging .fortune-core-halo {
  animation: fortuneCorePulseStable 900ms ease-in-out infinite alternate !important;
  will-change: transform, opacity;
}

.control-strip .reset-today-button {
  border-color: rgba(255, 196, 91, 0.52);
  color: #ffe5a3;
  background: linear-gradient(145deg, rgba(255, 208, 92, 0.12), rgba(255, 120, 72, 0.055)), rgba(12, 21, 18, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 244, 190, 0.09), 0 7px 18px rgba(62, 34, 7, 0.16);
}

.control-strip .reset-today-button.is-confirming {
  border-color: rgba(255, 112, 112, 0.88);
  color: #fff4ec;
  background: linear-gradient(135deg, rgba(255, 72, 92, 0.72), rgba(164, 36, 52, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 225, 218, 0.22), 0 0 0 2px rgba(255, 89, 105, 0.12), 0 8px 22px rgba(91, 16, 28, 0.28);
}

/* FINAL countdown authority: every label and timer must remain fully readable. */
.workday-countdowns {
  grid-template-columns: repeat(var(--countdown-columns, 3), minmax(0, 1fr));
}

.workday-countdown-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  min-height: 72px;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 8px 6px;
}

.workday-countdown-card > span {
  width: 100%;
  max-width: none;
  justify-content: center;
}

.workday-countdown-card > span b {
  overflow: visible;
  max-width: none;
  font-size: clamp(0.52rem, 1.9vw, 0.65rem);
  line-height: 1.2;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
}

.workday-countdown-card > strong,
.workday-countdown-card[data-phase="arrived"] > strong {
  overflow: visible;
  width: 100%;
  margin-left: 0;
  font-size: clamp(0.72rem, 2.7vw, 1rem);
  line-height: 1.1;
  text-align: center;
  text-overflow: clip;
}

@media (max-width: 640px) {
  .workday-countdown-card {
    min-height: 76px;
    gap: 5px;
    padding: 8px 3px;
  }

  .workday-countdown-card > span {
    max-width: none;
    gap: 3px;
  }

  .workday-countdown-card > span b {
    overflow: visible;
    max-width: none;
    font-size: clamp(0.47rem, 2.75vw, 0.58rem);
    text-overflow: clip;
    white-space: normal;
  }

  .workday-countdown-card > strong,
  .workday-countdown-card[data-phase="arrived"] > strong {
    overflow: visible;
    font-size: clamp(0.67rem, 3.45vw, 0.84rem);
    text-overflow: clip;
  }
}

/* FINAL visual scale: goal first, utility modules quieter, reset action clearly colored. */
.daily-goal-panel {
  min-height: 84px;
  gap: 12px;
  margin-bottom: 11px;
  padding: 15px 16px;
  border-left-width: 4px;
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    0 9px 24px rgba(40, 29, 5, 0.12);
}

.daily-goal-progress-head > span {
  font-size: 0.72rem;
}

.daily-goal-progress-head > span b {
  margin-left: 8px;
  font-size: 0.94rem;
}

.daily-goal-progress-head strong {
  font-size: 1.32rem;
}

.income-goal-meter {
  height: 9px;
}

.workday-countdowns {
  gap: 5px;
  margin-bottom: 9px;
}

.workday-countdown-card {
  min-height: 56px;
  gap: 3px;
  padding: 5px 4px;
  border-radius: 7px;
}

.workday-countdown-card > span {
  gap: 3px;
}

.workday-countdown-card > span i {
  width: 18px;
  height: 18px;
  font-size: 0.46rem;
  border-radius: 5px;
}

.workday-countdown-card > span b {
  font-size: clamp(0.47rem, 1.65vw, 0.57rem);
}

.workday-countdown-card > strong,
.workday-countdown-card[data-phase="arrived"] > strong {
  font-size: clamp(0.66rem, 2.25vw, 0.84rem);
}

.personal-products-panel {
  margin-bottom: 14px;
  padding: 9px 10px;
}

.personal-products-head {
  margin-bottom: 6px;
}

.personal-products-title {
  font-size: 0.66rem;
}

.personal-products-head strong {
  font-size: 0.72rem;
}

.personal-products-settings {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
  font-size: 0.76rem;
}

.personal-product {
  padding-block: 5px;
}

.personal-product-icon {
  width: 26px;
  height: 26px;
  font-size: 0.62rem;
}

.personal-product strong {
  font-size: 0.63rem;
}

.personal-product small {
  font-size: 0.5rem;
}

.control-strip .reset-today-button:not(.is-confirming) {
  border-color: rgba(255, 219, 141, 0.92);
  color: #351502;
  background: linear-gradient(135deg, #ff8d5b 0%, #ffbd55 54%, #ffe080 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 220, 0.72),
    0 7px 18px rgba(223, 104, 32, 0.25);
}

.control-strip .reset-today-button:not(.is-confirming) small {
  color: rgba(68, 29, 4, 0.68);
}

.control-strip .reset-today-button:not(.is-confirming):hover,
.control-strip .reset-today-button:not(.is-confirming):focus-visible {
  border-color: #fff0bb;
  color: #281000;
  background: linear-gradient(135deg, #ff9f68 0%, #ffca62 52%, #ffea98 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 235, 0.82),
    0 0 20px rgba(255, 172, 70, 0.3);
}

@media (max-width: 640px) {
  .daily-goal-panel {
    min-height: 78px;
    gap: 10px;
    margin: 0 12px 9px;
    padding: 13px 12px;
  }

  .daily-goal-progress-head > span {
    font-size: 0.62rem;
  }

  .daily-goal-progress-head > span b {
    margin-left: 5px;
    font-size: 0.82rem;
  }

  .daily-goal-progress-head strong {
    font-size: 1.16rem;
  }

  .income-goal-meter {
    height: 8px;
  }

  .workday-countdown-card {
    min-height: 58px;
    gap: 3px;
    padding: 5px 2px;
  }

  .workday-countdown-card > span i {
    width: 16px;
    height: 16px;
    font-size: 0.42rem;
  }

  .workday-countdown-card > span b {
    font-size: clamp(0.43rem, 2.55vw, 0.52rem);
  }

  .workday-countdown-card > strong,
  .workday-countdown-card[data-phase="arrived"] > strong {
    font-size: clamp(0.62rem, 3.1vw, 0.76rem);
  }

  .personal-products-panel {
    margin-bottom: 10px;
    padding: 7px 8px;
  }

  .personal-product {
    padding: 5px;
  }
}

/* FINAL fortune result ceremony: restore a stable, local good-sign reveal. */
.fortune-unified.fortune-good-hit .fortune-outcome {
  transform-origin: 50% 56%;
  will-change: transform, opacity, box-shadow;
}

.fortune-unified.fortune-good-hit.fortune-good-small .fortune-outcome {
  animation: fortuneGoodSlipSmall 1500ms cubic-bezier(0.16, 0.9, 0.24, 1.12) both !important;
}

.fortune-unified.fortune-good-hit.fortune-good-medium .fortune-outcome {
  animation: fortuneGoodSlipMedium 1900ms cubic-bezier(0.14, 0.88, 0.22, 1.1) both !important;
}

.fortune-unified.fortune-good-hit.fortune-good-major .fortune-outcome {
  animation: fortuneGoodSlipMajor 2400ms cubic-bezier(0.12, 0.9, 0.2, 1.08) both !important;
}

.fortune-unified.fortune-good-hit .fortune-auspice {
  animation: fortuneGoodSealReturn 1320ms cubic-bezier(0.14, 0.88, 0.22, 1.14) both !important;
}

.fortune-celebration.is-active {
  z-index: 80;
  opacity: 1 !important;
}

.fortune-celebration.is-active .fortune-celebration-spark {
  animation-name: fortune-celebration-spark !important;
  animation-play-state: running !important;
}

@keyframes fortuneGoodSlipSmall {
  0% { opacity: 0.18; transform: translateY(14px) scale(0.84); box-shadow: 0 0 0 rgba(255, 212, 95, 0); }
  24% { opacity: 1; transform: translateY(-3px) scale(1.055); box-shadow: 0 0 24px rgba(255, 212, 95, 0.42); }
  48% { transform: translateY(1px) scale(0.985); box-shadow: 0 0 14px rgba(255, 212, 95, 0.24); }
  72% { transform: translateY(0) scale(1.012); }
  100% { opacity: 1; transform: translateY(0) scale(1); box-shadow: inset 0 0 24px rgba(117, 46, 22, 0.12), 0 13px 26px rgba(0, 0, 0, 0.34); }
}

@keyframes fortuneGoodSlipMedium {
  0% { opacity: 0.12; transform: translateY(20px) rotate(-2deg) scale(0.76); box-shadow: 0 0 0 rgba(255, 212, 95, 0); }
  18% { opacity: 1; transform: translateY(-6px) rotate(1deg) scale(1.09); box-shadow: 0 0 38px rgba(255, 212, 95, 0.58); }
  38% { transform: translateY(2px) rotate(-0.5deg) scale(0.975); }
  58% { transform: translateY(-1px) rotate(0.2deg) scale(1.03); box-shadow: 0 0 22px rgba(98, 244, 162, 0.34); }
  78% { transform: translateY(0) rotate(0) scale(0.995); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); box-shadow: inset 0 0 24px rgba(117, 46, 22, 0.12), 0 13px 26px rgba(0, 0, 0, 0.34); }
}

@keyframes fortuneGoodSlipMajor {
  0% { opacity: 0.06; transform: translateY(28px) rotate(-3deg) scale(0.64); box-shadow: 0 0 0 rgba(255, 212, 95, 0); }
  12% { opacity: 1; transform: translateY(-9px) rotate(1.4deg) scale(1.15); box-shadow: 0 0 58px rgba(255, 212, 95, 0.72); }
  26% { transform: translateY(4px) rotate(-0.8deg) scale(0.95); }
  42% { transform: translateY(-3px) rotate(0.45deg) scale(1.075); box-shadow: 0 0 42px rgba(111, 230, 255, 0.42); }
  58% { transform: translateY(1px) rotate(-0.2deg) scale(0.985); }
  72% { transform: translateY(-1px) rotate(0) scale(1.03); box-shadow: 0 0 28px rgba(98, 244, 162, 0.36); }
  86% { transform: translateY(0) scale(0.995); }
  100% { opacity: 1; transform: translateY(0) scale(1); box-shadow: inset 0 0 24px rgba(117, 46, 22, 0.12), 0 13px 26px rgba(0, 0, 0, 0.34); }
}

@keyframes fortuneGoodSealReturn {
  0% { opacity: 0; letter-spacing: 0.34em; transform: scale(0.5) rotate(-10deg); }
  28% { opacity: 1; letter-spacing: 0.14em; transform: scale(1.28) rotate(3deg); }
  50% { transform: scale(0.9) rotate(-1deg); }
  70% { transform: scale(1.08) rotate(0.4deg); }
  100% { opacity: 1; letter-spacing: 0.12em; transform: scale(1) rotate(0); }
}

/* FINAL region proportions: stronger hierarchy with a tighter mobile rhythm. */
.daily-goal-panel {
  min-height: 78px;
  gap: 10px;
  padding: 13px 15px;
}

.workday-countdown-card {
  min-height: 54px;
  padding-block: 4px;
}

.personal-products-panel {
  padding: 8px 9px;
}

.personal-products-head {
  margin-bottom: 5px;
}

.personal-product {
  padding-block: 4px;
}

@media (max-width: 640px) {
  .control-strip {
    gap: 7px;
    padding-top: 7px;
    padding-bottom: 9px;
  }

  .control-strip .primary-button,
  .control-strip .ghost-button,
  .control-strip .burst-button,
  .control-strip .utility-action,
  .control-strip .charge-button {
    min-height: 38px;
  }

  .daily-goal-panel {
    min-height: 72px;
    gap: 8px;
    margin-bottom: 8px;
    padding: 11px 12px;
  }

  .daily-goal-progress-head strong {
    font-size: 1.08rem;
  }

  .income-goal-meter {
    height: 7px;
  }

  .workday-countdowns {
    gap: 6px;
    margin-bottom: 8px;
  }

  .workday-countdown-card {
    min-height: 52px;
    padding: 4px 2px;
  }

  .workday-countdown-card > span i {
    width: 15px;
    height: 15px;
  }

  .personal-products-panel {
    margin-bottom: 10px;
    padding: 7px 8px 8px;
  }

  .personal-products-settings {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
  }

  .personal-product {
    gap: 2px 5px;
    padding: 4px;
  }

  .personal-product-icon {
    width: 24px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fortune-unified.fortune-good-hit .fortune-outcome,
  .fortune-unified.fortune-good-hit .fortune-auspice,
  .fortune-celebration.is-active .fortune-celebration-spark {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* FINAL high-player settings authority: the gear opens a focused modal instead of expanding the simulator. */
body.celebrity-settings-open {
  overflow: hidden;
}

dialog.celebrity-settings-dialog {
  position: fixed;
  inset: 0;
  display: none;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  max-height: min(82dvh, 720px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(91, 237, 180, 0.58);
  border-radius: 16px;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 3%, rgba(84, 184, 255, 0.15), transparent 38%),
    radial-gradient(circle at 5% 100%, rgba(57, 248, 143, 0.1), transparent 36%),
    rgba(3, 12, 17, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(224, 255, 242, 0.12),
    0 28px 90px rgba(0, 0, 0, 0.7),
    0 0 42px rgba(57, 248, 143, 0.12);
}

dialog.celebrity-settings-dialog[open] {
  display: grid;
  animation: celebritySettingsDialogIn 280ms cubic-bezier(0.2, 0.88, 0.26, 1.12) both;
}

dialog.celebrity-settings-dialog[hidden] {
  display: none !important;
}

dialog.celebrity-settings-dialog::backdrop {
  background: rgba(0, 5, 8, 0.76);
  backdrop-filter: blur(7px) saturate(0.82);
  animation: celebritySettingsBackdropIn 180ms ease both;
}

.celebrity-settings-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(84, 184, 255, 0.18);
  background: rgba(5, 20, 25, 0.86);
}

.celebrity-settings-dialog-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.celebrity-settings-dialog-head span {
  color: var(--green);
  font-size: 0.54rem;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.celebrity-settings-dialog-head h2 {
  margin: 0;
  color: #effff7;
  font-size: 1.04rem;
  line-height: 1.15;
}

.celebrity-settings-dialog-head p {
  margin: 0;
  color: rgba(220, 244, 233, 0.56);
  font-size: 0.62rem;
  font-weight: 750;
}

.celebrity-settings-close {
  flex: 0 0 auto;
  min-width: 56px;
  height: 34px;
  border: 1px solid rgba(84, 184, 255, 0.36);
  border-radius: 9px;
  color: #dbf7ff;
  background: rgba(84, 184, 255, 0.1);
  font-size: 0.66rem;
  font-weight: 950;
}

.celebrity-settings-close:hover,
.celebrity-settings-close:focus-visible {
  border-color: var(--green);
  color: #effff7;
  background: rgba(57, 248, 143, 0.14);
}

.celebrity-settings-dialog-body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 16px 18px 18px;
  overflow: auto;
  overscroll-behavior: contain;
}

dialog.celebrity-settings-dialog .celebrity-product-settings-head strong {
  font-size: 0.78rem;
}

dialog.celebrity-settings-dialog .celebrity-product-settings-head span {
  font-size: 0.6rem;
}

dialog.celebrity-settings-dialog .celebrity-product-editor {
  max-height: none;
  overflow: visible;
}

@keyframes celebritySettingsDialogIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes celebritySettingsBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 640px) {
  dialog.celebrity-settings-dialog {
    width: calc(100vw - 20px);
    max-height: min(86dvh, 720px);
    border-radius: 14px;
  }

  .celebrity-settings-dialog-head {
    padding: 14px 14px 12px;
  }

  .celebrity-settings-dialog-head h2 {
    font-size: 0.94rem;
  }

  .celebrity-settings-dialog-head p {
    font-size: 0.56rem;
  }

  .celebrity-settings-dialog-body {
    gap: 9px;
    padding: 13px 12px 15px;
  }

  .celebrity-custom-target-row {
    grid-template-columns: minmax(0, 1fr) 76px;
  }

  .celebrity-custom-target-row button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .celebrity-product-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr) 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.celebrity-settings-dialog[open],
  dialog.celebrity-settings-dialog::backdrop {
    animation-duration: 1ms !important;
  }
}

/* FINAL interaction polish: contained focus rings, centered setting icons and a faster live-income cadence. */
.admin-panel input:focus,
.admin-panel select:focus,
dialog.celebrity-settings-dialog input:focus,
dialog.celebrity-settings-dialog select:focus {
  border-color: rgba(82, 242, 168, 0.72);
  box-shadow: inset 0 0 0 1px rgba(82, 242, 168, 0.32), 0 0 0 1px rgba(82, 242, 168, 0.08);
}

.celebrity-custom-target-row,
.celebrity-product-form,
.celebrity-product-editor article {
  gap: 8px;
}

.celebrity-custom-form input,
.celebrity-custom-form select,
.celebrity-product-form input,
.celebrity-product-editor input,
.celebrity-editor-price {
  min-width: 0;
  max-width: 100%;
  background-clip: padding-box;
}

.celebrity-period-fixed {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.celebrity-period-fixed > span {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 800;
}

.celebrity-period-fixed > strong {
  display: grid;
  place-items: center;
  height: 32px;
  border: 1px solid rgba(84, 184, 255, 0.24);
  border-radius: 6px;
  color: #eafff2;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.68rem;
}

.icon-button,
.personal-products-settings,
.celebrity-reset {
  padding: 0;
  text-align: center;
  line-height: 1;
}

.icon-button > span,
.personal-products-settings,
.celebrity-reset {
  align-items: center;
  justify-content: center;
}

#adminToggle > span,
.personal-products-settings,
#celebrityProductSettingsButton {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

#adminToggle > span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.stopwatch-digit.is-ticking,
.stopwatch-digit.is-ticking::before {
  animation-duration: 130ms;
}

.fortune-celebration,
.fortune-celebration.is-active {
  display: block !important;
}

.fortune-celebration.is-active .fortune-celebration-spark {
  animation-name: fortune-celebration-spark !important;
  animation-play-state: running !important;
}

@media (max-width: 640px) {
  .celebrity-custom-target-row {
    grid-template-columns: minmax(0, 1fr) 74px;
  }

  .celebrity-product-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  }

  .celebrity-product-form > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .celebrity-product-editor article {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.74fr) 32px;
  }
}

/* FINAL persistent sedentary reminder: it stays active until the user dismisses it. */
.sedentary-reminder-readout {
  display: grid;
  min-width: 0;
  place-items: center;
  gap: 3px;
}

.sedentary-reminder-readout > strong {
  color: var(--countdown-accent, #58efbd);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.66rem, 2.25vw, 0.84rem);
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.sedentary-reminder-readout > button {
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 231, 125, 0.68);
  border-radius: 999px;
  color: #2a1803;
  background: linear-gradient(135deg, #fff08b, #ffbd57);
  box-shadow: inset 0 1px 0 rgba(255, 255, 238, 0.74), 0 4px 10px rgba(255, 175, 58, 0.2);
  font-size: 0.46rem;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.sedentary-reminder-readout > button:focus-visible {
  outline: 2px solid #fff4a7;
  outline-offset: 2px;
}

.sedentary-reminder-card[data-phase="alerting"] {
  min-height: 64px;
  border-color: rgba(255, 226, 101, 0.82) !important;
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 199, 71, 0.18), transparent 66%),
    rgba(7, 33, 25, 0.96) !important;
}

.sedentary-reminder-card[data-phase="alerting"] .sedentary-reminder-readout > strong {
  color: #fff1a4;
  font-family: inherit;
  font-size: clamp(0.58rem, 2vw, 0.72rem);
  letter-spacing: 0.04em;
}

.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] {
  animation: sedentaryReminderPersistent 1080ms ease-in-out infinite !important;
  transform-origin: 50% 50%;
}

.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] > span i {
  animation: sedentaryReminderIcon 720ms ease-in-out infinite alternate;
}

@keyframes sedentaryReminderPersistent {
  0%, 100% {
    border-color: rgba(255, 226, 101, 0.56);
    box-shadow: inset 0 0 0 rgba(255, 214, 91, 0), 0 0 0 rgba(78, 246, 180, 0);
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    border-color: #fff08a;
    box-shadow: inset 0 0 20px rgba(255, 208, 75, 0.13), 0 0 26px rgba(77, 244, 178, 0.3);
    filter: brightness(1.28);
    transform: scale(1.018);
  }
}

@keyframes sedentaryReminderIcon {
  to { color: #412200; background: #ffe770; box-shadow: 0 0 15px rgba(255, 222, 91, 0.66); transform: rotate(-7deg) scale(1.08); }
}

/* FINAL fortune ritual: traditional illuminated sign, with no quantum rings or idle flicker. */
.fortune-unified {
  isolation: isolate;
}

.fortune-unified .fortune-sign-button.fortune-energy-core {
  width: min(29vw, 174px) !important;
  height: min(32vw, 190px) !important;
  min-width: 148px;
  min-height: 170px;
  border-radius: 28px !important;
  contain: layout;
  transform: translateZ(0);
}

.fortune-unified .fortune-sign-button::before {
  z-index: 0;
  inset: 12% 25% 18% !important;
  border: 0 !important;
  border-radius: 26px 26px 18px 18px !important;
  background: linear-gradient(180deg, rgba(255, 243, 166, 0.82), rgba(255, 182, 57, 0.26)) !important;
  box-shadow: 0 0 28px rgba(255, 202, 72, 0.28) !important;
  filter: none !important;
  -webkit-mask: none !important;
  mask: none !important;
  opacity: 0.08;
  transform: scaleY(var(--fortune-charge, 0)) !important;
  transform-origin: 50% 100%;
}

.fortune-unified .fortune-sign-button::after {
  z-index: 0;
  inset: auto 23% 8% !important;
  height: 17px;
  border: 1px solid rgba(255, 215, 112, 0.4) !important;
  border-radius: 50% !important;
  background: radial-gradient(ellipse, rgba(255, 209, 100, 0.34), rgba(92, 42, 14, 0.08) 62%, transparent 72%) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.36) !important;
  filter: none !important;
  opacity: 0.72;
  transform: none !important;
}

.fortune-sign-aura {
  position: absolute;
  z-index: 0;
  inset: 3% 11% 10%;
  overflow: hidden;
  border-radius: 36% 36% 28% 28%;
  background:
    linear-gradient(90deg, transparent 18%, rgba(255, 224, 128, 0.09) 49%, transparent 82%),
    radial-gradient(ellipse at 50% 76%, rgba(255, 189, 71, 0.18), transparent 66%);
  opacity: 0.38;
  pointer-events: none;
}

.fortune-sign-aura::before,
.fortune-sign-aura::after {
  position: absolute;
  right: 16%;
  left: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 226, 139, 0.72), transparent);
  content: "";
  opacity: 0;
  transform: translateY(132px);
}

.fortune-sign-aura::after {
  transform: translateY(98px);
}

.fortune-sign-token {
  position: relative;
  z-index: 2;
  display: grid;
  width: 62px;
  height: 132px;
  grid-template-rows: auto auto 1fr;
  justify-items: center;
  align-content: start;
  gap: 4px;
  padding: 17px 8px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 232, 160, 0.72);
  border-radius: 25px 25px 12px 12px;
  color: #4d210b;
  background:
    linear-gradient(90deg, rgba(122, 54, 12, 0.22), transparent 18% 82%, rgba(103, 42, 9, 0.25)),
    linear-gradient(180deg, #ffe69c, #eaa94b 58%, #b96024);
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 219, 0.88),
    inset 0 -10px 18px rgba(111, 42, 10, 0.25),
    0 14px 28px rgba(0, 0, 0, 0.38);
  transform: translate3d(0, -7px, 0);
  transform-origin: 50% 92%;
  pointer-events: none;
}

.fortune-sign-token::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 251, 207, 0.88), rgba(255, 202, 78, 0.72));
  content: "";
  opacity: 0.58;
  transform: scaleY(var(--fortune-charge, 0));
  transform-origin: 50% 100%;
}

.fortune-sign-token::after {
  position: absolute;
  z-index: 1;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 26px;
  border: 1px solid rgba(112, 45, 11, 0.3);
  border-width: 0 1px;
  content: "";
  opacity: 0.22;
  transform: translateX(-50%);
}

.fortune-sign-token i,
.fortune-sign-token b,
.fortune-sign-token em {
  position: relative;
  z-index: 2;
}

.fortune-sign-token i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(100, 34, 10, 0.54);
  border-radius: 50%;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 1000;
}

.fortune-sign-token b {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
}

.fortune-sign-token em {
  align-self: end;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(141, 32, 24, 0.72);
  color: rgba(141, 32, 24, 0.82);
  transform: rotate(-8deg);
}

.fortune-sign-token em::after {
  display: grid;
  height: 100%;
  place-items: center;
  content: "吉";
  font-size: 0.39rem;
  font-style: normal;
  font-weight: 1000;
}

.fortune-unified .fortune-core-touch {
  bottom: 0;
  min-width: 98px;
  border-color: rgba(255, 211, 108, 0.48);
  background: rgba(20, 14, 7, 0.9);
}

.fortune-unified .fortune-core-wrap .fortune-vessel-status {
  display: flex !important;
  min-height: 17px;
  margin-top: 5px;
}

.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-opening):not(.is-revealed) .fortune-sign-aura,
.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-opening):not(.is-revealed) .fortune-sign-token,
.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-opening):not(.is-revealed) .fortune-sign-token::before,
.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-opening):not(.is-revealed) .fortune-sign-token::after {
  animation: none !important;
  filter: none !important;
}

.fortune-unified.is-charging .fortune-sign-token {
  animation: fortuneSignCharge 920ms ease-in-out infinite alternate !important;
  filter: none !important;
}

.fortune-unified.is-charging .fortune-sign-button::before {
  opacity: 0.78;
}

.fortune-unified.is-charging .fortune-sign-token::after {
  opacity: 0.84;
}

.fortune-unified.is-charging .fortune-sign-aura {
  animation: fortuneSignAura 1250ms ease-in-out infinite alternate !important;
}

.fortune-unified.is-charging .fortune-sign-aura::before {
  animation: fortuneSignLineRise 1300ms ease-in-out infinite !important;
}

.fortune-unified.is-charging .fortune-sign-aura::after {
  animation: fortuneSignLineRise 1300ms 520ms ease-in-out infinite !important;
}

.fortune-unified.is-drawing .fortune-sign-token {
  animation: fortuneSignDraw 1050ms cubic-bezier(0.18, 0.8, 0.24, 1) both !important;
}

.fortune-unified.is-drawing .fortune-outcome,
.fortune-unified.is-charging .fortune-outcome {
  opacity: 0.08 !important;
  transform: translateY(8px) scale(0.97) !important;
  visibility: visible !important;
}

.fortune-unified.is-opening .fortune-sign-token {
  animation: fortuneSignRelease 900ms cubic-bezier(0.16, 0.86, 0.24, 1.12) both !important;
}

.fortune-unified.is-opening .fortune-outcome {
  visibility: visible !important;
  animation: fortuneSlipOpen 900ms cubic-bezier(0.16, 0.84, 0.24, 1) both !important;
  transform-origin: 50% 50%;
}

.fortune-unified.is-presenting .fortune-outcome,
.fortune-unified.is-revealed .fortune-outcome {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  visibility: visible !important;
}

.fortune-unified.is-revealed .fortune-auspice {
  animation: fortuneSealLanding 780ms cubic-bezier(0.16, 0.9, 0.2, 1.2) both !important;
}

.fortune-unified.is-presenting .fortune-interpret-button {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

@keyframes fortuneSignCharge {
  from { transform: translate3d(0, -6px, 0) rotate(-0.7deg); box-shadow: inset 0 1px 0 rgba(255, 252, 219, 0.88), inset 0 -10px 18px rgba(111, 42, 10, 0.25), 0 12px 24px rgba(0, 0, 0, 0.36); }
  to { transform: translate3d(0, -13px, 0) rotate(0.7deg); box-shadow: inset 0 1px 0 rgba(255, 252, 219, 0.94), inset 0 -10px 18px rgba(111, 42, 10, 0.18), 0 0 28px rgba(255, 206, 81, 0.42); }
}

@keyframes fortuneSignAura {
  from { opacity: 0.36; transform: scaleX(0.92); }
  to { opacity: 0.86; transform: scaleX(1.04); }
}

@keyframes fortuneSignLineRise {
  0% { opacity: 0; transform: translateY(142px) scaleX(0.52); }
  34% { opacity: 0.82; }
  100% { opacity: 0; transform: translateY(12px) scaleX(1); }
}

@keyframes fortuneSignDraw {
  0% { transform: translate3d(0, -8px, 0) rotate(0); }
  18% { transform: translate3d(-4px, -13px, 0) rotate(-2.2deg); }
  36% { transform: translate3d(5px, -17px, 0) rotate(2.6deg); }
  54% { transform: translate3d(-3px, -22px, 0) rotate(-1.7deg); }
  74% { transform: translate3d(3px, -30px, 0) rotate(1.1deg); }
  100% { transform: translate3d(0, -40px, 0) rotate(0); }
}

@keyframes fortuneSignRelease {
  0% { opacity: 1; transform: translate3d(0, -40px, 0) scale(1); }
  42% { opacity: 1; transform: translate3d(0, -64px, 0) scale(1.06); }
  100% { opacity: 0.42; transform: translate3d(0, -22px, 0) scale(0.94); }
}

@keyframes fortuneSlipOpen {
  0% { clip-path: inset(47% 5% 47%); opacity: 0; transform: translateY(14px) scaleX(0.78); }
  48% { clip-path: inset(8% 2% 8%); opacity: 1; transform: translateY(-3px) scaleX(1.035); }
  74% { clip-path: inset(0); transform: translateY(1px) scaleX(0.99); }
  100% { clip-path: inset(0); opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fortuneSealLanding {
  0% { opacity: 0; transform: scale(1.7) rotate(-9deg); }
  48% { opacity: 1; transform: scale(0.88) rotate(2deg); }
  72% { transform: scale(1.08) rotate(-0.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@media (max-width: 640px) {
  .sedentary-reminder-readout > strong {
    font-size: clamp(0.62rem, 3.1vw, 0.76rem);
  }

  .sedentary-reminder-card[data-phase="alerting"] {
    min-height: 68px;
  }

  .fortune-unified .fortune-sign-button.fortune-energy-core {
    width: min(42vw, 164px) !important;
    height: min(47vw, 182px) !important;
    min-width: 138px;
    min-height: 164px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] {
    animation: sedentaryReminderPersistentReduced 1800ms ease-in-out infinite !important;
  }

  .sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] > span i {
    animation: none !important;
  }

  .fortune-unified.is-charging .fortune-sign-token,
  .fortune-unified.is-charging .fortune-sign-aura,
  .fortune-unified.is-charging .fortune-sign-aura::before,
  .fortune-unified.is-charging .fortune-sign-aura::after,
  .fortune-unified.is-drawing .fortune-sign-token,
  .fortune-unified.is-opening .fortune-sign-token,
  .fortune-unified.is-opening .fortune-outcome,
  .fortune-unified.is-revealed .fortune-auspice {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ABSOLUTE FINAL layout authority for the current product pass. */
.fortune-outcome-head {
  justify-content: flex-end !important;
}

.break-game-luck {
  min-height: 170px;
  padding: 15px;
}

.break-game-luck .luck-tools {
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 13px;
}

.break-game-luck .luck-start-button,
.break-game-luck .lottery-machine {
  min-height: 122px;
}

.break-game-luck .lottery-digits i {
  --lottery-reel-height: 44px;
}

.break-game-fortune {
  width: min(94%, 780px);
  justify-self: center;
  padding: 9px;
}

.break-game-fortune .fortune-unified {
  padding: 10px !important;
}

.break-game-fortune .fortune-unified .fortune-stage-label {
  margin-bottom: 7px !important;
  padding-bottom: 6px !important;
}

.break-game-fortune .fortune-energy-ritual,
.break-game-fortune .fortune-unified .fortune-energy-ritual {
  min-height: 176px;
}

.break-game-fortune .fortune-unified .fortune-energy-core:not(.fortune-sign-button) {
  width: 138px !important;
  height: 138px !important;
  min-width: 138px;
  min-height: 138px;
}

.break-game-fortune .fortune-unified .fortune-result-panel {
  min-height: 168px;
}

.break-game-mini-games .mini-game-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 640px) {
  .break-game-luck {
    min-height: 166px;
    padding: 12px;
  }

  .break-game-luck .luck-tools {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 9px;
  }

  .break-game-luck .luck-start-button,
  .break-game-luck .lottery-machine {
    min-height: 120px;
  }

  .break-game-luck .lottery-machine {
    padding: 9px;
  }

  .break-game-luck .lottery-digits {
    gap: 4px;
    padding: 5px;
  }

  .break-game-luck .lottery-digits i {
    --lottery-reel-height: 42px;
  }

  .break-game-fortune {
    width: 96%;
    padding: 7px;
  }

  .break-game-fortune .fortune-unified {
    padding: 8px !important;
  }

  .break-game-fortune .fortune-unified .fortune-stage-label {
    margin-bottom: 5px !important;
    padding-bottom: 5px !important;
  }

  .break-game-fortune .fortune-energy-ritual,
  .break-game-fortune .fortune-unified .fortune-energy-ritual {
    grid-template-columns: 28px minmax(108px, 0.82fr) minmax(132px, 1.18fr) !important;
    gap: 4px;
    min-height: 164px;
  }

  .break-game-fortune .fortune-phase-rail {
    gap: 12px;
  }

  .break-game-fortune .fortune-unified .fortune-energy-core:not(.fortune-sign-button) {
    width: 116px !important;
    height: 116px !important;
    min-width: 116px;
    min-height: 116px;
  }

  .break-game-fortune .fortune-core-glyph {
    width: 50px;
    height: 50px;
    font-size: 1.76rem;
  }

  .break-game-fortune .fortune-unified .fortune-result-panel {
    min-height: 154px;
  }

  .break-game-fortune .fortune-unified .fortune-result-panel .fortune-outcome {
    grid-template-rows: auto minmax(52px, 1fr) auto auto !important;
    padding: 7px 6px 6px !important;
  }

  .break-game-mini-games .mini-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  .break-game-mini-games .mini-game-card {
    min-height: 0 !important;
    padding: 8px;
  }

  .break-game-mini-games .mini-game-card > p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.52rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .break-game-mini-games .mini-game-card-head {
    display: grid;
  }

  .break-game-mini-games .mini-game-card-head > span {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 24px;
    margin: 0;
  }
}

/* FINAL fortune feedback v4: 2s charge, 0.5s reveal and a stronger good-sign finale. */
.fortune-unified.is-opening .fortune-core-wrap .fortune-core-glyph {
  animation-duration: 240ms !important;
}

.fortune-unified.is-revealed .fortune-core-wrap .fortune-energy-core,
.fortune-unified.is-revealed .fortune-core-wrap .fortune-core-glyph {
  animation-duration: 500ms !important;
}

.fortune-unified.is-revealed .fortune-result-panel .fortune-auspice {
  animation: fortuneSealLanding 500ms cubic-bezier(0.16, 0.9, 0.2, 1.2) both !important;
}

.fortune-unified.is-revealed .fortune-result-panel #fortuneDrawnMark {
  animation: fortuneResultMark 500ms cubic-bezier(0.16, 0.9, 0.2, 1.18) both !important;
}

.fortune-celebration.is-active {
  overflow: visible;
}

.fortune-celebration-flash,
.fortune-celebration-wave,
.fortune-celebration-title {
  position: absolute;
  pointer-events: none;
}

.fortune-celebration-flash {
  z-index: 0;
  inset: -10%;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 43%, rgba(255, 242, 150, 0.58), rgba(91, 255, 174, 0.17) 30%, transparent 63%);
  opacity: 0;
  animation: fortuneCelebrationFlash 1050ms ease-out both;
}

.fortune-celebration-wave {
  z-index: 1;
  top: 43%;
  left: 50%;
  width: 86px;
  height: 86px;
  border: 2px solid rgba(255, 231, 132, 0.92);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.35);
  animation: fortuneCelebrationWave 1100ms cubic-bezier(0.16, 0.78, 0.2, 1) both;
}

.fortune-celebration-wave.wave-two {
  border-color: rgba(87, 255, 177, 0.72);
  animation-delay: 150ms;
}

.fortune-celebration-title {
  z-index: 4;
  top: 43%;
  left: 50%;
  min-width: 104px;
  padding: 8px 14px 7px;
  border: 1px solid rgba(255, 239, 159, 0.86);
  border-radius: 999px;
  color: #4d2508;
  background: linear-gradient(135deg, #fff3a6, #ffd35f 58%, #72f5ae);
  box-shadow: inset 0 1px 0 rgba(255, 255, 231, 0.94), 0 0 34px rgba(255, 213, 91, 0.72), 0 12px 32px rgba(0, 0, 0, 0.36);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 1rem;
  font-weight: 1000;
  letter-spacing: 0.1em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5) rotate(-6deg);
  animation: fortuneCelebrationTitle 1450ms cubic-bezier(0.14, 0.88, 0.22, 1.12) both;
}

.fortune-celebration.is-medium .fortune-celebration-title {
  font-size: 1.08rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 231, 0.94), 0 0 44px rgba(255, 213, 91, 0.8), 0 14px 36px rgba(0, 0, 0, 0.38);
}

.fortune-celebration.is-major .fortune-celebration-title {
  min-width: 126px;
  padding: 10px 18px 9px;
  border-width: 2px;
  font-size: 1.2rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 231, 0.98), 0 0 64px rgba(255, 221, 104, 0.94), 0 0 94px rgba(96, 255, 183, 0.4), 0 16px 42px rgba(0, 0, 0, 0.42);
  animation-duration: 1900ms;
}

.fortune-celebration.is-major .fortune-celebration-flash {
  animation-duration: 1450ms;
}

.fortune-celebration.is-major .fortune-celebration-wave {
  border-width: 3px;
  animation-duration: 1450ms;
}

.fortune-celebration.is-active .fortune-celebration-spark {
  z-index: 3;
}

@keyframes fortuneCelebrationFlash {
  0% { opacity: 0; transform: scale(0.72); }
  13% { opacity: 1; transform: scale(1.03); }
  46% { opacity: 0.58; }
  100% { opacity: 0; transform: scale(1.22); }
}

@keyframes fortuneCelebrationWave {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.75); }
}

@keyframes fortuneCelebrationTitle {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.45) rotate(-8deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.16) rotate(2deg); }
  36% { transform: translate(-50%, -50%) scale(0.94) rotate(-1deg); }
  54% { opacity: 1; transform: translate(-50%, -50%) scale(1.04) rotate(0); }
  78% { opacity: 1; transform: translate(-50%, -58%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -86%) scale(0.96); }
}

@media (max-width: 640px) {
  .fortune-celebration-title {
    top: 42%;
    min-width: 96px;
    padding: 7px 12px 6px;
    font-size: 0.88rem;
  }

  .fortune-celebration.is-medium .fortune-celebration-title {
    font-size: 0.96rem;
  }

  .fortune-celebration.is-major .fortune-celebration-title {
    min-width: 112px;
    padding: 9px 15px 8px;
    font-size: 1.08rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fortune-celebration-flash,
  .fortune-celebration-wave,
  .fortune-celebration-title {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

@keyframes sedentaryReminderPersistentReduced {
  0%, 100% { border-color: rgba(255, 226, 101, 0.58); background-color: rgba(7, 33, 25, 0.96); }
  50% { border-color: #fff08a; background-color: rgba(52, 50, 19, 0.96); }
}

/* FINAL alert intensity: unmistakable, persistent and still manually dismissible. */
.sedentary-reminder-card[data-phase="alerting"] {
  --countdown-accent: #ffda55;
  position: relative;
  isolation: isolate;
  min-height: 72px;
  overflow: hidden;
  border-width: 2px !important;
  border-color: #ffdc59 !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 91, 91, 0.26), transparent 38%),
    radial-gradient(circle at 82% 86%, rgba(73, 255, 174, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(70, 19, 19, 0.98), rgba(40, 35, 9, 0.98) 52%, rgba(5, 44, 33, 0.98)) !important;
}

.sedentary-reminder-card[data-phase="alerting"] > span,
.sedentary-reminder-card[data-phase="alerting"] .sedentary-reminder-readout {
  position: relative;
  z-index: 3;
}

.sedentary-reminder-card[data-phase="alerting"]::before {
  position: absolute;
  z-index: 1;
  top: -70%;
  bottom: -70%;
  left: -52%;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 214, 0.86), transparent);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: rotate(18deg);
}

.sedentary-reminder-card[data-phase="alerting"]::after {
  z-index: 2;
  inset: 2px !important;
  height: auto !important;
  border: 1px solid rgba(255, 246, 164, 0.44);
  border-radius: 5px;
  background: none !important;
  box-shadow: inset 0 0 18px rgba(255, 216, 72, 0.12);
  opacity: 1;
  pointer-events: none;
}

.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] {
  animation: sedentaryReminderAlarm 920ms cubic-bezier(0.22, 0.7, 0.28, 1) infinite !important;
}

.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"]::before {
  animation: sedentaryReminderSweep 1450ms ease-in-out infinite;
}

.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"]::after {
  animation: sedentaryReminderFrame 920ms ease-in-out infinite alternate;
}

.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] .sedentary-reminder-readout > strong {
  color: #fff7b7;
  animation: sedentaryReminderText 620ms ease-in-out infinite alternate;
  text-shadow: 0 0 9px rgba(255, 239, 119, 0.78), 0 0 22px rgba(255, 96, 74, 0.5);
}

.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] .sedentary-reminder-readout > button {
  animation: sedentaryReminderDismiss 760ms ease-in-out infinite alternate;
}

@keyframes sedentaryReminderAlarm {
  0%, 100% {
    border-color: #ffcf42;
    box-shadow: 0 0 0 0 rgba(255, 96, 76, 0), inset 0 0 12px rgba(255, 214, 68, 0.08);
    filter: brightness(1) saturate(1);
    transform: scale(1);
  }
  38% {
    border-color: #ff766a;
    box-shadow: 0 0 0 4px rgba(255, 107, 91, 0.12), 0 0 34px rgba(255, 88, 76, 0.46), inset 0 0 28px rgba(255, 215, 72, 0.18);
    filter: brightness(1.34) saturate(1.35);
    transform: scale(1.045) rotate(-0.35deg);
  }
  62% {
    border-color: #82ffc5;
    box-shadow: 0 0 0 3px rgba(86, 255, 185, 0.12), 0 0 34px rgba(76, 255, 177, 0.38), inset 0 0 24px rgba(255, 215, 72, 0.14);
    filter: brightness(1.24) saturate(1.2);
    transform: scale(1.035) rotate(0.3deg);
  }
}

@keyframes sedentaryReminderSweep {
  0%, 12% { left: -52%; opacity: 0; }
  28% { opacity: 0.86; }
  68% { opacity: 0.64; }
  88%, 100% { left: 118%; opacity: 0; }
}

@keyframes sedentaryReminderFrame {
  from { border-color: rgba(255, 239, 140, 0.3); box-shadow: inset 0 0 10px rgba(255, 216, 72, 0.08); }
  to { border-color: rgba(255, 255, 209, 0.9); box-shadow: inset 0 0 30px rgba(255, 112, 87, 0.25), 0 0 18px rgba(255, 222, 91, 0.32); }
}

@keyframes sedentaryReminderText {
  from { letter-spacing: 0.02em; transform: scale(0.97); }
  to { letter-spacing: 0.1em; transform: scale(1.1); }
}

@keyframes sedentaryReminderDismiss {
  to { background: linear-gradient(135deg, #fff9bd, #ff8d5f); box-shadow: inset 0 1px 0 #fff, 0 0 20px rgba(255, 208, 75, 0.64); transform: translateY(-1px) scale(1.055); }
}

/* FINAL fortune core: restore the original orbital motion and replace only its image with “签”. */
.fortune-unified .fortune-energy-core:not(.fortune-sign-button) {
  width: min(31vw, 182px) !important;
  height: min(31vw, 182px) !important;
  min-width: 150px;
  min-height: 150px;
  border-radius: 50% !important;
  contain: layout;
  transform: translateZ(0);
}

.fortune-core-glyph {
  position: relative;
  z-index: 3;
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 1px solid rgba(255, 236, 160, 0.88);
  border-radius: 50%;
  color: #4d2108;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 226, 0.94), transparent 32%),
    linear-gradient(145deg, #fff099, #efad3c 62%, #b9621d);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 234, 0.92),
    inset 0 -9px 18px rgba(116, 47, 9, 0.22),
    0 0 20px rgba(255, 208, 73, 0.48);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 2.35rem;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 246, 175, 0.6);
  transform: translateY(-8%);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  pointer-events: none;
}

.fortune-unified .fortune-core-touch {
  bottom: 13%;
  min-width: 88px;
  border-color: rgba(255, 215, 106, 0.35);
  background: rgba(5, 23, 18, 0.9);
}

.fortune-unified .fortune-core-wrap .fortune-vessel-status {
  margin-top: -4px;
}

.fortune-unified:not(.is-charging):not(.is-drawing):not(.is-opening):not(.is-revealed) .fortune-core-glyph {
  animation: none !important;
  filter: none !important;
}

.fortune-unified.is-charging .fortune-core-orbit {
  animation: fortuneCoreSpin 2.4s linear infinite !important;
}

.fortune-unified.is-charging .fortune-core-halo {
  animation: fortuneCorePulseStable 900ms ease-in-out infinite alternate !important;
}

.fortune-unified.is-charging .fortune-core-glyph {
  animation: fortuneTokenChargeStable 900ms ease-in-out infinite alternate !important;
  will-change: transform;
}

.fortune-unified.is-drawing .fortune-core-orbit,
.fortune-unified.is-opening .fortune-core-orbit {
  border-style: solid;
  border-color: rgba(255, 215, 106, 0.78);
  animation: fortuneCoreSpin 620ms linear infinite !important;
}

.fortune-unified.is-drawing .fortune-core-halo,
.fortune-unified.is-opening .fortune-core-halo {
  animation: fortuneCorePulse 420ms ease-in-out infinite alternate !important;
}

.fortune-unified.is-drawing .fortune-core-glyph {
  animation: fortuneTokenResolve 340ms ease-in-out infinite alternate !important;
}

.fortune-unified.is-opening .fortune-core-glyph {
  animation: fortuneGlyphOpening 900ms cubic-bezier(0.16, 0.86, 0.24, 1.1) both !important;
}

.fortune-unified.is-revealed .fortune-energy-core {
  animation: fortuneCoreReveal 680ms cubic-bezier(0.18, 0.88, 0.25, 1.4) both !important;
}

.fortune-unified.is-revealed .fortune-core-glyph {
  animation: fortuneGlyphReveal 680ms cubic-bezier(0.18, 0.88, 0.25, 1.28) both !important;
}

@keyframes fortuneGlyphOpening {
  0% { opacity: 1; transform: translateY(-8%) rotate(0) scale(1); }
  42% { opacity: 1; transform: translateY(-18%) rotate(-5deg) scale(1.16); box-shadow: inset 0 1px 0 rgba(255, 255, 234, 0.92), 0 0 42px rgba(255, 211, 78, 0.82); }
  100% { opacity: 0.72; transform: translateY(-8%) rotate(0) scale(0.94); }
}

@keyframes fortuneGlyphReveal {
  0% { opacity: 0.4; transform: translateY(-8%) scale(0.72) rotate(-8deg); }
  52% { opacity: 1; transform: translateY(-8%) scale(1.18) rotate(3deg); box-shadow: inset 0 1px 0 rgba(255, 255, 234, 0.92), 0 0 50px rgba(255, 211, 78, 0.9); }
  100% { opacity: 1; transform: translateY(-8%) scale(1) rotate(0); }
}

@media (max-width: 640px) {
  .sedentary-reminder-card[data-phase="alerting"] {
    min-height: 76px;
  }

  .fortune-unified .fortune-energy-core:not(.fortune-sign-button) {
    width: min(42vw, 164px) !important;
    height: min(42vw, 164px) !important;
    min-width: 138px;
    min-height: 138px;
  }

  .fortune-core-glyph {
    width: 62px;
    height: 62px;
    font-size: 2.08rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] {
    animation: sedentaryReminderPersistentReduced 1500ms ease-in-out infinite !important;
  }

  .sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"]::before,
  .sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"]::after,
  .sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] .sedentary-reminder-readout > strong,
  .sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] .sedentary-reminder-readout > button,
  .fortune-unified.is-charging .fortune-core-orbit,
  .fortune-unified.is-charging .fortune-core-halo,
  .fortune-unified.is-charging .fortune-core-glyph,
  .fortune-unified.is-drawing .fortune-core-orbit,
  .fortune-unified.is-drawing .fortune-core-halo,
  .fortune-unified.is-drawing .fortune-core-glyph,
  .fortune-unified.is-opening .fortune-core-orbit,
  .fortune-unified.is-opening .fortune-core-halo,
  .fortune-unified.is-opening .fortune-core-glyph,
  .fortune-unified.is-revealed .fortune-energy-core,
  .fortune-unified.is-revealed .fortune-core-glyph {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* FINAL current-fix authority: runs after every legacy animation and component layer. */
body.ledger-settings-open { overflow: hidden; }

/* A newly selected sign stays hidden until the opening phase begins. */
#fortuneDrawStage.is-drawing #fortuneOutcome {
  visibility: hidden !important;
  opacity: 0 !important;
  animation: none !important;
}

#fortuneDrawStage.fortune-good-hit.fortune-good-small #fortuneOutcome,
#fortuneDrawStage.fortune-good-hit.fortune-good-medium #fortuneOutcome,
#fortuneDrawStage.fortune-good-hit.fortune-good-major #fortuneOutcome {
  animation: fortuneGoodRevealNoFlash 1200ms cubic-bezier(0.16, 0.88, 0.24, 1.08) both !important;
}

#fortuneDrawStage.fortune-good-hit #fortuneAuspice {
  animation: fortuneGoodSealNoFlash 1080ms cubic-bezier(0.16, 0.9, 0.22, 1.12) both !important;
}

@keyframes fortuneGoodRevealNoFlash {
  0% { opacity: 1; transform: translateY(6px) scale(0.94); }
  42% { opacity: 1; transform: translateY(-2px) scale(1.045); }
  70% { opacity: 1; transform: translateY(0) scale(0.985); }
  100% { opacity: 1; transform: none; }
}

@keyframes fortuneGoodSealNoFlash {
  0% { opacity: 1; letter-spacing: 0.18em; transform: scale(0.82) rotate(-3deg); }
  38% { opacity: 1; letter-spacing: 0.12em; transform: scale(1.16) rotate(1deg); }
  68% { opacity: 1; transform: scale(0.96) rotate(0); }
  100% { opacity: 1; letter-spacing: 0.12em; transform: scale(1); }
}

/* Smoke-away ending followed by a soft return to the untouched ritual state. */
#fortuneDrawStage.is-disintegrating {
  position: relative;
  isolation: isolate;
}

#fortuneDrawStage.is-disintegrating::after {
  position: absolute;
  z-index: 28;
  inset: 7% -8% 3%;
  border-radius: 28%;
  background:
    radial-gradient(ellipse at 10% 78%, rgba(221, 232, 226, 0.42) 0 8%, transparent 25%),
    radial-gradient(ellipse at 28% 48%, rgba(164, 187, 176, 0.35) 0 10%, transparent 29%),
    radial-gradient(ellipse at 48% 70%, rgba(239, 243, 240, 0.44) 0 9%, transparent 27%),
    radial-gradient(ellipse at 67% 38%, rgba(174, 195, 184, 0.38) 0 10%, transparent 31%),
    radial-gradient(ellipse at 88% 65%, rgba(231, 237, 233, 0.4) 0 8%, transparent 27%);
  content: "";
  opacity: 0;
  filter: blur(13px);
  pointer-events: none;
  transform: translate3d(0, 12%, 0) scale(0.78);
  animation: fortuneSmokeVeil 1650ms ease-out both;
}

#fortuneDrawStage.is-disintegrating .fortune-result-panel,
#fortuneDrawStage.is-disintegrating #fortuneResult {
  position: relative;
  overflow: visible !important;
  pointer-events: none;
  animation: fortuneSmokeVanish 1650ms cubic-bezier(0.38, 0.02, 0.72, 0.36) both !important;
}

#fortuneDrawStage.is-disintegrating .fortune-result-panel::before,
#fortuneDrawStage.is-disintegrating .fortune-result-panel::after {
  position: absolute;
  z-index: 12;
  inset: -24% -18%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 18% 62%, rgba(226, 235, 230, 0.5) 0 8%, transparent 29%),
    radial-gradient(ellipse at 42% 38%, rgba(180, 199, 189, 0.42) 0 10%, transparent 34%),
    radial-gradient(ellipse at 70% 64%, rgba(238, 242, 238, 0.42) 0 7%, transparent 30%),
    radial-gradient(ellipse at 88% 32%, rgba(151, 176, 164, 0.34) 0 8%, transparent 27%);
  content: "";
  opacity: 0;
  filter: blur(11px);
  pointer-events: none;
  transform: translate3d(-7%, 8%, 0) scale(0.72);
  animation: fortuneSmokeCloudLeft 1650ms ease-out both;
}

#fortuneDrawStage.is-disintegrating .fortune-result-panel::after {
  background:
    radial-gradient(ellipse at 22% 34%, rgba(188, 207, 197, 0.4) 0 9%, transparent 30%),
    radial-gradient(ellipse at 50% 70%, rgba(238, 241, 238, 0.45) 0 8%, transparent 31%),
    radial-gradient(ellipse at 78% 38%, rgba(163, 185, 175, 0.38) 0 10%, transparent 33%);
  transform: translate3d(7%, 9%, 0) scale(0.68);
  animation-name: fortuneSmokeCloudRight;
}

#fortuneDrawStage.is-resetting .fortune-phase-rail,
#fortuneDrawStage.is-resetting .fortune-core-wrap,
#fortuneDrawStage.is-resetting .fortune-result-panel {
  animation: fortuneRitualReturn 760ms cubic-bezier(0.16, 0.82, 0.24, 1) both !important;
}

@keyframes fortuneSmokeVanish {
  0%, 16% { opacity: 1; filter: grayscale(0) blur(0); transform: translate3d(0, 0, 0) scale(1); }
  46% { opacity: 0.82; filter: grayscale(0.22) blur(1.6px); transform: translate3d(2px, -3px, 0) scale(0.995); }
  74% { opacity: 0.38; filter: grayscale(0.62) blur(6px); transform: translate3d(9px, -10px, 0) scale(0.97); }
  100% { opacity: 0; filter: grayscale(1) blur(15px); transform: translate3d(22px, -24px, 0) scale(0.9); }
}

@keyframes fortuneSmokeVeil {
  0%, 8% { opacity: 0; transform: translate3d(0, 12%, 0) scale(0.76); }
  32% { opacity: 0.56; }
  66% { opacity: 0.42; }
  100% { opacity: 0; filter: blur(22px); transform: translate3d(4%, -34%, 0) scale(1.46); }
}

@keyframes fortuneSmokeCloudLeft {
  0%, 10% { opacity: 0; transform: translate3d(-7%, 9%, 0) scale(0.66); }
  32% { opacity: 0.68; }
  68% { opacity: 0.44; }
  100% { opacity: 0; transform: translate3d(-24%, -28%, 0) scale(1.42); filter: blur(19px); }
}

@keyframes fortuneSmokeCloudRight {
  0%, 14% { opacity: 0; transform: translate3d(7%, 9%, 0) scale(0.64); }
  36% { opacity: 0.62; }
  70% { opacity: 0.38; }
  100% { opacity: 0; transform: translate3d(25%, -32%, 0) scale(1.5); filter: blur(20px); }
}

@keyframes fortuneRitualReturn {
  0% { opacity: 0; filter: blur(9px); transform: translate3d(0, 8px, 0) scale(0.95); }
  58% { opacity: 1; filter: blur(0.8px); transform: translate3d(0, -1px, 0) scale(1.012); }
  100% { opacity: 1; filter: none; transform: none; }
}

/* The main settings dialog has one fixed geometry and no inherited drawer scaling. */
#adminPanel.app-settings-dialog,
#adminPanel.app-settings-dialog[open] {
  position: fixed !important;
  inset: auto !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: min(640px, calc(100vw - 32px)) !important;
  height: min(760px, calc(100vh - 32px)) !important;
  height: min(760px, calc(100svh - 32px)) !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden !important;
  opacity: 1 !important;
  scale: 1 !important;
  translate: none !important;
  transform: translate3d(-50%, -50%, 0) !important;
  animation: none !important;
  transition: none !important;
  contain: layout style;
}

#adminPanel.app-settings-dialog[open] {
  display: grid !important;
}

#adminPanel.app-settings-dialog[hidden],
#adminPanel.app-settings-dialog:not([open]) {
  display: none !important;
}

#adminPanel.app-settings-dialog .app-settings-dialog-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

/* Four equal, larger lottery selectors: 七 / 福 / P / M. */
.break-game-luck .lottery-machine-head {
  align-items: stretch;
}

.break-game-luck .lottery-mode {
  display: grid !important;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px !important;
}

.break-game-luck .lottery-mode-button,
.break-game-luck .lottery-mode-button-wide {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 0 5px;
  border-radius: 7px;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  #adminPanel.app-settings-dialog,
  #adminPanel.app-settings-dialog[open] {
    width: calc(100vw - 20px) !important;
    height: calc(100vh - 20px) !important;
    height: calc(100svh - 20px) !important;
  }

  .break-game-luck .lottery-mode-button,
  .break-game-luck .lottery-mode-button-wide {
    min-height: 32px;
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #fortuneDrawStage.is-disintegrating .fortune-result-panel,
  #fortuneDrawStage.is-disintegrating #fortuneResult,
  #fortuneDrawStage.is-disintegrating::after,
  #fortuneDrawStage.is-disintegrating .fortune-result-panel::before,
  #fortuneDrawStage.is-disintegrating .fortune-result-panel::after,
  #fortuneDrawStage.is-resetting .fortune-phase-rail,
  #fortuneDrawStage.is-resetting .fortune-core-wrap,
  #fortuneDrawStage.is-resetting .fortune-result-panel {
    animation-duration: 1ms !important;
  }
}

#fortuneDrawStage.is-disintegrating #fortuneOutcome {
  filter: grayscale(1) !important;
  pointer-events: none;
}

#fortuneDrawStage.is-disintegrating #fortuneResult,
#fortuneDrawStage.is-disintegrating .fortune-result-panel {
  pointer-events: none;
  animation: fortuneSmokeVanish 1650ms cubic-bezier(0.38, 0.02, 0.72, 0.36) both !important;
}

#fortuneDrawStage.is-disintegrating #fortuneResult .fortune-oracle-copy,
#fortuneDrawStage.is-disintegrating #fortuneAuspice,
#fortuneDrawStage.is-disintegrating #fortuneOutcome > p {
  animation: fortuneReadingInkFade 900ms ease-in both !important;
}

dialog.app-settings-dialog[open] {
  scale: 1 !important;
  transform: none !important;
  animation: appSettingsStableIn 180ms ease both !important;
}

.workday-countdown-card[data-phase="alerting"] {
  cursor: pointer;
  touch-action: manipulation;
}

.lottery-digits {
  align-items: center;
  justify-content: center;
}

.lottery-reel {
  display: grid !important;
  place-items: center !important;
}

.lottery-reel-static {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  place-items: center !important;
  line-height: 1 !important;
  text-align: center !important;
}

.lottery-digits[data-mode="powerball"],
.lottery-digits[data-mode="mega"] {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

.lottery-digits[data-mode="powerball"] .lottery-reel,
.lottery-digits[data-mode="mega"] .lottery-reel {
  width: min(100%, var(--lottery-reel-height)) !important;
  height: auto !important;
  aspect-ratio: 1;
}

.fortune-unified.has-result:not(.is-charging) .fortune-energy-value {
  visibility: hidden !important;
  opacity: 0 !important;
}

.fortune-unified.is-charging .fortune-energy-value {
  visibility: visible !important;
  opacity: 1 !important;
}

.fortune-unified.is-disintegrating .fortune-outcome,
.fortune-result.is-disintegrating {
  pointer-events: none;
  animation: fortuneReadingDissolve 1150ms cubic-bezier(0.44, 0, 0.78, 0.36) both !important;
}

.fortune-result.is-disintegrating .fortune-oracle-copy,
.fortune-unified.is-disintegrating .fortune-auspice,
.fortune-unified.is-disintegrating .fortune-lingqian-slip > p {
  animation: fortuneReadingInkFade 900ms ease-in both !important;
}

.income-history-head .ledger-settings-button {
  display: inline-grid;
  min-width: 58px;
  height: 32px;
  padding: 0 13px;
  place-items: center;
  border: 1px solid rgba(82, 242, 168, 0.42);
  border-radius: 9px;
  color: #dcfff0;
  background: rgba(57, 248, 143, 0.1);
  box-shadow: inset 0 1px 0 rgba(231, 255, 244, 0.08);
  font-size: 0.66rem;
  font-weight: 950;
}

dialog.ledger-settings-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(84dvh, 760px);
  border-color: rgba(255, 215, 106, 0.5);
}

dialog.ledger-settings-dialog .ledger-days {
  max-height: none;
  overflow: visible;
}

@media (max-width: 640px) {
  dialog.ledger-settings-dialog {
    width: calc(100vw - 20px);
    max-height: 88dvh;
  }
}

/* FINAL dopamine feature authority: keep the new dialog and blossom feedback above legacy layers. */
body.virtual-shop-open { overflow: hidden; }

dialog.virtual-shop-dialog {
  width: min(920px, calc(100vw - 28px));
  max-width: 920px;
  max-height: min(88dvh, 860px);
  border-color: rgba(255, 133, 178, 0.58);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 215, 92, 0.19), transparent 28%),
    radial-gradient(circle at 95% 4%, rgba(93, 234, 195, 0.18), transparent 32%),
    linear-gradient(145deg, #251638, #121b35 56%, #102e32);
}

dialog.virtual-shop-dialog .virtual-shop-dialog-head {
  border-bottom-color: rgba(255, 151, 190, 0.28);
  background: linear-gradient(100deg, rgba(255, 102, 155, 0.14), rgba(255, 213, 91, 0.08), rgba(84, 229, 186, 0.1));
}

dialog.virtual-shop-dialog .virtual-shop-dialog-head > div > span { color: #ffdb69; }

dialog.virtual-shop-dialog .virtual-shop-dialog-body {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  max-height: calc(min(88dvh, 860px) - 104px);
  padding: 16px;
}

.fortune-celebration.is-peach { overflow: hidden; }

.fortune-celebration.is-peach .fortune-celebration-title {
  top: 37%;
  min-width: 0;
  padding: 8px 16px;
  border: 1px solid rgba(255, 232, 152, 0.62);
  color: #fff9df;
  background: linear-gradient(100deg, rgba(149, 55, 126, 0.94), rgba(255, 95, 155, 0.94));
  box-shadow: 0 10px 34px rgba(57, 11, 68, 0.34), 0 0 26px rgba(255, 118, 179, 0.28);
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  animation: peach-title-arrive 1250ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
}

.fortune-celebration.is-peach.is-medium .fortune-celebration-title { font-size: 0.9rem; }
.fortune-celebration.is-peach.is-major .fortune-celebration-title {
  min-width: 0;
  padding: 10px 19px;
  border-width: 1px;
  font-size: 1.02rem;
  animation: peach-title-arrive 1550ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
}

@media (max-width: 640px) {
  dialog.virtual-shop-dialog {
    width: calc(100vw - 16px);
    max-height: 92dvh;
    border-radius: 18px;
  }
  dialog.virtual-shop-dialog .virtual-shop-dialog-head { padding: 13px 14px; }
  dialog.virtual-shop-dialog .virtual-shop-dialog-head h2 { font-size: 0.88rem; }
  dialog.virtual-shop-dialog .virtual-shop-dialog-head p { display: none; }
  dialog.virtual-shop-dialog .virtual-shop-dialog-body {
    max-height: calc(92dvh - 76px);
    padding: 10px;
    gap: 11px;
  }
  .fortune-celebration.is-peach .fortune-celebration-title { top: 37%; font-size: 0.72rem; }
  .fortune-celebration.is-peach.is-medium .fortune-celebration-title { font-size: 0.78rem; }
  .fortune-celebration.is-peach.is-major .fortune-celebration-title { font-size: 0.88rem; }
}

/* Moonlight dopamine system: reuse the visual language of the horoscope without adding idle motion. */
body.theme-moonlight {
  --dopa-coral: #ff6f91;
  --dopa-yellow: #ffd95f;
  --dopa-mint: #54e5ba;
  --dopa-purple: #9a72ff;
  --dopa-navy: #0c1231;
  --dopa-ink: #111735;
  --dopa-shell:
    radial-gradient(circle at 4% 2%, rgba(255, 217, 95, 0.22), transparent 30%),
    radial-gradient(circle at 98% 8%, rgba(84, 229, 186, 0.2), transparent 28%),
    radial-gradient(circle at 88% 94%, rgba(255, 111, 145, 0.22), transparent 36%),
    linear-gradient(135deg, rgba(68, 25, 90, 0.98), rgba(31, 25, 77, 0.98) 48%, rgba(16, 55, 70, 0.98));
  --dopa-card: rgba(10, 16, 41, 0.62);
}

body.theme-moonlight .daily-goal-panel,
body.theme-moonlight .personal-products-panel,
body.theme-moonlight .break-game-luck,
body.theme-moonlight .break-game-fortune,
body.theme-moonlight .break-game-mini-games,
body.theme-moonlight .celebrity-panel,
body.theme-moonlight .income-history-panel.admin-calendar {
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 127, 177, 0.46) !important;
  border-radius: 20px !important;
  background: var(--dopa-shell) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 18px 48px rgba(8, 1, 28, 0.24) !important;
}

body.theme-moonlight .daily-goal-panel {
  border-left-width: 5px !important;
  border-left-color: var(--dopa-mint) !important;
}

body.theme-moonlight .daily-goal-progress-head > span,
body.theme-moonlight .daily-goal-progress-head strong,
body.theme-moonlight .personal-products-title,
body.theme-moonlight .celebrity-title,
body.theme-moonlight .income-history-head h2,
body.theme-moonlight .break-game-mini-games .break-game-head strong {
  color: #fff9ef !important;
}

body.theme-moonlight .daily-goal-progress-head > span b,
body.theme-moonlight .personal-products-head strong,
body.theme-moonlight .celebrity-purchase-head > span,
body.theme-moonlight .income-history-head .income-history-kicker,
body.theme-moonlight .break-game-mini-games .break-game-head > span {
  color: var(--dopa-yellow) !important;
}

body.theme-moonlight .income-goal-meter,
body.theme-moonlight .personal-product-progress {
  background: rgba(255, 255, 255, 0.1) !important;
}

body.theme-moonlight .income-goal-meter > i,
body.theme-moonlight .personal-product-progress > i,
body.theme-moonlight .ledger-chart-column > i {
  background: linear-gradient(90deg, var(--dopa-coral), var(--dopa-yellow), var(--dopa-mint)) !important;
  box-shadow: 0 0 12px rgba(255, 153, 142, 0.32) !important;
}

body.theme-moonlight .workday-countdowns {
  gap: 8px;
}

body.theme-moonlight .workday-countdown-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 14px !important;
  background: var(--dopa-card) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 9px 24px rgba(8, 1, 28, 0.18) !important;
}

body.theme-moonlight .workday-countdown-card:nth-child(1) { border-color: rgba(84, 229, 186, 0.42) !important; }
body.theme-moonlight .workday-countdown-card:nth-child(2) { border-color: rgba(255, 217, 95, 0.42) !important; }
body.theme-moonlight .workday-countdown-card:nth-child(3) { border-color: rgba(255, 111, 145, 0.42) !important; }

body.theme-moonlight .workday-countdown-card > span i {
  border: 1px solid rgba(255, 255, 255, 0.38) !important;
  color: #411b4b !important;
  background: linear-gradient(145deg, #fff2a8, #ff9aaf 58%, #9b76ff) !important;
  box-shadow: 0 7px 16px rgba(255, 111, 145, 0.2) !important;
}

body.theme-moonlight .workday-countdown-card:nth-child(1) > span i {
  background: linear-gradient(145deg, #d9fff2, #54e5ba 62%, #9a72ff) !important;
}

body.theme-moonlight .workday-countdown-card:nth-child(2) > span i {
  background: linear-gradient(145deg, #fff6b8, #ffd95f 62%, #ff8aa6) !important;
}

body.theme-moonlight .workday-countdown-card > span b { color: rgba(255, 249, 246, 0.82) !important; }
body.theme-moonlight .workday-countdown-card > strong { color: #fff2a8 !important; }

body.theme-moonlight .personal-products-panel,
body.theme-moonlight .break-game-luck,
body.theme-moonlight .break-game-fortune,
body.theme-moonlight .break-game-mini-games,
body.theme-moonlight .celebrity-panel,
body.theme-moonlight .income-history-panel.admin-calendar {
  padding: 15px !important;
}

body.theme-moonlight .personal-product,
body.theme-moonlight .break-game-luck .lottery-machine,
body.theme-moonlight .break-game-fortune .fortune-unified,
body.theme-moonlight .break-game-mini-games .mini-game-card,
body.theme-moonlight .celebrity-terminal,
body.theme-moonlight .celebrity-product,
body.theme-moonlight .income-history-panel .ledger-summary article,
body.theme-moonlight .income-history-panel .ledger-board {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 16px !important;
  background: var(--dopa-card) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 26px rgba(8, 1, 28, 0.16) !important;
}

body.theme-moonlight .break-game-luck .break-game-head strong,
body.theme-moonlight .break-game-fortune .break-game-head strong,
body.theme-moonlight .break-game-fortune .fortune-stage-label > span {
  color: #fff9ef !important;
}

body.theme-moonlight .break-game-luck .break-game-head > span,
body.theme-moonlight .break-game-fortune .break-game-head > span,
body.theme-moonlight .break-game-fortune .fortune-stage-label > small {
  color: var(--dopa-yellow) !important;
}

body.theme-moonlight .break-game-luck .luck-start-button {
  border-color: rgba(255, 241, 184, 0.64) !important;
  color: #411b4b !important;
  background: linear-gradient(145deg, #fff2a8, #ff9aaf 58%, #9b76ff) !important;
  box-shadow: 0 12px 28px rgba(255, 87, 153, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.58) !important;
}

body.theme-moonlight .break-game-luck .lottery-mode-button[aria-pressed="true"] {
  border-color: rgba(255, 241, 184, 0.7) !important;
  color: #3d1746 !important;
  background: linear-gradient(105deg, #ff7fa7, #ffd75e 52%, #61eac3) !important;
}

body.theme-moonlight .break-game-fortune .fortune-result-panel,
body.theme-moonlight .break-game-fortune .fortune-outcome,
body.theme-moonlight .break-game-fortune .fortune-result {
  border-color: rgba(255, 255, 255, 0.15) !important;
  background: rgba(10, 16, 41, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.theme-moonlight .break-game-fortune .fortune-interpret-button {
  border-color: rgba(255, 241, 184, 0.62) !important;
  color: #3d1746 !important;
  background: linear-gradient(105deg, #ff7fa7, #ffd75e 48%, #61eac3) !important;
}

body.theme-moonlight .personal-product:nth-child(odd),
body.theme-moonlight .break-game-mini-games .mini-game-card:first-child,
body.theme-moonlight .celebrity-product:nth-child(odd),
body.theme-moonlight .income-history-panel .ledger-summary article:nth-child(odd) {
  border-color: rgba(84, 229, 186, 0.3) !important;
}

body.theme-moonlight .personal-product:nth-child(even),
body.theme-moonlight .break-game-mini-games .mini-game-card:last-child,
body.theme-moonlight .celebrity-product:nth-child(even),
body.theme-moonlight .income-history-panel .ledger-summary article:nth-child(even) {
  border-color: rgba(255, 217, 95, 0.3) !important;
}

body.theme-moonlight .personal-product-icon {
  border: 1px solid rgba(255, 248, 205, 0.58) !important;
  color: #4f174d !important;
  background: linear-gradient(145deg, #fff5b6, #ffae7a 48%, #ff7aad) !important;
  box-shadow: 0 9px 20px rgba(255, 87, 153, 0.2) !important;
}

body.theme-moonlight .personal-products-settings,
body.theme-moonlight .celebrity-reset,
body.theme-moonlight .ledger-settings-button {
  border-color: rgba(255, 224, 124, 0.55) !important;
  color: #fff8dd !important;
  background: rgba(32, 20, 66, 0.86) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.theme-moonlight .personal-products-title > i,
body.theme-moonlight .celebrity-title > i,
body.theme-moonlight .celebrity-purchase-head > span > i {
  background: var(--dopa-coral) !important;
  box-shadow: 0 0 13px rgba(255, 111, 145, 0.56) !important;
}

body.theme-moonlight .break-game-mini-games .mini-game-card-head small { color: var(--dopa-mint) !important; }
body.theme-moonlight .break-game-mini-games .mini-game-card:last-child .mini-game-card-head small { color: var(--dopa-yellow) !important; }
body.theme-moonlight .break-game-mini-games .mini-game-card-head h3 { color: #fff5c8 !important; }
body.theme-moonlight .break-game-mini-games .mini-game-card > p { color: rgba(255, 249, 246, 0.7) !important; }
body.theme-moonlight .break-game-mini-games .mini-game-start {
  border-color: rgba(255, 241, 184, 0.58) !important;
  color: #34153f !important;
  background: linear-gradient(105deg, #ff7fa7, #ffd75e 44%, #61eac3 76%, #8b7bff) !important;
  box-shadow: 0 9px 24px rgba(15, 6, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.48) !important;
}

body.theme-moonlight .celebrity-terminal {
  border-color: rgba(84, 229, 186, 0.26) !important;
  background:
    linear-gradient(rgba(84, 229, 186, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 114, 255, 0.04) 1px, transparent 1px),
    rgba(8, 15, 39, 0.76) !important;
  background-size: 32px 32px, 32px 32px, auto !important;
}

body.theme-moonlight .celebrity-income-label { color: var(--dopa-mint) !important; }
body.theme-moonlight .celebrity-terminal-head span,
body.theme-moonlight .celebrity-terminal-head b { color: var(--dopa-yellow) !important; }
body.theme-moonlight .celebrity-money > span { color: var(--dopa-yellow) !important; }
body.theme-moonlight .celebrity-money > strong { color: #f2fff9 !important; text-shadow: 0 0 18px rgba(84, 229, 186, 0.34) !important; }

body.theme-moonlight .income-history-panel .ledger-summary article::after {
  background: linear-gradient(90deg, var(--dopa-coral), var(--dopa-yellow), var(--dopa-mint)) !important;
}

body.theme-moonlight .income-history-panel .ledger-summary strong,
body.theme-moonlight .ledger-chart-head strong { color: #fff2a8 !important; }
body.theme-moonlight .ledger-range-tabs button {
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: rgba(255, 249, 246, 0.7) !important;
  background: rgba(255, 255, 255, 0.07) !important;
}
body.theme-moonlight .ledger-range-tabs button.active,
body.theme-moonlight .ledger-range-tabs button[aria-selected="true"] {
  border-color: rgba(255, 241, 184, 0.64) !important;
  color: #3d1746 !important;
  background: linear-gradient(105deg, #ff7fa7, #ffd75e 48%, #61eac3) !important;
}

/* Performance guardrails: keep meaningful feedback, remove unseen/redundant idle loops. */
body.theme-moonlight .celebrity-panel::before,
body.theme-moonlight .celebrity-panel::after,
body.theme-moonlight .celebrity-panel.is-running .celebrity-income-core .celebrity-money,
body.theme-moonlight .celebrity-panel.is-running .celebrity-income-rings i,
body.theme-moonlight .celebrity-panel.is-running .celebrity-income-core::after {
  animation: none !important;
}

body.theme-moonlight .celebrity-panel.is-running .celebrity-income-rings i { opacity: 0.18 !important; }
body.theme-moonlight .celebrity-panel.is-running .celebrity-income-core::after { display: none !important; }

body.theme-moonlight .breathing-preview *,
body.theme-moonlight .breathing-preview *::before,
body.theme-moonlight .breathing-preview *::after,
body.theme-moonlight .worry-crusher-preview *,
body.theme-moonlight .worry-crusher-preview *::before,
body.theme-moonlight .worry-crusher-preview *::after {
  animation-play-state: paused !important;
}

@media (max-width: 640px) {
  body.theme-moonlight .daily-goal-panel,
  body.theme-moonlight .personal-products-panel,
  body.theme-moonlight .break-game-luck,
  body.theme-moonlight .break-game-fortune,
  body.theme-moonlight .break-game-mini-games,
  body.theme-moonlight .celebrity-panel,
  body.theme-moonlight .income-history-panel.admin-calendar {
    border-radius: 16px !important;
  }

  body.theme-moonlight .personal-products-panel,
  body.theme-moonlight .break-game-luck,
  body.theme-moonlight .break-game-fortune,
  body.theme-moonlight .break-game-mini-games,
  body.theme-moonlight .celebrity-panel,
  body.theme-moonlight .income-history-panel.admin-calendar {
    padding: 10px !important;
  }

  body.theme-moonlight .personal-product,
  body.theme-moonlight .break-game-luck .lottery-machine,
  body.theme-moonlight .break-game-fortune .fortune-unified,
  body.theme-moonlight .break-game-mini-games .mini-game-card,
  body.theme-moonlight .celebrity-terminal,
  body.theme-moonlight .celebrity-product,
  body.theme-moonlight .income-history-panel .ledger-summary article,
  body.theme-moonlight .income-history-panel .ledger-board {
    border-radius: 12px !important;
  }
}

/* Final stabilized moonlight surfaces: intentionally placed after legacy theme layers. */
.zodiac-orbit { animation-play-state: paused !important; }
.virtual-shop-launch::after { animation-iteration-count: 2 !important; }

dialog.virtual-shop-dialog,
body.theme-moonlight dialog.virtual-shop-dialog {
  inset: auto !important;
  top: 50% !important;
  left: 50% !important;
  height: min(88svh, 860px) !important;
  max-height: none !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
}

dialog.virtual-shop-dialog[open] { animation: virtualShopDialogFadeIn 180ms ease-out both !important; }
dialog.virtual-shop-dialog .virtual-shop-dialog-body {
  min-height: 0;
  max-height: none !important;
  overflow-x: hidden;
  overflow-y: auto;
}

body.theme-moonlight .break-game-fortune .fortune-outcome,
body.theme-moonlight .break-game-fortune .fortune-lingqian-slip {
  border-color: rgba(255, 255, 255, 0.14) !important;
  background:
    radial-gradient(circle at 85% 15%, rgba(84, 229, 186, 0.1), transparent 34%),
    rgba(8, 15, 39, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.theme-moonlight .break-game-fortune .fortune-phase-rail span.is-active i {
  border-color: rgba(255, 231, 142, 0.82) !important;
  color: #4b1b4c !important;
  background: linear-gradient(145deg, #fff2a8, #ff9aaf 58%, #9b76ff) !important;
  box-shadow: 0 0 18px rgba(255, 111, 145, 0.34) !important;
}

body.theme-moonlight .break-game-fortune .fortune-phase-rail span.is-active b { color: #ffd95f !important; }

@media (max-width: 640px) {
  dialog.virtual-shop-dialog,
  body.theme-moonlight dialog.virtual-shop-dialog {
    width: calc(100vw - 16px) !important;
    height: min(92svh, 860px) !important;
  }

  body.theme-moonlight .break-game-fortune {
    width: 100% !important;
    padding: 11px !important;
  }

  body.theme-moonlight .break-game-fortune .fortune-stage-label {
    display: grid !important;
    justify-items: start;
    gap: 3px;
  }

  body.theme-moonlight .break-game-fortune .fortune-stage-label small {
    display: block !important;
    max-width: none;
    text-align: left;
  }
}

/* EOF authority: sizing and two-column game layout must win over legacy layers. */
/* App-first report + purchase-power proportions. */
.city-report-launch {
  min-height: 76px;
  margin: 8px clamp(14px, 3vw, 36px) 12px;
  padding: 11px 13px;
  border-radius: 12px;
}
.city-report-launch > div { gap: 2px; }
.city-report-launch > div > small { font-size: 0.46rem; }
.city-report-launch > div > strong { font-size: 0.86rem; line-height: 1.18; }
.city-report-launch > div > span { font-size: 0.54rem; line-height: 1.35; }
.city-report-launch > button {
  min-width: 108px;
  min-height: 48px;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.76rem;
}
.city-report-launch > button small { font-size: 0.46rem; }

.personal-products-panel {
  padding: 8px 9px;
}
.personal-products-head {
  min-height: 30px;
  margin-bottom: 6px;
}
.personal-products-head > div { gap: 8px; }
.personal-products-title { font-size: 0.65rem; }
.personal-products-head strong { font-size: 0.72rem; }
.personal-products-settings {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  font-size: 0.72rem;
}
.personal-products { gap: 6px; }
.personal-product {
  min-height: 58px;
  padding: 6px 25px 6px 6px;
}
.personal-product-delete {
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  font-size: 0.66rem;
}
.personal-product-icon {
  width: 25px;
  height: 25px;
  font-size: 0.61rem;
}
.personal-product strong { font-size: 0.62rem; }
.personal-product small { font-size: 0.49rem; }
.personal-product-progress { height: 3px; }
body.theme-moonlight .personal-products-panel { padding: 9px !important; }

@media (max-width: 980px) {
  .city-report-launch { margin-inline: 14px; }
}

@media (max-width: 640px) {
  .city-report-launch {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px;
    gap: 8px;
    min-height: 60px;
    margin: 0 12px 8px;
    padding: 8px 9px 8px 10px;
    border-radius: 10px;
  }
  .city-report-launch::after {
    width: 150px;
    height: 150px;
  }
  .city-report-launch > div { gap: 1px; }
  .city-report-launch > div > small {
    font-size: 0.4rem;
    letter-spacing: 0.13em;
  }
  .city-report-launch > div > strong {
    font-size: 0.72rem;
    line-height: 1.15;
  }
  .city-report-launch > div > span {
    max-width: 100%;
    font-size: 0.45rem;
  }
  .city-report-launch > button {
    width: 90px;
    min-width: 90px;
    min-height: 40px;
    padding: 5px 7px;
    border-radius: 9px;
    font-size: 0.66rem;
  }
  .city-report-launch > button small { font-size: 0.42rem; }

  .personal-products-panel {
    margin: 0 12px 9px;
    padding: 5px 6px 6px;
  }
  body.theme-moonlight .personal-products-panel {
    padding: 6px !important;
    border-radius: 14px !important;
  }
  .personal-products-head {
    min-height: 22px;
    margin-bottom: 4px;
  }
  .personal-products-head > div { gap: 6px; }
  .personal-products-title { gap: 5px; font-size: 0.62rem; }
  .personal-products-title i { width: 6px; height: 6px; }
  .personal-products-head strong { font-size: 0.68rem; }
  .personal-products-settings {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
    font-size: 0.6rem;
  }
  .personal-products { gap: 4px; }
  .personal-product {
    min-height: 42px;
    grid-template-columns: 20px minmax(0, 1fr) minmax(38px, 0.58fr);
    grid-template-rows: minmax(0, 1fr) 2px;
    gap: 2px 4px;
    padding: 3px 20px 3px 4px;
  }
  .personal-product-delete {
    top: 2px;
    right: 2px;
    width: 15px;
    height: 15px;
    font-size: 0.58rem;
  }
  .personal-product-icon {
    grid-row: 1;
    width: 20px;
    height: 20px;
    font-size: 0.52rem;
  }
  .personal-product strong { font-size: 0.58rem; }
  .personal-product small { font-size: 0.44rem; }
  .personal-product > div:nth-of-type(2) {
    grid-column: 3;
    grid-row: 1;
    display: grid;
    justify-items: end;
    gap: 1px;
    text-align: right;
  }
  .personal-product-progress {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 2px;
  }
}

/* Pocket workstation theme · flat LCD pixels, lightweight by design. */
.pixel-agent-stage {
  display: none;
}

.pocket-life-station {
  display: none;
}

.theme-option-pocket {
  border-color: rgba(56, 73, 58, 0.42);
  color: #172219;
  background: #cbd4c0;
}

.theme-option-pocket small {
  color: rgba(23, 34, 25, 0.66);
}

body.theme-pocket {
  --bg: #98a68f;
  --panel: #d1d9c7;
  --panel-strong: #c5cfb9;
  --line: rgba(24, 36, 27, 0.62);
  --text: #142018;
  --muted: #536054;
  --green: #263a2a;
  --amber: #d28a22;
  --red: #9a4637;
  --blue: #425e4a;
  --ink: #111a14;
  --accent: #25382a;
  --accent-2: #d28a22;
  color-scheme: light;
  color: var(--text);
  background: #98a68f;
  font-family: "SFMono-Regular", "PingFang SC", "Microsoft YaHei", ui-monospace, monospace;
}

body.theme-pocket *,
body.theme-pocket *::before,
body.theme-pocket *::after {
  text-shadow: none;
}

body.theme-pocket .app-shell {
  background: #98a68f;
}

body.theme-pocket .hero-panel,
body.theme-pocket .admin-panel,
body.theme-pocket .income-history-panel,
body.theme-pocket dialog {
  border: 3px solid #1b281e;
  border-radius: 5px;
  color: #142018;
  background: #d1d9c7;
  box-shadow: 0 5px 0 rgba(25, 38, 28, 0.52);
  backdrop-filter: none;
}

body.theme-pocket .hero-panel {
  overflow: hidden;
}

body.theme-pocket .topbar {
  position: relative;
  z-index: 3;
  padding-top: 20px;
}

body.theme-pocket .eyebrow,
body.theme-pocket .city-report-launch > div > small,
body.theme-pocket .income-history-kicker,
body.theme-pocket .break-game-head > span,
body.theme-pocket .zodiac-horoscope-head small {
  color: #425044;
  font-family: "SFMono-Regular", ui-monospace, monospace;
  font-weight: 900;
  letter-spacing: 0.12em;
}

body.theme-pocket h1,
body.theme-pocket h2,
body.theme-pocket h3,
body.theme-pocket button,
body.theme-pocket strong {
  font-weight: 950;
}

body.theme-pocket .icon-button,
body.theme-pocket .personal-products-settings,
body.theme-pocket .celebrity-reset,
body.theme-pocket .ledger-settings-button {
  border: 2px solid #263429;
  border-radius: 4px;
  color: #17231a;
  background: #c1cbb6;
  box-shadow: 2px 2px 0 #263429;
}

body.theme-pocket .ticker-stage {
  align-content: start;
  gap: 8px;
  padding-top: 10px;
  padding-bottom: 12px;
  background: #d7decf;
}

body.theme-pocket .ticker-stage::before {
  inset: 7px 12px;
  border: 2px solid rgba(25, 38, 28, 0.72);
  border-radius: 3px;
  background: none;
  mask-image: none;
  opacity: 1;
  animation: none;
}

body.theme-pocket .scene,
body.theme-pocket .charge-coin-stream {
  display: none;
}

body.theme-pocket .pixel-agent-stage {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(620px, 92%);
  min-height: 182px;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.58fr);
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

body.theme-pocket .pixel-agent-art {
  width: 100%;
  height: 182px;
  background-image: url("./assets/pixel-task-agent.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  image-rendering: pixelated;
}

body.theme-pocket .pixel-agent-message {
  display: grid;
  min-height: 68px;
  place-items: center;
  padding: 10px 12px;
  border: 2px solid #263429;
  border-radius: 3px;
  color: #17231a;
  background: #e1e6da;
  box-shadow: 3px 3px 0 rgba(38, 52, 41, 0.5);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.55;
  text-align: center;
}

body.theme-pocket .live-label,
body.theme-pocket .ticker-stage > .live-label.is-terminal-status {
  min-height: 28px;
  margin: 0;
  padding: 4px 10px;
  border: 2px solid #263429;
  border-radius: 3px;
  color: #17231a;
  background: #c2cdb7;
  font-size: 0.66rem;
  transform: none;
}

body.theme-pocket .live-dot,
body.theme-pocket.is-running .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: #d28a22;
  box-shadow: none;
  animation: none;
}

body.theme-pocket .money-wrap {
  min-height: 92px;
}

body.theme-pocket .currency,
body.theme-pocket .money-ticker,
body.theme-pocket .money-ticker.stopwatch-ticker,
body.theme-pocket .stopwatch-digit.is-fraction {
  color: #142018;
  text-shadow: none;
}

body.theme-pocket .currency {
  color: #b87117;
}

body.theme-pocket .money-ticker {
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
}

body.theme-pocket .stopwatch-digit.is-ticking,
body.theme-pocket .stopwatch-digit.is-ticking::before {
  animation-duration: 120ms;
}

body.theme-pocket .ticker-live-income {
  border: 2px solid #263429;
  border-radius: 3px;
  background: #c5cfba;
  box-shadow: 2px 2px 0 rgba(38, 52, 41, 0.42);
}

body.theme-pocket .ticker-live-income-amount,
body.theme-pocket .ticker-live-income input {
  color: #17231a;
  background: transparent;
}

body.theme-pocket .ticker-live-income button {
  border-left: 2px solid #263429;
  border-radius: 0;
  color: #162019;
  background: #dfa13b;
  box-shadow: none;
}

body.theme-pocket .control-strip {
  gap: 8px;
  padding-bottom: 12px;
}

body.theme-pocket .control-strip > button,
body.theme-pocket .mini-game-start,
body.theme-pocket .fortune-interpret-button,
body.theme-pocket .city-report-launch > button,
body.theme-pocket .celebrity-session button {
  min-height: 48px;
  border: 2px solid #263429;
  border-radius: 3px;
  color: #17231a;
  background: #c3cdb7;
  box-shadow: 3px 3px 0 #263429;
}

body.theme-pocket .control-strip .work-toggle-button {
  background: #e0a03a;
}

body.theme-pocket .control-strip .charge-button {
  background: #b8c8a8;
}

body.theme-pocket .control-strip .reset-today-button,
body.theme-pocket .control-strip .reset-today-button:not(.is-confirming) {
  color: #17231a;
  background: #c7d0bc;
}

body.theme-pocket .control-strip .reset-today-button.is-confirming {
  color: #fff8df;
  background: #914637;
}

body.theme-pocket .daily-goal-panel,
body.theme-pocket .workday-countdown-card,
body.theme-pocket .city-report-launch,
body.theme-pocket .personal-products-panel,
body.theme-pocket .break-game,
body.theme-pocket .zodiac-horoscope,
body.theme-pocket .celebrity-panel,
body.theme-pocket .ledger-summary article,
body.theme-pocket .ledger-board {
  border: 2px solid #263429;
  border-radius: 3px;
  color: #17231a;
  background: #c6d0bb;
  box-shadow: 3px 3px 0 rgba(38, 52, 41, 0.42);
}

body.theme-pocket .daily-goal-panel {
  border-left-width: 5px;
  border-left-color: #d28a22;
}

body.theme-pocket .daily-goal-panel::before,
body.theme-pocket .daily-goal-panel::after,
body.theme-pocket .city-report-launch::after,
body.theme-pocket .celebrity-panel::before,
body.theme-pocket .celebrity-panel::after,
body.theme-pocket .break-game::before,
body.theme-pocket .break-game::after {
  display: none;
}

body.theme-pocket .daily-goal-progress-head > span,
body.theme-pocket .daily-goal-progress-head > span b,
body.theme-pocket .daily-goal-progress-head strong,
body.theme-pocket .workday-countdown-card span,
body.theme-pocket .workday-countdown-card strong,
body.theme-pocket .personal-products-title,
body.theme-pocket .personal-products-head strong,
body.theme-pocket .break-game-head strong,
body.theme-pocket .zodiac-horoscope h3,
body.theme-pocket .celebrity-title,
body.theme-pocket .income-history-panel h2 {
  color: #17231a;
}

body.theme-pocket .income-goal-meter,
body.theme-pocket .personal-product-progress,
body.theme-pocket .celebrity-tier-progress > i {
  border: 1px solid #263429;
  border-radius: 1px;
  background: #9eab96;
  box-shadow: none;
}

body.theme-pocket .income-goal-meter i,
body.theme-pocket .personal-product-progress i,
body.theme-pocket .celebrity-tier-progress > i > b {
  border-radius: 0;
  background: #d28a22;
  box-shadow: none;
}

body.theme-pocket .income-goal-stamp {
  border-color: #8e4135;
  border-radius: 2px;
  color: #8e4135;
  font-family: inherit;
}

body.theme-pocket .workday-countdown-card {
  --countdown-accent: #263b2b;
  min-height: 58px;
}

body.theme-pocket .workday-countdown-card::after {
  height: 3px;
  background: #d28a22;
}

body.theme-pocket .workday-countdown-card span i {
  border: 2px solid #263429;
  border-radius: 2px;
  color: #17231a;
  background: #e0a03a;
  box-shadow: none;
}

body.theme-pocket .workday-countdown-card small {
  color: #5a665a;
}

body.theme-pocket .timer-reminder-readout button {
  border: 2px solid #263429;
  border-radius: 2px;
  color: #fff8df;
  background: #914637;
}

body.theme-pocket .city-report-launch > div > strong,
body.theme-pocket .city-report-launch > div > span {
  color: #17231a;
}

body.theme-pocket .city-report-launch > button {
  background: #e0a03a;
}

body.theme-pocket .personal-products-panel {
  padding: 9px;
}

body.theme-pocket .personal-product {
  border: 2px solid #334235;
  border-radius: 2px;
  background: #d6ddce;
  box-shadow: none;
}

body.theme-pocket .personal-product-icon {
  border: 2px solid #263429;
  border-radius: 2px;
  color: #17231a;
  background: #e0a03a;
  box-shadow: none;
}

body.theme-pocket .personal-product strong,
body.theme-pocket .personal-product small,
body.theme-pocket .personal-products-more {
  color: #243026;
}

body.theme-pocket .personal-product-delete {
  border: 1px solid #6d332a;
  border-radius: 2px;
  color: #6d332a;
  background: #d7c4b9;
}

body.theme-pocket .break-games {
  gap: 9px;
}

body.theme-pocket .pocket-life-station {
  display: block;
  grid-column: 1 / -1;
  overflow: hidden;
  padding: 12px;
  border: 2px solid #263429;
  border-radius: 3px;
  color: #17231a;
  background: #c6d0bb;
  box-shadow: 3px 3px 0 rgba(38, 52, 41, 0.42);
}

body.theme-pocket .pocket-life-head,
body.theme-pocket .pocket-life-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

body.theme-pocket .pocket-life-head {
  margin-bottom: 9px;
  padding-bottom: 8px;
  border-bottom: 2px solid #425044;
}

body.theme-pocket .pocket-life-head small,
body.theme-pocket .pocket-life-card-head small {
  display: block;
  color: #526053;
  font-family: "SFMono-Regular", ui-monospace, monospace;
  font-size: 0.55rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

body.theme-pocket .pocket-life-head h3,
body.theme-pocket .pocket-life-card-head h4 {
  margin: 2px 0 0;
  color: #17231a;
  font-size: 1rem;
  line-height: 1.2;
}

body.theme-pocket .pocket-life-head > span,
body.theme-pocket .pocket-life-card-head > strong {
  border: 1px solid #526053;
  border-radius: 2px;
  color: #17231a;
  background: #d6ddce;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 950;
}

body.theme-pocket .pocket-life-head > span {
  padding: 5px 7px;
}

body.theme-pocket .pocket-life-card-head > strong {
  padding: 3px 6px;
  background: #e0a03a;
}

body.theme-pocket .pocket-life-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

body.theme-pocket .pocket-life-card {
  position: relative;
  min-width: 0;
  padding: 10px;
  border: 2px solid #263429;
  border-radius: 3px;
  background: #d7decf;
  box-shadow: 2px 2px 0 rgba(38, 52, 41, 0.42);
}

body.theme-pocket .pocket-life-scene {
  position: relative;
  display: grid;
  min-height: 148px;
  place-items: center;
  margin: 8px 0;
  overflow: hidden;
  border: 2px solid #3c4a3e;
  border-radius: 2px;
  background: #bdc8b4;
}

body.theme-pocket .pocket-life-scene img {
  display: block;
  max-width: 84%;
  height: 118px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: contrast(1.04) saturate(0.9);
  transform-origin: 50% 88%;
}

body.theme-pocket .pocket-garden-scene img {
  max-width: 94%;
  height: 116px;
}

body.theme-pocket .pocket-life-speech {
  position: absolute;
  right: 7px;
  bottom: 6px;
  max-width: 60%;
  padding: 4px 6px;
  border: 1px solid #263429;
  border-radius: 2px;
  color: #17231a;
  background: #e2e7dc;
  font-size: 0.54rem;
  font-weight: 900;
  line-height: 1.35;
}

body.theme-pocket .pocket-life-meters {
  display: grid;
  gap: 5px;
}

body.theme-pocket .pocket-life-meters > span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 5px;
  color: #334136;
}

body.theme-pocket .pocket-life-meters small,
body.theme-pocket .pocket-life-meters strong {
  font-size: 0.54rem;
  font-weight: 950;
}

body.theme-pocket .pocket-life-meters strong {
  color: #17231a;
  text-align: right;
}

body.theme-pocket .pocket-life-meters i {
  display: block;
  height: 8px;
  overflow: hidden;
  border: 1px solid #263429;
  border-radius: 1px;
  background: #9eab96;
}

body.theme-pocket .pocket-life-meters i b {
  display: block;
  width: 0;
  height: 100%;
  background: #d28a22;
  transition: width 320ms steps(6, end);
}

body.theme-pocket .pocket-life-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

body.theme-pocket .pocket-life-actions button {
  min-width: 0;
  min-height: 38px;
  padding: 5px 3px;
  border: 2px solid #263429;
  border-radius: 2px;
  color: #17231a;
  background: #c2cdb7;
  box-shadow: 2px 2px 0 #263429;
  font-size: 0.64rem;
  font-weight: 950;
}

body.theme-pocket .pocket-life-actions button:first-child,
body.theme-pocket .pocket-life-actions button:not(:disabled):active {
  background: #e0a03a;
}

body.theme-pocket .pocket-life-actions button:disabled {
  color: #667067;
  background: #aeb9a4;
  box-shadow: none;
}

body.theme-pocket .pocket-life-status {
  margin: 9px 0 0;
  padding: 7px 9px;
  border: 1px dashed #425044;
  color: #334136;
  background: #d6ddce;
  font-size: 0.62rem;
  font-weight: 850;
  text-align: center;
}

body.theme-pocket .pocket-life-station[data-pet-level="4"] .pocket-life-pet-art,
body.theme-pocket .pocket-life-station[data-pet-level="5"] .pocket-life-pet-art {
  transform: scale(1.06);
}

body.theme-pocket .pocket-life-station[data-garden-stage="sprout"] .pocket-life-garden-art {
  opacity: 0.72;
  clip-path: inset(42% 0 0);
}

body.theme-pocket .pocket-life-station[data-garden-stage="grow"] .pocket-life-garden-art {
  opacity: 0.84;
  clip-path: inset(24% 0 0);
}

body.theme-pocket .pocket-life-station[data-garden-stage="bloom"] .pocket-life-garden-art {
  opacity: 0.94;
  clip-path: inset(8% 0 0);
}

body.theme-pocket .pocket-life-station[data-garden-stage="harvest"] .pocket-life-garden-art {
  opacity: 1;
  filter: contrast(1.08) saturate(1.08);
}

body.theme-pocket .break-game {
  overflow: hidden;
}

body.theme-pocket .break-game-luck,
body.theme-pocket .break-game-fortune,
body.theme-pocket .break-game-mini-games {
  border-color: #263429;
  background: #c6d0bb;
}

body.theme-pocket .luck-start-button,
body.theme-pocket .lottery-machine,
body.theme-pocket .fortune-unified,
body.theme-pocket .fortune-outcome,
body.theme-pocket .fortune-result,
body.theme-pocket .mini-game-card,
body.theme-pocket .celebrity-terminal,
body.theme-pocket .celebrity-product,
body.theme-pocket .zodiac-daily-card {
  border: 2px solid #263429;
  border-radius: 3px;
  color: #17231a;
  background: #d7decf;
  box-shadow: none;
}

body.theme-pocket .luck-start-button::after,
body.theme-pocket .lottery-machine::before,
body.theme-pocket .fortune-core-orbit,
body.theme-pocket .fortune-core-halo,
body.theme-pocket .zodiac-orbit,
body.theme-pocket .celebrity-scanline,
body.theme-pocket .celebrity-income-rings,
body.theme-pocket .celebrity-income-core::after {
  display: none;
}

body.theme-pocket .luck-start-button span,
body.theme-pocket .lottery-mode-button[aria-pressed="true"],
body.theme-pocket .fortune-energy-core,
body.theme-pocket .fortune-phase-rail span.is-active i,
body.theme-pocket .mini-game-start {
  border: 2px solid #263429;
  border-radius: 2px;
  color: #17231a;
  background: #e0a03a;
  box-shadow: none;
}

body.theme-pocket .luck-start-button small,
body.theme-pocket .lottery-machine-head > small,
body.theme-pocket .fortune-stage-label > small,
body.theme-pocket .fortune-vessel-status,
body.theme-pocket .mini-game-card > p,
body.theme-pocket .zodiac-daily-card p,
body.theme-pocket .celebrity-purchase-head small {
  color: #536054;
}

body.theme-pocket .lottery-mode-button {
  border: 1px solid #526053;
  border-radius: 2px;
  color: #27342a;
  background: #bdc8b3;
}

body.theme-pocket .lottery-digits {
  border: 2px solid #263429;
  border-radius: 2px;
  background: #aebaa3;
  box-shadow: inset 2px 2px 0 rgba(38, 52, 41, 0.3);
}

body.theme-pocket .lottery-digits i {
  border: 2px solid #263429;
  border-radius: 1px;
  color: #17231a;
  background: #e0e5d9;
  box-shadow: none;
}

body.theme-pocket .lottery-machine.is-rolling,
body.theme-pocket .lottery-machine[data-mode="powerball"].is-rolling,
body.theme-pocket .lottery-machine[data-mode="mega"].is-rolling {
  animation: pocket-machine-rumble 150ms steps(2, end) infinite;
}

body.theme-pocket .lottery-machine.is-settled::after {
  content: "补给编号已锁定";
  border: 2px solid #263429;
  border-radius: 2px;
  color: #17231a;
  background: #e0a03a;
  box-shadow: 3px 3px 0 #263429;
}

body.theme-pocket .fortune-energy-core {
  background: #c3cdb7;
}

body.theme-pocket .fortune-core-glyph {
  border: 2px solid #263429;
  border-radius: 2px;
  color: #17231a;
  background: #e0a03a;
  box-shadow: none;
}

body.theme-pocket .fortune-auspice,
body.theme-pocket .fortune-result b,
body.theme-pocket .fortune-result span,
body.theme-pocket .fortune-result p,
body.theme-pocket .fortune-result em {
  color: #17231a;
}

body.theme-pocket .fortune-energy-meter {
  border: 1px solid #263429;
  border-radius: 1px;
  background: #9eab96;
}

body.theme-pocket .fortune-energy-meter i {
  border-radius: 0;
  background: #d28a22;
  box-shadow: none;
}

body.theme-pocket .zodiac-horoscope {
  background: #c6d0bb;
}

body.theme-pocket .zodiac-select-shell,
body.theme-pocket .zodiac-select-shell select,
body.theme-pocket .zodiac-lucky-note span,
body.theme-pocket .zodiac-ratings span {
  border-color: #344237;
  color: #17231a;
  background: #d7decf;
  box-shadow: none;
}

body.theme-pocket .zodiac-sign-mark {
  border: 2px solid #263429;
  border-radius: 2px;
  color: #17231a;
  background: #e0a03a;
  box-shadow: none;
}

body.theme-pocket .mini-game-card-head h3,
body.theme-pocket .mini-game-card-head small {
  color: #17231a;
}

body.theme-pocket .breathing-preview *,
body.theme-pocket .breathing-preview *::before,
body.theme-pocket .breathing-preview *::after,
body.theme-pocket .worry-crusher-preview *,
body.theme-pocket .worry-crusher-preview *::before,
body.theme-pocket .worry-crusher-preview *::after {
  animation-play-state: paused;
}

body.theme-pocket .celebrity-panel {
  border-color: #263429;
}

body.theme-pocket .celebrity-terminal {
  background-color: #c0cab5;
  background-image:
    linear-gradient(rgba(36, 52, 40, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 52, 40, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

body.theme-pocket .celebrity-money > span,
body.theme-pocket .celebrity-money > strong,
body.theme-pocket .celebrity-income-label,
body.theme-pocket .celebrity-terminal-head,
body.theme-pocket .celebrity-session,
body.theme-pocket .celebrity-tier-progress {
  color: #17231a;
}

body.theme-pocket .celebrity-panel.is-running .celebrity-income-core .celebrity-money,
body.theme-pocket .celebrity-panel.is-running .celebrity-income-rings i,
body.theme-pocket .celebrity-panel.is-running .celebrity-income-core::after {
  animation: none;
}

body.theme-pocket .ledger-range-tabs button,
body.theme-pocket .ledger-settings-button,
body.theme-pocket .city-report-actions button,
body.theme-pocket .city-report-privacy-toggle,
body.theme-pocket .spread-analytics-settings,
body.theme-pocket .spread-analytics-grid > span {
  border: 2px solid #334235;
  border-radius: 2px;
  color: #17231a;
  background: #c4ceb9;
  box-shadow: none;
}

body.theme-pocket .ledger-range-tabs button.active,
body.theme-pocket .ledger-range-tabs button[aria-selected="true"],
body.theme-pocket .city-report-actions .city-report-primary-action {
  color: #17231a;
  background: #e0a03a;
}

body.theme-pocket .city-report-canvas-shell {
  border: 2px solid #263429;
  border-radius: 3px;
  background: #aebaa3;
  box-shadow: none;
}

body.theme-pocket .city-report-canvas-shell canvas {
  border-radius: 1px;
  background: #d3dbc8;
}

body.theme-pocket .city-report-disclaimer,
body.theme-pocket .app-disclaimer {
  color: #586459;
}

body.theme-pocket dialog::backdrop {
  background: rgba(32, 45, 35, 0.62);
  backdrop-filter: none;
}

body.theme-pocket input,
body.theme-pocket select,
body.theme-pocket textarea {
  border-color: #344237;
  border-radius: 2px;
  color: #17231a;
  background: #e0e5d9;
}

body.theme-pocket .admin-theme-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.theme-pocket .theme-option {
  min-height: 58px;
  border: 2px solid #354337;
  border-radius: 3px;
  color: #17231a;
  background: #c0cab5;
  box-shadow: none;
}

body.theme-pocket .theme-option.active {
  color: #17231a;
  background: #e0a03a;
  box-shadow: 3px 3px 0 #263429;
}

@keyframes pocket-machine-rumble {
  0%, 100% { transform: translateX(-1px); }
  50% { transform: translateX(1px); }
}

@media (min-width: 981px) {
  body.theme-pocket .celebrity-panel {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
    max-width: none;
    margin: 0 32px 18px;
  }
}

@media (max-width: 640px) {
  body.theme-pocket .app-shell {
    padding: 0;
  }

  body.theme-pocket .hero-panel {
    min-height: 100vh;
    border-width: 0 0 3px;
    border-radius: 0;
    box-shadow: none;
  }

  body.theme-pocket .topbar {
    padding: 13px 12px 8px;
  }

  body.theme-pocket .eyebrow {
    margin-bottom: 3px;
    font-size: 0.48rem;
  }

  body.theme-pocket h1 {
    font-size: 1.22rem;
  }

  body.theme-pocket .top-actions {
    gap: 6px;
  }

  body.theme-pocket .icon-button {
    width: 40px;
    height: 40px;
  }

  body.theme-pocket .ticker-stage {
    gap: 4px;
    min-height: 0;
    padding: 4px 12px 8px;
  }

  body.theme-pocket .ticker-stage::before {
    inset: 2px 7px;
  }

  body.theme-pocket .pixel-agent-stage {
    width: 100%;
    min-height: 128px;
    grid-template-columns: minmax(190px, 1.45fr) minmax(105px, 0.75fr);
    gap: 4px;
    margin-top: 0;
  }

  body.theme-pocket .pixel-agent-art {
    height: 128px;
  }

  body.theme-pocket .pixel-agent-message {
    min-height: 58px;
    padding: 7px;
    font-size: 0.56rem;
    line-height: 1.5;
  }

  body.theme-pocket .live-label,
  body.theme-pocket .ticker-stage > .live-label.is-terminal-status {
    min-height: 23px;
    padding: 2px 7px;
    font-size: 0.52rem;
  }

  body.theme-pocket .money-wrap {
    min-height: 64px;
  }

  body.theme-pocket .currency {
    font-size: 1.7rem;
  }

  body.theme-pocket .money-ticker {
    font-size: var(--ticker-fit-size, 46px);
  }

  body.theme-pocket .ticker-live-income {
    min-height: 40px;
  }

  body.theme-pocket .ticker-live-income button {
    min-height: 40px;
  }

  body.theme-pocket .personal-products-settings {
    width: 36px;
    height: 36px;
  }

  body.theme-pocket .personal-product-delete {
    width: 28px;
    height: 28px;
  }

  body.theme-pocket .lottery-mode-button {
    min-height: 36px;
  }

  body.theme-pocket .control-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 3px 12px 9px;
  }

  body.theme-pocket .control-strip > button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 5px 4px;
    font-size: 0.7rem;
  }

  body.theme-pocket .daily-goal-panel {
    margin: 0 12px 8px;
    padding: 8px 9px;
  }

  body.theme-pocket .daily-goal-progress-head > span,
  body.theme-pocket .daily-goal-progress-head strong {
    font-size: 0.68rem;
  }

  body.theme-pocket .workday-countdowns {
    gap: 5px;
    margin: 0 12px 8px;
  }

  body.theme-pocket .workday-countdown-card {
    min-height: 54px;
    padding: 6px 5px;
  }

  body.theme-pocket .workday-countdown-card span {
    gap: 3px;
    font-size: 0.49rem;
  }

  body.theme-pocket .workday-countdown-card span i {
    width: 17px;
    height: 17px;
    font-size: 0.44rem;
  }

  body.theme-pocket .workday-countdown-card strong {
    font-size: 0.66rem;
  }

  body.theme-pocket .city-report-launch {
    margin: 0 12px 8px;
  }

  body.theme-pocket .personal-products-panel {
    margin: 0 12px 9px;
    padding: 6px;
  }

  body.theme-pocket .break-games {
    margin-inline: 12px;
  }

  body.theme-pocket .pocket-life-station {
    padding: 8px;
  }

  body.theme-pocket .pocket-life-head {
    margin-bottom: 6px;
    padding-bottom: 6px;
  }

  body.theme-pocket .pocket-life-head h3 {
    font-size: 0.84rem;
  }

  body.theme-pocket .pocket-life-head > span {
    max-width: 48%;
    padding: 4px 5px;
    font-size: 0.5rem;
    line-height: 1.35;
    text-align: right;
  }

  body.theme-pocket .pocket-life-grid {
    gap: 6px;
  }

  body.theme-pocket .pocket-life-card {
    padding: 7px 6px;
  }

  body.theme-pocket .pocket-life-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px;
  }

  body.theme-pocket .pocket-life-card-head h4 {
    font-size: 0.68rem;
  }

  body.theme-pocket .pocket-life-card-head small {
    font-size: 0.43rem;
  }

  body.theme-pocket .pocket-life-card-head > strong {
    padding: 2px 4px;
    font-size: 0.48rem;
  }

  body.theme-pocket .pocket-life-scene {
    min-height: 104px;
    margin: 6px 0;
  }

  body.theme-pocket .pocket-life-scene img,
  body.theme-pocket .pocket-garden-scene img {
    width: 94%;
    height: 88px;
  }

  body.theme-pocket .pocket-life-speech {
    right: 4px;
    bottom: 3px;
    max-width: 78%;
    padding: 3px 4px;
    font-size: 0.45rem;
  }

  body.theme-pocket .pocket-life-meters {
    gap: 4px;
  }

  body.theme-pocket .pocket-life-meters > span {
    grid-template-columns: 25px minmax(0, 1fr) 18px;
    gap: 3px;
  }

  body.theme-pocket .pocket-life-meters small,
  body.theme-pocket .pocket-life-meters strong {
    font-size: 0.45rem;
  }

  body.theme-pocket .pocket-life-actions {
    gap: 3px;
    margin-top: 6px;
  }

  body.theme-pocket .pocket-life-actions button {
    min-height: 36px;
    padding-inline: 1px;
    font-size: 0.54rem;
  }

  body.theme-pocket .pocket-life-status {
    margin-top: 7px;
    padding: 6px;
    font-size: 0.52rem;
    line-height: 1.45;
  }

  body.theme-pocket .break-game,
  body.theme-pocket .zodiac-horoscope,
  body.theme-pocket .celebrity-panel,
  body.theme-pocket .income-history-panel {
    border-radius: 3px;
  }

  body.theme-pocket .admin-theme-list {
    grid-template-columns: 1fr;
  }
}
dialog.city-report-dialog.city-report-dialog {
  width: min(650px, calc(100vw - 24px));
  height: auto;
  max-height: min(94svh, 920px);
  margin: auto;
}
dialog.city-report-dialog .city-report-dialog-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  max-height: calc(94svh - 96px);
  overflow-y: auto;
  padding: 14px;
}
dialog.city-report-dialog .city-report-canvas-shell {
  width: min(100%, 390px);
  margin-inline: auto;
}
@media (max-width: 640px) {
  dialog.city-report-dialog.city-report-dialog { width: calc(100vw - 16px); max-height: 94svh; }
  dialog.city-report-dialog .city-report-dialog-body { padding: 10px; }
  dialog.city-report-dialog .city-report-canvas-shell { width: min(100%, 330px); }
}
.celebrity-head-actions select { width: clamp(158px, 20vw, 220px); }
.fortune-outcome-head { justify-content: flex-end !important; }
.break-game-luck { min-height: 170px; padding: 15px; }
.break-game-luck .luck-tools { grid-template-columns: 94px minmax(0, 1fr); gap: 13px; }
.break-game-luck .luck-start-button,
.break-game-luck .lottery-machine { min-height: 122px; }
.break-game-luck .lottery-digits i { --lottery-reel-height: 44px; }
.break-game-fortune { width: min(94%, 780px); justify-self: center; padding: 9px; }
.break-game-fortune .fortune-unified { padding: 10px !important; }
.break-game-fortune .fortune-unified .fortune-stage-label { margin-bottom: 7px !important; padding-bottom: 6px !important; }
.break-game-fortune .fortune-energy-ritual,
.break-game-fortune .fortune-unified .fortune-energy-ritual { min-height: 176px; }
.break-game-fortune .fortune-unified .fortune-energy-core:not(.fortune-sign-button) {
  width: 138px !important;
  height: 138px !important;
  min-width: 138px !important;
  min-height: 138px !important;
}
.break-game-fortune .fortune-unified .fortune-result-panel { min-height: 168px; }
.break-game-mini-games .mini-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

@media (max-width: 640px) {
  .celebrity-head-actions select {
    width: min(190px, calc(100vw - 154px));
    font-size: 0.58rem;
  }
  .break-game-luck { min-height: 198px; padding: 12px; }
  .break-game-luck .luck-tools { grid-template-columns: 90px minmax(0, 1fr); gap: 9px; }
  .break-game-luck .luck-start-button,
  .break-game-luck .lottery-machine { min-height: 152px; }
  .break-game-luck .lottery-machine { padding: 9px; }
  .break-game-luck .lottery-digits { gap: 4px; padding: 5px; }
  .break-game-luck .lottery-digits i { --lottery-reel-height: 42px; }
  .break-game-fortune { width: 96%; padding: 7px; }
  .break-game-fortune .fortune-unified { padding: 8px !important; }
  .break-game-fortune .fortune-unified .fortune-stage-label {
    align-items: center;
    flex-direction: row;
    margin-bottom: 5px !important;
    padding-bottom: 5px !important;
  }
  .break-game-fortune .fortune-unified .fortune-stage-label small { display: none; }
  .break-game-fortune .fortune-energy-ritual,
  .break-game-fortune .fortune-unified .fortune-energy-ritual {
    grid-template-columns: 28px minmax(108px, 0.82fr) minmax(132px, 1.18fr) !important;
    gap: 4px;
    min-height: 164px;
  }
  .break-game-fortune .fortune-phase-rail { gap: 12px; }
  .break-game-fortune .fortune-unified .fortune-energy-core:not(.fortune-sign-button) {
    width: 116px !important;
    height: 116px !important;
    min-width: 116px !important;
    min-height: 116px !important;
  }
  .break-game-fortune .fortune-core-glyph { width: 50px; height: 50px; font-size: 1.76rem; }
  .break-game-fortune .fortune-unified .fortune-result-panel { min-height: 154px; }
  .break-game-fortune .fortune-unified .fortune-result-panel .fortune-outcome {
    grid-template-rows: auto minmax(52px, 1fr) auto auto !important;
    padding: 7px 6px 6px !important;
  }
  .break-game-fortune .fortune-unified .fortune-result {
    gap: 4px;
    margin-top: 7px !important;
    padding: 9px 10px;
  }
  .break-game-fortune .fortune-unified .fortune-result .fortune-result-head { line-height: 1; }
  .break-game-fortune .fortune-unified .fortune-result .fortune-oracle-label,
  .break-game-fortune .fortune-unified .fortune-result .fortune-sequence { font-size: 0.58rem; }
  .break-game-fortune .fortune-unified .fortune-result b { font-size: 0.8rem; line-height: 1.25; }
  .break-game-fortune .fortune-unified .fortune-result p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.61rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .break-game-fortune .fortune-unified .fortune-oracle-footer { gap: 4px; }
  .break-game-fortune .fortune-unified .fortune-oracle-footer span,
  .break-game-fortune .fortune-unified .fortune-oracle-footer em {
    font-size: 0.54rem;
    line-height: 1.3;
  }
  .break-game-fortune .fortune-unified .fortune-oracle-footer em {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .break-game-mini-games .mini-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px;
  }
  .break-game-mini-games .mini-game-card { min-height: 0 !important; padding: 8px; }
  .break-game-mini-games .mini-game-card > p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.52rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .break-game-mini-games .mini-game-card-head { display: grid; }
  .break-game-mini-games .mini-game-card-head > span {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 24px;
    margin: 0;
  }
}

/* True EOF pocket LCD override: this intentionally follows all legacy theme rules. */
body.theme-pocket .break-game-fortune .fortune-interpret-button {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #e0a03a !important;
  background-image: none !important;
  box-shadow: 2px 2px 0 #263429 !important;
}

body.theme-pocket .break-game-fortune .fortune-core-touch,
body.theme-pocket .break-game-fortune .fortune-vessel-status {
  border: 1px solid #263429 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #d6ddce !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

body.theme-pocket .celebrity-terminal .celebrity-income-core .celebrity-money,
body.theme-pocket .celebrity-panel.is-running .celebrity-terminal .celebrity-income-core .celebrity-money {
  animation: none !important;
  filter: none !important;
}

body.theme-pocket .celebrity-terminal .celebrity-income-core .celebrity-money > span,
body.theme-pocket .celebrity-terminal .celebrity-income-core .celebrity-money > strong,
body.theme-pocket .celebrity-income-label,
body.theme-pocket .celebrity-income-core > small,
body.theme-pocket .celebrity-terminal-head,
body.theme-pocket .celebrity-terminal-head *,
body.theme-pocket .celebrity-session,
body.theme-pocket .celebrity-session *,
body.theme-pocket .celebrity-tier-progress,
body.theme-pocket .celebrity-tier-progress *,
body.theme-pocket .celebrity-purchase-head,
body.theme-pocket .celebrity-purchase-head *,
body.theme-pocket .celebrity-product,
body.theme-pocket .celebrity-product * {
  color: #17231a !important;
  filter: none !important;
  text-shadow: none !important;
}

body.theme-pocket .celebrity-income-label i,
body.theme-pocket .celebrity-purchase-head i {
  border-radius: 1px !important;
  background: #d28a22 !important;
  box-shadow: none !important;
}

body.theme-pocket .celebrity-tier-progress,
body.theme-pocket .celebrity-product {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  background: #d7decf !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.theme-pocket .celebrity-tier-progress > i,
body.theme-pocket .celebrity-product-progress {
  border: 1px solid #263429 !important;
  border-radius: 1px !important;
  background: #9eab96 !important;
  box-shadow: none !important;
}

body.theme-pocket .celebrity-tier-progress > i > b,
body.theme-pocket .celebrity-product-progress i {
  border-radius: 0 !important;
  background: #d28a22 !important;
  box-shadow: none !important;
}

body.theme-pocket .celebrity-product-icon {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #e0a03a !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.theme-pocket .worry-crusher-preview .worry-target-kpi {
  border-color: #263429 !important;
  color: #17231a !important;
  background: #e0a03a !important;
  background-image: none !important;
  box-shadow: none !important;
  animation: none !important;
}

/* Unified second-layer system: stable centered dialogs across every theme. */
dialog.celebrity-settings-dialog {
  position: fixed !important;
  inset: auto !important;
  top: 50% !important;
  left: 50% !important;
  width: min(720px, calc(100vw - 28px)) !important;
  height: auto !important;
  max-width: none !important;
  max-height: min(90dvh, 880px) !important;
  margin: 0 !important;
  overflow: hidden !important;
  transform: translate(-50%, -50%) !important;
  transform-origin: center !important;
}

dialog.celebrity-settings-dialog[open] { transform: translate(-50%, -50%) !important; }
dialog.celebrity-settings-dialog .celebrity-settings-dialog-head { flex: 0 0 auto; min-height: 82px; }
dialog.celebrity-settings-dialog .celebrity-settings-dialog-body {
  max-height: calc(min(90dvh, 880px) - 82px);
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

/* Pocket home dashboard: overview first, detailed care in the second layer. */
body.theme-pocket .pocket-life-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 9px;
}

body.theme-pocket .pocket-life-dashboard > span {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid #526053;
  border-radius: 2px;
  color: #17231a;
  background: #bdc8b4;
}

body.theme-pocket .pocket-life-dashboard small { color: #526053; font-size: 0.5rem; font-weight: 900; }
body.theme-pocket .pocket-life-dashboard strong {
  color: #17231a;
  font-family: "SFMono-Regular", ui-monospace, monospace;
  font-size: 0.72rem;
}

body.theme-pocket .pocket-life-actions:has(.pocket-life-enter) { grid-template-columns: 1fr; }
body.theme-pocket .pocket-life-actions .pocket-life-enter {
  display: grid;
  width: 100%;
  min-height: 48px;
  place-items: center;
  background: #e0a03a;
}
body.theme-pocket .pocket-life-enter span,
body.theme-pocket .pocket-life-enter small { display: block; color: #17231a; }
body.theme-pocket .pocket-life-enter span { font-size: 0.68rem; }
body.theme-pocket .pocket-life-enter small { font-size: 0.46rem; opacity: 0.76; }

/* Pocket second layers share one handheld window grammar. */
body.theme-pocket dialog.celebrity-settings-dialog {
  border: 3px solid #263429 !important;
  border-radius: 3px !important;
  color: #17231a !important;
  background: #c6d0bb !important;
  background-image: none !important;
  box-shadow: 7px 7px 0 rgba(18, 28, 21, 0.7) !important;
  animation: pocket-dialog-in 180ms steps(3, end) both !important;
}

body.theme-pocket dialog.celebrity-settings-dialog::backdrop {
  background: rgba(25, 36, 28, 0.72) !important;
  backdrop-filter: none !important;
}

body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-head {
  padding: 14px 16px 12px !important;
  border-bottom: 3px double #263429 !important;
  color: #17231a !important;
  background: #bdc8b4 !important;
  background-image: none !important;
}

body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-head span,
body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-head h2,
body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-head p {
  color: #17231a !important;
  text-shadow: none !important;
}
body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-head span {
  color: #526053 !important;
  font-family: "SFMono-Regular", ui-monospace, monospace;
}
body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-head p { color: #4d5b4f !important; }
body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-close {
  min-width: 58px;
  height: 38px;
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #e0a03a !important;
  box-shadow: 2px 2px 0 #263429 !important;
}
body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-body {
  gap: 10px !important;
  padding: 13px !important;
  color: #17231a !important;
  background: #c6d0bb !important;
  background-image: none !important;
}

body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-body > section,
body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-body > form,
body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-body > label,
body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-body > .celebrity-custom-lock,
body.theme-pocket dialog.celebrity-settings-dialog .ledger-day-row,
body.theme-pocket dialog.celebrity-settings-dialog .city-report-privacy-toggle {
  border: 2px solid #344237 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #d7decf !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.theme-pocket dialog.celebrity-settings-dialog input,
body.theme-pocket dialog.celebrity-settings-dialog select,
body.theme-pocket dialog.celebrity-settings-dialog textarea,
body.theme-pocket dialog.celebrity-settings-dialog .celebrity-period-fixed > strong {
  min-height: 42px;
  border: 2px solid #526053 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #e4e9df !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.theme-pocket dialog.celebrity-settings-dialog button:not(.celebrity-settings-close):not([role="tab"]) {
  border: 2px solid #263429;
  border-radius: 2px;
  color: #17231a;
  background: #c1ccb6;
  background-image: none;
  box-shadow: 2px 2px 0 #263429;
}
body.theme-pocket dialog.celebrity-settings-dialog button:focus-visible {
  outline: 3px solid #914637 !important;
  outline-offset: 2px;
}
body.theme-pocket dialog.app-settings-dialog .app-title-setting,
body.theme-pocket dialog.app-settings-dialog .daily-income-goal-setting,
body.theme-pocket dialog.app-settings-dialog .income-calendar-settings,
body.theme-pocket dialog.app-settings-dialog .workday-countdown-settings,
body.theme-pocket dialog.app-settings-dialog .admin-moods,
body.theme-pocket dialog.app-settings-dialog .auto-click-settings,
body.theme-pocket dialog.app-settings-dialog .spread-analytics-settings { padding: 11px !important; }
body.theme-pocket dialog.app-settings-dialog .source-editor,
body.theme-pocket dialog.app-settings-dialog .countdown-editor,
body.theme-pocket dialog.ledger-settings-dialog .ledger-days,
body.theme-pocket dialog.celebrity-settings-dialog .celebrity-product-editor {
  padding: 8px;
  border: 1px dashed #526053;
  background: #c5cfba;
}

@keyframes pocket-dialog-in {
  from { opacity: 0; clip-path: inset(48% 0); }
  to { opacity: 1; clip-path: inset(0); }
}

/* Pocket life detail dialog. */
body.theme-pocket dialog.pocket-life-dialog { width: min(760px, calc(100vw - 20px)) !important; }
body.theme-pocket dialog.pocket-life-dialog[open] {
  display: flex;
  flex-direction: column;
}
body.theme-pocket .pocket-life-dialog-body { display: grid; gap: 10px; }
body.theme-pocket .pocket-life-resource-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
body.theme-pocket .pocket-life-resource-bar > span {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 9px;
  border: 2px solid #344237;
  background: #bdc8b4;
}
body.theme-pocket .pocket-life-resource-bar small,
body.theme-pocket .pocket-life-resource-bar em {
  color: #526053;
  font-size: 0.5rem;
  font-style: normal;
  font-weight: 850;
}
body.theme-pocket .pocket-life-resource-bar strong {
  color: #17231a;
  font-family: "SFMono-Regular", ui-monospace, monospace;
  font-size: 0.86rem;
}
body.theme-pocket .pocket-life-resource-bar i {
  display: block;
  height: 7px;
  overflow: hidden;
  border: 1px solid #263429;
  background: #9eab96;
}
body.theme-pocket .pocket-life-resource-bar i b { display: block; height: 100%; background: #d28a22; }
body.theme-pocket .pocket-life-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
body.theme-pocket .pocket-life-tabs button {
  min-height: 44px;
  border: 2px solid #263429;
  border-radius: 2px;
  color: #17231a;
  background: #aebaa3;
  font-weight: 950;
}
body.theme-pocket .pocket-life-tabs button[aria-selected="true"] {
  background: #e0a03a;
  box-shadow: inset 0 -4px 0 rgba(115, 69, 13, 0.18);
}
body.theme-pocket .pocket-life-detail-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(190px, 0.75fr);
  gap: 9px;
  padding: 10px;
}
body.theme-pocket .pocket-life-detail-panel[hidden] { display: none !important; }
body.theme-pocket .pocket-life-detail-scene {
  position: relative;
  display: grid;
  grid-row: span 2;
  min-height: 280px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #344237;
  background: #bdc8b4;
}
body.theme-pocket .pocket-life-detail-title {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  left: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1px 8px;
}
body.theme-pocket .pocket-life-detail-title small {
  grid-column: 1 / -1;
  color: #526053;
  font-family: "SFMono-Regular", ui-monospace, monospace;
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}
body.theme-pocket .pocket-life-detail-title strong,
body.theme-pocket .pocket-life-detail-title span { color: #17231a; }
body.theme-pocket .pocket-life-detail-title span {
  padding: 3px 5px;
  border: 1px solid #263429;
  background: #e0a03a;
  font-size: 0.54rem;
  font-weight: 950;
}
body.theme-pocket .pocket-life-detail-scene img {
  width: min(88%, 330px);
  max-height: 220px;
  object-fit: contain;
  image-rendering: pixelated;
}
body.theme-pocket .pocket-life-detail-scene > p {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  margin: 0;
  padding: 7px;
  border: 1px solid #263429;
  color: #17231a;
  background: #e4e9df;
  font-size: 0.62rem;
  font-weight: 900;
  text-align: center;
}
body.theme-pocket .pocket-life-detail-meters { display: grid; align-content: start; gap: 7px; }
body.theme-pocket .pocket-life-detail-meters > span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 5px;
}
body.theme-pocket .pocket-life-detail-meters small,
body.theme-pocket .pocket-life-detail-meters strong { color: #17231a; font-size: 0.55rem; }
body.theme-pocket .pocket-life-detail-meters i {
  height: 9px;
  overflow: hidden;
  border: 1px solid #263429;
  background: #9eab96;
}
body.theme-pocket .pocket-life-detail-meters i b {
  display: block;
  height: 100%;
  background: #d28a22;
  transition: width 280ms steps(5, end);
}
body.theme-pocket .pocket-life-detail-actions { display: grid; align-content: end; gap: 6px; }
body.theme-pocket .pocket-life-detail-actions button {
  display: grid;
  min-height: 52px;
  align-content: center;
  gap: 2px;
  padding: 7px 9px;
  text-align: left;
}
body.theme-pocket .pocket-life-detail-actions button:first-child { background: #e0a03a !important; }
body.theme-pocket .pocket-life-detail-actions button:disabled {
  color: #687269 !important;
  background: #aeb9a4 !important;
  box-shadow: none !important;
}
body.theme-pocket .pocket-life-detail-actions button span { font-size: 0.66rem; font-weight: 950; }
body.theme-pocket .pocket-life-detail-actions button small { color: inherit; font-size: 0.48rem; opacity: 0.74; }
body.theme-pocket .pocket-life-daily-card { padding: 10px; }
body.theme-pocket .pocket-life-daily-card header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
body.theme-pocket .pocket-life-daily-card header small,
body.theme-pocket .pocket-life-daily-card header strong { color: #526053; font-size: 0.5rem; }
body.theme-pocket .pocket-life-daily-card h3 { margin: 2px 0 0; color: #17231a; font-size: 0.82rem; }
body.theme-pocket .pocket-life-daily-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
body.theme-pocket .pocket-life-daily-list > span {
  display: grid;
  gap: 3px;
  padding: 7px;
  border: 1px solid #526053;
  background: #bdc8b4;
}
body.theme-pocket .pocket-life-daily-list > span.is-complete { background: #e0a03a; }
body.theme-pocket .pocket-life-daily-list b,
body.theme-pocket .pocket-life-daily-list small { color: #17231a; font-size: 0.5rem; }
body.theme-pocket .pocket-life-dialog-status {
  margin: 0;
  padding: 8px 10px;
  border: 1px dashed #526053;
  color: #334136;
  background: #d6ddce;
  font-size: 0.6rem;
  font-weight: 850;
  text-align: center;
}

@media (max-width: 640px) {
  dialog.celebrity-settings-dialog { width: calc(100vw - 14px) !important; max-height: 92dvh !important; }
  dialog.celebrity-settings-dialog .celebrity-settings-dialog-body { max-height: calc(92dvh - 78px); }
  body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-head {
    min-height: 78px;
    padding: 11px 10px 9px !important;
  }
  body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-head p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  body.theme-pocket .pocket-life-dashboard { gap: 4px; }
  body.theme-pocket .pocket-life-dashboard > span { padding: 6px; }
  body.theme-pocket .pocket-life-resource-bar { gap: 4px; }
  body.theme-pocket .pocket-life-resource-bar > span { padding: 7px 5px; }
  body.theme-pocket .pocket-life-detail-panel { grid-template-columns: 1fr; padding: 7px; }
  body.theme-pocket .pocket-life-detail-scene { grid-row: auto; min-height: 220px; }
  body.theme-pocket .pocket-life-detail-scene img { max-height: 166px; }
  body.theme-pocket .pocket-life-detail-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.theme-pocket .pocket-life-detail-actions button { min-height: 58px; padding: 6px; text-align: center; }
  body.theme-pocket .pocket-life-daily-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-pocket dialog.celebrity-settings-dialog { animation-duration: 1ms !important; }
}

/* Pocket motion system v2: one stepped language, visible feedback, restrained idle cost. */
body.theme-pocket {
  --pocket-motion-fast: 180ms;
  --pocket-motion-medium: 360ms;
  --pocket-motion-idle: 5.2s;
  --pocket-motion-step: steps(2, end);
}

body.theme-pocket .pixel-agent-art {
  transform-origin: 50% 92%;
  animation: pocket-agent-idle-v2 var(--pocket-motion-idle) steps(1, end) infinite;
}

body.theme-pocket.is-running .pixel-agent-art {
  animation: pocket-agent-working-v2 920ms steps(2, end) infinite;
}

body.theme-pocket.is-charging .pixel-agent-art {
  animation: pocket-agent-charge-v2 180ms steps(2, end) infinite;
}

body.theme-pocket.is-holiday .pixel-agent-art {
  animation-play-state: paused;
}

body.theme-pocket .pocket-life-pet-art,
body.theme-pocket #pocketPetDialogArt {
  --pocket-pet-scale: 1;
  transform-origin: 50% 88%;
  animation: pocket-pet-idle-v2 4.8s steps(1, end) infinite;
}

body.theme-pocket .pocket-life-garden-art,
body.theme-pocket #pocketGardenDialogArt {
  transform-origin: 50% 92%;
  animation: pocket-garden-idle-v2 6.2s steps(1, end) infinite;
}

body.theme-pocket .pocket-life-station[data-pet-level="4"] .pocket-life-pet-art,
body.theme-pocket .pocket-life-station[data-pet-level="5"] .pocket-life-pet-art,
body.theme-pocket .pocket-life-dialog[data-pet-level="4"] #pocketPetDialogArt,
body.theme-pocket .pocket-life-dialog[data-pet-level="5"] #pocketPetDialogArt {
  --pocket-pet-scale: 1.06;
  transform: none;
}

body.theme-pocket .pocket-pet-card.is-cared .pocket-life-pet-art,
body.theme-pocket .pocket-pet-detail-scene.is-cared #pocketPetDialogArt {
  animation: pocket-pet-care-v2 720ms steps(6, end) both;
}

body.theme-pocket .pocket-garden-card.is-cared .pocket-life-garden-art,
body.theme-pocket .pocket-garden-detail-scene.is-cared #pocketGardenDialogArt {
  animation: pocket-garden-care-v2 720ms steps(5, end) both;
}

body.theme-pocket .pocket-garden-card.is-harvested .pocket-life-garden-art,
body.theme-pocket .pocket-garden-detail-scene.is-harvested #pocketGardenDialogArt {
  animation: pocket-garden-harvest-v2 760ms steps(6, end) both;
}

body.theme-pocket .pocket-life-card.is-work-reward .pocket-life-scene,
body.theme-pocket .pocket-life-detail-scene.is-work-reward {
  animation: pocket-life-reward-v2 700ms steps(4, end);
}

body.theme-pocket .pocket-life-detail-panel.is-active {
  animation: pocket-panel-open-v2 var(--pocket-motion-fast) steps(3, end) both;
}

body.theme-pocket .pocket-life-daily-list > span.is-complete {
  animation: pocket-task-complete-v2 var(--pocket-motion-medium) steps(3, end) both;
}

body.theme-pocket.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"],
body.theme-pocket .workday-countdown-card[data-phase="alerting"] {
  border-color: #263429 !important;
  background: #e4b759 !important;
  background-image: none !important;
  box-shadow: 3px 3px 0 #263429 !important;
  filter: none !important;
  transform: none;
  animation: pocket-alert-v2 720ms steps(2, end) infinite !important;
}

body.theme-pocket.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"]::before,
body.theme-pocket.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"]::after {
  display: none !important;
  animation: none !important;
}

body.theme-pocket.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] .sedentary-reminder-readout > strong,
body.theme-pocket.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] .sedentary-reminder-readout > button,
body.theme-pocket.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] > span i {
  color: #17231a !important;
  text-shadow: none !important;
  filter: none !important;
  animation: none !important;
}

body.theme-pocket .pocket-life-scene,
body.theme-pocket .pocket-life-detail-scene,
body.theme-pocket .pixel-agent-stage {
  contain: paint;
}

body.theme-pocket.pocket-life-dialog-open .pixel-agent-art,
body.theme-pocket.pocket-life-dialog-open .pocket-life-station .pocket-life-scene img {
  animation-play-state: paused !important;
}

body.theme-pocket .control-strip > button:not(:disabled):active,
body.theme-pocket .city-report-launch button:not(:disabled):active,
body.theme-pocket .pocket-life-actions button:not(:disabled):active,
body.theme-pocket .pocket-life-detail-actions button:not(:disabled):active,
body.theme-pocket .pocket-life-tabs button:not(:disabled):active,
body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-close:active {
  transform: translate(2px, 2px) !important;
  box-shadow: none !important;
}

@keyframes pocket-agent-idle-v2 {
  0%, 68%, 100% { transform: translate3d(0, 0, 0); }
  72% { transform: translate3d(0, -2px, 0); }
  76% { transform: translate3d(0, 0, 0); }
  82% { transform: translate3d(1px, -1px, 0); }
  86% { transform: translate3d(0, 0, 0); }
}

@keyframes pocket-agent-working-v2 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-1px, -2px, 0); }
  50% { transform: translate3d(0, 0, 0); }
  75% { transform: translate3d(1px, -1px, 0); }
}

@keyframes pocket-agent-charge-v2 {
  0%, 100% { transform: translate3d(-2px, 0, 0); }
  50% { transform: translate3d(2px, -1px, 0); }
}

@keyframes pocket-pet-idle-v2 {
  0%, 62%, 100% { transform: translate3d(0, 0, 0) scale(var(--pocket-pet-scale)); }
  68% { transform: translate3d(0, -2px, 0) scale(var(--pocket-pet-scale)); }
  73% { transform: translate3d(0, 0, 0) scale(var(--pocket-pet-scale)); }
  80% { transform: translate3d(1px, -1px, 0) scale(var(--pocket-pet-scale)); }
  85% { transform: translate3d(0, 0, 0) scale(var(--pocket-pet-scale)); }
}

@keyframes pocket-pet-care-v2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(var(--pocket-pet-scale)); }
  18% { transform: translate3d(-2px, -5px, 0) scale(calc(var(--pocket-pet-scale) * 1.03)); }
  36% { transform: translate3d(2px, -1px, 0) scale(calc(var(--pocket-pet-scale) * 0.99)); }
  54% { transform: translate3d(-1px, -4px, 0) scale(calc(var(--pocket-pet-scale) * 1.02)); }
  72% { transform: translate3d(1px, 0, 0) scale(var(--pocket-pet-scale)); }
}

@keyframes pocket-garden-idle-v2 {
  0%, 64%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  70% { transform: translate3d(-1px, 0, 0) rotate(-0.45deg); }
  78% { transform: translate3d(1px, -1px, 0) rotate(0.45deg); }
  86% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

@keyframes pocket-garden-care-v2 {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  22% { transform: translate3d(-2px, -2px, 0) rotate(-1deg); }
  44% { transform: translate3d(2px, 0, 0) rotate(1deg); }
  66% { transform: translate3d(-1px, -1px, 0) rotate(-0.5deg); }
}

@keyframes pocket-garden-harvest-v2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  20% { transform: translate3d(0, -7px, 0) scale(1.05); }
  40% { transform: translate3d(-3px, -2px, 0) scale(0.99); }
  60% { transform: translate3d(3px, -5px, 0) scale(1.03); }
  80% { transform: translate3d(0, 1px, 0) scale(0.99); }
}

@keyframes pocket-life-reward-v2 {
  0%, 100% { background-color: #bdc8b4; }
  35%, 65% { background-color: #e0c178; }
}

@keyframes pocket-alert-v2 {
  0%, 100% { background-color: #e4b759; outline: 0 solid #263429; }
  50% { background-color: #f1ce72; outline: 3px solid #914637; }
}

@keyframes pocket-panel-open-v2 {
  from { opacity: 0; clip-path: inset(0 50%); }
  to { opacity: 1; clip-path: inset(0); }
}

@keyframes pocket-task-complete-v2 {
  from { transform: translateY(2px); background-color: #bdc8b4; }
  to { transform: translateY(0); background-color: #e0a03a; }
}

@media (max-width: 640px) {
  body.theme-pocket { --pocket-motion-idle: 6.4s; }
  body.theme-pocket .pocket-life-pet-art,
  body.theme-pocket #pocketPetDialogArt { animation-duration: 5.8s; }
  body.theme-pocket .pocket-life-garden-art,
  body.theme-pocket #pocketGardenDialogArt { animation-duration: 7.2s; }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-pocket .pixel-agent-art,
  body.theme-pocket .pocket-life-pet-art,
  body.theme-pocket #pocketPetDialogArt,
  body.theme-pocket .pocket-life-garden-art,
  body.theme-pocket #pocketGardenDialogArt,
  body.theme-pocket .pocket-life-detail-panel.is-active,
  body.theme-pocket .pocket-life-daily-list > span.is-complete,
  body.theme-pocket .lottery-machine.is-rolling,
  body.theme-pocket .lottery-machine[data-mode="powerball"].is-rolling,
  body.theme-pocket .lottery-machine[data-mode="mega"].is-rolling,
  body.theme-pocket.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"],
  body.theme-pocket .workday-countdown-card[data-phase="alerting"],
  body.theme-pocket .pocket-life-card.is-work-reward .pocket-life-scene,
  body.theme-pocket .pocket-life-detail-scene.is-work-reward {
    animation: none !important;
  }

  body.theme-pocket .pixel-agent-art,
  body.theme-pocket .pocket-life-scene img,
  body.theme-pocket .pocket-life-detail-scene img {
    transform: none !important;
  }
}

/* True EOF pixel completion: overrides late legacy rules. */
body.theme-pocket :is(.icon-button, .personal-products-settings, .celebrity-reset, .ticker-live-income-amount, .celebrity-money) {
  border-radius: 2px !important;
}

body.theme-pocket :is(#soundButton > span, #adminToggle > span, #personalTargetSettingsButton, #celebrityProductSettingsButton) {
  font-family: "SFMono-Regular", "PingFang SC", ui-monospace, monospace !important;
  font-size: 0.74rem !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-art {
  will-change: transform;
  animation: pocket-agent-keytap-final 920ms steps(6, end) both !important;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-message {
  animation: pocket-agent-message-final 920ms steps(2, end) both !important;
}

body.theme-pocket :is(
  .lottery-reel,
  .lottery-reel.is-special,
  .lottery-digits[data-mode="powerball"] .lottery-reel,
  .lottery-digits[data-mode="mega"] .lottery-reel
) {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #e0e5d9 !important;
  background-image: none !important;
  box-shadow: 2px 2px 0 rgba(38, 52, 41, 0.38) !important;
  filter: none !important;
}

body.theme-pocket :is(
  .lottery-reel.is-special,
  .lottery-digits[data-mode="powerball"] .lottery-reel.is-special,
  .lottery-digits[data-mode="mega"] .lottery-reel.is-special
) { background: #e0a03a !important; }

body.theme-pocket :is(#fortuneDrawnMark, .fortune-interpret-orbit, .fortune-phase-rail span i) {
  border-radius: 2px !important;
  filter: none !important;
  box-shadow: none !important;
}

body.theme-pocket .celebrity-terminal .celebrity-income-core .celebrity-money,
body.theme-pocket .celebrity-panel.is-running .celebrity-terminal .celebrity-income-core .celebrity-money {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  padding: 8px 10px !important;
  background: #bdc8b4 !important;
  background-image: none !important;
  box-shadow: inset 2px 2px 0 rgba(38, 52, 41, 0.2) !important;
}

body.theme-pocket :is(.celebrity-ticker-character, .celebrity-ticker-character.is-changing, .celebrity-panel.is-running .celebrity-money strong) {
  filter: none !important;
  text-shadow: none !important;
}

body.theme-pocket .celebrity-ticker-character.is-changing {
  animation: pocket-digit-tick-final 160ms steps(3, end) both !important;
}

body.theme-pocket .celebrity-income-core { min-height: 148px !important; padding-block: 10px !important; }

body.theme-pocket :is(.celebrity-milestone-fx, .reward-toast, #chargeGain, #comboBurst) {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #e0a03a !important;
  background-image: none !important;
  box-shadow: 4px 4px 0 #263429 !important;
  filter: none !important;
  text-shadow: none !important;
}

body.theme-pocket :is(.celebrity-milestone-fx, .reward-toast)::before,
body.theme-pocket :is(.celebrity-milestone-fx, .reward-toast)::after { display: none !important; }

body.theme-pocket .ledger-chart-column > i,
body.theme-pocket .ledger-chart-column > i::before,
body.theme-pocket .ledger-chart-column > i::after {
  border-radius: 0 !important;
  background: #d28a22 !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.theme-pocket dialog.app-settings-dialog :is(
  .source-row,
  .income-daily-target,
  .income-progress,
  .daily-income-goal-setting > div,
  .income-calendar-settings,
  .income-proration-setting,
  .custom-holiday-form,
  .custom-holiday-list > span,
  .workday-countdown-settings,
  .countdown-setting-row,
  .sedentary-reminder-setting,
  .auto-click-settings,
  .spread-analytics-settings,
  .spread-analytics-grid > span
) {
  border-color: #526053 !important;
  border-radius: 2px !important;
  color: #17231a !important;
  background: #bdc8b4 !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.theme-pocket dialog.app-settings-dialog .source-row:is(.is-active, .is-paused) {
  border-color: #263429 !important;
  box-shadow: inset 4px 0 0 #e0a03a !important;
}

body.theme-pocket dialog.app-settings-dialog :is(.countdown-toggle-control i, .sedentary-reminder-setting > i, .auto-click-switch span),
body.theme-pocket .city-report-privacy-toggle > i {
  border: 2px solid #263429 !important;
  border-radius: 2px !important;
  background: #9eab96 !important;
  background-image: none !important;
  box-shadow: none !important;
  transition: background 160ms steps(2, end) !important;
}

body.theme-pocket dialog.app-settings-dialog :is(.countdown-toggle-control i::after, .sedentary-reminder-setting > i::after, .auto-click-switch span::after),
body.theme-pocket .city-report-privacy-toggle > i::after {
  border-radius: 1px !important;
  background: #e0e5d9 !important;
  box-shadow: none !important;
  transition: transform 160ms steps(2, end), left 160ms steps(2, end) !important;
}

body.theme-pocket dialog.app-settings-dialog :is(.countdown-toggle-control input:checked + i, .sedentary-reminder-setting input:checked + i, .auto-click-switch input:checked + span),
body.theme-pocket .city-report-privacy-toggle input:checked + i { background: #e0a03a !important; }

@media (min-width: 981px) {
  body.theme-pocket .ticker-stage {
    grid-template-columns: minmax(520px, 1.15fr) minmax(360px, 0.85fr) !important;
    grid-template-areas: "agent status" "agent money" "agent entry" !important;
    grid-template-rows: auto minmax(92px, auto) auto !important;
    column-gap: clamp(28px, 5vw, 78px) !important;
    row-gap: 7px !important;
    min-height: 286px !important;
    padding: 14px clamp(38px, 6vw, 92px) 18px !important;
  }

  body.theme-pocket .pixel-agent-stage {
    grid-area: agent;
    width: 100% !important;
    max-width: 720px;
    min-height: 210px !important;
    grid-template-columns: minmax(320px, 1fr) minmax(170px, 0.5fr) !important;
  }

  body.theme-pocket .pixel-agent-art { height: 210px !important; }
  body.theme-pocket .ticker-stage > .live-label { grid-area: status; align-self: end; }
  body.theme-pocket .money-wrap { grid-area: money; min-height: 92px !important; }
  body.theme-pocket .per-second { grid-area: entry; align-self: start; }
}

@media (max-width: 640px) {
  body.theme-pocket .ticker-stage { padding-bottom: 6px !important; }
  body.theme-pocket .pixel-agent-stage { min-height: 118px !important; }
  body.theme-pocket .pixel-agent-art { height: 118px !important; }
  body.theme-pocket .pixel-agent-message { min-height: 52px !important; padding: 6px !important; }
  body.theme-pocket .money-wrap { min-height: 58px !important; }
  body.theme-pocket .control-strip > button { min-height: 46px !important; }
  body.theme-pocket .city-report-launch { padding: 8px 9px !important; }
  body.theme-pocket .personal-products-panel { padding: 6px !important; }
  body.theme-pocket .pocket-life-scene { min-height: 98px !important; }
  body.theme-pocket .pocket-life-scene img,
  body.theme-pocket .pocket-garden-scene img { height: 82px !important; }
  body.theme-pocket .break-game-mini-games :is(.breathing-preview, .worry-crusher-preview) { height: 106px !important; }
  body.theme-pocket .break-game-mini-games .mini-game-start { min-height: 42px !important; }
  body.theme-pocket .celebrity-income-core { min-height: 132px !important; padding-block: 8px !important; }
  body.theme-pocket dialog.app-settings-dialog .celebrity-settings-dialog-body { gap: 8px !important; padding: 10px !important; }
  body.theme-pocket dialog.app-settings-dialog :is(.app-title-setting, .daily-income-goal-setting, .income-calendar-settings, .workday-countdown-settings, .admin-moods, .auto-click-settings, .spread-analytics-settings) { padding: 8px !important; }
}

@keyframes pocket-agent-keytap-final {
  0%, 100% { transform: translate3d(0, 0, 0); }
  14% { transform: translate3d(-1px, 0, 0); }
  28% { transform: translate3d(-1px, 2px, 0); }
  42% { transform: translate3d(0, 0, 0); }
  56% { transform: translate3d(1px, 0, 0); }
  70% { transform: translate3d(1px, 2px, 0); }
  84% { transform: translate3d(0, 0, 0); }
}

@keyframes pocket-agent-message-final {
  0%, 100% { background-color: #e1e6da; }
  35%, 72% { background-color: #e0c178; }
}

@keyframes pocket-digit-tick-final {
  0% { transform: translateY(-2px); }
  50% { transform: translateY(1px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-art,
  body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-message,
  body.theme-pocket .celebrity-ticker-character.is-changing {
    animation: none !important;
    transform: none !important;
  }
}

/* True EOF readability guard: keep late legacy rules from shrinking text or cards. */
body.theme-pocket .app-shell :is(small, .pocket-life-status) {
  color: #344438 !important;
  font-size: clamp(0.64rem, 1.5vw, 0.74rem) !important;
  line-height: 1.4 !important;
}

body.theme-pocket .daily-goal-progress-head :is(span, b, strong) {
  color: #27372b !important;
  text-shadow: none !important;
}

body.theme-pocket #incomeGoalTargetAmount,
body.theme-pocket #todayIncomeGoalPercent {
  color: #7b4a12 !important;
}

body.theme-pocket :is(
  #reactionBestLabel,
  #bubbleBestLabel,
  #celebrityTierTime,
  #pocketLifeWorkBonus,
  #runningLabel,
  #zodiacLuckyColor,
  #zodiacLuckyNumber,
  #zodiacKeyword,
  .city-report-launch > div > span,
  .fortune-phase-rail i,
  .zodiac-ratings b,
  .zodiac-ratings strong,
  .zodiac-ratings em,
  .personal-product-icon,
  .app-disclaimer
) {
  color: #223126 !important;
  font-size: clamp(0.64rem, 1.5vw, 0.74rem) !important;
  line-height: 1.35 !important;
}

body.theme-pocket .workday-countdown-card :is(span, b, strong, small, button) {
  color: #17231a !important;
  font-size: clamp(0.64rem, 1.55vw, 0.78rem) !important;
  text-shadow: none !important;
}

body.theme-pocket .workday-countdown-card span i {
  color: #17231a !important;
  font-size: 0.64rem !important;
}

body.theme-pocket :is(#pocketPetLevel, #pocketGardenHarvests) {
  font-size: 0.64rem !important;
}

body.theme-pocket .celebrity-money > strong,
body.theme-pocket .celebrity-ticker-character {
  font-family: "Pocket Pixel Number", "SFMono-Regular", ui-monospace, monospace !important;
  font-weight: 700 !important;
}

body.theme-pocket .pocket-life-card {
  display: flex !important;
  min-height: 100%;
  flex-direction: column;
}

body.theme-pocket .pocket-life-actions {
  margin-top: auto !important;
  padding-top: 14px !important;
}

body.theme-pocket .break-game-mini-games .worry-preview-items {
  inset: 12px 4px 8px !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: center;
  gap: 3px !important;
}

body.theme-pocket .break-game-mini-games .worry-preview-items i,
body.theme-pocket .break-game-mini-games .worry-preview-items i:nth-child(n) {
  position: relative !important;
  inset: auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 5px 2px !important;
  transform: none !important;
}

body.theme-pocket .break-game-mini-games .worry-preview-items i b {
  overflow: hidden;
  font-size: 0.58rem !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-pocket .break-game-mini-games .worry-preview-items i em {
  font-size: 0.56rem !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-value {
  opacity: 0 !important;
}

body.theme-pocket .break-game-fortune .fortune-unified.is-charging .fortune-energy-value {
  opacity: 1 !important;
}

body.theme-pocket .break-game-fortune .fortune-vessel-status > span {
  color: #344438 !important;
  font-size: 0.64rem !important;
}

@media (max-width: 980px) {
  body.theme-pocket .app-shell {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.theme-pocket .hero-panel,
  body.theme-pocket .hero-panel > * {
    min-width: 0 !important;
  }
}

@media (max-width: 640px) {
  body.theme-pocket .pixel-agent-stage {
    min-height: 146px !important;
    grid-template-columns: minmax(178px, 1.25fr) minmax(132px, 0.88fr) !important;
    gap: 6px !important;
  }

  body.theme-pocket .pixel-agent-art { height: 132px !important; }
  body.theme-pocket .pixel-agent-message { min-height: 54px !important; font-size: 0.68rem !important; }

  body.theme-pocket .pocket-life-scene,
  body.theme-pocket .pocket-garden-scene {
    min-height: 112px !important;
  }

  body.theme-pocket .pocket-life-scene .pocket-life-pet-art,
  body.theme-pocket .pocket-life-scene .pocket-life-garden-art {
    height: 90px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-vessel-status {
    display: none !important;
  }

  body.theme-pocket .break-game-fortune .fortune-energy-ritual {
    min-height: 118px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-result-panel,
  body.theme-pocket .break-game-fortune .fortune-outcome {
    min-height: 102px !important;
  }
}

/* Pocket completion v3: game-window hierarchy, event feedback and stronger motion. */
body.theme-pocket {
  --pocket-ink: #18241b;
  --pocket-dark: #29382d;
  --pocket-mid: #8f9f89;
  --pocket-screen: #b8c5b0;
  --pocket-paper: #d9e0d2;
  --pocket-light: #f0f3eb;
  --pocket-accent: #dfa039;
  --pocket-alert: #9c4839;
}

body.theme-pocket .topbar {
  border-bottom: 3px solid #172219 !important;
  color: var(--pocket-light) !important;
  background: var(--pocket-dark) !important;
  box-shadow: inset 0 -2px 0 #415346 !important;
}

body.theme-pocket .topbar h1 { color: var(--pocket-light) !important; }
body.theme-pocket .topbar .eyebrow { color: #f0b450 !important; }

body.theme-pocket .topbar .icon-button {
  border-color: #111a14 !important;
  color: var(--pocket-ink) !important;
  background: #cbd5c3 !important;
  box-shadow:
    inset 2px 2px 0 var(--pocket-light),
    inset -2px -2px 0 #788674,
    3px 3px 0 #111a14 !important;
}

body.theme-pocket .ticker-stage {
  border-bottom: 3px solid var(--pocket-dark) !important;
  background: #c6d0bd !important;
  box-shadow: inset 0 -2px 0 #9ba996 !important;
}

body.theme-pocket .pixel-agent-stage {
  padding: 7px !important;
  border: 2px solid var(--pocket-dark) !important;
  border-radius: 2px !important;
  background: var(--pocket-screen) !important;
  box-shadow:
    inset 2px 2px 0 #e7ece2,
    inset -2px -2px 0 #7d8b78 !important;
}

body.theme-pocket .pixel-agent-console {
  align-content: center;
  gap: 7px !important;
}

body.theme-pocket .pixel-agent-message,
body.theme-pocket .pixel-agent-controls > button {
  border: 2px solid var(--pocket-dark) !important;
  border-radius: 1px !important;
  color: var(--pocket-ink) !important;
  background: #dce2d6 !important;
  box-shadow:
    inset 1px 1px 0 var(--pocket-light),
    inset -1px -1px 0 #879481,
    2px 2px 0 var(--pocket-dark) !important;
}

body.theme-pocket .pixel-agent-controls > button:not(:disabled):hover,
body.theme-pocket .pixel-agent-stage.is-interaction-ready .pixel-agent-message {
  background: #edc56f !important;
}

body.theme-pocket .money-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 8px 12px !important;
  border: 3px solid var(--pocket-dark) !important;
  border-radius: 1px !important;
  background: #aebca7 !important;
  box-shadow:
    inset 3px 3px 0 #778574,
    inset -3px -3px 0 #e6ebe1 !important;
}

body.theme-pocket .money-ticker,
body.theme-pocket .money-ticker.stopwatch-ticker,
body.theme-pocket .stopwatch-character {
  font-family: "Pocket Pixel Number", "SFMono-Regular", ui-monospace, monospace !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

body.theme-pocket .stopwatch-digit.is-ticking {
  animation: pocket-main-digit-v3 170ms steps(4, end) both !important;
}

body.theme-pocket .stopwatch-digit.is-ticking::before {
  animation: pocket-main-digit-old-v3 170ms steps(4, end) both !important;
}

body.theme-pocket.is-running .money-wrap {
  animation: pocket-screen-live-v3 1.2s steps(2, end) infinite;
}

body.theme-pocket.is-running .live-dot {
  animation: pocket-live-dot-v3 760ms steps(1, end) infinite !important;
}

body.theme-pocket :is(
  .daily-goal-panel,
  .city-report-launch,
  .personal-products-panel,
  .break-game,
  .zodiac-horoscope,
  .pocket-life-station,
  .break-game-mini-games,
  .celebrity-panel,
  .income-history-panel
) {
  border: 2px solid var(--pocket-dark) !important;
  border-radius: 2px !important;
  background: var(--pocket-paper) !important;
  box-shadow:
    inset 2px 2px 0 var(--pocket-light),
    inset -2px -2px 0 #8b9985,
    4px 4px 0 var(--pocket-dark) !important;
}

body.theme-pocket :is(
  .break-game-head,
  .zodiac-horoscope-head,
  .pocket-life-head,
  .celebrity-head,
  .personal-products-head,
  .income-history-head,
  .mini-games-head
) {
  min-height: 38px !important;
  margin: 0 0 8px !important;
  padding: 6px 8px !important;
  border-bottom: 2px solid var(--pocket-dark) !important;
  color: var(--pocket-ink) !important;
  background: #b4c0ad !important;
  box-shadow: inset 0 -2px 0 #84917e !important;
}

body.theme-pocket :is(.break-game-head, .pocket-life-head, .zodiac-horoscope-head) > :is(strong, h3) {
  color: var(--pocket-ink) !important;
  font-size: 0.86rem !important;
}

body.theme-pocket :is(.daily-goal-panel, .city-report-launch) {
  border-left: 5px solid var(--pocket-accent) !important;
}

body.theme-pocket .workday-countdown-card,
body.theme-pocket .personal-product,
body.theme-pocket .zodiac-daily-card,
body.theme-pocket .pocket-life-card,
body.theme-pocket .celebrity-terminal,
body.theme-pocket .celebrity-product,
body.theme-pocket .ledger-summary > article,
body.theme-pocket .ledger-board {
  border: 2px solid var(--pocket-dark) !important;
  border-radius: 1px !important;
  background: #c9d2c2 !important;
  box-shadow:
    inset 1px 1px 0 var(--pocket-light),
    inset -1px -1px 0 #86937f,
    2px 2px 0 var(--pocket-dark) !important;
}

body.theme-pocket :is(
  .control-strip > button,
  .city-report-launch > button,
  .luck-start-button,
  .fortune-interpret-button,
  .pocket-life-actions button,
  .mini-game-start,
  .celebrity-session button,
  .ledger-settings-button,
  .celebrity-settings-close
) {
  border: 2px solid #172219 !important;
  border-radius: 1px !important;
  box-shadow:
    inset 2px 2px 0 #f4e0b2,
    inset -2px -2px 0 #8b641f,
    3px 3px 0 #172219 !important;
}

body.theme-pocket :is(
  .control-strip > button,
  .city-report-launch > button,
  .luck-start-button,
  .fortune-interpret-button,
  .pocket-life-actions button,
  .mini-game-start,
  .celebrity-session button
):not(:disabled):active {
  transform: translate(3px, 3px) !important;
  box-shadow: inset 2px 2px 0 #8b641f, inset -2px -2px 0 #f4e0b2 !important;
}

body.theme-pocket :is(button, input, select):focus-visible {
  outline: 3px solid #f2bf58 !important;
  outline-offset: 2px !important;
}

body.theme-pocket .break-games { gap: 12px !important; }
body.theme-pocket .break-game { overflow: hidden; padding: 0 8px 10px !important; }
body.theme-pocket .break-game-head { margin-inline: -8px !important; }

body.theme-pocket .lottery-machine,
body.theme-pocket .fortune-ritual {
  border: 2px solid var(--pocket-dark) !important;
  border-radius: 1px !important;
  background: var(--pocket-screen) !important;
  box-shadow: inset 2px 2px 0 #778574, inset -2px -2px 0 #e5eae0 !important;
}

body.theme-pocket .lottery-machine.is-rolling {
  animation: pocket-machine-running-v3 240ms steps(2, end) infinite !important;
}

body.theme-pocket .fortune-unified.fortune-good-hit .fortune-outcome {
  animation: pocket-good-result-v3 1.05s steps(5, end) both !important;
}

body.theme-pocket .fortune-unified.fortune-good-major .fortune-ritual {
  animation: pocket-major-window-v3 1.5s steps(4, end) both !important;
}

body.theme-pocket .pocket-life-card {
  overflow: hidden;
  padding: 7px !important;
}

body.theme-pocket .pocket-life-scene {
  border: 2px solid var(--pocket-dark) !important;
  background: var(--pocket-screen) !important;
  box-shadow: inset 2px 2px 0 #778574, inset -2px -2px 0 #e5eae0 !important;
}

body.theme-pocket .pocket-life-actions button {
  background: var(--pocket-accent) !important;
}

body.theme-pocket .celebrity-panel { overflow: hidden; padding: 0 10px 12px !important; }
body.theme-pocket .celebrity-head { margin-inline: -10px !important; padding-inline: 10px !important; }
body.theme-pocket .celebrity-terminal { padding: 8px !important; background: #aebbA5 !important; }

body.theme-pocket .celebrity-panel.is-running .celebrity-terminal {
  animation: pocket-terminal-running-v3 900ms steps(2, end) infinite;
}

body.theme-pocket .celebrity-session,
body.theme-pocket .celebrity-tier-progress {
  border: 2px solid var(--pocket-dark) !important;
  background: #d9dfd3 !important;
  box-shadow: inset 1px 1px 0 var(--pocket-light), inset -1px -1px 0 #899681 !important;
}

body.theme-pocket dialog.celebrity-settings-dialog {
  padding: 0 !important;
  border: 3px solid #121b14 !important;
  border-radius: 2px !important;
  background: #8d9b87 !important;
  box-shadow:
    inset 3px 3px 0 #dfe5d8,
    inset -3px -3px 0 #536052,
    7px 7px 0 rgba(18, 27, 20, 0.78) !important;
}

body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-head {
  min-height: 78px !important;
  padding: 12px 14px !important;
  border-bottom: 3px solid #121b14 !important;
  color: var(--pocket-light) !important;
  background: var(--pocket-dark) !important;
  box-shadow: inset 0 -2px 0 #465849 !important;
}

body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-head :is(h2, span) {
  color: var(--pocket-light) !important;
}

body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-head p {
  color: #c7d1c3 !important;
}

body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-body {
  gap: 12px !important;
  padding: 12px !important;
  background: #aab7a4 !important;
}

body.theme-pocket dialog.app-settings-dialog :is(
  .app-title-setting,
  .source-row,
  .daily-income-goal-setting,
  .income-calendar-settings,
  .workday-countdown-settings,
  .admin-moods,
  .auto-click-settings,
  .spread-analytics-settings
) {
  padding: 11px !important;
  border: 2px solid var(--pocket-dark) !important;
  border-radius: 1px !important;
  background: #d8dfd2 !important;
  box-shadow:
    inset 2px 2px 0 var(--pocket-light),
    inset -2px -2px 0 #879480,
    2px 2px 0 var(--pocket-dark) !important;
}

body.theme-pocket dialog.app-settings-dialog .income-editor-head {
  min-height: 42px;
  margin: 2px 0 -4px !important;
  padding: 6px 8px !important;
  border: 2px solid var(--pocket-dark) !important;
  color: var(--pocket-light) !important;
  background: #455849 !important;
  box-shadow: 2px 2px 0 var(--pocket-dark) !important;
}

body.theme-pocket dialog.app-settings-dialog .income-editor-head h2 { color: var(--pocket-light) !important; }

body.theme-pocket dialog.app-settings-dialog :is(input, select) {
  min-height: 40px !important;
  border: 2px solid var(--pocket-dark) !important;
  border-radius: 1px !important;
  color: var(--pocket-ink) !important;
  background: #edf1e9 !important;
  box-shadow: inset 2px 2px 0 #7f8d79, inset -2px -2px 0 #ffffff !important;
}

body.theme-pocket dialog.app-settings-dialog .source-row {
  border-style: solid !important;
}

body.theme-pocket dialog.app-settings-dialog .effect-settings {
  gap: 12px !important;
}

.pocket-event-banner { display: none; }

body.theme-pocket .pocket-event-banner {
  position: fixed;
  z-index: 120;
  top: max(76px, env(safe-area-inset-top));
  left: 50%;
  display: grid;
  width: min(320px, calc(100vw - 34px));
  padding: 12px 16px 14px;
  border: 3px solid #111a14;
  border-radius: 1px;
  color: var(--pocket-ink);
  background: #e5c16a;
  box-shadow:
    inset 2px 2px 0 #fff0bd,
    inset -2px -2px 0 #9a6c24,
    6px 6px 0 rgba(17, 26, 20, 0.86);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -22px);
  pointer-events: none;
}

body.theme-pocket .pocket-event-banner[data-tone="neutral"] {
  background: #cbd5c3;
  box-shadow:
    inset 2px 2px 0 #f3f6ef,
    inset -2px -2px 0 #7f8d79,
    6px 6px 0 rgba(17, 26, 20, 0.86);
}

body.theme-pocket .pocket-event-banner small {
  color: #5b431d !important;
  font-size: 0.64rem !important;
  font-weight: 950;
  letter-spacing: 0.14em;
}

body.theme-pocket .pocket-event-banner strong {
  margin-top: 2px;
  font-size: 1.35rem;
  line-height: 1.15;
}

body.theme-pocket .pocket-event-banner span {
  margin-top: 4px;
  font-size: 0.76rem;
  font-weight: 800;
}

body.theme-pocket .pocket-event-banner.show {
  visibility: visible;
  animation: pocket-event-banner-v3 1.88s steps(8, end) both;
}

body.theme-pocket.pocket-event-active .hero-panel {
  animation: pocket-event-frame-v3 620ms steps(4, end);
}

body.theme-pocket.pocket-booting :is(.topbar, .ticker-stage, .control-strip, .daily-goal-panel, .workday-countdowns) {
  animation: pocket-window-load-v3 420ms steps(4, end) both;
}

body.theme-pocket.pocket-booting .ticker-stage { animation-delay: 90ms; }
body.theme-pocket.pocket-booting .control-strip { animation-delay: 180ms; }
body.theme-pocket.pocket-booting .daily-goal-panel { animation-delay: 270ms; }
body.theme-pocket.pocket-booting .workday-countdowns { animation-delay: 360ms; }

@keyframes pocket-main-digit-v3 {
  0% { opacity: 0.25; transform: translateY(-6px) scaleY(0.82); }
  50% { opacity: 1; transform: translateY(2px) scaleY(1.08); }
  100% { opacity: 1; transform: translateY(0) scaleY(1); }
}

@keyframes pocket-main-digit-old-v3 {
  from { opacity: 0.75; transform: translateY(0); }
  to { opacity: 0; transform: translateY(6px); }
}

@keyframes pocket-screen-live-v3 {
  0%, 100% { border-color: #29382d; background-color: #aebca7; }
  50% { border-color: #b9771f; background-color: #bbc8b2; }
}

@keyframes pocket-live-dot-v3 {
  0%, 49% { background-color: #d99b35; transform: scale(1); }
  50%, 100% { background-color: #435a46; transform: scale(0.78); }
}

@keyframes pocket-machine-running-v3 {
  0%, 100% { transform: translateX(0); background-color: #b8c5b0; }
  50% { transform: translateX(2px); background-color: #d8c17b; }
}

@keyframes pocket-good-result-v3 {
  0% { opacity: 0; transform: scale(0.7); background-color: #aab7a4; }
  30% { opacity: 1; transform: scale(1.08); background-color: #f0cd78; }
  55% { transform: scale(0.96); background-color: #c9d2c2; }
  75% { transform: scale(1.03); background-color: #f0cd78; }
  100% { transform: scale(1); }
}

@keyframes pocket-major-window-v3 {
  0%, 100% { box-shadow: inset 2px 2px 0 #778574, inset -2px -2px 0 #e5eae0; }
  35%, 70% { box-shadow: inset 0 0 0 5px #e0a03a, 5px 5px 0 #29382d; }
}

@keyframes pocket-terminal-running-v3 {
  0%, 100% { border-color: #29382d; }
  50% { border-color: #d08f2a; }
}

@keyframes pocket-event-banner-v3 {
  0% { opacity: 0; transform: translate(-50%, -24px) scaleX(0.25); }
  14%, 70% { opacity: 1; transform: translate(-50%, 0) scaleX(1); }
  82% { opacity: 1; transform: translate(-50%, 3px) scaleX(1); }
  100% { opacity: 0; transform: translate(-50%, -12px) scaleX(0.75); }
}

@keyframes pocket-event-frame-v3 {
  0%, 100% { filter: none; }
  30%, 65% { filter: brightness(1.08) contrast(1.04); }
}

@keyframes pocket-window-load-v3 {
  0% { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateY(4px); }
  100% { opacity: 1; clip-path: inset(0); transform: translateY(0); }
}

@media (max-width: 640px) {
  body.theme-pocket .topbar { padding-block: 12px 10px !important; }
  body.theme-pocket .hero-panel { grid-template-rows: auto auto auto auto auto !important; }
  body.theme-pocket .ticker-stage {
    height: auto !important;
    min-height: 304px !important;
    padding: 8px 8px 10px !important;
  }
  body.theme-pocket .pixel-agent-stage { min-height: 152px !important; }
  body.theme-pocket .pixel-agent-art { height: 134px !important; }
  body.theme-pocket .money-wrap { min-height: 66px !important; padding-block: 7px !important; }
  body.theme-pocket .money-ticker { font-size: clamp(2.8rem, 15vw, 4rem) !important; }
  body.theme-pocket .break-game { padding-inline: 8px !important; }
  body.theme-pocket .pocket-life-station { padding: 0 8px 10px !important; }
  body.theme-pocket .pocket-life-head { margin-inline: -8px !important; }
  body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-head {
    min-height: 82px !important;
    padding: 11px 12px !important;
  }
  body.theme-pocket dialog.celebrity-settings-dialog .celebrity-settings-dialog-body {
    gap: 10px !important;
    padding: 10px !important;
  }
  body.theme-pocket dialog.app-settings-dialog :is(
    .app-title-setting,
    .source-row,
    .daily-income-goal-setting,
    .income-calendar-settings,
    .workday-countdown-settings,
    .admin-moods,
    .auto-click-settings,
    .spread-analytics-settings
  ) { padding: 9px !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-pocket .pocket-event-banner.show,
  body.theme-pocket.pocket-event-active .hero-panel,
  body.theme-pocket.pocket-booting :is(.topbar, .ticker-stage, .control-strip, .daily-goal-panel, .workday-countdowns),
  body.theme-pocket.is-running .money-wrap,
  body.theme-pocket.is-running .live-dot,
  body.theme-pocket .lottery-machine.is-rolling,
  body.theme-pocket .fortune-unified.fortune-good-hit .fortune-outcome,
  body.theme-pocket .fortune-unified.fortune-good-major .fortune-ritual,
  body.theme-pocket .celebrity-panel.is-running .celebrity-terminal {
    animation: none !important;
  }
}

/* Pocket fortune decoder v4: compact sign console and in-place grey decode result. */
body.theme-pocket .break-game-fortune {
  width: min(91%, 680px) !important;
  padding: 0 7px 8px !important;
}

body.theme-pocket .break-game-fortune .break-game-head {
  min-height: 31px !important;
  padding: 6px 9px !important;
}

body.theme-pocket .break-game-fortune .fortune-unified {
  padding: 6px !important;
  border: 2px solid var(--pocket-dark) !important;
  background: #d4dccd !important;
  box-shadow: inset 1px 1px 0 var(--pocket-light), 3px 3px 0 var(--pocket-dark) !important;
}

body.theme-pocket .break-game-fortune .fortune-stage-label {
  min-height: 27px !important;
  margin-bottom: 5px !important;
  padding: 0 2px 5px !important;
  border-bottom: 1px solid #8e9b87 !important;
}

body.theme-pocket .break-game-fortune .fortune-stage-label > span {
  font-size: 0.78rem !important;
  letter-spacing: 0.04em !important;
}

body.theme-pocket .break-game-fortune .fortune-stage-label > small {
  font-size: 0.58rem !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-ritual {
  grid-template-columns: 24px 104px minmax(122px, 1fr) !important;
  gap: 7px !important;
  min-height: 132px !important;
  padding: 7px !important;
}

body.theme-pocket .break-game-fortune .fortune-phase-rail { gap: 6px !important; }
body.theme-pocket .break-game-fortune .fortune-phase-rail span { min-height: 27px !important; }
body.theme-pocket .break-game-fortune .fortune-phase-rail span b { display: none !important; }

body.theme-pocket .break-game-fortune .fortune-phase-rail span i {
  width: 24px !important;
  height: 24px !important;
  border: 1px solid var(--pocket-dark) !important;
  border-radius: 1px !important;
  font-family: "Pocket Pixel Number", monospace !important;
  font-size: 0.56rem !important;
  font-style: normal !important;
  background: #c3cdbb !important;
}

body.theme-pocket .break-game-fortune .fortune-phase-rail span.is-active i {
  background: var(--pocket-accent) !important;
  box-shadow: 2px 2px 0 var(--pocket-dark) !important;
}

body.theme-pocket .break-game-fortune .fortune-core-wrap { min-width: 0 !important; }
body.theme-pocket .break-game-fortune .fortune-vessel-status { display: none !important; }

body.theme-pocket .break-game-fortune .fortune-energy-core:not(.fortune-sign-button) {
  width: 94px !important;
  height: 112px !important;
  min-width: 94px !important;
  min-height: 112px !important;
  padding: 7px 6px !important;
  border: 2px solid var(--pocket-dark) !important;
  border-radius: 1px !important;
  background: #c7d0bf !important;
  box-shadow: inset 2px 2px 0 #f0f3eb, inset -2px -2px 0 #879482, 3px 3px 0 var(--pocket-dark) !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-core:not(:disabled):active {
  transform: translate(3px, 3px) !important;
  box-shadow: inset 2px 2px 0 #879482, inset -2px -2px 0 #f0f3eb !important;
}

body.theme-pocket .break-game-fortune .fortune-core-glyph {
  position: relative !important;
  display: grid !important;
  width: 58px !important;
  height: 62px !important;
  place-items: center !important;
  border: 2px solid var(--pocket-dark) !important;
  border-radius: 0 !important;
  color: var(--pocket-ink) !important;
  background: var(--pocket-accent) !important;
  box-shadow: inset 2px 2px 0 #f2c878, inset -2px -2px 0 #a56d20 !important;
}

body.theme-pocket .break-game-fortune .fortune-core-glyph i {
  font-family: "Pocket Pixel Number", "PingFang SC", sans-serif !important;
  font-size: 1.75rem !important;
  font-style: normal !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  text-shadow: 2px 0 0 currentColor !important;
}

body.theme-pocket .break-game-fortune .fortune-core-glyph small {
  font-family: "Pocket Pixel Number", monospace !important;
  font-size: 0.32rem !important;
  letter-spacing: 0.08em !important;
}

body.theme-pocket .break-game-fortune .fortune-core-touch {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  min-height: 29px !important;
  margin-top: 5px !important;
  padding: 3px 2px !important;
  transform: none !important;
}

body.theme-pocket .break-game-fortune .fortune-core-touch b { font-size: 0.58rem !important; }
body.theme-pocket .break-game-fortune .fortune-core-touch small { display: none !important; }
body.theme-pocket .break-game-fortune .fortune-result-panel { min-height: 112px !important; }

body.theme-pocket .break-game-fortune .fortune-result-panel .fortune-outcome {
  min-height: 108px !important;
  padding: 6px !important;
  background: #c4cec0 !important;
}

body.theme-pocket .break-game-fortune .fortune-auspice {
  font-family: "Pocket Pixel Number", "PingFang SC", sans-serif !important;
  font-size: clamp(2rem, 7vw, 3rem) !important;
  line-height: 1 !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-meter { height: 8px !important; }
body.theme-pocket .break-game-fortune .fortune-actions { margin-top: 6px !important; }

body.theme-pocket .break-game-fortune .fortune-interpret-button {
  min-height: 39px !important;
  padding: 7px 10px !important;
  font-size: 0.76rem !important;
}

body.theme-pocket .break-game-fortune .fortune-result { display: none !important; }

body.theme-pocket .break-game-fortune .fortune-unified.is-interpreting .fortune-ritual,
body.theme-pocket .break-game-fortune .fortune-unified.is-interpreting .fortune-actions {
  visibility: hidden !important;
}

body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-ritual,
body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-actions {
  display: none !important;
}

body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-result {
  position: relative !important;
  display: grid !important;
  min-height: 138px !important;
  margin: 0 !important;
  padding: 10px 11px 9px !important;
  gap: 5px !important;
  border: 2px solid var(--pocket-dark) !important;
  border-radius: 1px !important;
  color: var(--pocket-ink) !important;
  background: #b9c4b5 !important;
  box-shadow: inset 2px 2px 0 #7e8b79, inset -2px -2px 0 #e7ece2 !important;
  animation: pocket-fortune-output-v4 780ms steps(7, end) both !important;
}

body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-result::before {
  content: "DECODE COMPLETE // DAILY SIGNAL" !important;
  position: static !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  color: #405044 !important;
  background: transparent !important;
  font-family: "Pocket Pixel Number", monospace !important;
  font-size: 0.48rem !important;
  letter-spacing: 0.08em !important;
  transform: none !important;
}

body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-result-head {
  padding-bottom: 4px !important;
  border-bottom: 1px dashed #667363 !important;
}

body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-oracle-copy {
  display: grid !important;
  gap: 4px !important;
  animation: pocket-fortune-copy-v4 720ms steps(6, end) 160ms both !important;
}

body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-result b { font-size: 0.9rem !important; }

body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-result p {
  font-size: 0.66rem !important;
  line-height: 1.45 !important;
}

body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-oracle-footer {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 5px !important;
}

body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-oracle-footer > * {
  padding: 4px 5px !important;
  border: 1px solid #62705f !important;
  color: #26352a !important;
  background: #ccd5c6 !important;
  font-size: 0.54rem !important;
  font-style: normal !important;
  border-radius: 1px !important;
}

body.theme-pocket .break-game-fortune .fortune-interpret-transition.show {
  display: grid !important;
  grid-template-rows: auto auto 1fr !important;
  min-height: 132px !important;
  padding: 9px !important;
  border: 2px solid var(--pocket-dark) !important;
  border-radius: 1px !important;
  color: var(--pocket-ink) !important;
  background: #b4c0b0 !important;
  box-shadow: inset 2px 2px 0 #758273, inset -2px -2px 0 #e6ebe1 !important;
  animation: pocket-decoder-screen-v4 620ms steps(6, end) both !important;
}

body.theme-pocket .break-game-fortune .fortune-interpret-transition.show > b {
  font-family: "Pocket Pixel Number", monospace !important;
  font-size: 0.76rem !important;
  letter-spacing: 0.08em !important;
}

body.theme-pocket .break-game-fortune .fortune-interpret-transition.show > small {
  color: #435146 !important;
  font-size: 0.56rem !important;
}

body.theme-pocket .break-game-fortune .fortune-interpret-orbit { display: none !important; }

body.theme-pocket .break-game-fortune .fortune-pocket-decoder {
  display: grid !important;
  align-content: start !important;
  gap: 4px !important;
  margin-top: 7px !important;
}

body.theme-pocket .break-game-fortune .fortune-pocket-decoder span {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) !important;
  gap: 6px !important;
  align-items: center !important;
  min-height: 22px !important;
  padding: 3px 5px !important;
  border: 1px solid #667363 !important;
  color: #26352a !important;
  background: #cbd4c6 !important;
  animation: pocket-decoder-line-v4 260ms steps(3, end) both !important;
}

body.theme-pocket .break-game-fortune .fortune-pocket-decoder span:nth-child(2) { animation-delay: 120ms !important; }
body.theme-pocket .break-game-fortune .fortune-pocket-decoder span:nth-child(3) { animation-delay: 240ms !important; }

body.theme-pocket .break-game-fortune .fortune-pocket-decoder span b {
  font-family: "Pocket Pixel Number", monospace !important;
  font-size: 0.52rem !important;
}

body.theme-pocket .break-game-fortune .fortune-pocket-decoder span em {
  overflow: hidden !important;
  font-family: "Pocket Pixel Number", "PingFang SC", monospace !important;
  font-size: 0.5rem !important;
  font-style: normal !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@keyframes pocket-decoder-screen-v4 {
  0% { opacity: 0; clip-path: inset(0 0 100%); }
  24% { opacity: 1; clip-path: inset(0 0 72%); }
  100% { opacity: 1; clip-path: inset(0); }
}

@keyframes pocket-decoder-line-v4 {
  from { opacity: 0; transform: translateX(-7px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pocket-fortune-output-v4 {
  0% { opacity: 0; clip-path: inset(0 0 100%); }
  100% { opacity: 1; clip-path: inset(0); }
}

@keyframes pocket-fortune-copy-v4 {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  body.theme-pocket .break-game-fortune { width: 94% !important; }
  body.theme-pocket .break-game-fortune .fortune-stage-label > small { display: none !important; }

  body.theme-pocket .break-game-fortune .fortune-energy-ritual {
    grid-template-columns: 23px 91px minmax(112px, 1fr) !important;
    gap: 5px !important;
    min-height: 126px !important;
    padding: 6px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-energy-core:not(.fortune-sign-button) {
    width: 84px !important;
    height: 106px !important;
    min-width: 84px !important;
    min-height: 106px !important;
    padding-inline: 5px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-core-glyph {
    width: 52px !important;
    height: 57px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-result-panel,
  body.theme-pocket .break-game-fortune .fortune-result-panel .fortune-outcome {
    min-height: 104px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-result,
  body.theme-pocket .break-game-fortune .fortune-interpret-transition.show {
    min-height: 126px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-pocket .break-game-fortune .fortune-interpret-transition.show,
  body.theme-pocket .break-game-fortune .fortune-pocket-decoder span,
  body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-result,
  body.theme-pocket .break-game-fortune .fortune-unified.is-interpreted .fortune-oracle-copy {
    animation: none !important;
  }
}

/* Pocket v5: stable LCD numerals, no rotating legacy frame, cartridge fortune console. */
body.theme-pocket .ticker-stage {
  overflow: hidden !important;
}

body.theme-pocket .ticker-stage::before {
  display: none !important;
  content: none !important;
  animation: none !important;
  transform: none !important;
}

body.theme-pocket.is-running .money-wrap {
  animation: none !important;
}

body.theme-pocket .money-wrap {
  isolation: isolate;
  gap: clamp(5px, 1.4vw, 11px) !important;
  overflow: hidden;
  background:
    linear-gradient(rgba(24, 36, 27, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 36, 27, 0.035) 1px, transparent 1px),
    #afbea8 !important;
  background-size: 7px 7px !important;
}

body.theme-pocket .money-wrap::before {
  display: block !important;
  content: "LCD / LIVE" !important;
  position: absolute !important;
  top: 4px !important;
  right: 7px !important;
  z-index: 2 !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  color: rgba(24, 36, 27, 0.58) !important;
  background: transparent !important;
  font-family: "Pocket Pixel Number", monospace !important;
  font-size: 0.38rem !important;
  letter-spacing: 0.08em !important;
  transform: none !important;
  animation: none !important;
}

body.theme-pocket .money-ticker,
body.theme-pocket .money-ticker.stopwatch-ticker,
body.theme-pocket .stopwatch-character,
body.theme-pocket .currency {
  font-family: "Pocket Pixel Number", "SFMono-Regular", ui-monospace, monospace !important;
  font-variant-numeric: tabular-nums lining-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1 !important;
  font-weight: 700 !important;
  text-rendering: geometricPrecision;
  text-shadow: none !important;
}

body.theme-pocket .money-ticker.stopwatch-ticker {
  align-items: center !important;
  perspective: none !important;
}

body.theme-pocket .stopwatch-digit {
  width: 0.64em !important;
  height: 0.96em !important;
  overflow: visible !important;
  line-height: 0.96 !important;
  opacity: 1 !important;
  transform: none;
  filter: none;
}

body.theme-pocket .stopwatch-digit.is-fraction {
  color: #9b631b !important;
}

body.theme-pocket .stopwatch-digit::before,
body.theme-pocket .stopwatch-digit.is-ticking::before {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  animation: none !important;
}

body.theme-pocket .stopwatch-digit.is-ticking {
  animation: pocket-lcd-refresh-v5 120ms steps(2, end) both !important;
}

body.theme-pocket :is(
  .daily-goal-progress-head strong,
  .daily-goal-progress-head > span b,
  .workday-countdown-card strong,
  .ticker-live-income input,
  #personalProductsAmount,
  .personal-product small,
  .personal-product [data-personal-target-count],
  .personal-product [data-personal-target-next],
  .lottery-reel,
  .lottery-reel-static,
  .zodiac-rating strong,
  .pocket-life-dashboard strong,
  .pocket-life-meter strong,
  .pocket-life-detail-meter strong,
  .pocket-life-resource-bar strong,
  .celebrity-terminal-head,
  .celebrity-money,
  .celebrity-session b,
  .celebrity-tier-progress b,
  .celebrity-product strong,
  .celebrity-product b,
  .celebrity-milestone-fx strong,
  .ledger-summary strong,
  .ledger-chart-head strong,
  .ledger-chart-column span,
  .ledger-day-row input,
  input[type="number"],
  input[type="time"],
  input[type="date"]
) {
  font-family: "Pocket Pixel Number", "SFMono-Regular", ui-monospace, monospace !important;
  font-variant-numeric: tabular-nums lining-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1 !important;
  letter-spacing: 0.015em !important;
  text-shadow: none !important;
}

body.theme-pocket :is(
  .workday-countdown-card strong,
  .daily-goal-progress-head > span b,
  #personalProductsAmount,
  .pocket-life-dashboard strong,
  .celebrity-session b,
  .ledger-summary strong
) {
  color: #142018 !important;
}

body.theme-pocket .lottery-reel-static,
body.theme-pocket .celebrity-ticker-character {
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
}

body.theme-pocket .celebrity-ticker-character.is-changing {
  animation: pocket-lcd-refresh-v5 140ms steps(2, end) both !important;
}

@keyframes pocket-lcd-refresh-v5 {
  0% {
    opacity: 1;
    color: #72511e;
    background: rgba(224, 160, 58, 0.2);
    transform: translateY(1px);
  }
  50% {
    opacity: 1;
    color: #142018;
    background: rgba(24, 36, 27, 0.08);
    transform: translateY(0);
  }
  100% {
    opacity: 1;
    background: transparent;
    transform: translateY(0);
  }
}

body.theme-pocket .break-game-fortune {
  width: min(94%, 720px) !important;
  padding: 0 8px 9px !important;
}

body.theme-pocket .break-game-fortune .fortune-unified {
  padding: 7px !important;
  background: #d5ddd0 !important;
}

body.theme-pocket .break-game-fortune .fortune-stage-label {
  min-height: 34px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 0 7px !important;
  padding: 5px 7px !important;
  border: 2px solid var(--pocket-dark) !important;
  background: #b7c3b1 !important;
  box-shadow: inset 1px 1px 0 #e6ebe2, inset -1px -1px 0 #7f8d7b !important;
}

body.theme-pocket .break-game-fortune .fortune-stage-label > span {
  color: var(--pocket-ink) !important;
  font-family: "Pocket Pixel Number", "PingFang SC", sans-serif !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap;
}

body.theme-pocket .break-game-fortune .fortune-stage-label > small {
  display: block !important;
  overflow: hidden;
  color: #465448 !important;
  font-size: 0.58rem !important;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-pocket .break-game-fortune .fortune-energy-ritual {
  display: grid !important;
  grid-template-columns: 108px minmax(0, 1fr) !important;
  grid-template-rows: 30px minmax(118px, auto) !important;
  grid-template-areas:
    "steps steps"
    "card screen" !important;
  gap: 7px !important;
  min-height: 160px !important;
  padding: 7px !important;
  border: 2px solid var(--pocket-dark) !important;
  background: #aebaa8 !important;
  box-shadow: inset 2px 2px 0 #798676, inset -2px -2px 0 #e5eae0 !important;
}

body.theme-pocket .break-game-fortune .fortune-phase-rail {
  grid-area: steps !important;
  display: grid !important;
  width: 100% !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  justify-self: stretch !important;
  gap: 5px !important;
}

body.theme-pocket .break-game-fortune .fortune-phase-rail span {
  display: grid !important;
  grid-template-columns: 25px minmax(0, 1fr) !important;
  align-items: center !important;
  min-height: 27px !important;
  border: 1px solid #657163 !important;
  color: #455347 !important;
  background: #c8d1c2 !important;
}

body.theme-pocket .break-game-fortune .fortune-phase-rail span i {
  width: 24px !important;
  height: 24px !important;
  border: 0 !important;
  border-right: 1px solid #657163 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.theme-pocket .break-game-fortune .fortune-phase-rail span b {
  display: block !important;
  overflow: hidden;
  padding: 0 4px !important;
  font-size: 0.53rem !important;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-pocket .break-game-fortune .fortune-phase-rail span.is-active {
  color: var(--pocket-ink) !important;
  background: #e2a33d !important;
  box-shadow: 2px 2px 0 var(--pocket-dark) !important;
}

body.theme-pocket .break-game-fortune .fortune-core-wrap {
  grid-area: card !important;
  display: grid !important;
  min-width: 0 !important;
  place-items: stretch !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-core:not(.fortune-sign-button) {
  position: relative !important;
  width: 100% !important;
  height: 118px !important;
  min-width: 0 !important;
  min-height: 118px !important;
  padding: 8px 7px 7px !important;
  border: 2px solid var(--pocket-dark) !important;
  background: #d5dbcf !important;
  box-shadow: inset 2px 2px 0 #f1f4ec, inset -2px -2px 0 #7f8c7b, 3px 3px 0 var(--pocket-dark) !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-core::before {
  content: "INSERT" !important;
  position: absolute !important;
  top: 5px !important;
  left: 7px !important;
  color: #516054 !important;
  font-family: "Pocket Pixel Number", monospace !important;
  font-size: 0.36rem !important;
  letter-spacing: 0.08em !important;
}

body.theme-pocket .break-game-fortune .fortune-core-glyph {
  width: 66px !important;
  height: 65px !important;
  margin-top: 7px !important;
  background:
    linear-gradient(rgba(24, 36, 27, 0.08) 1px, transparent 1px),
    var(--pocket-accent) !important;
  background-size: 5px 5px !important;
}

body.theme-pocket .break-game-fortune .fortune-core-glyph i {
  font-size: 1.95rem !important;
  text-shadow: none !important;
}

body.theme-pocket .break-game-fortune .fortune-core-glyph small {
  color: #3b2b10 !important;
  font-size: 0.34rem !important;
}

body.theme-pocket .break-game-fortune .fortune-core-touch {
  min-height: 27px !important;
  margin-top: 4px !important;
  border: 1px solid #687567 !important;
  color: var(--pocket-ink) !important;
  background: #c0cabe !important;
}

body.theme-pocket .break-game-fortune .fortune-core-touch b {
  font-size: 0.62rem !important;
}

body.theme-pocket .break-game-fortune .fortune-result-panel {
  grid-area: screen !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 118px !important;
  justify-self: stretch !important;
  padding: 0 !important;
}

body.theme-pocket .break-game-fortune .fortune-result-panel .fortune-outcome {
  position: relative !important;
  display: grid !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 118px !important;
  grid-template-columns: minmax(0, 1fr) 40px !important;
  grid-template-rows: 23px minmax(46px, 1fr) 9px 25px !important;
  align-items: center !important;
  gap: 3px 7px !important;
  padding: 7px 8px !important;
  border: 2px solid var(--pocket-dark) !important;
  color: var(--pocket-ink) !important;
  background:
    linear-gradient(rgba(24, 36, 27, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 36, 27, 0.04) 1px, transparent 1px),
    #bdc8b8 !important;
  background-size: 6px 6px !important;
  justify-self: stretch !important;
  box-shadow: inset 2px 2px 0 #778473, inset -2px -2px 0 #e6ebe1 !important;
}

body.theme-pocket .break-game-fortune .fortune-result-panel .fortune-outcome::before {
  content: "TASK SIGNAL // STANDBY" !important;
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: start;
  padding-bottom: 3px;
  border-bottom: 1px dashed #677466;
  color: #3f4d42;
  font-family: "Pocket Pixel Number", monospace;
  font-size: 0.43rem;
  letter-spacing: 0.06em;
}

body.theme-pocket .break-game-fortune .fortune-unified.has-result .fortune-result-panel .fortune-outcome::before {
  content: "TASK SIGNAL // RECEIVED" !important;
}

body.theme-pocket .break-game-fortune .fortune-outcome-head {
  position: absolute !important;
  top: 5px !important;
  right: 7px !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-value {
  color: #526055 !important;
  font-size: 0.46rem !important;
}

body.theme-pocket .break-game-fortune .fortune-auspice {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  justify-self: start;
  overflow: hidden;
  max-width: 100%;
  color: var(--pocket-ink) !important;
  font-size: clamp(1.45rem, 5vw, 2.15rem) !important;
  line-height: 1 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-pocket .break-game-fortune #fortuneDrawnMark {
  grid-column: 2;
  grid-row: 2;
  display: grid !important;
  width: 36px !important;
  height: 36px !important;
  place-items: center;
  border: 2px solid #b8761e !important;
  color: #8c5717 !important;
  background: rgba(224, 160, 58, 0.18) !important;
  font-family: "Pocket Pixel Number", monospace !important;
  font-size: 1rem !important;
  transform: rotate(-3deg);
}

body.theme-pocket .break-game-fortune .fortune-energy-meter {
  grid-column: 1 / -1;
  grid-row: 3;
  width: 100% !important;
  height: 7px !important;
  margin: 0 !important;
  border: 1px solid var(--pocket-dark) !important;
  background: #909d89 !important;
}

body.theme-pocket .break-game-fortune .fortune-energy-meter i {
  background: var(--pocket-accent) !important;
}

body.theme-pocket .break-game-fortune .fortune-outcome p {
  grid-column: 1 / -1;
  grid-row: 4;
  align-self: center;
  margin: 0 !important;
  color: #354338 !important;
  font-size: 0.57rem !important;
  line-height: 1.3 !important;
}

body.theme-pocket .break-game-fortune .fortune-actions {
  margin-top: 7px !important;
}

body.theme-pocket .break-game-fortune .fortune-interpret-button {
  min-height: 41px !important;
  background: #e1a13a !important;
}

body.theme-pocket .break-game-fortune .fortune-interpret-button:disabled {
  min-height: 0 !important;
}

body.theme-pocket .break-game-fortune .fortune-unified:is(.is-charging, .is-drawing, .is-opening) .fortune-core-glyph {
  animation: pocket-card-read-v5 360ms steps(3, end) infinite !important;
}

body.theme-pocket .break-game-fortune .fortune-unified.is-presenting .fortune-result-panel .fortune-outcome {
  animation: pocket-signal-arrive-v5 480ms steps(5, end) both !important;
}

@keyframes pocket-card-read-v5 {
  0%, 100% { transform: translateY(0); filter: none; }
  50% { transform: translateY(-3px); filter: contrast(1.18); }
}

@keyframes pocket-signal-arrive-v5 {
  0% { opacity: 1; clip-path: inset(0 100% 0 0); }
  100% { opacity: 1; clip-path: inset(0); }
}

@media (max-width: 640px) {
  body.theme-pocket .money-wrap::before {
    top: 3px !important;
    right: 5px !important;
    font-size: 0.32rem !important;
  }

  body.theme-pocket .money-ticker {
    font-size: clamp(2.65rem, 14vw, 3.75rem) !important;
  }

  body.theme-pocket .break-game-fortune {
    width: 95% !important;
  }

  body.theme-pocket .break-game-fortune .fortune-stage-label {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  body.theme-pocket .break-game-fortune .fortune-stage-label > small {
    display: none !important;
  }

  body.theme-pocket .break-game-fortune .fortune-energy-ritual {
    grid-template-columns: 94px minmax(0, 1fr) !important;
    grid-template-rows: 29px 116px !important;
    min-height: 158px !important;
    gap: 6px !important;
    padding: 6px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-phase-rail span {
    grid-template-columns: 23px minmax(0, 1fr) !important;
  }

  body.theme-pocket .break-game-fortune .fortune-phase-rail span i {
    width: 22px !important;
    height: 22px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-phase-rail span b {
    font-size: 0.48rem !important;
  }

  body.theme-pocket .break-game-fortune .fortune-energy-core:not(.fortune-sign-button),
  body.theme-pocket .break-game-fortune .fortune-result-panel,
  body.theme-pocket .break-game-fortune .fortune-result-panel .fortune-outcome {
    height: 116px !important;
    min-height: 116px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-core-glyph {
    width: 58px !important;
    height: 62px !important;
  }

  body.theme-pocket .break-game-fortune .fortune-auspice {
    font-size: clamp(1.35rem, 7vw, 1.9rem) !important;
  }

  body.theme-pocket .break-game-fortune .fortune-outcome p {
    font-size: 0.52rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-pocket .stopwatch-digit.is-ticking,
  body.theme-pocket .celebrity-ticker-character.is-changing,
  body.theme-pocket .break-game-fortune .fortune-unified:is(.is-charging, .is-drawing, .is-opening) .fortune-core-glyph,
  body.theme-pocket .break-game-fortune .fortune-unified.is-presenting .fortune-result-panel .fortune-outcome {
    animation: none !important;
  }
}

/* Pocket v8: self-rendered 5x7 LCD glyphs for unambiguous money digits. */
body.theme-pocket .money-ticker.stopwatch-ticker {
  --lcd-pixel-size: 0.1em;
  column-gap: 0.055em !important;
}

body.theme-pocket .stopwatch-digit[data-digit] {
  position: relative;
  display: inline-block !important;
  width: 0.68em !important;
  height: 0.94em !important;
  overflow: visible !important;
  color: #142018 !important;
  -webkit-text-fill-color: transparent;
  text-shadow: none !important;
}

body.theme-pocket .stopwatch-digit[data-digit]::after {
  position: absolute;
  top: 0.035em;
  left: 0.02em;
  display: block;
  width: var(--lcd-pixel-size);
  height: var(--lcd-pixel-size);
  content: "";
  color: #142018;
  background: transparent;
  pointer-events: none;
}

body.theme-pocket .stopwatch-digit[data-digit].is-ticking::after {
  animation: pocket-lcd-pixel-refresh-v8 100ms steps(1, end) both;
}

body.theme-pocket .stopwatch-digit[data-digit="0"]::after {
  box-shadow: 0.135em 0 0 currentColor, 0.27em 0 0 currentColor, 0.405em 0 0 currentColor, 0 0.135em 0 currentColor, 0.54em 0.135em 0 currentColor, 0 0.27em 0 currentColor, 0.54em 0.27em 0 currentColor, 0 0.405em 0 currentColor, 0.54em 0.405em 0 currentColor, 0 0.54em 0 currentColor, 0.54em 0.54em 0 currentColor, 0 0.675em 0 currentColor, 0.54em 0.675em 0 currentColor, 0.135em 0.81em 0 currentColor, 0.27em 0.81em 0 currentColor, 0.405em 0.81em 0 currentColor;
}

body.theme-pocket .stopwatch-digit[data-digit="1"]::after {
  box-shadow: 0.27em 0 0 currentColor, 0.135em 0.135em 0 currentColor, 0.27em 0.135em 0 currentColor, 0.27em 0.27em 0 currentColor, 0.27em 0.405em 0 currentColor, 0.27em 0.54em 0 currentColor, 0.27em 0.675em 0 currentColor, 0.135em 0.81em 0 currentColor, 0.27em 0.81em 0 currentColor, 0.405em 0.81em 0 currentColor;
}

body.theme-pocket .stopwatch-digit[data-digit="2"]::after {
  box-shadow: 0.135em 0 0 currentColor, 0.27em 0 0 currentColor, 0.405em 0 0 currentColor, 0 0.135em 0 currentColor, 0.54em 0.135em 0 currentColor, 0.54em 0.27em 0 currentColor, 0.405em 0.405em 0 currentColor, 0.27em 0.54em 0 currentColor, 0.135em 0.675em 0 currentColor, 0 0.81em 0 currentColor, 0.135em 0.81em 0 currentColor, 0.27em 0.81em 0 currentColor, 0.405em 0.81em 0 currentColor, 0.54em 0.81em 0 currentColor;
}

body.theme-pocket .stopwatch-digit[data-digit="3"]::after {
  box-shadow: 0 0 0 currentColor, 0.135em 0 0 currentColor, 0.27em 0 0 currentColor, 0.405em 0 0 currentColor, 0.54em 0.135em 0 currentColor, 0.54em 0.27em 0 currentColor, 0.135em 0.405em 0 currentColor, 0.27em 0.405em 0 currentColor, 0.405em 0.405em 0 currentColor, 0.54em 0.54em 0 currentColor, 0.54em 0.675em 0 currentColor, 0 0.81em 0 currentColor, 0.135em 0.81em 0 currentColor, 0.27em 0.81em 0 currentColor, 0.405em 0.81em 0 currentColor;
}

body.theme-pocket .stopwatch-digit[data-digit="4"]::after {
  box-shadow: 0.405em 0 0 currentColor, 0.27em 0.135em 0 currentColor, 0.405em 0.135em 0 currentColor, 0.135em 0.27em 0 currentColor, 0.405em 0.27em 0 currentColor, 0 0.405em 0 currentColor, 0.405em 0.405em 0 currentColor, 0 0.54em 0 currentColor, 0.135em 0.54em 0 currentColor, 0.27em 0.54em 0 currentColor, 0.405em 0.54em 0 currentColor, 0.54em 0.54em 0 currentColor, 0.405em 0.675em 0 currentColor, 0.405em 0.81em 0 currentColor;
}

body.theme-pocket .stopwatch-digit[data-digit="5"]::after {
  box-shadow: 0 0 0 currentColor, 0.135em 0 0 currentColor, 0.27em 0 0 currentColor, 0.405em 0 0 currentColor, 0.54em 0 0 currentColor, 0 0.135em 0 currentColor, 0 0.27em 0 currentColor, 0 0.405em 0 currentColor, 0.135em 0.405em 0 currentColor, 0.27em 0.405em 0 currentColor, 0.405em 0.405em 0 currentColor, 0.54em 0.54em 0 currentColor, 0.54em 0.675em 0 currentColor, 0 0.81em 0 currentColor, 0.135em 0.81em 0 currentColor, 0.27em 0.81em 0 currentColor, 0.405em 0.81em 0 currentColor;
}

body.theme-pocket .stopwatch-digit[data-digit="6"]::after {
  box-shadow: 0.135em 0 0 currentColor, 0.27em 0 0 currentColor, 0.405em 0 0 currentColor, 0 0.135em 0 currentColor, 0 0.27em 0 currentColor, 0 0.405em 0 currentColor, 0.135em 0.405em 0 currentColor, 0.27em 0.405em 0 currentColor, 0.405em 0.405em 0 currentColor, 0 0.54em 0 currentColor, 0.54em 0.54em 0 currentColor, 0 0.675em 0 currentColor, 0.54em 0.675em 0 currentColor, 0.135em 0.81em 0 currentColor, 0.27em 0.81em 0 currentColor, 0.405em 0.81em 0 currentColor;
}

body.theme-pocket .stopwatch-digit[data-digit="7"]::after {
  box-shadow: 0 0 0 currentColor, 0.135em 0 0 currentColor, 0.27em 0 0 currentColor, 0.405em 0 0 currentColor, 0.54em 0 0 currentColor, 0.54em 0.135em 0 currentColor, 0.405em 0.27em 0 currentColor, 0.27em 0.405em 0 currentColor, 0.135em 0.54em 0 currentColor, 0.135em 0.675em 0 currentColor, 0.135em 0.81em 0 currentColor;
}

body.theme-pocket .stopwatch-digit[data-digit="8"]::after {
  box-shadow: 0.135em 0 0 currentColor, 0.27em 0 0 currentColor, 0.405em 0 0 currentColor, 0 0.135em 0 currentColor, 0.54em 0.135em 0 currentColor, 0 0.27em 0 currentColor, 0.54em 0.27em 0 currentColor, 0.135em 0.405em 0 currentColor, 0.27em 0.405em 0 currentColor, 0.405em 0.405em 0 currentColor, 0 0.54em 0 currentColor, 0.54em 0.54em 0 currentColor, 0 0.675em 0 currentColor, 0.54em 0.675em 0 currentColor, 0.135em 0.81em 0 currentColor, 0.27em 0.81em 0 currentColor, 0.405em 0.81em 0 currentColor;
}

body.theme-pocket .stopwatch-digit[data-digit="9"]::after {
  box-shadow: 0.135em 0 0 currentColor, 0.27em 0 0 currentColor, 0.405em 0 0 currentColor, 0 0.135em 0 currentColor, 0.54em 0.135em 0 currentColor, 0 0.27em 0 currentColor, 0.54em 0.27em 0 currentColor, 0.135em 0.405em 0 currentColor, 0.27em 0.405em 0 currentColor, 0.405em 0.405em 0 currentColor, 0.54em 0.405em 0 currentColor, 0.54em 0.54em 0 currentColor, 0.54em 0.675em 0 currentColor, 0.135em 0.81em 0 currentColor, 0.27em 0.81em 0 currentColor, 0.405em 0.81em 0 currentColor;
}

@keyframes pocket-lcd-pixel-refresh-v8 {
  0% { color: #9b631b; filter: brightness(1.08); }
  100% { color: #142018; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-pocket .stopwatch-digit[data-digit].is-ticking::after {
    animation: none !important;
  }
}

/* Pocket v6: readable amount rhythm and responsive long-value fitting. */
body.theme-pocket .money-ticker.stopwatch-ticker {
  column-gap: 0.045em !important;
}

body.theme-pocket .stopwatch-digit.is-fraction {
  color: #142018 !important;
}

body.theme-pocket .stopwatch-separator.is-decimal {
  min-width: 0.25em !important;
  color: #9b631b !important;
  transform: translateY(-0.015em);
}

body.theme-pocket .currency {
  align-self: center !important;
  color: #9b631b !important;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, ui-monospace, monospace !important;
  font-size: clamp(1.65rem, 3.4vw, 3.25rem) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  transform: translateY(1px);
}

body.theme-pocket .money-wrap::before {
  top: 6px !important;
  right: 10px !important;
  content: "LCD / LIVE" !important;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, ui-monospace, monospace !important;
  font-size: 0.44rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
}

body.theme-pocket .money-ticker.is-long-value {
  font-size: clamp(2.7rem, 4.7vw, 3.35rem) !important;
}

body.theme-pocket .money-ticker.is-compact-value {
  font-size: clamp(2rem, 3.4vw, 2.35rem) !important;
  column-gap: 0.025em !important;
}

body.theme-pocket .money-ticker.is-ultra-compact-value {
  font-size: clamp(1.45rem, 3vw, 2.15rem) !important;
  column-gap: 0.01em !important;
}

@media (max-width: 640px) {
  body.theme-pocket .money-ticker.stopwatch-ticker {
    column-gap: 0.05em !important;
  }

  body.theme-pocket .currency {
    font-size: clamp(1.45rem, 7vw, 1.85rem) !important;
  }

  body.theme-pocket .money-wrap::before {
    top: 4px !important;
    right: 7px !important;
    font-size: 0.39rem !important;
  }

  body.theme-pocket .money-ticker.is-long-value {
    font-size: clamp(2.2rem, 11.5vw, 3.05rem) !important;
    column-gap: 0.035em !important;
  }

  body.theme-pocket .money-ticker.is-compact-value {
    font-size: clamp(1.75rem, 8.9vw, 2.35rem) !important;
    column-gap: 0.018em !important;
  }

  body.theme-pocket .money-ticker.is-ultra-compact-value {
    font-size: clamp(1.25rem, 6.8vw, 1.9rem) !important;
    column-gap: 0.01em !important;
  }
}

/* Pocket v7: deterministic LCD paint and readable character interactions. */
body.theme-pocket .money-ticker.stopwatch-ticker {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  white-space: nowrap !important;
  isolation: isolate;
  font-synthesis: none !important;
  text-rendering: auto !important;
  -webkit-font-smoothing: none;
}

body.theme-pocket .stopwatch-character {
  contain: layout paint style;
  backface-visibility: hidden;
}

body.theme-pocket .stopwatch-digit {
  transform: none !important;
  will-change: color, background-color;
}

body.theme-pocket .stopwatch-digit.is-ticking {
  animation: pocket-lcd-refresh-v7 100ms steps(1, end) both !important;
}

body.theme-pocket .stopwatch-digit::before,
body.theme-pocket .stopwatch-digit.is-ticking::before {
  display: none !important;
  content: none !important;
}

body.theme-pocket .pixel-agent-art {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

body.theme-pocket :is(.pixel-agent-keyboard-fx, .pixel-agent-stretch-fx, .pixel-agent-action-pop) {
  position: absolute;
  z-index: 3;
  display: block;
  pointer-events: none;
  opacity: 0;
}

body.theme-pocket .pixel-agent-keyboard-fx {
  top: 72%;
  left: 60%;
  width: 23%;
  height: 11%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  border: 1px solid #162219;
  background: rgba(216, 225, 209, 0.94);
  box-shadow: 2px 2px 0 #162219;
  transform: translate(-50%, -50%);
}

body.theme-pocket .pixel-agent-keyboard-fx i {
  display: block;
  min-width: 0;
  border: 1px solid #162219;
  background: #667765;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-keyboard-fx {
  opacity: 1;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-keyboard-fx i {
  animation: pocket-key-flash-v7 420ms steps(3, end) infinite;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-keyboard-fx i:nth-child(2),
body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-keyboard-fx i:nth-child(5) {
  animation-delay: 90ms;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-keyboard-fx i:nth-child(3),
body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-keyboard-fx i:nth-child(4) {
  animation-delay: 180ms;
}

body.theme-pocket .pixel-agent-stretch-fx {
  inset: 8% 9% 13%;
}

body.theme-pocket .pixel-agent-stretch-fx i {
  position: absolute;
  display: block;
  width: 16px;
  height: 3px;
  background: #9b631b;
  box-shadow: 2px 2px 0 rgba(22, 34, 25, 0.38);
}

body.theme-pocket .pixel-agent-stretch-fx i:nth-child(1) { top: 15%; left: 34%; transform: rotate(34deg); }
body.theme-pocket .pixel-agent-stretch-fx i:nth-child(2) { top: 31%; left: 25%; transform: rotate(8deg); }
body.theme-pocket .pixel-agent-stretch-fx i:nth-child(3) { top: 15%; right: 18%; transform: rotate(-34deg); }
body.theme-pocket .pixel-agent-stretch-fx i:nth-child(4) { top: 34%; right: 10%; transform: rotate(-8deg); }

body.theme-pocket .pixel-agent-stage.is-stretching .pixel-agent-stretch-fx {
  opacity: 1;
}

body.theme-pocket .pixel-agent-stage.is-stretching .pixel-agent-stretch-fx i {
  animation: pocket-stretch-line-v7 620ms steps(4, end) infinite alternate;
}

body.theme-pocket .pixel-agent-stage.is-stretching .pixel-agent-stretch-fx i:nth-child(even) {
  animation-delay: 140ms;
}

body.theme-pocket .pixel-agent-action-pop {
  top: 8%;
  right: 5%;
  min-width: 56px;
  padding: 4px 6px;
  border: 2px solid #17231a;
  color: #17231a;
  background: #f0c66c;
  box-shadow: 2px 2px 0 #17231a;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, ui-monospace, monospace;
  font-size: clamp(0.48rem, 1.3vw, 0.62rem);
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-align: center;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-action-pop,
body.theme-pocket .pixel-agent-stage.is-stretching .pixel-agent-action-pop {
  opacity: 1;
  animation: pocket-action-pop-v7 420ms steps(4, end) both;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-action-pop::before {
  content: "TAP TAP";
}

body.theme-pocket .pixel-agent-stage.is-stretching .pixel-agent-action-pop::before {
  content: "STRETCH";
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-art {
  animation: pocket-agent-type-v7 1680ms steps(10, end) both !important;
}

body.theme-pocket .pixel-agent-stage.is-stretching .pixel-agent-art {
  animation: pocket-agent-stretch-v7 1900ms steps(10, end) both !important;
}

body.theme-pocket .pixel-agent-stage.is-key-tapping .pixel-agent-message {
  animation: pocket-agent-message-v7 1680ms steps(4, end) both !important;
}

body.theme-pocket .pixel-agent-stage.is-stretching .pixel-agent-message {
  animation: pocket-agent-message-v7 1900ms steps(4, end) both !important;
}

body.theme-pocket .pixel-agent-controls > button {
  grid-template-columns: 25px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  column-gap: 6px !important;
  row-gap: 0 !important;
  text-align: left !important;
}

body.theme-pocket .pixel-agent-controls > button > i {
  grid-row: 1 / 3;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid #17231a;
  border-radius: 1px;
  color: #17231a;
  background: #f0c66c;
  box-shadow: 1px 1px 0 #17231a;
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, ui-monospace, monospace;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 950;
}

body.theme-pocket .pixel-agent-controls > button > span,
body.theme-pocket .pixel-agent-controls > button > small {
  grid-column: 2;
  min-width: 0;
}

body.theme-pocket .pixel-agent-controls > button.is-active,
body.theme-pocket .pixel-agent-controls > button.is-active:disabled {
  color: #17231a !important;
  background: #e5aa40 !important;
  box-shadow:
    inset 2px 2px 0 #f6d88a,
    inset -2px -2px 0 #9b631b,
    2px 2px 0 #17231a !important;
  opacity: 1 !important;
}

body.theme-pocket .pixel-agent-controls > button.is-active > i {
  color: #f4d483;
  background: #17231a;
  animation: pocket-control-pulse-v7 360ms steps(2, end) infinite;
}

@keyframes pocket-lcd-refresh-v7 {
  0% {
    color: #9b631b;
    background: rgba(224, 160, 58, 0.22);
  }
  100% {
    color: #142018;
    background: transparent;
  }
}

@keyframes pocket-key-flash-v7 {
  0%, 100% { background: #667765; transform: translate(0, 0); }
  50% { background: #e0a03a; transform: translate(1px, 1px); }
}

@keyframes pocket-stretch-line-v7 {
  0% { opacity: 0.25; scale: 0.6 1; }
  100% { opacity: 1; scale: 1.25 1; }
}

@keyframes pocket-action-pop-v7 {
  0% { opacity: 1; transform: translate(-4px, 4px) scale(0.72); }
  45% { opacity: 1; transform: translate(1px, -1px) scale(1.05); }
  100% { opacity: 1; transform: none; }
}

@keyframes pocket-agent-type-v7 {
  0%, 100% { transform: translate(0, 0); }
  10%, 30%, 50%, 70%, 90% { transform: translate(-2px, 2px); }
  20%, 40%, 60%, 80% { transform: translate(2px, 0); }
}

@keyframes pocket-agent-stretch-v7 {
  0%, 100% { transform: translateY(0) scale(1); }
  20% { transform: translateY(3px) scale(0.99, 0.97); }
  45% { transform: translateY(-7px) scale(1.018, 1.045) rotate(-0.7deg); }
  62% { transform: translateY(-7px) scale(1.018, 1.045) rotate(0.7deg); }
  82% { transform: translateY(-2px) scale(1.006, 1.015); }
}

@keyframes pocket-agent-message-v7 {
  0%, 100% { background: #edc56f; }
  50% { background: #e0a03a; }
}

@keyframes pocket-control-pulse-v7 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(1px, 1px); }
}

@media (max-width: 640px) {
  body.theme-pocket .pixel-agent-keyboard-fx {
    top: 73%;
    left: 61%;
    width: 25%;
    height: 12%;
    gap: 1px;
    padding: 1px;
  }

  body.theme-pocket .pixel-agent-action-pop {
    top: 5%;
    right: 3%;
    min-width: 49px;
    padding: 3px 4px;
    font-size: 0.46rem;
  }

  body.theme-pocket .pixel-agent-controls > button {
    grid-template-columns: 22px minmax(0, 1fr) !important;
    min-height: 46px !important;
    padding: 5px !important;
    column-gap: 4px !important;
  }

  body.theme-pocket .pixel-agent-controls > button > i {
    width: 22px;
    height: 22px;
    font-size: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-pocket .stopwatch-digit.is-ticking,
  body.theme-pocket .pixel-agent-stage:is(.is-key-tapping, .is-stretching) .pixel-agent-art,
  body.theme-pocket .pixel-agent-stage:is(.is-key-tapping, .is-stretching) .pixel-agent-message,
  body.theme-pocket .pixel-agent-stage:is(.is-key-tapping, .is-stretching) :is(.pixel-agent-keyboard-fx i, .pixel-agent-stretch-fx i, .pixel-agent-action-pop),
  body.theme-pocket .pixel-agent-controls > button.is-active > i {
    animation: none !important;
  }
}

/* Pocket v8 final cascade guard. */
body.theme-pocket .money-ticker.stopwatch-ticker {
  --lcd-pixel-size: 0.075em;
}

body.theme-pocket .stopwatch-digit[data-digit] {
  width: 0.7em !important;
  height: 0.94em !important;
  color: #142018 !important;
  -webkit-text-fill-color: transparent;
}

body.theme-pocket .stopwatch-digit[data-digit]::after {
  display: block !important;
  content: "" !important;
  color: #142018;
}

body.theme-pocket .stopwatch-digit[data-digit].is-ticking::after {
  animation: pocket-lcd-pixel-refresh-v8 100ms steps(1, end) both;
}

/* Pocket v9: thin-dot spacing matched to the supplied LCD reference. */
body.theme-pocket .money-ticker.stopwatch-ticker {
  column-gap: 0.015em !important;
}

body.theme-pocket .stopwatch-digit[data-digit]::after {
  top: 0.035em;
  left: 0.03em;
}

body.theme-pocket .stopwatch-separator.is-decimal,
body.theme-pocket .stopwatch-separator.is-grouping {
  position: relative;
  display: inline-block !important;
  height: 0.94em;
  overflow: visible;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  text-shadow: none !important;
  transform: none !important;
}

body.theme-pocket .stopwatch-separator.is-decimal {
  width: 0.22em !important;
  min-width: 0.22em !important;
}

body.theme-pocket .stopwatch-separator.is-grouping {
  width: 0.17em !important;
  min-width: 0.17em !important;
}

body.theme-pocket .stopwatch-separator.is-decimal::after,
body.theme-pocket .stopwatch-separator.is-grouping::after {
  position: absolute;
  display: block;
  width: var(--lcd-pixel-size);
  height: var(--lcd-pixel-size);
  content: "";
  pointer-events: none;
}

body.theme-pocket .stopwatch-separator.is-decimal::after {
  top: 0.81em;
  left: 0.07em;
  background: #9b631b;
}

body.theme-pocket .stopwatch-separator.is-grouping::after {
  top: 0.675em;
  left: 0.065em;
  background: #142018;
  box-shadow: -0.035em 0.135em 0 #142018;
}

@media (max-width: 640px) {
  body.theme-pocket .money-ticker.stopwatch-ticker {
    column-gap: 0.012em !important;
  }
}

/* Pocket v10: bolder LCD blocks matched to the supplied reference. */
body.theme-pocket .money-ticker.stopwatch-ticker {
  --lcd-pixel-size: 0.105em;
}

body.theme-pocket .stopwatch-digit[data-digit]::after {
  top: 0.012em;
}

/* Native iOS shell: keep controls clear of the notch and home indicator. */
@supports (padding: env(safe-area-inset-top)) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
  }
}

/* Native iOS layout: the WebView paints behind the notch while content stays
   inside the safe area. Keep the readable 18px type scale and make the shell
   fit the available width instead of visually shrinking the whole interface. */
html.native-app {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-size: 18px;
  background: #08150f;
  -webkit-text-size-adjust: 100%;
}

html.native-app body {
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  background-color: #08150f;
}

@media (max-width: 640px) {
  html.native-app .app-shell,
  html.native-app .hero-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  html.native-app .topbar {
    width: 100%;
    max-width: 100%;
  }

  html.native-app .topbar > div:first-child {
    flex: 1 1 0;
    min-width: 0;
  }

  html.native-app .top-actions {
    flex: 0 0 auto;
  }

  html.native-app #appTitle {
    max-width: 100%;
  }

  html.native-app .topbar,
  html.native-app .section-head,
  html.native-app .control-strip {
    padding-inline: 14px;
  }

  html.native-app .ticker-stage {
    max-width: 100%;
    min-width: 0;
    padding-inline: 14px;
  }

  /* iOS zooms the entire WebView when a focused form control renders below
     16px. Enforce the platform threshold so closing a field never leaves the
     main screen enlarged and horizontally pannable. */
  html.native-app :where(input, select, textarea) {
    font-size: max(16px, 1em);
  }
}

/* Theme isolation v11: pocket card markup must not alter the original sign seal. */
body:is(.theme-suction, .theme-moonlight) .fortune-core-glyph > i {
  display: block;
  color: inherit;
  font: inherit;
  font-style: normal;
  font-weight: inherit;
  line-height: 1;
}

body:is(.theme-suction, .theme-moonlight) .fortune-core-glyph > small {
  display: none !important;
}

/* Minecraft theme v12: stable, readable numeric system.
   The hero amount keeps its self-rendered chunky 5x7 LCD. Smaller values use
   native tabular figures so 2/5/8/9 cannot merge into ambiguous glyphs. */
body.theme-pocket {
  --minecraft-number-font: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", ui-monospace, monospace;
}

body.theme-pocket :is(
  #incomeGoalTargetAmount,
  #todayIncomeGoalPercent,
  #incomeGoalRewardValue,
  .workday-countdown-card strong,
  .workday-countdown-card b,
  .ticker-live-income input,
  #personalProductsAmount,
  .personal-product small,
  .personal-product [data-personal-target-count],
  .personal-product [data-personal-target-next],
  .lottery-reel,
  .lottery-reel-static,
  .fortune-phase-rail i,
  .fortune-energy-value,
  #fortuneChargeValue,
  #zodiacLuckyNumber,
  .zodiac-rating strong,
  .pocket-life-dashboard strong,
  .pocket-life-card-head > strong,
  .pocket-life-meters strong,
  .pocket-life-resource-bar strong,
  .pocket-life-detail-meters strong,
  .celebrity-terminal-head,
  .celebrity-money,
  .celebrity-ticker-character,
  .celebrity-session b,
  .celebrity-tier-progress b,
  .celebrity-product small,
  .celebrity-product [data-product-count],
  .celebrity-product [data-product-next],
  .celebrity-milestone-fx strong,
  .ledger-summary strong,
  .ledger-chart-head strong,
  .ledger-chart-column b,
  .ledger-chart-column small,
  .ledger-day-date,
  .ledger-day-view strong,
  .ledger-day-row input,
  input[type="number"],
  input[type="time"],
  input[type="date"]
) {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--minecraft-number-font) !important;
  font-style: normal !important;
  font-variant-numeric: tabular-nums lining-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1, "zero" 0 !important;
  font-synthesis: none !important;
  letter-spacing: 0 !important;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  text-shadow: none !important;
}

body.theme-pocket :is(
  #incomeGoalTargetAmount,
  #todayIncomeGoalPercent,
  .workday-countdown-card strong,
  #personalProductsAmount,
  .lottery-reel-static,
  .fortune-phase-rail i,
  .zodiac-rating strong,
  .pocket-life-dashboard strong,
  .pocket-life-meters strong,
  .celebrity-ticker-character,
  .ledger-summary strong,
  .ledger-day-view strong
) {
  white-space: nowrap;
}

body.theme-pocket .break-game-luck .lottery-reel-static {
  font-size: clamp(0.78rem, 2.4vw, 1rem) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

body.theme-pocket .money-ticker.live-slot-ticker {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  white-space: nowrap !important;
  font-family: var(--minecraft-number-font) !important;
}

body.theme-pocket .live-slot-character {
  color: #142018 !important;
  font-family: var(--minecraft-number-font) !important;
  font-variant-numeric: tabular-nums lining-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1, "zero" 0 !important;
  font-synthesis: none !important;
  border-radius: 0 !important;
  background: rgba(213, 221, 208, 0.82) !important;
  box-shadow: inset 1px 1px 0 #eef2ea, inset -1px -1px 0 #71806f !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

body.theme-pocket .live-slot-separator {
  min-width: 0.22em !important;
  color: #9b631b !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.theme-pocket .live-slot-digit.locked {
  color: #142018 !important;
  border-color: #9b631b !important;
  background: #e0a03a !important;
  box-shadow: inset 1px 1px 0 #f6d88a, inset -1px -1px 0 #9b631b !important;
}

body.theme-pocket .break-game-fortune .fortune-phase-rail span i {
  display: grid !important;
  place-items: center !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

body.theme-pocket .celebrity-ticker-character {
  font-weight: 900 !important;
  line-height: 1 !important;
}

body.theme-pocket .money-ticker.stopwatch-ticker {
  /* This value produces the larger block size from the approved LCD sample. */
  --lcd-pixel-size: 0.11em;
}

@media (max-width: 640px) {
  body.theme-pocket :is(
    .workday-countdown-card strong,
    #personalProductsAmount,
    .pocket-life-dashboard strong,
    .pocket-life-meters strong,
    .ledger-summary strong
  ) {
    letter-spacing: -0.015em !important;
  }
}

/* Minecraft theme v13: composite inputs own the focus frame.
   Prevent an inner input outline from crossing a currency prefix or divider. */
body.theme-pocket :is(
  .ticker-live-income-amount,
  .income-input-shell,
  .daily-income-goal-setting > div,
  .personal-target-form label,
  .celebrity-editor-price,
  .ledger-day-input-shell
) {
  position: relative;
  isolation: isolate;
}

body.theme-pocket :is(
  .ticker-live-income-amount,
  .income-input-shell,
  .daily-income-goal-setting > div,
  .personal-target-form label,
  .celebrity-editor-price,
  .ledger-day-input-shell
):focus-within {
  outline: none !important;
  border-color: #9b631b !important;
  box-shadow: inset 0 0 0 2px #f2bf58 !important;
}

/* English layout authority: English labels are wider than Chinese. Keep the
   mobile hierarchy readable without shrinking the full interface. */
body.is-english :is(button, input, select, textarea) {
  letter-spacing: normal;
}

body.is-english :is(.control-strip, .daily-goal-panel, .workday-countdowns, .city-report-launch, .personal-products-panel) {
  min-width: 0;
}

body.is-english .control-strip > button {
  min-width: 0;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

body.is-english .control-strip > button > span {
  font-size: 0.76rem;
}

body.is-english .control-strip > button > small {
  font-size: 0.56rem;
  line-height: 1.18;
}

body.is-english .daily-goal-progress-head {
  align-items: flex-start;
  gap: 8px;
}

body.is-english .daily-goal-progress-head > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1.15;
}

body.is-english .daily-goal-progress-head > span b {
  overflow: visible;
  margin-left: 0;
  max-width: none;
  line-height: 1.1;
  text-overflow: clip;
  white-space: normal;
}

body.is-english .workday-countdown-card > span b {
  overflow-wrap: anywhere;
  word-break: normal;
}

body.is-english .luck-start-button span {
  box-sizing: border-box;
  width: 62px;
  padding: 5px 3px;
  font-size: 0.64rem;
  line-height: 1.02;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  text-align: center;
}

body.is-english .luck-start-button small {
  max-width: 100%;
  font-size: 0.5rem;
  line-height: 1.12;
  text-align: center;
  white-space: normal;
}

body.is-english .workday-countdown-card[data-phase="alerting"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 3px;
  padding: 5px 4px;
}

body.is-english .workday-countdown-card[data-phase="alerting"] > span {
  width: 100%;
  min-width: 0;
  justify-content: center;
  gap: 3px;
}

body.is-english .workday-countdown-card[data-phase="alerting"] > span i {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  font-size: 0.38rem;
}

body.is-english .workday-countdown-card[data-phase="alerting"] > span b {
  font-size: 0.48rem;
  line-height: 1.04;
  white-space: nowrap;
}

body.is-english .workday-countdown-card[data-phase="alerting"] .timer-reminder-readout {
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  gap: 3px;
}

body.is-english .workday-countdown-card[data-phase="alerting"] .timer-reminder-readout > strong {
  min-width: 0;
  font-size: 0.47rem;
  letter-spacing: 0.01em;
}

body.is-english .workday-countdown-card[data-phase="alerting"] .timer-reminder-readout > button {
  width: auto;
  min-width: 0;
  max-width: none;
  padding-inline: 5px;
  font-size: 0.4rem;
}

body.is-english .fortune-celebration-title {
  max-width: min(78vw, 240px);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.035em;
  white-space: normal;
}

body.is-english .fortune-celebration.is-major .fortune-celebration-title {
  min-width: 156px;
  font-size: 0.88rem;
}

body.is-english .city-report-launch > div > span {
  overflow: visible;
  display: block;
  line-height: 1.3;
  text-overflow: clip;
  white-space: normal;
}

body.is-english .personal-product strong,
body.is-english .personal-product small {
  overflow: visible;
  text-overflow: clip;
}

body.is-english :is(.settings-dialog, .celebrity-settings-dialog, .premium-dialog, .pocket-life-dialog) :is(h2, h3, strong, span, small, p, label, button) {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  body.is-english .control-strip {
    grid-template-columns: 1.08fr 0.88fr 1.04fr;
  }

  body.is-english .control-strip > button {
    min-height: 48px;
    padding: 5px 4px;
  }

  body.is-english .control-strip > button > span {
    font-size: 0.72rem;
  }

  body.is-english .control-strip > button > small {
    font-size: 0.55rem;
  }

  body.is-english .daily-goal-progress-head > span {
    font-size: 0.62rem;
  }

  body.is-english .daily-goal-progress-head > span b {
    font-size: 0.76rem;
  }

  body.is-english .daily-goal-progress-head strong {
    font-size: 1rem;
    white-space: nowrap;
  }

  body.is-english .workday-countdown-card {
    min-height: 62px;
    padding-inline: 4px;
  }

  body.is-english .workday-countdown-card > span b {
    font-size: 0.54rem;
    line-height: 1.12;
  }

  body.is-english .workday-countdown-card > strong {
    font-size: 0.73rem;
  }

  body.is-english .city-report-launch {
    grid-template-columns: minmax(0, 1fr) 94px;
    min-height: 72px;
  }

  body.is-english .city-report-launch > div > small {
    font-size: 0.46rem;
  }

  body.is-english .city-report-launch > div > strong {
    font-size: 0.72rem;
  }

  body.is-english .city-report-launch > div > span {
    font-size: 0.54rem;
  }

  body.is-english .city-report-launch > button {
    width: 94px;
    min-width: 94px;
    font-size: 0.64rem;
  }

  body.is-english .city-report-launch > button small {
    font-size: 0.5rem;
  }

  body.is-english .personal-products-title,
  body.is-english .personal-products-head strong {
    font-size: 0.62rem;
  }

  body.is-english .personal-product strong {
    font-size: 0.62rem;
  }

  body.is-english .personal-product small {
    font-size: 0.54rem;
    line-height: 1.14;
  }
}

body.theme-pocket :is(
  .ticker-live-income-amount,
  .income-input-shell,
  .daily-income-goal-setting > div,
  .personal-target-form label,
  .celebrity-editor-price,
  .ledger-day-input-shell
) > :is(span, small, i) {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}

body.theme-pocket :is(
  .ticker-live-income-amount,
  .income-input-shell,
  .daily-income-goal-setting > div,
  .personal-target-form label,
  .celebrity-editor-price,
  .ledger-day-input-shell
) > input:is(:focus, :focus-visible) {
  position: relative;
  z-index: 1;
  border-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

body.theme-pocket input {
  caret-color: #b87318;
}

body.theme-pocket input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):is(:focus, :focus-visible) {
  outline: none !important;
  border-color: #9b631b !important;
  box-shadow: inset 0 0 0 2px #f2bf58 !important;
}

body.theme-pocket :is(
  .ticker-live-income-amount,
  .income-input-shell,
  .daily-income-goal-setting > div,
  .personal-target-form label,
  .celebrity-editor-price,
  .ledger-day-input-shell
) > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):is(:focus, :focus-visible) {
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Minecraft theme v14: center currency signs inside a real prefix cell. */
body.theme-pocket :is(
  .ticker-live-income-amount > span,
  .income-input-shell.amount-input > small,
  .daily-income-goal-setting > div > i,
  .personal-target-form label > span,
  .celebrity-editor-price > small,
  .ledger-day-input-shell > i
) {
  display: grid !important;
  width: 28px !important;
  min-width: 28px !important;
  height: 100% !important;
  align-self: stretch !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border-right: 1px solid rgba(38, 52, 41, 0.34);
  line-height: 1 !important;
  text-align: center !important;
  transform: none !important;
}

body.theme-pocket :is(.currency, .celebrity-money > span) {
  display: inline-grid !important;
  min-width: 0.72em;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  text-align: center !important;
  transform: none !important;
}

body.theme-pocket :is(.stopwatch-separator, .live-slot-separator) {
  place-items: center !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
  text-align: center !important;
}
/* First-workday wage onboarding */
body.wage-onboarding-open { overflow: hidden; }

dialog.wage-onboarding-dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(520px, calc(100vw - 28px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 28px));
  margin: 0;
  padding: 0;
  color: #effff7;
  border: 1px solid rgba(88, 255, 171, 0.68);
  border-radius: 28px;
  background: #07150f;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(255, 224, 101, 0.12) inset, 0 0 42px rgba(49, 255, 152, 0.14);
  transform: translate(-50%, -50%);
  overflow: auto;
  overscroll-behavior: contain;
}

dialog.wage-onboarding-dialog[hidden] { display: none; }

dialog.wage-onboarding-dialog::backdrop {
  background: rgba(0, 8, 6, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.wage-onboarding-card {
  position: relative;
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 30px;
  background:
    radial-gradient(circle at 90% 4%, rgba(255, 224, 101, 0.17), transparent 32%),
    radial-gradient(circle at 8% 38%, rgba(51, 255, 157, 0.13), transparent 34%),
    linear-gradient(150deg, rgba(16, 47, 34, 0.98), rgba(5, 17, 13, 0.99) 64%);
}

.wage-onboarding-language {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #a9c7b9;
  font-size: 11px;
  font-weight: 850;
}

.wage-onboarding-language select {
  min-width: 108px;
  height: 34px;
  padding: 0 27px 0 10px;
  color: #effff7;
  border: 1px solid rgba(99, 255, 173, 0.38);
  border-radius: 10px;
  background: rgba(2, 18, 12, 0.82);
  font: inherit;
}

body.theme-moonlight .wage-onboarding-language select {
  color: #fff8ff;
  border-color: rgba(255, 166, 215, 0.48);
  background: rgba(37, 13, 47, 0.86);
}

body.theme-pocket .wage-onboarding-language select {
  color: #1c3327;
  border: 2px solid #385043;
  border-radius: 2px;
  background: #edf1e8;
  box-shadow: 2px 2px 0 #263c31;
}

.wage-onboarding-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(87, 255, 171, 0.16);
  border-radius: 20px;
}

.wage-onboarding-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 227, 106, 0.75);
  border-radius: 23px;
  color: #082016;
  background: linear-gradient(135deg, #ffe66e, #55ffa8 72%);
  box-shadow: 0 14px 30px rgba(33, 255, 144, 0.22);
  transform: rotate(-4deg);
}

.wage-onboarding-mark span { font-size: 34px; font-weight: 950; line-height: 1; }
.wage-onboarding-mark i { position: absolute; right: -8px; bottom: -8px; width: 22px; height: 22px; border: 4px solid #07150f; border-radius: 50%; background: #ffde61; }
.wage-onboarding-card header { position: relative; display: grid; gap: 7px; }
.wage-onboarding-card header small { color: #72ffb5; font-size: 11px; font-weight: 900; letter-spacing: 0.2em; }
.wage-onboarding-card header h2 { margin: 0; font-size: clamp(28px, 8vw, 42px); line-height: 1.08; letter-spacing: -0.04em; }
.wage-onboarding-card header p { margin: 0; color: #a9c7b9; font-size: 15px; line-height: 1.7; }

.wage-onboarding-period { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; min-width: 0; margin: 0; padding: 0; border: 0; }
.wage-onboarding-period legend { grid-column: 1 / -1; width: 100%; margin-bottom: 2px; color: #cfe7db; font-size: 13px; font-weight: 800; }
.wage-onboarding-period label { position: relative; cursor: pointer; }
.wage-onboarding-period input { position: absolute; opacity: 0; pointer-events: none; }
.wage-onboarding-period label > span { display: grid; gap: 3px; min-height: 72px; padding: 13px 15px; border: 1px solid rgba(150, 190, 170, 0.24); border-radius: 16px; background: rgba(4, 18, 13, 0.72); transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.wage-onboarding-period b { color: #f4fff9; font-size: 16px; }
.wage-onboarding-period small { color: #819d90; font-size: 12px; }
.wage-onboarding-period input:checked + span { border-color: #63ffad; background: linear-gradient(135deg, rgba(52, 255, 150, 0.2), rgba(255, 222, 97, 0.1)); box-shadow: 0 0 0 1px rgba(99, 255, 173, 0.1) inset; transform: translateY(-1px); }
.wage-onboarding-period input:checked + span b { color: #75ffb8; }
.wage-onboarding-period input:focus-visible + span { outline: 2px solid #ffe36d; outline-offset: 3px; }

.wage-onboarding-amount { position: relative; display: grid; gap: 8px; }
.wage-onboarding-amount > span { color: #cfe7db; font-size: 13px; font-weight: 800; }
.wage-onboarding-amount > div { display: grid; grid-template-columns: 54px minmax(0, 1fr); min-height: 70px; overflow: hidden; border: 1px solid rgba(255, 225, 101, 0.52); border-radius: 18px; background: rgba(1, 10, 7, 0.76); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18); }
.wage-onboarding-amount i { display: grid; place-items: center; color: #ffdc62; border-right: 1px solid rgba(255, 225, 101, 0.24); font-size: 24px; font-style: normal; font-weight: 950; }
.wage-onboarding-amount input { min-width: 0; width: 100%; padding: 0 17px; color: #f3fff8; border: 0; outline: 0; background: transparent; font: 900 25px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.wage-onboarding-amount input::placeholder { color: #527063; opacity: 1; }
.wage-onboarding-amount > div:focus-within { border-color: #68ffb0; box-shadow: 0 0 0 3px rgba(80, 255, 166, 0.12), 0 14px 32px rgba(0, 0, 0, 0.22); }

.wage-onboarding-preview { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 58px; padding: 11px 14px; border: 1px solid rgba(97, 255, 176, 0.18); border-radius: 15px; background: rgba(31, 91, 62, 0.18); }
.wage-onboarding-preview > span { display: grid; place-items: center; width: 32px; height: 32px; color: #062015; border-radius: 10px; background: #64ffad; font-size: 18px; font-weight: 950; }
.wage-onboarding-preview p { margin: 0; color: #b8d8c8; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.wage-onboarding-status { min-height: 18px; margin: -9px 0 -8px; color: #ff9a8c; font-size: 12px; font-weight: 750; text-align: center; }

.wage-onboarding-start { position: relative; display: grid; place-items: center; gap: 2px; min-height: 72px; padding: 11px 18px; color: #03160d; border: 0; border-radius: 18px; background: linear-gradient(105deg, #ffe169, #61ffac 70%); box-shadow: 0 16px 34px rgba(47, 255, 155, 0.2); cursor: pointer; }
.wage-onboarding-start span { font-size: 20px; font-weight: 950; }
.wage-onboarding-start small { color: rgba(3, 22, 13, 0.68); font-size: 11px; font-weight: 800; }
.wage-onboarding-start:not(:disabled):active { transform: translateY(2px) scale(0.995); }
.wage-onboarding-start:disabled { cursor: not-allowed; filter: grayscale(0.62); opacity: 0.42; box-shadow: none; }

body.theme-moonlight dialog.wage-onboarding-dialog { color: #fff8ff; border-color: rgba(255, 177, 222, 0.72); background: #1c102a; box-shadow: 0 28px 90px rgba(30, 8, 42, 0.64), 0 0 46px rgba(255, 143, 207, 0.18); }
body.theme-moonlight .wage-onboarding-card { background: radial-gradient(circle at 90% 3%, rgba(255, 210, 105, 0.23), transparent 32%), radial-gradient(circle at 7% 42%, rgba(255, 111, 188, 0.17), transparent 34%), linear-gradient(150deg, #44245a, #1d122f 66%); }
body.theme-moonlight .wage-onboarding-card::before { border-color: rgba(255, 190, 226, 0.22); }
body.theme-moonlight .wage-onboarding-mark { color: #4f1d52; border-color: #ffca72; background: linear-gradient(135deg, #ffd878, #ff82c3 58%, #9e93ff); box-shadow: 0 14px 30px rgba(255, 107, 190, 0.27); }
body.theme-moonlight .wage-onboarding-mark i { border-color: #241232; background: #ff8fca; }
body.theme-moonlight .wage-onboarding-card header small, body.theme-moonlight .wage-onboarding-period input:checked + span b { color: #ffb5df; }
body.theme-moonlight .wage-onboarding-card header p, body.theme-moonlight .wage-onboarding-preview p { color: #ddc6e4; }
body.theme-moonlight .wage-onboarding-period input:checked + span { border-color: #ff9ed3; background: linear-gradient(135deg, rgba(255, 114, 192, 0.22), rgba(255, 216, 120, 0.12)); }
body.theme-moonlight .wage-onboarding-amount > div { border-color: rgba(255, 196, 123, 0.6); background: rgba(24, 9, 32, 0.72); }
body.theme-moonlight .wage-onboarding-amount i { color: #ffcb76; }
body.theme-moonlight .wage-onboarding-preview > span { color: #501c4d; background: #ff9ed3; }
body.theme-moonlight .wage-onboarding-start { color: #431b43; background: linear-gradient(105deg, #ffd575, #ff8cc9 54%, #a6a0ff); }

body.theme-pocket dialog.wage-onboarding-dialog { color: #172c21; border: 4px solid #263c31; border-radius: 4px; background: #ced8c4; box-shadow: 9px 9px 0 #263c31, 0 20px 50px rgba(23, 38, 30, 0.45); image-rendering: pixelated; }
body.theme-pocket dialog.wage-onboarding-dialog::backdrop { background: rgba(28, 41, 34, 0.74); backdrop-filter: none; }
body.theme-pocket .wage-onboarding-card { gap: 14px; padding: 24px; background: linear-gradient(#dbe2d1, #c7d2bd); }
body.theme-pocket .wage-onboarding-card::before { inset: 7px; border: 2px dashed rgba(38, 60, 49, 0.32); border-radius: 0; }
body.theme-pocket .wage-onboarding-mark { width: 64px; height: 64px; color: #20382b; border: 3px solid #263c31; border-radius: 2px; background: #e6a437; box-shadow: 5px 5px 0 #263c31; transform: none; }
body.theme-pocket .wage-onboarding-mark i { display: none; }
body.theme-pocket .wage-onboarding-card header small, body.theme-pocket .wage-onboarding-card header h2, body.theme-pocket .wage-onboarding-period legend, body.theme-pocket .wage-onboarding-amount > span { color: #243c30; }
body.theme-pocket .wage-onboarding-card header p { color: #4b5f51; }
body.theme-pocket .wage-onboarding-period label > span, body.theme-pocket .wage-onboarding-amount > div, body.theme-pocket .wage-onboarding-preview { border: 2px solid #385043; border-radius: 2px; background: #edf1e8; box-shadow: 3px 3px 0 rgba(38, 60, 49, 0.45); }
body.theme-pocket .wage-onboarding-period b, body.theme-pocket .wage-onboarding-amount input { color: #1c3327; }
body.theme-pocket .wage-onboarding-period small, body.theme-pocket .wage-onboarding-preview p { color: #56695b; }
body.theme-pocket .wage-onboarding-period input:checked + span { color: #1b2e23; border-color: #263c31; background: #efbd58; box-shadow: 3px 3px 0 #263c31; transform: none; }
body.theme-pocket .wage-onboarding-period input:checked + span b { color: #1c3327; }
body.theme-pocket .wage-onboarding-amount i { color: #172f23; border-right: 2px solid #385043; background: #e6a437; }
body.theme-pocket .wage-onboarding-preview > span { color: #173024; border-radius: 1px; background: #e6a437; }
body.theme-pocket .wage-onboarding-start { color: #172f23; border: 3px solid #263c31; border-radius: 2px; background: #e6a437; box-shadow: 5px 5px 0 #263c31; }

@media (max-width: 560px) {
  dialog.wage-onboarding-dialog { width: calc(100vw - 18px); max-height: calc(100dvh - 18px); border-radius: 22px; }
  .wage-onboarding-card { gap: 14px; padding: 23px 18px 20px; }
  .wage-onboarding-mark { width: 58px; height: 58px; border-radius: 18px; }
  .wage-onboarding-mark span { font-size: 29px; }
  .wage-onboarding-card header h2 { font-size: 30px; }
  .wage-onboarding-card header p { font-size: 13px; line-height: 1.55; }
  .wage-onboarding-period label > span { min-height: 64px; padding: 11px 12px; }
  .wage-onboarding-amount > div { min-height: 64px; }
  .wage-onboarding-start { min-height: 66px; }
  body.theme-pocket dialog.wage-onboarding-dialog { border-radius: 3px; }
  body.theme-pocket .wage-onboarding-card { padding: 20px 15px 18px; }
  .wage-onboarding-language { top: 14px; right: 14px; }
  .wage-onboarding-language > span { position: absolute; overflow: hidden; width: 1px; height: 1px; clip: rect(0 0 0 0); }
  .wage-onboarding-language select { min-width: 104px; }
}

/* Keep the premium sheet independent from the shared settings-dialog grid. */
dialog.premium-paywall-dialog {
  display: block !important;
  grid-template: none !important;
  width: min(620px, calc(100vw - 28px)) !important;
  max-height: calc(100dvh - 28px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  color: #effff6;
  background:
    radial-gradient(circle at 50% 0%, rgba(64, 255, 178, 0.2), transparent 36%),
    linear-gradient(160deg, #071813, #08100e 58%, #171205);
}
dialog.premium-paywall-dialog[open] { display: block !important; }
dialog.premium-paywall-dialog[hidden]:not([open]) { display: none; }
.premium-paywall-dialog h2,
.premium-paywall-dialog b { color: #effff6; }
.premium-paywall-dialog .premium-purchase-button { color: #102017; }
body.theme-moonlight dialog.premium-paywall-dialog {
  border-color: rgba(255, 163, 207, 0.75);
  background: radial-gradient(circle at 50% 0%, rgba(255, 140, 198, 0.34), transparent 38%), linear-gradient(155deg, #372059, #1b1536 65%, #321c3f);
}
body.theme-pocket dialog.premium-paywall-dialog,
body.theme-pocket .premium-lock-overlay > span,
body.theme-pocket .app-language-setting,
body.theme-pocket .app-language-setting select {
  border-radius: 2px;
  box-shadow: 4px 4px 0 #26382e;
}

@media (max-width: 640px) {
  dialog.premium-paywall-dialog {
    width: calc(100vw - 14px) !important;
    max-height: calc(100dvh - 14px) !important;
  }
}

/* Cashflow node deletion confirmation. */
dialog.income-node-delete-dialog {
  display: block !important;
  grid-template: none !important;
  width: min(430px, calc(100vw - 28px)) !important;
  max-height: calc(100dvh - 28px) !important;
  overflow: hidden !important;
}

dialog.income-node-delete-dialog[hidden]:not([open]) {
  display: none !important;
}

.income-node-delete-content {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 24px 24px;
  text-align: center;
}

.income-node-delete-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 111, 128, 0.7);
  border-radius: 18px;
  color: #ff8796;
  background: rgba(255, 86, 108, 0.12);
  box-shadow: 0 0 28px rgba(255, 86, 108, 0.16);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.income-node-delete-content > small {
  color: #ff8796;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.income-node-delete-content h2 {
  margin: 0;
  color: #effff7;
  font-size: 22px;
}

.income-node-delete-content p {
  max-width: 340px;
  margin: 0;
  color: rgba(220, 244, 233, 0.7);
  font-size: 15px;
  line-height: 1.6;
}

.income-node-delete-content > strong {
  width: 100%;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid rgba(57, 248, 143, 0.3);
  border-radius: 10px;
  color: #baffd8;
  background: rgba(57, 248, 143, 0.08);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.income-node-delete-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 10px;
  margin-top: 6px;
}

.income-node-delete-actions button {
  min-height: 48px;
  border: 1px solid rgba(220, 244, 233, 0.24);
  border-radius: 11px;
  color: #eafff4;
  background: rgba(220, 244, 233, 0.08);
  font-size: 16px;
  font-weight: 900;
}

.income-node-delete-actions #incomeNodeDeleteConfirm {
  border-color: rgba(255, 111, 128, 0.62);
  color: #fff4f6;
  background: linear-gradient(135deg, #ce4158, #ff6f77);
}

body.theme-moonlight .income-node-delete-content > strong {
  border-color: rgba(255, 158, 211, 0.5);
  color: #ffe1f2;
  background: rgba(255, 142, 202, 0.12);
}

body.theme-pocket dialog.income-node-delete-dialog,
body.theme-pocket .income-node-delete-icon,
body.theme-pocket .income-node-delete-content > strong,
body.theme-pocket .income-node-delete-actions button {
  border-radius: 2px;
  box-shadow: 4px 4px 0 #26382e;
}

body.theme-pocket .income-node-delete-content h2,
body.theme-pocket .income-node-delete-content p {
  color: #20382b;
}

body.theme-pocket .income-node-delete-content > strong {
  color: #20382b;
  border-color: #385043;
  background: #edf1e8;
}

/* Final English settings fit: no horizontal pan inside the iPhone dialog. */
dialog.app-settings-dialog {
  color: var(--text);
}

body.is-english .app-settings-dialog-body {
  overflow-x: hidden !important;
}

body.is-english dialog.app-settings-dialog .income-editor-head h2 {
  color: var(--text);
}

body.is-english dialog.app-settings-dialog :is(small, p) {
  font-size: max(10.5px, 0.58rem);
  line-height: 1.3;
}

body.is-english .app-title-setting {
  grid-template-columns: 74px minmax(0, 1fr);
}

body.is-english .app-title-setting > small {
  grid-column: 1 / -1;
  text-align: left;
}

body.is-english .income-progress {
  height: auto;
  min-height: 34px;
  padding: 4px 5px;
}

body.is-english .income-progress span {
  overflow: visible;
  max-width: 100%;
  line-height: 1.15;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
}

@media (max-width: 640px) {
  body.is-english .premium-settings-group,
  body.is-english .source-editor,
  body.is-english .source-row,
  body.is-english .income-field,
  body.is-english .income-config-controls {
    min-width: 0;
    max-width: 100%;
  }

  body.is-english .income-node-status {
    padding-inline: 3px;
    font-size: 0.6rem;
  }
}

/* Wealth ascension V1: full live ticker, 100M vaults and interactive boost. */
.celebrity-terminal {
  min-height: 326px;
}

.celebrity-income-core {
  min-height: 174px !important;
  padding: 14px 3px 10px !important;
}

.celebrity-money {
  container-type: inline-size;
  width: 100%;
}

.celebrity-wealth-stage {
  --stage-color: #5fffb7;
  position: relative;
  display: inline-flex;
  max-width: calc(100% - 12px);
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 4px 10px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--stage-color) 42%, transparent);
  border-radius: 999px;
  color: color-mix(in srgb, var(--stage-color) 82%, white 18%);
  background: color-mix(in srgb, var(--stage-color) 8%, rgba(2, 14, 17, 0.88));
  box-shadow: inset 0 0 16px color-mix(in srgb, var(--stage-color) 8%, transparent), 0 0 16px color-mix(in srgb, var(--stage-color) 10%, transparent);
  font-size: 0.55rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.celebrity-wealth-stage::after {
  position: absolute;
  inset: auto 0 0;
  width: var(--vault-progress, 0%);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--stage-color));
  content: "";
  box-shadow: 0 0 10px var(--stage-color);
}

.celebrity-wealth-stage > i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--stage-color);
  box-shadow: 0 0 10px var(--stage-color);
}

.celebrity-wealth-stage[data-stage="1"] { --stage-color: #6ef5ff; }
.celebrity-wealth-stage[data-stage="2"] { --stage-color: #b892ff; }
.celebrity-wealth-stage[data-stage="3"] { --stage-color: #ffcc66; }
.celebrity-wealth-stage[data-stage="4"] { --stage-color: #ff7f88; }
.celebrity-wealth-stage[data-stage="5"] { --stage-color: #fff2a0; }

.celebrity-wealth-ledger {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 7px;
  margin: 0 2px 7px;
  padding: 8px 10px 11px;
  overflow: hidden;
  border: 1px solid rgba(97, 238, 184, 0.2);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(33, 119, 91, 0.12), rgba(4, 17, 23, 0.78));
}

.celebrity-wealth-ledger > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.celebrity-wealth-ledger small {
  color: rgba(211, 240, 227, 0.54);
  font-size: 0.48rem;
  font-weight: 850;
}

.celebrity-wealth-ledger strong {
  overflow: hidden;
  color: #f5fff8;
  font: 950 0.66rem/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.celebrity-wealth-ledger > div:last-of-type strong {
  color: #ffe477;
}

.celebrity-wealth-ledger > span {
  position: absolute;
  right: 8px;
  bottom: 5px;
  left: 8px;
  height: 2px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(204, 255, 229, 0.1);
}

.celebrity-wealth-ledger > span i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #51f7b0, #ffe574);
  box-shadow: 0 0 9px rgba(99, 255, 184, 0.72);
  transition: width 260ms linear;
}

.celebrity-boost-button {
  position: relative;
  z-index: 3;
  display: grid;
  width: 100%;
  min-height: 40px;
  place-items: center;
  margin-top: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 224, 103, 0.52);
  border-radius: 9px;
  color: #111d18;
  background: linear-gradient(105deg, #60f2b5, #d9f56d 52%, #ffd066);
  box-shadow: 0 0 20px rgba(98, 248, 178, 0.14), inset 0 1px rgba(255, 255, 255, 0.48);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.celebrity-boost-button > span {
  width: 100%;
  font-size: 0.68rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.celebrity-boost-button > small {
  width: 100%;
  color: rgba(12, 26, 19, 0.66);
  font-size: 0.5rem;
  font-weight: 900;
  text-align: center;
}

.celebrity-milestone-fx[data-tier="5"] {
  border-color: rgba(255, 240, 131, 0.96);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 210, 0.34), transparent 42%),
    linear-gradient(135deg, rgba(19, 255, 174, 0.95), rgba(255, 204, 61, 0.96) 54%, rgba(255, 92, 118, 0.94));
  box-shadow: 0 0 52px rgba(255, 222, 91, 0.72), 0 0 96px rgba(65, 255, 184, 0.4), inset 0 0 24px rgba(255, 255, 255, 0.46);
}

.celebrity-milestone-fx[data-tier="5"] strong {
  color: #fffceb;
  text-shadow: 0 2px 0 rgba(65, 30, 0, 0.55), 0 0 22px rgba(255, 255, 218, 0.96);
}

.celebrity-milestone-fx[data-tier="5"].show {
  animation-duration: 4.6s;
}

.celebrity-panel.is-target-celebrating .celebrity-terminal {
  animation: celebrityTargetComplete 1.05s cubic-bezier(.16,.82,.18,1) 3;
}

@keyframes celebrityTargetComplete {
  0%, 100% { filter: brightness(1) saturate(1); transform: scale(1); }
  42% { filter: brightness(1.65) saturate(1.45); transform: scale(1.012); box-shadow: 0 0 52px rgba(255, 222, 91, 0.38); }
}

.celebrity-boost-button:disabled.is-cooling {
  cursor: wait;
  filter: saturate(0.72) brightness(0.9);
  opacity: 0.82;
}

.celebrity-boost-button:disabled.is-cooling > span,
.celebrity-boost-button:disabled.is-cooling > small {
  pointer-events: none;
}

.celebrity-boost-button:active {
  transform: scale(0.975);
  filter: brightness(1.18);
}

.celebrity-panel.is-boosting .celebrity-income-core {
  animation: celebrityWealthBoost 920ms cubic-bezier(.12,.82,.18,1) both;
}

.celebrity-panel.is-boosting .celebrity-wealth-ledger {
  animation: celebrityVaultFlash 1.05s ease-out both;
}

.celebrity-panel[data-wealth-stage="2"] .celebrity-terminal,
.celebrity-panel[data-wealth-stage="3"] .celebrity-terminal,
.celebrity-panel[data-wealth-stage="4"] .celebrity-terminal,
.celebrity-panel[data-wealth-stage="5"] .celebrity-terminal {
  border-color: rgba(255, 221, 99, 0.32);
  box-shadow: inset 0 0 44px rgba(95, 255, 180, 0.05), 0 0 26px rgba(255, 215, 78, 0.08);
}

.celebrity-milestone-fx[data-variant="1"] { transform-origin: 30% 50%; }
.celebrity-milestone-fx[data-variant="2"] { transform-origin: 70% 50%; }
.celebrity-milestone-fx[data-variant="3"] { border-style: double; }

@keyframes celebrityWealthBoost {
  0% { filter: brightness(1); transform: scale(1); }
  18% { filter: brightness(2.2) saturate(1.5); transform: scale(0.97); }
  42% { filter: brightness(1.5) saturate(1.32); transform: scale(1.035); }
  100% { filter: brightness(1); transform: scale(1); }
}

@keyframes celebrityVaultFlash {
  0% { border-color: rgba(97, 238, 184, 0.2); }
  30% { border-color: rgba(255, 234, 126, 0.94); box-shadow: 0 0 32px rgba(255, 218, 70, 0.4), inset 0 0 20px rgba(98, 255, 184, 0.22); }
  100% { border-color: rgba(97, 238, 184, 0.2); }
}

body.theme-moonlight .celebrity-boost-button {
  color: #3f224d;
  background: linear-gradient(105deg, #ff93bd, #ffd470 48%, #9aeecb);
}

body.theme-pocket .celebrity-wealth-stage,
body.theme-pocket .celebrity-wealth-ledger,
body.theme-pocket .celebrity-boost-button {
  border-radius: 2px !important;
  box-shadow: 3px 3px 0 #33483c !important;
}

body.theme-pocket .celebrity-boost-button {
  color: #1d2c24 !important;
  background: #e5a433 !important;
}

@media (max-width: 640px) {
  .celebrity-terminal { min-height: 310px; }
  .celebrity-income-core { min-height: 158px !important; padding-block: 10px 8px !important; }
  .celebrity-wealth-ledger { padding-inline: 8px; }
  .celebrity-wealth-ledger strong { font-size: 0.6rem; }
  .celebrity-boost-button > small { max-width: none; text-align: center; }
  body.is-english .celebrity-terminal-head > span {
    font-size: 0.52rem;
    letter-spacing: -0.015em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .celebrity-panel.is-boosting .celebrity-income-core,
  .celebrity-panel.is-boosting .celebrity-wealth-ledger {
    animation-duration: 1ms !important;
  }
}

/* Daily lottery matching + four-reel wealth machine. */
.lottery-winning-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  padding: 8px 7px;
  border: 1px solid rgba(255, 224, 102, 0.28);
  border-radius: 8px;
  background: linear-gradient(105deg, rgba(255, 213, 77, 0.08), rgba(57, 248, 143, 0.045));
}

.lottery-winning-line > span {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  column-gap: 5px;
}

.lottery-winning-line > span > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffda62;
  box-shadow: 0 0 10px #ffda62;
}

.lottery-winning-line > span > b {
  color: #ffe98c;
  font-size: 0.52rem;
  line-height: 1.15;
  white-space: nowrap;
}

.lottery-winning-line > span > small {
  overflow: hidden;
  color: rgba(221, 240, 229, 0.45);
  font-size: 0.38rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lottery-winning-digits {
  display: grid;
  grid-template-columns: repeat(var(--winning-columns, 7), minmax(0, 1fr));
  gap: 3px;
  min-width: 0;
}

.lottery-winning-digits i {
  position: relative;
  display: grid;
  min-width: 0;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 226, 118, 0.42);
  border-radius: 7px;
  color: #fff5b0;
  background: linear-gradient(180deg, rgba(255, 246, 189, 0.18), rgba(255, 211, 80, 0.06));
  box-shadow: inset 0 0 8px rgba(255,255,255,.06);
  font: 1000 0.82rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease;
}

.lottery-winning-digits[data-mode="powerball"] i,
.lottery-winning-digits[data-mode="mega"] i {
  width: min(100%, 44px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: 0.68rem;
}

.lottery-winning-digits[data-mode="powerball"],
.lottery-winning-digits[data-mode="mega"] {
  width: calc(100% + 14px);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  justify-content: center;
  margin-inline: -7px;
  padding: 5px;
}
.lottery-winning-digits i.is-special {
  color: #161b16;
  background: linear-gradient(145deg, #ffcf59, #ff7a68);
  box-shadow: 0 0 9px rgba(255, 190, 74, 0.3);
}

.lottery-winning-digits.has-matches i:not(.is-matched) {
  opacity: 0.42;
  filter: grayscale(0.45) brightness(0.72);
}

.lottery-winning-digits i.is-matched {
  z-index: 2;
  border-color: #faffb2;
  color: #092015;
  background: linear-gradient(145deg, #fff39a, #5dffb1 62%, #48e9ff);
  box-shadow: 0 0 10px rgba(255, 243, 122, 0.95), 0 0 24px rgba(73, 255, 177, 0.72), inset 0 0 9px rgba(255,255,255,.68);
  animation: lotteryWinningNumberHit 860ms cubic-bezier(.14,.88,.2,1.18) 2;
  transform: scale(1.08);
}

.lottery-winning-digits i.is-matched::after {
  position: absolute;
  top: -6px;
  right: -5px;
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 50%;
  color: #092015;
  background: #fff17c;
  content: "✓";
  box-shadow: 0 0 10px #fff17c;
  font: 1000 9px/1 sans-serif;
}

.lottery-match-result {
  min-height: 17px;
  margin-top: 5px;
  color: rgba(214, 240, 226, 0.56);
  font-size: 0.44rem;
  font-weight: 800;
  text-align: center;
}

.lottery-match-result.is-jackpot {
  color: #fff39d;
  text-shadow: 0 0 12px rgba(255, 220, 87, 0.8);
}

.lottery-machine.is-jackpot {
  animation: lotteryJackpotImpact 720ms cubic-bezier(.16,.88,.2,1.18) 3 !important;
  border-color: rgba(255, 236, 126, 0.95) !important;
  box-shadow: 0 0 34px rgba(255, 215, 71, 0.52), inset 0 0 28px rgba(80, 255, 176, 0.22) !important;
}

.celebrity-session {
  display: grid !important;
  grid-template-columns: 1fr !important;
  margin: 4px 0 0 !important;
  padding-top: 7px !important;
}

.celebrity-session button {
  width: 100%;
  min-height: 34px;
}

.celebrity-fruit-machine {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 9px;
  margin-top: 8px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 221, 96, 0.38);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 222, 87, 0.11), transparent 48%),
    linear-gradient(145deg, rgba(16, 48, 36, 0.92), rgba(3, 17, 22, 0.96));
  box-shadow: inset 0 0 28px rgba(83, 255, 176, 0.08), 0 0 22px rgba(255, 213, 70, 0.07);
}

.celebrity-fruit-machine::before {
  position: absolute;
  z-index: 0;
  top: -40%;
  bottom: -40%;
  left: -34%;
  width: 23%;
  background: linear-gradient(90deg, transparent, rgba(255,255,210,.68), transparent);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: skewX(-18deg);
}

.celebrity-fruit-machine::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 248, 158, 0.72), rgba(255, 205, 54, 0.16) 34%, transparent 68%),
    linear-gradient(115deg, transparent 18%, rgba(255,255,255,.72) 48%, transparent 78%);
  content: "";
  opacity: 0;
  pointer-events: none;
}

.celebrity-fruit-machine.is-spinning::before {
  animation: celebrityFruitSweep 1.05s ease-in-out infinite;
}

.celebrity-fruit-machine.is-jackpot::after {
  animation: celebrityJackpotFlash 980ms cubic-bezier(.14,.82,.2,1) 3 both;
}
.celebrity-fruit-machine.is-pair-win::after {
  animation: celebrityJackpotFlash 760ms cubic-bezier(.14,.82,.2,1) 1 both;
}
.celebrity-fruit-machine.is-triple-win::after {
  animation: celebrityJackpotFlash 840ms cubic-bezier(.14,.82,.2,1) 2 both;
}

.celebrity-fruit-machine > * { position: relative; z-index: 1; }

.celebrity-fruit-machine header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.celebrity-fruit-machine header span,
.celebrity-fruit-machine header b {
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.celebrity-energy-wallet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 224, 101, 0.26);
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(255, 218, 75, 0.1), rgba(63, 255, 177, 0.08));
  box-shadow: inset 0 0 16px rgba(255, 224, 101, 0.05);
}

.celebrity-energy-wallet > span {
  display: flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.celebrity-energy-wallet > span small,
.celebrity-energy-wallet > small {
  color: rgba(218, 244, 228, 0.68);
  font-size: 0.46rem;
  font-weight: 850;
}

.celebrity-energy-wallet strong {
  color: #ffe267;
  font: 1000 0.86rem/1 ui-rounded, "Arial Rounded MT Bold", sans-serif;
  text-shadow: 0 0 13px rgba(255, 219, 71, 0.62);
}

body.theme-moonlight .celebrity-energy-wallet {
  border-color: rgba(255, 164, 214, 0.38);
  background: linear-gradient(90deg, rgba(255, 139, 203, 0.15), rgba(255, 222, 105, 0.1));
}

body.theme-moonlight .celebrity-energy-wallet strong { color: #ffd871; text-shadow: 0 0 13px rgba(255, 130, 205, 0.72); }
body.theme-pocket .celebrity-energy-wallet { border: 2px solid #31483a; border-radius: 2px; background: #d9e1d1; box-shadow: 3px 3px 0 #31483a; }
body.theme-pocket .celebrity-energy-wallet :is(small, strong) { color: #20392b; text-shadow: none; }

.workday-countdown-card[data-phase="paused"] {
  opacity: 0.82;
}

.workday-countdown-card[data-phase="paused"] .timer-reminder-readout strong {
  filter: saturate(0.58);
}

.celebrity-fruit-machine header span { color: #70ffc0; }
.celebrity-fruit-machine header span i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #64ffb7;
  box-shadow: 0 0 10px #64ffb7;
}
.celebrity-fruit-machine header b {
  color: #ffe478;
  font-size: 0.66rem;
  text-shadow: 0 0 12px rgba(255, 222, 91, .5);
}

.celebrity-fruit-reels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(89, 255, 181, 0.16);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(0, 7, 11, 0.9), rgba(4, 22, 19, 0.82));
  box-shadow: inset 0 0 18px rgba(0,0,0,.5), 0 0 16px rgba(79, 255, 180, .08);
}

.celebrity-fruit-reels::after {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: 5px;
  left: 5px;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, #65ffb6 14%, #fff28a 50%, #65ffb6 86%, transparent);
  box-shadow: 0 0 9px #fff6a8, 0 0 26px rgba(89,255,178,.94), 0 0 42px rgba(255,217,71,.72);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scaleX(.08);
  transform-origin: center;
}

.celebrity-fruit-machine.is-jackpot .celebrity-fruit-reels::after {
  animation: celebrityWinningLine 1.05s cubic-bezier(.12,.86,.18,1.12) 3 both;
}
.celebrity-fruit-machine.is-pair-win .celebrity-fruit-reels::after {
  height: 2px;
  opacity: .72;
  animation: celebrityWinningLine 780ms cubic-bezier(.12,.86,.18,1.12) 1 both;
}
.celebrity-fruit-machine.is-triple-win .celebrity-fruit-reels::after {
  height: 3px;
  animation: celebrityWinningLine 900ms cubic-bezier(.12,.86,.18,1.12) 2 both;
}

.celebrity-fruit-reels > i {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 74px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(92, 255, 185, 0.44);
  border-radius: 10px;
  background:
    linear-gradient(rgba(77, 255, 183, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 255, 183, .055) 1px, transparent 1px),
    radial-gradient(circle at 50% 32%, rgba(66, 255, 183, .17), transparent 45%),
    linear-gradient(180deg, #0c2921, #041512 58%, #1d2e1d);
  background-size: 8px 8px, 8px 8px, auto, auto;
  box-shadow: inset 0 -8px 14px rgba(0, 6, 8, 0.62), inset 0 7px 12px rgba(91,255,188,.08), 0 6px 14px rgba(0, 0, 0, 0.4), 0 0 12px rgba(73,255,177,.08);
  font-style: normal;
}

.celebrity-fruit-reels > i::before,
.celebrity-fruit-reels > i::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 18%;
  content: "";
  pointer-events: none;
}
.celebrity-fruit-reels > i::before { top: 0; background: linear-gradient(#80978a66, transparent); }
.celebrity-fruit-reels > i::after { bottom: 0; background: linear-gradient(transparent, #6e7f7466); }

.celebrity-fruit-reels span {
  color: #fff0a0;
  font: 1000 clamp(1.8rem, 8.5vw, 2.55rem)/1 ui-rounded, "Arial Rounded MT Bold", sans-serif;
  text-shadow: 0 0 8px rgba(255, 224, 91, .72), 0 0 20px rgba(72, 255, 180, .32);
  filter: drop-shadow(0 3px rgba(0,0,0,.55));
}

.celebrity-fruit-reels > i.is-spinning {
  border-color: rgba(94, 255, 188, .8);
  box-shadow: inset 0 -8px 14px rgba(28,55,42,.22), 0 0 18px rgba(82,255,184,.32);
}
.celebrity-fruit-reels > i.is-spinning span { animation: celebrityFruitRoll 150ms linear infinite; filter: blur(1px) saturate(1.3); }
.celebrity-fruit-reels > i.is-locked { animation: celebrityFruitLock 560ms cubic-bezier(.12,.86,.22,1.3) both; }
.celebrity-fruit-machine.is-pair-win { animation: celebrityPairWin 720ms cubic-bezier(.14,.86,.2,1.12) 2; }
.celebrity-fruit-machine.is-triple-win { animation: celebrityTripleWin 660ms cubic-bezier(.14,.86,.2,1.14) 3; }
.celebrity-fruit-machine.is-jackpot { animation: celebrityFruitJackpot 660ms cubic-bezier(.14,.86,.2,1.15) 4; }
.celebrity-fruit-machine.is-jackpot .celebrity-fruit-reels { box-shadow: 0 0 26px rgba(255, 222, 76, 0.58), inset 0 0 16px rgba(255,255,255,.18); }
.celebrity-fruit-machine.is-pair-win .celebrity-fruit-reels > i.is-winning {
  z-index: 2;
  border-color: rgba(109,255,189,.92);
  animation: celebrityWinningReel 680ms cubic-bezier(.12,.88,.18,1.18) 1 both;
  box-shadow: 0 0 14px rgba(83,255,180,.58), inset 0 0 12px rgba(255,255,255,.12);
}
.celebrity-fruit-machine.is-triple-win .celebrity-fruit-reels > i.is-winning {
  z-index: 2;
  border-color: #fff09a;
  animation: celebrityWinningReel 760ms cubic-bezier(.12,.88,.18,1.18) 2 both;
  box-shadow: 0 0 17px rgba(255,236,132,.76), 0 0 28px rgba(83,255,180,.5), inset 0 0 16px rgba(255,255,255,.16);
}
.celebrity-fruit-machine:is(.is-pair-win, .is-triple-win) .celebrity-fruit-reels > i.is-winning span {
  color: #fff9bf;
  text-shadow: 0 0 8px #fff, 0 0 18px #6dffbd, 0 0 28px rgba(255,224,91,.66);
}
.celebrity-fruit-machine.is-jackpot .celebrity-fruit-reels > i.is-winning {
  z-index: 3;
  border-color: #fff7af;
  animation: celebrityWinningReel 860ms cubic-bezier(.12,.88,.18,1.18) 3 both;
  box-shadow: 0 0 18px rgba(255,243,139,.92), 0 0 34px rgba(83,255,180,.72), inset 0 0 20px rgba(255,255,255,.22);
}
.celebrity-fruit-machine.is-jackpot .celebrity-fruit-reels > i.is-winning span {
  color: #fffbd0;
  text-shadow: 0 0 9px #fff, 0 0 21px #ffe26b, 0 0 38px #62ffb6;
}
.celebrity-fruit-machine.is-core-jackpot .celebrity-fruit-reels > i.is-winning,
.celebrity-fruit-machine.is-ultimate-jackpot .celebrity-fruit-reels > i.is-winning {
  background: radial-gradient(circle at 50% 38%, rgba(255,246,153,.46), transparent 48%), linear-gradient(180deg, #553f0e, #171b0d 64%, #4b2e08);
}

.celebrity-jackpot-banner {
  position: absolute !important;
  z-index: 7 !important;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(86%, 390px);
  place-items: center;
  gap: 3px;
  padding: 11px 14px 12px;
  border: 2px solid rgba(255,249,177,.96);
  border-radius: 12px;
  color: #13251a;
  background: linear-gradient(110deg, #61ffb5, #fff28d 48%, #ffb94f);
  box-shadow: 0 0 18px rgba(255,255,192,.98), 0 0 48px rgba(255,213,70,.78), 0 16px 34px rgba(0,0,0,.5);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%) scale(.28) rotate(-5deg);
}
.celebrity-jackpot-banner small {
  font-size: .4rem;
  font-weight: 1000;
  letter-spacing: .18em;
}
.celebrity-jackpot-banner strong {
  font-size: clamp(.9rem, 4vw, 1.3rem);
  font-weight: 1000;
  line-height: 1.08;
}
.celebrity-jackpot-banner span {
  font-size: .48rem;
  font-weight: 950;
}
.celebrity-fruit-machine.is-jackpot .celebrity-jackpot-banner {
  animation: celebrityJackpotBanner 3.35s cubic-bezier(.12,.88,.18,1.08) both;
}
.celebrity-fruit-machine.is-pair-win .celebrity-jackpot-banner {
  width: min(72%, 310px);
  padding-block: 8px;
  background: linear-gradient(110deg, #66f4bd, #dfffaf 58%, #ffe179);
  box-shadow: 0 0 16px rgba(102,244,189,.82), 0 12px 28px rgba(0,0,0,.42);
  animation: celebrityJackpotBanner 1.55s cubic-bezier(.12,.88,.18,1.08) both;
}
.celebrity-fruit-machine.is-triple-win .celebrity-jackpot-banner {
  width: min(80%, 350px);
  background: linear-gradient(110deg, #5dffb4, #fff092 52%, #ffb852);
  box-shadow: 0 0 20px rgba(255,245,166,.9), 0 0 42px rgba(91,255,181,.58), 0 16px 32px rgba(0,0,0,.46);
  animation: celebrityJackpotBanner 2.35s cubic-bezier(.12,.88,.18,1.08) both;
}
.celebrity-fruit-machine.is-ultimate-jackpot .celebrity-jackpot-banner {
  background: linear-gradient(110deg, #fff59d, #ffca3d 45%, #ff6f58);
  box-shadow: 0 0 24px #fffbd1, 0 0 68px rgba(255,195,50,.98), 0 20px 42px rgba(0,0,0,.58);
}

.celebrity-fruit-machine .celebrity-boost-button {
  min-height: 50px;
  margin-top: 0;
  border-width: 2px;
  box-shadow: 0 0 24px rgba(98,248,178,.22), inset 0 1px rgba(255,255,255,.72);
}
.celebrity-fruit-machine .celebrity-boost-button > span { font-size: .78rem; }
.celebrity-fruit-machine > p {
  min-height: 14px;
  margin: 0;
  color: rgba(216, 241, 226, 0.56);
  font-size: 0.44rem;
  font-weight: 800;
  text-align: center;
}

body.theme-moonlight .celebrity-fruit-machine {
  border-color: rgba(255, 162, 214, 0.52);
  background: linear-gradient(145deg, rgba(60, 22, 71, 0.94), rgba(20, 31, 51, 0.96));
}
body.theme-moonlight .celebrity-fruit-reels > i {
  border-color: rgba(255, 148, 207, .58);
  background: radial-gradient(circle at 50% 30%, rgba(255,154,213,.22), transparent 48%), linear-gradient(180deg, #492440, #221326 62%, #38253e);
}
body.theme-moonlight .celebrity-fruit-reels span { color: #ffe5f5; text-shadow: 0 0 12px #ff87ca, 0 0 24px rgba(255,216,111,.36); }
body.theme-pocket .celebrity-fruit-machine,
body.theme-pocket .celebrity-fruit-reels,
body.theme-pocket .celebrity-fruit-reels > i { border-radius: 2px !important; }
body.theme-pocket .celebrity-fruit-machine { box-shadow: 4px 4px 0 #33483c !important; }
body.theme-pocket .celebrity-jackpot-banner { border-radius: 2px !important; box-shadow: 5px 5px 0 #31483a, 0 0 28px rgba(229,164,51,.62) !important; }
body.theme-pocket .celebrity-fruit-reels > i {
  border: 2px solid #31483a !important;
  background: #d9e1d1 !important;
  box-shadow: 3px 3px 0 #31483a !important;
}
body.theme-pocket .celebrity-fruit-reels span { color: #20392b; text-shadow: none; filter: none; }

@keyframes lotteryJackpotImpact {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  42% { filter: brightness(1.65) saturate(1.45); transform: scale(1.025); }
}
@keyframes lotteryWinningNumberHit {
  0% { filter: brightness(.8); transform: scale(.72) rotate(-5deg); }
  48% { filter: brightness(1.8) saturate(1.45); transform: scale(1.2) rotate(2deg); }
  100% { filter: brightness(1); transform: scale(1.08) rotate(0); }
}
@keyframes celebrityFruitRoll {
  0% { opacity: .25; transform: translateY(-34%) scale(.72) rotate(-5deg); }
  50% { opacity: 1; transform: translateY(0) scale(1.18) rotate(3deg); }
  100% { opacity: .25; transform: translateY(34%) scale(.72) rotate(-3deg); }
}
@keyframes celebrityFruitLock {
  0% { filter: brightness(2.4) saturate(1.5); transform: scale(.62) rotate(-7deg); }
  45% { filter: brightness(1.6) saturate(1.35); transform: scale(1.24) rotate(3deg); box-shadow: 0 0 26px rgba(255,224,96,.72); }
  72% { filter: brightness(1.2); transform: scale(.95); }
  100% { filter: brightness(1); transform: scale(1); }
}
@keyframes celebrityFruitSweep {
  0%, 8% { left: -34%; opacity: 0; }
  28% { opacity: .9; }
  72% { opacity: .55; }
  100% { left: 116%; opacity: 0; }
}
@keyframes celebrityPairWin {
  0%, 100% { border-color: rgba(255,221,96,.38); filter: brightness(1); transform: scale(1); }
  50% { border-color: rgba(101,255,187,.9); filter: brightness(1.24) saturate(1.18); transform: scale(1.008); box-shadow: 0 0 24px rgba(83,255,180,.34); }
}
@keyframes celebrityTripleWin {
  0%, 100% { border-color: rgba(255,221,96,.38); filter: brightness(1); transform: scale(1); }
  50% { border-color: #ffe888; filter: brightness(1.48) saturate(1.35); transform: scale(1.016); box-shadow: 0 0 34px rgba(255,220,85,.46), 0 0 48px rgba(83,255,180,.2); }
}
@keyframes celebrityFruitJackpot {
  0%, 100% { border-color: rgba(255, 221, 96, 0.38); filter: brightness(1); transform: scale(1); }
  50% { border-color: #fff0a0; filter: brightness(1.72) saturate(1.55); transform: scale(1.025); box-shadow: 0 0 48px rgba(255, 216, 71, .68), 0 0 76px rgba(84,255,181,.28); }
}
@keyframes celebrityWinningReel {
  0% { filter: brightness(.85); transform: translateY(0) scale(.78); }
  34% { filter: brightness(2.15) saturate(1.55); transform: translateY(-4px) scale(1.16); }
  62% { filter: brightness(1.28); transform: translateY(2px) scale(.96); }
  100% { filter: brightness(1.08); transform: translateY(0) scale(1.04); }
}
@keyframes celebrityWinningLine {
  0% { opacity: 0; transform: translateY(-50%) scaleX(.04); }
  28% { opacity: 1; transform: translateY(-50%) scaleX(1.04); }
  58% { opacity: .9; transform: translateY(-50%) scaleX(.92); }
  100% { opacity: 0; transform: translateY(-50%) scaleX(1.08); }
}
@keyframes celebrityJackpotFlash {
  0% { opacity: 0; transform: scale(.86); }
  30% { opacity: .9; transform: scale(1.08); }
  64% { opacity: .18; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.12); }
}
@keyframes celebrityJackpotBanner {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.24) rotate(-6deg); }
  9% { opacity: 1; transform: translate(-50%, -50%) scale(1.16) rotate(2deg); }
  16% { transform: translate(-50%, -50%) scale(.96) rotate(-1deg); }
  23%, 72% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
  84% { opacity: .96; transform: translate(-50%, -50%) scale(1.05) rotate(0); }
  100% { opacity: 0; transform: translate(-50%, -52%) scale(.62) rotate(2deg); }
}
@media (max-width: 640px) {
  .lottery-winning-line { grid-template-columns: minmax(0, 1fr); gap: 5px; padding: 7px 5px; }
  .lottery-winning-line > span > b { font-size: 0.46rem; }
  .lottery-winning-digits { gap: 2px; }
  .lottery-winning-digits i { height: 38px; font-size: 0.75rem; }
  .lottery-winning-digits[data-mode="powerball"] i,
  .lottery-winning-digits[data-mode="mega"] i { width: min(100%, 42px); height: auto; font-size: 0.68rem; }
  .lottery-winning-digits[data-mode="powerball"],
  .lottery-winning-digits[data-mode="mega"] { width: calc(100% + 10px); margin-inline: -5px; }
  .celebrity-fruit-machine { padding: 10px; }
  .celebrity-energy-wallet { align-items: flex-start; flex-direction: column; gap: 2px; }
  .celebrity-energy-wallet > small { line-height: 1.35; }
  .celebrity-fruit-reels { gap: 5px; padding: 7px; }
  .celebrity-fruit-reels > i { min-height: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  .celebrity-fruit-reels > i.is-spinning span,
  .celebrity-fruit-reels > i.is-winning,
  .celebrity-jackpot-banner,
  .celebrity-fruit-machine.is-pair-win,
  .celebrity-fruit-machine.is-triple-win,
  .celebrity-fruit-machine.is-jackpot,
  .lottery-machine.is-jackpot { animation-duration: 1ms !important; }
}

/* English fortune copy needs a compact seal treatment instead of CJK-sized glyphs. */
body.is-english .break-game-fortune .fortune-auspice {
  width: 100%;
  max-width: 100%;
  padding-inline: 2px;
  overflow: hidden;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: clamp(0.72rem, 3.6vw, 1.02rem) !important;
  letter-spacing: 0.015em !important;
  line-height: 1.05 !important;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

@media (max-width: 640px) {
  body.is-english .break-game-fortune .fortune-result {
    min-height: 212px;
  }

  body.is-english .break-game-fortune .fortune-oracle-footer em {
    -webkit-line-clamp: 3;
  }
}

/* Final cashflow layout authority. */
.control-strip {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 8px !important;
}

.control-strip > .work-toggle-button { width: 100% !important; min-height: 58px !important; }
.control-strip > .cashflow-quick-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 0.85fr) minmax(180px, 1.5fr) minmax(0, 1fr) !important;
  gap: 7px !important;
}
.control-strip .cashflow-quick-actions > button,
.control-strip .cashflow-quick-actions > form { min-width: 0 !important; min-height: 46px !important; }
.source-row .income-node-schedule { grid-row: 2 !important; }
.source-row .income-daily-target { grid-row: 3 !important; }
.source-row .income-progress { grid-row: 4 !important; }
.ledger-correction-card > div > small,
.ledger-contribution-summary header > small,
.ledger-contribution-summary article small {
  color: rgba(222, 239, 229, 0.62) !important;
}
.ledger-correction-card > div > strong,
.ledger-contribution-summary header > span,
.ledger-contribution-summary article b {
  color: #f2fbf5 !important;
}

@media (max-width: 640px) {
  .control-strip > .cashflow-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }
}

/* Cashflow console v3: access ritual, manual deposit, then focus/overtime. */
.control-strip {
  justify-items: center !important;
  gap: 9px !important;
}

.control-strip > .work-toggle-button {
  position: relative;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  width: min(86%, 520px) !important;
  min-height: 68px !important;
  padding: 8px 13px !important;
  overflow: hidden;
  border: 1px solid rgba(91, 255, 183, 0.72);
  border-radius: 16px;
  color: #effff7;
  background:
    linear-gradient(110deg, rgba(38, 251, 139, 0.18), rgba(255, 219, 87, 0.12)),
    rgba(3, 23, 18, 0.96);
  box-shadow: inset 0 0 24px rgba(46, 255, 151, 0.08), 0 10px 28px rgba(0, 0, 0, 0.22);
}

.control-strip > .work-toggle-button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.24) 48%, transparent 72%);
  transform: translateX(-130%);
}

.system-access-orb {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 224, 103, 0.72);
  border-radius: 50%;
  background: radial-gradient(circle, #5cffb0 0 19%, rgba(66, 255, 166, 0.16) 21% 50%, transparent 52%);
  box-shadow: 0 0 18px rgba(68, 255, 166, 0.28);
}

.system-access-orb::before,
.system-access-orb::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(84, 238, 255, 0.5);
  border-radius: 50%;
}

.system-access-orb::before { inset: 5px; }
.system-access-orb::after { inset: -4px; border-style: dashed; }
.system-access-orb b { width: 7px; height: 7px; border-radius: 50%; background: #ffe167; }

.work-toggle-button .system-access-copy {
  display: grid !important;
  min-width: 0;
  justify-items: start;
  gap: 4px;
  text-align: left;
}

.work-toggle-button .system-access-copy strong {
  font-size: clamp(1rem, 3.9vw, 1.16rem);
  font-weight: 1000;
  letter-spacing: 0.04em;
}

.work-toggle-button .system-access-copy small {
  max-width: 100%;
  overflow: hidden;
  color: rgba(224, 245, 235, 0.7);
  font-size: 0.58rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-access-arrow {
  color: #ffe574;
  font-size: 1.48rem;
  font-style: normal;
  font-weight: 400;
}

.control-strip > .ticker-live-income {
  width: min(86%, 520px) !important;
  min-height: 52px !important;
  gap: 7px;
}

.control-strip > .ticker-live-income .ticker-live-income-amount,
.control-strip > .ticker-live-income > button {
  height: 52px !important;
}

.control-strip > .ticker-live-income > button {
  width: 132px;
  flex-basis: 132px;
}

.control-strip > .ticker-live-income > button span { font-size: 0.82rem; }
.control-strip > .ticker-live-income > button small { font-size: 0.48rem; line-height: 1.12; }

.control-strip > .cashflow-quick-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: min(86%, 520px) !important;
  gap: 7px !important;
}

.control-strip .cashflow-quick-actions > button {
  min-height: 50px !important;
  border-radius: 13px;
}

.control-strip .overtime-action {
  border-color: rgba(255, 194, 67, 0.84);
  color: #251407;
  background: linear-gradient(128deg, #ffd34f, #ff9a5c 62%, #ff6e73);
  box-shadow: 0 8px 22px rgba(255, 137, 80, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.control-strip .overtime-action small { color: rgba(53, 24, 8, 0.7); }
.control-strip .overtime-action.is-pending {
  color: #fff7df;
  background: linear-gradient(128deg, #d45129, #9a2467);
  animation: overtimePendingPulse 1.8s ease-in-out infinite;
}
.control-strip .overtime-action.is-pending small { color: rgba(255, 247, 223, 0.78); }

body.system-access-ritual .control-strip > .work-toggle-button {
  animation: systemAccessPulse 1.25s cubic-bezier(.2,.84,.26,1) both;
}
body.system-access-ritual .control-strip > .work-toggle-button::after { animation: systemAccessScan 1s ease-out both; }
body.system-access-ritual .system-access-orb::after { animation: systemAccessOrbit 800ms linear 2; }
body.system-access-ritual .ticker-stage { animation: systemTickerWake 1.1s ease both; }

.session-settlement-swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: -5px 0 0;
  color: rgba(208, 235, 222, 0.66);
  font-size: 0.62rem;
  font-weight: 820;
}
.session-settlement-swipe-hint span {
  display: grid;
  width: 24px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(85, 255, 176, 0.36);
  border-radius: 999px;
  color: #6affb7;
  animation: settlementSwipeCue 1.6s ease-in-out infinite;
}
dialog.session-settlement-dialog.is-suspending[open] { animation: settlementSuspendRight 240ms ease-in both !important; }

@keyframes systemAccessPulse {
  0% { transform: scale(.97); box-shadow: 0 0 0 rgba(64, 255, 170, 0); }
  35% { transform: scale(1.025); box-shadow: 0 0 42px rgba(64, 255, 170, .36); }
  100% { transform: scale(1); }
}
@keyframes systemAccessScan { to { transform: translateX(130%); } }
@keyframes systemAccessOrbit { to { transform: rotate(360deg); } }
@keyframes systemTickerWake { 40% { filter: brightness(1.28) saturate(1.2); transform: scale(1.01); } }
@keyframes overtimePendingPulse { 50% { box-shadow: 0 0 28px rgba(255, 100, 103, .42); } }
@keyframes settlementSwipeCue { 50% { transform: translateX(7px); } }
@keyframes settlementSuspendRight { to { opacity: 0; transform: translateX(58vw) scale(.96); } }

body.theme-moonlight .control-strip .overtime-action {
  color: #42193c;
  background: linear-gradient(128deg, #ffd36c, #ff91cb 58%, #b9a5ff);
}
body.theme-pocket .control-strip > .work-toggle-button,
body.theme-pocket .control-strip > .cashflow-quick-actions,
body.theme-pocket .control-strip > .ticker-live-income { width: min(90%, 520px) !important; }

@media (max-width: 640px) {
  .control-strip > .work-toggle-button,
  .control-strip > .ticker-live-income,
  .control-strip > .cashflow-quick-actions { width: calc(100% - 20px) !important; }
  .control-strip > .work-toggle-button { min-height: 64px !important; grid-template-columns: 38px minmax(0, 1fr) 18px; }
  .system-access-orb { width: 32px; height: 32px; }
  .control-strip > .ticker-live-income > button { width: 118px; flex-basis: 118px; }
}

@media (prefers-reduced-motion: reduce) {
  .control-strip .overtime-action.is-pending,
  .session-settlement-swipe-hint span { animation: none !important; }
}

/* Income-node editor: long schedule states must never collide with controls. */
.source-editor {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.source-row {
  grid-template-columns: minmax(0, 1fr) 34px !important;
  align-items: stretch;
}

.source-row .income-field {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
}

.source-row .income-config-controls {
  grid-template-columns: minmax(86px, .42fr) minmax(0, 1fr) !important;
  gap: 6px !important;
}

.source-row .income-config-controls select {
  padding-inline: 8px !important;
  font-size: .68rem !important;
}

.source-row .income-node-schedule {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
}

.source-row .income-daily-target {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
}

.source-row .income-progress {
  grid-column: 1 / -1 !important;
  grid-row: 4 !important;
}

.source-row .income-node-status {
  grid-column: 1 !important;
  grid-row: 5 !important;
  min-height: 34px;
  padding-inline: 10px;
  border-radius: 7px;
  font-size: .66rem;
}

.source-row .income-delete-button {
  grid-column: 2 !important;
  grid-row: 5 !important;
  width: 34px;
  height: 34px;
  align-self: center;
}

@media (max-width: 640px) {
  .source-row { padding: 9px !important; gap: 6px !important; }
  .source-row .income-node-schedule { grid-template-columns: minmax(0, 1fr) !important; }
  .source-row .income-node-status { font-size: .64rem; }
}

/* AI cashflow portal: a destination card, not a horizontal utility bar. */
.control-strip > .work-toggle-button,
body.theme-pocket .control-strip > .work-toggle-button {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(320px, calc(100% - 48px)) !important;
  min-height: 196px !important;
  padding: 15px !important;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(91, 255, 183, .78);
  border-radius: 24px;
  color: #effff8;
  background:
    radial-gradient(circle at 50% 45%, rgba(56, 255, 164, .2), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(255, 220, 87, .16), transparent 35%),
    linear-gradient(145deg, rgba(8, 48, 38, .98), rgba(3, 22, 20, .98) 64%, rgba(22, 37, 14, .98));
  box-shadow:
    inset 0 1px 0 rgba(222, 255, 242, .18),
    inset 0 0 54px rgba(53, 255, 165, .06),
    0 18px 42px rgba(0, 0, 0, .32),
    0 0 28px rgba(54, 255, 169, .12);
}

.control-strip > .work-toggle-button::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(92, 255, 185, .16);
  border-radius: 18px;
  background:
    linear-gradient(90deg, #58ffb1 0 13px, transparent 13px calc(100% - 13px), #ffe36c calc(100% - 13px)) top / 100% 1px no-repeat,
    linear-gradient(90deg, #ffe36c 0 13px, transparent 13px calc(100% - 13px), #58ffb1 calc(100% - 13px)) bottom / 100% 1px no-repeat;
}

.control-strip > .work-toggle-button::after {
  z-index: 0;
  background: linear-gradient(105deg, transparent 24%, rgba(255,255,255,.2) 48%, transparent 72%);
}

.system-access-head {
  position: relative;
  z-index: 1;
  display: flex !important;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.work-toggle-button .system-access-head small {
  color: rgba(188, 255, 226, .76);
  font-size: .48rem;
  font-weight: 950;
  letter-spacing: .16em;
}

.work-toggle-button .system-access-head > b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(92, 255, 183, .32);
  border-radius: 999px;
  color: #6affb7;
  background: rgba(42, 255, 153, .08);
  font-size: .45rem;
  font-weight: 1000;
  letter-spacing: .12em;
}

.work-toggle-button .system-access-head > b::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.system-access-main {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  width: 100%;
  min-width: 0;
  padding: 7px 4px 5px;
}

.control-strip .system-access-orb {
  width: 70px;
  height: 70px;
  border: 1px solid rgba(255, 225, 105, .72);
  background:
    radial-gradient(circle, #ffe36b 0 8%, #62ffb4 9% 14%, transparent 15% 32%, rgba(63,255,171,.12) 33% 56%, transparent 57%);
  box-shadow: inset 0 0 20px rgba(77,255,181,.14), 0 0 28px rgba(61,255,174,.3);
}

.control-strip .system-access-orb::before { inset: 11px; border-color: rgba(255, 225, 105, .56); }
.control-strip .system-access-orb::after {
  inset: -6px;
  border-color: rgba(88, 239, 255, .48);
  border-width: 1px;
  border-style: dashed;
  animation: systemPortalIdleOrbit 9s linear infinite;
}

.control-strip .system-access-orb b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(7, 34, 24, .55);
  border-radius: 50%;
  color: #092319;
  background: linear-gradient(145deg, #6bffba, #ffe168);
  font-size: .55rem;
  font-weight: 1000;
}

.work-toggle-button .system-access-copy {
  gap: 7px;
}

.work-toggle-button .system-access-copy strong {
  color: #f6fff9;
  font-size: clamp(1.16rem, 5.4vw, 1.46rem);
  line-height: 1;
  letter-spacing: .06em;
  text-shadow: 0 0 20px rgba(87, 255, 182, .25);
}

.work-toggle-button .system-access-copy small {
  overflow: visible;
  color: rgba(216, 244, 230, .7);
  font-size: .56rem;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}

.system-access-benefits {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
}

.system-access-benefits i {
  min-width: 0;
  padding: 7px 3px;
  overflow: hidden;
  border: 1px solid rgba(89, 255, 182, .17);
  border-radius: 8px;
  color: rgba(224, 252, 238, .72);
  background: rgba(0, 0, 0, .18);
  font-size: .48rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-strip > .work-toggle-button:not(:disabled):hover,
.control-strip > .work-toggle-button:not(:disabled):focus-visible {
  border-color: #78ffc0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 20px 52px rgba(0,0,0,.36), 0 0 38px rgba(60,255,173,.25);
}

.control-strip > .work-toggle-button.is-system-connected {
  border-color: rgba(93, 255, 188, .9);
  background:
    radial-gradient(circle at 50% 43%, rgba(57, 255, 174, .28), transparent 35%),
    linear-gradient(145deg, rgba(5, 59, 41, .99), rgba(2, 27, 22, .99) 68%, rgba(18, 42, 16, .99));
}

.control-strip > .work-toggle-button.is-system-connected .system-access-head > b {
  color: #10291d;
  border-color: transparent;
  background: linear-gradient(135deg, #5dffb4, #e9ff72);
}

body.theme-moonlight .control-strip > .work-toggle-button {
  border-color: rgba(255, 158, 212, .76);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 137, 206, .24), transparent 33%),
    radial-gradient(circle at 85% 8%, rgba(255, 220, 110, .18), transparent 34%),
    linear-gradient(145deg, #382251, #201837 68%, #392037);
}

body.theme-pocket .control-strip > .work-toggle-button {
  border: 4px solid #263c31;
  border-radius: 3px;
  color: #1c3328;
  background: #d5ddcc;
  box-shadow: 7px 7px 0 #263c31;
}

/* Pending overtime is an informational state, not an alarm. Keep it still. */
.control-strip .overtime-action.is-pending,
.control-strip .overtime-action.is-pending:hover,
.control-strip .overtime-action.is-pending:focus-visible {
  animation: none !important;
  transform: none !important;
  filter: none !important;
  box-shadow: 0 8px 22px rgba(125, 35, 75, .22), inset 0 1px 0 rgba(255,255,255,.22) !important;
}

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

@media (max-width: 640px) {
  .control-strip > .work-toggle-button,
  body.theme-pocket .control-strip > .work-toggle-button {
    width: min(310px, calc(100% - 44px)) !important;
    min-height: 188px !important;
    padding: 14px !important;
  }
  .system-access-main { grid-template-columns: 72px minmax(0, 1fr); gap: 11px; }
  .control-strip .system-access-orb { width: 64px; height: 64px; }
  .work-toggle-button .system-access-copy strong { font-size: 1.22rem; }
}

@media (prefers-reduced-motion: reduce) {
  .control-strip .system-access-orb::after { animation: none !important; }
}

/* Final access interaction: one unmistakable reactor button. */
.control-strip > .work-toggle-button,
body.theme-pocket .control-strip > .work-toggle-button,
body.theme-moonlight .control-strip > .work-toggle-button {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  width: 188px !important;
  height: 188px !important;
  min-height: 188px !important;
  padding: 22px 18px 18px !important;
  overflow: visible;
  border: 2px solid rgba(91, 255, 183, .86);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 44%, rgba(71,255,177,.25) 0 18%, transparent 42%),
    radial-gradient(circle, #073426 0 54%, #031b17 72%, #091d12 100%);
  box-shadow:
    inset 0 0 0 8px rgba(74, 255, 173, .04),
    inset 0 0 44px rgba(55, 255, 167, .16),
    0 0 0 7px rgba(69, 255, 171, .045),
    0 18px 40px rgba(0,0,0,.34),
    0 0 35px rgba(63,255,174,.2);
}

.control-strip > .work-toggle-button::before {
  inset: -10px;
  border: 1px dashed rgba(87, 239, 255, .34);
  border-radius: 50%;
  background: none;
  animation: systemPortalIdleOrbit 13s linear infinite reverse;
}

.control-strip > .work-toggle-button::after {
  content: "";
  inset: -18px;
  z-index: -2;
  border: 1px solid rgba(255, 224, 96, .15);
  border-radius: 50%;
  background: none;
  transform: none;
}

.work-toggle-button .system-access-head {
  position: absolute;
  top: 15px;
  right: 0;
  left: 0;
  display: flex !important;
  justify-content: center;
}

.work-toggle-button .system-access-head small { display: none; }
.work-toggle-button .system-access-head > b {
  padding: 3px 8px;
  font-size: .42rem;
}

.work-toggle-button .system-access-main {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 12px 0 0;
  text-align: center;
}

.control-strip .system-access-orb {
  width: 66px;
  height: 66px;
}

.work-toggle-button .system-access-copy {
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.work-toggle-button .system-access-copy strong {
  font-size: 1.08rem;
  letter-spacing: .06em;
}

.work-toggle-button .system-access-copy small {
  max-width: 138px;
  font-size: .48rem;
  line-height: 1.28;
  text-align: center;
}

.work-toggle-button .system-access-benefits { display: none !important; }

.control-strip > .work-toggle-button:not(:disabled):active {
  transform: scale(.94) !important;
}

body.system-access-ritual .control-strip > .work-toggle-button {
  animation: systemCoreEngage 1.32s cubic-bezier(.18,.82,.24,1) both !important;
}

body.system-access-ritual .control-strip > .work-toggle-button::before {
  animation: systemCoreRingEngage .72s linear 2 !important;
}

body.system-access-ritual .control-strip > .work-toggle-button::after {
  animation: systemCoreWave 1.08s ease-out both !important;
}

body.system-access-ritual .control-strip .system-access-orb {
  animation: systemCoreCharge .8s ease-out both !important;
}

body.theme-moonlight .control-strip > .work-toggle-button {
  border-color: rgba(255, 155, 211, .88);
  background:
    radial-gradient(circle at 50% 44%, rgba(255,152,213,.3) 0 18%, transparent 43%),
    radial-gradient(circle, #3c2455 0 55%, #211837 75%, #321b35 100%);
}

body.theme-pocket .control-strip > .work-toggle-button {
  border: 4px solid #263c31;
  border-radius: 50%;
  color: #1d3328;
  background: #d5ddcc;
  box-shadow: 7px 7px 0 #263c31;
}

.control-strip > .ticker-live-income {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 132px;
  grid-template-rows: 52px auto;
  width: min(86%, 520px) !important;
  min-height: 72px !important;
  gap: 5px 7px;
}

.control-strip > .ticker-live-income .ticker-live-income-amount {
  grid-column: 1;
  grid-row: 1;
}

.control-strip > .ticker-live-income > button {
  grid-column: 2;
  grid-row: 1;
}

.ticker-extra-income-note {
  display: block;
  grid-column: 1 / -1;
  grid-row: 2;
  padding-left: 3px;
  color: rgba(209, 232, 221, .56);
  font-size: .58rem;
  font-weight: 780;
  line-height: 1.2;
  text-align: left;
}

@keyframes systemCoreEngage {
  0% { transform: scale(1); filter: brightness(1); }
  16% { transform: scale(.88); filter: brightness(1.18); }
  42% { transform: scale(1.09); filter: brightness(1.5) saturate(1.25); }
  68% { transform: scale(.98); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes systemCoreRingEngage {
  to { transform: rotate(360deg) scale(1.08); }
}

@keyframes systemCoreWave {
  0% { opacity: .7; transform: scale(.72); box-shadow: 0 0 0 0 rgba(77,255,177,.45); }
  100% { opacity: 0; transform: scale(1.55); box-shadow: 0 0 0 22px rgba(77,255,177,0); }
}

@keyframes systemCoreCharge {
  0% { transform: scale(.72); box-shadow: 0 0 0 rgba(74,255,176,0); }
  55% { transform: scale(1.16); box-shadow: 0 0 42px rgba(74,255,176,.68); }
  100% { transform: scale(1); }
}

@media (max-width: 640px) {
  .control-strip > .work-toggle-button,
  body.theme-pocket .control-strip > .work-toggle-button,
  body.theme-moonlight .control-strip > .work-toggle-button {
    width: 178px !important;
    height: 178px !important;
    min-height: 178px !important;
  }
  .control-strip > .ticker-live-income {
    grid-template-columns: minmax(0, 1fr) 118px;
    width: calc(100% - 20px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .control-strip > .work-toggle-button::before { animation: none !important; }
}

/* Square system gateway with distinct connect and leave rituals. */
.control-strip > .work-toggle-button,
body.theme-pocket .control-strip > .work-toggle-button,
body.theme-moonlight .control-strip > .work-toggle-button {
  width: 196px !important;
  height: 196px !important;
  min-height: 196px !important;
  border-radius: 28px !important;
  background:
    linear-gradient(90deg, rgba(88,255,185,.1) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(88,255,185,.08) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at 50% 44%, rgba(71,255,177,.25) 0 18%, transparent 46%),
    linear-gradient(145deg, #073426, #031b17 72%, #091d12);
}

.control-strip > .work-toggle-button::before {
  border-radius: 34px !important;
  animation: systemSquareIdle 3.2s ease-in-out infinite !important;
}

.control-strip > .work-toggle-button::after {
  border-radius: 40px !important;
}

.control-strip > .work-toggle-button.is-system-connected {
  background:
    linear-gradient(90deg, rgba(82,245,255,.12) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(82,245,255,.09) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at 50% 44%, rgba(65,255,196,.31) 0 20%, transparent 47%),
    linear-gradient(145deg, #064038, #031e1c 72%, #152613);
}

body.theme-moonlight .control-strip > .work-toggle-button {
  background:
    linear-gradient(90deg, rgba(255,178,224,.1) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(255,178,224,.08) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at 50% 44%, rgba(255,152,213,.3) 0 18%, transparent 45%),
    linear-gradient(145deg, #3c2455, #211837 75%, #321b35);
}

body.theme-pocket .control-strip > .work-toggle-button {
  border-radius: 6px !important;
  background: #d5ddcc;
}

body.system-exit-ritual .control-strip > .work-toggle-button {
  animation: systemCoreExit 1.18s cubic-bezier(.32,.02,.2,1) both !important;
}

body.system-exit-ritual .control-strip > .work-toggle-button::before {
  animation: systemCoreFrameExit 1s ease-in both !important;
}

body.system-exit-ritual .control-strip > .work-toggle-button::after {
  animation: systemCoreSignalExit 1.08s ease-in both !important;
}

body.system-exit-ritual .control-strip .system-access-orb {
  animation: systemCorePowerDown .92s ease-in-out both !important;
}

body.system-exit-ritual .ticker-stage {
  animation: systemTickerBackground 1.15s ease both !important;
}

@keyframes systemSquareIdle {
  0%, 100% { opacity: .62; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.018); }
}

@keyframes systemCoreExit {
  0% { transform: scale(1); filter: brightness(1.12) saturate(1.1); }
  24% { transform: scale(1.045); filter: brightness(1.42) saturate(1.25); }
  55% { transform: scale(.91); filter: brightness(.72) saturate(.72); }
  78% { transform: scale(.98); filter: brightness(.86) saturate(.86); }
  100% { transform: scale(1); filter: brightness(1) saturate(1); }
}

@keyframes systemCoreFrameExit {
  0% { opacity: 1; transform: scale(1.04); }
  56% { opacity: .12; transform: scale(.72); }
  100% { opacity: .62; transform: scale(1); }
}

@keyframes systemCoreSignalExit {
  0% { opacity: .75; transform: scale(1.16); box-shadow: 0 0 0 18px rgba(255,208,88,.18); }
  65% { opacity: .12; transform: scale(.64); box-shadow: 0 0 0 0 rgba(255,208,88,0); }
  100% { opacity: 0; transform: scale(.45); }
}

@keyframes systemCorePowerDown {
  0% { transform: scale(1); filter: brightness(1.35); }
  38% { transform: scale(1.14); filter: brightness(1.6) saturate(1.25); }
  72% { transform: scale(.72); filter: brightness(.46) saturate(.6); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes systemTickerBackground {
  0% { filter: brightness(1.18) saturate(1.1); }
  48% { filter: brightness(.72) saturate(.7); }
  100% { filter: brightness(1); }
}

@media (max-width: 640px) {
  .control-strip > .work-toggle-button,
  body.theme-pocket .control-strip > .work-toggle-button,
  body.theme-moonlight .control-strip > .work-toggle-button {
    width: 186px !important;
    height: 186px !important;
    min-height: 186px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.system-access-ritual .control-strip > .work-toggle-button,
  body.system-exit-ritual .control-strip > .work-toggle-button,
  body.system-exit-ritual .control-strip .system-access-orb,
  body.system-exit-ritual .ticker-stage { animation: none !important; }
}

/* Final swipe layer — must remain after every theme and ritual override. */
.system-access-dock > .work-toggle-button { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.system-access-dock.is-access-dragging > .work-toggle-button { cursor: grabbing; }
.system-access-dock.is-access-dragging .system-access-orb,
.system-access-dock.is-system-connected.is-access-dragging .system-access-orb {
  transform: translateX(var(--access-drag-x, 0px)) scale(calc(.96 + var(--access-drag-progress, 0) * .06)) !important;
  filter: brightness(calc(.92 + var(--access-drag-progress, 0) * .5)) saturate(calc(.9 + var(--access-drag-progress, 0) * .3));
  animation: none !important;
  transition: none !important;
}
.system-access-dock.is-access-dragging .system-access-copy,
.system-access-dock.is-system-connected.is-access-dragging .system-access-copy {
  transform: translateX(var(--access-copy-x, 0px)) !important;
  opacity: calc(1 - var(--access-drag-progress, 0) * .58);
  filter: blur(calc(var(--access-drag-progress, 0) * 1.8px));
  animation: none !important;
  transition: none !important;
}
.system-access-dock.is-access-dragging > .work-toggle-button::before {
  border-color: rgba(84,255,181,.48);
  background: linear-gradient(90deg, rgba(255,221,82,.13), rgba(72,255,171,.2), rgba(55,218,237,.17)) left center / calc(var(--access-drag-progress, 0) * 100%) 100% no-repeat, linear-gradient(105deg, rgba(255,255,255,.055), transparent 30% 72%, rgba(255,255,255,.035));
  box-shadow: inset 0 0 calc(8px + var(--access-drag-progress, 0) * 26px) rgba(65,255,176,.22);
}
.system-access-dock.is-system-connected.is-access-dragging > .work-toggle-button::before {
  background: linear-gradient(270deg, rgba(55,218,237,.15), rgba(72,255,171,.2), rgba(255,221,82,.12)) right center / calc(var(--access-drag-progress, 0) * 100%) 100% no-repeat, linear-gradient(105deg, rgba(255,255,255,.055), transparent 30% 72%, rgba(255,255,255,.035));
}
.system-access-dock.is-access-dragging::before {
  opacity: calc(.42 + var(--access-drag-progress, 0) * .58);
  box-shadow: inset 0 0 calc(5px + var(--access-drag-progress, 0) * 24px) rgba(74,255,178,.22);
}
.system-access-dock.is-access-dragging::after {
  top: -8px; right: -8px; bottom: -8px; left: -8px; width: auto; height: auto;
  border: 1px solid rgba(79,255,180,.72); border-radius: 42px; background: transparent; filter: none;
  opacity: calc(.08 + var(--access-drag-progress, 0) * .72);
  transform: scale(calc(.97 + var(--access-drag-progress, 0) * .055));
}
body.access-swipe-active .ticker-stage .money-wrap {
  transform: scale(calc(1 + var(--access-drag-progress, 0) * .045));
  filter: brightness(calc(1 + var(--access-drag-progress, 0) * .42)) saturate(calc(1 + var(--access-drag-progress, 0) * .22));
}
body.access-swipe-active .ticker-stage .live-label {
  filter: brightness(calc(1 + var(--access-drag-progress, 0) * .48));
  box-shadow: 0 0 calc(var(--access-drag-progress, 0) * 24px) rgba(65,255,174,.34);
}
.system-access-dock.is-access-rebound .system-access-orb,
.system-access-dock.is-access-rebound .system-access-copy { transition: transform .46s cubic-bezier(.2,1.28,.3,1), filter .3s ease, opacity .3s ease !important; }
body.system-access-ritual .hero-panel { animation: accessHeroSurge 1.62s ease-out both !important; }
body.system-access-ritual .money-ticker { animation: accessDigitsSurge 1.58s cubic-bezier(.16,.82,.22,1) both !important; }
body.system-exit-ritual .hero-panel { animation: accessHeroRelease 1.4s ease-in-out both !important; }
body.system-exit-ritual .money-ticker { animation: accessDigitsRelease 1.34s ease-in-out both !important; }

@media (prefers-reduced-motion: reduce) {
  .system-access-dock.is-access-dragging .system-access-orb,
  .system-access-dock.is-access-dragging .system-access-copy,
  body.access-swipe-active .money-wrap,
  body.system-access-ritual .hero-panel,
  body.system-access-ritual .money-ticker,
  body.system-exit-ritual .hero-panel,
  body.system-exit-ritual .money-ticker { animation: none !important; transition: none !important; }
}

/* True swipe interaction: the physical control follows the finger in real time. */
.system-access-dock > .work-toggle-button {
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.system-access-dock.is-access-dragging > .work-toggle-button { cursor: grabbing; }

.system-access-dock.is-access-dragging .system-access-orb {
  transform: translateX(var(--access-drag-x, 0px)) scale(calc(.96 + var(--access-drag-progress, 0) * .06)) !important;
  filter: brightness(calc(.92 + var(--access-drag-progress, 0) * .5)) saturate(calc(.9 + var(--access-drag-progress, 0) * .3));
  animation: none !important;
  transition: none !important;
}

.system-access-dock.is-access-dragging .system-access-copy {
  transform: translateX(var(--access-copy-x, 0px)) !important;
  opacity: calc(1 - var(--access-drag-progress, 0) * .58);
  filter: blur(calc(var(--access-drag-progress, 0) * 1.8px));
  transition: none !important;
}

.system-access-dock.is-access-dragging > .work-toggle-button::before {
  border-color: rgba(84,255,181,.48);
  background:
    linear-gradient(90deg, rgba(255,221,82,.13), rgba(72,255,171,.2), rgba(55,218,237,.17)) left center / calc(var(--access-drag-progress, 0) * 100%) 100% no-repeat,
    linear-gradient(105deg, rgba(255,255,255,.055), transparent 30% 72%, rgba(255,255,255,.035));
  box-shadow: inset 0 0 calc(8px + var(--access-drag-progress, 0) * 26px) rgba(65,255,176,.22);
}

.system-access-dock.is-system-connected.is-access-dragging > .work-toggle-button::before {
  background:
    linear-gradient(270deg, rgba(55,218,237,.15), rgba(72,255,171,.2), rgba(255,221,82,.12)) right center / calc(var(--access-drag-progress, 0) * 100%) 100% no-repeat,
    linear-gradient(105deg, rgba(255,255,255,.055), transparent 30% 72%, rgba(255,255,255,.035));
}

.system-access-dock.is-access-dragging::before {
  opacity: calc(.42 + var(--access-drag-progress, 0) * .58);
  box-shadow: inset 0 0 calc(5px + var(--access-drag-progress, 0) * 24px) rgba(74,255,178,.22);
}

.system-access-dock.is-access-dragging::after {
  top: -8px;
  right: -8px;
  bottom: -8px;
  left: -8px;
  width: auto;
  height: auto;
  border: 1px solid rgba(79,255,180,.72);
  border-radius: 42px;
  background: transparent;
  filter: none;
  opacity: calc(.08 + var(--access-drag-progress, 0) * .72);
  transform: scale(calc(.97 + var(--access-drag-progress, 0) * .055));
}

body.access-swipe-active .ticker-stage .money-wrap {
  transform: scale(calc(1 + var(--access-drag-progress, 0) * .045));
  filter: brightness(calc(1 + var(--access-drag-progress, 0) * .42)) saturate(calc(1 + var(--access-drag-progress, 0) * .22));
}

body.access-swipe-active .ticker-stage .live-label {
  filter: brightness(calc(1 + var(--access-drag-progress, 0) * .48));
  box-shadow: 0 0 calc(var(--access-drag-progress, 0) * 24px) rgba(65,255,174,.34);
}

.system-access-dock.is-access-rebound .system-access-orb,
.system-access-dock.is-access-rebound .system-access-copy {
  transition: transform .46s cubic-bezier(.2,1.28,.3,1), filter .3s ease, opacity .3s ease !important;
}

body.system-access-ritual .hero-panel { animation: accessHeroSurge 1.62s ease-out both; }
body.system-access-ritual .money-ticker { animation: accessDigitsSurge 1.58s cubic-bezier(.16,.82,.22,1) both; }
body.system-exit-ritual .hero-panel { animation: accessHeroRelease 1.4s ease-in-out both; }
body.system-exit-ritual .money-ticker { animation: accessDigitsRelease 1.34s ease-in-out both; }

@keyframes accessHeroSurge {
  0% { box-shadow: inset 0 0 0 rgba(64,255,174,0); }
  34% { box-shadow: inset 0 0 54px rgba(64,255,174,.11), 0 0 34px rgba(64,255,174,.12); }
  66% { box-shadow: inset 0 0 20px rgba(255,219,83,.055), 0 0 12px rgba(64,255,174,.05); }
  100% { box-shadow: inset 0 0 0 rgba(64,255,174,0); }
}

@keyframes accessDigitsSurge {
  0% { transform: translateY(0) scale(.96); filter: brightness(.7); }
  28% { transform: translateY(-3px) scale(1.085); filter: brightness(1.62); text-shadow: 0 0 38px rgba(69,255,174,.72); }
  52% { transform: translateY(1px) scale(.985); }
  76% { transform: translateY(-1px) scale(1.025); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

@keyframes accessHeroRelease {
  0% { filter: brightness(1.12); }
  48% { filter: brightness(.72) saturate(.7); box-shadow: inset 0 0 38px rgba(255,203,74,.07); }
  100% { filter: brightness(1); }
}

@keyframes accessDigitsRelease {
  0% { transform: scale(1); filter: brightness(1.2); }
  42% { transform: scale(.94); filter: brightness(.62) saturate(.62); }
  72% { transform: scale(1.018); }
  100% { transform: scale(1); filter: brightness(1); }
}

@media (prefers-reduced-motion: reduce) {
  .system-access-dock.is-access-dragging .system-access-orb,
  .system-access-dock.is-access-dragging .system-access-copy,
  body.access-swipe-active .money-wrap,
  body.system-access-ritual .hero-panel,
  body.system-access-ritual .money-ticker,
  body.system-exit-ritual .hero-panel,
  body.system-exit-ritual .money-ticker { animation: none !important; transition: none !important; }
}

/* Compact gateway: smaller footprint, denser system feedback. */
.control-strip > .work-toggle-button,
body.theme-pocket .control-strip > .work-toggle-button,
body.theme-moonlight .control-strip > .work-toggle-button {
  width: 166px !important;
  height: 166px !important;
  min-height: 166px !important;
  padding: 15px 13px 12px !important;
  border-radius: 23px !important;
}

.control-strip > .work-toggle-button::before { border-radius: 29px !important; }
.control-strip > .work-toggle-button::after { border-radius: 35px !important; }

.work-toggle-button .system-access-head { top: 10px; }
.work-toggle-button .system-access-head > b {
  padding: 2px 7px;
  font-size: .38rem;
}

.work-toggle-button .system-access-main {
  gap: 4px;
  padding: 10px 0 26px;
}

.control-strip .system-access-orb {
  width: 54px;
  height: 54px;
}

.control-strip .system-access-orb b {
  width: 24px;
  height: 24px;
  font-size: .48rem;
}

.work-toggle-button .system-access-copy { gap: 3px; }
.work-toggle-button .system-access-copy strong {
  font-size: 1rem;
  line-height: .98;
}

.work-toggle-button .system-access-copy small {
  max-width: 132px;
  font-size: .43rem;
  line-height: 1.18;
}

.work-toggle-button .system-access-benefits {
  position: absolute;
  right: 12px;
  bottom: 10px;
  left: 12px;
  z-index: 2;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  width: auto;
}

.work-toggle-button .system-access-benefits i {
  padding: 4px 2px;
  border-color: rgba(91,255,183,.26);
  border-radius: 5px;
  color: rgba(224,255,240,.82);
  background: rgba(1,18,14,.56);
  font-size: .39rem;
  letter-spacing: .05em;
}

.control-strip > .work-toggle-button.is-system-connected .system-access-benefits i {
  color: #dcfff1;
  border-color: rgba(83,246,255,.34);
  background: rgba(25,113,94,.22);
  box-shadow: inset 0 -2px 0 rgba(83,255,180,.25);
}

body.theme-pocket .control-strip > .work-toggle-button { border-radius: 5px !important; }

@media (max-width: 640px) {
  .control-strip > .work-toggle-button,
  body.theme-pocket .control-strip > .work-toggle-button,
  body.theme-moonlight .control-strip > .work-toggle-button {
    width: 158px !important;
    height: 158px !important;
    min-height: 158px !important;
  }
  .control-strip .system-access-orb { width: 50px; height: 50px; }
  .work-toggle-button .system-access-copy strong { font-size: .94rem; }
  .work-toggle-button .system-access-copy small { max-width: 126px; font-size: .41rem; }
  .work-toggle-button .system-access-benefits { right: 10px; bottom: 9px; left: 10px; }
}

/* Cashflow connection dock: square command core + persuasive live status. */
.control-strip > .system-access-dock {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  width: min(86%, 520px);
  min-height: 162px;
  gap: 8px;
  padding: 6px;
  overflow: hidden;
  border: 1px solid rgba(82, 255, 181, .46);
  border-radius: 26px;
  background:
    linear-gradient(90deg, rgba(74,255,177,.045) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(74,255,177,.04) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(135deg, rgba(8,52,39,.98), rgba(3,24,20,.98) 64%, rgba(24,34,14,.98));
  box-shadow:
    inset 0 1px 0 rgba(229,255,243,.13),
    inset 0 0 36px rgba(57,255,166,.055),
    0 14px 34px rgba(0,0,0,.3),
    0 0 24px rgba(57,255,166,.08);
}

.control-strip > .system-access-dock::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(86,255,184,.12);
  border-radius: 20px;
  background:
    linear-gradient(90deg, #5cffb4 0 16px, transparent 16px calc(100% - 16px), #ffe36c calc(100% - 16px)) top / 100% 1px no-repeat,
    linear-gradient(90deg, #ffe36c 0 16px, transparent 16px calc(100% - 16px), #5cffb4 calc(100% - 16px)) bottom / 100% 1px no-repeat;
}

.control-strip > .system-access-dock::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 34%, rgba(104,255,199,.16) 49%, transparent 64%);
  transform: translateX(-130%);
}

.system-access-dock > .work-toggle-button,
body.theme-pocket .system-access-dock > .work-toggle-button,
body.theme-moonlight .system-access-dock > .work-toggle-button {
  position: relative;
  display: grid !important;
  width: 150px !important;
  height: 150px !important;
  min-height: 150px !important;
  padding: 14px 11px 11px !important;
  overflow: hidden;
  border: 1px solid rgba(101,255,192,.9);
  border-radius: 20px !important;
  color: #effff8;
  background:
    radial-gradient(circle at 50% 43%, rgba(64,255,176,.29) 0 18%, transparent 44%),
    linear-gradient(90deg, rgba(91,255,190,.1) 1px, transparent 1px) 0 0 / 15px 15px,
    linear-gradient(rgba(91,255,190,.08) 1px, transparent 1px) 0 0 / 15px 15px,
    linear-gradient(145deg, #074432, #03241d 72%, #102817);
  box-shadow:
    inset 0 0 0 5px rgba(68,255,176,.035),
    inset 0 0 28px rgba(63,255,173,.13),
    0 0 22px rgba(63,255,174,.14);
}

.system-access-dock > .work-toggle-button::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 0;
  pointer-events: none;
  border: 1px dashed rgba(86,239,255,.32);
  border-radius: 14px !important;
  background: none;
  animation: systemDockCoreIdle 3.4s ease-in-out infinite;
}

.system-access-dock > .work-toggle-button::after {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  border-radius: 0 !important;
  background: conic-gradient(from 0deg, transparent 0 72%, rgba(92,255,189,.17) 82%, transparent 92%);
  animation: systemDockRadar 7s linear infinite;
}

.system-access-dock .system-access-head,
.system-access-dock .system-access-main,
.system-access-dock .system-access-benefits { z-index: 2; }

.system-access-dock .system-access-copy small { display: none; }
.system-access-dock .system-access-benefits {
  right: 9px;
  bottom: 8px;
  left: 9px;
}
.system-access-dock .system-access-benefits i { padding-block: 3px; font-size: .35rem; }

.system-access-dock .system-access-main {
  gap: 5px;
  padding: 12px 0 24px;
}
.system-access-dock .system-access-copy strong { font-size: .98rem; }

.system-access-brief {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  align-content: center;
  min-width: 0;
  padding: 12px 10px 10px 6px;
  overflow: hidden;
  color: #effff8;
  text-align: left;
}

.system-access-brief::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 1px;
  background: linear-gradient(transparent, rgba(89,255,187,.46), transparent);
}

.system-access-brief > small {
  color: #5effb5;
  font-size: .45rem;
  font-weight: 1000;
  letter-spacing: .15em;
}

.system-access-brief > strong {
  margin-top: 5px;
  color: #f6fff9;
  font-size: clamp(.88rem, 3.9vw, 1.08rem);
  font-weight: 1000;
  line-height: 1.06;
  letter-spacing: .025em;
  text-shadow: 0 0 18px rgba(81,255,181,.22);
}

.system-access-brief > p {
  align-self: center;
  margin-top: 6px;
  color: rgba(215,241,227,.68);
  font-size: .53rem;
  font-weight: 760;
  line-height: 1.36;
}

.system-access-brief-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 7px;
}

.system-access-brief-signals i {
  position: relative;
  padding: 5px 2px 4px 10px;
  border: 1px solid rgba(89,255,183,.18);
  border-radius: 5px;
  color: rgba(223,250,237,.7);
  background: rgba(0,0,0,.2);
  font-size: .38rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  letter-spacing: .04em;
}

.system-access-brief-signals i::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffe06c;
  box-shadow: 0 0 7px rgba(255,224,108,.7);
  transform: translateY(-50%);
}

.system-access-brief-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(90,255,185,.12);
  color: #ffe479;
  font-size: .5rem;
  font-weight: 900;
  line-height: 1.15;
}

.system-access-brief-action b {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border: 1px solid rgba(255,226,108,.42);
  border-radius: 50%;
  font-size: .8rem;
}

.system-access-dock.is-system-connected {
  border-color: rgba(82,255,205,.78);
  background:
    radial-gradient(circle at 72% 34%, rgba(58,255,193,.15), transparent 36%),
    linear-gradient(135deg, rgba(4,62,48,.99), rgba(2,29,25,.99) 65%, rgba(25,37,13,.99));
  box-shadow: inset 0 1px 0 rgba(229,255,243,.17), 0 14px 36px rgba(0,0,0,.31), 0 0 30px rgba(57,255,183,.17);
}

.system-access-dock.is-system-connected .system-access-brief > small { color: #62fff0; }
.system-access-dock.is-system-connected .system-access-brief-signals i::before {
  background: #64ffc0;
  box-shadow: 0 0 9px rgba(100,255,192,.9);
  animation: systemDockLed 1.35s ease-in-out infinite;
}

.system-access-dock.is-setup-required { filter: saturate(.64); }
.system-access-dock.is-setup-required .system-access-brief-signals i::before { background: #80958a; box-shadow: none; }

body.system-access-ritual .system-access-dock {
  animation: systemDockConnect 1.32s cubic-bezier(.18,.82,.24,1) both;
}
body.system-access-ritual .system-access-dock::after { animation: systemDockScan 1.08s ease-out both; }
body.system-access-ritual .system-access-dock > .work-toggle-button { animation: systemCoreEngage 1.32s cubic-bezier(.18,.82,.24,1) both !important; }
body.system-access-ritual .system-access-dock .system-access-orb { animation: systemCoreCharge .8s ease-out both !important; }
body.system-access-ritual .system-access-dock .system-access-brief { animation: systemBriefReveal 1.1s ease-out both; }

body.system-exit-ritual .system-access-dock { animation: systemDockDisconnect 1.18s ease-in-out both; }
body.system-exit-ritual .system-access-dock::after { animation: systemDockScanReverse 1.02s ease-in both; }
body.system-exit-ritual .system-access-dock > .work-toggle-button { animation: systemCoreExit 1.18s cubic-bezier(.32,.02,.2,1) both !important; }
body.system-exit-ritual .system-access-dock .system-access-orb { animation: systemCorePowerDown .92s ease-in-out both !important; }
body.system-exit-ritual .system-access-dock .system-access-brief { animation: systemBriefExit 1s ease-in-out both; }

body.theme-moonlight .system-access-dock {
  border-color: rgba(255,158,214,.6);
  background: radial-gradient(circle at 75% 28%, rgba(255,147,211,.18), transparent 38%), linear-gradient(135deg, #3a2453, #201833 70%, #372037);
}
body.theme-moonlight .system-access-dock > .work-toggle-button {
  border-color: rgba(255,163,217,.9);
  background: radial-gradient(circle at 50% 43%, rgba(255,157,216,.3) 0 18%, transparent 45%), linear-gradient(145deg, #4a295f, #25193b 72%, #3b2138);
}
body.theme-moonlight .system-access-brief > small { color: #ff9fd7; }

body.theme-pocket .system-access-dock {
  border: 4px solid #263c31;
  border-radius: 4px;
  color: #1c3328;
  background: #d5ddcc;
  box-shadow: 7px 7px 0 #263c31;
}
body.theme-pocket .system-access-dock > .work-toggle-button {
  border: 3px solid #263c31;
  border-radius: 3px !important;
  color: #1c3328;
  background: #bccbb6;
  box-shadow: 4px 4px 0 #263c31;
}
body.theme-pocket .system-access-brief { color: #1c3328; }
body.theme-pocket .system-access-brief > strong { color: #1c3328; text-shadow: none; }
body.theme-pocket .system-access-brief > p { color: rgba(28,51,40,.72); }
body.theme-pocket .system-access-brief-action { color: #9c5b08; border-color: rgba(38,60,49,.3); }

@keyframes systemDockCoreIdle { 0%,100% { opacity: .52; } 50% { opacity: 1; } }
@keyframes systemDockRadar { to { transform: rotate(360deg); } }
@keyframes systemDockLed { 50% { opacity: .45; transform: translateY(-50%) scale(.72); } }
@keyframes systemDockConnect {
  0% { transform: scale(.97); filter: brightness(.86); }
  36% { transform: scale(1.018); filter: brightness(1.35) saturate(1.2); box-shadow: 0 0 46px rgba(65,255,184,.34); }
  100% { transform: scale(1); filter: brightness(1); }
}
@keyframes systemDockDisconnect {
  0% { transform: scale(1); filter: brightness(1.12); }
  38% { transform: scale(.975); filter: brightness(.7) saturate(.68); }
  72% { transform: scale(1.008); filter: brightness(.9); }
  100% { transform: scale(1); filter: brightness(1); }
}
@keyframes systemDockScan { from { transform: translateX(-130%); } to { transform: translateX(130%); } }
@keyframes systemDockScanReverse { from { transform: translateX(130%); opacity: 1; } to { transform: translateX(-130%); opacity: 0; } }
@keyframes systemBriefReveal { 0% { opacity: .3; transform: translateX(-10px); } 55% { opacity: 1; } 100% { transform: translateX(0); } }
@keyframes systemBriefExit { 0% { opacity: 1; transform: translateX(0); } 46% { opacity: .32; transform: translateX(8px); } 100% { opacity: 1; transform: translateX(0); } }

@media (max-width: 640px) {
  .control-strip > .system-access-dock {
    grid-template-columns: 142px minmax(0, 1fr);
    width: calc(100% - 20px);
    min-height: 154px;
  }
  .system-access-dock > .work-toggle-button,
  body.theme-pocket .system-access-dock > .work-toggle-button,
  body.theme-moonlight .system-access-dock > .work-toggle-button {
    width: 142px !important;
    height: 142px !important;
    min-height: 142px !important;
  }
  .system-access-dock .system-access-orb { width: 48px; height: 48px; }
  .system-access-dock .system-access-brief { padding: 10px 8px 9px 5px; }
  .system-access-brief > strong { font-size: .9rem; }
  .system-access-brief > p { font-size: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .system-access-dock > .work-toggle-button::before,
  .system-access-dock > .work-toggle-button::after,
  .system-access-dock.is-system-connected .system-access-brief-signals i::before,
  body.system-access-ritual .system-access-dock,
  body.system-exit-ritual .system-access-dock,
  body.system-access-ritual .system-access-dock .system-access-brief,
  body.system-exit-ritual .system-access-dock .system-access-brief { animation: none !important; }
}

/* Minimal access ritual: one unmistakable center target, no information panel. */
.control-strip > .system-access-dock {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr;
  width: 184px;
  height: 184px;
  min-height: 184px;
  place-items: center;
  gap: 0;
  padding: 7px;
  overflow: visible;
  border: 1px solid rgba(91, 255, 188, .56);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 50%, rgba(64, 255, 178, .14), transparent 58%),
    linear-gradient(135deg, rgba(6, 50, 38, .98), rgba(2, 21, 18, .99) 72%);
  box-shadow:
    inset 0 0 0 1px rgba(224, 255, 241, .06),
    inset 0 0 34px rgba(61, 255, 173, .075),
    0 15px 32px rgba(0, 0, 0, .32),
    0 0 28px rgba(62, 255, 177, .1);
  animation: accessGatewayBreathe 3.2s ease-in-out infinite;
}

.control-strip > .system-access-dock::before {
  content: "";
  position: absolute;
  inset: -7px;
  z-index: -1;
  pointer-events: none;
  border: 0;
  border-radius: 34px;
  background:
    linear-gradient(#63ffc0, #63ffc0) left top / 24px 2px no-repeat,
    linear-gradient(#63ffc0, #63ffc0) left top / 2px 24px no-repeat,
    linear-gradient(#ffe36f, #ffe36f) right top / 24px 2px no-repeat,
    linear-gradient(#ffe36f, #ffe36f) right top / 2px 24px no-repeat,
    linear-gradient(#ffe36f, #ffe36f) left bottom / 24px 2px no-repeat,
    linear-gradient(#ffe36f, #ffe36f) left bottom / 2px 24px no-repeat,
    linear-gradient(#63ffc0, #63ffc0) right bottom / 24px 2px no-repeat,
    linear-gradient(#63ffc0, #63ffc0) right bottom / 2px 24px no-repeat;
  opacity: .68;
  animation: accessGatewayFocus 2.4s ease-in-out infinite;
}

.control-strip > .system-access-dock::after {
  content: "";
  position: absolute;
  inset: 20px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(94, 255, 192, .28);
  border-radius: 50%;
  background: none;
  transform: none;
  opacity: .46;
  animation: accessGatewayRipple 2.2s ease-out infinite;
}

.system-access-dock > .work-toggle-button,
body.theme-pocket .system-access-dock > .work-toggle-button,
body.theme-moonlight .system-access-dock > .work-toggle-button {
  position: relative;
  display: grid !important;
  width: 168px !important;
  height: 168px !important;
  min-height: 168px !important;
  place-items: center;
  padding: 12px !important;
  overflow: hidden;
  border: 1px solid rgba(103, 255, 195, .92);
  border-radius: 22px !important;
  color: #f2fff9;
  background:
    radial-gradient(circle at 50% 43%, rgba(66, 255, 180, .25) 0 17%, transparent 45%),
    linear-gradient(90deg, rgba(92, 255, 191, .075) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(rgba(92, 255, 191, .065) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(145deg, #074532, #03251d 73%, #112918);
  box-shadow:
    inset 0 0 0 5px rgba(68, 255, 176, .028),
    inset 0 0 30px rgba(63, 255, 173, .13),
    0 0 22px rgba(63, 255, 174, .13);
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.system-access-dock > .work-toggle-button:hover,
.system-access-dock > .work-toggle-button:focus-visible {
  transform: translateY(-2px) scale(1.018);
  filter: brightness(1.1);
  box-shadow: inset 0 0 34px rgba(63, 255, 173, .19), 0 0 32px rgba(63, 255, 174, .22);
}

.system-access-dock > .work-toggle-button:active {
  transform: scale(.95);
  filter: brightness(1.24);
}

.system-access-dock > .work-toggle-button:disabled {
  cursor: default;
  filter: saturate(.52);
  opacity: .72;
}

.system-access-dock > .work-toggle-button::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(91, 255, 191, .2);
  border-radius: 16px !important;
  background:
    linear-gradient(90deg, rgba(92,255,192,.7), transparent) left top / 35% 1px no-repeat,
    linear-gradient(180deg, rgba(92,255,192,.7), transparent) left top / 1px 35% no-repeat,
    linear-gradient(270deg, rgba(255,226,104,.7), transparent) right bottom / 35% 1px no-repeat,
    linear-gradient(0deg, rgba(255,226,104,.7), transparent) right bottom / 1px 35% no-repeat;
  animation: accessButtonFrame 2.6s ease-in-out infinite;
}

.system-access-dock > .work-toggle-button::after {
  content: "";
  position: absolute;
  inset: -35%;
  z-index: 0;
  pointer-events: none;
  border-radius: 50% !important;
  background: conic-gradient(from 0deg, transparent 0 76%, rgba(91, 255, 191, .2) 84%, transparent 92%);
  animation: accessGatewayRadar 6.5s linear infinite;
}

.system-access-dock .system-access-head {
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: 2;
}

.system-access-dock .system-access-head small {
  display: block;
  color: rgba(170, 255, 216, .68);
  font-size: .42rem;
  letter-spacing: .18em;
}

.system-access-dock .system-access-head > b {
  padding: 3px 6px;
  font-size: .4rem;
}

.system-access-dock .system-access-main {
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 15px 0 0;
}

.system-access-dock .system-access-orb {
  width: 66px;
  height: 66px;
  box-shadow: 0 0 0 7px rgba(74, 255, 182, .055), 0 0 28px rgba(74, 255, 182, .24);
  animation: accessCoreIdle 2.05s ease-in-out infinite;
}

.system-access-dock .system-access-orb::after {
  animation: accessGatewayRadar 4.6s linear infinite;
}

.system-access-dock .system-access-orb b {
  width: auto;
  height: auto;
  color: #ffe679;
  background: transparent;
  font-size: .58rem;
  font-weight: 1000;
  letter-spacing: .08em;
  text-shadow: 0 0 10px rgba(255, 227, 102, .7);
}

.system-access-dock .system-access-copy {
  display: grid;
  place-items: center;
  gap: 6px;
}

.system-access-dock .system-access-copy strong {
  color: #f6fff9;
  font-size: 1.08rem;
  line-height: 1;
  letter-spacing: .08em;
  text-shadow: 0 0 18px rgba(77, 255, 183, .28);
}

.system-access-dock .system-access-copy small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 226, 103, .42);
  border-radius: 999px;
  color: #ffe579;
  background: rgba(255, 221, 91, .075);
  font-size: .46rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: .09em;
  animation: accessTapHint 1.8s ease-in-out infinite;
}

.system-access-dock.is-system-connected {
  border-color: rgba(89, 255, 213, .78);
  background: radial-gradient(circle at 50% 50%, rgba(58, 255, 197, .19), transparent 60%), linear-gradient(135deg, #053f33, #021f1c 72%);
  box-shadow: inset 0 0 30px rgba(57, 255, 183, .1), 0 15px 34px rgba(0,0,0,.32), 0 0 32px rgba(57,255,183,.18);
}

.system-access-dock.is-system-connected .system-access-copy small {
  color: #83ffe1;
  border-color: rgba(91, 255, 211, .44);
  background: rgba(75, 255, 201, .08);
}

.system-access-dock.is-setup-required { filter: saturate(.65); }

body.system-access-ritual .system-access-dock {
  animation: accessGatewayConnect 1.32s cubic-bezier(.18,.82,.24,1) both;
}
body.system-access-ritual .system-access-dock::before { animation: accessGatewayLock 1.18s ease-out both; }
body.system-access-ritual .system-access-dock::after { animation: accessGatewayBurst 1.12s ease-out both; }
body.system-access-ritual .system-access-dock > .work-toggle-button { animation: systemCoreEngage 1.32s cubic-bezier(.18,.82,.24,1) both !important; }
body.system-access-ritual .system-access-dock .system-access-orb { animation: systemCoreCharge .8s ease-out both !important; }

body.system-exit-ritual .system-access-dock { animation: accessGatewayExit 1.18s ease-in-out both; }
body.system-exit-ritual .system-access-dock::before { animation: accessGatewayUnlock 1.02s ease-in both; }
body.system-exit-ritual .system-access-dock::after { animation: accessGatewayCollapse .96s ease-in both; }
body.system-exit-ritual .system-access-dock > .work-toggle-button { animation: systemCoreExit 1.18s cubic-bezier(.32,.02,.2,1) both !important; }
body.system-exit-ritual .system-access-dock .system-access-orb { animation: systemCorePowerDown .92s ease-in-out both !important; }

body.theme-moonlight .control-strip > .system-access-dock {
  border-color: rgba(255, 158, 214, .65);
  background: radial-gradient(circle at 50% 50%, rgba(255, 150, 213, .18), transparent 60%), linear-gradient(135deg, #39234f, #1d1630 72%);
}
body.theme-moonlight .system-access-dock > .work-toggle-button {
  border-color: rgba(255, 167, 219, .9);
  background: radial-gradient(circle at 50% 43%, rgba(255,157,216,.28) 0 17%, transparent 45%), linear-gradient(145deg, #47275b, #25183a 73%);
}

body.theme-pocket .control-strip > .system-access-dock {
  width: 184px;
  height: 184px;
  min-height: 184px;
  border: 4px solid #263c31;
  border-radius: 5px;
  background: #d5ddcc;
  box-shadow: 7px 7px 0 #263c31;
}
body.theme-pocket .system-access-dock > .work-toggle-button {
  width: 164px !important;
  height: 164px !important;
  min-height: 164px !important;
  border: 3px solid #263c31;
  border-radius: 3px !important;
  color: #1c3328;
  background: #bccbb6;
  box-shadow: 4px 4px 0 #263c31;
}
body.theme-pocket .system-access-dock .system-access-copy strong { color: #1c3328; text-shadow: none; }
body.theme-pocket .system-access-dock .system-access-copy small { color: #8e570b; border-color: #8e570b; background: #e8a536; }

@keyframes accessGatewayBreathe {
  0%, 100% { box-shadow: inset 0 0 30px rgba(61,255,173,.06), 0 15px 32px rgba(0,0,0,.32), 0 0 18px rgba(62,255,177,.07); }
  50% { box-shadow: inset 0 0 36px rgba(61,255,173,.11), 0 15px 32px rgba(0,0,0,.32), 0 0 30px rgba(62,255,177,.15); }
}
@keyframes accessGatewayFocus { 0%,100% { opacity: .42; transform: scale(.985); } 50% { opacity: .92; transform: scale(1); } }
@keyframes accessGatewayRipple { 0% { opacity: .5; transform: scale(.62); } 72%,100% { opacity: 0; transform: scale(1.35); } }
@keyframes accessButtonFrame { 50% { opacity: .55; filter: brightness(1.35); } }
@keyframes accessGatewayRadar { to { transform: rotate(360deg); } }
@keyframes accessCoreIdle { 0%,100% { transform: scale(.96); filter: brightness(.94); } 50% { transform: scale(1.035); filter: brightness(1.18); } }
@keyframes accessTapHint { 0%,100% { opacity: .72; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-1px); box-shadow: 0 0 12px rgba(255,226,103,.12); } }
@keyframes accessGatewayConnect { 0% { transform: scale(.94); filter: brightness(.72); } 24% { transform: scale(.9); filter: brightness(1.1); } 58% { transform: scale(1.055); filter: brightness(1.55) saturate(1.25); } 100% { transform: scale(1); filter: brightness(1); } }
@keyframes accessGatewayLock { 0% { opacity: .2; transform: scale(1.2); } 58% { opacity: 1; transform: scale(.96); } 100% { opacity: .72; transform: scale(1); } }
@keyframes accessGatewayBurst { 0% { opacity: 0; transform: scale(.42); } 45% { opacity: .95; } 100% { opacity: 0; transform: scale(1.7); } }
@keyframes accessGatewayExit { 0% { transform: scale(1); filter: brightness(1.18); } 42% { transform: scale(.9); filter: brightness(.58) saturate(.55); } 74% { transform: scale(1.025); filter: brightness(.84); } 100% { transform: scale(1); filter: brightness(1); } }
@keyframes accessGatewayUnlock { 0% { opacity: .8; transform: scale(1); } 58% { opacity: .18; transform: scale(1.18); } 100% { opacity: .55; transform: scale(1); } }
@keyframes accessGatewayCollapse { 0% { opacity: .85; transform: scale(1.2); } 100% { opacity: 0; transform: scale(.25); } }

@media (max-width: 640px) {
  .control-strip > .system-access-dock,
  body.theme-pocket .control-strip > .system-access-dock {
    width: 174px;
    height: 174px;
    min-height: 174px;
  }
  .system-access-dock > .work-toggle-button,
  body.theme-pocket .system-access-dock > .work-toggle-button,
  body.theme-moonlight .system-access-dock > .work-toggle-button {
    width: 158px !important;
    height: 158px !important;
    min-height: 158px !important;
  }
  .system-access-dock .system-access-orb { width: 62px; height: 62px; }
  .system-access-dock .system-access-copy strong { font-size: 1.02rem; }
}

@media (prefers-reduced-motion: reduce) {
  .control-strip > .system-access-dock,
  .control-strip > .system-access-dock::before,
  .control-strip > .system-access-dock::after,
  .system-access-dock > .work-toggle-button::before,
  .system-access-dock > .work-toggle-button::after,
  .system-access-dock .system-access-orb,
  .system-access-dock .system-access-orb::after,
  .system-access-dock .system-access-copy small { animation: none !important; }
}

/* Unified cyber palette and a stronger, staged connection ceremony. */
.control-strip > .system-access-dock,
body.theme-pocket .control-strip > .system-access-dock {
  border-color: rgba(89, 255, 180, .28);
  background:
    linear-gradient(180deg, rgba(217,255,235,.085), transparent 18%),
    linear-gradient(145deg, #173229, #091813 58%, #050d0a);
  box-shadow:
    inset 0 1px 1px rgba(218,255,236,.16),
    inset 0 -3px 5px rgba(0,0,0,.7),
    0 13px 18px rgba(0,0,0,.44),
    0 0 18px rgba(65,255,166,.075);
}

.system-access-dock > .work-toggle-button,
body.theme-pocket .system-access-dock > .work-toggle-button,
body.theme-moonlight .system-access-dock > .work-toggle-button {
  border-color: rgba(122,255,196,.24);
  background:
    linear-gradient(180deg, rgba(212,255,232,.07), transparent 20%),
    linear-gradient(145deg, #142a22, #07130f 72%);
  box-shadow:
    inset 0 2px 2px rgba(205,255,230,.08),
    inset 0 -4px 7px rgba(0,0,0,.6),
    0 2px 0 rgba(0,0,0,.84);
}

.system-access-dock .system-access-orb {
  border-color: rgba(231,255,241,.82);
  background:
    radial-gradient(circle at 24% 19%, rgba(255,255,255,.88) 0 3%, transparent 10%),
    linear-gradient(112deg, #ffd84f 0%, #bde85b 28%, #4bef9a 59%, #39d9ed 100%);
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,.58),
    inset 0 -5px 8px rgba(7,73,55,.3),
    0 0 0 3px rgba(5,52,38,.76),
    0 0 19px rgba(74,255,170,.52),
    0 8px 10px rgba(0,0,0,.46);
}

.system-access-dock .system-access-orb::after { border-color: rgba(91,255,190,.4); }
.system-access-dock .system-access-orb b { text-shadow: 0 2px 8px rgba(4,62,44,.52); }
.system-access-dock .system-access-copy strong { color: #f2fff8; text-shadow: 0 2px 3px rgba(0,0,0,.85), 0 0 15px rgba(77,255,174,.08); }
.system-access-dock .system-access-copy small { color: rgba(132,255,195,.66); }

.system-access-dock.is-system-connected {
  border-color: rgba(88,255,188,.55);
  background:
    linear-gradient(180deg, rgba(215,255,235,.1), transparent 18%),
    linear-gradient(145deg, #153a2d, #071c15 58%, #04110c);
  box-shadow: inset 0 1px 1px rgba(220,255,239,.2), inset 0 -3px 5px rgba(0,0,0,.68), 0 13px 18px rgba(0,0,0,.44), 0 0 26px rgba(61,255,177,.18);
}

.system-access-dock.is-system-connected .system-access-orb {
  border-color: rgba(229,255,244,.88);
  background:
    radial-gradient(circle at 24% 19%, rgba(255,255,255,.9) 0 3%, transparent 10%),
    linear-gradient(112deg, #38dff1 0%, #4bf1b0 42%, #9aee6a 69%, #ffe05d 100%);
  box-shadow: inset 0 2px 2px rgba(255,255,255,.62), inset 0 -5px 8px rgba(5,77,56,.28), 0 0 0 3px rgba(5,56,40,.78), 0 0 24px rgba(55,255,184,.68), 0 8px 10px rgba(0,0,0,.46);
}

body.system-access-ritual .system-access-dock {
  animation: unifiedDockIgnition 1.62s cubic-bezier(.16,.82,.2,1) both;
}

body.system-access-ritual .system-access-dock::before {
  display: block;
  animation: unifiedFrameIgnition 1.54s ease-out both;
}

body.system-access-ritual .system-access-dock::after {
  top: -18px;
  right: -18px;
  bottom: -18px;
  left: -18px;
  z-index: -1;
  width: auto;
  height: auto;
  border: 2px solid rgba(73,255,176,.72);
  border-radius: 48px;
  background: transparent;
  filter: none;
  animation: unifiedAccessShockwave 1.58s ease-out both;
}

body.system-access-ritual .system-access-dock > .work-toggle-button {
  animation: unifiedSwitchIgnition 1.58s cubic-bezier(.16,.84,.2,1) both !important;
}

body.system-access-ritual .system-access-dock > .work-toggle-button::after {
  animation: unifiedEnergySweep 1.3s .12s ease-out both;
}

body.system-access-ritual .system-access-dock .system-access-orb {
  animation: unifiedSwitchEngage 1.5s cubic-bezier(.16,.84,.2,1) both !important;
}

body.system-access-ritual .system-access-dock .system-access-copy {
  animation: unifiedLabelEngage 1.5s cubic-bezier(.16,.84,.2,1) both !important;
}

body.system-access-ritual .ticker-stage {
  animation: unifiedIncomeIgnition 1.58s ease-out both !important;
}

body.system-access-ritual .ticker-stage .money-wrap {
  animation: unifiedMoneyIgnition 1.58s cubic-bezier(.16,.82,.22,1) both;
}

body.system-access-ritual .ticker-stage .live-label {
  animation: unifiedStatusIgnition 1.45s ease-out both;
}

body.system-exit-ritual .system-access-dock {
  animation: unifiedDockShutdown 1.4s ease-in-out both;
}

body.system-exit-ritual .system-access-dock::before {
  display: block;
  animation: unifiedFrameShutdown 1.32s ease-in both;
}

body.system-exit-ritual .system-access-dock::after {
  top: -12px;
  right: -12px;
  bottom: -12px;
  left: -12px;
  z-index: -1;
  width: auto;
  height: auto;
  border: 2px solid rgba(255,211,92,.55);
  border-radius: 44px;
  background: transparent;
  filter: none;
  animation: unifiedExitCollapse 1.35s ease-in both;
}

body.system-exit-ritual .system-access-dock > .work-toggle-button {
  animation: unifiedSwitchShutdown 1.36s ease-in-out both !important;
}

body.system-exit-ritual .system-access-dock > .work-toggle-button::after {
  animation: physicalSwitchSweepReverse 1.16s ease-in-out both;
}

body.system-exit-ritual .system-access-dock .system-access-orb {
  animation: unifiedSwitchDisengage 1.32s cubic-bezier(.24,.02,.22,1) both !important;
}

body.system-exit-ritual .system-access-dock .system-access-copy {
  animation: unifiedLabelDisengage 1.32s cubic-bezier(.24,.02,.22,1) both !important;
}

body.system-exit-ritual .ticker-stage { animation: unifiedIncomeShutdown 1.36s ease both !important; }

@keyframes unifiedDockIgnition {
  0% { transform: scale(.97); filter: brightness(.72) saturate(.75); }
  18% { transform: scale(.955); filter: brightness(.82) saturate(.9); }
  42% { transform: scale(1.025); filter: brightness(1.46) saturate(1.25); box-shadow: inset 0 1px 1px rgba(220,255,239,.3), 0 13px 18px rgba(0,0,0,.4), 0 0 44px rgba(61,255,177,.38); }
  70% { transform: scale(.995); filter: brightness(1.12); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes unifiedFrameIgnition {
  0% { opacity: .18; transform: scale(.92); box-shadow: inset 0 0 0 rgba(75,255,178,0); }
  36% { opacity: 1; transform: scale(1.025); box-shadow: inset 0 0 22px rgba(75,255,178,.24); }
  100% { opacity: 1; transform: scale(1); box-shadow: inset 0 0 0 rgba(75,255,178,0); }
}

@keyframes unifiedAccessShockwave {
  0% { opacity: 0; transform: scale(.72); }
  30% { opacity: .9; }
  100% { opacity: 0; transform: scale(1.28); }
}

@keyframes unifiedSwitchIgnition {
  0%,100% { transform: translateY(0); }
  14% { transform: translateY(3px) scale(.99); box-shadow: inset 0 5px 9px rgba(0,0,0,.45); }
  43% { transform: translateY(0) scale(1.008); box-shadow: inset 0 0 30px rgba(73,255,176,.13), 0 0 25px rgba(73,255,176,.18); }
}

@keyframes unifiedEnergySweep {
  0% { left: -42%; opacity: 0; }
  22% { opacity: .35; }
  52% { opacity: 1; }
  100% { left: 112%; opacity: 0; }
}

@keyframes unifiedSwitchEngage {
  0% { transform: translateX(0); filter: brightness(.68) saturate(.75); }
  18% { transform: translateX(-6px) scale(.94); filter: brightness(.78); }
  38% { transform: translateX(14px) scale(1.08); filter: brightness(1.56) saturate(1.28); }
  72% { transform: translateX(172px) scale(1.045); filter: brightness(1.34); }
  86% { transform: translateX(162px) scale(.99); }
  100% { transform: translateX(166px); filter: brightness(1); }
}

@keyframes unifiedLabelEngage {
  0% { transform: translateX(0); opacity: 1; }
  24% { opacity: .18; filter: blur(3px); }
  58% { transform: translateX(-134px); opacity: .35; filter: blur(1px); }
  82%,100% { transform: translateX(-126px); opacity: 1; filter: blur(0); }
}

@keyframes unifiedIncomeIgnition {
  0% { filter: brightness(.72) saturate(.72); }
  42% { filter: brightness(1.38) saturate(1.3); transform: scale(1.012); }
  64% { filter: brightness(.94) saturate(1.08); transform: scale(.997); }
  100% { filter: brightness(1) saturate(1); transform: scale(1); }
}

@keyframes unifiedMoneyIgnition {
  0% { transform: scale(.94); filter: brightness(.72); }
  34% { transform: scale(1.075); filter: brightness(1.55); text-shadow: 0 0 35px rgba(74,255,174,.65); }
  58% { transform: scale(.985); }
  82%,100% { transform: scale(1); filter: brightness(1); }
}

@keyframes unifiedStatusIgnition {
  0% { opacity: .45; transform: translateY(4px) scale(.94); }
  38% { opacity: 1; transform: translateY(-2px) scale(1.06); box-shadow: 0 0 24px rgba(68,255,174,.32); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes unifiedDockShutdown {
  0% { transform: scale(1); filter: brightness(1.2); }
  28% { transform: scale(1.018); filter: brightness(1.34) saturate(1.12); }
  58% { transform: scale(.95); filter: brightness(.52) saturate(.52); box-shadow: 0 8px 14px rgba(0,0,0,.52); }
  82% { transform: scale(1.008); filter: brightness(.84); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes unifiedFrameShutdown { 0% { opacity: 1; transform: scale(1); } 56% { opacity: .1; transform: scale(.82); } 100% { opacity: 1; transform: scale(1); } }
@keyframes unifiedExitCollapse { 0% { opacity: .72; transform: scale(1.12); } 100% { opacity: 0; transform: scale(.7); } }
@keyframes unifiedSwitchShutdown { 0%,100% { transform: translateY(0); } 22% { transform: translateY(2px); } 58% { transform: translateY(1px) scale(.988); filter: brightness(.66); } }

@keyframes unifiedSwitchDisengage {
  0% { transform: translateX(166px); filter: brightness(1.25); }
  18% { transform: translateX(172px) scale(.96); }
  42% { transform: translateX(148px) scale(1.06); filter: brightness(1.34); }
  76% { transform: translateX(-6px) scale(1.035); filter: brightness(.65); }
  88% { transform: translateX(4px) scale(.99); }
  100% { transform: translateX(0); filter: brightness(1); }
}

@keyframes unifiedLabelDisengage {
  0% { transform: translateX(-126px); opacity: 1; }
  26% { opacity: .18; filter: blur(3px); }
  62% { transform: translateX(8px); opacity: .4; filter: blur(1px); }
  84%,100% { transform: translateX(0); opacity: 1; filter: blur(0); }
}

@keyframes unifiedIncomeShutdown {
  0% { filter: brightness(1.16) saturate(1.08); }
  52% { filter: brightness(.62) saturate(.6); transform: scale(.992); }
  100% { filter: brightness(1) saturate(1); transform: scale(1); }
}

body.theme-moonlight .control-strip > .system-access-dock {
  border-color: rgba(255,159,215,.38);
  background: linear-gradient(180deg, rgba(255,236,247,.09), transparent 18%), linear-gradient(145deg, #38253c, #1c1222 62%, #0e0912);
}
body.theme-moonlight .system-access-dock > .work-toggle-button {
  border-color: rgba(255,173,221,.3);
  background: linear-gradient(180deg, rgba(255,235,247,.07), transparent 20%), linear-gradient(145deg, #321f36, #160e1a 72%);
}
body.theme-moonlight .system-access-dock .system-access-orb {
  background: radial-gradient(circle at 24% 19%, rgba(255,255,255,.9) 0 3%, transparent 10%), linear-gradient(112deg, #ffd45b 0%, #ff8fbf 32%, #d778ed 65%, #72d9ff 100%);
  box-shadow: inset 0 2px 2px rgba(255,255,255,.62), inset 0 -5px 8px rgba(81,22,78,.3), 0 0 0 3px rgba(64,20,60,.76), 0 0 22px rgba(255,111,203,.55), 0 8px 10px rgba(0,0,0,.46);
}

@media (min-width: 641px) {
  @keyframes unifiedSwitchEngage {
    0% { transform: translateX(0); filter: brightness(.68) saturate(.75); }
    18% { transform: translateX(-6px) scale(.94); }
    38% { transform: translateX(14px) scale(1.08); filter: brightness(1.56); }
    72% { transform: translateX(182px) scale(1.045); }
    86% { transform: translateX(172px) scale(.99); }
    100% { transform: translateX(176px); filter: brightness(1); }
  }
  @keyframes unifiedLabelEngage { 0% { transform: translateX(0); opacity: 1; } 24% { opacity: .18; filter: blur(3px); } 58% { transform: translateX(-138px); opacity: .35; filter: blur(1px); } 82%,100% { transform: translateX(-130px); opacity: 1; filter: blur(0); } }
  @keyframes unifiedSwitchDisengage { 0% { transform: translateX(176px); filter: brightness(1.25); } 18% { transform: translateX(182px) scale(.96); } 42% { transform: translateX(158px) scale(1.06); filter: brightness(1.34); } 76% { transform: translateX(-6px) scale(1.035); filter: brightness(.65); } 88% { transform: translateX(4px) scale(.99); } 100% { transform: translateX(0); filter: brightness(1); } }
  @keyframes unifiedLabelDisengage { 0% { transform: translateX(-130px); opacity: 1; } 26% { opacity: .18; filter: blur(3px); } 62% { transform: translateX(8px); opacity: .4; filter: blur(1px); } 84%,100% { transform: translateX(0); opacity: 1; filter: blur(0); } }
}

@media (prefers-reduced-motion: reduce) {
  body.system-access-ritual .system-access-dock,
  body.system-access-ritual .system-access-dock::before,
  body.system-access-ritual .system-access-dock::after,
  body.system-access-ritual .work-toggle-button,
  body.system-access-ritual .work-toggle-button::after,
  body.system-access-ritual .system-access-orb,
  body.system-access-ritual .system-access-copy,
  body.system-access-ritual .ticker-stage,
  body.system-access-ritual .money-wrap,
  body.system-access-ritual .live-label,
  body.system-exit-ritual .system-access-dock,
  body.system-exit-ritual .system-access-dock::before,
  body.system-exit-ritual .system-access-dock::after,
  body.system-exit-ritual .work-toggle-button,
  body.system-exit-ritual .work-toggle-button::after,
  body.system-exit-ritual .system-access-orb,
  body.system-exit-ritual .system-access-copy,
  body.system-exit-ritual .ticker-stage {
    animation: none !important;
  }
}

/* Physical access switch: inspired by a premium illuminated hardware control. */
.control-strip > .system-access-dock,
body.theme-pocket .control-strip > .system-access-dock {
  position: relative;
  isolation: isolate;
  display: grid;
  width: min(calc(100% - 24px), 334px);
  height: 122px;
  min-height: 122px;
  place-items: center;
  padding: 7px;
  overflow: visible;
  border: 1px solid rgba(190, 214, 207, .24);
  border-radius: 38px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.09), transparent 18%),
    linear-gradient(145deg, #303537, #171b1d 58%, #0c1011);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.22),
    inset 0 -3px 5px rgba(0,0,0,.68),
    0 13px 18px rgba(0,0,0,.42),
    0 3px 3px rgba(0,0,0,.7);
  animation: none;
}

.control-strip > .system-access-dock::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 32px;
  background: none;
  opacity: 1;
  animation: none;
}

.control-strip > .system-access-dock::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -10px;
  left: 18px;
  z-index: -1;
  height: 18px;
  pointer-events: none;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.46);
  filter: blur(9px);
  opacity: 1;
  transform: none;
  animation: none;
}

.system-access-dock > .work-toggle-button,
body.theme-pocket .system-access-dock > .work-toggle-button,
body.theme-moonlight .system-access-dock > .work-toggle-button {
  position: relative;
  display: block !important;
  width: 320px !important;
  max-width: 100%;
  height: 108px !important;
  min-height: 108px !important;
  padding: 8px !important;
  overflow: hidden;
  border: 1px solid rgba(225,238,235,.22);
  border-radius: 31px !important;
  color: #f8fffc;
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), transparent 20%),
    linear-gradient(145deg, #272c2f, #111517 72%);
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,.1),
    inset 0 -4px 7px rgba(0,0,0,.58),
    0 2px 0 rgba(0,0,0,.82);
  cursor: pointer;
  transition: filter .2s ease, box-shadow .2s ease;
}

.system-access-dock > .work-toggle-button:hover,
.system-access-dock > .work-toggle-button:focus-visible {
  transform: none;
  filter: brightness(1.08);
  box-shadow: inset 0 2px 2px rgba(255,255,255,.13), inset 0 -4px 7px rgba(0,0,0,.58), 0 2px 0 rgba(0,0,0,.82), 0 0 22px rgba(83,213,255,.12);
}

.system-access-dock > .work-toggle-button:active {
  transform: translateY(2px) scale(.992);
  filter: brightness(1.14);
  box-shadow: inset 0 3px 6px rgba(0,0,0,.4), 0 0 0 rgba(0,0,0,0);
}

.system-access-dock > .work-toggle-button::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 27px !important;
  background: linear-gradient(105deg, rgba(255,255,255,.055), transparent 30% 72%, rgba(255,255,255,.035));
  animation: none;
}

.system-access-dock > .work-toggle-button::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: -42%;
  z-index: 4;
  width: 34%;
  pointer-events: none;
  border-radius: 24px !important;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.26), transparent);
  opacity: 0;
  transform: skewX(-12deg);
  animation: none;
}

.system-access-dock .system-access-head { display: none !important; }

.system-access-dock .system-access-main {
  position: absolute;
  inset: 8px;
  z-index: 2;
  display: block !important;
  padding: 0;
}

.system-access-dock .system-access-orb {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 126px;
  height: 90px;
  place-items: center;
  overflow: visible;
  border: 2px solid rgba(241, 221, 255, .72);
  border-radius: 27px;
  background:
    radial-gradient(circle at 24% 19%, rgba(255,255,255,.82) 0 3%, transparent 10%),
    linear-gradient(112deg, #ff2fae 2%, #d037d7 35%, #6558f3 65%, #45dfff 100%);
  box-shadow:
    inset 0 2px 2px rgba(255,255,255,.54),
    inset 0 -5px 8px rgba(20,14,78,.34),
    0 0 0 3px rgba(36,15,57,.72),
    0 0 18px rgba(101,93,255,.72),
    0 8px 10px rgba(0,0,0,.44);
  transform: translateX(0);
  animation: physicalSwitchGlow 2.2s ease-in-out infinite;
  transition: transform .7s cubic-bezier(.2,.9,.24,1), filter .25s ease;
}

.system-access-dock .system-access-orb::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.22), transparent 31%);
  box-shadow: none;
}

.system-access-dock .system-access-orb::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(82, 213, 255, .32);
  border-radius: 31px;
  animation: physicalSwitchHalo 2.2s ease-in-out infinite;
}

.system-access-dock .system-access-orb b {
  position: relative;
  z-index: 2;
  width: auto;
  height: auto;
  color: #fff;
  background: transparent;
  font-family: Arial, sans-serif;
  font-size: 2.65rem;
  font-weight: 400;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(35,23,96,.46);
}

.system-access-dock .system-access-copy {
  position: absolute;
  top: 0;
  left: 134px;
  display: grid;
  width: 160px;
  height: 90px;
  place-content: center;
  place-items: center;
  gap: 7px;
  transform: translateX(0);
  transition: transform .7s cubic-bezier(.2,.9,.24,1);
}

.system-access-dock .system-access-copy strong {
  color: #f4f7f6;
  font-size: 1.12rem;
  font-weight: 1000;
  line-height: 1.05;
  letter-spacing: .045em;
  text-shadow: 0 2px 3px rgba(0,0,0,.85);
}

.system-access-dock .system-access-copy small {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(215,229,225,.58);
  background: none;
  font-size: .45rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .12em;
  animation: physicalSwitchPrompt 1.8s ease-in-out infinite;
}

.system-access-dock.is-system-connected {
  border-color: rgba(102,255,214,.38);
  background: linear-gradient(180deg, rgba(255,255,255,.1), transparent 18%), linear-gradient(145deg, #293534, #121a1a 58%, #0a1010);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.22), inset 0 -3px 5px rgba(0,0,0,.68), 0 13px 18px rgba(0,0,0,.42), 0 0 22px rgba(60,255,202,.14);
}

.system-access-dock.is-system-connected .system-access-orb {
  background:
    radial-gradient(circle at 24% 19%, rgba(255,255,255,.82) 0 3%, transparent 10%),
    linear-gradient(112deg, #3bdbff 0%, #22d7cd 40%, #52e989 70%, #e7e75b 100%);
  border-color: rgba(214,255,246,.82);
  box-shadow: inset 0 2px 2px rgba(255,255,255,.54), inset 0 -5px 8px rgba(5,77,73,.3), 0 0 0 3px rgba(5,56,50,.72), 0 0 20px rgba(55,255,204,.62), 0 8px 10px rgba(0,0,0,.44);
  transform: translateX(176px);
}

.system-access-dock.is-system-connected .system-access-copy {
  transform: translateX(-130px);
}

.system-access-dock.is-system-connected .system-access-copy small { color: rgba(116,255,218,.72); }
.system-access-dock.is-setup-required .system-access-orb { filter: saturate(.42) brightness(.72); }

body.system-access-ritual .system-access-dock { animation: physicalDockConnect 1.2s ease-out both; }
body.system-access-ritual .system-access-dock::before { animation: none; }
body.system-access-ritual .system-access-dock::after { animation: none; }
body.system-access-ritual .system-access-dock > .work-toggle-button { animation: physicalSwitchPress 1.2s ease-out both !important; }
body.system-access-ritual .system-access-dock > .work-toggle-button::after { animation: physicalSwitchSweep 1.04s ease-out both; }
body.system-access-ritual .system-access-dock .system-access-orb { animation: physicalSwitchEngage 1.14s cubic-bezier(.16,.84,.22,1) both !important; }
body.system-access-ritual .system-access-dock .system-access-copy { animation: physicalLabelEngage 1.14s cubic-bezier(.16,.84,.22,1) both !important; }

body.system-exit-ritual .system-access-dock { animation: physicalDockExit 1.1s ease-in-out both; }
body.system-exit-ritual .system-access-dock::before { animation: none; }
body.system-exit-ritual .system-access-dock::after { animation: none; }
body.system-exit-ritual .system-access-dock > .work-toggle-button { animation: physicalSwitchPress 1.1s ease-out both !important; }
body.system-exit-ritual .system-access-dock > .work-toggle-button::after { animation: physicalSwitchSweepReverse 1s ease-in-out both; }
body.system-exit-ritual .system-access-dock .system-access-orb { animation: physicalSwitchDisengage 1.06s cubic-bezier(.24,.02,.22,1) both !important; }
body.system-exit-ritual .system-access-dock .system-access-copy { animation: physicalLabelDisengage 1.06s cubic-bezier(.24,.02,.22,1) both !important; }

body.theme-moonlight .control-strip > .system-access-dock {
  border-color: rgba(255,179,224,.32);
  background: linear-gradient(180deg, rgba(255,255,255,.1), transparent 18%), linear-gradient(145deg, #3c3443, #1d1823 60%, #100d14);
}
body.theme-moonlight .system-access-dock > .work-toggle-button {
  border-color: rgba(255,220,242,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.075), transparent 20%), linear-gradient(145deg, #352c3b, #17121d 72%);
}
body.theme-moonlight .system-access-dock .system-access-orb {
  background: radial-gradient(circle at 24% 19%, rgba(255,255,255,.84) 0 3%, transparent 10%), linear-gradient(112deg, #ff4ba7 0%, #e64ec8 36%, #9a62f6 68%, #70d6ff 100%);
}

body.theme-pocket .system-access-dock > .work-toggle-button {
  border: 3px solid #263c31;
  border-radius: 9px !important;
  color: #1c3328;
  background: #53645a;
  box-shadow: inset 0 0 0 3px #829184, 4px 4px 0 #263c31;
}
body.theme-pocket .control-strip > .system-access-dock { border-radius: 11px; background: #2d3932; box-shadow: 7px 7px 0 #263c31; }
body.theme-pocket .system-access-dock .system-access-orb { border-radius: 7px; background: linear-gradient(90deg, #e99f2e, #f7c95b); border-color: #263c31; box-shadow: inset 0 0 0 3px #f8dd8a, 4px 4px 0 #263c31; }
body.theme-pocket .system-access-dock .system-access-orb::before,
body.theme-pocket .system-access-dock .system-access-orb::after { border-radius: 4px; }
body.theme-pocket .system-access-dock .system-access-copy strong { color: #f1f3df; }
body.theme-pocket .system-access-dock .system-access-copy small { color: #d7dfcc; background: transparent; }

@keyframes physicalSwitchGlow {
  0%,100% { filter: brightness(.95); }
  50% { filter: brightness(1.12); box-shadow: inset 0 2px 2px rgba(255,255,255,.6), inset 0 -5px 8px rgba(20,14,78,.3), 0 0 0 3px rgba(36,15,57,.72), 0 0 25px rgba(101,93,255,.86), 0 8px 10px rgba(0,0,0,.44); }
}
@keyframes physicalSwitchHalo { 0%,100% { opacity: .4; transform: scale(.98); } 50% { opacity: .9; transform: scale(1.035); } }
@keyframes physicalSwitchPrompt { 0%,100% { opacity: .48; } 50% { opacity: 1; } }
@keyframes physicalDockConnect { 0% { filter: brightness(.8); } 48% { filter: brightness(1.36); box-shadow: inset 0 1px 1px rgba(255,255,255,.28), 0 13px 18px rgba(0,0,0,.42), 0 0 34px rgba(66,255,208,.3); } 100% { filter: brightness(1); } }
@keyframes physicalDockExit { 0% { filter: brightness(1.16); } 50% { filter: brightness(.62) saturate(.65); } 100% { filter: brightness(1); } }
@keyframes physicalSwitchPress { 0%,100% { transform: translateY(0); } 18% { transform: translateY(2px) scale(.992); } 56% { transform: translateY(0) scale(1.006); } }
@keyframes physicalSwitchSweep { 0% { left: -42%; opacity: 0; } 28% { opacity: .8; } 100% { left: 112%; opacity: 0; } }
@keyframes physicalSwitchSweepReverse { 0% { left: 112%; opacity: 0; } 28% { opacity: .68; } 100% { left: -42%; opacity: 0; } }
@keyframes physicalSwitchEngage { 0% { transform: translateX(0); filter: brightness(.82); } 22% { transform: translateX(-4px) scale(.97); } 72% { transform: translateX(180px) scale(1.035); filter: brightness(1.38); } 100% { transform: translateX(176px); filter: brightness(1); } }
@keyframes physicalLabelEngage { 0% { transform: translateX(0); opacity: 1; } 32% { opacity: .35; } 72%,100% { transform: translateX(-130px); opacity: 1; } }
@keyframes physicalSwitchDisengage { 0% { transform: translateX(176px); filter: brightness(1.15); } 24% { transform: translateX(180px) scale(.97); } 76% { transform: translateX(-4px) scale(1.02); filter: brightness(.72); } 100% { transform: translateX(0); filter: brightness(1); } }
@keyframes physicalLabelDisengage { 0% { transform: translateX(-130px); opacity: 1; } 34% { opacity: .3; } 76%,100% { transform: translateX(0); opacity: 1; } }

@media (max-width: 640px) {
  .control-strip > .system-access-dock,
  body.theme-pocket .control-strip > .system-access-dock {
    width: min(calc(100% - 18px), 326px);
    height: 118px;
    min-height: 118px;
  }
  .system-access-dock > .work-toggle-button,
  body.theme-pocket .system-access-dock > .work-toggle-button,
  body.theme-moonlight .system-access-dock > .work-toggle-button {
    width: 312px !important;
    height: 104px !important;
    min-height: 104px !important;
  }
  .system-access-dock .system-access-orb { width: 122px; height: 86px; }
  .system-access-dock .system-access-copy { left: 130px; width: 158px; height: 86px; }
  .system-access-dock.is-system-connected .system-access-orb { transform: translateX(166px); }
  .system-access-dock.is-system-connected .system-access-copy { transform: translateX(-126px); }
  .system-access-dock .system-access-copy strong { font-size: 1.05rem; }
  @keyframes physicalSwitchEngage { 0% { transform: translateX(0); filter: brightness(.82); } 22% { transform: translateX(-4px) scale(.97); } 72% { transform: translateX(170px) scale(1.035); filter: brightness(1.38); } 100% { transform: translateX(166px); filter: brightness(1); } }
  @keyframes physicalLabelEngage { 0% { transform: translateX(0); opacity: 1; } 32% { opacity: .35; } 72%,100% { transform: translateX(-126px); opacity: 1; } }
  @keyframes physicalSwitchDisengage { 0% { transform: translateX(166px); filter: brightness(1.15); } 24% { transform: translateX(170px) scale(.97); } 76% { transform: translateX(-4px) scale(1.02); filter: brightness(.72); } 100% { transform: translateX(0); filter: brightness(1); } }
  @keyframes physicalLabelDisengage { 0% { transform: translateX(-126px); opacity: 1; } 34% { opacity: .3; } 76%,100% { transform: translateX(0); opacity: 1; } }
}

@media (prefers-reduced-motion: reduce) {
  .system-access-dock .system-access-orb,
  .system-access-dock .system-access-orb::after,
  .system-access-dock .system-access-copy small { animation: none !important; }
}

/* Final precedence layer for the unified green / cyan / gold access system. */
.control-strip > .system-access-dock,
body.theme-pocket .control-strip > .system-access-dock {
  border-color: rgba(89,255,180,.28);
  background: linear-gradient(180deg, rgba(217,255,235,.085), transparent 18%), linear-gradient(145deg, #173229, #091813 58%, #050d0a);
  box-shadow: inset 0 1px 1px rgba(218,255,236,.16), inset 0 -3px 5px rgba(0,0,0,.7), 0 13px 18px rgba(0,0,0,.44), 0 0 18px rgba(65,255,166,.075);
}

.system-access-dock > .work-toggle-button,
body.theme-pocket .system-access-dock > .work-toggle-button,
body.theme-moonlight .system-access-dock > .work-toggle-button {
  border-color: rgba(122,255,196,.24);
  background: linear-gradient(180deg, rgba(212,255,232,.07), transparent 20%), linear-gradient(145deg, #142a22, #07130f 72%);
  box-shadow: inset 0 2px 2px rgba(205,255,230,.08), inset 0 -4px 7px rgba(0,0,0,.6), 0 2px 0 rgba(0,0,0,.84);
}

.system-access-dock .system-access-orb {
  border-color: rgba(231,255,241,.82);
  background: radial-gradient(circle at 24% 19%, rgba(255,255,255,.88) 0 3%, transparent 10%), linear-gradient(112deg, #ffd84f 0%, #bde85b 28%, #4bef9a 59%, #39d9ed 100%);
  box-shadow: inset 0 2px 2px rgba(255,255,255,.58), inset 0 -5px 8px rgba(7,73,55,.3), 0 0 0 3px rgba(5,52,38,.76), 0 0 19px rgba(74,255,170,.52), 0 8px 10px rgba(0,0,0,.46);
}
.system-access-dock .system-access-orb::after { border-color: rgba(91,255,190,.4); }
.system-access-dock .system-access-orb b { text-shadow: 0 2px 8px rgba(4,62,44,.52); }
.system-access-dock .system-access-copy strong { color: #f2fff8; text-shadow: 0 2px 3px rgba(0,0,0,.85), 0 0 15px rgba(77,255,174,.08); }
.system-access-dock .system-access-copy small { color: rgba(132,255,195,.66); }

.system-access-dock.is-system-connected {
  border-color: rgba(88,255,188,.55);
  background: linear-gradient(180deg, rgba(215,255,235,.1), transparent 18%), linear-gradient(145deg, #153a2d, #071c15 58%, #04110c);
  box-shadow: inset 0 1px 1px rgba(220,255,239,.2), inset 0 -3px 5px rgba(0,0,0,.68), 0 13px 18px rgba(0,0,0,.44), 0 0 26px rgba(61,255,177,.18);
}
.system-access-dock.is-system-connected .system-access-orb {
  border-color: rgba(229,255,244,.88);
  background: radial-gradient(circle at 24% 19%, rgba(255,255,255,.9) 0 3%, transparent 10%), linear-gradient(112deg, #38dff1 0%, #4bf1b0 42%, #9aee6a 69%, #ffe05d 100%);
  box-shadow: inset 0 2px 2px rgba(255,255,255,.62), inset 0 -5px 8px rgba(5,77,56,.28), 0 0 0 3px rgba(5,56,40,.78), 0 0 24px rgba(55,255,184,.68), 0 8px 10px rgba(0,0,0,.46);
}

body.system-access-ritual .system-access-dock { animation: unifiedDockIgnition 1.62s cubic-bezier(.16,.82,.2,1) both !important; }
body.system-access-ritual .system-access-dock::before { display: block; animation: unifiedFrameIgnition 1.54s ease-out both !important; }
body.system-access-ritual .system-access-dock::after {
  top: -18px; right: -18px; bottom: -18px; left: -18px; z-index: -1; width: auto; height: auto;
  border: 2px solid rgba(73,255,176,.72); border-radius: 48px; background: transparent; filter: none;
  animation: unifiedAccessShockwave 1.58s ease-out both !important;
}
body.system-access-ritual .system-access-dock > .work-toggle-button { animation: unifiedSwitchIgnition 1.58s cubic-bezier(.16,.84,.2,1) both !important; }
body.system-access-ritual .system-access-dock > .work-toggle-button::after { animation: unifiedEnergySweep 1.3s .12s ease-out both !important; }
body.system-access-ritual .system-access-dock .system-access-orb { animation: unifiedSwitchEngage 1.5s cubic-bezier(.16,.84,.2,1) both !important; }
body.system-access-ritual .system-access-dock .system-access-copy { animation: unifiedLabelEngage 1.5s cubic-bezier(.16,.84,.2,1) both !important; }
body.system-access-ritual .ticker-stage { animation: unifiedIncomeIgnition 1.58s ease-out both !important; }
body.system-access-ritual .ticker-stage .money-wrap { animation: unifiedMoneyIgnition 1.58s cubic-bezier(.16,.82,.22,1) both !important; }
body.system-access-ritual .ticker-stage .live-label { animation: unifiedStatusIgnition 1.45s ease-out both !important; }

body.system-exit-ritual .system-access-dock { animation: unifiedDockShutdown 1.4s ease-in-out both !important; }
body.system-exit-ritual .system-access-dock::before { display: block; animation: unifiedFrameShutdown 1.32s ease-in both !important; }
body.system-exit-ritual .system-access-dock::after {
  top: -12px; right: -12px; bottom: -12px; left: -12px; z-index: -1; width: auto; height: auto;
  border: 2px solid rgba(255,211,92,.55); border-radius: 44px; background: transparent; filter: none;
  animation: unifiedExitCollapse 1.35s ease-in both !important;
}
body.system-exit-ritual .system-access-dock > .work-toggle-button { animation: unifiedSwitchShutdown 1.36s ease-in-out both !important; }
body.system-exit-ritual .system-access-dock > .work-toggle-button::after { animation: physicalSwitchSweepReverse 1.16s ease-in-out both !important; }
body.system-exit-ritual .system-access-dock .system-access-orb { animation: unifiedSwitchDisengage 1.32s cubic-bezier(.24,.02,.22,1) both !important; }
body.system-exit-ritual .system-access-dock .system-access-copy { animation: unifiedLabelDisengage 1.32s cubic-bezier(.24,.02,.22,1) both !important; }
body.system-exit-ritual .ticker-stage { animation: unifiedIncomeShutdown 1.36s ease both !important; }

body.theme-moonlight .control-strip > .system-access-dock {
  border-color: rgba(255,159,215,.38);
  background: linear-gradient(180deg, rgba(255,236,247,.09), transparent 18%), linear-gradient(145deg, #38253c, #1c1222 62%, #0e0912);
}
body.theme-moonlight .system-access-dock > .work-toggle-button {
  border-color: rgba(255,173,221,.3);
  background: linear-gradient(180deg, rgba(255,235,247,.07), transparent 20%), linear-gradient(145deg, #321f36, #160e1a 72%);
}
body.theme-moonlight .system-access-dock .system-access-orb {
  background: radial-gradient(circle at 24% 19%, rgba(255,255,255,.9) 0 3%, transparent 10%), linear-gradient(112deg, #ffd45b 0%, #ff8fbf 32%, #d778ed 65%, #72d9ff 100%);
  box-shadow: inset 0 2px 2px rgba(255,255,255,.62), inset 0 -5px 8px rgba(81,22,78,.3), 0 0 0 3px rgba(64,20,60,.76), 0 0 22px rgba(255,111,203,.55), 0 8px 10px rgba(0,0,0,.46);
}

body.theme-pocket .control-strip > .system-access-dock { border-color: #263c31; background: #2d3932; box-shadow: 7px 7px 0 #263c31; }
body.theme-pocket .system-access-dock > .work-toggle-button { border-color: #263c31; background: #53645a; box-shadow: inset 0 0 0 3px #829184, 4px 4px 0 #263c31; }
body.theme-pocket .system-access-dock .system-access-orb { background: linear-gradient(90deg, #e99f2e, #f7c95b); border-color: #263c31; box-shadow: inset 0 0 0 3px #f8dd8a, 4px 4px 0 #263c31; }

@media (prefers-reduced-motion: reduce) {
  body.system-access-ritual .system-access-dock,
  body.system-access-ritual .system-access-dock::before,
  body.system-access-ritual .system-access-dock::after,
  body.system-access-ritual .work-toggle-button,
  body.system-access-ritual .work-toggle-button::after,
  body.system-access-ritual .system-access-orb,
  body.system-access-ritual .system-access-copy,
  body.system-access-ritual .ticker-stage,
  body.system-access-ritual .money-wrap,
  body.system-access-ritual .live-label,
  body.system-exit-ritual .system-access-dock,
  body.system-exit-ritual .system-access-dock::before,
  body.system-exit-ritual .system-access-dock::after,
  body.system-exit-ritual .work-toggle-button,
  body.system-exit-ritual .work-toggle-button::after,
  body.system-exit-ritual .system-access-orb,
  body.system-exit-ritual .system-access-copy,
  body.system-exit-ritual .ticker-stage { animation: none !important; }
}

/* Connected-state drag must outrank the settled right-side position. */
.system-access-dock.is-system-connected.is-access-dragging .system-access-orb {
  transform: translateX(var(--access-drag-x, 0px)) scale(calc(.96 + var(--access-drag-progress, 0) * .06)) !important;
  animation: none !important;
  transition: none !important;
}
.system-access-dock.is-system-connected.is-access-dragging .system-access-copy {
  transform: translateX(var(--access-copy-x, 0px)) !important;
  animation: none !important;
  transition: none !important;
}

.system-access-dock.is-access-dragging .system-access-copy,
.system-access-dock.is-system-connected.is-access-dragging .system-access-copy {
  opacity: calc(1 - var(--access-drag-progress, 0) * 3.2);
  filter: blur(calc(var(--access-drag-progress, 0) * 3px));
}

/* Unified push-button access control: no slider, no large green block. */
.control-strip > .system-access-dock,
body.theme-pocket .control-strip > .system-access-dock {
  width: min(calc(100% - 18px), 326px);
  height: 112px;
  min-height: 112px;
  padding: 7px;
  border: 1px solid rgba(87,255,181,.32);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(211,255,233,.07), transparent 18%), linear-gradient(145deg, #142a22, #07140f 62%, #040b08);
  box-shadow: inset 0 1px 1px rgba(218,255,236,.13), inset 0 -3px 6px rgba(0,0,0,.72), 0 13px 18px rgba(0,0,0,.42), 0 0 18px rgba(64,255,173,.07);
}

.system-access-dock > .work-toggle-button,
body.theme-pocket .system-access-dock > .work-toggle-button,
body.theme-moonlight .system-access-dock > .work-toggle-button {
  display: grid !important;
  width: 312px !important;
  max-width: 100%;
  height: 98px !important;
  min-height: 98px !important;
  place-items: center;
  padding: 13px 18px 11px !important;
  border: 1px solid rgba(112,255,195,.34);
  border-radius: 24px !important;
  color: #f4fff9;
  background:
    radial-gradient(circle at 50% 52%, rgba(65,255,175,.075), transparent 55%),
    linear-gradient(180deg, rgba(221,255,238,.065), transparent 22%),
    linear-gradient(145deg, #11251d, #06120d 74%);
  box-shadow: inset 0 1px 0 rgba(213,255,232,.11), inset 0 -5px 9px rgba(0,0,0,.48), 0 2px 0 rgba(0,0,0,.86);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.system-access-dock > .work-toggle-button:hover,
.system-access-dock > .work-toggle-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: inset 0 0 28px rgba(67,255,175,.11), 0 0 24px rgba(65,255,174,.14), 0 2px 0 rgba(0,0,0,.86);
}

.system-access-dock > .work-toggle-button:active {
  transform: translateY(3px) scale(.985);
  filter: brightness(1.2);
  box-shadow: inset 0 5px 11px rgba(0,0,0,.48), 0 0 14px rgba(65,255,174,.12);
}

.system-access-dock > .work-toggle-button::before {
  inset: 6px;
  border: 1px solid rgba(91,255,187,.17);
  border-radius: 18px !important;
  background:
    linear-gradient(90deg, #5cffb4 0 19px, transparent 19px calc(100% - 19px), #ffe067 calc(100% - 19px)) top / 100% 1px no-repeat,
    linear-gradient(90deg, #ffe067 0 19px, transparent 19px calc(100% - 19px), #5cffb4 calc(100% - 19px)) bottom / 100% 1px no-repeat;
  opacity: .72;
  box-shadow: none;
}

.system-access-dock > .work-toggle-button::after {
  top: 7px;
  bottom: 7px;
  left: -42%;
  width: 30%;
  border-radius: 18px !important;
  background: linear-gradient(100deg, transparent, rgba(184,255,220,.24), transparent);
  opacity: 0;
}

.system-access-dock .system-access-head {
  position: absolute;
  top: 13px;
  right: 17px;
  left: 17px;
  z-index: 3;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.system-access-dock .system-access-head small {
  display: block;
  color: rgba(132,255,195,.58);
  font-size: .39rem;
  font-weight: 950;
  letter-spacing: .2em;
}

.system-access-dock .system-access-head > b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid rgba(91,255,184,.22);
  border-radius: 999px;
  color: rgba(187,255,220,.72);
  background: rgba(65,255,175,.035);
  font-size: .37rem;
  letter-spacing: .1em;
}

.system-access-dock .system-access-head > b::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffe06a;
  box-shadow: 0 0 8px rgba(255,224,106,.68);
}

.system-access-dock .system-access-main {
  position: relative;
  inset: auto;
  z-index: 2;
  display: grid !important;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 13px 0 0;
}

.system-access-dock .system-access-copy,
.system-access-dock.is-system-connected .system-access-copy {
  position: static;
  display: grid;
  width: auto;
  height: auto;
  place-items: center;
  gap: 7px;
  opacity: 1;
  filter: none;
  transform: none !important;
  transition: none;
}

.system-access-dock .system-access-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f5fff9;
  font-size: 1.2rem;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: .11em;
  text-shadow: 0 2px 4px rgba(0,0,0,.86), 0 0 16px rgba(65,255,174,.13);
}

.system-access-dock .system-access-copy strong::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 2px solid rgba(255,226,105,.72);
  border-radius: 50%;
  background: #ffe16a;
  box-shadow: 0 0 0 5px rgba(255,225,106,.055), 0 0 12px rgba(255,225,106,.42);
}

.system-access-dock .system-access-copy small {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  color: rgba(133,255,197,.62);
  background: none;
  font-size: .45rem;
  font-weight: 900;
  letter-spacing: .14em;
  animation: pushAccessPrompt 1.8s ease-in-out infinite;
}

.system-access-dock.is-system-connected {
  border-color: rgba(83,255,190,.54);
  background: linear-gradient(180deg, rgba(212,255,234,.09), transparent 18%), linear-gradient(145deg, #153429, #071b14 62%, #030e09);
}
.system-access-dock.is-system-connected .system-access-head > b::before { background: #5effb7; box-shadow: 0 0 10px rgba(94,255,183,.85); }
.system-access-dock.is-system-connected .system-access-copy strong::before { border-color: rgba(83,255,185,.78); background: #5effb7; box-shadow: 0 0 0 5px rgba(83,255,185,.06), 0 0 14px rgba(83,255,185,.55); }

body.system-access-ritual .system-access-dock > .work-toggle-button { animation: pushAccessEngage 1.62s cubic-bezier(.16,.84,.2,1) both !important; }
body.system-access-ritual .system-access-dock > .work-toggle-button::before { animation: pushAccessFrame 1.5s ease-out both !important; }
body.system-access-ritual .system-access-dock > .work-toggle-button::after { animation: unifiedEnergySweep 1.3s .1s ease-out both !important; }
body.system-access-ritual .system-access-copy { animation: pushAccessCopy 1.48s ease-out both !important; }
body.system-exit-ritual .system-access-dock > .work-toggle-button { animation: pushAccessDisengage 1.4s ease-in-out both !important; }
body.system-exit-ritual .system-access-dock > .work-toggle-button::before { animation: pushAccessFrameExit 1.3s ease-in both !important; }
body.system-exit-ritual .system-access-dock > .work-toggle-button::after { animation: physicalSwitchSweepReverse 1.12s ease-in-out both !important; }
body.system-exit-ritual .system-access-copy { animation: pushAccessCopyExit 1.3s ease-in-out both !important; }

body.theme-moonlight .control-strip > .system-access-dock { border-color: rgba(255,157,214,.38); background: linear-gradient(180deg, rgba(255,236,247,.08), transparent 18%), linear-gradient(145deg, #38243b, #1b1120 64%, #0d0810); }
body.theme-moonlight .system-access-dock > .work-toggle-button { border-color: rgba(255,167,218,.28); background: radial-gradient(circle at 50% 52%, rgba(255,142,209,.07), transparent 55%), linear-gradient(145deg, #301d32, #160c19 74%); }
body.theme-moonlight .system-access-head small,
body.theme-moonlight .system-access-copy small { color: rgba(255,174,221,.68); }

body.theme-pocket .control-strip > .system-access-dock { border: 4px solid #263c31; border-radius: 8px; background: #d5ddcc; box-shadow: 7px 7px 0 #263c31; }
body.theme-pocket .system-access-dock > .work-toggle-button { border: 3px solid #263c31; border-radius: 4px !important; color: #1c3328; background: #bccbb6; box-shadow: 4px 4px 0 #263c31; }
body.theme-pocket .system-access-dock .system-access-copy strong { color: #1c3328; text-shadow: none; }
body.theme-pocket .system-access-dock .system-access-copy small { color: #89540a; }

@keyframes pushAccessPrompt { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes pushAccessEngage {
  0% { transform: translateY(0) scale(1); filter: brightness(.86); }
  15% { transform: translateY(5px) scale(.975); filter: brightness(.74); box-shadow: inset 0 8px 15px rgba(0,0,0,.55); }
  34% { transform: translateY(1px) scale(1.018); filter: brightness(1.52); box-shadow: inset 0 0 38px rgba(67,255,177,.2), 0 0 28px rgba(67,255,177,.28); }
  58% { transform: translateY(0) scale(.994); filter: brightness(1.08); }
  78% { transform: translateY(-1px) scale(1.007); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}
@keyframes pushAccessFrame { 0% { opacity: .28; transform: scale(.9); } 38% { opacity: 1; transform: scale(1.025); box-shadow: inset 0 0 28px rgba(67,255,177,.2); } 100% { opacity: .72; transform: scale(1); } }
@keyframes pushAccessCopy { 0% { opacity: .5; transform: scale(.94); } 34% { opacity: 1; transform: scale(1.12); filter: brightness(1.55); } 58% { transform: scale(.98); } 100% { transform: scale(1); filter: brightness(1); } }
@keyframes pushAccessDisengage { 0% { transform: translateY(0); filter: brightness(1.18); } 22% { transform: translateY(4px) scale(.98); filter: brightness(1.3); } 54% { transform: translateY(2px) scale(.97); filter: brightness(.58) saturate(.58); } 78% { transform: translateY(-1px) scale(1.006); } 100% { transform: translateY(0) scale(1); filter: brightness(1); } }
@keyframes pushAccessFrameExit { 0% { opacity: .9; transform: scale(1.02); } 55% { opacity: .1; transform: scale(.82); } 100% { opacity: .72; transform: scale(1); } }
@keyframes pushAccessCopyExit { 0% { opacity: 1; transform: scale(1); } 44% { opacity: .28; transform: scale(.9); filter: blur(2px); } 72% { opacity: .8; transform: scale(1.025); } 100% { opacity: 1; transform: scale(1); filter: blur(0); } }

@media (prefers-reduced-motion: reduce) {
  .system-access-dock .system-access-copy small,
  body.system-access-ritual .system-access-dock > .work-toggle-button,
  body.system-access-ritual .system-access-dock > .work-toggle-button::before,
  body.system-access-ritual .system-access-dock > .work-toggle-button::after,
  body.system-access-ritual .system-access-copy,
  body.system-exit-ritual .system-access-dock > .work-toggle-button,
  body.system-exit-ritual .system-access-dock > .work-toggle-button::before,
  body.system-exit-ritual .system-access-dock > .work-toggle-button::after,
  body.system-exit-ritual .system-access-copy { animation: none !important; }
}

/* Access ritual v2: staged energy lock without changing the approved button UI. */
.system-access-dock {
  isolation: isolate;
  overflow: visible;
}

.access-ritual-layer {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.access-ritual-ring,
.access-ritual-core,
.access-ritual-spark {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.access-ritual-ring {
  inset: 50% auto auto 50%;
  width: 98%;
  height: 88%;
  border: 1px solid rgba(91, 255, 188, .7);
  border-radius: 30px;
  box-shadow: 0 0 10px rgba(72, 255, 177, .18), inset 0 0 8px rgba(72, 255, 177, .08);
  transform: translate(-50%, -50%) scale(.78);
}

.access-ritual-ring-two { border-color: rgba(255, 222, 94, .62); }
.access-ritual-ring-three { border-color: rgba(91, 219, 255, .55); }

.access-ritual-core {
  inset: 50% auto auto 50%;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 231, 132, .8);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 230, .95) 0 8%, #ffe267 9% 25%, rgba(78, 255, 181, .75) 26% 43%, transparent 46%);
  box-shadow: 0 0 10px #fff4ae, 0 0 24px rgba(84, 255, 183, .8), 0 0 48px rgba(84, 255, 183, .28);
  transform: translate(-50%, -50%) scale(.2);
}

.access-ritual-spark {
  inset: 50% auto auto 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff6b0;
  box-shadow: 0 0 8px #ffe16a, 0 0 14px rgba(80, 255, 185, .74);
  transform: translate(-50%, -50%);
}

.access-ritual-spark-one { --spark-x: -142px; --spark-y: -44px; --spark-mid-x: -51px; --spark-mid-y: -16px; }
.access-ritual-spark-two { --spark-x: 142px; --spark-y: -42px; --spark-mid-x: 51px; --spark-mid-y: -15px; }
.access-ritual-spark-three { --spark-x: -142px; --spark-y: 43px; --spark-mid-x: -51px; --spark-mid-y: 15px; }
.access-ritual-spark-four { --spark-x: 142px; --spark-y: 41px; --spark-mid-x: 51px; --spark-mid-y: 15px; }

body.system-access-ritual .access-ritual-core {
  animation: accessCoreIgnition 1.36s cubic-bezier(.12, .82, .19, 1) both;
}

body.system-access-ritual .access-ritual-ring-one { animation: accessRingLock 1.42s .22s cubic-bezier(.12, .76, .18, 1) both; }
body.system-access-ritual .access-ritual-ring-two { animation: accessRingLock 1.52s .38s cubic-bezier(.12, .76, .18, 1) both; }
body.system-access-ritual .access-ritual-ring-three { animation: accessRingLock 1.62s .54s cubic-bezier(.12, .76, .18, 1) both; }

body.system-access-ritual .access-ritual-spark {
  animation: accessSparkLock 1.18s .42s cubic-bezier(.14, .76, .2, 1) both;
}

body.system-exit-ritual .access-ritual-core { animation: accessCoreShutdown 1.5s ease-in-out both; }
body.system-exit-ritual .access-ritual-ring-one { animation: accessRingRelease 1.34s .02s ease-in both; }
body.system-exit-ritual .access-ritual-ring-two { animation: accessRingRelease 1.34s .11s ease-in both; }
body.system-exit-ritual .access-ritual-ring-three { animation: accessRingRelease 1.34s .2s ease-in both; }
body.system-exit-ritual .access-ritual-spark { animation: accessSparkRelease 1.18s .08s ease-in both; }

body.system-access-ritual .system-access-dock .system-access-head > b {
  animation: accessStatusLock 1.72s .24s steps(5, end) both !important;
}

body.system-access-ritual .system-access-dock .system-access-copy strong::before {
  animation: accessStatusOrb 1.56s .18s cubic-bezier(.16, .8, .2, 1) both !important;
}

body.system-exit-ritual .system-access-dock .system-access-head > b,
body.system-exit-ritual .system-access-dock .system-access-copy strong::before {
  animation: accessStatusOffline 1.42s ease-in-out both !important;
}

body.system-access-ritual .money-wrap {
  animation: accessIncomeHandshake 1.9s .18s cubic-bezier(.16, .8, .2, 1) both !important;
}

body.system-access-ritual .per-second {
  animation: accessCaptionHandshake 1.76s .34s ease-out both;
}

body.system-exit-ritual .money-wrap {
  animation: accessIncomeRelease 1.55s ease-in-out both !important;
}

.system-access-dock.is-system-connected:not(.is-setup-required) .system-access-head > b::before {
  animation: connectedStatusBreath 2.8s ease-in-out infinite;
}

@keyframes accessCoreIgnition {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.12); filter: brightness(.4); }
  13% { opacity: 1; transform: translate(-50%, -50%) scale(.32); filter: brightness(.75); }
  26% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); filter: brightness(2); }
  38% { opacity: .88; transform: translate(-50%, -50%) scale(.76); }
  56% { opacity: 1; transform: translate(-50%, -50%) scale(1.55); filter: brightness(2.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(4.8); filter: brightness(1); }
}

@keyframes accessRingLock {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.72); filter: blur(3px); }
  24% { opacity: .94; }
  58% { opacity: .62; transform: translate(-50%, -50%) scale(1.08); filter: blur(0); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.34); filter: blur(.5px); }
}

@keyframes accessSparkLock {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  18% { opacity: 1; transform: translate(calc(-50% + var(--spark-x)), calc(-50% + var(--spark-y))) scale(1); }
  54% { opacity: 1; transform: translate(calc(-50% + var(--spark-mid-x)), calc(-50% + var(--spark-mid-y))) scale(1.45); }
  82% { opacity: .9; transform: translate(-50%, -50%) scale(.65); filter: brightness(2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.1); }
}

@keyframes accessCoreShutdown {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(3.6); }
  28% { opacity: .82; transform: translate(-50%, -50%) scale(1.5); }
  58% { opacity: 1; transform: translate(-50%, -50%) scale(.72); filter: brightness(1.8); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.08); filter: brightness(.3); }
}

@keyframes accessRingRelease {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
  32% { opacity: .74; }
  72% { opacity: .42; transform: translate(-50%, -50%) scale(.86); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.58); filter: blur(3px); }
}

@keyframes accessSparkRelease {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.1); }
  30% { opacity: .9; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--spark-x)), calc(-50% + var(--spark-y))) scale(.3); filter: brightness(.4); }
}

@keyframes accessStatusLock {
  0%, 18% { opacity: .25; filter: brightness(.4); }
  22%, 38% { opacity: 1; filter: brightness(1.8); }
  42%, 55% { opacity: .38; }
  59%, 72% { opacity: 1; filter: brightness(2); }
  76%, 100% { opacity: 1; filter: brightness(1); }
}

@keyframes accessStatusOrb {
  0% { transform: scale(.4); opacity: .25; }
  26% { transform: scale(1.8); opacity: 1; box-shadow: 0 0 0 15px rgba(85, 255, 185, .02), 0 0 24px rgba(85, 255, 185, .95); }
  52% { transform: scale(.82); }
  76% { transform: scale(1.18); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes accessStatusOffline {
  0% { opacity: 1; filter: brightness(1.45); transform: scale(1); }
  28% { opacity: .28; filter: brightness(.45); transform: scale(.88); }
  46% { opacity: .9; }
  64% { opacity: .18; }
  100% { opacity: 1; filter: brightness(1); transform: scale(1); }
}

@keyframes accessIncomeHandshake {
  0% { transform: scale(.985); filter: brightness(.66) saturate(.65); }
  18% { transform: scale(.998); filter: brightness(.85); }
  30% { transform: scale(1.035); filter: brightness(1.8) saturate(1.45); }
  42% { transform: scale(.992); filter: brightness(.92); }
  58% { transform: scale(1.018); filter: brightness(1.42); }
  76% { transform: scale(.998); }
  100% { transform: scale(1); filter: brightness(1) saturate(1); }
}

@keyframes accessCaptionHandshake {
  0% { opacity: .2; transform: translateY(7px); letter-spacing: .03em; }
  44% { opacity: 1; transform: translateY(-2px); letter-spacing: .12em; }
  100% { opacity: 1; transform: translateY(0); letter-spacing: normal; }
}

@keyframes accessIncomeRelease {
  0% { transform: scale(1); filter: brightness(1.25); }
  30% { transform: scale(.985); filter: brightness(.55) saturate(.6); }
  56% { transform: scale(1.012); filter: brightness(.82); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes connectedStatusBreath {
  0%, 100% { opacity: .72; transform: scale(.82); box-shadow: 0 0 6px rgba(94, 255, 183, .45); }
  50% { opacity: 1; transform: scale(1.12); box-shadow: 0 0 12px rgba(94, 255, 183, .9); }
}

body.theme-moonlight .access-ritual-ring { border-color: rgba(255, 163, 218, .66); box-shadow: 0 0 12px rgba(255, 126, 205, .22); }
body.theme-moonlight .access-ritual-ring-two { border-color: rgba(255, 221, 113, .64); }
body.theme-moonlight .access-ritual-core { background: radial-gradient(circle, #fff 0 8%, #ffe984 9% 24%, rgba(255, 128, 207, .78) 25% 43%, transparent 46%); }
body.theme-pocket .access-ritual-ring { border-radius: 4px; border-width: 3px; border-color: #263c31; box-shadow: 5px 5px 0 rgba(38, 60, 49, .32); }

@media (prefers-reduced-motion: reduce) {
  .access-ritual-layer *,
  body.system-access-ritual .system-access-dock .system-access-head > b,
  body.system-access-ritual .system-access-dock .system-access-copy strong::before,
  body.system-access-ritual .money-wrap,
  body.system-access-ritual .per-second,
  body.system-exit-ritual .system-access-dock .system-access-head > b,
  body.system-exit-ritual .system-access-dock .system-access-copy strong::before,
  body.system-exit-ritual .money-wrap,
  .system-access-dock.is-system-connected .system-access-head > b::before { animation: none !important; }
}

/* Center-focused access color: richer at the action point, dark at the edges. */
.system-access-dock > .work-toggle-button,
body.theme-pocket .system-access-dock > .work-toggle-button,
body.theme-moonlight .system-access-dock > .work-toggle-button {
  background:
    radial-gradient(ellipse 38% 60% at 50% 58%, rgba(255, 224, 99, .19) 0 7%, rgba(74, 255, 187, .18) 25%, rgba(35, 194, 225, .1) 48%, transparent 76%),
    radial-gradient(ellipse 72% 95% at 50% 54%, rgba(36, 255, 177, .075), transparent 70%),
    linear-gradient(180deg, rgba(221, 255, 238, .07), transparent 22%),
    linear-gradient(145deg, #11251d, #06120d 74%) !important;
  box-shadow:
    inset 0 1px 0 rgba(213, 255, 232, .13),
    inset 0 -5px 9px rgba(0, 0, 0, .48),
    inset 0 0 28px rgba(44, 255, 179, .035),
    0 2px 0 rgba(0, 0, 0, .86),
    0 0 16px rgba(51, 255, 180, .06);
}

.system-access-dock .system-access-main::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: -1;
  width: 154px;
  height: 58px;
  border: 1px solid rgba(104, 255, 205, .1);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 230, 112, .12), rgba(63, 255, 190, .08) 42%, transparent 72%);
  box-shadow: 0 0 24px rgba(51, 255, 184, .07);
  opacity: .82;
  transform: translate(-50%, -39%);
  pointer-events: none;
}

.system-access-dock .system-access-copy strong {
  background: linear-gradient(90deg, #eafff6 0%, #fff4b8 48%, #dffff3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .82)) drop-shadow(0 0 8px rgba(79, 255, 190, .15));
  text-shadow: none;
}

.system-access-dock:not(.is-system-connected) .system-access-copy strong::before {
  border-color: rgba(255, 229, 118, .78);
  background: linear-gradient(145deg, #fff4a5, #ffc94e 48%, #48f5c1 100%);
  box-shadow: 0 0 0 5px rgba(255, 220, 94, .045), 0 0 12px rgba(255, 221, 96, .55), 0 0 22px rgba(64, 244, 189, .2);
}

.system-access-dock.is-system-connected > .work-toggle-button {
  background:
    radial-gradient(ellipse 42% 64% at 50% 58%, rgba(77, 255, 192, .23), rgba(51, 213, 230, .12) 42%, transparent 76%),
    radial-gradient(ellipse 72% 95% at 50% 54%, rgba(255, 223, 96, .055), transparent 69%),
    linear-gradient(180deg, rgba(221, 255, 238, .075), transparent 22%),
    linear-gradient(145deg, #123026, #061711 74%) !important;
}

.system-access-dock.is-system-connected .system-access-main::before {
  border-color: rgba(91, 255, 198, .15);
  background: radial-gradient(ellipse, rgba(97, 255, 200, .17), rgba(41, 206, 232, .08) 46%, transparent 74%);
  box-shadow: 0 0 28px rgba(61, 255, 188, .11);
}

body.theme-moonlight .system-access-dock > .work-toggle-button {
  background:
    radial-gradient(ellipse 40% 62% at 50% 58%, rgba(255, 224, 108, .19), rgba(255, 130, 207, .19) 30%, rgba(124, 111, 255, .1) 52%, transparent 76%),
    linear-gradient(180deg, rgba(255, 235, 247, .075), transparent 22%),
    linear-gradient(145deg, #301d32, #160c19 74%) !important;
}

body.theme-moonlight .system-access-dock .system-access-main::before {
  border-color: rgba(255, 173, 220, .15);
  background: radial-gradient(ellipse, rgba(255, 225, 113, .13), rgba(255, 126, 207, .11) 46%, transparent 74%);
  box-shadow: 0 0 26px rgba(255, 123, 205, .1);
}

body.theme-pocket .system-access-dock > .work-toggle-button {
  background:
    radial-gradient(ellipse 42% 68% at 50% 57%, rgba(247, 201, 91, .58), rgba(233, 159, 46, .25) 42%, transparent 72%),
    #bccbb6 !important;
}

body.theme-pocket .system-access-dock .system-access-copy strong {
  background: none;
  color: #1c3328;
  filter: none;
}

/* Standby beacon: a single light band sweeps only while the system is offline. */
.system-access-dock:not(.is-system-connected):not(.is-setup-required) > .work-toggle-button::after {
  top: 7px;
  bottom: 7px;
  left: -38%;
  width: 34%;
  border-radius: 18px !important;
  background: linear-gradient(
    102deg,
    transparent 0%,
    rgba(69, 221, 255, .04) 18%,
    rgba(91, 255, 197, .36) 43%,
    rgba(255, 231, 121, .68) 52%,
    rgba(92, 236, 255, .3) 62%,
    transparent 100%
  );
  mix-blend-mode: screen;
  opacity: 0;
  filter: blur(.2px);
  animation: accessStandbySweep 1.8s cubic-bezier(.42, 0, .58, 1) infinite;
  pointer-events: none;
}

.system-access-dock.is-system-connected > .work-toggle-button::after,
.system-access-dock.is-setup-required > .work-toggle-button::after {
  opacity: 0;
  animation: none;
}

@keyframes accessStandbySweep {
  0%, 12% { left: -38%; opacity: 0; transform: skewX(-12deg) scaleX(.7); }
  22% { opacity: .72; }
  52% { opacity: 1; transform: skewX(-12deg) scaleX(1); }
  82% { opacity: .58; }
  91%, 100% { left: 108%; opacity: 0; transform: skewX(-12deg) scaleX(.72); }
}

body.theme-moonlight .system-access-dock:not(.is-system-connected):not(.is-setup-required) > .work-toggle-button::after {
  background: linear-gradient(102deg, transparent, rgba(255, 147, 219, .38) 40%, rgba(255, 229, 126, .72) 52%, rgba(128, 205, 255, .32) 64%, transparent);
}

body.theme-pocket .system-access-dock:not(.is-system-connected):not(.is-setup-required) > .work-toggle-button::after {
  border-radius: 2px !important;
  background: linear-gradient(102deg, transparent, rgba(233, 159, 46, .22) 36%, rgba(255, 224, 118, .78) 52%, rgba(233, 159, 46, .22) 68%, transparent);
  mix-blend-mode: multiply;
}

@media (prefers-reduced-motion: reduce) {
  .system-access-dock:not(.is-system-connected):not(.is-setup-required) > .work-toggle-button::after { animation: none !important; opacity: 0 !important; }
}

/* Purchase-power cards: one target fills the row; two targets share one row. */
#personalProducts.is-single {
  grid-template-columns: minmax(0, 1fr) !important;
}

#personalProducts.is-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Itemized fund injection ledger and five-second undo. */
.ticker-extra-income-footer {
  display: flex;
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-left: 3px;
}

.ticker-extra-income-footer .ticker-extra-income-note {
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-income-flow-button {
  display: inline-flex;
  min-height: 27px;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 4px 7px 4px 9px;
  border: 1px solid rgba(77, 249, 174, .32);
  border-radius: 999px;
  color: #dffff0;
  background: rgba(53, 218, 150, .09);
  box-shadow: inset 0 0 12px rgba(75, 255, 181, .04);
  font-size: .58rem;
  font-weight: 900;
}

.ticker-income-flow-button b {
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding-inline: 4px;
  border-radius: 999px;
  color: #14251d;
  background: linear-gradient(135deg, var(--green), var(--amber));
  font-size: .5rem;
}

.live-income-undo {
  display: flex;
  grid-column: 1 / -1;
  grid-row: 3;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 6px 5px 10px;
  border: 1px solid rgba(255, 220, 99, .36);
  border-radius: 9px;
  color: #fff0aa;
  background: linear-gradient(90deg, rgba(255, 204, 71, .1), rgba(65, 238, 168, .08));
  animation: liveIncomeUndoReveal 320ms ease-out both;
  font-size: .57rem;
  font-weight: 850;
}

.live-income-undo[hidden] { display: none !important; }

.live-income-undo button {
  min-height: 24px;
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(255, 231, 145, .52);
  border-radius: 7px;
  color: #17231c;
  background: linear-gradient(135deg, #ffe077, #75f4b8);
  font-size: .54rem;
  font-weight: 950;
}

@keyframes liveIncomeUndoReveal {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

dialog.live-income-ledger-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: min(82vh, 760px);
}

.live-income-ledger-body {
  display: grid;
  gap: 10px;
}

.live-income-ledger-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(74, 242, 169, .28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(50, 225, 151, .1), rgba(255, 210, 83, .07));
}

.live-income-ledger-summary span {
  display: grid;
  gap: 3px;
}

.live-income-ledger-summary small,
.live-income-ledger-summary i {
  color: rgba(219, 240, 230, .62);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.live-income-ledger-summary strong {
  color: var(--amber);
  font: 950 19px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.live-income-ledger-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding: 1px;
}

.live-income-ledger-row {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(91, 232, 172, .19);
  border-radius: 12px;
  background: rgba(3, 17, 16, .66);
}

.live-income-ledger-row.is-editing {
  border-color: rgba(255, 218, 91, .48);
  box-shadow: inset 0 0 20px rgba(255, 210, 69, .05);
}

.live-income-ledger-row.is-invalid {
  border-color: rgba(255, 102, 121, .72);
  animation: ledgerInvalidShake 300ms ease-out;
}

.live-income-ledger-row-main,
.live-income-ledger-actions {
  display: flex;
  align-items: center;
}

.live-income-ledger-row-main {
  justify-content: space-between;
  gap: 12px;
}

.live-income-ledger-row-main > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.live-income-ledger-row-main b {
  color: #effff6;
  font-size: 16px;
}

.live-income-ledger-row-main small {
  color: rgba(210, 235, 222, .58);
  font-size: 12px;
  font-weight: 700;
}

.live-income-ledger-row-main > strong {
  flex: 0 0 auto;
  color: #69f4b4;
  font: 950 17px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.live-income-ledger-input {
  display: flex;
  width: min(220px, 52%);
  height: 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 217, 91, .48);
  border-radius: 9px;
  background: rgba(0, 0, 0, .24);
}

.live-income-ledger-input i {
  padding-left: 10px;
  color: var(--amber);
  font-style: normal;
  font-weight: 900;
}

.live-income-ledger-input input {
  width: 100%;
  height: 40px;
  padding: 0 8px;
  border: 0;
  color: #fff5c7;
  background: transparent;
  font-size: 16px;
  font-weight: 850;
}

.live-income-ledger-actions {
  justify-content: flex-end;
  gap: 7px;
}

.live-income-ledger-actions button {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(77, 240, 170, .28);
  border-radius: 8px;
  color: #dffff0;
  background: rgba(67, 224, 158, .08);
  font-size: 13px;
  font-weight: 900;
}

.live-income-ledger-actions button.is-danger {
  border-color: rgba(255, 104, 125, .32);
  color: #ffafbc;
  background: rgba(255, 79, 105, .07);
}

.live-income-ledger-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 20px;
  border: 1px dashed rgba(88, 232, 173, .22);
  border-radius: 12px;
  color: rgba(220, 241, 230, .62);
  text-align: center;
}

.live-income-ledger-empty span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #16251d;
  background: linear-gradient(135deg, var(--green), var(--amber));
  font-weight: 1000;
}

.live-income-ledger-empty strong { color: #e9fff3; font-size: 16px; }
.live-income-ledger-empty small { max-width: 330px; font-size: 12px; line-height: 1.4; }

body.theme-moonlight .ticker-income-flow-button,
body.theme-moonlight .live-income-ledger-row,
body.theme-moonlight .live-income-ledger-summary {
  border-color: rgba(255, 152, 204, .3);
  background: rgba(61, 31, 78, .5);
}

body.theme-pocket :is(.ticker-income-flow-button, .live-income-undo, .live-income-ledger-summary, .live-income-ledger-row, .live-income-ledger-input, .live-income-ledger-actions button, .live-income-ledger-empty) {
  border: 2px solid #2b3e32 !important;
  border-radius: 2px !important;
  box-shadow: 3px 3px 0 #2b3e32 !important;
}

@media (max-width: 640px) {
  .ticker-extra-income-footer { gap: 5px; }
  .ticker-extra-income-footer .ticker-extra-income-note { font-size: .5rem; }
  .ticker-income-flow-button { min-height: 25px; padding-inline: 7px; font-size: .52rem; }
  dialog.live-income-ledger-dialog { width: calc(100vw - 20px); max-height: 84vh; }
  .live-income-ledger-summary { align-items: flex-start; padding: 11px; }
  .live-income-ledger-summary i { max-width: 46%; text-align: right; }
  .live-income-ledger-row { padding: 10px; }
  .live-income-ledger-row-main { align-items: flex-start; gap: 8px; }
  .live-income-ledger-row-main > strong { max-width: 48%; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .live-income-ledger-input { width: 55%; }
}

/* Keep fund injection and correction visually equal; only their accent differs. */
.control-strip > .ticker-live-income {
  grid-template-columns: minmax(0, 1fr) repeat(2, 112px) !important;
  grid-template-rows: 52px auto auto !important;
  column-gap: 7px !important;
}

.control-strip > .ticker-live-income .ticker-live-income-amount {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0;
}

.control-strip > .ticker-live-income > .ticker-income-submit {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 112px !important;
  height: 52px !important;
  min-width: 0;
  flex-basis: auto !important;
}

.control-strip > .ticker-live-income > .ticker-income-flow-button {
  position: relative;
  display: grid !important;
  grid-column: 3 !important;
  grid-row: 1 !important;
  width: 112px !important;
  height: 52px !important;
  min-width: 0;
  flex-basis: auto !important;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 6px 7px !important;
  border-color: rgba(255, 153, 119, .58);
  border-radius: 10px;
  color: #2a100b;
  background: linear-gradient(135deg, #ff9c74, #ffc45f 54%, #ffdf7f);
  box-shadow: inset 0 1px 0 rgba(255, 247, 216, .7), 0 0 18px rgba(255, 151, 91, .18);
  font-size: .72rem;
  font-weight: 950;
}

.control-strip > .ticker-live-income > :is(.ticker-income-submit, .ticker-income-flow-button) {
  display: grid !important;
  height: 52px !important;
  min-width: 0;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 6px 7px !important;
  border-radius: 10px;
  text-align: center;
}

.control-strip > .ticker-live-income > :is(.ticker-income-submit, .ticker-income-flow-button) span {
  font-size: .82rem;
  font-weight: 1000;
  line-height: 1.05;
  white-space: nowrap;
}

.control-strip > .ticker-live-income > :is(.ticker-income-submit, .ticker-income-flow-button) small {
  max-width: 100%;
  overflow: hidden;
  font-size: .48rem;
  font-weight: 850;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-strip > .ticker-live-income > .ticker-income-submit small {
  color: rgba(16, 32, 24, .66);
}

.control-strip > .ticker-live-income > .ticker-income-flow-button span {
  font-size: .82rem;
  line-height: 1.05;
  white-space: nowrap;
}

.control-strip > .ticker-live-income > .ticker-income-flow-button small {
  max-width: 100%;
  overflow: hidden;
  color: rgba(64, 25, 8, .66);
  font-size: .48rem;
  font-weight: 850;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-strip > .ticker-live-income > .ticker-extra-income-footer {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  justify-content: flex-start;
}

.control-strip > .ticker-live-income > .live-income-undo {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
}

body.theme-moonlight .control-strip > .ticker-live-income > .ticker-income-flow-button {
  border-color: rgba(255, 158, 211, .52);
  color: #fff0fa;
  background: linear-gradient(145deg, rgba(255, 128, 199, .2), rgba(179, 157, 255, .14));
}

@media (max-width: 640px) {
  .control-strip > .ticker-live-income {
    grid-template-columns: minmax(0, 1fr) repeat(2, 92px) !important;
  }

  .control-strip > .ticker-live-income > .ticker-income-submit {
    width: 92px !important;
  }

  .control-strip > .ticker-live-income > .ticker-income-flow-button {
    width: 92px !important;
    padding-inline: 5px !important;
  }

  .control-strip > .ticker-live-income > .ticker-income-flow-button span {
    font-size: .82rem;
  }

}

/* Inline confirmation is reliable in iOS WebView and keeps the target visible. */
.live-income-ledger-row.is-delete-confirming {
  border-color: rgba(255, 104, 125, .62);
  background: linear-gradient(145deg, rgba(255, 77, 105, .1), rgba(3, 17, 16, .72));
  box-shadow: inset 0 0 24px rgba(255, 76, 104, .06);
}

.live-income-ledger-actions.is-delete-confirming {
  flex-wrap: wrap;
  gap: 7px;
}

.live-income-delete-inline-copy {
  margin-right: auto;
  color: #ffb1bd;
  font-size: 13px;
  font-weight: 900;
}

.live-income-ledger-actions.is-delete-confirming button.is-danger {
  border-color: rgba(255, 101, 124, .64);
  color: #fff3f5;
  background: linear-gradient(135deg, #c73551, #ff6f72);
  box-shadow: 0 0 18px rgba(255, 81, 111, .16);
}

body.theme-moonlight .live-income-ledger-row.is-delete-confirming {
  border-color: rgba(255, 132, 190, .68);
  background: linear-gradient(145deg, rgba(255, 100, 174, .16), rgba(55, 28, 72, .68));
}

body.theme-pocket .live-income-ledger-row.is-delete-confirming {
  border-color: #2b3e32 !important;
  background: #e8c8c4 !important;
}

body.theme-pocket .live-income-delete-inline-copy {
  color: #7a2837;
}

/* English completeness pass: keep the approved theme proportions while
   giving longer English labels enough room on an iPhone-width canvas. */
body.is-english .system-access-dock .system-access-copy strong {
  max-width: 100%;
  font-size: 1.02rem;
  letter-spacing: .035em;
  text-align: center;
  white-space: normal;
}

body.is-english .system-access-dock .system-access-copy small {
  max-width: 100%;
  font-size: .41rem;
  letter-spacing: .08em;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

body.is-english .control-strip > .ticker-live-income > :is(.ticker-income-submit, .ticker-income-flow-button) small {
  display: block;
  overflow: visible;
  font-size: .42rem;
  line-height: 1.05;
  text-overflow: clip;
  white-space: normal;
}
body.is-english .control-strip > .ticker-live-income > :is(.ticker-income-submit, .ticker-income-flow-button) span {
  max-width: 100%; font-size: .64rem; line-height: 1.04;
  overflow-wrap: anywhere; white-space: normal;
}

body.is-english .ticker-extra-income-footer .ticker-extra-income-note {
  font-size: .46rem;
  letter-spacing: 0;
}

body.is-english .entertainment-zone-controls .energy-command-actions button {
  min-width: 0;
  padding-inline: 3px;
}

body.is-english .entertainment-zone-controls .energy-command-actions button span {
  font-size: 9px;
  line-height: 1.05;
}

body.is-english .entertainment-zone-controls .energy-command-actions button small {
  max-width: 100%;
  font-size: 6.5px;
  line-height: 1.08;
  overflow-wrap: anywhere;
  white-space: normal;
}

body.is-english .personal-product :is(strong, small),
body.is-english .personal-product > div:nth-of-type(2) {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-english .personal-product-icon {
  overflow: hidden;
  font-size: .36rem;
  letter-spacing: -.04em;
}
body.is-english .personal-product small { font-size: .42rem; }
body.is-english .personal-product [data-personal-target-count] { font-size: .5rem; }

body.is-english .lottery-daily-date,
body.is-english #lotteryDailyDate {
  font-size: .42rem;
  line-height: 1.08;
  text-align: right;
  white-space: normal;
}

body.is-english .break-game-fortune .fortune-core-glyph :is(i, small) {
  max-width: 100%;
  overflow: hidden;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: 0 !important;
  text-overflow: clip;
}

body.is-english .break-game-fortune .fortune-core-glyph i { font-size: .7rem !important; }
body.is-english .break-game-fortune .fortune-core-glyph small { font-size: .28rem !important; }

body.is-english.theme-pocket .pixel-agent-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
}

body.is-english.theme-pocket .pixel-agent-controls > button {
  min-width: 0;
  padding-inline: 2px;
}

body.is-english.theme-pocket .pixel-agent-controls > button :is(span, small) {
  max-width: 100%;
  overflow: hidden;
  font-size: .38rem;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.is-english .workday-countdown-card[data-phase="alerting"] {
  height: auto !important; min-height: 82px !important;
}
body.is-english .workday-countdown-card[data-phase="alerting"] > span b {
  white-space: normal;
}
body.is-english .worry-crusher-preview { overflow: hidden; }
body.is-english .worry-crusher-preview :is(i, b) {
  max-width: 37%; overflow: hidden; font-size: .42rem;
  text-overflow: ellipsis; white-space: nowrap;
}

@media (max-width: 640px) {
  body.is-english .city-report-launch {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 86px;
    overflow: hidden;
  }

  body.is-english .city-report-launch > button {
    width: 86px;
    min-width: 86px;
    padding-inline: 4px;
  }

  body.is-english .entertainment-zone-entry {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  body.is-english .entertainment-zone-controls {
    grid-template-columns: minmax(0, 1.25fr) 45px 58px;
  }
}

/* Unified play-energy economy */
.energy-command {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 1.15fr) minmax(180px, 1fr) minmax(100px, .55fr) minmax(170px, .9fr);
  align-items: center;
  gap: 14px;
  margin: 18px clamp(18px, 4vw, 46px) 0;
  padding: 15px 17px;
  overflow: hidden;
  border: 1px solid rgba(72, 255, 177, .25);
  border-radius: 18px;
  background: linear-gradient(132deg, rgba(4, 31, 27, .96), rgba(7, 18, 25, .97));
  box-shadow: inset 0 0 28px rgba(46, 255, 164, .045), 0 10px 28px rgba(0,0,0,.2);
}
.energy-command::before { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(105deg, transparent 28%, rgba(83,255,187,.07) 48%, transparent 68%); transform:translateX(-110%); animation:energyScan 6s ease-in-out infinite; }
@keyframes energyScan { 58%,100% { transform:translateX(110%); } }
.energy-command > * { position:relative; z-index:1; }
.daily-checkin-copy { display:grid; gap:2px; min-width:0; }
.daily-checkin-copy > small { color:#65f5b5; font-size:10px; font-weight:950; letter-spacing:.16em; }
.daily-checkin-copy > strong { color:#f1fff8; font-size:19px; line-height:1.2; }
.daily-checkin-copy > span { overflow:hidden; color:rgba(226,244,237,.62); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.energy-command-status { display:grid; gap:8px; }
.energy-command-status > span { display:flex; justify-content:space-between; align-items:end; }
.energy-command-status small { color:rgba(226,244,237,.7); font-size:12px; }
.energy-command-status > i { height:7px; border-radius:999px; background:rgba(255,255,255,.08); overflow:hidden; }
.energy-command-status > i b { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#42efaa,#ffe36c,#ff7d8d); transition:width .35s ease; }
.daily-energy-balance { display:grid; justify-items:center; gap:2px; padding:8px 12px; border-left:1px solid rgba(103,255,195,.14); border-right:1px solid rgba(103,255,195,.14); }
.daily-energy-balance small { color:rgba(226,244,237,.62); font-size:10px; }
.daily-energy-balance strong { color:#ffe77b; font-size:27px; line-height:1; text-shadow:0 0 18px rgba(255,224,91,.25); }
.energy-command-actions { display:grid; }
.energy-command-actions button, .daily-energy-unlock, .celebrity-access-pass button { min-height:58px; border:1px solid rgba(255,228,108,.42); border-radius:15px; color:#07130f; background:linear-gradient(135deg,#58f5b6,#fff06f); font:inherit; font-weight:950; box-shadow:0 8px 22px rgba(71,240,172,.14); }
.energy-command-actions button span, .energy-command-actions button small, .daily-energy-unlock span, .daily-energy-unlock small, .celebrity-access-pass button span, .celebrity-access-pass button small { display:block; }
.energy-command-actions button small, .daily-energy-unlock small, .celebrity-access-pass button small { margin-top:3px; font-size:11px; opacity:.66; }
.energy-command-actions button:disabled { opacity:.7; }
.worry-crusher-scoreboard { grid-template-columns:repeat(5,minmax(0,1fr)); }
.worry-crusher-scoreboard span { min-width:0; white-space:nowrap; }
.worry-crusher-scoreboard b { overflow:hidden; text-overflow:ellipsis; }
.entertainment-zone-entry { position:relative; display:flex; align-items:center; gap:12px; margin:24px clamp(18px,4vw,46px) 10px; min-height:56px; }
.entertainment-zone-entry > div { flex:0 0 auto; display:grid; gap:0; }
.entertainment-zone-entry small { color:#63f3b2; font-size:9px; font-weight:950; letter-spacing:.22em; }
.entertainment-zone-entry strong { color:#f3fff9; font-size:17px; line-height:1.25; }
.entertainment-zone-entry p { margin:2px 0 0; color:rgba(223,241,234,.5); font-size:10px; }
.entertainment-zone-line { flex:1; height:1px; background:linear-gradient(90deg,rgba(87,250,181,.55),rgba(255,225,102,.24),transparent); }
.entertainment-zone-sparkles { position:relative; flex:0 0 42px; width:42px; height:42px; border:1px solid rgba(99,245,181,.2); border-radius:50%; background:radial-gradient(circle,rgba(94,255,187,.16),transparent 68%); }
.entertainment-zone-sparkles i { position:absolute; width:5px; height:5px; border-radius:50%; background:#fff7a6; box-shadow:0 0 9px #73ffc2; animation:entertainmentSpark 2.2s ease-in-out infinite; }
.entertainment-zone-sparkles i:nth-child(1){left:18px;top:6px}.entertainment-zone-sparkles i:nth-child(2){left:7px;top:18px;animation-delay:.35s}.entertainment-zone-sparkles i:nth-child(3){right:6px;top:15px;animation-delay:.7s}.entertainment-zone-sparkles i:nth-child(4){left:15px;bottom:6px;animation-delay:1.05s}.entertainment-zone-sparkles i:nth-child(5){right:10px;bottom:10px;animation-delay:1.4s}
@keyframes entertainmentSpark { 0%,100%{opacity:.28;transform:scale(.55)} 45%{opacity:1;transform:scale(1.35)} }
.break-game-slot { grid-column:1/-1; }
.break-game-slot .celebrity-fruit-machine { max-width:760px; margin:0 auto; }
.energy-rules { color:rgba(226,244,237,.65); font-size:12px; }
.energy-rules summary { cursor:pointer; color:#ffe27a; font-weight:850; }
.daily-energy-unlock { width:100%; margin:0 0 14px; }
.zodiac-horoscope.is-energy-locked .zodiac-daily-card { filter:blur(8px); opacity:.32; pointer-events:none; user-select:none; }
.celebrity-access-pass { display:grid; gap:7px; margin:14px 0; text-align:center; }
.celebrity-access-pass > small { color:rgba(223,242,235,.62); }
.celebrity-wealth-boost { width:100%; margin-top:4px; }
.celebrity-panel.is-wealth-locked .celebrity-terminal > :not(.celebrity-access-pass),
.celebrity-panel.is-wealth-locked .celebrity-purchase-head,
.celebrity-panel.is-wealth-locked .celebrity-products { opacity:.35; filter:saturate(.4); }
.celebrity-panel.is-wealth-locked .celebrity-access-pass { opacity:1; filter:none; }
body.theme-moonlight .energy-command { border-color:rgba(255,135,200,.45); background:linear-gradient(135deg,rgba(55,28,75,.92),rgba(20,29,61,.95)); }
body.theme-moonlight .daily-checkin-copy > small, body.theme-moonlight .entertainment-zone-entry small { color:#ff9ed0; }
body.theme-moonlight .entertainment-zone-sparkles i { background:#ffd5ed; box-shadow:0 0 9px #ff8fc9; }
body.theme-pocket .energy-command { border:3px solid #26382f; border-radius:2px; background:#dce4d1; box-shadow:6px 6px 0 #26382f; color:#17271f; }
body.theme-pocket .energy-command small, body.theme-pocket .energy-command-status small, body.theme-pocket .daily-checkin-copy > span { color:#405849; }
body.theme-pocket .daily-checkin-copy > strong, body.theme-pocket .entertainment-zone-entry strong { color:#17271f; }
body.theme-pocket .daily-energy-balance strong { color:#cf861c; text-shadow:none; }
body.theme-pocket .energy-command-actions button { border:3px solid #26382f; border-radius:2px; box-shadow:3px 3px 0 #26382f; background:#e8a632; }
body.theme-pocket .entertainment-zone-sparkles { border:3px solid #26382f; border-radius:2px; background:#e8a632; box-shadow:3px 3px 0 #26382f; }
body.theme-pocket .entertainment-zone-sparkles i { width:4px; height:4px; border-radius:0; background:#26382f; box-shadow:none; }
body.theme-pocket .entertainment-zone-entry p { color:#405849; }
@media (max-width:760px) {
  .energy-command { grid-template-columns:minmax(0,1fr) auto; padding:14px; gap:12px; }
  .daily-checkin-copy { grid-column:1; }
  .daily-energy-balance { grid-column:2; grid-row:1; min-width:76px; border-left:1px solid rgba(103,255,195,.14); border-right:0; }
  .energy-command-status, .energy-command-actions { grid-column:1/-1; }
  .energy-command-actions button { min-height:54px; }
  .entertainment-zone-entry { margin-top:20px; }
  .entertainment-zone-entry p { max-width:190px; white-space:normal; }
  .break-game-slot { grid-column:auto; }
}

/* Compact play-zone header: check-in and credits live on the right. */
.entertainment-zone-entry {
  display:grid;
  grid-template-columns:auto minmax(24px,1fr) minmax(330px,auto);
  align-items:center;
  gap:14px;
  min-height:0;
  margin:22px clamp(18px,4vw,46px) 10px;
  padding:11px 0;
  border-top:1px solid rgba(89,246,181,.18);
  border-bottom:1px solid rgba(89,246,181,.18);
}
.entertainment-zone-identity { display:flex !important; align-items:center; gap:9px; min-width:0; }
.entertainment-zone-identity > div { display:grid; gap:0; }
.entertainment-zone-identity p { white-space:nowrap; }
.entertainment-zone-line { min-width:20px; }
.entertainment-zone-controls {
  display:grid !important;
  grid-template-columns:minmax(122px,1.1fr) minmax(64px,.55fr) minmax(112px,1fr);
  align-items:center;
  gap:7px;
  min-width:0;
}
.entertainment-zone-controls .energy-command-actions button {
  position:relative;
  overflow:hidden;
  min-height:46px;
  padding:5px 10px;
  border-radius:12px;
  box-shadow:0 6px 16px rgba(71,240,172,.12);
}
.entertainment-zone-controls .energy-command-actions button span { font-size:13px; }
.entertainment-zone-controls .energy-command-actions button small { margin-top:1px; color:rgba(5,31,22,.82); font-size:9px; font-weight:850; opacity:1; }
.entertainment-zone-entry.is-checkin-pending .energy-command-actions button {
  animation:dailyCheckinPulse 1.55s ease-in-out infinite;
}
.entertainment-zone-entry.is-checkin-pending .energy-command-actions button::after {
  content:"";
  position:absolute;
  inset:-30% auto -30% -42%;
  width:30%;
  pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.82),transparent);
  transform:skewX(-16deg);
  animation:dailyCheckinSweep 1.55s ease-in-out infinite;
}
.entertainment-zone-entry.is-checkin-complete .energy-command-actions button { animation:none; }
.entertainment-zone-controls .daily-energy-balance {
  min-width:0;
  padding:4px 8px;
  border:0;
  border-left:1px solid rgba(103,255,195,.14);
  border-right:1px solid rgba(103,255,195,.14);
}
.entertainment-zone-controls .daily-energy-balance strong { font-size:22px; }
.entertainment-zone-controls .energy-command-status { gap:5px; min-width:0; }
.entertainment-zone-controls .energy-command-status > span { gap:6px; }
.entertainment-zone-controls .energy-command-status small { color:#cceade; font-size:10px; white-space:nowrap; }
.entertainment-zone-controls .energy-command-status b { color:#ffe477; font-size:11px; font-weight:950; white-space:nowrap; }
.entertainment-zone-controls .energy-command-status > i { height:5px; }
body.theme-moonlight .entertainment-zone-entry { border-color:rgba(255,145,204,.22); }
body.theme-pocket .entertainment-zone-entry { padding:10px 0; border-color:#26382f; }
body.theme-pocket .entertainment-zone-controls .daily-energy-balance { border-color:#405849; }
body.theme-pocket .entertainment-zone-controls .energy-command-status small,
body.theme-pocket .entertainment-zone-controls .energy-command-status b { color:#26382f; }

@keyframes dailyCheckinPulse {
  0%,100% { transform:translateY(0) scale(1); filter:saturate(1); box-shadow:0 6px 16px rgba(71,240,172,.12); }
  50% { transform:translateY(-1px) scale(1.025); filter:saturate(1.22) brightness(1.08); box-shadow:0 0 0 3px rgba(255,229,102,.16),0 8px 24px rgba(71,240,172,.34); }
}
@keyframes dailyCheckinSweep {
  0%,22% { left:-42%; opacity:0; }
  38% { opacity:1; }
  72%,100% { left:118%; opacity:0; }
}

@media (max-width:760px) {
  .entertainment-zone-entry {
    grid-template-columns:minmax(70px,.72fr) minmax(0,1.7fr);
    gap:8px;
    margin-top:18px;
    padding:9px 0;
  }
  .entertainment-zone-line { display:none; }
  .entertainment-zone-sparkles { flex-basis:34px; width:34px; height:34px; }
  .entertainment-zone-sparkles i:nth-child(1){left:14px;top:5px}.entertainment-zone-sparkles i:nth-child(2){left:5px;top:14px}.entertainment-zone-sparkles i:nth-child(3){right:5px;top:12px}.entertainment-zone-sparkles i:nth-child(4){left:12px;bottom:5px}.entertainment-zone-sparkles i:nth-child(5){right:8px;bottom:8px}
  .entertainment-zone-identity { gap:6px; }
  .entertainment-zone-identity small { font-size:7px; letter-spacing:.12em; }
  .entertainment-zone-identity strong { font-size:14px; }
  .entertainment-zone-identity p { display:none; }
  .entertainment-zone-controls { grid-template-columns:minmax(0,1.05fr) minmax(42px,.58fr) minmax(58px,.95fr); gap:4px; }
  .entertainment-zone-controls .energy-command-actions,
  .entertainment-zone-controls .daily-energy-balance,
  .entertainment-zone-controls .energy-command-status { grid-column:auto; grid-row:auto; }
  .entertainment-zone-controls .energy-command-actions button { min-height:43px; padding:4px 5px; }
  .entertainment-zone-controls .energy-command-actions button span { font-size:11px; }
  .entertainment-zone-controls .energy-command-actions button small { font-size:7px; white-space:nowrap; }
  .entertainment-zone-controls .daily-energy-balance { padding:3px 4px; }
  .entertainment-zone-controls .daily-energy-balance small { font-size:8px; }
  .entertainment-zone-controls .daily-energy-balance strong { font-size:19px; }
  .entertainment-zone-controls .energy-command-status > span { display:grid; gap:0; }
  .entertainment-zone-controls .energy-command-status small { font-size:8px; }
  .entertainment-zone-controls .energy-command-status b { font-size:9px; }
}

/* Final English mobile authority. Keep this last so later feature styles do
   not reintroduce clipping after the language-specific layout pass. */
body.is-english .system-access-dock .system-access-copy strong {
  max-width: 100%; font-size: 1.02rem; letter-spacing: .035em;
  text-align: center; white-space: normal;
}
body.is-english .system-access-dock .system-access-copy small {
  max-width: 100%; font-size: .41rem; letter-spacing: .08em;
  line-height: 1.2; text-align: center; white-space: normal;
}
body.is-english .control-strip > .ticker-live-income > :is(.ticker-income-submit, .ticker-income-flow-button) small {
  display: block; overflow: visible; font-size: .42rem; line-height: 1.05;
  text-overflow: clip; white-space: normal;
}
body.is-english .ticker-extra-income-footer .ticker-extra-income-note {
  font-size: .46rem; letter-spacing: 0;
}
body.is-english .entertainment-zone-controls .energy-command-actions button {
  min-width: 0; padding-inline: 3px;
}
body.is-english .entertainment-zone-controls .energy-command-actions button span {
  font-size: 9px; line-height: 1.05;
}
body.is-english .entertainment-zone-controls .energy-command-actions button small {
  max-width: 100%; font-size: 6.5px; line-height: 1.08;
  overflow-wrap: anywhere; white-space: normal;
}
body.is-english .personal-product :is(strong, small),
body.is-english .personal-product > div:nth-of-type(2) {
  min-width: 0; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
body.is-english .personal-product-icon {
  overflow: hidden; font-size: .36rem; letter-spacing: -.04em;
}
body.is-english :is(.lottery-daily-date, #lotteryDailyDate) {
  font-size: .42rem; line-height: 1.08; text-align: right; white-space: normal;
}
body.is-english .break-game-fortune .fortune-core-glyph :is(i, small) {
  max-width: 100%; overflow: hidden;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: 0 !important; text-overflow: clip;
}
body.is-english .break-game-fortune .fortune-core-glyph i { font-size: .7rem !important; }
body.is-english .break-game-fortune .fortune-core-glyph small { font-size: .28rem !important; }
body.is-english.theme-pocket .pixel-agent-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; min-width: 0;
}
body.is-english.theme-pocket .pixel-agent-controls > button {
  min-width: 0; padding-inline: 2px;
}
body.is-english.theme-pocket .pixel-agent-controls > button :is(span, small) {
  max-width: 100%; overflow: hidden; font-size: .38rem; letter-spacing: 0;
  text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 640px) {
  body.is-english .city-report-launch {
    box-sizing: border-box; width: auto; max-width: calc(100% - 24px); min-height: 90px;
    margin-inline: 12px;
    grid-template-columns: minmax(0, 1fr) 86px; overflow: hidden;
  }
  body.is-english .city-report-launch > button {
    width: 86px; min-width: 86px; padding-inline: 4px;
  }
  body.is-english .entertainment-zone-entry {
    grid-template-columns: 74px minmax(0, 1fr);
  }
  body.is-english .entertainment-zone-controls {
    grid-template-columns: minmax(0, 1.25fr) 45px 58px;
    max-width: 100%; overflow: hidden;
  }
  body.is-english .entertainment-zone-controls .energy-command-status > span {
    min-width: 0; overflow: hidden;
  }
body.is-english .entertainment-zone-controls .energy-command-status :is(small, b) {
    min-width: 0; max-width: 100%; overflow: hidden; font-size: 7px;
    text-overflow: ellipsis; white-space: nowrap;
  }
}

/* iPhone native layout authority: keep every full-screen second layer below
   the Dynamic Island and make purchase sheets originate from screen center. */
.personal-product-delete {
  padding: 0 !important;
  overflow: hidden;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 1 !important;
  text-indent: 0 !important;
}

.personal-product-delete::before,
.personal-product-delete::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52%;
  height: 2px;
  border-radius: 99px;
  background: #ff9cab;
  content: "";
  transform-origin: center;
}

.personal-product-delete::before { transform: translate(-50%, -50%) rotate(45deg); }
.personal-product-delete::after { transform: translate(-50%, -50%) rotate(-45deg); }
body.theme-pocket .personal-product-delete::before,
body.theme-pocket .personal-product-delete::after { background: #6d332a; }

html.native-app .immersive-game-overlay {
  box-sizing: border-box;
  height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}

html.native-app :is(.salary-machine-shell, .worry-crusher-shell) {
  width: 100%;
  height: 100%;
  min-height: 0;
}

html.native-app .immersive-game-hud {
  margin-top: 10px;
}

html.native-app dialog.celebrity-settings-dialog {
  top: calc(50dvh + 8px) !important;
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px) !important;
}

html.native-app #adminPanel.app-settings-dialog,
html.native-app #adminPanel.app-settings-dialog[open] {
  top: calc(50dvh + 8px) !important;
  height: min(760px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px)) !important;
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px) !important;
}

html.native-app #adminPanel .celebrity-settings-dialog-body {
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 102px) !important;
}

dialog#premiumPaywallDialog,
dialog#premiumPaywallDialog[open] {
  position: fixed !important;
  inset: auto !important;
  top: 50dvh !important;
  left: 50vw !important;
  right: auto !important;
  bottom: auto !important;
  box-sizing: border-box;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  transform-origin: center center !important;
}

dialog#premiumPaywallDialog[open] {
  animation: premiumPaywallCenteredIn 260ms cubic-bezier(.2, .88, .26, 1.08) both !important;
}

html.native-app dialog#premiumPaywallDialog,
html.native-app dialog#premiumPaywallDialog[open] {
  top: calc(50dvh + 8px) !important;
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px) !important;
}

html.native-app #adminPanel.app-settings-dialog,
html.native-app #adminPanel.app-settings-dialog[open] {
  left: 50vw !important;
}

@keyframes premiumPaywallCenteredIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 640px) {
  html.native-app .worry-crusher-hud {
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 10px;
  }

  html.native-app .worry-crusher-hud .immersive-game-title {
    min-width: 0;
    padding: 2px 2px 4px;
  }

  html.native-app .worry-crusher-hud .immersive-game-title strong {
    font-size: clamp(.92rem, 6.2vw, 1.18rem);
    line-height: 1.12;
  }

  html.native-app .worry-crusher-hud .immersive-game-close {
    align-self: start;
    grid-column: 2;
    grid-row: 1;
  }

  html.native-app .worry-crusher-scoreboard {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Final premium-lock geometry: the call-to-action belongs to the visual
   center of its own module, regardless of the module's internal grid. */
[data-premium-module].premium-module-locked > .premium-lock-overlay {
  position: absolute !important;
  inset: 8px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 16px !important;
  overflow: hidden;
  transform: none !important;
}

[data-premium-module].premium-module-locked > .premium-lock-overlay > span {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  box-sizing: border-box;
  width: min(320px, calc(100% - 28px));
  min-width: 0 !important;
  max-width: calc(100% - 28px);
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
}

/* Daily report: compact iPhone sheet with a stable header, safe-area-aware
   viewport and a preview size that leaves the actions comfortably reachable. */
dialog#cityReportDialog.city-report-dialog,
dialog#cityReportDialog.city-report-dialog[open] {
  position: fixed !important;
  inset: auto !important;
  top: 50dvh !important;
  left: 50vw !important;
  right: auto !important;
  bottom: auto !important;
  box-sizing: border-box;
  width: min(560px, calc(100vw - 24px)) !important;
  height: auto !important;
  max-height: calc(100dvh - 24px) !important;
  margin: 0 !important;
  overflow: hidden !important;
  transform: translate(-50%, -50%) !important;
}

html.native-app dialog#cityReportDialog.city-report-dialog,
html.native-app dialog#cityReportDialog.city-report-dialog[open] {
  top: calc(50dvh + 8px) !important;
  width: min(560px, calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 24px)) !important;
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px) !important;
}

dialog#cityReportDialog .city-report-dialog-head {
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr) auto !important;
  width: 100%;
  min-width: 0;
  padding: 15px 16px 13px !important;
  overflow: hidden;
}

dialog#cityReportDialog .city-report-dialog-head > div {
  min-width: 0;
  overflow: hidden;
}

dialog#cityReportDialog .city-report-dialog-head :is(span, h2, p) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

dialog#cityReportDialog .city-report-dialog-head .celebrity-settings-close {
  justify-self: end;
  box-sizing: border-box;
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  height: 38px;
  padding: 0 8px !important;
  overflow: hidden !important;
  line-height: 1 !important;
  text-align: center;
}

dialog#cityReportDialog .city-report-dialog-body {
  box-sizing: border-box;
  width: 100%;
  max-height: none !important;
  padding: 12px 14px 14px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

dialog#cityReportDialog .city-report-canvas-shell {
  box-sizing: border-box;
  width: min(100%, 300px) !important;
  padding: 6px;
}

@media (max-width: 640px) {
  dialog#cityReportDialog.city-report-dialog,
  dialog#cityReportDialog.city-report-dialog[open] {
    width: calc(100vw - 20px) !important;
  }

  html.native-app dialog#cityReportDialog.city-report-dialog,
  html.native-app dialog#cityReportDialog.city-report-dialog[open] {
    width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 20px) !important;
  }

  dialog#cityReportDialog .city-report-dialog-head {
    padding: 13px 12px 11px !important;
  }

  dialog#cityReportDialog .city-report-dialog-head p {
    font-size: .54rem;
  }

  dialog#cityReportDialog .city-report-dialog-body {
    gap: 10px;
    padding: 10px 12px 12px !important;
  }

  dialog#cityReportDialog .city-report-canvas-shell {
    width: min(100%, 272px) !important;
  }

  dialog#cityReportDialog .city-report-privacy-toggle {
    min-height: 54px;
    padding: 8px 10px;
  }
}

/* Build 9 iPhone finish: anchor the report sheet to the physical safe area
   instead of relying on viewport centering, which can drift in WKWebView. */
@media (max-width: 640px) {
  html.native-app dialog#cityReportDialog.city-report-dialog,
  html.native-app dialog#cityReportDialog.city-report-dialog[open] {
    inset: auto !important;
    top: calc(env(safe-area-inset-top) + 8px) !important;
    right: calc(env(safe-area-inset-right) + 10px) !important;
    bottom: calc(env(safe-area-inset-bottom) + 8px) !important;
    left: calc(env(safe-area-inset-left) + 10px) !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
  }

  html.native-app dialog#cityReportDialog .city-report-dialog-body {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* The daily horoscope unlock belongs to the center of the intelligence
   module, rather than occupying a separate row under the heading. */
.zodiac-horoscope.is-energy-locked .daily-energy-unlock {
  position: absolute !important;
  z-index: 6;
  top: 50% !important;
  left: 50% !important;
  box-sizing: border-box;
  width: min(620px, calc(100% - 32px)) !important;
  max-width: calc(100% - 32px) !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
}

/* Every App Store action is a complete, visibly tappable control. */
dialog#premiumPaywallDialog .premium-paywall-actions { gap: 11px; }

dialog#premiumPaywallDialog .premium-paywall-actions button {
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border: 1px solid rgba(103, 246, 181, 0.46);
  border-radius: 15px;
  line-height: 1.2;
  text-align: center;
}

dialog#premiumPaywallDialog .premium-purchase-button {
  border-color: rgba(255, 235, 126, 0.78);
  box-shadow: 0 9px 30px rgba(65, 246, 169, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

dialog#premiumPaywallDialog .premium-restore-button {
  color: #effff6;
  background: linear-gradient(135deg, rgba(10, 45, 34, 0.96), rgba(5, 24, 19, 0.96));
  box-shadow: inset 0 1px 0 rgba(217, 255, 235, 0.06);
}

dialog#premiumPaywallDialog .premium-close-button {
  color: #b8cec3;
  border-color: rgba(144, 189, 167, 0.28);
  background: rgba(7, 21, 17, 0.72);
}

/* First-run city guide: the configured income node becomes a short,
   visual tour of the controls the user will actually use. */
.product-tour[hidden] { display: none !important; }

.product-tour {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  color: #effff7;
  font-family: inherit;
  pointer-events: auto;
}

.product-tour-spotlight {
  position: fixed;
  z-index: 1;
  box-sizing: border-box;
  border: 2px solid rgba(99, 255, 189, 0.96);
  border-radius: 22px;
  background: transparent;
  box-shadow:
    0 0 0 9999px rgba(1, 10, 8, 0.82),
    0 0 0 5px rgba(64, 234, 176, 0.14),
    0 0 34px rgba(71, 255, 190, 0.78),
    inset 0 0 22px rgba(78, 255, 193, 0.2);
  pointer-events: none;
  transition: left 0.28s ease, top 0.28s ease, width 0.28s ease, height 0.28s ease;
  animation: product-tour-pulse 1.6s ease-in-out infinite;
}

.product-tour-card {
  position: fixed;
  z-index: 2;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  box-sizing: border-box;
  width: min(520px, calc(100vw - 28px));
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(119, 255, 201, 0.7);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 222, 92, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(8, 40, 31, 0.985), rgba(3, 18, 15, 0.99));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(224, 255, 239, 0.14);
  transform: translateX(-50%);
}

.product-tour[data-card-position="bottom"] .product-tour-card {
  top: auto;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
}

.product-tour[data-card-position="top"] .product-tour-card {
  top: calc(env(safe-area-inset-top) + 16px);
  bottom: auto;
}

.product-tour-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, transparent 18%, rgba(95, 255, 200, 0.12) 48%, transparent 74%);
  transform: translateX(-100%);
  animation: product-tour-scan 2.8s ease-in-out infinite;
  pointer-events: none;
}

.product-tour-head,
.product-tour-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.product-tour-head > span {
  color: #ffe066;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.product-tour-head button,
.product-tour-actions button {
  appearance: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.product-tour-head button {
  padding: 7px 9px;
  color: rgba(228, 255, 241, 0.72);
  font-size: 13px;
  background: transparent;
}

.product-tour-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 54px;
  height: 54px;
  margin-top: 10px;
  place-items: center;
  border: 1px solid rgba(255, 229, 112, 0.75);
  border-radius: 17px;
  color: #071b14;
  background: linear-gradient(135deg, #52f2bd, #fff06c);
  box-shadow: 0 8px 24px rgba(77, 247, 185, 0.24);
  font-size: 18px;
  font-weight: 1000;
}

.product-tour-kicker {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 13px;
  color: #6cf6c0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.product-tour-card h2 {
  position: relative;
  z-index: 1;
  margin: 5px 0 7px;
  color: #fff;
  font-size: clamp(24px, 5vw, 31px);
  line-height: 1.12;
}

.product-tour-card > p {
  position: relative;
  z-index: 1;
  min-height: 3.2em;
  margin: 0;
  color: rgba(225, 247, 236, 0.82);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.62;
}

.product-tour-actions {
  margin-top: 17px;
}

.product-tour-actions button {
  min-width: 88px;
  min-height: 44px;
  padding: 10px 15px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 900;
}

.product-tour-back {
  border: 1px solid rgba(122, 210, 177, 0.36) !important;
  background: rgba(4, 20, 15, 0.72);
}

.product-tour-next {
  color: #071a13 !important;
  background: linear-gradient(120deg, #54edc0, #f8e867);
  box-shadow: 0 9px 25px rgba(73, 237, 179, 0.24);
}

.product-tour-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.product-tour-dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: rgba(194, 232, 213, 0.28);
  transition: width 0.2s ease, background 0.2s ease;
}

.product-tour-dots i.active {
  width: 20px;
  background: #65f1bd;
}

body.theme-moonlight .product-tour-card {
  border-color: rgba(255, 167, 206, 0.72);
  background: radial-gradient(circle at 90% 10%, rgba(255, 216, 105, 0.2), transparent 34%), linear-gradient(145deg, #3a1944, #161029 78%);
}

body.theme-moonlight .product-tour-spotlight {
  border-color: #ff9fc8;
  box-shadow: 0 0 0 9999px rgba(16, 6, 24, 0.82), 0 0 34px rgba(255, 116, 185, 0.72);
}

body.theme-pocket .product-tour-card {
  color: #17251d;
  border: 3px solid #26382e;
  border-radius: 4px;
  background: #d9dfcf;
  box-shadow: 7px 7px 0 #26382e;
}

body.theme-pocket .product-tour-card h2,
body.theme-pocket .product-tour-card > p,
body.theme-pocket .product-tour-head button { color: #17251d; }

body.theme-pocket .product-tour-kicker { color: #8d5812; }

@media (max-width: 640px) {
  .product-tour-card {
    width: calc(100vw - 22px);
    padding: 16px;
    border-radius: 20px;
  }

  .product-tour-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .product-tour-card h2 { font-size: 24px; }
  .product-tour-card > p { font-size: 14px; }
  .product-tour-actions button { min-width: 78px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-tour-spotlight,
  .product-tour-card::before { animation: none !important; }
}

@keyframes product-tour-pulse {
  0%, 100% { filter: brightness(0.9); }
  50% { filter: brightness(1.24); }
}

@keyframes product-tour-scan {
  0%, 28% { transform: translateX(-110%); }
  68%, 100% { transform: translateX(110%); }
}

/* iPhone zoom guard.
   Safari/WKWebView automatically magnifies the page when a focused form field
   computes below 16px. Some theme overrides use small !important type, so this
   rule must stay at the end of the cascade. It prevents accidental focus zoom
   without disabling the user's normal two-finger accessibility zoom. */
@media (max-width: 900px) {
  :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
    select,
    textarea
  ) {
    font-size: max(16px, 1em) !important;
  }

  :where(button, a, [role="button"]) {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
  }
}

/* Runtime performance scheduler.
   Rich effects remain unchanged while a module is visible. Off-screen modules
   stop compositing until they approach the viewport again. */
#appRoot .is-performance-offscreen,
#appRoot .is-performance-offscreen::before,
#appRoot .is-performance-offscreen::after,
#appRoot .is-performance-offscreen *,
#appRoot .is-performance-offscreen *::before,
#appRoot .is-performance-offscreen *::after,
html.is-page-hidden *,
html.is-page-hidden *::before,
html.is-page-hidden *::after {
  animation-play-state: paused !important;
}

.celebrity-panel:not(.is-running)::before,
.celebrity-panel:not(.is-running)::after,
.celebrity-panel:not(.is-running) .celebrity-grid,
.celebrity-panel:not(.is-running) .celebrity-streaks span {
  animation-play-state: paused !important;
}

/* Mobile wealth mode keeps the important live-number, sweep and reward cues,
   while combining redundant glow layers that are expensive on iPhone GPUs. */
@media (max-width: 640px) {
  .celebrity-panel.is-running .celebrity-income-core .celebrity-money {
    animation: none !important;
  }

  .celebrity-panel.is-running .celebrity-terminal .celebrity-income-core .celebrity-money > strong {
    animation: celebrityTickerDominanceMobile 760ms ease-in-out infinite alternate !important;
  }

  .celebrity-panel.is-running .celebrity-income-core::after {
    filter: none !important;
    opacity: 0.82;
  }

  .celebrity-income-rings i:nth-child(3),
  .celebrity-streaks span:nth-child(n+4) {
    display: none !important;
  }

  .celebrity-panel::before {
    animation-duration: 4.2s;
  }

  .celebrity-panel::after {
    animation-duration: 2.6s;
  }
}

@keyframes celebrityTickerDominanceMobile {
  from { transform: translateZ(0) scale(0.994); opacity: 0.96; }
  to { transform: translateZ(0) scale(1.014); opacity: 1; }
}

/* Cyber City Play System.
   Entertainment modules share one visual language and one fixed-cost energy
   model. Outcome states are celebratory feedback, never economic rewards. */
.entertainment-zone-entry {
  isolation: isolate;
  overflow: hidden;
  padding: 13px 15px;
  border: 1px solid rgba(79, 247, 186, .3);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 50%, rgba(64, 247, 181, .13), transparent 30%),
    linear-gradient(118deg, rgba(5, 34, 29, .96), rgba(7, 18, 28, .97));
  box-shadow: inset 0 0 32px rgba(52, 245, 174, .045), 0 12px 30px rgba(0, 0, 0, .2);
}

.entertainment-zone-entry::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 32%;
  background: linear-gradient(105deg, transparent, rgba(101, 255, 207, .08), transparent);
  content: "";
  transform: translateX(-140%);
  animation: cyberPlayScan 7s ease-in-out infinite;
  pointer-events: none;
}

.entertainment-zone-identity strong {
  color: #f4fff9;
  font-size: clamp(16px, 2vw, 21px);
  letter-spacing: .02em;
  text-shadow: 0 0 16px rgba(83, 255, 188, .18);
}

.entertainment-zone-identity p { color: rgba(221, 246, 237, .64); }
.entertainment-zone-line { background: linear-gradient(90deg, rgba(79, 249, 183, .7), rgba(255, 226, 104, .45), transparent); }

.break-games {
  position: relative;
  padding: 10px;
  border: 1px solid rgba(77, 242, 181, .14);
  border-radius: 20px;
  background:
    linear-gradient(rgba(67, 243, 181, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 243, 181, .025) 1px, transparent 1px),
    rgba(3, 15, 18, .42);
  background-size: 28px 28px;
}

.break-games > :is(.break-game, .zodiac-horoscope, .pocket-life-station) {
  border-color: rgba(83, 241, 184, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 8px 24px rgba(0, 0, 0, .16);
}

.break-game-luck,
.break-game-slot {
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 221, 97, .1), transparent 26%),
    radial-gradient(circle at 92% 84%, rgba(70, 244, 186, .1), transparent 30%),
    linear-gradient(118deg, rgba(24, 34, 22, .93), rgba(4, 18, 22, .97));
}

.break-game-head span { color: #65f2ba; letter-spacing: .14em; }
.break-game-head strong { color: #fff0a5; font-size: .76rem; }

.luck-start-button {
  border-color: rgba(100, 255, 203, .64);
  color: #061b15;
  background:
    radial-gradient(circle at 36% 20%, rgba(255, 255, 255, .72), transparent 20%),
    linear-gradient(145deg, #5cf0dc, #70f3ae 48%, #ffe06c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38), 0 0 24px rgba(71, 239, 186, .2);
}

.luck-start-button span { color: #071a14; font-size: 1rem; text-shadow: none; }
.luck-start-button small { color: rgba(5, 29, 21, .72); }

.lottery-mode-button {
  border-color: rgba(88, 241, 186, .25);
  color: rgba(229, 255, 245, .72);
  background: rgba(35, 87, 70, .18);
}

.lottery-mode-button[aria-pressed="true"] {
  border-color: rgba(255, 235, 143, .88);
  background: linear-gradient(135deg, #5ef1bd, #ffeb77);
  box-shadow: 0 0 16px rgba(86, 243, 185, .2);
}

.energy-rules {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed rgba(89, 242, 185, .18);
}

.energy-rules summary { color: #8cf5ca; }
.energy-rules p { margin: 6px 0 0; color: rgba(220, 241, 234, .62); line-height: 1.55; }

.celebrity-fruit-machine .celebrity-fruit-reels > i span { font-size: clamp(1.5rem, 5.6vw, 2.5rem); }
.celebrity-jackpot-banner strong { color: #fff0a2; }

@keyframes cyberPlayScan {
  0%, 60% { transform: translateX(-140%); opacity: 0; }
  70% { opacity: 1; }
  90%, 100% { transform: translateX(420%); opacity: 0; }
}

@media (max-width: 640px) {
  .entertainment-zone-entry {
    grid-template-columns: minmax(112px, .82fr) minmax(0, 1.45fr);
    margin-inline: 12px;
    padding: 10px;
  }

  .entertainment-zone-identity small { font-size: 7px; }
  .entertainment-zone-identity strong { font-size: 14px; line-height: 1.18; }
  .break-games { margin-inline: 12px; padding: 7px; border-radius: 16px; }
  .break-game-luck .luck-tools { grid-template-columns: 84px minmax(0, 1fr); }
  .break-game-luck .lottery-mode-button { padding-inline: 2px; font-size: .58rem; }
  .celebrity-fruit-machine .celebrity-fruit-reels > i span { font-size: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .entertainment-zone-entry::after { animation: none !important; }
}

/* 2026-09-02: compact sequence scanner + legible matrix result card */
.break-game-luck .luck-tools {
  align-items: center;
}

.break-game-luck .luck-start-button {
  align-self: center;
  display: flex;
  width: 100%;
  min-height: 0;
  aspect-ratio: .84;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  padding: 12px 8px 10px;
  border: 1px solid rgba(104, 255, 205, .72);
  border-radius: 18px;
  color: #eafff6;
  background:
    radial-gradient(circle at 50% 42%, rgba(84, 255, 196, .2), transparent 38%),
    linear-gradient(155deg, rgba(8, 43, 36, .98), rgba(5, 17, 25, .99));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .05),
    inset 0 -18px 30px rgba(0, 0, 0, .2),
    0 0 0 4px rgba(67, 239, 184, .05),
    0 10px 26px rgba(0, 0, 0, .32);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 150ms ease;
}

.break-game-luck .luck-start-button::after {
  top: -28%;
  bottom: -28%;
  left: -82%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(191, 255, 232, .52), transparent);
  animation-duration: 3100ms;
}

.break-game-luck .luck-start-button span {
  position: relative;
  isolation: isolate;
  display: grid;
  width: min(76%, 82px);
  height: auto;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 220, .92);
  border-radius: 22px;
  color: #071c15;
  background:
    radial-gradient(circle at 31% 22%, rgba(255, 255, 255, .92), transparent 18%),
    linear-gradient(145deg, #59f0e4 0%, #6df3b2 44%, #ffe06c 73%, #ff8e68 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .24),
    0 0 0 6px rgba(72, 247, 188, .08),
    0 0 24px rgba(76, 248, 192, .36),
    0 8px 18px rgba(0, 0, 0, .28);
  font-size: clamp(.78rem, 2vw, 1rem);
  letter-spacing: .08em;
}

.break-game-luck .luck-start-button span::before {
  position: absolute;
  z-index: -1;
  inset: -8px;
  border: 1px solid rgba(92, 255, 201, .28);
  border-radius: 28px;
  content: "";
  animation: sequenceScannerPulse 1900ms ease-in-out infinite;
}

.break-game-luck .luck-start-button span::after {
  position: absolute;
  right: 9px;
  bottom: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fffbd0;
  box-shadow: 0 0 9px #fff, 0 0 16px #56f4ba;
  content: "";
}

.break-game-luck .luck-start-button small {
  max-width: 100%;
  color: rgba(224, 255, 243, .82);
  font-size: .48rem;
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
}

.break-game-luck .luck-start-button:not(:disabled):hover {
  border-color: rgba(255, 235, 133, .9);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .07),
    0 0 0 5px rgba(67, 239, 184, .07),
    0 0 28px rgba(73, 246, 188, .22),
    0 12px 28px rgba(0, 0, 0, .34);
}

.break-game-luck .luck-start-button:not(:disabled):active {
  transform: translateY(2px) scale(.985);
}

.celebrity-jackpot-banner small,
.celebrity-jackpot-banner span {
  color: rgba(5, 28, 21, .88);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .44);
}

.celebrity-jackpot-banner strong,
.celebrity-fruit-machine.is-pair-win .celebrity-jackpot-banner strong,
.celebrity-fruit-machine.is-triple-win .celebrity-jackpot-banner strong {
  max-width: 100%;
  padding: 3px 12px 4px;
  border: 1px solid rgba(7, 39, 29, .16);
  border-radius: 999px;
  color: #071e17;
  background: rgba(255, 255, 230, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42);
  font-size: clamp(1rem, 4.2vw, 1.35rem);
  letter-spacing: .04em;
  line-height: 1.08;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .78), 0 0 12px rgba(255, 255, 220, .3);
}

.celebrity-fruit-machine.is-pair-win .celebrity-jackpot-banner {
  background: linear-gradient(110deg, #55efc2 0%, #c7f7a9 52%, #ffe27c 100%);
}

@keyframes sequenceScannerPulse {
  0%, 100% { opacity: .38; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1.04); }
}

@media (max-width: 640px) {
  .break-game-luck .luck-tools {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .break-game-luck .luck-start-button {
    align-self: stretch;
    min-height: 76px;
    aspect-ratio: auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 16px;
    padding: 9px 15px;
    border-radius: 16px;
    background:
      radial-gradient(circle at 14% 50%, rgba(84, 255, 196, .2), transparent 25%),
      linear-gradient(105deg, rgba(8, 43, 36, .99), rgba(5, 17, 25, .99));
  }

  .break-game-luck .luck-start-button span {
    flex: 0 0 56px;
    width: 56px;
    border-radius: 17px;
    font-size: .86rem;
  }

  .break-game-luck .luck-start-button span::before {
    inset: -6px;
    border-radius: 22px;
  }

  .break-game-luck .luck-start-button small {
    position: relative;
    display: grid;
    flex: 1 1 auto;
    gap: 4px;
    color: rgba(231, 255, 246, .94);
    font-size: .66rem;
    letter-spacing: .04em;
    line-height: 1.2;
    text-align: left;
  }

  .break-game-luck .luck-start-button small::before {
    color: #68f0bc;
    content: "SEQUENCE CORE / READY";
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .44rem;
    font-weight: 900;
    letter-spacing: .12em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .break-game-luck .luck-start-button span::before { animation: none !important; }
}

/* 2026-09-02: iPhone compositor pass.
   Timer alerts used to animate filters, shadows, outlines, letter spacing and
   several descendants at the same time. Keep the unmistakable alarm sweep,
   but move the repeating work to a single transform/opacity layer per card. */
.workday-countdown-card {
  contain: layout paint style;
}

.workday-countdown-card[data-phase="alerting"],
.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"],
body.theme-pocket .workday-countdown-card[data-phase="alerting"],
body.theme-pocket.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] {
  border-color: #ffd967 !important;
  box-shadow:
    0 0 0 2px rgba(255, 211, 82, .16),
    0 0 20px rgba(255, 104, 79, .28),
    inset 0 0 15px rgba(255, 223, 100, .1) !important;
  filter: none !important;
  transform: translateZ(0) !important;
  animation: none !important;
}

.workday-countdown-card[data-phase="alerting"]::before,
.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"]::before,
body.theme-pocket .workday-countdown-card[data-phase="alerting"]::before,
body.theme-pocket.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"]::before {
  position: absolute !important;
  z-index: 1 !important;
  top: -70% !important;
  bottom: -70% !important;
  left: -52% !important;
  display: block !important;
  width: 38% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 214, .82), transparent) !important;
  content: "" !important;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0) rotate(18deg);
  will-change: transform, opacity;
  animation: timerAlertSweepComposited 1800ms ease-in-out infinite !important;
}

.workday-countdown-card[data-phase="alerting"]::after,
.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"]::after,
.workday-countdown-card[data-phase="alerting"] .timer-reminder-readout > strong,
.workday-countdown-card[data-phase="alerting"] .timer-reminder-readout > button,
.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] .sedentary-reminder-readout > strong,
.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] .sedentary-reminder-readout > button {
  animation: none !important;
}

.workday-countdown-card[data-phase="alerting"] .timer-reminder-readout > strong,
.sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"] .sedentary-reminder-readout > strong {
  color: #fff7b7 !important;
  letter-spacing: .04em !important;
  text-shadow: 0 0 8px rgba(255, 239, 119, .66) !important;
  transform: none !important;
}

@keyframes timerAlertSweepComposited {
  0%, 14% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(18deg);
  }
  30% { opacity: .82; }
  72% { opacity: .58; }
  90%, 100% {
    opacity: 0;
    transform: translate3d(450%, 0, 0) rotate(18deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .workday-countdown-card[data-phase="alerting"]::before,
  .sedentary-reminder-active .sedentary-reminder-card[data-phase="alerting"]::before {
    animation: none !important;
  }
}

/* The play-zone header shares the same compositor budget on iPhone. */
.entertainment-zone-entry.is-checkin-pending .energy-command-actions button {
  filter: none !important;
  box-shadow: 0 6px 18px rgba(71, 240, 172, .2) !important;
  will-change: transform;
  animation: dailyCheckinPulseComposited 1800ms ease-in-out infinite !important;
}

.entertainment-zone-entry.is-checkin-pending .energy-command-actions button::after {
  left: -42% !important;
  will-change: transform, opacity;
  animation: dailyCheckinSweepComposited 1800ms ease-in-out infinite !important;
}

@keyframes dailyCheckinPulseComposited {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -1px, 0) scale(1.018); }
}

@keyframes dailyCheckinSweepComposited {
  0%, 22% { opacity: 0; transform: translate3d(0, 0, 0) skewX(-16deg); }
  38% { opacity: .9; }
  72%, 100% { opacity: 0; transform: translate3d(535%, 0, 0) skewX(-16deg); }
}

@media (max-width: 640px) {
  .entertainment-zone-sparkles {
    will-change: transform, opacity;
    animation: entertainmentSparkCluster 2400ms ease-in-out infinite;
  }

  .entertainment-zone-sparkles i {
    animation: none !important;
  }
}

@keyframes entertainmentSparkCluster {
  0%, 100% { opacity: .68; transform: translateZ(0) scale(.97); }
  50% { opacity: 1; transform: translateZ(0) scale(1.03); }
}

/* 2026-09-11: keep the ledger calibration header inside the iPhone viewport.
   The generic dialog is centered with a transform, which can be offset by a
   horizontally scrolled WebView. Pin this one dialog to safe-area insets and
   let its title column shrink before the close control does. */
dialog#ledgerSettings,
dialog#ledgerSettings[open] {
  box-sizing: border-box !important;
  min-width: 0 !important;
}

dialog#ledgerSettings .celebrity-settings-dialog-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

dialog#ledgerSettings .celebrity-settings-dialog-head > div,
dialog#ledgerSettings .celebrity-settings-dialog-head :is(h2, p) {
  min-width: 0;
  max-width: 100%;
}

dialog#ledgerSettings .celebrity-settings-close {
  box-sizing: border-box;
  width: 56px;
  min-width: 56px;
  padding-inline: 8px;
  justify-self: end;
}

dialog#ledgerSettings .ledger-settings-dialog-body,
dialog#ledgerSettings .ledger-days,
dialog#ledgerSettings .ledger-day-row {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 640px) {
  dialog#ledgerSettings,
  dialog#ledgerSettings[open],
  html.native-app dialog#ledgerSettings,
  html.native-app dialog#ledgerSettings[open] {
    left: max(8px, env(safe-area-inset-left, 0px)) !important;
    right: max(8px, env(safe-area-inset-right, 0px)) !important;
    width: auto !important;
    max-width: none !important;
    transform: translateY(-50%) !important;
    animation: ledgerSettingsStableIn 180ms ease both !important;
  }

  dialog#ledgerSettings .celebrity-settings-dialog-head {
    gap: 8px;
    padding-inline: 12px;
  }

  dialog#ledgerSettings .celebrity-settings-close {
    width: 52px;
    min-width: 52px;
    height: 32px;
    padding-inline: 6px;
  }
}

@keyframes ledgerSettingsStableIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
