:root {
  color-scheme: dark;
  --bg: #101011;
  --bg-soft: #141416;
  --surface: #1b1b1e;
  --surface-2: #242428;
  --surface-3: #2b2b30;
  --line: #3b3b41;
  --border: rgba(255, 255, 255, 0.09);
  --line-soft: var(--border);
  --sidebar-bg: #080809;
  --input-bg: #141416;
  --accent: #fbb62e;
  --accent-soft: rgba(251, 182, 46, 0.10);
  --on-accent: #241a06;
  --text: #f7f6f2;
  --muted: #aaa9b0;
  --muted-2: #87868f;
  --green: #fbb62e;
  --green-2: #eaa51b;
  --gold: #fbb62e;
  --blue: #3c82f6;
  --red: #ff5b6e;
  --violet: #9b69ff;
  --teal: #17c9b2;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --sidebar-width: 256px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  border-right: 1px solid var(--line-soft);
  background: var(--sidebar-bg);
  padding: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: 3px solid var(--green);
  border-radius: 7px;
  box-shadow: inset 0 0 0 5px rgba(251, 182, 46, 0.14);
}

.side-character,
.side-stats,
.side-actions,
.panel,
.metric-card,
.item-card,
.mission-card,
.reward-card,
.achievement-card,
.app-form,
.matrix-column {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.side-character {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.avatar {
  position: relative;
  width: 72px;
  height: 82px;
}

.avatar-aura,
.avatar-face,
.avatar-body {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.avatar-aura {
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(251, 182, 46, 0.28), rgba(251, 182, 46, 0.08));
  filter: blur(1px);
}

.avatar-face {
  top: 6px;
  width: 48px;
  height: 48px;
  border: 2px solid #0b0f0e;
  border-radius: 45% 45% 42% 42%;
  background: #d9a06b;
  z-index: 1;
}

.avatar-face::before,
.avatar-face::after {
  content: "";
  position: absolute;
  top: 22px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #111;
}

.avatar-face::before {
  left: 13px;
}

.avatar-face::after {
  right: 13px;
}

.avatar-body {
  bottom: 5px;
  width: 58px;
  height: 38px;
  border: 2px solid #0b0f0e;
  border-radius: 8px 8px 18px 18px;
  background: linear-gradient(135deg, var(--green-2), #906517);
  z-index: 2;
}

.character-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 1.7rem;
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
  line-height: 1.12;
}

h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.muted {
  margin-bottom: 0;
  color: var(--muted);
}

.side-stats,
.side-actions {
  padding: 14px;
}

.stat-row,
.section-heading,
.card-top,
.task-meta,
.reward-meta,
.form-actions,
.compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-row {
  font-size: 0.88rem;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(156, 156, 170, 0.16);
}

.side-stats .progress-track {
  margin: 12px 0 10px;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 240ms ease;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item,
.utility-button,
.bottom-nav button,
.icon-button,
.primary-button,
.ghost-button,
.danger-button,
.buy-button,
.check-button {
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: var(--text);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  background: transparent;
  padding: 0 10px;
  text-align: left;
  font-weight: 760;
}

.nav-item span,
.bottom-nav span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(156, 156, 170, 0.12);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(251, 182, 46, 0.1);
  color: var(--text);
}

.nav-item.is-active span,
.bottom-nav button.is-active span {
  background: var(--green);
  color: #08100d;
}

.side-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.utility-button,
.ghost-button {
  min-height: 40px;
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  padding: 0 12px;
  font-weight: 800;
}

.utility-button:hover,
.ghost-button:hover {
  border-color: rgba(251, 182, 46, 0.5);
}

.danger,
.danger-button {
  color: #ff9ba6;
}

.workspace {
  min-width: 0;
  padding: 28px min(4vw, 42px) 42px;
}

.topbar > div,
.view-content,
.dashboard-layout,
.dashboard-layout > *,
.dashboard-stack,
.panel-stack,
.panel,
.compact-list,
.item-card,
.card-main > div {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid rgba(251, 182, 46, 0.26);
  padding-bottom: 22px;
}

.topbar h2 {
  font-size: 2rem;
}

.topbar-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 260px;
}

.metric-pill,
.tag,
.priority-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 800;
  max-width: 100%;
  white-space: nowrap;
}

.metric-pill.strong,
.tag.positive {
  border-color: rgba(251, 182, 46, 0.28);
  background: rgba(251, 182, 46, 0.1);
  color: var(--accent);
}

.view-content {
  display: grid;
  gap: 18px;
  padding-top: 22px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.dashboard-stack,
.panel-stack {
  display: grid;
  gap: 18px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 14px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.55rem;
  line-height: 1;
}

.panel {
  padding: 16px;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading p {
  margin: 4px 0 0;
}

.app-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .wide {
  grid-column: span 2;
}

.field {
  display: grid;
  gap: 7px;
}

.field span,
.field legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

fieldset {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--input-bg);
  color: var(--text);
  padding: 0 12px;
}

textarea {
  min-height: 84px;
  padding-top: 10px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(251, 182, 46, 0.16);
  outline: none;
}

.checkbox-grid,
.switch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attribute-check,
.switch-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.attribute-check input,
.switch-check input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--green);
}

