:root {
  color-scheme: dark;
  --bg: #0b1020;
  --card: #151b35;
  --purple: #8b5cf6;
  --blue: #3b82f6;
  --text: #f8fafc;
  --muted: #a0a8c0;
  --line: #ffffff0d;
  --green: #6ad8b1;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #bca2ff;
}
.icon {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  vertical-align: middle;
}
.emoji {
  line-height: 1.2;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1.1px;
  font-weight: 680;
  line-height: 1.25;
}
h2 {
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.35px;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  background: #0e1428;
  border-right: 1px solid var(--line);
  padding: 37px 21px 0;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-left: 12px;
  font-size: 31px;
  letter-spacing: -1.4px;
  font-weight: 750;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #9a6bff, #6059ee);
  box-shadow: 0 5px 22px #8b5cf626;
}
.brand-mark .icon {
  width: 25px;
  height: 25px;
  fill: #fff;
  stroke-width: 1;
}
.brand-dot {
  color: #a78bfa;
}
.workspace-label {
  font-size: 9px;
  letter-spacing: 1.65px;
  color: #727c9c;
  padding-left: 13px;
  margin: 47px 0 15px;
  font-weight: 650;
}
nav {
  display: grid;
  gap: 7px;
}
nav a {
  height: 47px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border-radius: 9px;
  color: #9ca6c3;
  transition: 0.2s;
  font-size: 13px;
  font-weight: 500;
}
nav a:hover {
  background: #ffffff05;
  color: #fff;
}
nav a.active {
  background: linear-gradient(100deg, #8b5cf622, #6f60f511);
  color: #b89aff;
  border: 1px solid #8b5cf625;
}
nav a .icon {
  width: 19px;
  height: 19px;
}
.sidebar-bottom {
  margin-top: auto;
}
.sidebar {
  overflow-y: auto;
  scrollbar-width: thin;
}
.little-reminder {
  margin: 30px 0;
  padding: 22px 13px;
  border: 1px solid #ffffff0a;
  border-radius: 12px;
  background: radial-gradient(ellipse at top left, #8b5cf60c, transparent);
}
.little-reminder > span {
  color: #a38bcc;
  display: block;
  margin-bottom: 12px;
}
.little-reminder h3 {
  font-size: 12px;
  margin-bottom: 7px;
}
.little-reminder p {
  font-size: 11px;
  line-height: 1.9;
  color: #7d88a7;
}
.fact-card {
  padding: 18px 14px;
}
.fact-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.fact-symbol {
  color: #a38bcc;
  display: inline-flex;
}
.fact-symbol .icon {
  width: 20px;
  height: 20px;
}
.fact-refresh {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  border: 1px solid #8b5cf625;
  background: #8b5cf60c;
  color: #b096df;
  transition:
    color 0.2s,
    background 0.2s;
}
.fact-refresh:hover {
  color: #dfcaff;
  background: #8b5cf624;
}
.fact-refresh .icon {
  width: 15px;
  height: 15px;
}
.fact-card .fact-text {
  min-height: 90px;
  margin-top: 9px;
  color: #929fbc;
  line-height: 1.75;
}
.fact-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 9px;
}
.fact-topic {
  padding: 3px 6px;
  border-radius: 5px;
  color: #b79bdf;
  background: #8b5cf613;
}
.fact-meta a {
  color: #7d89a8;
  white-space: nowrap;
}
.fact-meta a:hover {
  color: #c1a2ef;
}
.mobile-facts {
  display: none;
}
@media (max-width: 850px) {
  .mobile-facts {
    display: block;
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 27px 30px;
  }
  .mobile-facts .fact-card {
    display: block;
    margin: 0;
    padding: 20px;
  }
  .mobile-facts .fact-text {
    min-height: 0;
    font-size: 12px;
  }
  .mobile-facts .fact-refresh {
    width: 38px;
    height: 38px;
  }
}
@media (max-width: 560px) {
  .mobile-facts {
    padding: 0 17px 24px;
  }
}
.personal-profile {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  height: 33px;
  width: 33px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #22243e;
  color: #a0a5c6;
}
.avatar .icon {
  width: 17px;
}
.personal-profile strong {
  font-size: 11px;
  font-weight: 550;
  display: block;
}
.personal-profile small {
  font-size: 10px;
  color: #7582a3;
}
.online-dot {
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: #78d6ad;
  margin-left: auto;
}
.app-shell {
  margin-left: 232px;
}
.topbar {
  height: 77px;
  border-bottom: 1px solid var(--line);
  padding: 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #98a2bf;
}
.topbar-right {
  display: flex;
  gap: 22px;
  align-items: center;
}
.local-badge {
  display: flex;
  align-items: center;
  gap: 7px;
}
.local-badge i {
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: #9e7edb;
}
#today-date {
  border-left: 1px solid #ffffff12;
  padding-left: 22px;
  color: #7e89a7;
}
main {
  padding: 35px 42px 40px;
  max-width: 1450px;
  margin: 0 auto;
  min-height: calc(100vh - 140px);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 27px;
  gap: 20px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  color: #a58dce;
  margin-bottom: 9px;
  font-weight: 650;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 9px;
}
.heading-note {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
  color: #919aba;
  white-space: nowrap;
}
.heading-note .icon {
  color: #ad96e4;
  width: 16px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  padding: 11px 17px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 550;
  transition:
    transform 0.18s,
    background 0.18s,
    box-shadow 0.18s;
  line-height: 1.5;
}
.button .icon {
  width: 16px;
  height: 16px;
}
.button:hover:not(:disabled) {
  transform: translateY(-1px);
}
.primary {
  background: linear-gradient(120deg, #895cf2, #6b5bea);
  box-shadow: 0 4px 15px #7056e61a;
  color: #fff;
}
.secondary {
  background: #192039;
  border-color: #ffffff0c;
  color: #c3c9dd;
}
.secondary:hover:not(:disabled) {
  background: #222a47;
}
.button.small {
  padding: 8px 12px;
  font-size: 11px;
}
.panel {
  background: var(--card);
  border: 1px solid #ffffff08;
  border-radius: 12px;
  box-shadow: 0 5px 17px #0000000a;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}
.quick-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.metric-top {
  display: flex;
  flex-direction: column-reverse;
  gap: 16px;
  color: #aab3ce;
  font-size: 10px;
  line-height: 1.6;
}
.metric-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}
.metric-icon .icon {
  width: 16px;
  height: 16px;
}
.purple {
  color: #af8df6;
  background: #8b5cf615;
}
.blue {
  color: #7dacf8;
  background: #3b82f615;
}
.green {
  color: #6ad8b1;
  background: #40bd9815;
}
.amber {
  color: #e9bd72;
  background: #f5b73d12;
}
.pink {
  color: #ee9bca;
  background: #ec6eb915;
}
.metric > strong {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin: 10px 0 5px;
}
.metric > small {
  font-size: 9px;
  color: #7c88a9;
  line-height: 1.8;
  max-width: 125px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 19px;
}
.section-heading p {
  font-size: 11px;
  color: #8894b2;
  margin-top: 5px;
}
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1c2540;
  border: 1px solid #ffffff08;
  font-size: 10px;
  color: #95a0bd;
  vertical-align: middle;
  border-radius: 5px;
  padding: 0 6px;
  height: 19px;
  margin-left: 6px;
}
.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
  gap: 15px;
}
.tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.tab {
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 13px;
  border-radius: 6px;
  font-size: 10px;
  color: #8c98b6;
  transition: 0.2s;
}
.tab:hover {
  background: #ffffff06;
  color: #e4dcff;
}
.tab.selected {
  background: #8b5cf618;
  border-color: #8b5cf61a;
  color: #b99cfb;
}
.repeat-note {
  font-size: 9px;
  color: #7583a3;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.repeat-note .icon {
  width: 13px;
  height: 13px;
}
.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.task-card {
  padding: 18px 18px 14px;
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
  min-width: 0;
}
.task-card:hover {
  border-color: #8b5cf637;
  box-shadow: 0 8px 24px #00000016;
  transform: translateY(-2px);
}
.task-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.task-icon {
  height: 36px;
  width: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #a58ce3;
  background: #8b5cf612;
}
.tone-nourish {
  color: #6bcbaa;
  background: #63c39813;
}
.tone-move {
  color: #93a4ff;
  background: #758af615;
}
.tone-focus {
  color: #c99ae9;
  background: #b06fdf13;
}
.tone-everyday {
  color: #ecc184;
  background: #e4ae5310;
}
.task-icon .icon {
  height: 21px;
  width: 21px;
}
.points-pill {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 5px;
  background: #8b5cf610;
  color: #b79bf1;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.points-pill span {
  font-size: 8px;
  font-weight: 400;
  color: #9d8bc3;
}
.task-card h3 {
  font-size: 14px;
  letter-spacing: -0.1px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.task-card > p {
  font-size: 11px;
  color: #7f8bab;
  margin-top: 5px;
}
.task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #ffffff06;
  margin-top: 19px;
  padding-top: 12px;
  min-height: 39px;
}
.category-label {
  font-size: 9px;
  color: #7f8ba9;
}
.claim-button {
  display: flex;
  gap: 4px;
  align-items: center;
  background: #8b5cf616;
  color: #bda0ff;
  border: 1px solid #8b5cf61b;
  padding: 6px 8px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: 550;
  white-space: nowrap;
  transition: 0.2s;
}
.claim-button:hover {
  background: #8b5cf635;
  border-color: #8b5cf660;
}
.claim-button .icon {
  width: 12px;
  height: 12px;
}
.minutes-input {
  border: 1px solid #ffffff12;
  background: #0e1529;
  border-radius: 5px;
  display: flex;
  align-items: center;
  font-size: 8px;
  padding-right: 6px;
  color: #8c97b5;
  min-width: 0;
}
.minutes-input input {
  width: 47px;
  background: transparent;
  border: 0;
  padding: 4px 2px 4px 6px;
  color: #cbd1e2;
  font-size: 10px;
  min-width: 0;
  appearance: textfield;
}
.minutes-input input::-webkit-inner-spin-button {
  appearance: none;
}
.recent-panel {
  margin-top: 28px;
  padding: 21px 23px;
}
.recent-panel .section-heading {
  margin-bottom: 8px;
}
.text-link {
  font-size: 10px;
  color: #b294ed;
  display: flex;
  gap: 7px;
  align-items: center;
}
.text-link .icon {
  width: 13px;
  height: 13px;
}
.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.activity-row:last-child {
  border-bottom: 0;
}
.activity-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
}
.activity-icon .icon {
  width: 17px;
  height: 17px;
}
.activity-icon .emoji {
  font-size: 20px;
}
.activity-description {
  min-width: 0;
  flex: 1;
}
.activity-description strong {
  font-size: 11px;
  font-weight: 500;
  display: block;
  overflow-wrap: anywhere;
}
.activity-description small {
  font-size: 9px;
  color: #7885a6;
  display: block;
  margin-top: 3px;
}
.activity-description small span {
  padding: 0 4px;
}
.activity-points {
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.activity-points small {
  font-size: 9px;
  font-weight: 400;
  opacity: 0.7;
}
.earned {
  color: #77d6b4;
}
.spent {
  color: #c7b5ef;
}
.empty-state {
  text-align: center;
  padding: 38px 16px;
  color: #828ead;
}
.empty-state > .icon {
  color: #9b85c4;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
}
.empty-state h3 {
  color: #b3bdd6;
  font-size: 13px;
  font-weight: 500;
}
.empty-state p {
  font-size: 11px;
  margin-top: 6px;
}
.empty-state button {
  margin-top: 18px;
}
footer {
  max-width: 1450px;
  display: flex;
  justify-content: space-between;
  padding: 0 42px 23px;
  margin: 0 auto;
  font-size: 9px;
  color: #52617e;
}
.shop-heading {
  margin-top: 30px;
}
.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 19px;
}
.reward-card {
  overflow: hidden;
}
.reward-visual {
  height: 145px;
  display: grid;
  place-items: center;
  position: relative;
  background:
    radial-gradient(ellipse at center, #69542b2b, transparent 80%), #171c30;
  overflow: hidden;
}
.reward-visual:before,
.reward-visual:after {
  content: "";
  position: absolute;
  border: 1px solid #ffffff05;
  border-radius: 50%;
  width: 155px;
  height: 155px;
}
.reward-visual:after {
  width: 215px;
  height: 215px;
}
.reward-visual > .emoji {
  font-size: 64px;
  filter: drop-shadow(0 9px 15px #00000030);
  transform: rotate(-9deg);
  transition: 0.3s;
  z-index: 1;
}
.reward-visual > .icon {
  width: 64px;
  height: 64px;
  color: #b6a0f0;
  z-index: 1;
}
.reward-card:hover .reward-visual > .emoji {
  transform: rotate(4deg) scale(1.08);
}
.reward-tone-1 {
  background:
    radial-gradient(ellipse at center, #67542c25, transparent 80%), #1d1d32;
}
.reward-tone-2 {
  background:
    radial-gradient(ellipse at center, #9a623327, transparent 80%), #201c2f;
}
.reward-tone-3 {
  background:
    radial-gradient(ellipse at center, #7a3e3829, transparent 80%), #201b30;
}
.reward-tone-4 {
  background:
    radial-gradient(ellipse at center, #5c477c35, transparent 80%), #1c1b35;
}
.reward-tone-5 {
  background:
    radial-gradient(ellipse at center, #83496525, transparent 80%), #211b31;
}
.reward-content {
  padding: 19px 21px 22px;
}
.reward-content > small {
  color: #8b91af;
  font-size: 10px;
}
.reward-content h3 {
  font-size: 17px;
  margin: 4px 0 12px;
}
.reward-price {
  font-size: 17px;
  color: #c6aff7;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.reward-price .icon {
  width: 16px;
  height: 16px;
}
.reward-price span {
  font-size: 10px;
  font-weight: 400;
  color: #9286ae;
  margin-left: 2px;
}
.purchase-button {
  width: 100%;
  margin-top: 19px;
  font-size: 11px;
}
.kind-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #8390ad;
  font-size: 11px;
  margin: 25px 0 0;
  text-align: center;
}
.kind-note .icon {
  color: #9f8bc9;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stats-grid .metric {
  padding: 20px;
}
.stats-grid .metric-top {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stats-grid .metric > small {
  max-width: none;
}
.stats-grid .metric > strong {
  font-size: 30px;
  margin-top: 15px;
}
.chart-panel {
  padding: 24px;
  margin-bottom: 24px;
}
.segment {
  display: flex;
  background: #0d1428;
  padding: 3px;
  border: 1px solid #ffffff07;
  border-radius: 7px;
  gap: 2px;
}
.segment button {
  border: 0;
  background: transparent;
  font-size: 10px;
  color: #8591ae;
  padding: 6px 13px;
  border-radius: 5px;
}
.segment button.selected {
  background: #292341;
  color: #c5adff;
}
.chart-layout {
  display: flex;
  gap: 15px;
  margin-top: 28px;
  height: 210px;
}
.chart-axis {
  width: 45px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 25px;
  font-size: 9px;
  color: #7985a3;
}
.bar-chart {
  flex: 1;
  display: flex;
  gap: 26px;
  align-items: flex-end;
  position: relative;
  min-width: 0;
  background: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent calc(50% - 1px),
    #ffffff05 50%
  );
  margin-bottom: 0;
}
.bar-column {
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  z-index: 1;
}
.bar-space {
  height: calc(100% - 25px);
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.chart-bar {
  width: 65%;
  max-width: 57px;
  min-height: 2px;
  background: linear-gradient(#9a75f7, #6552b9);
  border-radius: 5px 5px 0 0;
  position: relative;
  transition: height 0.3s;
  outline-offset: 4px;
}
.today-bar {
  background: linear-gradient(#b598ff, #8b5cf6);
}
.bar-label {
  height: 25px;
  padding-top: 10px;
  font-size: 9px;
  color: #8693b2;
}
.bar-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -5px);
  padding: 5px 8px;
  background: #362c54;
  color: #e6dcfb;
  white-space: nowrap;
  font-size: 10px;
  border: 1px solid #ffffff18;
  border-radius: 5px;
  z-index: 10;
}
.chart-bar:hover .bar-tooltip,
.chart-bar:focus .bar-tooltip {
  display: block;
}
.monthly {
  gap: 7px;
}
.monthly .chart-bar {
  width: 90%;
  border-radius: 3px 3px 0 0;
}
.chart-empty {
  text-align: center;
  color: #7c87a5;
  font-size: 11px;
  margin: 20px 0 0;
}
.breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.breakdown-panel {
  padding: 23px;
}
.breakdown-panel .section-heading > .icon {
  color: #8b78b9;
}
.breakdown-row {
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 11px;
}
.breakdown-row:last-child {
  border-bottom: 0;
}
.breakdown-row > span:nth-child(2) {
  flex: 1;
  overflow-wrap: anywhere;
  min-width: 0;
}
.breakdown-row > strong {
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}
.breakdown-row > strong > small {
  font-size: 9px;
  font-weight: 400;
  color: #7c89a9;
}
.archived {
  display: block;
  color: #7f8ba8;
  font-size: 9px;
}
.history-panel {
  padding: 23px;
}
.history-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 9px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.sort-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #7c89a8;
  white-space: nowrap;
}
select {
  background: #10172b;
  color: #c7cde0;
  border: 1px solid #ffffff12;
  border-radius: 6px;
  padding: 8px;
  max-width: 100%;
}
.sort-label select {
  font-size: 10px;
}
.row-actions {
  display: flex;
  gap: 5px;
  margin-left: 15px;
}
.icon-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: 0;
  color: #8a96b4;
  padding: 5px;
  border-radius: 6px;
  transition: 0.2s;
}
.icon-button .icon {
  width: 15px;
  height: 15px;
}
.icon-button:hover {
  color: #d5bfff;
  background: #8b5cf618;
}
.edit-item {
  padding: 3px;
  margin-left: 0;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #8390ad;
  margin-top: 20px;
  gap: 15px;
}
.pagination > div {
  display: flex;
  gap: 8px;
}
.add-card {
  min-height: 190px;
  border: 1px dashed #8b5cf64d;
  background: #8b5cf605;
  border-radius: 12px;
  color: #b7a0e3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: 0.2s;
}
.add-card:hover {
  background: #8b5cf612;
}
.add-card strong {
  font-size: 12px;
  font-weight: 500;
}
.add-card span {
  font-size: 10px;
  color: #7f8bab;
}
.delete-link {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: #b58aab;
  font-size: 10px;
  padding: 2px 0;
}
.delete-link .icon {
  width: 12px;
  height: 12px;
}
.reward-edit {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  background: #11172ba6;
  padding: 8px;
}
.balance-warning {
  padding: 12px 16px;
  border: 1px solid #d6a54c33;
  border-radius: 8px;
  background: #d6a54c0d;
  color: #d7be8a;
  font-size: 12px;
  margin-bottom: 20px;
}
dialog {
  width: 450px;
  max-width: calc(100% - 30px);
  border: 1px solid #ffffff18;
  border-radius: 17px;
  background: #151b35;
  color: var(--text);
  padding: 27px;
  box-shadow: 0 25px 100px #00000066;
}
dialog::backdrop {
  background: #050914ba;
  backdrop-filter: blur(6px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 23px;
}
.dialog-heading h2 {
  font-size: 21px;
}
.dialog-heading .icon-button {
  font-size: 25px;
  line-height: 1;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #b9c2d9;
  margin-bottom: 17px;
}
.field input,
.field select {
  padding: 10px 12px;
  background: #0d1428;
  border: 1px solid #ffffff18;
  border-radius: 7px;
  color: #e0e4f0;
  width: 100%;
  font-size: 13px;
}
.field input:focus,
.field select:focus {
  outline: 1px solid #9b7bde;
  border-color: #8b5cf6;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #bcc6de;
}
.checkbox-field input {
  accent-color: #8b5cf6;
}
.field-help {
  font-size: 11px;
  line-height: 1.8;
  color: #8e9abb;
  margin: 10px 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}
.form-error {
  color: #f6a8b0;
  font-size: 12px;
  margin-top: 12px;
}
.confirmation-copy {
  font-size: 15px;
  margin-bottom: 15px;
  overflow-wrap: anywhere;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: calc(50% + 116px);
  transform: translate(-50%, 16px);
  background: #25223d;
  color: #e3d5ff;
  z-index: 100;
  box-shadow: 0 8px 36px #00000055;
  border: 1px solid #b293f334;
  border-radius: 11px;
  padding: 13px 19px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 30px);
  width: max-content;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.error {
  color: #ffc2cf;
  border-color: #ee889a44;
  background: #352131;
}
#toast .icon {
  width: 17px;
  height: 17px;
}
.point-pop {
  position: fixed;
  pointer-events: none;
  z-index: 80;
  color: #d4bbff;
  font-weight: 700;
  font-size: 23px;
  text-shadow: 0 0 15px #8b5cf677;
  animation: float-points 1.3s ease-out forwards;
}
.purchase-burst {
  position: fixed;
  inset: 40% 50%;
  pointer-events: none;
  z-index: 80;
}
.purchase-burst i {
  position: absolute;
  width: 7px;
  height: 10px;
  border-radius: 2px;
  background: #a885ff;
  animation: confetti 1.2s ease-out forwards;
  transform: rotate(var(--angle));
  animation-delay: calc(var(--i) * 12ms);
}
.purchase-burst i:nth-child(3n) {
  background: #79aaff;
}
.purchase-burst i:nth-child(2n) {
  background: #e4c888;
}
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #a39bbc;
  min-height: 200px;
  font-size: 12px;
}
.loader {
  width: 17px;
  height: 17px;
  border: 2px solid #8b5cf629;
  border-top-color: #ab84ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 15px;
  background: #8b5cf6;
  padding: 10px 15px;
  z-index: 200;
  border-radius: 5px;
}
.skip-link:focus {
  top: 10px;
}
.noscript {
  position: fixed;
  inset: 20px;
  background: #1a203c;
  padding: 30px;
  z-index: 100;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes float-points {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -85px);
  }
}
@keyframes confetti {
  0% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
    translate: calc(cos(var(--angle)) * 180px)
      calc(sin(var(--angle)) * 180px + 80px);
    rotate: 220deg;
  }
}
@media (min-width: 1500px) {
  main {
    padding-top: 44px;
  }
  .task-card {
    padding: 23px;
  }
  .task-card h3 {
    font-size: 14px;
  }
  .task-card > p {
    font-size: 11px;
  }
  .claim-button {
    font-size: 11px;
  }
  .category-label {
    font-size: 10px;
  }
  .metric-top {
    font-size: 12px;
  }
  .metric > small {
    font-size: 11px;
  }
  .metric > strong {
    font-size: 32px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .task-top {
    margin-bottom: 20px;
  }
  .task-footer {
    margin-top: 24px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 204px;
    padding: 30px 15px 0;
  }
  .app-shell {
    margin-left: 204px;
  }
  .topbar {
    padding: 0 27px;
  }
  main {
    padding: 29px 27px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .quick-metrics .metric {
    padding: 15px 18px;
  }
  .quick-metrics .metric-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .quick-metrics .metric > small {
    max-width: none;
  }
  .quick-metrics .metric > strong {
    margin: 4px 0;
    font-size: 24px;
  }
  .quick-metrics {
    gap: 14px;
  }
  .heading-note {
    display: none;
  }
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stats-grid .metric-top {
    font-size: 11px;
  }
  .task-card {
    padding: 16px 13px 12px;
  }
  .task-grid {
    gap: 12px;
  }
  .task-card h3 {
    font-size: 11px;
  }
  .task-card > p {
    font-size: 9px;
  }
  .repeat-note {
    font-size: 8px;
  }
  .points-pill {
    font-size: 10px;
  }
  .points-pill span {
    font-size: 8px;
  }
  .task-footer {
    gap: 4px;
  }
  .claim-button {
    font-size: 8px;
    padding: 6px;
  }
  .category-label {
    font-size: 8px;
  }
  .edit-item {
    margin-left: -4px;
  }
  footer {
    padding: 0 27px 22px;
  }
  #toast {
    left: calc(50% + 102px);
  }
}
@media (max-width: 850px) {
  .sidebar {
    width: 77px;
    align-items: center;
    padding: 25px 10px 0;
  }
  .brand {
    padding: 0;
  }
  .brand > span:last-child,
  .workspace-label,
  nav a > span:last-child,
  .little-reminder,
  .personal-profile {
    display: none;
  }
  nav {
    margin-top: 40px;
    width: 100%;
  }
  nav a {
    padding: 0;
    justify-content: center;
    width: 49px;
  }
  .app-shell {
    margin-left: 77px;
  }
  .brand-mark {
    width: 36px;
    height: 39px;
  }
  .task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .task-card h3 {
    font-size: 13px;
  }
  .task-card > p {
    font-size: 10px;
  }
  .claim-button {
    font-size: 10px;
    padding: 7px 9px;
  }
  .category-label {
    font-size: 10px;
  }
  .points-pill {
    font-size: 11px;
  }
  .task-card {
    padding: 18px;
  }
  .reward-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .breakdown-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .history-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .row-actions {
    margin-left: 0;
  }
  .activity-description strong {
    font-size: 10px;
  }
  #toast {
    left: calc(50% + 38px);
  }
  .section-heading h2 {
    font-size: 17px;
  }
  .repeat-note {
    display: none;
  }
  h1 {
    font-size: 29px;
  }
  .chart-panel {
    padding: 20px;
  }
  .bar-chart {
    gap: 15px;
  }
  .bar-chart.monthly {
    gap: 4px;
  }
  .stats-grid {
    gap: 10px;
  }
  .stats-grid .metric {
    padding: 16px;
  }
  .stats-grid .metric-top {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 10px;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 13px;
  }
  .sidebar {
    position: fixed;
    inset: auto 0 0;
    width: auto;
    height: 68px;
    padding: 0 8px;
    background: #0e1428f5;
    backdrop-filter: blur(15px);
    border-top: 1px solid #ffffff0e;
    border-right: 0;
  }
  .brand {
    display: none;
  }
  .sidebar nav {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    height: 100%;
    align-items: center;
  }
  .sidebar nav a {
    width: auto;
    height: 53px;
    flex-direction: column;
    gap: 4px;
    border-radius: 8px;
    padding: 6px 1px;
    font-size: 8px;
  }
  .sidebar nav a > span:last-child {
    display: block;
  }
  .sidebar nav a .icon {
    width: 18px;
    height: 18px;
  }
  .sidebar-bottom {
    display: none;
  }
  .app-shell {
    margin-left: 0;
  }
  .topbar {
    height: 58px;
    padding: 0 18px;
    font-size: 9px;
  }
  .topbar-right {
    gap: 0;
  }
  .local-badge {
    display: none;
  }
  #today-date {
    border: 0;
    padding: 0;
    font-size: 9px;
  }
  main {
    padding: 26px 17px 24px;
    min-height: calc(100vh - 160px);
  }
  .page-heading {
    margin-bottom: 23px;
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.6px;
  }
  h1 {
    font-size: 27px;
    letter-spacing: -0.8px;
  }
  .page-heading p {
    font-size: 11px;
    line-height: 1.8;
    margin-top: 8px;
  }
  .overview-grid {
    gap: 13px;
    margin-bottom: 28px;
  }
  .quick-metrics {
    gap: 8px;
  }
  .quick-metrics .metric {
    padding: 13px 10px;
  }
  .quick-metrics .metric-top {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 10px;
    font-size: 9px;
  }
  .quick-metrics .metric > strong {
    font-size: 23px;
    margin: 8px 0 3px;
  }
  .quick-metrics .metric > small {
    font-size: 8px;
    line-height: 1.6;
  }
  .metric-icon {
    width: 27px;
    height: 27px;
    border-radius: 7px;
  }
  .metric-icon .icon {
    width: 14px;
    height: 14px;
  }
  .section-heading {
    gap: 10px;
    margin-bottom: 16px;
  }
  .section-heading h2 {
    font-size: 15px;
  }
  .section-heading p {
    font-size: 10px;
    max-width: 200px;
    line-height: 1.6;
  }
  .section-heading > .button {
    font-size: 9px;
    padding: 7px 9px;
    gap: 5px;
    white-space: nowrap;
  }
  .section-heading > .button .icon {
    width: 12px;
    height: 12px;
  }
  .filter-row {
    margin-bottom: 14px;
  }
  .tabs {
    gap: 3px;
  }
  .tab {
    font-size: 9px;
    padding: 6px 10px;
  }
  .task-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .task-card {
    padding: 18px;
  }
  .task-top {
    margin-bottom: 13px;
  }
  .task-card h3 {
    font-size: 14px;
  }
  .task-card > p {
    font-size: 11px;
  }
  .task-footer {
    margin-top: 16px;
    padding-top: 12px;
  }
  .claim-button {
    font-size: 11px;
    padding: 8px 12px;
    min-height: 42px;
  }
  .category-label {
    font-size: 10px;
  }
  .points-pill {
    font-size: 12px;
    padding: 4px 8px;
  }
  .points-pill span {
    font-size: 9px;
  }
  .task-icon {
    width: 38px;
    height: 38px;
  }
  .recent-panel {
    padding: 18px;
    margin-top: 22px;
  }
  .recent-panel .section-heading {
    align-items: flex-start;
  }
  .text-link {
    font-size: 9px;
    white-space: nowrap;
    gap: 3px;
  }
  .text-link .icon {
    width: 11px;
  }
  .recent-panel .section-heading p {
    max-width: 150px;
  }
  .activity-row {
    gap: 9px;
  }
  .activity-icon {
    width: 30px;
    height: 30px;
  }
  .activity-description strong {
    font-size: 10px;
  }
  .activity-description small {
    font-size: 8px;
  }
  .activity-points {
    font-size: 11px;
  }
  .activity-points small {
    font-size: 8px;
  }
  .empty-state {
    padding: 30px 10px;
  }
  .empty-state h3 {
    font-size: 12px;
  }
  .empty-state p {
    font-size: 10px;
    line-height: 1.8;
  }
  .reward-grid {
    gap: 12px;
  }
  .reward-visual {
    height: 112px;
  }
  .reward-visual > .emoji {
    font-size: 49px;
  }
  .reward-content {
    padding: 14px 12px 16px;
  }
  .reward-content h3 {
    font-size: 14px;
    line-height: 1.5;
    min-height: 42px;
  }
  .reward-content > small {
    font-size: 9px;
    display: block;
    line-height: 1.6;
    min-height: 28px;
  }
  .reward-price {
    font-size: 15px;
  }
  .reward-price span {
    font-size: 9px;
  }
  .purchase-button {
    font-size: 9px;
    padding: 9px 5px;
    margin-top: 14px;
    gap: 4px;
    min-height: 38px;
  }
  .purchase-button .icon {
    width: 12px;
    height: 12px;
  }
  .kind-note {
    font-size: 10px;
    align-items: flex-start;
    text-align: left;
    line-height: 1.8;
  }
  .kind-note .icon {
    margin-top: 2px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }
  .stats-grid .metric > strong {
    font-size: 27px;
  }
  .stats-grid .metric-top {
    flex-direction: row;
    align-items: center;
    font-size: 10px;
    gap: 6px;
  }
  .stats-grid .metric:last-child {
    grid-column: 1/-1;
  }
  .stats-grid .metric:last-child .metric-top {
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 10px;
  }
  .chart-panel {
    padding: 17px;
  }
  .chart-panel .section-heading {
    align-items: flex-start;
  }
  .chart-panel .section-heading h2 {
    font-size: 14px;
  }
  .chart-panel .section-heading p {
    font-size: 9px;
    max-width: 145px;
  }
  .segment button {
    padding: 5px 8px;
    font-size: 9px;
    white-space: nowrap;
  }
  .chart-layout {
    height: 170px;
    gap: 7px;
  }
  .chart-axis {
    font-size: 8px;
    width: 32px;
  }
  .bar-chart {
    gap: 10px;
  }
  .bar-chart.monthly {
    gap: 3px;
  }
  .bar-label {
    font-size: 8px;
  }
  .chart-empty {
    font-size: 10px;
    line-height: 1.8;
  }
  .bar-tooltip {
    font-size: 8px;
    white-space: normal;
    min-width: 60px;
    text-align: center;
  }
  .breakdown-panel {
    padding: 18px;
  }
  .breakdown-row {
    font-size: 10px;
  }
  .history-panel {
    padding: 15px;
  }
  .history-toolbar .tab {
    font-size: 8px;
    padding: 6px 8px;
  }
  .history-panel .activity-row {
    flex-wrap: wrap;
  }
  .history-panel .activity-description {
    flex-basis: calc(100% - 45px);
  }
  .history-panel .activity-points {
    margin-left: 39px;
  }
  .row-actions {
    margin-left: auto;
  }
  .pagination {
    font-size: 9px;
    align-items: flex-start;
    flex-direction: column;
  }
  .pagination > div {
    width: 100%;
    justify-content: space-between;
  }
  .pagination .button {
    font-size: 10px;
  }
  .sort-label,
  .sort-label select {
    font-size: 9px;
  }
  footer {
    padding: 0 18px 93px;
    font-size: 8px;
    gap: 20px;
  }
  #toast {
    left: 50%;
    bottom: 84px;
    font-size: 11px;
    padding: 12px 15px;
  }
  dialog {
    padding: 22px;
  }
  .dialog-heading h2 {
    font-size: 20px;
  }
  .balance-warning {
    font-size: 10px;
  }
  .minutes-input input {
    font-size: 12px;
    width: 53px;
  }
  .minutes-input {
    font-size: 10px;
  }
  .reward-edit {
    padding: 6px;
    right: 7px;
    top: 7px;
  }
  .add-card {
    min-height: 170px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Compact account header, shared across all four pages. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  background: #0b1020f2;
  backdrop-filter: blur(16px);
}
.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #8b5cf62e;
  border-radius: 8px;
  color: #bca2f5;
  background: #8b5cf612;
  white-space: nowrap;
}
.balance-chip .icon {
  width: 15px;
  height: 15px;
}
.balance-chip strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.balance-chip > span:last-child {
  color: #9b8cb7;
  font-size: 10px;
}
.logout-form {
  margin: 0;
}
.signout-button {
  min-height: 38px;
  background: transparent;
  border: 0;
  color: #9da9c5;
  font-size: 11px;
  padding: 8px 2px;
}
.signout-button:hover {
  color: #cfb7ff;
}
.sound-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #8b5cf62e;
  border-radius: 8px;
  color: #bca2f5;
  background: #8b5cf612;
  transition:
    background 0.2s,
    color 0.2s;
  flex-shrink: 0;
}
.sound-toggle .icon {
  width: 17px;
  height: 17px;
}
.sound-toggle:hover {
  background: #8b5cf62b;
  color: #ddcaff;
}
.sound-toggle.is-muted {
  color: #7d89a7;
  background: #ffffff03;
  border-color: #ffffff0c;
}
@media (max-width: 560px) {
  .topbar .topbar-right {
    gap: 8px;
  }
  .sound-toggle {
    width: 34px;
    height: 38px;
  }
}
.personal-profile > div:nth-child(2) {
  min-width: 0;
}
.personal-profile strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overview-grid .metric {
  min-height: 133px;
}
.overview-grid .metric-top {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.overview-grid .metric > small {
  max-width: none;
}
/* Account entry pages. Passwords are submitted directly to PHP. */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 13% 40%, #30215455, transparent 55%), #0b1020;
}
.auth-layout {
  max-width: 1110px;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 90px;
  align-items: center;
  padding: 48px 40px;
  margin: 0 auto;
}
.auth-story {
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-story .brand {
  padding-left: 0;
}
.auth-story h1 {
  font-size: 57px;
  line-height: 1.12;
  letter-spacing: -2px;
  margin: 18px 0 24px;
}
.auth-story h1 > span {
  color: #ad8aef;
}
.auth-story p {
  font-size: 14px;
  color: #99a4c1;
  line-height: 1.9;
}
.auth-story .auth-story-footer {
  font-size: 11px;
  color: #657492;
}
.auth-features {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 29px;
  color: #bca5df;
  font-size: 11px;
}
.auth-card {
  padding: 36px;
  box-shadow: 0 24px 80px #00000025;
}
.auth-card-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  color: #ba99fa;
  background: #8b5cf618;
  font-size: 28px;
  margin-bottom: 21px;
}
.auth-card h2 {
  font-size: 25px;
  letter-spacing: -0.6px;
}
.auth-subtitle {
  color: #8d9ab8;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 8px;
}
.auth-form {
  margin-top: 27px;
}
.auth-form .field {
  margin-bottom: 19px;
}
.auth-form .field input {
  min-height: 44px;
}
.auth-form .auth-username-help {
  margin-top: -11px;
  margin-bottom: 20px;
  font-size: 10px;
}
.auth-submit {
  width: 100%;
  margin-top: 3px;
  min-height: 43px;
  justify-content: space-between;
}
.auth-switch {
  font-size: 12px;
  color: #98a3bf;
  margin-top: 24px;
  text-align: center;
}
.auth-switch a {
  color: #bc9afb;
  margin-left: 5px;
}
.auth-switch a:hover {
  text-decoration: underline;
}
.auth-private {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #ffffff0a;
  font-size: 10px;
  color: #7582a2;
  text-align: center;
}
.auth-error {
  border: 1px solid #e487ac2e;
  border-radius: 7px;
  padding: 11px 13px;
  margin-top: 20px;
  color: #f2adc7;
  background: #b754790f;
  font-size: 12px;
}
@media (max-width: 850px) {
  .auth-layout {
    grid-template-columns: 1fr 380px;
    gap: 35px;
    padding: 35px 25px;
  }
  .auth-story {
    min-height: 580px;
  }
  .auth-story h1 {
    font-size: 43px;
  }
  .auth-card {
    padding: 28px;
  }
  .auth-features {
    flex-direction: column;
    gap: 9px;
  }
  .topbar-right {
    gap: 13px;
  }
  #today-date {
    display: none;
  }
}
@media (max-width: 560px) {
  .overview-grid .metric {
    min-height: 122px;
  }
  .overview-grid .metric-top {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 9px;
  }
  .topbar {
    padding: 0 17px;
    gap: 8px;
  }
  .topbar-right {
    gap: 12px;
  }
  .balance-chip {
    gap: 5px;
    padding: 6px 8px;
  }
  .balance-chip strong {
    font-size: 12px;
  }
  .balance-chip .icon {
    width: 13px;
    height: 13px;
  }
  .signout-button {
    font-size: 10px;
    min-height: 42px;
  }
  .auth-layout {
    display: block;
    padding: 29px 20px 35px;
    min-height: 100vh;
  }
  .auth-story {
    min-height: 0;
  }
  .auth-story .brand {
    display: flex;
    margin-bottom: 35px;
  }
  .auth-story .brand > span:last-child {
    display: inline;
  }
  .auth-story .eyebrow {
    font-size: 8px;
  }
  .auth-story h1 {
    font-size: 32px;
    letter-spacing: -0.9px;
    margin: 10px 0 13px;
  }
  .auth-story h1 br {
    display: none;
  }
  .auth-story h1 span:before {
    content: " ";
  }
  .auth-story p,
  .auth-features,
  .auth-story-footer {
    display: none;
  }
  .auth-card {
    margin-top: 25px;
    padding: 25px;
  }
  .auth-card h2 {
    font-size: 23px;
  }
  .auth-subtitle {
    font-size: 11px;
  }
  .auth-switch {
    font-size: 11px;
  }
}

