.product-shell .brand-logo {
  width: 185px;
  max-width: 100%;
  height: auto;
  mix-blend-mode: screen;
}

/* Daily actions and visible progress share the home, with detail one step away. */
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 1fr);
  gap: 24px;
  align-items: start;
}
.home-daily,
.home-journey {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.home-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  color: var(--muted);
  font-size: 0.85rem;
}
.home-summary > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.home-summary svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.home-summary .text-button {
  margin-left: auto;
}
.character-restored {
  display: flex;
  gap: 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.character-crest {
  flex: 0 0 84px;
  width: 84px;
  height: 94px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 32% 32% 48% 48%;
  background: var(--accent-soft);
}
.character-crest svg {
  width: 55px;
  height: 55px;
}
.character-identity {
  flex: 1;
  min-width: 0;
}
.character-identity h2 {
  margin: 4px 0 !important;
}
.character-identity .progress-track {
  margin: 12px 0 6px;
  max-width: 440px;
}
.character-level {
  flex: 0 0 auto;
  display: grid;
  text-align: center;
  color: var(--accent);
}
.character-level span {
  font-size: 0.65rem;
  letter-spacing: 0.13em;
}
.character-level strong {
  font-size: 3.8rem;
  line-height: 1.1;
}
.mission-next {
  display: grid;
  gap: 4px;
  margin: 16px 0;
}
.wheel-panel {
  min-width: 0;
}
.segmented {
  display: flex;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 10px;
  gap: 3px;
}
.segmented button {
  flex: 1;
  padding: 8px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  cursor: pointer;
}
.segmented button[aria-pressed="true"] {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 4px #0002;
}
.attribute-wheel {
  display: block;
  width: 100%;
  max-width: 460px;
  margin: 4px auto 0;
  overflow: visible;
}
.wheel-grid {
  fill: none;
  stroke: var(--line-soft);
  stroke-width: 1;
}
.wheel-fill {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
}
.wheel-dot {
  fill: var(--accent);
}
.wheel-label {
  fill: var(--muted);
  font-size: 11px;
  dominant-baseline: middle;
}
.wheel-scale {
  font-size: 0.7rem;
  text-align: center;
  margin: 0 0 16px;
}
.wheel-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.wheel-value {
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: left;
  padding: 10px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 5px;
  min-width: 0;
}
.wheel-value:hover {
  border-color: var(--area-color);
}
.wheel-value span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  color: var(--area-color);
}
.wheel-value svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.wheel-value strong {
  font-size: 1rem;
}
.wheel-value small {
  font-weight: 400;
  font-size: 0.65rem;
  color: var(--muted);
}
.incentive-panel .field {
  margin: 16px 0;
}
.incentive-coin {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 12px;
  font-size: 0.8rem;
  color: var(--muted);
}
.incentive-coin svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}
.incentive-coin strong {
  color: var(--text);
  font-size: 1.9rem;
}
.habit-history {
  font-size: 0.7rem;
  padding: 6px !important;
}
.home-daily .habit-product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.home-daily .habit-unit {
  min-width: 0;
}
.home-daily .habit-main strong {
  overflow-wrap: anywhere;
}
.home-daily .day-intro h2 {
  font-size: 1.9rem;
}
.home-daily .daily-reflections {
  flex-wrap: wrap;
}
.home-daily .daily-reflections button {
  white-space: normal;
}
.task-yield {
  white-space: nowrap;
  color: var(--accent);
}
.annual-panel {
  min-width: 0;
}
.calendar-year {
  display: grid;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--muted);
}
.calendar-year select {
  max-width: 160px;
  padding: 8px;
}
.annual-scroll {
  overflow-x: auto;
  padding: 8px 0 12px;
  scrollbar-width: thin;
}
.annual-chart {
  --cell: 12px;
  --gap: 3px;
  width: max-content;
  display: grid;
  grid-template-columns: 16px auto;
  grid-template-rows: 20px auto;
  gap: 4px 7px;
}
.annual-months {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(var(--weeks), var(--cell));
  gap: var(--gap);
  font-size: 9px;
  color: var(--muted);
}
.annual-months span {
  white-space: nowrap;
}
.annual-days {
  grid-row: 2;
  display: grid;
  grid-template-rows: repeat(7, var(--cell));
  gap: var(--gap);
  font-size: 9px;
  color: var(--muted);
  line-height: var(--cell);
}
.annual-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, var(--cell));
  grid-template-columns: repeat(var(--weeks), var(--cell));
  gap: var(--gap);
}
.annual-cell {
  display: block;
  width: 12px;
  height: 12px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: var(--surface-2);
  cursor: pointer;
}
.habit-calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.habit-calendar-toolbar .segmented {
  min-width: 260px;
  max-width: 100%;
}
.habit-calendar-toolbar p {
  font-size: 0.8rem;
}
.habit-management {
  min-width: 0;
}
.habit-management > .annual-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 12px 0 !important;
}
.habit-management > .annual-panel .eyebrow {
  display: none;
}
.habit-management > .annual-panel h3 {
  font-size: 0.85rem;
}
.week-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}
.habit-week {
  margin: 20px 0;
}
.habit-week > p {
  font-size: 0.78rem;
}
.habit-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.habit-week-day {
  min-width: 0;
}
.week-check {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  min-height: 100px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  padding: 12px 4px;
  cursor: pointer;
}
.week-check > span {
  font-size: 0.78rem;
  color: var(--muted);
}
.week-check > span:last-child {
  font-size: 1.15rem;
}
.week-check.is-rest {
  border-style: dashed;
}
.week-check.is-done {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.week-check.is-done > span {
  color: var(--accent);
}
.week-check.is-minimum {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}
.week-check:disabled {
  opacity: 0.4;
  cursor: default;
}
.week-minimum {
  width: 100%;
  min-height: 36px;
  padding: 6px 0;
  font-size: 0.65rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.habit-week > small {
  display: block;
  font-size: 0.7rem;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .habit-week-grid {
    gap: 4px;
  }
  .week-check {
    min-height: 82px;
    border-radius: 7px;
  }
  .week-minimum {
    font-size: 0.55rem;
    overflow-wrap: anywhere;
  }
  .habit-calendar-toolbar .segmented {
    min-width: 0;
    width: 100%;
  }
}
.annual-cell[data-intensity="1"] {
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
}
.annual-cell[data-intensity="2"] {
  background: color-mix(in srgb, var(--accent) 44%, var(--surface));
}
.annual-cell[data-intensity="3"] {
  background: color-mix(in srgb, var(--accent) 70%, var(--surface));
}
.annual-cell[data-intensity="4"] {
  background: var(--accent);
}
.annual-cell.rest {
  border-style: dashed;
  opacity: 0.5;
}
.annual-cell.outside {
  visibility: hidden;
}
.annual-cell:hover,
.annual-cell:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}
.annual-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.68rem;
}
.annual-legend i {
  cursor: default;
}
.reward-preview {
  padding: 14px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 10px;
  margin: 14px 0;
  font-size: 0.83rem;
}
.reward-preview p {
  line-height: 1.7;
  margin: 6px 0;
}
.reward-preview small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}
.attribute-picker > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.attribute-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  padding: 9px;
  background: var(--surface-2);
  border-radius: 8px;
  cursor: pointer;
}
.attribute-picker svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.attribute-picker input {
  width: auto;
}
.attribute-sources > div,
.day-action {
  display: grid;
  gap: 7px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.attribute-sources span,
.day-action small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}
.habit-contribution {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}
.achievement-symbol svg {
  width: 32px;
  height: 32px;
}
.cosmetic-orb svg {
  width: 48px;
  height: 48px;
}
#dialog-content .annual-panel {
  padding: 16px;
  margin: 16px 0;
}
#toast {
  max-width: min(600px, calc(100vw - 32px));
  line-height: 1.6;
}
@media (min-width: 1100px) {
  .product-workspace {
    max-width: 1450px;
  }
}
@media (max-width: 1100px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-journey {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .home-daily .habit-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .home-journey {
    display: contents;
  }
  .home-layout > .home-daily {
    grid-row: 2;
  }
  .home-journey > .home-check-in {
    grid-row: 1;
  }
  .home-daily .habit-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .character-restored {
    gap: 12px;
    flex-wrap: wrap;
  }
  .character-crest {
    flex-basis: 50px;
    width: 50px;
    height: 60px;
  }
  .character-crest svg {
    width: 35px;
    height: 35px;
  }
  .character-level strong {
    font-size: 2.2rem;
  }
  .character-identity .eyebrow {
    font-size: 0.6rem;
  }
  .character-identity p {
    font-size: 0.78rem;
  }
  .character-identity h2 {
    font-size: 1.5rem !important;
  }
  .character-identity small {
    font-size: 0.66rem;
  }
  .home-summary {
    gap: 10px;
    font-size: 0.75rem;
  }
  .home-summary .text-button {
    margin-left: 0;
  }
  .annual-panel > .section-heading {
    flex-wrap: wrap;
  }
}
.product-shell .sidebar {
  --sidebar-bg: #080809;
  --text: #f7f6f2;
  --muted: #aaa9b0;
  --surface-2: #242428;
  --line-soft: rgba(255, 255, 255, 0.09);
  color: var(--text);
  background: var(--sidebar-bg);
  isolation: isolate;
}
.product-shell .sidebar .brand {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.product-shell .sidebar .nav-item.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.product-shell .sidebar nav {
  display: grid;
  gap: 6px;
  margin-top: 28px;
}
.sidebar-bottom {
  margin-top: auto;
}
.product-workspace {
  padding: 0 42px 24px;
  max-width: 1250px;
  width: 100%;
  margin: auto;
}
.product-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.78rem;
  color: var(--muted);
}
#sync-status {
  margin-left: auto;
}
.product-content {
  display: grid;
  gap: 24px;
  padding-top: 30px;
}
.product-content h2 {
  font-size: 1.9rem;
  letter-spacing: -0.055em;
  margin: 8px 0 12px;
}
.product-content h3 {
  margin: 0 0 10px;
}
.product-content .panel {
  padding: 24px;
}
.day-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.day-intro h2 {
  font-size: 2.5rem;
}
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}
.section-heading {
  gap: 16px;
}
.section-heading p {
  margin: 5px 0 0;
}
.habit-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.habit-unit {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}
.habit-unit.done {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.habit-main {
  background: none;
  border: 0;
  color: var(--text);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 6px;
  min-height: 110px;
}
.habit-main strong {
  font-size: 0.9rem;
}
.habit-unit small {
  font-size: 0.72rem;
  color: var(--muted);
}
.habit-symbol {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--accent);
  font-size: 1.6rem;
}
.habit-symbol svg {
  width: 28px;
  height: 28px;
}
.minimum-button {
  background: none;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  border-radius: 8px;
  padding: 7px;
  font-size: 0.75rem;
}
.minimum-button:hover {
  border-color: var(--accent);
  color: var(--text);
}
.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  min-width: 0;
}
.task-row > span {
  flex: 1;
  overflow-wrap: anywhere;
}
.task-row small {
  color: var(--muted);
}
.task-check {
  border: 1px solid var(--line);
  color: var(--accent);
  background: var(--bg-soft);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  flex: none;
}
.completed-text {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  color: var(--muted);
}
.task-row.is-completed .task-check {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.task-row.is-completed .task-yield {
  color: var(--accent);
}
.text-button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 8px;
  cursor: pointer;
  font-size: 0.8rem;
}
.text-button:hover {
  color: var(--accent);
}
.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 16px 0 0;
}
.daily-reflections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.daily-reflections button {
  padding: 18px;
  text-align: left;
  background: var(--surface);
}
.mission-product .progress-track {
  margin: 16px 0;
}
.milestones {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}
.milestones .reached {
  color: var(--accent);
}
blockquote {
  border-left: 2px solid var(--accent);
  padding: 6px 18px;
  margin: 18px 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
blockquote small {
  display: block;
  color: var(--muted);
}
.challenge,
.daily-evidence {
  background: var(--bg-soft);
  padding: 18px;
  border-radius: 12px;
  margin: 16px 0;
}
.empty-note {
  color: var(--muted);
  line-height: 1.6;
  padding: 16px 0;
}
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 40px;
}
.journal-list {
  display: grid;
  gap: 16px;
}
.character-product {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  align-items: center;
}
.character-sun {
  font-size: 5rem;
  color: var(--accent);
  text-align: center;
}
.product-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.product-stats article {
  display: grid;
  gap: 5px;
}
.product-stats strong {
  font-size: 2rem;
  font-weight: 500;
}
.product-stats span {
  font-size: 0.8rem;
  color: var(--muted);
}
.area-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.area-bars > div {
  display: grid;
  grid-template-columns: 90px 1fr 55px;
  gap: 12px;
  align-items: center;
  font-size: 0.75rem;
}
.achievement-grid,
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.achievement-card {
  padding: 20px;
  min-height: 150px;
}
.achievement-filters {
  margin: 0 0 18px;
  max-width: 440px;
}
.achievements-back {
  justify-self: start;
}
.achievements-preview {
  scroll-margin-top: 20px;
}
.achievement-card.is-earned {
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line-soft));
  background: linear-gradient(135deg, var(--accent-soft), var(--surface));
}
.achievement-state {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 650;
  margin: 0 0 6px;
}
.matrix-product .matrix-column {
  min-width: 0;
}
.matrix-product .task-row {
  grid-template-columns: 30px minmax(0, 1fr) auto;
}
.matrix-product .task-yield {
  display: none;
}
@media (max-width: 760px) {
  .product-content .matrix-product {
    grid-template-columns: minmax(0, 1fr);
  }
}
.achievement-symbol {
  color: var(--accent);
  font-size: 2rem;
}
.achievement-card.is-locked {
  opacity: 1;
  background: var(--bg-soft);
}
.achievement-card.is-locked .achievement-symbol {
  color: var(--muted);
}
.achievement-card h3 {
  font-size: 1rem;
  margin: 10px 0;
}
.achievement-card p,
.achievement-card small {
  font-size: 0.8rem;
  color: var(--muted);
}
.cosmetic-orb {
  font-size: 3rem;
  color: var(--accent);
  padding: 8px;
}
.cosmetic-0,
.cosmetic-6 {
  background: radial-gradient(
    at top left,
    var(--accent-soft),
    var(--surface)
  ) !important;
}
.cosmetic-1,
.cosmetic-7 {
  background: radial-gradient(
    at top left,
    #4e769b40,
    var(--surface)
  ) !important;
}
.cosmetic-2,
.cosmetic-8 {
  background: radial-gradient(
    at top left,
    #9667a640,
    var(--surface)
  ) !important;
}
.cosmetic-3,
.cosmetic-9 {
  background: radial-gradient(
    at top left,
    #58916940,
    var(--surface)
  ) !important;
}
.cosmetic-4,
.cosmetic-10 {
  background: radial-gradient(
    at top left,
    #dc817440,
    var(--surface)
  ) !important;
}
.cosmetic-5,
.cosmetic-11 {
  background: radial-gradient(
    at top left,
    #c0aa7440,
    var(--surface)
  ) !important;
}
.more-grid,
.matrix-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.more-card {
  text-align: left;
  color: var(--text);
  min-height: 125px;
}
.notice {
  padding: 16px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  margin-top: 18px;
  font-size: 0.9rem;
}
.sync-retry {
  text-align: right;
}
.product-nav {
  display: none;
}
.auth-page {
  /* The entry screen uses the original white/gold logo on a continuous dark surface. */
  color-scheme: dark;
  --bg: #101011;
  --surface: #1b1b1e;
  --input-bg: #141416;
  --text: #f7f6f2;
  --muted: #aaa9b0;
  --muted-2: #87868f;
  --line: #3b3b41;
  --line-soft: rgba(255, 255, 255, 0.09);
  --accent: #fbb62e;
  --on-accent: #241a06;
  width: 100%;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  scroll-padding-block: 24px;
  padding: 24px 20px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  color: var(--text);
  background:
    radial-gradient(ellipse at top, #fbb62e08, transparent 60%), var(--bg);
  isolation: isolate;
}
body:has(.auth-page) {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
  background: #101011;
}
.auth-brand {
  display: block;
  flex: none;
  width: min(220px, 100%);
  max-width: 100%;
  margin: 0 auto 24px;
  line-height: 0;
  mix-blend-mode: screen;
}
.auth-brand img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}
.auth-card {
  flex: none;
  width: 100%;
  max-width: 460px;
  min-width: 0;
  /* Auto margins center the panel only when it fits; a tall panel starts at the top. */
  margin-block: auto;
  padding: 32px;
}
.auth-card h1 {
  font-size: 2rem;
  letter-spacing: -0.045em;
  line-height: 1.15;
  margin: 12px 0;
}
.auth-card form,
#dialog form {
  display: grid;
  gap: 18px;
}
.auth-card form {
  min-width: 0;
  width: 100%;
  margin-top: 28px;
}
.auth-card .field,
.auth-card .field input {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.auth-card .primary-button {
  background: #fbb62e;
  color: #241a06;
}
.auth-card .button-row {
  align-items: stretch;
}
.auth-card .text-button {
  white-space: normal;
  text-align: left;
}
#dialog {
  width: min(680px, calc(100% - 28px));
  max-height: 90dvh;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px;
  overflow: auto;
}
#dialog::backdrop {
  background: #0009;
  backdrop-filter: blur(4px);
}
#dialog h2 {
  letter-spacing: -0.035em;
  margin-top: 0;
}
#dialog-content {
  padding-top: 16px;
}
.field input,
.field select,
.field textarea {
  max-width: 100%;
  min-width: 0;
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px;
  color: var(--text);
}
.field textarea {
  resize: vertical;
  line-height: 1.5;
}
input[type="checkbox"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}
fieldset.field {
  border: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.weekdays {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.weekdays label {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.priority-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
details {
  border-top: 1px solid var(--line-soft);
  padding: 14px 0;
}
details summary {
  cursor: pointer;
  color: var(--muted);
  padding: 6px 0;
}
details[open] > .field {
  margin-top: 18px;
}
.product-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 10000;
  background: var(--text);
  color: var(--bg);
  padding: 14px 22px;
  border-radius: 12px;
  max-width: calc(100% - 28px);
  box-shadow: var(--shadow);
}
.celebration {
  position: fixed;
  right: 24px;
  bottom: 30px;
  background: var(--surface);
  border: 1px solid var(--accent);
  padding: 24px;
  border-radius: 16px;
  z-index: 1000;
  max-width: 360px;
}
.celebration small {
  color: var(--muted);
}
.conflict-versions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.conflict-versions pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}
.admin-user {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button {
  min-height: 36px;
}
#dialog .dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
}
h2,
h3,
p {
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
  .product-workspace {
    padding: 0 24px 24px;
  }
  .area-bars {
    grid-template-columns: 1fr;
  }
  .achievement-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 800px) {
  .product-shell {
    display: block;
  }
  .product-shell .sidebar {
    display: none;
  }
  .product-workspace {
    padding: 0 18px 90px;
  }
  .product-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    padding: 8px 4px max(8px, env(safe-area-inset-bottom));
    background: var(--sidebar-bg);
    border-top: 1px solid var(--line);
    z-index: 50;
  }
  .product-nav .nav-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    padding: 7px 2px;
    font-size: 0.67rem;
    border: 0;
    background: none;
    min-width: 0;
  }
  .product-nav .nav-item span {
    width: 22px;
    height: 22px;
  }
  .product-nav .nav-item svg {
    width: 22px;
    height: 22px;
  }
  .product-nav .active {
    color: var(--accent);
  }
  .product-header {
    padding: 16px 0;
    font-size: 0.68rem;
    gap: 8px;
  }
  .product-content {
    padding-top: 24px;
    gap: 20px;
  }
  .day-intro h2 {
    font-size: 1.8rem;
  }
  .day-intro .primary-button {
    font-size: 0.78rem;
    padding: 10px 12px;
  }
  .product-content .panel {
    padding: 18px;
  }
  .habit-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .habit-unit {
    padding: 8px;
  }
  .habit-main {
    padding: 2px;
    min-height: 104px;
  }
  .habit-main strong {
    font-size: 0.75rem;
  }
  .habit-unit small {
    font-size: 0.65rem;
  }
  .minimum-button {
    font-size: 0.65rem;
    padding: 5px;
  }
  .daily-reflections {
    gap: 8px;
  }
  .daily-reflections button {
    padding: 14px;
    font-size: 0.8rem;
  }
  .product-content h2 {
    font-size: 1.7rem;
  }
  .character-product {
    grid-template-columns: 70px 1fr;
    gap: 14px;
  }
  .character-sun {
    font-size: 3.5rem;
  }
  .product-stats {
    gap: 8px;
  }
  .product-stats strong {
    font-size: 1.5rem;
  }
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .achievement-grid {
    gap: 8px;
  }
  .achievement-card {
    padding: 14px;
  }
  .achievement-card h3 {
    font-size: 0.9rem;
  }
  .more-grid,
  .matrix-product {
    gap: 10px;
  }
  .more-card h3 {
    font-size: 1rem;
  }
  .more-card span {
    font-size: 0.8rem;
  }
  .product-footer {
    font-size: 0.68rem;
  }
  .product-toast {
    bottom: 90px;
  }
  .celebration {
    bottom: 90px;
    left: 16px;
    right: 16px;
    max-width: none;
  }
  #dialog {
    padding: 24px;
  }
  .task-row {
    gap: 8px;
    font-size: 0.85rem;
  }
  .task-row .text-button {
    font-size: 0.7rem;
    padding: 5px;
  }
  .product-stats article {
    padding: 12px !important;
  }
  .conflict-versions {
    grid-template-columns: 1fr;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .auth-page {
    padding-inline: 16px;
  }
  .auth-card {
    padding: 24px;
  }
}
@media (max-width: 360px) {
  .habit-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-workspace {
    padding-left: 12px;
    padding-right: 12px;
  }
  .daily-reflections,
  .more-grid {
    grid-template-columns: 1fr;
  }
  .milestones {
    gap: 8px;
    font-size: 0.7rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.next-action {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 0;
}
.next-action strong {
  flex: 1;
}
.activity-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}
.activity-week > div {
  display: grid;
  gap: 10px;
  text-align: center;
  padding: 16px 4px;
  background: var(--bg-soft);
  border-radius: 10px;
}
.activity-week strong {
  font-size: 1.4rem;
  color: var(--accent);
}
.activity-week span {
  font-size: 0.72rem;
  color: var(--muted);
}
.light-routine .minimum-button {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.failed-data {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.priority-habit {
  box-shadow: inset 0 3px var(--accent);
}

@media (max-height: 760px) {
  .auth-card {
    padding: 24px;
  }
  .auth-brand {
    width: min(180px, 100%);
    margin-bottom: 16px;
  }
  .auth-card h1 {
    font-size: 1.75rem;
  }
  .auth-card form {
    margin-top: 18px;
    gap: 14px;
  }
}

@media (max-height: 520px) {
  .auth-page {
    padding-block: 16px;
    scroll-padding-block: 16px;
  }
  .auth-card {
    padding: 18px;
  }
  .auth-brand {
    width: min(150px, 100%);
    margin-bottom: 12px;
  }
  .auth-card h1 {
    font-size: 1.5rem;
    margin-block: 8px;
  }
  .auth-card p {
    margin-block: 8px;
  }
  .auth-card form {
    margin-top: 14px;
    gap: 10px;
  }
  .auth-card .button-row {
    margin-top: 10px;
    gap: 4px;
  }
}
.day-progress-main {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 16px 0;
}
.day-ring {
  width: 108px;
  height: 108px;
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent, #ffba2d) var(--percent),
    var(--border, #333) 0
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
}
.day-ring:before {
  content: "";
  position: absolute;
  inset: 10px;
  background: var(--surface);
  border-radius: 50%;
  z-index: -1;
}
.day-ring strong {
  font-size: 27px;
}
.day-ring small {
  font-size: 12px;
}
.day-bars {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 14px;
}
.day-bars .section-heading {
  margin-bottom: 6px;
  font-size: 13px;
}
.streak-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.streak-pair > div {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  display: grid;
  gap: 4px;
}
.streak-pair strong {
  font-size: 21px;
}
.streak-pair span {
  font-size: 13px;
}
.day-progress > small {
  display: block;
  line-height: 1.5;
}
.diary-three,
.mood-picker {
  border: 0;
  padding: 0;
  margin: 24px 0;
  min-width: 0;
}
.diary-three legend,
.mood-picker legend {
  font-weight: 700;
  font-size: 16px;
}
.diary-three textarea {
  min-height: 60px;
}
.diary-three .field {
  margin-bottom: 8px;
}
.mood-scale {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  margin: 12px 0;
}
.mood-scale label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}
.mood-scale input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}
.mood-scale span {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  border-radius: 8px;
  background: hsl(var(--mood-hue) 65% 35%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid transparent;
}
.mood-scale input:checked + span {
  border-color: var(--text, #fff);
  box-shadow: 0 0 0 2px var(--accent, #ffba2d);
  transform: translateY(-3px);
}
.mood-scale input:focus-visible + span {
  outline: 3px solid var(--accent, #ffba2d);
  outline-offset: 3px;
}
.mood-chart {
  margin: 24px 0;
}
.mood-chart svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.mood-chart svg text {
  fill: currentColor;
  font-size: 12px;
}
.mood-grid {
  stroke: currentColor;
  opacity: 0.12;
}
.mood-line {
  stroke: var(--accent, #ffba2d);
  stroke-width: 2;
}
.mood-values {
  max-height: 260px;
  overflow: auto;
}
.mood-values p {
  display: flex;
  justify-content: space-between;
}
.someday-section {
  margin-top: 32px;
}
.someday-mission {
  border-style: dashed;
}
.mission-planning[hidden] {
  display: none;
}
.home-daily > .day-progress {
  margin-bottom: 20px;
}
@media (max-width: 420px) {
  .day-progress-main {
    gap: 12px;
  }
  .day-ring {
    width: 86px;
    height: 86px;
  }
  .day-ring strong {
    font-size: 23px;
  }
  .mood-scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }
  .mood-chart .section-heading {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mood-scale input:checked + span {
    transform: none;
  }
}
.home-daily .habit-hero {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 22px;
  padding: 26px;
  background:
    radial-gradient(
      ellipse at 95% 0%,
      color-mix(in srgb, var(--accent) 13%, transparent),
      transparent 60%
    ),
    var(--surface);
  box-shadow: 0 12px 38px #0000000a;
}
.habit-hero > .section-heading {
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.habit-hero h3 {
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  margin: 6px 0;
}
.habit-hero .eyebrow {
  color: var(--accent);
}
.habit-today-count {
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0;
}
.habit-today-count strong {
  font-size: 22px;
  color: var(--text);
}
.home-daily .habit-hero .habit-product-grid {
  gap: 14px;
}
.habit-hero .habit-unit {
  position: relative;
  text-align: left;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid
    color-mix(in srgb, hsl(var(--habit-hue) 65% 52%) 26%, var(--line));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, hsl(var(--habit-hue) 65% 52%) 8%, var(--surface)),
    var(--surface)
  );
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
.habit-hero .habit-unit:has(.habit-main:hover) {
  transform: translateY(-3px);
  border-color: hsl(var(--habit-hue) 65% 52%);
  box-shadow: 0 9px 20px #00000012;
}
.habit-hero .habit-main {
  justify-items: start;
  align-content: start;
  text-align: left;
  min-height: 140px;
  gap: 12px;
  padding: 2px;
  border-radius: 12px;
}
.habit-hero .habit-main strong {
  font-size: 1rem;
  line-height: 1.4;
}
.habit-hero .habit-symbol {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: color-mix(
    in srgb,
    hsl(var(--habit-hue) 65% 52%) 15%,
    transparent
  );
  color: hsl(var(--habit-hue) 60% 50%);
}
.habit-hero .habit-symbol svg {
  width: 28px;
  height: 28px;
}
.habit-hero .habit-unit.done {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 19%, var(--surface)),
    var(--surface)
  );
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
.habit-hero .done .habit-symbol {
  background: var(--accent);
  color: #211600;
}
.habit-hero .done .habit-main small {
  color: var(--text);
  font-weight: 700;
}
.habit-hero .habit-history {
  font-size: 11px;
  text-align: left;
  padding: 4px 0;
}
.habit-week-trail {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}
.habit-week-trail span {
  display: grid;
  place-items: center;
  flex: 1;
  aspect-ratio: 1;
  max-width: 24px;
  border-radius: 5px;
  background: var(--surface-2);
  font-size: 11px;
  color: var(--muted);
}
.habit-week-trail span.marked {
  background: var(--accent);
  color: #211600;
}
.habit-week-trail span.rest {
  background: transparent;
  border: 1px dashed var(--line-soft);
}
.day-progress-main {
  margin: 10px 0;
  gap: 18px;
}
.day-ring {
  width: 84px;
  height: 84px;
}
.day-ring strong {
  font-size: 23px;
}
.day-progress .streak-pair {
  margin-top: 12px;
}
.day-progress > small {
  font-size: 11px;
}
.day-progress .eyebrow {
  margin-top: 0;
}
.day-progress-main .progress-track {
  height: 6px;
}
@media (max-width: 600px) {
  .home-daily .habit-hero {
    padding: 18px;
  }
  .home-daily .habit-hero .habit-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .habit-hero .habit-unit {
    padding: 12px;
  }
  .habit-hero .habit-main strong {
    font-size: 0.9rem;
  }
  .habit-hero .habit-main {
    min-height: 132px;
  }
  .habit-hero .section-heading > .text-button {
    padding-left: 0;
  }
  .habit-week-trail {
    gap: 3px;
  }
  .habit-week-trail span {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .habit-hero .habit-unit {
    transition: none;
  }
  .habit-hero .habit-unit:has(.habit-main:hover) {
    transform: none;
  }
}
.habit-hero .habit-main {
  justify-items: center;
  align-content: center;
  text-align: center;
  min-height: 154px;
  gap: 16px;
}
.habit-hero .habit-main strong {
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 750;
}
.habit-hero .habit-symbol {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 19px;
}
.habit-hero .habit-symbol svg {
  width: 34px;
  height: 34px;
}
.habit-tick {
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 14px;
  background: var(--accent);
  color: #211600;
  border: 2px solid var(--surface);
}
.habit-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 0 4px;
}
.habit-card-footer .habit-history {
  min-height: 28px;
  padding: 2px 8px !important;
  font-size: 16px;
}
.habit-hero .rest-day:not(.done) {
  border-style: dashed;
}
.habit-hero .habit-main:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.habit-hero .done .habit-symbol {
  color: #211600;
}
@media (max-width: 600px) {
  .habit-hero .habit-main {
    min-height: 140px;
    gap: 14px;
  }
  .habit-hero .habit-main strong {
    font-size: 1rem;
  }
  .habit-hero .habit-symbol {
    width: 54px;
    height: 54px;
  }
}
form[data-form="diary"] .diary-session {
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  margin: 24px 0;
  background: var(--surface);
}
form[data-form="diary"] .diary-morning {
  border-top: 4px solid #e8ad35;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, #e8ad35 7%, var(--surface)),
    var(--surface)
  );
}
form[data-form="diary"] .diary-evening {
  border-top: 4px solid #8d93e8;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, #8d93e8 8%, var(--surface)),
    var(--surface)
  );
}
.diary-session > header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.diary-session > header > span {
  font-size: 30px;
  line-height: 1;
  color: #d59a23;
}
.diary-evening > header > span {
  color: #8d93e8;
}
form[data-form="diary"] .diary-session h3 {
  font-size: 1.3rem;
  margin: 0;
  display: grid;
  gap: 5px;
}
.diary-session h3 small {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}
form[data-form="diary"] .diary-question {
  gap: 9px;
  margin: 22px 0;
}
form[data-form="diary"] .diary-question > span {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
}
form[data-form="diary"] .diary-question > small {
  font-size: 0.85rem;
  line-height: 1.6;
  font-weight: 400;
}
.diary-question textarea {
  line-height: 1.65;
}
@media (max-width: 420px) {
  form[data-form="diary"] .diary-session {
    padding: 16px;
  }
  .diary-session > header {
    gap: 10px;
  }
}
.home-journey .mood-chart {
  margin: 0;
}
.home-journey .mood-chart > .section-heading {
  flex-wrap: wrap;
  gap: 14px;
}
.home-journey .mood-chart .segmented {
  width: 100%;
}
.habit-heading-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.habit-heading-actions .primary-button {
  white-space: nowrap;
}
.habit-heading-actions .text-button {
  font-size: 0.75rem;
  padding: 5px 0;
}
@media (max-width: 420px) {
  .habit-heading-actions {
    align-items: flex-start;
  }
}
.habit-heading-actions .add-habit-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 27px;
  line-height: 1;
  border-radius: 12px;
}
.habit-heading-actions {
  flex-direction: row-reverse;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.habit-heading-actions .add-habit-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
}
.habit-heading-actions .easy-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.easy-mode-button > svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: var(--accent);
}
.easy-mode-indicator {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  font-size: 11px;
}
.habit-heading-actions .easy-mode-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}
.easy-mode-button[aria-pressed="true"] .easy-mode-indicator {
  background: var(--accent);
  border-color: var(--accent);
  color: #211600;
}
.easy-mode-button:hover {
  border-color: var(--accent);
}
.easy-mode-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .habit-hero > .section-heading > .habit-heading-actions {
    width: 100%;
    justify-content: flex-start;
    flex-direction: row;
  }
  .habit-heading-actions .easy-mode-button {
    order: -1;
  }
}
/* Habit history, collectible medals, profile and optional focus sessions. */
.habit-history-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.habit-history-stats div { padding: 14px 10px; background: var(--panel-soft,rgba(128,128,128,.08)); border: 1px solid var(--border); border-radius: 14px; display: grid; gap: 4px; text-align: center; }
.habit-history-stats strong { font-size: 24px; color: var(--accent,#ffbd32); }
.habit-history-stats span { font-size: 12px; color: var(--text-muted,#999); }
.medal-card { text-align: center; align-items: center; padding: 26px 18px; }
.medal-symbol { --medal-color:#71bd9a; width: 88px; height: 88px; display: grid; place-items: center; margin: 0 auto 14px; border: 5px double var(--medal-color); border-radius: 50%; background: radial-gradient(circle at 35% 25%,rgba(255,255,255,.12),transparent 60%); color: var(--medal-color); box-shadow: 0 4px 16px rgba(0,0,0,.12), inset 0 0 0 5px rgba(128,128,128,.08); }
.medal-violet .medal-symbol { --medal-color: #b194e9; }
.medal-gold .medal-symbol { --medal-color: #e6b54b; }
.medal-card.is-locked .medal-symbol { opacity: .55; }
.medal-card.is-locked:has(.muted) .medal-symbol { --medal-color: #92939b; border-style: dashed; }
.medal-symbol svg { width: 36px; height: 36px; }
.medal-card h3 { font-size: 17px; }
.medal-card progress, .collection-summary progress { width: 100%; height: 8px; accent-color: var(--accent,#ffbd32); border: 0; border-radius: 8px; overflow: hidden; }
progress::-webkit-progress-bar { background: rgba(128,128,128,.16); }
progress::-webkit-progress-value { background: #dda62e; border-radius: 8px; }
.collection-summary { display: flex; align-items: center; gap: 18px; padding: 22px; margin-bottom: 20px; background: rgba(220,165,40,.07); border-radius: 16px; }
.collection-summary strong { white-space: nowrap; font-size: 24px; }
.feature-medal { margin-top: auto; min-height: 44px; }
.profile-showcase { margin: 20px 0; }
.profile-privacy { text-align: center; margin-top: 22px; }
.share-options { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0; }
.share-options label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.share-preview-image { display: block; width: min(100%,340px); min-height: 100px; margin: 20px auto; border-radius: 16px; }
.mission-task-list { margin: 18px 0; }
.mission-finished { border-color: rgba(91,173,125,.45); }
.legacy-mission { margin: 14px 0; font-size: 13px; }
.archived-mission-task { padding: 12px; color: var(--text-muted,#999); }
.task-row > span { min-width: 0; overflow-wrap: anywhere; }
.task-focus { min-width: 44px; font-size: 22px; }
.focus-summary { display: flex; align-items: baseline; gap: 16px; margin: 20px 0; }
.focus-summary > strong { font-size: 36px; color: var(--accent,#ffbd32); }
.focus-history { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.focus-history div { display: grid; gap: 6px; }
.focus-history small { color: var(--text-muted,#999); }
.focus-widget { position: fixed; z-index: 35; bottom: 20px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 24px); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px; border: 1px solid #c6922e; border-radius: 18px; background: var(--surface,#202023); color: var(--text,#f6f2ec); box-shadow: 0 8px 35px #0005; }
.focus-widget strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.focus-widget button { min-height: 44px; }
body:has(.focus-widget) .product-footer { padding-bottom: 100px; }
@media(max-width: 760px) {
  .focus-widget { bottom: 85px; gap: 8px; padding: 8px 10px; }
  .focus-widget [data-focus-status] { display: none; }
  .habit-history-stats { gap: 6px; }
  .habit-history-stats div { padding: 12px 6px; }
  .habit-history-stats strong { font-size: 21px; }
  .achievement-filters { flex-wrap: wrap; }
  .task-row { display: grid; grid-template-columns: 36px minmax(0,1fr) 44px; gap: 8px; }
  .task-row > span { grid-column: 2; }
  .task-row .task-yield { display: none; }
  .task-row .task-focus { grid-column: 3; min-height: 44px; }
  .task-row .text-button:last-child { grid-column: 2 / -1; justify-self: end; min-height: 32px; }
  .profile-showcase .section-heading { flex-wrap: wrap; }
  .medal-symbol { width: 72px; height: 72px; }
  .medal-card { padding: 20px 12px; }
}
/* Identity, a compact medal cabinet, and two independent sharing compositions. */
.product-content { grid-template-columns: minmax(0,1fr); }
.product-content > *, .profile-annual, .progress-dashboard, .badge-collection { min-width: 0; max-width: 100%; }
.profile-avatar { display: inline-grid; width: 54px; height: 54px; flex: none; overflow: hidden; border-radius: 50%; background: var(--surface-2); }
.profile-avatar svg { width: 100%; height: 100%; display: block; }
.header-profile { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.header-avatar { width: 30px; height: 30px; }
.sidebar-bottom { display: grid; gap: 12px; --accent: #fbb62e; --accent-soft: #fbb62e16; --muted: #aaa7b0; --surface-3: #302d29; }
.sidebar-profile { width: 100%; padding: 12px 10px; display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid #d9a04440; background: linear-gradient(135deg,#fbb62e15,#141313); border-radius: 16px; color: #f7f6f2; }
.sidebar-profile:hover, .sidebar-profile.is-current { border-color: var(--accent); }
.sidebar-avatar-ring { width: 48px; height: 48px; flex: none; padding: 3px; border-radius: 50%; background: conic-gradient(var(--accent) var(--level-progress),var(--surface-3) 0); }
.sidebar-avatar-ring .profile-avatar { width: 42px; height: 42px; border: 3px solid var(--sidebar-bg); }
.sidebar-person { display: grid; gap: 4px; min-width: 0; flex: 1; }
.sidebar-person strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-person > span { font-size: 11px; color: var(--muted); }
.sidebar-person b { color: var(--accent); font-weight: 400; }
.sidebar-level { display: grid; justify-items: center; gap: 1px; color: var(--accent); }
.sidebar-level svg { width: 18px; height: 18px; }
.sidebar-level b { font-size: 20px; line-height: 1; }
.sidebar-xp { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 10px; padding: 0 9px; color: var(--muted); }
.sidebar-xp > div { height: 4px; width: 100%; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.sidebar-xp i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.profile-heading .primary-button { display: inline-flex; align-items: center; gap: 9px; }
.profile-heading .primary-button svg { width: 18px; height: 18px; }
.profile-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 30px; padding: 42px; border-radius: 26px; border: 1px solid color-mix(in srgb,var(--accent) 22%,var(--border)); background: radial-gradient(ellipse at 95% 0%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 65%),linear-gradient(140deg,var(--surface-2),var(--surface)); position: relative; overflow: hidden; }
.profile-orbits { position: absolute; width: 370px; height: 370px; right: -120px; top: -220px; border: 1px solid color-mix(in srgb,var(--accent) 14%,transparent); border-radius: 50%; box-shadow: 0 0 0 40px color-mix(in srgb,var(--accent) 3%,transparent),0 0 0 80px color-mix(in srgb,var(--accent) 2%,transparent); pointer-events: none; }
.profile-portrait { width: 128px; height: 128px; border: 5px solid var(--surface); box-shadow: 0 0 0 1px color-mix(in srgb,var(--accent) 45%,transparent),0 12px 40px #0002; }
.profile-banner-info { min-width: 180px; flex: 1; position: relative; }
.profile-banner-info h1 { font-size: clamp(28px,3vw,40px); margin: 9px 0; line-height: 1.1; }
.profile-banner-info > p { max-width: 480px; color: var(--muted); margin: 12px 0; line-height: 1.6; overflow-wrap: anywhere; }
.profile-level-tag { display: inline-flex; gap: 5px; align-items: center; color: var(--accent); font-size: 12px; font-weight: 700; }
.profile-level-tag svg { width: 17px; height: 17px; }
.profile-level-track { height: 5px; background: var(--surface-3); max-width: 260px; border-radius: 5px; overflow: hidden; margin-top: 20px; }
.profile-level-track span { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.profile-banner-info > small { font-size: 11px; color: var(--muted); display: block; margin-top: 7px; }
.profile-edit { align-self: flex-end; position: relative; white-space: nowrap; }
.profile-columns { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(230px,1fr); gap: 20px; margin: 24px 0; }
.profile-columns .panel { margin: 0; }
.profile-medals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 12px 0 0; gap: 8px; }
.profile-medals > p { grid-column: 1 / -1; padding: 24px 0; }
.profile-footprint { display: grid; align-content: start; gap: 12px; }
.profile-footprint > div { display: flex; align-items: baseline; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.profile-footprint strong { font-size: 25px; font-weight: 750; min-width: 48px; }
.profile-footprint span { font-size: 12px; color: var(--muted); }
.profile-attributes { margin: 22px 0; border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.profile-attributes > h3 { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin: 0; }
.profile-attributes > h3 svg { width: 22px; height: 22px; color: var(--accent); }
.profile-attributes > section { margin-top: 20px; }
.profile-bottom-link { display: flex; gap: 16px; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin: 28px 0; }
.avatar-picker { border: 0; padding: 0; margin: 24px 0; }
.avatar-picker legend { font-weight: 600; margin-bottom: 12px; }
.avatar-picker > div { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.avatar-picker label { cursor: pointer; display: grid; gap: 7px; justify-items: center; padding: 10px 4px; border-radius: 14px; border: 1px solid transparent; position: relative; font-size: 11px; color: var(--muted); }
.avatar-picker label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.avatar-picker input, .focus-mode-picker input, .share-option input { position: absolute; width: 1px !important; height: 1px !important; padding: 0; margin: 0; opacity: 0; pointer-events: none; }
.avatar-picker label:has(input:focus-visible), .share-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.progress-dashboard { display: grid; gap: 26px; }
.progress-overview { padding: 10px 0 22px; }
.progress-overview h1 { font-size: clamp(28px,3vw,40px); letter-spacing: -.04em; margin: 10px 0; }
.progress-overview > div > p.muted { font-size: 12px; }
.progress-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; margin-top: 35px; }
.progress-kpis > div { display: grid; align-content: start; gap: 8px; padding-right: 20px; border-right: 1px solid var(--border); }
.progress-kpis > div:last-child { border: 0; }
.progress-kpis strong { font-size: clamp(28px,4vw,44px); line-height: 1.1; letter-spacing: -.04em; }
.progress-kpis strong small { font-size: 16px; font-weight: 400; color: var(--muted); }
.progress-kpis span { font-size: 13px; }
.progress-kpis > div > small { font-size: 11px; color: var(--muted); line-height: 1.5; }
.weekly-activity-bars { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 16px; margin: 30px 0 18px; }
.weekly-activity-bars > div { display: grid; gap: 10px; text-align: center; font-size: 12px; }
.week-bar-track { height: 140px; display: flex; align-items: end; padding: 0 6px; }
.week-bar-track span { display: block; width: 100%; background: linear-gradient(var(--accent),color-mix(in srgb,var(--accent) 30%,var(--surface))); border-radius: 6px 6px 2px 2px; }
.weekly-activity-bars small { color: var(--muted); font-size: 10px; }
.progress-cosmetics summary { font-weight: 600; cursor: pointer; margin-bottom: 20px; }
.badge-collection-summary { display: flex; gap: 24px; align-items: center; padding: 30px; border: 1px solid var(--border); border-radius: 22px; background: radial-gradient(ellipse at 20% 0%,var(--accent-soft),transparent 65%),var(--surface); margin: 28px 0; }
.badge-completion-ring { width: 100px; height: 100px; padding: 7px; display: grid; place-items: center; flex: none; border-radius: 50%; background: conic-gradient(var(--accent) var(--collection-progress),var(--surface-3) 0); position: relative; }
.badge-completion-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.badge-completion-ring strong { position: relative; font-size: 26px; }
.badge-completion-ring small { font-size: 14px; }
.badge-summary-total { display: grid; gap: 8px; }
.badge-summary-total > strong { font-size: 34px; }
.badge-summary-total strong span { font-size: 22px; font-weight: 400; color: var(--muted); }
.badge-summary-total > span, .badge-recent > span { font-size: 9px; font-weight: 700; color: var(--muted); letter-spacing: .13em; }
.badge-recent { display: grid; gap: 15px; margin-left: auto; text-align: right; }
.badge-recent > div { display: flex; justify-content: flex-end; gap: 18px; }
.badge-recent button { background: none; border: 0; padding: 0; cursor: pointer; }
.badge-categories { display: flex; flex-wrap: wrap; gap: 7px; margin: 24px 0 16px; }
.category-pill { min-height: 34px; padding: 7px 13px; border: 1px solid var(--border); background: var(--surface); border-radius: 30px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.category-pill small { padding-left: 6px; opacity: .75; }
.category-pill[aria-pressed="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
.badge-search-row { display: flex; align-items: center; gap: 18px; margin: 16px 0 28px; }
.badge-search-row .achievement-filters { margin: 0; max-width: none; flex: none; }
.badge-search-row > input { flex: 1; min-width: 0; width: 100%; border-radius: 11px; border: 1px solid var(--border); padding: 11px 14px; background: var(--surface); color: var(--text); font-size: 13px; }
.badge-group { margin: 28px 0 36px; }
.badge-group-heading { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.badge-group-heading::after { content: ""; height: 1px; background: var(--border); flex: 1; order: 1; }
.badge-group-heading h3 { text-transform: uppercase; letter-spacing: .16em; font-size: 10px; font-weight: 650; color: var(--muted); margin: 0; }
.badge-group-heading > span { color: var(--muted); font-size: 11px; order: 2; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(128px,1fr)); gap: 14px 10px; }
.badge-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; padding: 10px 6px 12px; min-height: 154px; border: 1px solid transparent; border-radius: 16px; color: var(--text); background: transparent; cursor: pointer; text-align: center; }
.badge-tile:hover { border-color: var(--border); background: var(--surface); }
.badge-tile > strong { font-size: 12px; font-weight: 600; line-height: 1.4; max-width: 160px; margin-top: 4px; }
.badge-tile > small { font-size: 9px; color: var(--muted); line-height: 1.4; }
.badge-tile.is-earned > small { text-transform: uppercase; letter-spacing: .08em; }
.badge-featured { position: absolute; right: 8px; top: 10px; color: var(--accent); font-size: 12px; }
.game-medal { --rim-light:#e1e7ed; --rim-dark:#687586; --medal-ink:#dce2eb; display: grid; place-items: center; width: 82px; height: 82px; padding: 6px; flex: none; border-radius: 50%; background: linear-gradient(145deg,var(--rim-light) 0%,var(--rim-dark) 42%,#202936 55%,var(--rim-light) 100%); position: relative; box-shadow: 0 7px 12px #0004,inset 0 1px 1px #fff9; }
.game-medal.rank-uncommon { --rim-light:#83e0b8; --rim-dark:#278362; --medal-ink:#94e0be; }
.game-medal.rank-rare { --rim-light:#a9cbff; --rim-dark:#3a65a4; --medal-ink:#a6c6f5; }
.game-medal.rank-epic { --rim-light:#d2b5f5; --rim-dark:#715394; --medal-ink:#d0b3f1; }
.game-medal.rank-legendary { --rim-light:#ffe4a3; --rim-dark:#a47226; --medal-ink:#f5d68b; }
.medal-core { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 40% 20%,#424e5c,#1b2430 80%); color: var(--medal-ink); box-shadow: inset 0 2px 4px #000b,inset 0 -1px 1px #ffffff36; }
.medal-core > svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 1px #0005); }
.game-medal.locked { background: repeating-conic-gradient(var(--muted-2) 0deg 3deg,transparent 3deg 8deg); box-shadow: none; padding: 4px; opacity: .75; }
.game-medal.locked .medal-core { background: var(--surface-2); color: var(--muted-2); border: 3px solid var(--bg); box-shadow: none; }
.medal-progress-ring { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--rim-light); }
.small-medal { width: 58px; height: 58px; padding: 4px; }
.small-medal .medal-core > svg { width: 25px; height: 25px; }
.badge-detail { text-align: center; padding: 22px 14px; max-width: 440px; margin: auto; }
.badge-detail > .game-medal { margin: 0 auto 26px; width: 120px; height: 120px; padding: 8px; }
.badge-detail .medal-core svg { width: 48px; height: 48px; }
.badge-detail > p:not(.eyebrow) { line-height: 1.7; }
.badge-detail > progress { accent-color: var(--accent); width: 100%; height: 7px; }
.badges-preview .badge-group { margin: 6px 0; }
.badges-preview .badge-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
.share-today-button { display: grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 50%; }
.share-today-button svg { width: 21px; height: 21px; }
#dialog.share-dialog { width: min(1050px,calc(100vw - 32px)); padding: 30px; }
.share-composer { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,.85fr); gap: 40px; }
.share-composer .share-options { display: grid; grid-template-columns: 1fr; gap: 3px; margin: 22px 0; }
.share-option { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 0; min-height: 42px; cursor: pointer; border-radius: 7px; font-size: 13px; }
.share-option i { width: 19px; height: 19px; border-radius: 6px; border: 1px solid var(--line); background: var(--input-bg); color: transparent; display: grid; place-items: center; font-style: normal; font-size: 12px; flex: none; }
.share-option:has(input:checked) i { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.share-option input:focus { box-shadow: none; outline: none; }
.share-privacy-note { color: var(--muted); font-size: 11px; line-height: 1.6; padding: 12px 0; }
.share-habit-choices { border: 0; border-top: 1px solid var(--border); padding: 18px 0 0; }
.share-habit-choices legend { font-size: 12px; font-weight: 600; padding: 0 10px 0 0; }
.share-habit-choices .share-option { font-size: 12px; line-height: 1.5; }
.share-canvas-preview { padding: 12px 0; text-align: center; }
.share-canvas-preview .share-preview-image { width: 100%; max-width: 340px; margin: 18px auto; box-shadow: 0 20px 50px #0004; border: 1px solid var(--border); border-radius: 18px; }
.share-canvas-preview p { font-size: 11px; line-height: 1.6; }
.focus-mode-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 26px 0; }
.focus-mode-picker label { position: relative; cursor: pointer; }
.focus-mode-card { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 18px; padding: 20px 16px; min-height: 150px; position: relative; }
.focus-mode-card > svg { width: 36px; height: 36px; padding: 7px; background: var(--surface-3); border-radius: 10px; }
.focus-mode-card > strong { font-size: 14px; }
.focus-mode-card > small { grid-column: 1/-1; font-size: 12px; color: var(--muted); line-height: 1.65; }
.focus-mode-card > i { display: none; position: absolute; right: 10px; top: 8px; font-size: 11px; font-style: normal; }
.focus-mode-picker input:checked + .focus-mode-card { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.focus-mode-picker input:checked + .focus-mode-card > svg { background: var(--accent); color: var(--on-accent); }
.focus-mode-picker input:checked + .focus-mode-card > i { display: block; color: var(--accent); }
.focus-mode-picker input:focus-visible + .focus-mode-card { outline: 2px solid var(--accent); outline-offset: 4px; }
.focus-minutes { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 25px 0 12px; }
.focus-minutes input { width: 110px; border: 0; background: transparent; color: var(--text); font-size: 52px; font-weight: 700; text-align: center; padding: 0; }
.focus-minutes span { color: var(--muted); font-size: 14px; }
[data-focus-range] { width: 100%; accent-color: var(--accent); margin: 15px 0; }
.focus-presets { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.focus-presets button { font-size: 12px; padding: 8px 12px; min-height: 40px; }
.focus-presets button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.focus-ready { text-align: center; border-radius: 18px; background: var(--surface-2); margin: 22px 0; padding: 20px; }
.focus-ready > span { font-size: 36px; font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -.03em; }
.focus-ready p { font-size: 12px; color: var(--muted); margin: 9px 0 0; }
.focus-begin { width: 100%; min-height: 48px; }
.focus-setup:has(input[value="pomodoro"]:checked) .focus-ready { display: none; }
.focus-setup .focus-mode-card { min-height: 125px; }
.focus-setup .focus-mode-picker { margin: 15px 0; }
.focus-setup .focus-minutes { margin: 14px 0 4px; }
.focus-widget { border-radius: 22px; padding: 12px 18px; gap: 18px; border-color: color-mix(in srgb,var(--accent) 35%,var(--border)); }
.focus-widget-symbol svg { width: 26px; height: 26px; color: var(--accent); }
.focus-widget-context { display: grid; gap: 4px; max-width: 200px; }
.focus-widget-context > strong { font-size: 12px; }
.focus-widget-context > span { max-width: 200px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-widget .focus-clock-ring > strong { font-size: 24px; }
.focus-widget > [data-focus-status] { font-size: 11px; color: var(--muted); }
.focus-widget-actions { display: flex; gap: 8px; align-items: center; }
.focus-widget-actions button { font-size: 12px; }
.focus-stage { text-align: center; display: grid; justify-items: center; gap: 16px; padding: 35px; margin: 25px 0; }
.focus-stage .focus-widget-symbol svg { width: 30px; height: 30px; color: var(--accent); }
.focus-stage .focus-widget-context { max-width: 100%; }
.focus-stage .focus-widget-context > strong { font-size: 15px; }
.focus-stage .focus-widget-context > span { max-width: 100%; white-space: normal; font-size: 13px; }
.focus-stage .focus-clock-ring { width: 210px; height: 210px; display: grid; place-items: center; border-radius: 50%; position: relative; background: conic-gradient(var(--accent) var(--timer-progress),var(--surface-3) 0); }
.focus-stage .focus-clock-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.focus-stage .focus-clock-ring > strong { position: relative; font-size: 38px; font-variant-numeric: tabular-nums; }
.focus-stage > [data-focus-status] { font-size: 12px; color: var(--muted); }
.focus-stage .focus-inline-mode { display: none; }
.focus-widget .focus-clock-ring { display: grid; gap: 2px; text-align: center; }
.focus-widget .focus-inline-mode { font-size: 9px; color: var(--muted); font-weight: 500; }
@media(max-width:1000px) {
  .profile-columns { grid-template-columns: minmax(0,1fr); }
  .profile-footprint { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .profile-footprint > .eyebrow { grid-column: 1/-1; }
  .profile-footprint > div { display: grid; gap: 5px; border: 0; }
  .badge-recent { display: none; }
  .badges-preview .badge-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:760px) {
  .profile-banner { padding: 26px 22px; gap: 20px; flex-wrap: wrap; }
  .profile-portrait { width: 88px; height: 88px; }
  .profile-banner-info { flex: 1; min-width: 135px; }
  .profile-banner-info > p { font-size: 12px; }
  .profile-edit { margin-left: auto; }
  .profile-banner-info h1 { font-size: 28px; }
  .profile-columns { gap: 18px; }
  .profile-medals { gap: 3px; }
  .profile-medals .game-medal { width: 65px; height: 65px; }
  .profile-medals .badge-tile { min-height: 125px; }
  .profile-medals .badge-tile > strong { font-size: 11px; }
  .profile-footprint strong { min-width: 0; }
  .profile-footprint span { font-size: 11px; }
  .profile-bottom-link { flex-wrap: wrap; }
  .avatar-picker > div { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .progress-kpis { gap: 12px; }
  .progress-kpis > div { padding-right: 8px; }
  .progress-kpis strong { font-size: 29px; }
  .progress-kpis span { font-size: 11px; }
  .progress-kpis > div > small { font-size: 10px; }
  .weekly-activity-bars { gap: 7px; }
  .week-bar-track { padding: 0 2px; height: 110px; }
  .badge-collection-summary { padding: 22px 18px; gap: 18px; }
  .badge-completion-ring { width: 76px; height: 76px; padding: 6px; }
  .badge-completion-ring::before { inset: 6px; }
  .badge-completion-ring strong { font-size: 22px; }
  .badge-summary-total > strong { font-size: 30px; }
  .badge-summary-total > span { font-size: 8px; }
  .badge-categories { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; }
  .category-pill { min-height: 38px; }
  .badge-search-row { flex-wrap: wrap; gap: 12px; }
  .badge-search-row .achievement-filters { width: 100%; justify-content: space-between; gap: 0; }
  .badge-search-row .achievement-filters button { padding: 9px 7px; font-size: 10px; min-height: 38px; }
  .badge-search-row > input { flex-basis: 100%; }
  .badge-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px 2px; }
  .game-medal { width: 70px; height: 70px; padding: 5px; }
  .medal-core > svg { width: 29px; height: 29px; }
  .badge-tile { min-height: 145px; padding: 7px 3px; }
  .badge-tile > strong { font-size: 11px; }
  .badge-tile > small { font-size: 8px; }
  .badge-detail .game-medal { width: 110px; height: 110px; }
  #dialog.share-dialog { padding: 26px 20px; }
  .share-composer { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .share-canvas-preview { grid-row: 2; }
  .share-canvas-preview .share-preview-image { max-width: 290px; }
  .share-composer .share-options { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 12px; }
  .share-option { font-size: 11px; align-items: flex-start; line-height: 1.5; }
  .share-option i { margin-top: 1px; }
  .focus-mode-picker { gap: 10px; }
  .focus-mode-card { padding: 16px 12px; grid-template-columns: 28px 1fr; min-height: 155px; }
  .focus-mode-card > svg { width: 28px; height: 28px; padding: 5px; }
  .focus-mode-card > strong { font-size: 12px; }
  .focus-mode-card > small { font-size: 11px; }
  .focus-widget { gap: 10px; padding: 9px 12px; flex-wrap: nowrap; }
  .focus-widget .focus-widget-symbol, .focus-widget .focus-widget-context, .focus-widget .focus-widget-actions > .text-button { display: none; }
  .focus-widget .focus-clock-ring > strong { font-size: 22px; }
  .focus-widget-actions button { min-height: 40px; padding: 9px 11px; font-size: 11px; }
  .focus-presets { gap: 5px; }
  .focus-presets button { padding: 8px 9px; font-size: 11px; }
}
@media(max-width:360px) {
  .badge-grid, .badges-preview .badge-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-medals { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .profile-medals .game-medal { width: 54px; height: 54px; }
  .profile-medals .medal-core > svg { width: 24px; height: 24px; }
  .profile-medals .badge-tile > strong { font-size: 10px; }
  .focus-mode-picker { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .focus-mode-card { grid-template-columns: minmax(0,1fr); justify-items: start; gap: 6px; min-height: 155px; padding: 14px 10px; }
  .focus-mode-card > small { font-size: 10px; }
  .focus-presets button:nth-child(n+4) { display: none; }
}

/* The sidebar follows the selected theme, including its identity card. */
:root[data-theme="light"] .product-shell .sidebar {
  --sidebar-bg: #fff;
  --text: #222226;
  --muted: #65636b;
  --surface-2: #f4f3ef;
  --line-soft: #201b111f;
  background: var(--sidebar-bg);
}
:root[data-theme="light"] .sidebar-bottom {
  --accent: #986000;
  --accent-soft: #fff3d6;
  --muted: #65636b;
  --surface-3: #eae8e1;
}
:root[data-theme="light"] .sidebar-profile {
  background: linear-gradient(135deg,#fff6e1,#fffdf8);
  color: var(--text);
  border-color: #ba87294d;
}
:root[data-theme="light"] .product-shell .brand-logo {
  filter: url(#brand-on-light);
  mix-blend-mode: normal;
}

/* Real rewards, separated from the medal itself. */
.reward-chips { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; }
.reward-chips > span { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 12px; font-size: 12px; line-height: 1.3; }
.reward-chips strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.reward-chips svg { width: 19px; height: 19px; }
.xp-chip { background: #a898ff20; color: #d3c5ff; border: 1px solid #a898ff40; }
.coin-chip { background: #fbb62e16; color: #f4c65f; border: 1px solid #fbb62e35; }
.product-toast:has(.reward-chips) { padding: 8px; background: var(--surface); color: var(--text); border: 1px solid var(--line-soft); animation: reward-arrive .4s ease-out both; }
:root[data-theme="light"] .xp-chip { color: #6843ad; background: #f0eafa; }
:root[data-theme="light"] .coin-chip { color: #835500; background: #fff3d5; }

/* A short, dismissible unlock moment. The artwork always stays above decoration. */
.celebration { right: 24px; bottom: 24px; width: min(410px,calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); overflow: auto; padding: 0; border: 0; background: transparent; border-radius: 24px; box-shadow: 0 24px 100px #0008; z-index: 10001; }
.celebration[hidden] { display: none; }
.unlock-card { --unlock-color: #e9be68; position: relative; padding: 16px 26px 24px; border: 1px solid color-mix(in srgb,var(--unlock-color) 55%,var(--line)); border-radius: 24px; background: radial-gradient(ellipse at 50% 0%,color-mix(in srgb,var(--unlock-color) 12%,transparent),transparent 65%),var(--surface); text-align: center; overflow: hidden; animation: unlock-arrive .55s cubic-bezier(.15,.8,.2,1) both; }
.unlock-card.rank-uncommon { --unlock-color: #65c9a1; }
.unlock-card.rank-rare { --unlock-color: #7ea8e5; }
.unlock-card.rank-epic { --unlock-color: #b097dc; }
.unlock-card.rank-legendary { --unlock-color: #efbd5e; }
.unlock-close { position: absolute; z-index: 2; top: 8px; right: 8px; width: 44px; height: 44px; color: var(--muted); font-size: 24px; }
.unlock-stage { position: relative; display: grid; place-items: center; height: 178px; isolation: isolate; }
.unlock-stage > .game-medal { width: 116px; height: 116px; z-index: 1; animation: medal-reveal .8s cubic-bezier(.18,.9,.28,1.3) both; filter: drop-shadow(0 8px 20px color-mix(in srgb,var(--unlock-color) 35%,transparent)); }
.unlock-stage .medal-core svg { width: 48px; height: 48px; }
.unlock-rays { position: absolute; width: 240px; height: 240px; background: repeating-conic-gradient(from 0deg,transparent 0deg 16deg,color-mix(in srgb,var(--unlock-color) 16%,transparent) 17deg 18deg,transparent 19deg 30deg); mask-image: radial-gradient(circle,#000 5%,transparent 67%); animation: unlock-rays 5s ease-out both; z-index: 0; }
.unlock-spark { --angle: calc(var(--i) * 30deg); position: absolute; left: calc(50% - 2px); top: calc(50% - 2px); width: 4px; height: 4px; border-radius: 2px; background: var(--unlock-color); opacity: 0; animation: unlock-spark 1.3s calc(var(--i) * 25ms + 100ms) ease-out both; pointer-events: none; }
.unlock-card > .eyebrow { color: var(--unlock-color); font-size: 10px; letter-spacing: .18em; margin: 0 0 8px; }
:root[data-theme="light"] .unlock-card > .eyebrow { color: var(--accent); }
.unlock-card h2 { margin: 0; font-size: 27px; line-height: 1.2; }
.unlock-rarity { display: inline-block; margin-top: 10px; color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.unlock-reason { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 14px 0 20px; }
.unlock-rewards { padding: 16px 0 18px; border-top: 1px solid var(--line-soft); }
.unlock-rewards > small { display: block; margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.unlock-level { display: flex; justify-content: space-between; margin: 18px 0 7px; font-size: 10px; color: var(--muted); }
.unlock-level-track { height: 5px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.unlock-level-track i { display: block; height: 100%; width: var(--xp-width); border-radius: inherit; background: linear-gradient(90deg,#b89ae9,#e8c570); animation: unlock-xp .9s .3s ease-out both; }
.unlock-continue { width: 100%; min-height: 44px; }
.unlock-others { display: grid; gap: 12px; max-height: 180px; overflow-y: auto; text-align: left; margin-bottom: 20px; }
.unlock-others > div { display: flex; align-items: center; gap: 12px; }
.unlock-others .game-medal { width: 44px; height: 44px; flex: none; }
.unlock-others strong { display: block; font-size: 12px; }
.unlock-others small { display: block; font-size: 11px; line-height: 1.4; margin-top: 3px; }
@keyframes unlock-arrive { from { opacity: 0; transform: translateY(26px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes medal-reveal { 0% { transform: scale(.3) rotate(-24deg); opacity: 0; } 65% { transform: scale(1.12) rotate(4deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes unlock-rays { from { transform: rotate(-35deg) scale(.7); opacity: 0; } 18% { opacity: 1; } to { transform: rotate(25deg) scale(1); opacity: .5; } }
@keyframes unlock-spark { 0% { transform: rotate(var(--angle)) translateX(38px); opacity: 0; } 30% { opacity: 1; } 100% { transform: rotate(var(--angle)) translateX(100px); opacity: 0; } }
@keyframes unlock-xp { from { width: 0; } to { width: var(--xp-width); } }
@keyframes reward-arrive { from { opacity: 0; margin-bottom: -10px; } to { opacity: 1; margin-bottom: 0; } }
@media (max-width: 800px) {
  .celebration { right: 16px; bottom: 90px; max-height: calc(100dvh - 108px); }
  .unlock-card { padding: 8px 20px 20px; }
  .unlock-stage { height: 155px; }
}
@media (prefers-reduced-motion: reduce) {
  .unlock-card, .unlock-stage > .game-medal, .unlock-rays, .unlock-level-track i, .product-toast:has(.reward-chips) { animation: none; }
  .unlock-spark { display: none; }
}

/* Habit completion has its own brief celebration, distinct from rare achievements. */
.habit-feedback { position: fixed; left: 24px; bottom: 24px; width: min(360px,calc(100vw - 32px)); z-index: 9999; pointer-events: none; }
.habit-feedback[hidden] { display: none; }
.habit-success-card { position: relative; padding: 22px; border: 1px solid color-mix(in srgb,var(--accent) 45%,var(--line)); border-radius: 24px; color: var(--text); background: radial-gradient(ellipse at 50% 0%,var(--accent-soft),transparent 65%),var(--surface); box-shadow: 0 18px 65px #0004; text-align: center; animation: unlock-arrive .45s cubic-bezier(.15,.8,.2,1) both; pointer-events: auto; }
.habit-success-close { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; color: var(--muted); font-size: 22px; z-index: 2; }
.habit-success-emblem { position: relative; display: grid; place-items: center; height: 100px; isolation: isolate; }
.habit-success-halo { position: absolute; width: 80px; height: 80px; border: 1px solid var(--accent); border-radius: 50%; opacity: 0; animation: habit-halo .9s .1s ease-out both; }
.habit-success-symbol { display: grid; place-items: center; position: relative; width: 76px; height: 76px; border-radius: 24px; color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--accent) 28%,transparent),0 0 34px var(--accent-soft); animation: medal-reveal .55s cubic-bezier(.18,.9,.28,1.3) both; }
.habit-success-symbol > svg:first-child { width: 36px; height: 36px; }
.habit-success-symbol .habit-success-check { position: absolute; right: -7px; bottom: -5px; width: 32px; height: 32px; overflow: visible; }
.habit-success-check circle { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }
.habit-success-check path { fill: none; stroke: var(--on-accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 0; animation: habit-check .5s .15s ease-out both; }
.habit-success-particle { position: absolute; width: 4px; height: 7px; border-radius: 2px; background: var(--accent); opacity: 0; --angle: calc(var(--i) * 45deg); animation: habit-particles .9s calc(var(--i) * 20ms + 100ms) ease-out both; }
.habit-success-card > .eyebrow { margin: 12px 0 7px; color: var(--accent); font-size: 10px; letter-spacing: .13em; }
.habit-success-card h2 { margin: 0 auto 18px; font-size: 19px; line-height: 1.35; max-width: 270px; text-wrap: balance; }
.habit-success-areas { display: flex; justify-content: center; gap: 8px 12px; flex-wrap: wrap; margin-top: 14px; }
.habit-success-areas > span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.habit-success-areas svg { width: 14px; height: 14px; }
.habit-success-areas b { color: var(--text); font-weight: 600; }
.habit-success-card .unlock-level { margin-top: 18px; }
.habit-unit.just-completed { animation: habit-tile-glow .8s ease-out both; }
.habit-unit.just-completed .habit-tick { animation: medal-reveal .5s cubic-bezier(.18,.9,.28,1.3) both; }
@keyframes habit-halo { from { opacity: .8; transform: scale(.7); } to { opacity: 0; transform: scale(1.8); } }
@keyframes habit-particles { 0% { transform: rotate(var(--angle)) translateY(-28px) scale(.5); opacity: 0; } 25% { opacity: 1; } 100% { transform: rotate(var(--angle)) translateY(-70px) scale(.4); opacity: 0; } }
@keyframes habit-check { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes habit-tile-glow { 0% { box-shadow: 0 0 0 0 var(--accent-soft); } 35% { box-shadow: 0 0 0 7px var(--accent-soft),0 0 28px var(--accent-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 800px) {
  .habit-feedback { left: 16px; right: 16px; bottom: 90px; width: auto; max-width: 360px; margin: 0 auto; }
  .habit-success-card { padding: 16px 20px; }
  .habit-success-emblem { height: 84px; }
}
@media (max-height: 620px) {
  .habit-success-emblem { height: 64px; }
  .habit-success-symbol { width: 54px; height: 54px; border-radius: 18px; }
  .habit-success-card { padding-top: 10px; padding-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .habit-success-card,.habit-success-symbol,.habit-success-check path,.habit-unit.just-completed,.habit-unit.just-completed .habit-tick { animation: none; }
  .habit-success-particle,.habit-success-halo { display: none; }
}

.home-check-in { display: grid; gap: 12px; min-width: 0; }
.home-check-in .daily-reflections button { min-height: 48px; padding: 14px 12px; white-space: normal; }
.character-restored.compact-character { gap: 14px; padding: 16px 18px; flex-wrap: nowrap; }
.compact-character .character-crest { flex: 0 0 48px; width: 48px; height: 56px; }
.compact-character .character-crest svg { width: 32px; height: 32px; }
.compact-character .character-identity h2 { font-size: 1.15rem; margin: 0 !important; }
.compact-character .character-identity .progress-track { margin: 8px 0 5px; max-width: none; }
.compact-character .character-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .75rem; }
.compact-character .character-meta span { display: inline-flex; align-items: center; gap: 5px; }
.compact-character .character-meta svg { width: 14px; height: 14px; color: var(--accent); }
.compact-character .character-level strong { font-size: 2rem; }
.compact-character .character-progress-link { min-width: 36px; min-height: 44px; padding: 6px; font-size: 1.3rem; }
@media (max-width: 600px) {
  .character-restored.compact-character { gap: 10px; padding: 14px; }
  .compact-character .character-crest { flex-basis: 38px; width: 38px; height: 46px; }
  .compact-character .character-crest svg { width: 26px; height: 26px; }
  .compact-character .character-meta { gap: 8px; font-size: .7rem; }
  .compact-character .character-level strong { font-size: 1.7rem; }
  .compact-character .character-progress-link { min-width: 28px; }
}
@media (max-width: 600px) {
  .home-daily .habit-hero .habit-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-daily .habit-hero .habit-unit { display: flex; flex-direction: column; padding: 8px; gap: 2px; border-radius: 16px; }
  .home-daily .habit-hero .habit-main { grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: center; align-content: center; text-align: center; min-height: 96px; gap: 6px; padding: 0; }
  .home-daily .habit-hero .habit-main strong { font-size: 1rem; line-height: 1.25; }
  .home-daily .habit-hero .habit-symbol { width: 54px; height: 54px; border-radius: 19px; }
  .home-daily .habit-hero .habit-symbol svg { width: 34px; height: 34px; }
  .home-daily .habit-hero .habit-main small { font-size: .7rem; }
  .home-daily .habit-hero .habit-card-footer { flex-direction: row; justify-content: space-between; margin-top: auto; padding: 0; }
  .home-daily .habit-hero .habit-history { min-width: 44px; min-height: 28px; }
}
@media (max-width: 600px) {
  .home-daily .task-focus { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 4px; font-size: 28px; line-height: 1; color: var(--accent); background: var(--accent-soft); border-radius: 12px; }
}
.home-check-in .daily-reflections button { position: relative; isolation: isolate; overflow: hidden; }
.daily-reflections [data-session="morning"] {
  background: linear-gradient(125deg, color-mix(in srgb, #f7b343 24%, var(--surface)), color-mix(in srgb, #f18469 12%, var(--surface)));
  border-color: color-mix(in srgb, #f7b343 44%, var(--line)); color: #ffdaa3;
}
.daily-reflections [data-session="evening"] {
  background: linear-gradient(125deg, color-mix(in srgb, #6677d9 27%, var(--surface)), color-mix(in srgb, #9671bf 16%, var(--surface)));
  border-color: color-mix(in srgb, #8e8fe6 44%, var(--line)); color: #dcdfff;
}
.diary-phase-label { position: relative; z-index: 1; }
.diary-phase-icon { position: absolute; right: 5px; bottom: -4px; width: 38px; height: 38px; opacity: .22; pointer-events: none; }
.diary-phase-icon svg { width: 100%; height: 100%; }
:root[data-theme="light"] .daily-reflections [data-session="morning"] { color: #784012; }
:root[data-theme="light"] .daily-reflections [data-session="evening"] { color: #413676; }