.primary-button,
.buy-button {
  min-height: 42px;
  background: var(--green);
  color: #07100c;
  padding: 0 14px;
  font-weight: 900;
}

.primary-button:hover,
.buy-button:hover {
  background: #ffca60;
}

.danger-button {
  min-height: 38px;
  border-color: rgba(255, 91, 110, 0.3);
  background: rgba(255, 91, 110, 0.08);
  padding: 0 12px;
  font-weight: 850;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 900;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compact-list,
.history-list {
  display: grid;
  gap: 10px;
}

.item-card,
.mission-card,
.reward-card,
.achievement-card {
  padding: 14px;
}

.item-card {
  display: grid;
  gap: 12px;
}

.card-main {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.check-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-color: #4a5d57;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.check-button:hover {
  border-color: var(--green);
}

.check-button.is-done {
  border-color: var(--green);
  background: var(--green);
}

.check-button.is-done::after {
  content: "";
  width: 9px;
  height: 16px;
  border: solid #07100c;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) translate(-1px, -2px);
}

.pulse-complete {
  animation: tapReward 420ms ease;
}

@keyframes tapReward {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.12);
    box-shadow: 0 0 0 9px rgba(251, 182, 46, 0.14);
  }
  100% {
    transform: scale(1);
  }
}

.item-title {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.task-meta,
.reward-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.priority-alta {
  border-color: rgba(255, 91, 110, 0.32);
  color: #ff97a4;
}

.priority-media {
  border-color: rgba(251, 182, 46, 0.32);
  color: var(--accent);
}

.priority-baja {
  border-color: rgba(60, 130, 246, 0.32);
  color: #9fc2ff;
}

.attribute-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.attribute-tag {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.73rem;
  font-weight: 900;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 154px;
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.habit-board {
  display: grid;
  gap: 14px;
}

.habit-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.habit-card-header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.habit-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.habit-streak {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(251, 182, 46, 0.26);
  border-radius: 999px;
  background: rgba(251, 182, 46, 0.08);
  color: var(--accent);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.habit-calendar {
  display: grid;
  gap: 10px;
  min-width: 0;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.habit-calendar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.github-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.github-legend i {
  width: 11px;
  height: 11px;
  border: 1px solid rgba(156, 156, 170, 0.14);
  border-radius: 3px;
  background: rgba(156, 156, 170, 0.14);
}

.github-legend i[data-done="true"] {
  border-color: color-mix(in srgb, var(--habit-color), white 14%);
  background: var(--habit-color);
}

.habit-heatmap {
  --heatmap-cell: 11px;
  --heatmap-gap: 3px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 4px;
  scrollbar-color: rgba(156, 156, 170, 0.35) transparent;
  scrollbar-width: thin;
}

.habit-heatmap-inner {
  width: max-content;
}

.habit-month-row,
.habit-grid-row {
  display: grid;
  grid-template-columns: 36px max-content;
  gap: 8px;
}

.heatmap-months,
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(var(--week-count), var(--heatmap-cell));
  gap: var(--heatmap-gap);
}

.heatmap-months {
  min-height: 18px;
  align-items: end;
}

.heatmap-month {
  overflow: visible;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-transform: capitalize;
  white-space: nowrap;
}

.weekday-labels {
  display: grid;
  grid-template-rows: repeat(7, var(--heatmap-cell));
  gap: var(--heatmap-gap);
  color: var(--muted-2);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: var(--heatmap-cell);
  text-align: right;
}

.heatmap-week {
  display: grid;
  grid-template-rows: repeat(7, var(--heatmap-cell));
  gap: var(--heatmap-gap);
}

.heatmap-cell {
  display: block;
  width: var(--heatmap-cell);
  height: var(--heatmap-cell);
  border: 1px solid rgba(156, 156, 170, 0.08);
  border-radius: 3px;
  background: rgba(156, 156, 170, 0.14);
  padding: 0;
  appearance: none;
}

.heatmap-cell[data-done="true"] {
  border-color: color-mix(in srgb, var(--habit-color), white 10%);
  background: var(--habit-color);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.heatmap-cell:not(.is-empty):hover,
.heatmap-cell:not(.is-empty):focus-visible {
  border-color: #f7f6f2;
  outline: none;
  transform: scale(1.16);
}

.heatmap-cell.is-empty {
  opacity: 0;
  pointer-events: none;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}

.matrix-column {
  min-height: 230px;
  padding: 14px;
}

.matrix-column[data-tone="red"] {
  border-color: rgba(255, 91, 110, 0.35);
}

.matrix-column[data-tone="gold"] {
  border-color: rgba(251, 182, 46, 0.35);
}

.matrix-column[data-tone="blue"] {
  border-color: rgba(60, 130, 246, 0.35);
}

.matrix-column[data-tone="muted"] {
  border-color: rgba(156, 156, 170, 0.22);
}

.matrix-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.mission-card,
.reward-card,
.achievement-card {
  display: grid;
  gap: 12px;
}

.mission-card.is-complete {
  border-color: rgba(251, 182, 46, 0.42);
}

.mission-progress-text {
  color: var(--muted);
  font-size: 0.84rem;
}

.radar-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(280px, 1.1fr);
  gap: 18px;
}

.radar-wrap {
  display: grid;
  place-items: center;
  min-height: 330px;
}

.radar-svg {
  width: min(100%, 360px);
  height: auto;
}

.radar-grid-line,
.radar-axis {
  fill: none;
  stroke: rgba(156, 156, 170, 0.28);
  stroke-width: 1;
}

.radar-area {
  fill: var(--accent-soft);
  stroke: var(--green);
  stroke-width: 2;
}

.radar-point {
  fill: var(--gold);
  stroke: #121b1a;
  stroke-width: 2;
}

.radar-label {
  fill: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.attribute-list {
  display: grid;
  gap: 12px;
}

.attribute-row {
  display: grid;
  gap: 8px;
}

.attribute-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 850;
}

.achievement-card.is-locked {
  opacity: 0.58;
}

.achievement-status {
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 900;
}

.achievement-card.is-locked .achievement-status {
  color: var(--muted-2);
}

.reward-price {
  color: var(--accent);
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 28px));
  border: 1px solid rgba(251, 182, 46, 0.35);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reward-burst {
  position: fixed;
  left: 50%;
  top: 18%;
  z-index: 30;
  border: 1px solid rgba(251, 182, 46, 0.4);
  border-radius: 999px;
  background: rgba(251, 182, 46, 0.12);
  color: var(--accent);
  padding: 10px 16px;
  font-weight: 950;
  opacity: 0;
  transform: translate(-50%, 18px) scale(0.96);
  pointer-events: none;
}

.reward-burst.is-visible {
  animation: rewardFloat 900ms ease forwards;
}

@keyframes rewardFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, 18px) scale(0.96);
  }
  18%,
  70% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -18px) scale(0.98);
  }
}