/* A decorative bicycle rolls through the space beside the account controls. */
.cycling-lane {
  position: relative;
  flex: 1;
  align-self: stretch;
  min-width: 0;
  overflow: hidden;
  pointer-events: none;
  margin-right: 24px;
}
.cycling-track {
  position: absolute;
  left: -72px;
  width: calc(100% + 72px);
  height: 100%;
  animation: bike-ride-across 16s linear infinite;
  will-change: transform;
}
.header-bike {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 38.4px;
}
.bike-wheel,
.bike-crank {
  transform-box: fill-box;
  transform-origin: center;
  animation: bike-wheel-turn 0.85s linear infinite;
}
@keyframes bike-ride-across {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}
@keyframes bike-wheel-turn {
  to {
    transform: rotate(360deg);
  }
}
.topbar-right {
  flex-shrink: 0;
}
@media (max-width: 560px) {
  .cycling-lane {
    margin-right: 7px;
  }
  .cycling-track {
    animation-duration: 10s;
  }
  .header-bike {
    width: 56px;
    height: 33.6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cycling-track {
    animation: none;
    transform: translateX(84px);
  }
  .bike-wheel,
  .bike-crank {
    animation: none;
  }
}

/* Account preferences and completion correction. */
#settings { width: 460px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.setting-row { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:19px 0; border-bottom:1px solid #ffffff0c; cursor:pointer; }
.setting-row strong { display:block; font-size:14px; color:#e9e5f6; margin-bottom:5px; }
.setting-row small { display:block; color:#8f9bb7; font-size:12px; line-height:1.6; max-width:290px; }
.setting-switch { appearance:none; -webkit-appearance:none; width:42px; height:24px; flex:0 0 42px; border:1px solid #ffffff20; border-radius:20px; background:#30364f; cursor:pointer; position:relative; transition:background .2s; }
.setting-switch::after { content:""; position:absolute; left:3px; top:3px; width:16px; height:16px; background:#c8cede; border-radius:50%; transition:transform .2s; }
.setting-switch:checked { background:#8b5cf6; border-color:#a080ed; }
.setting-switch:checked::after { transform:translateX(18px); background:white; }
.setting-switch:disabled { opacity:.45; cursor:wait; }
.notification-hint { margin:12px 0 18px; color:#c2ace9; line-height:1.7; }
.notification-hint:empty { display:none; }
.reminder-time { margin-top:20px; max-width:190px; }
.reminder-time input { color-scheme:dark; }
.timezone-note { margin-top:-5px; }
.undo-button,.toast-undo { border:1px solid #a98ad538; background:#a78bfa0b; color:#baa4ed; border-radius:7px; padding:7px 9px; display:inline-flex; align-items:center; gap:5px; flex-shrink:0; font-size:11px; }
.undo-button:hover,.toast-undo:hover { background:#a78bfa25; color:#eee5ff; }
.undo-button .icon { width:13px; height:13px; }
#toast { max-width:calc(100vw - 30px); white-space:normal; visibility:hidden; }
#toast.visible { pointer-events:auto; visibility:visible; }
#toast > span { min-width:0; }
.toast-undo { color:#e0cfff; margin-left:5px; }
.auth-language { display:flex; align-items:center; justify-content:flex-end; flex-direction:row; margin:-8px 0 18px; font-size:11px; }
.auth-language select { width:auto; padding:7px 10px; }
@media(max-width:560px) {
 .activity-row { flex-wrap:wrap; column-gap:9px; }
 .activity-description { flex:1; min-width:90px; }
 .undo-button { margin-left:auto; font-size:10px; padding:6px; }
 .undo-button .icon { display:none; }
 .activity-points { margin-left:0; }
 .topbar-right .signout-button { padding:0 9px; }
 #toast { gap:7px; padding:12px; }
 .toast-undo { font-size:10px; padding:8px; }
}

.phone-title { display: none; }
@media (max-width: 560px) {
  .phone-title { display: inline; }
  .wide-title, .page-heading .eyebrow, .page-heading p, .page-heading .heading-note,
  .section-heading p, .metric > small, .quick-metrics .metric > small,
  .task-card > p, .task-footer .category-label, .reward-content > small,
  .auth-story h1, .auth-subtitle, .auth-private, .kind-note, .app-shell footer,
  .setting-row small, .add-card > span { display: none; }

  .app-shell { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .sidebar { height: calc(68px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  .sidebar nav a { font-size: 12px; gap: 4px; font-weight: 600; }
  .sidebar nav a .icon { width: 21px; height: 21px; }
  .topbar { height: 64px; padding-inline: 14px; }
  .topbar .sound-toggle, .icon-button, .mobile-facts .fact-refresh {
    width: 44px; height: 44px; flex-shrink: 0;
  }
  #settings-button .icon { width: 23px; height: 23px; }
  .topbar .signout-button, .balance-chip strong { font-size: 15px; }
  .balance-chip > span:last-child { font-size: 13px; }
  .topbar .signout-button { min-height: 44px; }
  .page-heading { margin-bottom: 18px; }
  .quick-metrics .metric { padding: 13px 10px; }
  .quick-metrics .metric-top { font-size: 14px; line-height: 1.25; }
  .quick-metrics .metric-icon { display:none; }
  .quick-metrics .metric > strong { font-size: 24px; }
  .section-heading { flex-wrap: wrap; align-items: center; row-gap: 8px; }
  .section-heading h2, .chart-panel .section-heading h2 { font-size: 19px; }
  .tabs { flex-wrap: wrap; gap: 4px; max-width:100%; }
  .button, .section-heading > .button, .tab, .history-toolbar .tab,
  .segment button, .pagination .button, .delete-link, .text-link, .undo-button, .toast-undo {
    min-height:44px; font-size:14px; padding:8px 11px; line-height:1.25;
  }
  .text-link { display:inline-flex; align-items:center; }
  .task-card { padding:16px; }
  .task-card h3, .reward-content h3 { font-size:18px; line-height:1.35; overflow-wrap:anywhere; }
  .task-footer { gap:12px; margin-top:12px; padding-top:0; border:0; }
  .claim-button { flex:1; justify-content:center; font-size:16px; font-weight:650; min-height:46px; }
  .points-pill, .points-pill span, .minutes-input { font-size:14px; }
  .minutes-input input { font-size:16px; min-height:44px; }
  .reward-grid { grid-template-columns:1fr; }
  .reward-card { display:grid; grid-template-columns: minmax(78px,28%) minmax(0,1fr); }
  .reward-visual { height:100%; min-height:120px; }
  .reward-content { padding:14px; }
  .reward-content h3 { min-height:0; margin:0; }
  .purchase-button { min-height:46px; font-size:15px; margin-top:10px; }
  .reward-price span, .stats-grid .metric-top, .breakdown-row, .activity-description strong,
  .activity-points, .sort-label, .pagination, .empty-state p, .chart-empty,
  .fact-card .fact-text, .mobile-facts .fact-text { font-size:15px; line-height:1.45; }
  .activity-description small, .activity-points small, .breakdown-row small,
  .fact-meta, .fact-topic, .fact-meta a, .bar-label, .chart-axis, .bar-tooltip { font-size:12px; }
  .chart-axis { width:auto; min-width:32px; }
  .empty-state h3 { font-size:17px; }
  .history-toolbar .tabs { flex-wrap:wrap; }
  .field, .setting-row strong, .auth-switch { font-size:16px; }
  .field input, .field select, .sort-label select { font-size:16px; min-height:44px; }
  .field-help, .form-error, .auth-error, .balance-warning, .checkbox-field,
  #settings-status, .dialog-actions .button { font-size:14px; line-height:1.45; }
  .setting-row { min-height:56px; padding:13px 0; }
  #toast { bottom:calc(78px + env(safe-area-inset-bottom)); font-size:14px; }
  .auth-story .brand { margin-bottom:0; }
}
@media (max-width: 560px) {
  .section-heading .count-badge { display:none; }
  .filter-row .tabs { gap:2px; }
  .filter-row .tab { padding-inline:7px; }
  .task-card .claim-button:focus-visible, .sidebar nav a:focus-visible {
    outline:2px solid #c4a8ff;
    outline-offset:2px;
  }
}

.profile-heading h1, .scan-page h1 { margin: 0 0 20px; font-size: clamp(28px,4vw,40px); line-height: 1.15; letter-spacing: -.04em; }
.profile-account { display: flex; align-items: center; gap: 14px; padding: 18px; }
.profile-account strong { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 19px; }
.profile-account .avatar { flex: none; }
.profile-sections { display: flex; gap: 4px; border-radius: 14px; padding: 4px; background: #11162b; margin: 18px 0 20px; width: fit-content; }
.profile-sections a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; color: var(--muted); font-weight: 600; }
.profile-sections a[aria-current] { background: #302753; color: #e1d5ff; border-radius: 10px; }
.order-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.order-controls button { min-height: 44px; padding: 6px 10px; flex: 1; }
.order-controls button:disabled { opacity: .4; }
.scan-page { max-width: 620px; margin-inline: auto; }
.scan-card { overflow: hidden; }
.scan-frame { position: relative; display: grid; place-items: center; height: clamp(156px,27vh,250px); background: radial-gradient(ellipse at center,#322951,#1a1932 70%); border-bottom: 1px solid var(--line); }
.frame-corners { position: absolute; inset: 20px; color: #b99de3; background: linear-gradient(currentColor,currentColor) top left,linear-gradient(currentColor,currentColor) top right,linear-gradient(currentColor,currentColor) bottom left,linear-gradient(currentColor,currentColor) bottom right; background-size: 18px 2px; background-repeat: no-repeat; }
.frame-corners::before { content: ''; position: absolute; inset: 0; background: linear-gradient(currentColor,currentColor) top left,linear-gradient(currentColor,currentColor) top right,linear-gradient(currentColor,currentColor) bottom left,linear-gradient(currentColor,currentColor) bottom right; background-repeat: no-repeat; background-size: 2px 18px; }
.scan-symbol { display: grid; place-items: center; color: #d7c7f5; border-radius: 18px; background: #ffffff0a; width: 70px; height: 70px; }
.scan-symbol .icon { width: 38px; height: 38px; }
.scan-photo { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: contain; background: #111528; }
.scan-content { padding: 22px; }
.scan-content h2,.scan-content h3,.scan-content p { margin: 0; }
.scan-content p { margin-top: 6px; font-size: 15px; color: #bac1d5; }
.scan-buttons { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.scan-buttons label { position: relative; min-height: 46px; flex: 1; cursor: pointer; white-space: nowrap; }
.photo-input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.scan-buttons label:focus-within { outline: 2px solid #cfbbff; outline-offset: 2px; }
.scan-result:not(:empty) { margin-top: 18px; border-top: 1px solid #ffffff18; padding-top: 14px; }
.scan-result h3 { font-size: 22px; }
.estimate { display: flex; flex-wrap: wrap; gap: 18px; margin: 16px 0 10px; }
.estimate label,.estimate div { display: grid; gap: 5px; align-content: start; }
.estimate input { color: var(--text); font: inherit; font-size: 16px; border: 1px solid #454362; background: var(--bg); border-radius: 9px; width: 110px; min-height: 44px; padding: 6px 12px; }
.estimate output { color: #ddceff; font-size: 22px; font-weight: 700; }
.scan-result .text-link { display: inline-flex; min-height: 44px; align-items: center; }
.reference-name { display: inline-block; margin-left: 6px; color: var(--muted); }
@media (max-width:560px) {
  .sidebar { inset: auto 8px calc(10px + env(safe-area-inset-bottom)) 8px; height: 66px; padding: 3px 6px; border: 1px solid #ffffff20; border-radius: 17px; box-shadow: 0 6px 24px #05071299; }
  .app-shell { padding-bottom: calc(98px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .profile-account { flex-wrap: wrap; gap: 10px; }
  .profile-account button { min-height: 44px; }
  .profile-sections { width: 100%; }
  .profile-sections a { flex: 1; padding: 0 7px; font-size: 15px; }
  .scan-content { padding: 16px; }
  .scan-buttons .button { padding-inline: 11px; font-size: 15px; }
  .order-controls button { font-size: 14px; }
}
/* Keep the local Herd editor overlay clear of the phone navigation. */
@media (max-width: 560px) { #herd-ai-host { display: none !important; } }

.scan-food-choice { display:block; margin-top:14px; padding:10px; width:100%; min-height:44px; background:var(--bg); color:var(--text); border:1px solid #454362; border-radius:9px; font-size:16px; }
.scan-result [data-suggestion] { margin-top:8px; min-height:44px; }

.scan-result details summary { width:fit-content; padding:12px 0; cursor:pointer; color:#c8b5f7; font-size:15px; }

#foods-page { max-width: 860px; margin-inline:auto; }
.food-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.food-heading h1 { margin:0; font-size:clamp(28px,4vw,40px); letter-spacing:-.04em; }
.food-heading-mark { width:48px; height:48px; display:grid; place-items:center; border-radius:16px; background:#292042; color:#c8b5f7; }
.food-heading-mark .icon { width:26px; height:26px; }
.food-tools { display:flex; gap:10px; }
.food-tools > * { flex:1; min-height:48px; font-size:16px; }
.food-tools label { position:relative; cursor:pointer; }
.food-photo-input { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.food-tools label:focus-within { outline:2px solid #c4a8ff; outline-offset:3px; }
#food-status { font-size:15px; color:#c1b6df; margin:10px 0; }
#food-status:empty { display:none; }
#food-photo-result:not(:empty) { border:1px solid var(--line); border-radius:16px; margin-top:14px; overflow:hidden; background:var(--card); }
#food-photo-result img { width:100%; height:170px; object-fit:contain; background:#111528; }
#food-photo-result p { margin:0; padding:14px; color:var(--muted); font-size:15px; }
.meal-builder { padding:22px; margin:20px 0; }
.meal-builder .section-heading { margin:0; gap:10px; align-items:baseline; }
.meal-builder .section-heading h2 { font-size:22px; }
#meal-total { color:#dacaff; font-size:24px; white-space:nowrap; }
.meal-line { display:flex; gap:8px; border-bottom:1px solid #ffffff0c; align-items:center; padding-block:6px; }
.food-pick { display:flex; flex-direction:column; flex:1; min-width:0; align-items:flex-start; text-align:left; gap:4px; min-height:60px; padding:12px 0; background:none; border:0; }
.food-pick strong { font-size:16px; line-height:1.4; overflow-wrap:anywhere; }
.food-pick span { color:var(--muted); font-size:14px; }
.meal-line .icon-button, .food-row .icon-button, .saved-meal .icon-button { flex-shrink:0; width:44px; height:44px; }
#save-meal-form { display:flex; align-items:flex-end; gap:12px; margin-top:18px; }
#save-meal-form .field { flex:1; min-width:0; margin:0; }
#save-meal-form button { min-height:46px; flex-shrink:0; }
.meal-builder > .text-link { margin-top:8px; background:none; border:none; color:var(--muted); }
.food-tabs { display:flex; gap:4px; padding:5px; background:#11162b; border-radius:14px; margin-bottom:20px; }
.food-tabs button { min-height:46px; border:0; background:none; color:var(--muted); flex:1; border-radius:10px; padding:8px; font-weight:600; }
.food-tabs button[aria-pressed="true"] { color:#e0d4ff; background:#302753; }
#food-search-form { display:flex; align-items:flex-end; gap:10px; }
#food-search-form .field { flex:1; min-width:0; margin:0; }
#food-search-form button { min-height:46px; }
#foods-page input, #foods-page select { font-size:16px; }
.food-results { margin-top:14px; border:1px solid var(--line); border-radius:16px; background:#11172b; padding:0 16px; }
.food-row { display:flex; align-items:center; gap:8px; border-bottom:1px solid var(--line); }
.food-row:last-child { border:0; }
.food-row > .icon { flex-shrink:0; color:#bea6fa; pointer-events:none; }
.food-empty { color:var(--muted); font-size:15px; margin:0; padding:18px 0; }
.food-sources { font-size:13px; line-height:1.7; color:var(--muted); margin-top:20px; }
.food-sources a { color:#c3a9f6; text-decoration:underline; text-underline-offset:3px; }
.saved-meal { padding:18px; margin-bottom:12px; }
.saved-meal h3 { margin:0; font-size:18px; overflow-wrap:anywhere; }
.saved-meal p { color:var(--muted); font-size:15px; margin:6px 0 14px; }
.saved-meal > div { display:flex; gap:8px; justify-content:space-between; align-items:center; }
#food-editor, #barcode-editor { width:min(500px,calc(100vw - 28px)); padding:22px; max-height:calc(100dvh - 32px); overflow-y:auto; }
#food-editor h2 { font-size:21px; overflow-wrap:anywhere; }
#food-editor #food-selected-total { display:block; color:#d3bafa; font-size:28px; font-weight:700; margin-block:12px; }
#food-editor p { font-size:15px; }
#food-source { color:#c3a9f6; text-decoration:underline; }
.food-favourite { display:flex; align-items:center; gap:10px; font-size:16px; min-height:44px; }
.food-favourite input { width:22px; height:22px; accent-color:#a47bfb; }
#barcode-video { width:100%; min-height:120px; max-height:36dvh; object-fit:cover; border-radius:12px; background:#080b15; }
#barcode-status { font-size:15px; color:var(--muted); }
#foods-page [hidden] { display:none !important; }
@media(max-width:560px) {
  .meal-builder { padding:16px; }
  #save-meal-form { flex-direction:column; align-items:stretch; }
  .food-tabs button { font-size:14px; }
  #food-search-form { gap:7px; }
  .food-tools { gap:8px; }
  .food-tools > * { font-size:15px; padding:10px; }
  #food-editor .dialog-actions { flex-wrap:wrap; }
  #food-editor .dialog-actions button { flex:1; min-height:46px; }
}

#foods-page .icon-button .icon, .food-tools .icon { width:20px; height:20px; }
