:root {
  color-scheme: dark;
  --bg: #070806;
  --panel: #141612;
  --text: #f8faf4;
  --muted: #a7ad9e;
  --line: rgba(255, 255, 255, .11);
  --accent: #58cc02;
  --accent-2: #8ee000;
  --danger: #ff4d55;
  --soft: rgba(255, 255, 255, .08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(88, 204, 2, .18), transparent 36rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}
body.immersive-body {
  height: 100dvh;
  overflow: hidden;
  background: #000;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
main {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 18px 16px 96px;
}
.immersive-body main {
  width: 100%;
  height: 100dvh;
  padding: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 6, .82);
  backdrop-filter: blur(18px);
}
.brand { font-weight: 800; }
.topbar nav { display: flex; align-items: center; gap: 12px; }
.topbar form { margin: 0; }
.topbar button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: none;
}

.habit-screen {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  gap: 28px;
  padding: calc(28px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
}
.task-list-entry {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 15px;
  background: rgba(255, 255, 255, .055);
  color: #cbd5f1;
  backdrop-filter: blur(12px);
}
.task-list-entry svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.task-list-entry:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.task-list-entry:active { transform: scale(.98); }
.streak-orb {
  width: min(68vw, 280px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .25), transparent 18%),
    linear-gradient(160deg, #1d260f, #0d1208 62%);
  border: 1px solid rgba(142, 224, 0, .28);
  box-shadow: 0 28px 80px rgba(88, 204, 2, .22), inset 0 0 40px rgba(88, 204, 2, .08);
}
.flame {
  font-size: clamp(48px, 16vw, 86px);
  filter: drop-shadow(0 12px 22px rgba(255, 131, 0, .35));
}
.streak-orb strong {
  margin-top: -4px;
  font-size: clamp(58px, 20vw, 112px);
  line-height: .9;
  letter-spacing: 0;
}
.streak-orb span {
  color: var(--accent-2);
  font-weight: 800;
}
.habit-copy h1 {
  margin: 0;
  font-size: clamp(30px, 9vw, 48px);
}
.habit-copy p {
  width: min(380px, 100%);
  margin: 12px auto 0;
  color: var(--muted);
  line-height: 1.6;
}
.task-actions {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  margin: 0 auto;
}
.task-actions form { margin: 0; }
.task-actions button { width: 100%; cursor: pointer; }
.task-created-note {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 10px;
  padding: 0 11px;
  border: 1px solid rgba(142, 224, 0, .26);
  border-radius: 999px;
  background: rgba(88, 204, 2, .1);
  color: #dfffc7;
  font-size: 12px;
  font-weight: 900;
}
.shortcut-loading {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  background: #000;
  color: #f8faf4;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.shortcut-loading.is-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.shortcut-loading span {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .14);
  border-top-color: var(--accent-2);
  border-right-color: rgba(142, 224, 0, .65);
  box-shadow: 0 0 34px rgba(88, 204, 2, .22);
  animation: reward-loader-spin .9s linear infinite;
}
.shortcut-loading strong {
  font-size: 18px;
  font-weight: 900;
}
.task-delete-screen {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: calc(28px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
}
.task-delete-screen h1 {
  margin: 0;
  font-size: clamp(30px, 9vw, 46px);
}
.task-delete-screen p {
  width: min(420px, 100%);
  margin: 0 auto 12px;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}
.task-delete-screen a {
  width: min(420px, 100%);
  margin: 0 auto;
}
.task-delete-options {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  margin: 0 auto;
}
.task-delete-options form { margin: 0; }
.task-delete-options button { cursor: pointer; }
.task-delete-options .task-delete-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.task-delete-screen .task-delete-help {
  margin-top: 8px;
  color: #7f8879;
  font-size: 12px;
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  margin-bottom: 14px;
}
h1 { margin: 0 0 10px; font-size: 28px; }
h2 { margin: 14px 0 8px; font-size: 18px; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 14px; }
input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f110d;
  color: var(--text);
  padding: 10px 12px;
}
button, .primary, .secondary, .fail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  padding: 12px 18px;
}
.pill { border-radius: 999px; font-weight: 850; }
.primary {
  border-color: transparent;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #102006;
  box-shadow: 0 12px 30px rgba(88, 204, 2, .28);
}
.secondary {
  background: rgba(255, 255, 255, .1);
}
.fail-action {
  color: #d8dbd3;
  background: rgba(255, 255, 255, .06);
}
.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: white;
  font-weight: 800;
}
.wide { width: 100%; }
.settings-screen {
  position: relative;
  min-height: calc(100dvh - 114px);
  padding: calc(22px + env(safe-area-inset-top)) 2px calc(28px + env(safe-area-inset-bottom));
}
.settings-screen h1 {
  margin: 0 54px 26px 0;
  font-size: 34px;
  letter-spacing: 0;
}
.settings-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 0;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .1);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}
.settings-form {
  display: grid;
  gap: 28px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
  color: var(--text);
  font-weight: 760;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}
.setting-row input {
  width: 82px;
  min-height: 42px;
  text-align: center;
}
.planet-style-setting {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 0;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.planet-style-setting legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 15px;
  font-weight: 820;
}
.planet-style-setting label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: rgba(255, 255, 255, .055);
  color: #dce6fb;
  font-size: 13px;
  font-weight: 820;
}
.planet-style-setting input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.planet-style-setting label:has(input:checked) {
  border-color: rgba(255, 214, 111, .55);
  background: rgba(255, 214, 111, .13);
  color: #ffe5a2;
}
.planet-style-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 16px;
  background: rgba(148, 163, 184, .06);
  color: rgba(203, 213, 225, .66);
  font-size: 12px;
  font-weight: 760;
  text-align: center;
}
.folder-list {
  display: grid;
  gap: 2px;
  overflow: visible;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
}
.folder-list h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 18px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.check-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}
.settings-actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
}
.settings-actions button {
  width: 100%;
}

.swipe-deck {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
  touch-action: none;
}
.reward-loader {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  background: #000;
  color: #f8faf4;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.swipe-deck.is-loading .reward-loader {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.reward-loader span {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .14);
  border-top-color: var(--accent-2);
  border-right-color: rgba(142, 224, 0, .65);
  box-shadow: 0 0 34px rgba(88, 204, 2, .2);
  animation: reward-loader-spin .9s linear infinite;
}
.reward-loader strong {
  font-size: 18px;
  font-weight: 900;
}
.reward-loader em {
  color: rgba(248, 250, 244, .58);
  font-size: 13px;
  font-style: normal;
}
@keyframes reward-loader-spin {
  to { transform: rotate(1turn); }
}
.swipe-card {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
  will-change: transform, opacity;
  transition: transform .22s ease, opacity .22s ease;
}
.swipe-card:not(:first-of-type) {
  transform: translateY(18px) scale(.985);
  opacity: 0;
  pointer-events: none;
}
.swipe-card img {
  width: 100vw;
  height: 100dvh;
  object-fit: contain;
  user-select: none;
  transform-origin: center center;
  transition: transform .18s ease;
}
.swipe-card.is-zoomed img {
  transition: none;
}
.swipe-hint {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top));
  padding: 10px 16px;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .12s ease, transform .12s ease;
  pointer-events: none;
}
.delete-hint {
  right: 18px;
  background: rgba(255, 77, 85, .88);
}
.keep-hint {
  left: 50%;
  top: auto;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) scale(.94);
  background: rgba(88, 204, 2, .88);
  color: #102006;
}
.swipe-card.show-delete .delete-hint,
.swipe-card.show-keep .keep-hint {
  opacity: 1;
}
.swipe-card.show-delete .delete-hint { transform: scale(1); }
.swipe-card.show-keep .keep-hint { transform: translateX(-50%) scale(1); }

.done-card {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 8%, rgba(88, 204, 2, .2), transparent 28rem),
    #070806;
  transition: opacity .2s ease;
}
.done-card.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.done-mark {
  display: grid;
  place-items: center;
  align-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #102006;
  font-weight: 900;
  box-shadow: 0 16px 50px rgba(88, 204, 2, .28);
}
.done-mark strong {
  font-size: 38px;
  line-height: .95;
}
.done-mark span {
  font-size: 13px;
  line-height: 1.1;
}
.done-link {
  text-decoration: none;
}
.done-card h1 {
  margin: 10px 0 0;
  font-size: 34px;
}
.done-card p {
  margin: 0;
  color: var(--muted);
}
.done-friendship-note {
  max-width: 320px;
  color: #7f8879;
  font-size: 12px;
  line-height: 1.5;
}
.done-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(360px, 100%);
  margin-top: 10px;
}