.bottom-nav {
  display: none;
}

@media (max-width: 1120px) {
  .dashboard-layout,
  .radar-layout {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 900px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 18px 12px 24px;
  }

  .topbar > div {
    max-width: calc(100vw - 24px);
  }

  .topbar .muted {
    max-width: 32ch;
    overflow-wrap: break-word;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .topbar h2 {
    font-size: 1.65rem;
  }

  .topbar-metrics {
    justify-content: flex-start;
    min-width: 0;
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 15;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(74px, 1fr);
    gap: 4px;
    overflow-x: auto;
    max-width: 100vw;
    border-top: 1px solid var(--line-soft);
    background: var(--sidebar-bg);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  }

  .bottom-nav {
    scrollbar-width: none;
  }

  .bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .bottom-nav button {
    display: grid;
    justify-items: center;
    gap: 4px;
    min-height: 54px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 820;
    white-space: nowrap;
  }

  .bottom-nav button.is-active {
    color: var(--text);
  }
}

@media (max-width: 720px) {
  .form-grid,
  .card-grid,
  .matrix-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide {
    grid-column: auto;
  }

  .tag,
  .priority-pill,
  .metric-pill {
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
  }

  .card-main {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .habit-card {
    padding: 14px;
  }

  .habit-card-header {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .habit-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .habit-calendar-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .habit-heatmap {
    --heatmap-cell: 11px;
    --heatmap-gap: 3px;
  }

  .card-main .icon-button,
  .card-main .danger-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .radar-wrap {
    min-height: 280px;
  }

  .toast {
    right: 14px;
    bottom: 88px;
  }
}

/* Magnet OS: shared component treatment and theme tokens. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f5f1; --bg-soft: #f0eee8;
  --surface: #ffffff; --surface-2: #f4f3ef; --surface-3: #eae8e1;
  --text: #222226; --muted: #65636b; --muted-2: #74717b;
  --border: rgba(32, 27, 17, .12); --line: #d5d2c8;
  --sidebar-bg: #fff; --input-bg: #f8f7f4;
  --accent: #986000; --green: #986000; --green-2: #b8780d;
  --accent-soft: #fff3d6; --shadow: 0 6px 24px rgba(50, 40, 20, .035);
}
body { line-height: 1.5; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { transition: background .18s, border-color .18s, transform .18s; }
button:active:not(:disabled) { transform: translateY(1px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sidebar { overflow-y: auto; gap: 14px; padding: 26px 18px 18px; }
.brand { width: 100%; border-radius: 12px; background: #000; padding: 10px 12px; }
.brand-logo { width: 100%; height: auto; display: block; }
.product-label { margin: -2px 8px 10px; font-size: 10px; font-weight: 750; letter-spacing: .16em; color: var(--accent); }
.product-label span { display: block; margin-top: 5px; color: var(--muted); letter-spacing: .02em; font-weight: 400; font-size: 11px; }
.side-character { background: transparent; box-shadow: none; border: 0; padding: 4px 8px; grid-template-columns: 50px 1fr; gap: 12px; }
.side-character .avatar { transform: scale(.65); transform-origin: left center; width: 50px; height: 72px; }
.character-copy h1 { font-size: 21px; line-height: 1.2; }
.character-copy .muted { font-size: 11px; }
.eyebrow { font-size: 10px; letter-spacing: .15em; font-weight: 750; color: var(--accent); }
.side-stats { box-shadow: none; background: var(--accent-soft); border-color: rgba(251,182,46,.15); }
.side-stats .stat-row { font-size: 11px; }
.progress-track { height: 6px; background: var(--surface-3); }
.progress-fill { background: linear-gradient(90deg, #e49c18, #ffd26d); }
.nav-item { min-height: 44px; font-size: 13px; font-weight: 550; border-radius: 10px; gap: 12px; }
.nav-item span, .bottom-nav span { background: transparent; width: 22px; height: 22px; }
.nav-item svg, .bottom-nav svg { width: 20px; height: 20px; display: block; }
.nav-item.is-active { background: var(--accent-soft); color: var(--accent); }
.nav-item.is-active span, .bottom-nav button.is-active span { background: transparent; color: var(--accent); }
.nav-item:hover { background: var(--surface-2); }
.side-actions { border: 0; box-shadow: none; background: transparent; padding: 14px 0 0; border-top: 1px solid var(--line-soft); }
.utility-button { text-align: left; font-size: 11px; font-weight: 500; min-height: 32px; border-radius: 8px; }
.workspace { max-width: 1580px; width: 100%; margin-inline: auto; padding: 24px clamp(24px, 3vw, 48px) 48px; }
.workspace-tools { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 12px; }
.workspace-label { color: var(--muted-2); font-size: 10px; letter-spacing: .14em; }
.mobile-brand { display: none; }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-soft); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 13px; font-size: 12px; }
.theme-toggle > span:first-child { font-size: 18px; line-height: 1; color: var(--accent); }
.topbar { align-items: center; border-bottom: 0; padding-bottom: 0; }
.topbar h2 { font-size: clamp(27px, 2.5vw, 38px); font-weight: 650; letter-spacing: -.045em; line-height: 1.2; margin-bottom: 8px; }
.topbar .muted { font-size: 13px; }
.topbar-metrics { min-width: 0; }
.metric-pill { font-size: 11px; font-weight: 550; padding: 5px 11px; }
.view-content { gap: 22px; padding-top: 28px; }
.metric-card { padding: 20px 22px; box-shadow: none; }
.metric-card span { font-size: 10px; letter-spacing: .08em; font-weight: 550; }
.metric-card strong { font-size: 29px; letter-spacing: -.04em; font-weight: 600; margin: 10px 0 8px; }
.metric-card .muted { font-size: 11px; }
.dashboard-layout { grid-template-columns: minmax(0, 1.4fr) minmax(300px, .85fr); gap: 22px; align-items: start; }
.panel-stack, .dashboard-stack { gap: 22px; }
.panel, .app-form { padding: 24px; }
.section-heading { margin-bottom: 20px; }
h3 { font-weight: 600; letter-spacing: -.015em; }
.section-heading .muted { font-size: 12px; }
.item-card { background: var(--surface-2); box-shadow: none; border-color: transparent; padding: 14px; border-radius: 12px; }
.item-title { font-weight: 600; font-size: 13px; }
.task-meta, .reward-meta { font-size: 11px; gap: 6px; }
.attribute-tag { font-weight: 550; font-size: 10px; padding: 2px 7px; background: var(--surface); }
.tag, .priority-pill { font-size: 10px; min-height: 24px; font-weight: 550; }
.check-button { border-color: var(--line); background: var(--surface); width: 38px; height: 38px; border-radius: 12px; }
.check-button.is-done { background: #fbb62e; border-color: #fbb62e; }
.primary-button, .buy-button { background: #fbb62e; color: var(--on-accent); font-size: 12px; font-weight: 700; border-radius: 10px; min-height: 42px; }
.ghost-button { font-size: 11px; font-weight: 550; min-height: 34px; border-radius: 8px; white-space: nowrap; }
.app-form { box-shadow: none; }
.field span, .field legend { font-weight: 550; font-size: 12px; }
input, select, textarea { border-radius: 10px; font-size: 13px; }
.mission-card, .reward-card, .achievement-card { box-shadow: none; padding: 20px; }
.panel .mission-card { background: var(--surface-2); }
.achievement-card.is-locked { opacity: 1; background: var(--surface-2); }
.achievement-card.is-locked h3 { color: var(--muted); }
.radar-wrap { min-height: 270px; }
.radar-svg { width: min(100%, 300px); }
.empty-state { background: var(--surface-2); font-size: 13px; }
:root[data-theme="light"] { --attribute-fuerza: #217443; --attribute-inteligencia: #285bb4; --attribute-disciplina: #986000; --attribute-carisma: #a52c55; --attribute-espiritu: #7145b4; --attribute-riqueza: #08796d; }
:root[data-theme="light"] .priority-alta, :root[data-theme="light"] .danger, :root[data-theme="light"] .danger-button { color: #a82b40; }
:root[data-theme="light"] .priority-media, :root[data-theme="light"] .habit-streak { color: #986000; }
:root[data-theme="light"] .priority-baja { color: #285bb4; }
:root[data-theme="light"] .radar-point { stroke: #fff; }
@media (max-width: 1200px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 16px; }
}
@media (max-width: 900px) {
  .workspace { padding: 20px 20px 32px; }
  .workspace-tools { margin-bottom: 24px; }
  .workspace-label { display: none; }
  .mobile-brand { display: block; background: #000; border-radius: 8px; padding: 7px 10px; width: 144px; }
  .mobile-brand img { width: 100%; height: auto; display: block; }
  .bottom-nav { background: var(--sidebar-bg); gap: 0; }
  .bottom-nav button { font-size: 10px; font-weight: 550; }
  .bottom-nav button.is-active { color: var(--accent); }
}
@media (max-width: 720px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .wide { grid-column: 1 / -1; }
  .section-heading { flex-wrap: wrap; }
  .panel, .app-form { padding: 18px; }
  .panel .metrics-grid { gap: 8px; }
  .metric-card { padding: 16px; }
}
@media (max-width: 420px) {
  .workspace { padding: 16px 14px 28px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.habit-calendar-top { color: var(--muted); }

.test-profile-note { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--accent-soft); font-size: 12px; color: var(--muted); }
.topbar h2:last-child { margin-bottom: 0; }

.radar-layout .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Interface refinement: progress, compact actions, collections and character. */
.collection-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; font-size:12px; }
.collection-toolbar .primary-button { display:inline-flex; align-items:center; gap:8px; }
.collection-toolbar .primary-button > span { font-size:20px; font-weight:400; }
.sidebar-emblem { width:50px; height:58px; display:grid; place-items:center; color:var(--accent); background:radial-gradient(ellipse, var(--accent-soft), transparent 75%); }
.sidebar-emblem svg { width:42px; height:48px; filter:drop-shadow(0 0 8px rgba(251,182,46,.15)); }
.visual-metrics { gap:14px; }
.visual-metric { position:relative; display:grid; grid-template-columns:36px 1fr; align-items:center; gap:12px; min-height:148px; overflow:hidden; }
.visual-metric .metric-icon { color:var(--metric-color); width:36px; height:40px; display:grid; place-items:center; background:color-mix(in srgb, var(--metric-color) 10%, transparent); border-radius:12px; }
.metric-icon svg { width:24px; height:24px; }
.visual-metric[data-metric="level"], .visual-metric[data-metric="coins"] { --metric-color:var(--accent); }
.visual-metric[data-metric="streak"] { --metric-color:#e98042; }
.visual-metric[data-metric="balance"] { --metric-color:#9981e8; }
.visual-metric > div > span { letter-spacing:.08em; }
.visual-metric strong { margin:4px 0 0; font-size:32px; font-weight:600; }
.visual-metric strong small { font-size:12px; font-weight:400; color:var(--muted); letter-spacing:0; }
.visual-metric .muted { grid-column:1/-1; font-size:10px; margin:0; align-self:end; }
.metric-ring { position:absolute; right:18px; bottom:19px; width:42px; height:42px; display:grid; place-items:center; border-radius:50%; background:conic-gradient(var(--metric-color) var(--ring), var(--surface-3) 0); }
.metric-ring::before { content:""; position:absolute; inset:3px; background:var(--surface); border-radius:50%; }
.metric-ring span { z-index:1; font-size:8px; color:var(--muted); font-weight:500; letter-spacing:0 !important; }
.visual-metric:has(.metric-ring) .muted { max-width:calc(100% - 48px); }
.streak-days { display:flex; gap:5px; grid-column:1/-1; }
.streak-days i { display:block; width:14px; height:5px; border-radius:3px; background:var(--surface-3); }
.streak-days i.active { background:var(--metric-color); }
.metric-link { grid-column:1/-1; justify-self:start; border:0; padding:0; background:transparent; color:var(--accent); font-size:11px; }
.action-row { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--line-soft); }
.action-row:last-child { border-bottom:0; }
.action-row .check-button { width:32px; height:32px; border-radius:10px; }
.action-copy { min-width:0; }
.action-copy .item-title { font-size:13px; line-height:1.35; margin:0 0 3px; }
.action-area { color:var(--muted); font-size:10px; display:flex; align-items:center; gap:6px; }
.action-area::before { content:""; width:5px; height:5px; border-radius:50%; background:var(--area-color); flex-shrink:0; }
.action-yield { font-size:10px; color:var(--muted-2); white-space:nowrap; }
.action-row.is-done .item-title { color:var(--muted); text-decoration:line-through; text-decoration-color:var(--muted-2); }
.compact-list:has(.action-row) { gap:0; }
.item-classification { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-top:10px; }
.difficulty-badge { display:inline-flex; align-items:center; gap:7px; border:1px solid color-mix(in srgb, var(--difficulty-color) 32%, transparent); background:color-mix(in srgb, var(--difficulty-color) 12%, transparent); color:var(--difficulty-color); padding:5px 9px; border-radius:7px; font-size:11px; font-weight:700; }
.difficulty-badge > span { font-size:9px; letter-spacing:1px; }
.difficulty-alta { --difficulty-color:#ee8495; }
.difficulty-media { --difficulty-color:var(--accent); }
.difficulty-baja { --difficulty-color:#62c79b; }
:root[data-theme="light"] .difficulty-alta { --difficulty-color:#af3048; }
:root[data-theme="light"] .difficulty-baja { --difficulty-color:#20734e; }
.item-classification .attribute-tag { padding:5px 9px; border-radius:7px; font-size:11px; font-weight:650; background:color-mix(in srgb, currentColor 7%, var(--surface)); }
.item-rewards { display:flex; gap:12px; color:var(--muted-2); font-size:10px; margin-top:8px; }
.habit-card { box-shadow:none; padding:22px; border-radius:18px; }
.habit-card .item-title { font-size:16px; margin:0; }
.habit-card-header { align-items:start; }
.habit-card-header > .check-button { margin-top:2px; }
.habit-card-actions .habit-streak { font-size:10px; min-height:25px; padding:0 8px; }
.habit-card-actions .danger-button { min-height:28px; padding:0 8px; font-size:10px; font-weight:500; border:0; background:transparent; }
.habit-calendar { border-color:var(--line-soft); }
.create-dialog { width:min(760px, calc(100vw - 32px)); max-height:calc(100dvh - 48px); padding:0; border:1px solid var(--border); border-radius:22px; background:var(--surface); color:var(--text); box-shadow:0 30px 100px #0006; overflow:auto; }
.create-dialog::backdrop { background:rgba(0,0,0,.65); backdrop-filter:blur(6px); }
.create-dialog .app-form { border:0; box-shadow:none; padding:32px; background:transparent; }
.create-dialog .section-heading { padding-right:30px; align-items:flex-start; }
.create-dialog .section-heading h3 { font-size:24px; }
.create-dialog .section-heading .primary-button { align-self:center; }
.create-dialog .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.dialog-close { position:absolute; right:12px; top:12px; z-index:1; width:28px; height:28px; border-radius:50%; font-size:20px; }
body:has(.create-dialog[open]) { overflow:hidden; }
.matrix-column { --quadrant:#8b92a6; background:linear-gradient(135deg, color-mix(in srgb,var(--quadrant) 10%,var(--surface)),var(--surface)); border:1px solid color-mix(in srgb,var(--quadrant) 35%,var(--border)); border-top:4px solid var(--quadrant); padding:24px; box-shadow:none; border-radius:16px; }
.matrix-column[data-tone="red"] { --quadrant:#df586d; }
.matrix-column[data-tone="gold"] { --quadrant:#d4a02b; }
.matrix-column[data-tone="blue"] { --quadrant:#5b8de5; }
.matrix-column[data-tone="muted"] { --quadrant:#92949f; }
.matrix-title { align-items:start; margin-bottom:24px; }
.matrix-title h3 { font-size:19px; color:var(--quadrant); }
.matrix-title .muted { font-size:11px; margin-top:5px; }
.matrix-title .metric-pill { border-color:color-mix(in srgb,var(--quadrant) 25%,transparent); color:var(--quadrant); background:color-mix(in srgb,var(--quadrant) 10%,transparent); }
.matrix-column .empty-state { background:transparent; border-color:color-mix(in srgb,var(--quadrant) 18%,transparent); min-height:110px; font-size:12px; }
:root[data-theme="light"] .matrix-column[data-tone="red"] { --quadrant:#b43147; }
:root[data-theme="light"] .matrix-column[data-tone="gold"] { --quadrant:#936300; }
:root[data-theme="light"] .matrix-column[data-tone="blue"] { --quadrant:#315fb3; }
:root[data-theme="light"] .matrix-column[data-tone="muted"] { --quadrant:#666875; }
.expedition { --mission-color:#fbb62e; padding:0; gap:0; overflow:hidden; border-color:color-mix(in srgb,var(--mission-color) 25%,var(--border)); border-radius:20px; }
.expedition[data-chapter="2"] { --mission-color:#ac8bea; }
.expedition[data-chapter="0"] { --mission-color:#77a7e4; }
.mission-banner { min-height:96px; display:flex; align-items:center; gap:14px; position:relative; padding:20px 24px; background:linear-gradient(135deg,color-mix(in srgb,var(--mission-color) 16%,var(--surface)),var(--surface)); border-bottom:1px solid color-mix(in srgb,var(--mission-color) 15%,transparent); }
.mission-banner::after { content:""; width:140px; height:140px; position:absolute; right:40px; top:-60px; border:1px solid color-mix(in srgb,var(--mission-color) 15%,transparent); transform:rotate(45deg); box-shadow:0 0 0 20px color-mix(in srgb,var(--mission-color) 3%,transparent),0 0 0 40px color-mix(in srgb,var(--mission-color) 2%,transparent); pointer-events:none; }
.mission-symbol { width:38px; height:42px; color:var(--mission-color); }
.mission-symbol svg { width:100%; height:100%; }
.mission-chapter { color:var(--muted); font-size:10px; letter-spacing:.18em; }
.mission-banner .icon-button { margin-left:auto; width:28px; height:28px; border-radius:50%; font-size:18px; color:var(--muted); z-index:1; }
.mission-body { padding:24px; display:grid; gap:14px; }
.mission-state { font-size:9px; letter-spacing:.16em; font-weight:650; color:var(--accent); }
.mission-body h3 { font-size:23px; line-height:1.15; letter-spacing:-.04em; overflow-wrap:anywhere; }
.mission-body > .muted { font-size:12px; line-height:1.6; }
.mission-numbers { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-top:6px; }
.mission-numbers strong { font-size:30px; font-weight:500; letter-spacing:-.04em; }
.mission-numbers small { font-size:14px; color:var(--muted); margin-left:2px; }
.mission-numbers > span, .mission-foot { font-size:10px; color:var(--muted); }
.expedition .progress-fill { background:var(--mission-color); }
.mission-foot { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; }
.expedition .buy-button { width:100%; background:var(--surface-2); border:1px solid var(--border); color:var(--text); min-height:36px; font-size:11px; }
.expedition.is-complete .buy-button:not(:disabled) { background:#fbb62e; color:#241a06; }
.panel .expedition { background:var(--surface); }
.dashboard-layout .mission-banner { min-height:70px; padding:14px 18px; }
.dashboard-layout .mission-body { padding:18px; gap:10px; }
.dashboard-layout .mission-body h3 { font-size:19px; }
.character-banner { display:flex; align-items:center; gap:26px; padding:30px; background:radial-gradient(ellipse at top right,rgba(251,182,46,.11),transparent 65%),var(--surface); border:1px solid color-mix(in srgb,#fbb62e 20%,var(--border)); border-radius:22px; }
.character-emblem { display:grid; place-items:center; width:112px; height:126px; flex-shrink:0; color:var(--accent); background:radial-gradient(ellipse,var(--accent-soft),transparent 70%); }
.character-emblem svg { width:90px; height:100px; filter:drop-shadow(0 0 12px #fbb62e22); }
.character-identity { flex:1; min-width:0; }
.character-identity h3 { font-size:27px; font-weight:550; letter-spacing:-.035em; line-height:1.2; }
.character-identity .muted { font-size:11px; margin:8px 0 0; }
.character-identity .progress-track { margin:20px 0 6px; max-width:440px; }
.character-level { display:flex; flex-direction:column; align-items:center; width:100px; color:var(--accent); }
.character-level > span { font-size:9px; letter-spacing:.22em; }
.character-level > strong { font-size:70px; line-height:1.1; font-weight:400; letter-spacing:-.05em; }
.character-sheet { grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); }
.attribute-panel .attribute-list { gap:10px; }
.attribute-row { padding:14px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); gap:10px; }
.attribute-name { display:inline-flex; align-items:center; gap:8px; }
.attribute-name i { display:grid; place-items:center; width:24px; height:24px; background:color-mix(in srgb,var(--area-color) 12%,transparent); color:var(--area-color); border-radius:7px; font-size:11px; font-style:normal; }
.attribute-label { font-size:12px; font-weight:550; }
.attribute-label > span:last-child { font-size:10px; color:var(--muted); }
.attribute-row .muted { font-size:10px; }
.test-profile-note { padding:10px 14px; font-size:10px; }
@media(min-width:901px) and (max-width:1300px) {
  .visual-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .habit-card-actions { grid-column:2/-1; justify-content:flex-start; }
}
@media(max-width:1120px) { .character-sheet { grid-template-columns:1fr; } }
@media(max-width:720px) {
  .visual-metric { padding:16px; gap:8px; min-height:145px; grid-template-columns:28px 1fr; }
  .visual-metric .metric-icon { width:28px; height:34px; border-radius:9px; }
  .metric-icon svg { width:21px; height:21px; }
  .visual-metric strong { font-size:28px; }
  .metric-ring { width:35px; height:35px; right:12px; bottom:15px; }
  .visual-metric .muted { font-size:9px; }
  .visual-metric > div > span { font-size:9px; }
  .action-row { gap:9px; padding:10px 0; }
  .action-copy .item-title { font-size:12px; }
  .action-yield { font-size:9px; }
  .habit-card { padding:18px; }
  .habit-card-header { grid-template-columns:38px minmax(0,1fr); }
  .habit-card .item-title { font-size:15px; }
  .habit-card-actions { grid-column:2/-1; justify-content:flex-start; }
  .item-classification { gap:5px; }
  .difficulty-badge, .item-classification .attribute-tag { font-size:10px; padding:4px 7px; }
  .character-banner { padding:22px 18px; gap:14px; flex-wrap:wrap; }
  .character-emblem { width:60px; height:72px; }
  .character-emblem svg { width:54px; height:64px; }
  .character-identity { flex-basis:calc(100% - 80px); }
  .character-identity h3 { font-size:22px; }
  .character-level { display:none; }
  .character-identity .progress-track { margin-top:12px; }
  .create-dialog { width:calc(100vw - 20px); max-height:calc(100dvh - 24px); border-radius:18px; }
  .create-dialog .app-form { padding:24px 18px; }
  .create-dialog .section-heading { flex-direction:column; gap:12px; padding-right:24px; }
  .create-dialog .section-heading .primary-button { align-self:flex-start; }
  .create-dialog .form-grid { grid-template-columns:1fr; }
  .matrix-column { padding:18px; }
  .matrix-title h3 { font-size:18px; }
  .collection-toolbar { font-size:11px; gap:8px; }
  .collection-toolbar .primary-button { font-size:11px; padding:0 10px; }
}

.dialog-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; position:sticky; bottom:-32px; background:var(--surface); border-top:1px solid var(--border); padding:16px 0 0; margin-top:8px; z-index:2; }
.dialog-actions .ghost-button { min-height:42px; }
.item-rewards { flex-wrap:wrap; gap:4px 12px; }
@media(max-width:720px) { .dialog-actions { bottom:-24px; padding:14px 0 4px; } }

.today-group + .today-group { margin-top:20px; padding-top:18px; border-top:1px solid var(--border); }
.today-group-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; }
.today-group-heading h4 { display:flex; align-items:center; gap:8px; margin:0; font-size:12px; font-weight:650; }
.today-group-heading h4 > span { display:grid; place-items:center; width:23px; height:23px; border-radius:7px; background:var(--accent-soft); color:var(--accent); font-size:16px; }
.today-tasks .today-group-heading h4 > span { background:rgba(91,141,229,.12); color:#77a7e4; }
:root[data-theme="light"] .today-tasks .today-group-heading h4 > span { color:#315fb3; }
.today-group-heading .metric-link { color:var(--muted); font-size:10px; }
.today-empty { padding:12px 0; font-size:12px; }

.today-habit-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:10px; margin-top:14px; }
.habit-tile { position:relative; min-width:0; display:flex; flex-direction:column; align-items:center; gap:8px; padding:18px 10px 12px; border:1px solid var(--border); border-radius:14px; background:var(--surface-2); color:var(--text); text-align:center; }
.habit-tile:hover { border-color:var(--tile-color); background:color-mix(in srgb,var(--tile-color) 6%,var(--surface-2)); }
.habit-tile-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:12px; background:color-mix(in srgb,var(--tile-color) 10%,transparent); color:var(--tile-color); }
.habit-tile-icon svg { width:26px; height:26px; }
.habit-tile-title { font-size:11px; line-height:1.35; font-weight:600; overflow-wrap:anywhere; min-height:30px; }
.habit-tile-status { font-size:9px; color:var(--muted-2); margin-top:auto; }
.habit-tile-check { position:absolute; top:8px; right:8px; display:grid; place-items:center; width:16px; height:16px; border-radius:50%; border:1px solid var(--line); font-size:10px; font-weight:750; }
.habit-tile.is-done { border-color:color-mix(in srgb,var(--tile-color) 40%,var(--border)); background:color-mix(in srgb,var(--tile-color) 8%,var(--surface)); }
.habit-tile.is-done .habit-tile-check { background:#fbb62e; border-color:#fbb62e; color:#241a06; }
.habit-tile.is-done .habit-tile-status { color:var(--tile-color); }
.today-habit-grid > .today-empty { grid-column:1/-1; }
@media(max-width:720px) {
  .today-habit-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .habit-tile { padding:18px 7px 12px; }
  .habit-tile-title { font-size:10px; }
}
@media(max-width:350px) { .today-habit-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