.task-list-screen {
  min-height: calc(100dvh - 40px);
  padding: calc(18px + env(safe-area-inset-top)) 2px calc(28px + env(safe-area-inset-bottom));
}
.list-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.list-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-create-trigger {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid rgba(142, 224, 0, .28);
  border-radius: 999px;
  background: rgba(88, 204, 2, .12);
  color: #dfffc8;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}
.task-create-trigger:active { transform: translateY(1px) scale(.98); }
.back-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.eyebrow {
  margin: 0 0 3px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
}
.list-header h1 {
  margin: 0;
  font-size: 32px;
}
.task-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.task-stat-grid div,
.task-stat-grid a {
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  color: inherit;
  text-decoration: none;
}
.task-stat-grid strong,
.task-stat-grid span {
  display: block;
  text-align: center;
}
.task-stat-grid strong {
  font-size: 22px;
  line-height: 1;
}
.task-stat-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}
.task-list {
  display: grid;
  gap: 8px;
}
.task-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .035));
}
.task-title-link:hover { color: var(--accent-2); }
.task-item-main {
  min-width: 0;
}
.task-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.task-title-row h2 {
  min-width: 0;
  margin: 0;
  font-size: 16px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}
.task-title-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}
.status-pill {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .08);
  font-size: 11px;
  font-weight: 850;
}
.status-completed {
  color: #102006;
  background: var(--accent);
}
.status-failed {
  color: white;
  background: rgba(255, 77, 85, .78);
}
.task-streak-row {
  display: grid;
  grid-template-columns: auto minmax(56px, 1fr);
  align-items: center;
  gap: 9px;
  margin-top: 9px;
}
.task-streak-row > span {
  color: #e5e9dc;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.streak-strip {
  display: grid;
  grid-template-columns: repeat(var(--streak-strip-count, 8), minmax(3px, 1fr));
  gap: 2px;
  max-width: 168px;
}
.streak-strip i {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .12);
}
.streak-strip .is-on {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.streak-strip .is-current {
  background: rgba(255, 255, 255, .24);
}
.streak-strip .is-missed {
  background: rgba(255, 255, 255, .09);
}
.streak-strip .is-failed {
  background: rgba(255, 77, 85, .82);
}
.task-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.task-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .065);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}
.frequency-select {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 4px 0 8px;
  border-radius: 999px;
  background: rgba(88, 204, 2, .12);
  color: #d7f8bf;
  font-size: 12px;
  line-height: 1;
}
.frequency-select span {
  min-height: auto;
  padding: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}
.frequency-select select {
  max-width: 76px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #f7ffe8;
  font: inherit;
  font-weight: 850;
  outline: 0;
}
.frequency-select.is-saving {
  opacity: .62;
}
.frequency-select.is-error {
  background: rgba(255, 77, 85, .18);
  color: #ffd1d3;
}
.task-item form {
  margin: 0;
}
.task-item-actions {
  display: grid;
  gap: 7px;
  justify-items: stretch;
}
.task-complete-button,
.task-reward-link,
.task-detail-link {
  min-width: 52px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(142, 224, 0, .3);
  border-radius: 999px;
  background: rgba(88, 204, 2, .14);
  color: #ddffc5;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.task-complete-button:active,
.task-reward-link:active,
.task-detail-link:active { transform: translateY(1px) scale(.98); }
.task-complete-button:disabled { opacity: .62; cursor: wait; }
.task-reward-link,
.task-detail-link { display: inline-flex; align-items: center; justify-content: center; }
.task-detail-link {
  border-color: rgba(255, 255, 255, .13);
  background: rgba(255, 255, 255, .065);
  color: #cbd2c5;
}
.icon-danger {
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border-color: rgba(255, 77, 85, .38);
  border-radius: 999px;
  color: #ffb1b5;
  background: rgba(255, 77, 85, .1);
  font-size: 12px;
  font-weight: 850;
}
.empty-state {
  padding: 32px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
  text-align: center;
}
.empty-state h2 {
  margin-top: 0;
}
.empty-state p {
  margin-bottom: 18px;
  color: var(--muted);
}
.empty-state button { cursor: pointer; }

.task-create-dialog {
  inset: auto 0 0;
  width: min(520px, 100%);
  max-width: none;
  max-height: min(82dvh, 680px);
  margin: auto auto 0;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .13);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(circle at 74% 6%, rgba(88, 204, 2, .16), transparent 16rem),
    #080b12;
  color: var(--text);
  box-shadow: 0 -24px 80px rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .06);
}
.task-create-dialog::backdrop {
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
}
.task-create-dialog[open] { animation: task-sheet-arrive .26s cubic-bezier(.16, 1, .3, 1); }
.task-create-dialog form {
  display: grid;
  gap: 18px;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
}
.task-create-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.task-create-heading span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}
.task-create-heading h2 { margin: 3px 0 0; font-size: 27px; }
.task-create-heading button {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 14px;
  color: #c9d0c3;
  cursor: pointer;
}
.task-create-title {
  display: grid;
  gap: 8px;
  color: #dde4d8;
  font-size: 13px;
  font-weight: 800;
}
.task-create-title input {
  border-radius: 14px;
  background: rgba(255, 255, 255, .055);
}
.task-frequency-choice {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}
.task-frequency-choice legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  color: #dde4d8;
  font-size: 13px;
  font-weight: 800;
}
.task-frequency-choice label { position: relative; cursor: pointer; }
.task-frequency-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.task-frequency-choice span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
  color: #aab3a4;
  font-size: 13px;
  font-weight: 850;
}
.task-frequency-choice input:checked + span {
  border-color: rgba(142, 224, 0, .42);
  background: rgba(88, 204, 2, .15);
  color: #e3ffd0;
}
.task-frequency-choice input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.task-create-dialog form > p {
  margin: -2px 0 0;
  color: #8f998a;
  font-size: 12px;
  line-height: 1.55;
}
.task-create-dialog [type="submit"]:disabled { opacity: .64; cursor: wait; }
@keyframes task-sheet-arrive { from { opacity: 0; transform: translateY(26px); } }
.delete-log-list {
  display: grid;
  gap: 8px;
}
.delete-log-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
}
.delete-log-item.is-failed {
  border-color: rgba(255, 77, 85, .45);
  background: rgba(255, 77, 85, .1);
}
.delete-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.delete-log-head strong {
  color: var(--accent-2);
  font-size: 14px;
}
.delete-log-item.is-failed .delete-log-head strong {
  color: #ffb1b5;
}
.delete-log-head span,
.delete-log-item p {
  color: var(--muted);
  font-size: 12px;
}
.delete-log-item p {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}
.login-panel { width: min(360px, 100%); }

/* Reward pool home */
.reward-home {
  --home-bg: #060b20;
  --home-panel: #0d1731;
  --home-panel-2: #101c3b;
  --home-gold: #ffca54;
  --home-gold-deep: #ef931f;
  --home-mint: #62efd0;
  --home-coral: #ff916f;
  position: relative;
  min-height: 100dvh;
  padding: calc(2px + env(safe-area-inset-top)) 0 calc(24px + env(safe-area-inset-bottom));
  color: #f7f8ff;
}
.reward-home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 9%, rgba(24, 79, 164, .28), transparent 31rem),
    linear-gradient(180deg, #060b20, #07102a 64%, #050a1b);
}
.reward-home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  margin-bottom: 10px;
}
.reward-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.reward-brand-mark {
  position: relative;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(96, 225, 255, .58);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 7%, #65dcff 8% 17%, #8769ff 18% 29%, transparent 31%);
  box-shadow: 0 0 22px rgba(90, 180, 255, .28), inset 0 0 14px rgba(93, 90, 255, .42);
}
.reward-brand-mark::before,
.reward-brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px 13px;
  border-radius: 100%;
  background: #fff;
  box-shadow: 0 0 9px #71e7ff;
}
.reward-brand-mark::after { transform: rotate(90deg); }
.reward-home-nav { display: flex; gap: 8px; }
.reward-home-nav a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 15px;
  background: rgba(255, 255, 255, .055);
  color: #cbd5f1;
  backdrop-filter: blur(12px);
}
.friendship-home-icon {
  position: relative;
  display: block;
  width: 24px;
  height: 20px;
}
.friendship-home-icon i {
  position: absolute;
  top: 1px;
  left: 2px;
  width: 13px;
  height: 13px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}
.friendship-home-icon i:last-child {
  top: 6px;
  right: 1px;
  left: auto;
  border-color: var(--home-mint);
  background: rgba(104, 244, 223, .08);
}
.friendship-home-entry { position: relative; }
.friendship-home-alert {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #050916;
  border-radius: 999px;
  background: #e88965;
  color: #fff;
  font-size: 9px;
  line-height: 1;
}
.reward-home-nav svg,
.pool-summary button svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reward-pool-hero {
  position: relative;
  overflow: hidden;
  padding: 20px 14px 14px;
  border: 1px solid rgba(132, 226, 255, .2);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 39%, rgba(86, 221, 255, .22), transparent 42%),
    radial-gradient(circle at 18% 18%, rgba(119, 102, 255, .22), transparent 32%),
    radial-gradient(circle at 82% 12%, rgba(255, 117, 215, .18), transparent 30%),
    linear-gradient(155deg, rgba(10, 23, 57, .98), rgba(5, 12, 34, .98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .08);
}
.reward-pool-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image:
    radial-gradient(circle at 9% 29%, #fff 0 1px, transparent 1.8px),
    radial-gradient(circle at 83% 18%, #ffd66c 0 1px, transparent 2px),
    radial-gradient(circle at 92% 47%, #fff 0 .8px, transparent 1.6px),
    radial-gradient(circle at 21% 62%, #8bc8ff 0 1px, transparent 1.8px);
  pointer-events: none;
}
.pool-heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}
.pool-heading p {
  margin: 0 0 4px;
  color: #9dacd0;
  font-size: 12px;
  font-weight: 760;
}
.pool-heading h1 {
  margin: 0;
  color: #f3f7ff;
  font-size: clamp(25px, 7.4vw, 36px);
  line-height: 1;
  letter-spacing: -.03em;
  text-shadow: 0 8px 26px rgba(92, 218, 255, .22);
}
.vault-stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: clamp(270px, 72vw, 390px);
  margin: 1px auto -5px;
}
.vault-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(94, 234, 212, .28), rgba(122, 92, 255, .28), rgba(255, 117, 215, .2));
  filter: blur(42px);
  transform: translate(-50%, -50%);
  animation: vault-glow 3.2s ease-in-out infinite;
}
.reward-orb-art {
  position: relative;
  width: min(74vw, 340px);
  aspect-ratio: 1;
  border: 1px solid rgba(183, 237, 255, .32);
  border-radius: 36%;
  background:
    radial-gradient(circle at 38% 33%, rgba(255, 255, 255, .92) 0 5%, transparent 12%),
    radial-gradient(circle at 54% 45%, rgba(107, 239, 218, .92), transparent 25%),
    radial-gradient(circle at 34% 68%, rgba(121, 98, 255, .76), transparent 34%),
    radial-gradient(circle at 73% 32%, rgba(255, 121, 219, .62), transparent 29%),
    linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .035));
  box-shadow:
    0 36px 80px rgba(0, 0, 0, .32),
    0 0 70px rgba(93, 213, 255, .16),
    inset 0 1px 0 rgba(255, 255, 255, .42),
    inset 0 -38px 70px rgba(4, 10, 31, .35);
  transform: rotate(-7deg);
  animation: orb-float 5.8s ease-in-out infinite;
}
.reward-orb-art::before,
.reward-orb-art::after {
  content: "";
  position: absolute;
  inset: 13%;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  transform: rotate(22deg);
}
.reward-orb-art::after {
  inset: 24%;
  border-color: rgba(255, 255, 255, .15);
  transform: rotate(-28deg);
}
.reward-orb-art i {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 0 18px rgba(113, 231, 255, .72);
}
.reward-orb-art i:nth-child(1) {
  left: 15%;
  top: 30%;
  width: 13px;
  height: 13px;
}
.reward-orb-art i:nth-child(2) {
  right: 18%;
  top: 22%;
  width: 9px;
  height: 9px;
  background: #ffd9ff;
}
.reward-orb-art i:nth-child(3) {
  right: 25%;
  bottom: 18%;
  width: 16px;
  height: 16px;
  background: #7cf8df;
}
.pool-balance {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 62%;
  transform: translate(-50%, -50%);
  text-align: center;
  text-shadow: 0 3px 18px rgba(0, 13, 42, .72), 0 0 28px rgba(98, 239, 208, .36);
}
.pool-balance > span {
  color: #dff9ff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .16em;
}
.pool-balance strong {
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: #fff;
  font-size: clamp(48px, 16vw, 82px);
  line-height: .95;
  letter-spacing: -.07em;
}
.pool-balance strong small {
  margin-right: 2px;
  font-size: .47em;
  letter-spacing: 0;
}
.pool-summary {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.pool-summary > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: rgba(8, 17, 43, .78);
  backdrop-filter: blur(12px);
}
.summary-arrow { font-size: 26px; font-weight: 400; line-height: 1; }
.summary-arrow.earned { color: var(--home-mint); }
.summary-arrow.spent { color: var(--home-coral); }
.pool-summary p { display: grid; gap: 2px; margin: 0; }
.pool-summary p span { color: #9faac5; font-size: 10px; font-weight: 720; }
.pool-summary p strong { font-size: 20px; line-height: 1; }
.pool-summary > div:first-child strong { color: var(--home-mint); }
.pool-summary > div:nth-child(2) strong { color: var(--home-coral); }
.pool-summary button {
  grid-column: 1 / -1;
  gap: 9px;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #7cf8df, #6db8ff 52%, #a78bfa);
  color: #06162d;
  font-size: 16px;
  font-weight: 920;
  box-shadow: 0 10px 30px rgba(94, 213, 255, .24), inset 0 1px rgba(255, 255, 255, .65);
}
.pool-summary button:active { transform: translateY(1px) scale(.995); }
.pool-summary button:disabled {
  color: #7f879f;
  background: #202b45;
  box-shadow: none;
}
.home-streaks { margin-top: 25px; }
.streaks-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 3px 12px;
}
.streaks-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.streaks-heading div p { margin: 4px 0 0; color: #8591b0; font-size: 11px; }
.streaks-heading > p { margin: 0 0 2px; color: #aab4d0; font-size: 12px; }
.streaks-heading > p strong { color: var(--home-mint); font-size: 16px; }
.home-streak-list { display: grid; gap: 9px; }
.home-streak-card {
  --task-accent: #59ead0;
  position: relative;
  color: #f7f8ff;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 43px 12px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  min-height: 90px;
  padding: 12px 12px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 22px;
  background:
    radial-gradient(circle at 11% 50%, color-mix(in srgb, var(--task-accent) 12%, transparent), transparent 25%),
    linear-gradient(135deg, rgba(16, 29, 61, .96), rgba(9, 19, 43, .96));
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 9px 28px rgba(0, 0, 0, .12);
}
.home-streak-card.accent-1 { --task-accent: #5ab8ff; }
.home-streak-card.accent-2 { --task-accent: #b985ff; }
.home-streak-card.accent-3 { --task-accent: #ffad47; }
.home-streak-card.accent-4 { --task-accent: #ff759d; }
.home-streak-card.status-failed { --task-accent: #ff6f7d; opacity: .78; }
.task-token {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid color-mix(in srgb, var(--task-accent) 66%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--task-accent) 16%, #0b1731);
  color: var(--task-accent);
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 0 20px color-mix(in srgb, var(--task-accent) 15%, transparent), inset 0 1px rgba(255, 255, 255, .13);
}
.home-task-copy { align-self: end; min-width: 0; }
.home-task-copy strong,
.home-task-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-task-copy strong { font-size: 15px; }
.home-task-copy small { margin-top: 3px; color: #8591ad; font-size: 10px; }
.home-streak-count {
  align-self: end;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 2px;
  color: var(--task-accent);
}
.home-streak-count b { font-size: 27px; line-height: .9; letter-spacing: -.06em; }
.home-streak-count small { font-size: 9px; font-weight: 850; }
.home-history {
  display: grid;
  grid-template-columns: repeat(14, minmax(3px, 1fr));
  gap: 3px;
  align-self: end;
  margin-top: 9px;
}
.home-history i {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .12);
}
.home-history .history-done {
  background: var(--task-accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--task-accent) 48%, transparent);
}
.home-history .history-current {
  border: 1px solid var(--task-accent);
  background: transparent;
  box-shadow: 0 0 7px color-mix(in srgb, var(--task-accent) 35%, transparent);
}
.home-history .history-failed {
  border: 1px solid #ff6f7d;
  background: linear-gradient(135deg, transparent 38%, #ff6f7d 40% 60%, transparent 62%);
  box-shadow: 0 0 8px rgba(255, 78, 96, .35);
}
.home-history .history-inactive { opacity: .24; }
.card-chevron {
  grid-column: 5;
  grid-row: 1 / 3;
  width: 13px;
  fill: none;
  stroke: rgba(255, 255, 255, .4);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reward-empty-state {
  padding: 34px 22px;
  border: 1px dashed rgba(255, 255, 255, .15);
  border-radius: 24px;
  background: rgba(255, 255, 255, .035);
  text-align: center;
}
.reward-empty-state > span {
  display: block;
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border: 2px solid var(--home-gold);
  border-radius: 50%;
  box-shadow: inset 0 0 18px rgba(255, 198, 75, .18), 0 0 20px rgba(255, 198, 75, .12);
}
.reward-empty-state h3 { margin: 0; font-size: 18px; }
.reward-empty-state p { margin: 7px 0 0; color: #8c98b8; font-size: 13px; }
.reward-empty-state a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 16px;
  padding: 0 18px;
  border: 1px solid rgba(247, 201, 107, .25);
  border-radius: 999px;
  background: rgba(247, 201, 107, .1);
  color: #ffe5a9;
  font-size: 13px;
  font-weight: 900;
}
.redeem-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility .25s;
}
.redeem-modal.is-open { visibility: visible; opacity: 1; }
.redeem-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(1, 5, 17, .7);
  backdrop-filter: blur(7px);
}
.redeem-sheet {
  position: relative;
  z-index: 1;
  width: min(600px, 100%);
  max-height: min(90dvh, 760px);
  margin: 0 auto;
  overflow-y: auto;
  padding: 14px 18px calc(22px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, .13);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, #131d3a, #080f25);
  box-shadow: 0 -24px 80px rgba(0, 0, 0, .42);
  transform: translateY(105%);
  transition: transform .34s cubic-bezier(.2, .8, .2, 1);
}
.redeem-modal.is-open .redeem-sheet { transform: translateY(0); }
.sheet-handle {
  display: block;
  width: 38px;
  height: 4px;
  margin: 0 auto 13px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .22);
}
.sheet-close {
  position: absolute;
  top: 20px;
  right: 18px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #abb5ce;
  font-size: 22px;
}
.sheet-kicker { margin: 0; color: var(--home-gold); font-size: 12px; font-weight: 850; }
.redeem-sheet h2 { margin: 5px 44px 0 0; font-size: 26px; }
.sheet-copy { margin: 8px 0 18px; color: #97a2bd; font-size: 13px; line-height: 1.5; }
.redeem-sheet form { display: grid; gap: 13px; }
.redeem-amount {
  display: flex;
  align-items: center;
  height: 78px;
  padding: 0 16px;
  border: 1px solid rgba(255, 201, 82, .28);
  border-radius: 20px;
  background: rgba(255, 196, 72, .07);
  color: var(--home-gold);
}
.redeem-amount > span { font-size: 28px; font-weight: 900; }
.redeem-amount input {
  height: 72px;
  min-height: 0;
  border: 0;
  background: transparent;
  color: #fff5db;
  font-size: 44px;
  font-weight: 900;
  outline: 0;
}
.redeem-amount input::-webkit-outer-spin-button,
.redeem-amount input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}
.redeem-amount input[type="number"] { appearance: textfield; }
.redeem-note { display: grid; gap: 6px; }
.redeem-note span { color: #9ba6c0; font-size: 11px; font-weight: 760; }
.redeem-note input {
  min-height: 48px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .055);
}
.note-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
}
.note-shortcuts button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 217, 123, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #dbe4f7;
  font-size: 13px;
  font-weight: 820;
}
.note-shortcuts button:active { transform: translateY(1px); }
.confirm-redeem {
  border: 0;
  border-radius: 17px;
  background: linear-gradient(135deg, #ffe184, #ffad2d);
  color: #3c2104;
  font-size: 16px;
  font-weight: 920;
}
.recent-redemptions { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .09); }
.recent-redemptions h3 { margin: 0 0 8px; color: #8f9bb9; font-size: 12px; }
.recent-redemptions > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.recent-redemptions span { font-size: 13px; }
.recent-redemptions small { display: block; margin-top: 3px; color: #737f9e; font-size: 10px; }
.recent-redemptions strong { color: var(--home-coral); font-size: 14px; }
.reward-toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 12px 17px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 99px;
  background: rgba(11, 20, 45, .93);
  color: #fff0c8;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: .25s ease;
  backdrop-filter: blur(14px);
}
.reward-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.coin-celebration { position: fixed; inset: 0; z-index: 90; overflow: hidden; pointer-events: none; }
.celebration-coin {
  position: absolute;
  top: -34px;
  width: 15px;
  height: 15px;
  border: 2px solid #fff0a7;
  border-radius: 50%;
  background: #f9b82d;
  box-shadow: inset 0 0 0 2px #d88b0f, 0 0 9px rgba(255, 190, 49, .45);
  animation: coin-fall var(--duration) linear forwards;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Cosmic reward home overrides */
body:has(.reward-home) {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 0, rgba(61, 92, 174, .24), transparent 28rem),
    radial-gradient(circle at 8% 35%, rgba(255, 183, 89, .08), transparent 18rem),
    #00030b;
}
body:has(.reward-home) main {
  width: min(430px, 100%);
  overflow-x: hidden;
  padding: 18px 0 96px;
}
.reward-home {
  --home-mint: #68f4df;
  --home-coral: #ff9a76;
  --home-gold: #ffd77a;
  --daily-accent: #ffd66f;
  --weekly-accent: #5fe7f2;
  --monthly-accent: #8d72ff;
  position: relative;
  max-width: 430px;
  margin: 0 auto;
}
.reward-home::before {
  inset: -18px max(-50vw, -500px) 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, .95) 0 1px, transparent 1.7px),
    radial-gradient(circle at 78% 7%, rgba(180, 214, 255, .82) 0 1px, transparent 1.8px),
    radial-gradient(circle at 8% 43%, rgba(255, 209, 139, .76) 0 1px, transparent 1.8px),
    radial-gradient(circle at 88% 54%, rgba(123, 236, 255, .72) 0 1px, transparent 1.7px),
    radial-gradient(circle at 47% 72%, rgba(255, 255, 255, .5) 0 .8px, transparent 1.7px),
    radial-gradient(ellipse at 85% 24%, rgba(115, 83, 201, .26), transparent 24rem),
    radial-gradient(ellipse at 52% 42%, rgba(237, 132, 56, .14), transparent 21rem),
    linear-gradient(180deg, #050916 0%, #01030b 58%, #000 100%);
}
.reward-home::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 65% 27%, rgba(91, 63, 168, .28), transparent 25rem),
    radial-gradient(ellipse at 52% 53%, rgba(255, 167, 56, .12), transparent 19rem);
  filter: blur(2px);
}
.reward-home-header {
  position: absolute;
  top: 8px;
  right: 18px;
  left: auto;
  z-index: 20;
  justify-content: flex-end;
  width: auto;
  min-height: auto;
  padding: 0;
  margin: 0;
}
.reward-home-nav a {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(10, 16, 31, .38);
  box-shadow: inset 0 1px rgba(255, 255, 255, .09);
}
.reward-pool-hero {
  min-height: 650px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.reward-pool-hero::before {
  inset: 0;
  opacity: .72;
  background:
    radial-gradient(circle at 11% 38%, rgba(255, 255, 255, .8) 0 1px, transparent 1.6px),
    radial-gradient(circle at 91% 22%, rgba(255, 233, 182, .8) 0 1px, transparent 1.7px),
    radial-gradient(circle at 66% 67%, rgba(119, 232, 255, .55) 0 .9px, transparent 1.6px);
}
.vault-stage {
  height: 555px;
  margin: -12px 0 -4px;
  perspective: 1200px;
  pointer-events: none;
}
.vault-glow {
  display: none;
  left: 56%;
  top: 54%;
  width: 122%;
  background:
    radial-gradient(circle, rgba(255, 199, 96, .3), rgba(255, 125, 60, .18) 22%, rgba(95, 231, 242, .12) 42%, transparent 71%);
  filter: blur(38px);
}
.space-field {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 73% 38%, rgba(135, 92, 255, .2), transparent 27%),
    radial-gradient(ellipse at 52% 50%, rgba(255, 186, 74, .07), transparent 31%),
    radial-gradient(ellipse at 62% 57%, rgba(95, 231, 242, .07), transparent 45%);
}
.solar-system {
  position: absolute;
  left: 58%;
  top: 56%;
  width: min(156vw, 670px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
}
.sun-core {
  position: absolute;
  left: 50%;
  top: 53%;
  z-index: 10;
  width: clamp(88px, 25.5vw, 108px);
  height: clamp(88px, 25.5vw, 108px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 249, 212, .8) 0 4%, transparent 6%),
    radial-gradient(ellipse at 59% 39%, rgba(255, 224, 103, .55) 0 11%, transparent 23%),
    radial-gradient(ellipse at 38% 68%, rgba(209, 74, 24, .34) 0 16%, transparent 29%),
    repeating-radial-gradient(circle at 44% 46%, rgba(255, 204, 78, .18) 0 5px, transparent 6px 12px),
    radial-gradient(circle at 34% 31%, #ffe17f 0 15%, #ffb039 34%, #ea6f22 57%, #8f2d14 80%, #361009 100%);
  box-shadow:
    0 0 20px rgba(255, 167, 67, .09),
    inset -20px -24px 34px rgba(58, 12, 6, .62),
    inset 13px 12px 22px rgba(255, 255, 255, .12);
  transform: translate(-50%, -50%);
}
.sun-core::before {
  content: none;
}
.planet-style-svg .sun-core {
  background: url("/static/planet-sun.svg") center / cover no-repeat;
}
.orbit {
  position: absolute;
  left: 50%;
  top: 53%;
  border: 0;
  border-radius: 50%;
  width: var(--planet-size);
  height: var(--planet-size);
  margin: calc(var(--planet-size) / -2) 0 0 calc(var(--planet-size) / -2);
  transform: translate3d(0, 0, 0);
  transform-style: preserve-3d;
  will-change: transform;
}
.orbit i {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--planet-bg);
  box-shadow:
    inset -7px -8px 13px rgba(0, 0, 0, .5),
    inset 5px 4px 10px rgba(255, 255, 255, .3);
}
.orbit i::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--planet-texture, transparent);
  mix-blend-mode: screen;
  opacity: var(--texture-opacity, .52);
}
.orbit.is-behind i {
  filter: saturate(.72) brightness(.68);
}
.orbit-mercury {
  --planet-size: 11px;
  --orbit-rx: .165;
  --orbit-ry: .086;
  --planet-bg: radial-gradient(circle at 30% 26%, #fff7d8 0 11%, #a9a59c 42%, #444852 100%);
  --planet-texture: radial-gradient(circle at 64% 61%, rgba(255,255,255,.36) 0 10%, transparent 12%);
}
.orbit-venus {
  --planet-size: 17px;
  --orbit-rx: .216;
  --orbit-ry: .121;
  --planet-bg: radial-gradient(circle at 31% 27%, #fff0bd 0 12%, #dda762 48%, #684333 100%);
  --planet-texture: linear-gradient(155deg, transparent 0 24%, rgba(255,255,255,.34) 25% 31%, transparent 32% 53%, rgba(255,255,255,.22) 54% 60%, transparent 61%);
}
.orbit-earth {
  --planet-size: 20px;
  --orbit-rx: .27;
  --orbit-ry: .157;
  --planet-bg: url("/static/earth-globe.svg") center / 112% 112% no-repeat;
  --planet-texture: transparent;
  --texture-opacity: 0;
}
.orbit-earth i {
  background: var(--planet-bg);
  box-shadow:
    0 0 13px rgba(77, 166, 255, .18),
    inset -7px -8px 13px rgba(0, 0, 0, .5),
    inset 5px 4px 10px rgba(255, 255, 255, .22);
}
.orbit-earth i::before {
  background:
    radial-gradient(ellipse at 31% 24%, rgba(255, 255, 255, .62) 0 13%, rgba(255, 255, 255, .18) 24%, transparent 42%),
    radial-gradient(ellipse at 78% 74%, rgba(0, 0, 0, .36) 0 20%, transparent 58%),
    linear-gradient(132deg, rgba(255, 255, 255, .18), transparent 36%, rgba(0, 0, 0, .25) 78%);
  mix-blend-mode: screen;
  opacity: .76;
}
.orbit-earth i::after {
  content: "";
  position: absolute;
  inset: -28%;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(63, 162, 255, .3) 0 28%, rgba(63, 162, 255, .12) 42%, transparent 68%);
  filter: blur(4px);
  opacity: .65;
}
.planet-style-svg .orbit-mercury {
  --planet-bg: url("/static/planet-mercury.svg") center / 112% 112% no-repeat;
  --planet-texture: transparent;
  --texture-opacity: 0;
}
.planet-style-svg .orbit-venus {
  --planet-bg: url("/static/planet-venus.svg") center / 112% 112% no-repeat;
  --planet-texture: transparent;
  --texture-opacity: 0;
}
.planet-style-svg .orbit-earth {
  --planet-bg: url("/static/planet-earth.svg") center / 112% 112% no-repeat;
  --planet-texture: transparent;
  --texture-opacity: 0;
}
.planet-style-svg .orbit-mars {
  --planet-bg: url("/static/planet-mars.svg") center / 112% 112% no-repeat;
  --planet-texture: transparent;
  --texture-opacity: 0;
}
.planet-style-svg .orbit-jupiter {
  --planet-bg: url("/static/planet-jupiter.svg") center / 112% 112% no-repeat;
  --planet-texture: transparent;
  --texture-opacity: 0;
}
.planet-style-svg .orbit-saturn {
  --planet-bg: url("/static/planet-saturn.svg") center / 112% 112% no-repeat;
  --planet-texture: transparent;
  --texture-opacity: 0;
}
.planet-style-svg .orbit-uranus {
  --planet-bg: url("/static/planet-uranus.svg") center / 112% 112% no-repeat;
  --planet-texture: transparent;
  --texture-opacity: 0;
}
.planet-style-svg .orbit-neptune {
  --planet-bg: url("/static/planet-neptune.svg") center / 112% 112% no-repeat;
  --planet-texture: transparent;
  --texture-opacity: 0;
}
.planet-style-svg .orbit-saturn i::after {
  content: none;
}
.planet-style-svg .orbit-saturn i {
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 0 7px rgba(255, 220, 156, .18));
}
.planet-style-svg .orbit-saturn.is-behind i {
  filter: saturate(.72) brightness(.68) drop-shadow(0 0 5px rgba(255, 220, 156, .12));
}
.planet-style-svg .orbit i::before {
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, .82) 0 10%, transparent 12%),
    radial-gradient(circle at 70% 75%, rgba(0, 0, 0, .26), transparent 43%);
  mix-blend-mode: screen;
  opacity: .68;
}
.planet-style-svg .orbit-saturn i::before {
  content: none;
}
.orbit-mars {
  --planet-size: 15px;
  --orbit-rx: .324;
  --orbit-ry: .19;
  --planet-bg: radial-gradient(circle at 32% 28%, #ffd1a0 0 12%, #cf704e 52%, #4d2019 100%);
  --planet-texture: radial-gradient(circle at 62% 45%, rgba(90, 34, 25, .45) 0 12%, transparent 14%);
}
.orbit-jupiter {
  --planet-size: 42px;
  --orbit-rx: .405;
  --orbit-ry: .239;
  --planet-bg: linear-gradient(160deg, #fff0c2 0 16%, #ba7d4c 16% 28%, #efd2a0 28% 45%, #7b4c38 45% 58%, #d8a979 58% 72%, #f1d9ad 72% 100%);
  --planet-texture: radial-gradient(ellipse at 65% 56%, rgba(139, 57, 42, .92) 0 10%, transparent 12%);
}
.orbit-saturn {
  --planet-size: 36px;
  --orbit-rx: .474;
  --orbit-ry: .283;
  --planet-bg: radial-gradient(circle at 34% 29%, #fff2bd 0 12%, #d4b16d 57%, #604538 100%);
  --planet-texture: linear-gradient(170deg, transparent 0 34%, rgba(255,255,255,.28) 35% 43%, transparent 44%);
}
.orbit-saturn i::after {
  content: "";
  position: absolute;
  inset: 12px -18px;
  border: 2px solid rgba(244, 218, 145, .78);
  border-left-color: rgba(244, 218, 145, .22);
  border-radius: 50%;
  transform: rotate(-14deg);
}
.orbit-uranus {
  --planet-size: 25px;
  --orbit-rx: .535;
  --orbit-ry: .322;
  --planet-bg: radial-gradient(circle at 34% 29%, #eeffff 0 12%, #7ee7ee 54%, #1b6978 100%);
  --planet-texture: linear-gradient(105deg, transparent 0 45%, rgba(255,255,255,.22) 46% 54%, transparent 55%);
}
.orbit-neptune {
  --planet-size: 25px;
  --orbit-rx: .598;
  --orbit-ry: .363;
  --planet-bg: radial-gradient(circle at 34% 29%, #dbe6ff 0 12%, #657eff 54%, #151c65 100%);
  --planet-texture: radial-gradient(ellipse at 67% 53%, rgba(255,255,255,.24) 0 14%, transparent 16%);
}
.pool-balance {
  left: 24px;
  top: 34px;
  z-index: 16;
  display: grid;
  justify-items: start;
  place-items: unset;
  width: min(340px, calc(100% - 48px));
  padding-top: 22px;
  transform: none;
  text-align: left;
  text-shadow: 0 3px 20px rgba(0, 0, 0, .82), 0 0 24px rgba(255, 198, 91, .22);
}
.pool-balance > span {
  position: absolute;
  left: 0;
  top: -16px;
  color: rgba(255, 244, 214, .88);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.pool-balance strong {
  justify-content: flex-start;
  color: #ffe4a4;
  font-size: clamp(56px, 17vw, 86px);
  line-height: .92;
  letter-spacing: -.07em;
}
.pool-balance strong small {
  margin-right: 5px;
  color: #fff1ca;
  font-size: .5em;
}
.pool-balance p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 10px 0 0;
  color: rgba(226, 232, 244, .74);
  font-size: 12px;
  font-weight: 720;
}
.pool-balance p b { color: #f5fbff; font-weight: 850; }
.pool-summary {
  position: relative;
  z-index: 16;
  grid-template-columns: 0 0 1fr;
  gap: 0;
  margin: 14px 20px 0 auto;
  width: fit-content;
  pointer-events: auto;
}
.pool-summary-stat {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
}
.pool-summary button {
  grid-column: 3;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid rgba(255, 217, 123, .6);
  border-radius: 999px;
  background: rgba(5, 10, 21, .34);
  color: #ffe3a0;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 0 24px rgba(255, 207, 108, .14), inset 0 1px rgba(255, 255, 255, .13);
  backdrop-filter: blur(16px);
}
.pool-summary button:active { transform: translateY(1px) scale(.995); }
.pool-summary button:disabled {
  color: rgba(203, 213, 225, .52);
  border-color: rgba(148, 163, 184, .2);
  background: rgba(8, 14, 28, .32);
  box-shadow: none;
}
.home-streaks {
  margin-top: 10px;
  padding: 0 18px;
}
.streaks-heading {
  align-items: flex-end;
  margin: 0 6px 8px;
}
.streaks-heading h2 { color: #fff5dc; }
.streaks-heading div p {
  font-size: 12.5px;
}
.streaks-heading div p span {
  font-size: 14px;
  font-weight: 850;
}
.home-streak-card {
  grid-template-columns: 72px minmax(0, 1fr) auto 18px;
  grid-template-rows: auto auto;
  min-height: 124px;
  padding: 18px 6px 16px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.home-streak-card.frequency-daily { --task-accent: var(--daily-accent); }
.home-streak-card.frequency-weekly { --task-accent: var(--weekly-accent); }
.home-streak-card.frequency-monthly { --task-accent: var(--monthly-accent); }
.home-streak-card.status-completed {
  border-color: rgba(255, 255, 255, .09);
  background: transparent;
  color: #fbfbff;
}
.home-streak-card.status-failed { --task-accent: #8d9ab0; opacity: .72; }
.home-streak-card:last-child { border-bottom: 0; }
.task-token {
  grid-row: 1 / 3;
  width: 54px;
  height: 54px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.task-token > span {
  position: relative;
  isolation: isolate;
  display: block;
  width: 52px;
  height: 52px;
}
.home-streak-card.status-completed .task-token > span {
  animation: task-token-spin var(--token-spin-duration, 22s) linear infinite;
}
.home-streak-card:not(.status-completed) .task-token > span {
  opacity: .5;
  animation: none;
}
.task-token-daily > span {
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 28%, rgba(255, 255, 255, .92) 0 9%, transparent 11%),
    radial-gradient(circle at 36% 32%, #fff4aa 0 18%, #ffc755 41%, #ef7c2f 69%, #743016 100%);
  box-shadow:
    inset -11px -13px 18px rgba(75, 21, 11, .55),
    inset 7px 7px 12px rgba(255, 255, 255, .22);
}
.task-token-daily > span::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 68% 52%, rgba(255, 199, 81, .45) 0 10%, transparent 12%),
    radial-gradient(circle at 42% 67%, rgba(190, 62, 30, .28) 0 14%, transparent 16%);
  opacity: .8;
}
.task-token-weekly > span {
  border-radius: 50%;
  background: url("/static/earth-globe.svg") center / 112% 112% no-repeat;
  box-shadow:
    0 0 18px rgba(77, 166, 255, .18),
    inset -12px -13px 18px rgba(3, 13, 33, .28),
    inset 7px 7px 13px rgba(255, 255, 255, .16);
}
.task-token-weekly > span::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 31% 24%, rgba(255, 255, 255, .62) 0 13%, rgba(255, 255, 255, .18) 24%, transparent 42%),
    radial-gradient(ellipse at 78% 74%, rgba(0, 0, 0, .36) 0 20%, transparent 58%),
    linear-gradient(132deg, rgba(255, 255, 255, .18), transparent 36%, rgba(0, 0, 0, .25) 78%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.task-token-weekly > span::after {
  content: "";
  position: absolute;
  inset: -24%;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(63, 162, 255, .28) 0 28%, rgba(63, 162, 255, .1) 45%, transparent 70%);
  filter: blur(5px);
  pointer-events: none;
}
.task-token-monthly > span {
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 27%, rgba(255, 255, 255, .86) 0 8%, transparent 10%),
    radial-gradient(circle at 33% 30%, #fff8d8 0 13%, #cfd6df 45%, #737d8f 76%, #2d3444 100%);
  box-shadow:
    inset -12px -13px 18px rgba(25, 31, 44, .58),
    inset 7px 7px 13px rgba(255, 255, 255, .2);
}
.task-token-monthly > span::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(93, 101, 116, .42);
  box-shadow:
    15px 5px 0 -2px rgba(93, 101, 116, .34),
    6px 19px 0 -1px rgba(93, 101, 116, .32),
    23px 24px 0 -3px rgba(255, 255, 255, .26);
}
.task-token-monthly > span::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(42, 49, 64, .24);
}
.planet-style-svg .task-token-daily > span {
  border-radius: 50%;
  background: url("/static/planet-sun.svg") center / cover no-repeat;
}
.planet-style-svg .task-token-daily > span::before,
.planet-style-svg .task-token-monthly > span::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 31% 24%, rgba(255, 255, 255, .6) 0 13%, rgba(255, 255, 255, .16) 24%, transparent 42%),
    radial-gradient(ellipse at 78% 74%, rgba(0, 0, 0, .32) 0 20%, transparent 58%);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: .78;
}
.planet-style-svg .task-token-weekly > span {
  background: url("/static/planet-earth.svg") center / 112% 112% no-repeat;
}
.planet-style-svg .task-token-monthly > span {
  border-radius: 50%;
  background: url("/static/planet-moon.svg") center / 112% 112% no-repeat;
}
.planet-style-svg .task-token-monthly > span::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(210, 219, 232, .22) 0 28%, rgba(210, 219, 232, .08) 45%, transparent 70%);
  filter: blur(5px);
  pointer-events: none;
}
.home-task-copy {
  align-self: end;
  padding-bottom: 6px;
}
.home-task-copy strong {
  color: #f8fafc;
  font-size: 20px;
  letter-spacing: -.02em;
}
.home-task-copy small { display: none; }
.home-streak-count {
  align-self: end;
  justify-self: start;
  padding-bottom: 6px;
}
.home-streak-count b {
  color: color-mix(in srgb, var(--task-accent) 80%, #ffffff);
  font-size: 22px;
}
.home-history {
  grid-column: 2 / 4;
  grid-row: 2;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-self: start;
  justify-self: stretch;
  min-width: 0;
  margin-top: 8px;
}
.home-history.history-daily,
.home-history.history-weekly,
.home-history.history-monthly {
  grid-template-columns: none;
  grid-template-rows: none;
  grid-auto-flow: unset;
}
.home-history.history-daily {
  display: grid;
  grid-template-columns: repeat(15, minmax(4px, 1fr));
  grid-template-rows: repeat(2, 7px);
  grid-auto-flow: row;
  gap: 5px 4px;
  max-width: none;
}
.home-history i {
  flex: 1 1 0;
  min-width: 4px;
  height: 11px;
  border-radius: 999px;
  background: rgba(115, 126, 148, .28);
}
.home-history.history-daily i {
  width: 100%;
  height: 7px;
}
.home-history.history-weekly i,
.home-history.history-monthly i {
  max-width: 18px;
}
.home-history .history-missed { background: rgba(84, 93, 111, .5); }
.home-history .history-inactive { opacity: .42; }
.home-history .history-done {
  background: color-mix(in srgb, var(--task-accent) 80%, #ffffff);
  box-shadow: 0 0 10px color-mix(in srgb, var(--task-accent) 48%, transparent);
}
.home-history .history-current {
  border: 1px solid color-mix(in srgb, var(--task-accent) 82%, #ffffff);
  background: rgba(255, 255, 255, .06);
}
.home-history .history-failed {
  background: rgba(148, 163, 184, .46);
}
.card-chevron {
  grid-column: 4;
  grid-row: 1 / 3;
  align-self: center;
}
.reward-settings-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(105, 126, 170, .14);
  color: #c7d3ec;
}
.reward-settings-form label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.reward-settings-form span {
  min-height: auto;
  padding: 0;
  background: none;
  color: inherit;
  font-size: 11px;
}
.reward-settings-form input {
  width: 46px;
  min-height: 24px;
  padding: 0 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #eef5ff;
  font-size: 12px;
  font-weight: 820;
  text-align: center;
}
.reward-settings-status {
  max-width: 118px;
  color: rgba(199, 211, 236, .78);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
}
.reward-settings-form.is-saving { opacity: .62; }
.reward-settings-form.is-error { background: rgba(255, 77, 85, .18); color: #ffd1d3; }
@keyframes task-token-spin { to { transform: rotate(360deg); } }

@keyframes vault-arrive { from { opacity: 0; transform: translateY(20px) rotate(-7deg) scale(.94); } }
@keyframes vault-glow { 50% { opacity: .62; transform: translate(-50%, -50%) scale(1.08); } }
@keyframes orb-float { 50% { transform: translateY(-8px) rotate(-4deg) scale(1.015); } }
@keyframes coin-fall { to { transform: translate3d(var(--drift), 110dvh, 0) rotate(900deg); opacity: .15; } }

@media (min-width: 560px) {
  body:has(.reward-home) main { width: 430px; }
  .pool-summary button { grid-column: 3; }
}

@media (max-width: 370px) {
  body:has(.reward-home) main { padding-left: 0; padding-right: 0; }
  .reward-home-header, .home-streaks { padding-left: 12px; padding-right: 12px; }
  .reward-pool-hero { min-height: 608px; }
  .vault-stage { height: 520px; margin-left: 0; margin-right: 0; }
  .pool-balance { left: 18px; top: 32px; width: min(330px, calc(100% - 36px)); }
  .home-streak-card { grid-template-columns: 62px minmax(0, 1fr) auto 16px; }
  .task-token, .task-token > span { width: 46px; height: 46px; }
  .home-history { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .reward-orb-art, .vault-glow, .celebration-coin, .task-token > span { animation: none; }
  .reward-loader span, .shortcut-loading span { animation: none; }
  .redeem-modal, .redeem-sheet, .reward-toast { transition: none; }
  .task-create-dialog[open] { animation: none; }
}

.family-admin-screen { max-width: 680px; }
.family-kicker {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.family-invite-panel {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(142, 224, 0, .22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 4%, rgba(142, 224, 0, .16), transparent 13rem),
    linear-gradient(145deg, rgba(15, 25, 18, .96), rgba(8, 11, 10, .96));
}
.family-invite-heading { display: flex; gap: 16px; align-items: end; justify-content: space-between; }
.family-invite-heading h2, .family-invite-history h3 { margin: 0; }
.family-invite-heading p { max-width: 400px; margin: 7px 0 0; color: #9ca59a; font-size: 13px; line-height: 1.55; }
.family-invite-ready {
  display: grid;
  gap: 11px;
  padding: 15px;
  border: 1px solid rgba(142, 224, 0, .2);
  border-radius: 16px;
  background: rgba(142, 224, 0, .07);
}
.family-invite-ready > div:first-child { display: grid; gap: 3px; }
.family-invite-ready small, .family-invite-history small { color: #90998e; line-height: 1.4; }
.family-invite-ready code {
  padding: 11px;
  overflow-wrap: anywhere;
  border-radius: 11px;
  background: rgba(0, 0, 0, .34);
  color: #dfffc8;
  font-size: 11px;
}
.family-invite-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.family-invite-actions button, .family-invite-history button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #edf4e9;
  font-weight: 800;
}
.family-invite-ready [data-family-share-status] { min-height: 18px; margin: 0; color: #a7d98a; font-size: 12px; }
.family-invite-history { display: grid; gap: 8px; }
.family-invite-history h3 { font-size: 14px; }
.family-invite-history article { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.08); }
.family-invite-history article > div { display: grid; gap: 3px; }
.family-invite-history button { min-height: 34px; padding: 0 12px; color: #ffc2c2; font-size: 12px; }
.family-activation {
  display: grid;
  gap: 13px;
  margin-top: 20px;
  padding: 20px;
  border: 1px solid rgba(142, 224, 0, .22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 8%, rgba(88, 204, 2, .14), transparent 12rem),
    rgba(255, 255, 255, .055);
}
.family-activation > span { color: var(--accent-2); font-size: 12px; font-weight: 900; }
.family-activation h2 { margin: -5px 0 0; font-size: 22px; }
.family-activation ol { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.family-activation li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: start; }
.family-activation li strong { color: #efffe4; font-size: 13px; }
.family-activation li small { color: #959e90; font-size: 12px; line-height: 1.5; }
.family-activation > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.family-activation button,
.family-activation a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .065);
  color: #dfe5da;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.family-activation a { border-color: rgba(142, 224, 0, .28); color: #dcffc4; }
.family-create-form, .family-user-card {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
}
.family-user-list { display: grid; gap: 16px; }
.family-user-card h2 { margin: 0; }
.family-user-card h2 small { color: #8c98b8; font-size: 13px; font-weight: 600; }
.shortcut-endpoints { display: grid; gap: 8px; margin: 14px 0; }
.shortcut-endpoints code {
  overflow-wrap: anywhere;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.28);
  color: #d9f99d;
  font-size: 11px;
}

.family-join-screen {
  position: relative;
  display: grid;
  align-content: center;
  gap: 28px;
  width: min(520px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 46px 22px calc(34px + env(safe-area-inset-bottom));
  overflow: hidden;
}
body:has(.family-join-screen) { background: #030504; }
body:has(.family-join-screen) main { padding: 0; }
.family-join-screen::before {
  content: "";
  position: absolute;
  inset: -18% -45% auto;
  height: 55%;
  background: radial-gradient(circle, rgba(101, 188, 42, .15), rgba(37, 76, 25, .04) 34%, transparent 68%);
  pointer-events: none;
}
.family-join-orbit { position: relative; width: 136px; height: 136px; margin: 0 auto -5px; }
.family-join-orbit::before, .family-join-orbit::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(193, 255, 151, .18);
  border-radius: 50%;
  transform: rotate(-19deg) scaleY(.46);
}
.family-join-orbit::after { inset: -12px; transform: rotate(31deg) scaleY(.66); opacity: .48; }
.family-join-orbit span {
  position: absolute;
  inset: 43px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ebffdf, #8ee000 28%, #315f10 68%, #0e1709);
  box-shadow: 0 0 36px rgba(142, 224, 0, .34), inset -8px -9px 16px rgba(0,0,0,.42);
}
.family-join-orbit i { position: absolute; z-index: 1; width: 8px; height: 8px; border-radius: 50%; background: #dfffc9; box-shadow: 0 0 12px #8ee000; }
.family-join-orbit i:first-child { left: 8px; top: 68px; }
.family-join-orbit i:nth-child(2) { right: 13px; top: 25px; width: 5px; height: 5px; opacity: .7; }
.family-join-copy { position: relative; display: grid; gap: 10px; text-align: center; }
.family-join-copy h1, .family-join-state h1 { margin: 0; font-size: clamp(31px, 9vw, 44px); line-height: 1.04; letter-spacing: -.045em; }
.family-join-copy p, .family-join-state p { max-width: 410px; margin: 0 auto; color: #98a096; font-size: 14px; line-height: 1.65; }
.family-join-form {
  position: relative;
  display: grid;
  gap: 15px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 22px;
  background: rgba(13, 17, 14, .92);
  box-shadow: 0 24px 70px rgba(0,0,0,.34);
}
.family-join-form label { display: grid; gap: 7px; }
.family-join-form label > span { color: #dce4d8; font-size: 13px; font-weight: 800; }
.family-join-form label > small { color: #747c72; font-size: 11px; line-height: 1.45; }
.family-join-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 13px;
  background: rgba(255,255,255,.055);
  color: #f6faf2;
  font: inherit;
}
.family-join-form input:focus { outline: 2px solid rgba(142,224,0,.52); outline-offset: 1px; border-color: transparent; }
.family-join-error { margin: 0; padding: 10px 12px; border-radius: 11px; background: rgba(255,77,85,.12); color: #ffc6c9; font-size: 13px; }
.family-join-footnote { margin: -4px 0 0; color: #777f75; font-size: 11px; line-height: 1.45; text-align: center; }
.family-join-state { position: relative; display: grid; justify-items: center; gap: 15px; text-align: center; }
.family-state-orb { width: 72px; height: 72px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #687164, #242a22 55%, #090b09); box-shadow: 0 0 32px rgba(255,255,255,.07); }
.family-join-state .primary { margin-top: 8px; }
.first-day-welcome {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 17px 18px;
  border: 1px solid rgba(142, 224, 0, .2);
  border-radius: 18px;
  background: radial-gradient(circle at 94% 5%, rgba(142,224,0,.16), transparent 10rem), rgba(255,255,255,.045);
}
.first-day-welcome span { color: var(--accent-2); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.first-day-welcome h2 { margin: 0; font-size: 20px; }
.first-day-welcome p { margin: 0; color: #959e93; font-size: 12px; line-height: 1.55; }
.done-friendship-impact { display: grid; gap: 4px; max-width: 330px; margin: 4px auto 8px; padding: 13px 16px; border: 1px solid rgba(142,224,0,.22); border-radius: 15px; background: rgba(142,224,0,.08); text-align: center; }
.done-friendship-impact strong { color: #efffe4; font-size: 14px; }
.done-friendship-impact span { color: rgba(239,255,228,.66); font-size: 11px; line-height: 1.45; }
.done-friendship-impact a { margin-top: 3px; color: #b9ff88; font-size: 12px; font-weight: 800; }

@media (max-width: 520px) {
  .family-invite-heading { align-items: stretch; flex-direction: column; }
  .family-invite-heading form, .family-invite-heading button { width: 100%; }
  .family-join-screen { align-content: start; gap: 22px; padding-top: 34px; }
  .family-join-orbit { width: 112px; height: 112px; }
  .family-join-orbit span { inset: 34px; }
  .family-join-orbit i:first-child { top: 54px; }
}

@media (orientation: landscape) {
  .habit-screen {
    grid-template-columns: minmax(180px, 280px) minmax(260px, 1fr);
    text-align: left;
    align-items: center;
    width: min(860px, 100%);
    margin: 0 auto;
  }
  .task-actions, .habit-copy p { margin-left: 0; }
}

/* Family companionship follows the existing dark solar-system palette. */
.family-today{margin:24px 0 28px;padding:20px;border:1px solid rgba(255,255,255,.1);border-radius:24px;background:rgba(255,255,255,.025)}
.family-today-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.family-today-heading h2{margin:0;font-size:18px}.family-today-heading p{margin:5px 0 0;color:#a5aaa3;font-size:12px}
.family-today-heading>a,.family-today-empty>a{color:#c6e4a4;font-size:13px;text-decoration:none;white-space:nowrap}
.family-today-person{padding:15px 0}.family-today-person+.family-today-person{border-top:1px solid rgba(255,255,255,.08)}
.family-person-status{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none;min-width:0}
.family-avatar{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:50%;background:radial-gradient(circle at 30% 25%,#d6dabb,#65785a 70%);color:#122015;font-weight:700}
.family-person-status>span:nth-child(2){min-width:0;flex:1}.family-person-status strong{display:block;overflow-wrap:anywhere;font-size:15px}.family-person-status small{display:block;margin-top:4px;color:#a5aaa3;font-size:12px}
.family-shared-mark{font-size:11px;color:#c6e4a4;flex:none}.family-signal{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:12px;min-width:0}
.family-received{flex-basis:100%;margin:0;color:#e2d1b3;font-size:13px;line-height:1.7;overflow-wrap:anywhere}.family-received>span{margin-right:4px}
.family-signal form{margin:0}.family-signal button,.family-today-empty button{min-height:44px;padding:9px 16px;border:1px solid rgba(198,228,164,.3);border-radius:24px;background:rgba(198,228,164,.08);color:#dcecc8;font:inherit;font-size:13px;cursor:pointer}
.family-signal button:disabled{opacity:.5;cursor:wait}.family-sent{color:#99a58f;font-size:12px}.family-today-empty p{color:#b6bab2;font-size:14px;line-height:1.7}
.family-refresh-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:14px;color:#b4b6af;font-size:12px}.family-refresh-controls button{min-height:44px;padding:6px 0;background:none;border:0;color:#aebaa1;font:inherit;cursor:pointer}
.family-refresh-controls button:focus-visible,.family-signal button:focus-visible{outline:2px solid #c6e4a4;outline-offset:4px}
.friendship-sky>.family-signal{position:relative;justify-content:center;padding:0 20px 20px;text-align:center}.friendship-shared-total{position:relative;text-align:center;font-size:13px;color:#bbc2b2;margin:8px 14px}
.family-celebration{color:#d4eeb7!important}.family-invite-link{display:inline-block;color:#d4eeb7;padding:14px}.friendship-universe>.family-refresh-controls{padding:0 24px 16px}
.settings-account{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:16px 0 24px}.settings-account p{min-width:0;margin:0}.settings-account strong,.settings-account span{display:block;overflow-wrap:anywhere}.settings-account span{color:#9ca69a;font-size:13px;margin-top:4px}.settings-account form{flex:none}
@media(max-width:420px){.family-today{padding:16px}.family-today-heading{align-items:flex-start}.family-shared-mark{font-size:10px}}
.reward-recovery-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}.reward-recovery-actions a,.reward-recovery-actions button{display:inline-flex;align-items:center;min-height:44px;padding:10px 16px;border:1px solid #414a37;border-radius:24px;background:#172014;color:#dcecc8;text-decoration:none;font:inherit;font-size:14px;cursor:pointer}.reward-recovery-actions button[hidden]{display:none}.reward-loader .reward-credit{margin:8px 0;color:#dcecc8;font-size:14px}.done-card .reward-credit{color:#dcecc8}.done-friendship-impact{overflow-wrap:anywhere}

/* Hidden loader details must not reserve space or inherit link display styles. */
.reward-loader [hidden] { display: none !important; }

.task-stat-grid-member{grid-template-columns:repeat(3,minmax(0,1fr))}
.member-result{min-height:80dvh;display:grid;place-items:center;align-content:center;gap:18px;padding:24px;text-align:center;overflow-wrap:anywhere}
.member-result h1,.member-result p{margin:0}

.account-form{margin:20px 0;padding:16px;border:1px solid #ffffff24;border-radius:16px}.account-form label{display:grid;gap:8px}.account-form summary{cursor:pointer}.account-form details,.account-form form{margin-top:14px}
