*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f4ecdf;
  --surface: #ffffff;
  --surface-soft: #fbfaf8;
  --text: #171717;
  --muted: #6b7280;
  --line: #e5e1da;
  --dark: #26211d;
  --green: #047857;
  --green-bg: #dff5ea;
  --blue: #1d4ed8;
  --blue-bg: #dbeafe;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --red: #b91c1c;
  --red-bg: #fee2e2;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(39, 32, 26, .08);
  --radius: 10px;
  --max-w: 840px;
  --sidebar-w: 220px;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, .72), transparent 22rem),
    radial-gradient(circle at 85% 80%, rgba(190, 151, 96, .12), transparent 28rem),
    repeating-linear-gradient(0deg, rgba(94, 65, 32, .025) 0 1px, transparent 1px 5px),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-size: 100% 100%, 100% 100%, auto, auto;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

#app {
  height: 100%;
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ─── */

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  z-index: 20;
  flex-shrink: 0;
  width: var(--sidebar-w);
  height: 100vh;
  max-height: 100vh;
  background: #2f2924;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-toggle {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-close {
  display: none;
}

.sidebar-brand {
  padding: 1.6rem 1.2rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.sidebar-eyebrow {
  color: #f7c974;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-title {
  margin-top: .15rem;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.15;
}

.sidebar-nav {
  flex: 1;
  padding: .6rem .6rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  padding: .7rem .75rem;
  border: none;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.sidebar-item.active {
  background: rgba(192, 138, 47, .22);
  color: #f7c974;
}

.sidebar-icon {
  font-size: 1.15rem;
  width: 1.4rem;
  text-align: center;
  flex-shrink: 0;
}


/* ─── Main area ─── */

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  transition: background-color .2s ease;
}

.app-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.2rem 1rem 3rem;
  width: 100%;
}

.main-area.lol-active {
  position: relative;
  background: #07111f;
}

.main-area.lol-active::before {
  content: '';
  position: sticky;
  top: 0;
  z-index: 5;
  display: block;
  width: 100%;
  height: 5px;
  background: #f5c64a;
}

.app-shell.lol-shell {
  max-width: 1040px;
  padding-top: 1.7rem;
}

.app-shell.dashboard-shell {
  max-width: 1180px;
}

.app-shell.routes-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
}

.app-shell.todo-shell {
  max-width: 1200px;
}

/* ─── Animations ─── */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.calendar-view {
  animation: fadeIn .2s ease;
}

.route-table {
  animation: fadeIn .2s ease;
}

/* ─── Life dashboard ─── */

.life-dashboard {
  animation: fadeIn .25s ease;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1rem;
}

.dashboard-welcome {
  padding: 1.1rem 0 1.5rem;
}

.dashboard-eyebrow,
.dashboard-section-kicker {
  color: #a16207;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.dashboard-welcome h2 {
  margin-top: .15rem;
  color: var(--dark);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: -.04em;
  line-height: 1.2;
}

.dashboard-welcome > p:last-child {
  margin-top: .45rem;
  color: var(--muted);
  font-size: .95rem;
}

.dashboard-search {
  margin-bottom: 0;
}

.dashboard-search form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  min-height: 4.25rem;
  padding: .45rem .55rem .45rem 1.35rem;
  border: 1px solid #ded7ce;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 2px 5px rgba(66, 52, 38, .04), 0 12px 28px rgba(66, 52, 38, .09);
}

.search-field {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: .8rem;
  padding: 0;
}

.search-field-icon {
  color: var(--muted);
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.search-field input::placeholder {
  color: #9ca3af;
}

.search-enter-hint {
  margin-right: .9rem;
  color: #9b948c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  font-weight: 700;
}

.search-engine-menu {
  position: relative;
  padding-left: .9rem;
  border-left: 1px solid #ded7ce;
}

.search-engine-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 11px;
  background: #9a671e;
  color: #fff;
  cursor: pointer;
  list-style: none;
  transition: background .15s, transform .15s;
}

.search-engine-menu summary::-webkit-details-marker {
  display: none;
}

.search-engine-menu summary:hover {
  background: #805316;
  transform: translateY(-1px);
}

.search-engine-menu summary svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
}

.search-engine-options {
  position: absolute;
  top: calc(100% + .6rem);
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 8.2rem;
  padding: .35rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 12px 26px rgba(39, 32, 26, .16);
}

.search-engine-options button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  padding: .45rem .6rem;
  font-size: .8rem;
  font-weight: 700;
  text-align: left;
}

.search-engine-options button:hover,
.search-engine-options button.active {
  background: var(--amber-bg);
  color: var(--amber);
}

.gradient-sky-frame {
  display: flex;
  justify-content: center;
  overflow: hidden;
  border-radius: 20px;
}

.gradient-sky-frame iframe {
  display: block;
  width: min(100%, 420px);
  max-width: 100%;
  border: 0;
}

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

.dashboard-section {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  box-shadow: var(--shadow);
}

.life-dashboard > .dashboard-section + .dashboard-section {
  margin-top: 1rem;
}

.dashboard-widget-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.dashboard-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-section-heading h3 {
  margin-top: .1rem;
  color: var(--dark);
  font-size: 1.15rem;
  line-height: 1.3;
}

.dashboard-section-note {
  color: var(--muted);
  font-size: .75rem;
  white-space: nowrap;
}

.tracking-board {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid #d9e0e8;
  border-radius: 3px;
  background: #fbfcfd;
  box-shadow: var(--shadow);
}

.tracking-board-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.3rem;
  padding: .7rem 1.1rem;
  border-bottom: 1px solid #d9e0e8;
  background: #fff;
}
.tracking-view-heading { position: absolute; top: 50%; left: 50%; display: flex; align-items: center; flex-direction: column; gap: .1rem; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.tracking-view-heading strong { color: #17283a; font-size: 1.2rem; letter-spacing: .12em; line-height: 1.1; }
.tracking-view-heading small { color: #263a4d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; font-weight: 800; letter-spacing: .04em; }

.tracking-board-views { display: flex; gap: .45rem; }
.tracking-view-button,
.tracking-board-settings {
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid #1b9a5c;
  border-radius: 5px;
  background: #f4fff8;
  color: #178b53;
  font-weight: 800;
}
.tracking-view-button.active { background: #19283b; border-color: #19283b; color: #fff; }
.tracking-board-settings { margin-left: auto; border-color: #315ba4; background: #f3f8ff; color: #315ba4; }
.tracking-sync-status { color: #5b6b79; font-size: .62rem; white-space: nowrap; }
.tracking-board-clock { display: flex; gap: 1.2rem; margin-left: auto; padding-left: 1.2rem; border-left: 1px solid #e1e5ea; color: #66717d; font-size: .56rem; letter-spacing: .07em; }
.tracking-board-clock[hidden] { display: none !important; }
.tracking-board-clock span { display: flex; flex-direction: column; }
.tracking-board-clock strong { color: #172231; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.35rem; letter-spacing: .03em; }
.tracking-board-body { padding: 1rem 1.1rem 1.25rem; }
.tracking-board-section { min-width: 0; }
.tracking-board-section h2 { margin: 0 0 .7rem; color: #202a36; font-size: .76rem; letter-spacing: .05em; }
.tracking-pomodoro { margin-top: 1.1rem; padding: .85rem .8rem; background: #fff5f5; }
.tracking-habit-grid, .tracking-pomodoro-grid, .tracking-tea-grid { display: grid; gap: .8rem; }
.tracking-habit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tracking-pomodoro-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tracking-habit-card, .tracking-pomodoro-card, .tracking-timer-card, .tracking-tea-card { position: relative; min-width: 0; border: 2px solid #315ba4; border-radius: 5px; background: #dceaff; box-shadow: 0 5px 12px rgba(37, 66, 112, .09); }
.tracking-habit-card { display: grid; grid-template-columns: 2.35rem minmax(0, 1fr) auto; gap: .55rem; align-items: center; min-height: 70px; padding: .75rem .55rem .5rem; }
.tracking-tone-blue { border-color: #315ba4; background: #dceaff; }
.tracking-tone-slate { border-color: #202d3d; background: #edf2f7; }
.tracking-tone-purple { border-color: #7b2b82; background: #f4d8f7; }
.tracking-tone-amber, .tracking-tone-yellow { border-color: #8b4a12; background: #fff0c8; }
.tracking-tone-green { border-color: #467b1e; background: #eaffcb; }
.tracking-tone-orange { border-color: #8b461b; background: #fff0df; }
.tracking-card-grip { position: absolute; top: .05rem; left: 50%; color: rgba(32, 43, 56, .45); font-size: .72rem; letter-spacing: -.15em; line-height: 1; transform: translateX(-50%); }
.tracking-card-edit { position: absolute; top: .16rem; left: .22rem; color: #687481; font-size: .66rem; }
.tracking-card-close { position: absolute; top: .08rem; right: .2rem; border: 0; background: transparent; color: #687481; font-size: 1rem; line-height: 1; }
.tracking-habit-icon, .tracking-tea-icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid rgba(37, 75, 117, .3); border-radius: 6px; background: rgba(255, 255, 255, .65); font-size: 1.25rem; }
.tracking-habit-card strong, .tracking-habit-card small, .tracking-work-card strong, .tracking-work-card small, .tracking-pomodoro-card strong, .tracking-pomodoro-card small, .tracking-timer-card strong, .tracking-timer-card small, .tracking-tea-card strong, .tracking-tea-card small { display: block; }
.tracking-habit-card strong, .tracking-work-card strong, .tracking-pomodoro-card strong, .tracking-timer-card strong, .tracking-tea-card strong { color: #192534; font-size: .88rem; }
.tracking-habit-card small, .tracking-habit-card > div > span, .tracking-work-card small, .tracking-pomodoro-card small, .tracking-timer-card small, .tracking-tea-card small { color: #536274; font-size: .65rem; }
.tracking-habit-card > div > span { display: block; margin-top: .1rem; }
.tracking-habit-card > div > span b { font-size: 1rem; }
.tracking-card-actions { display: flex; gap: .25rem; }
.tracking-card-actions button, .tracking-pomodoro-card button { width: 1.35rem; height: 1.35rem; padding: 0; border: 1px solid currentColor; border-radius: 4px; background: rgba(255, 255, 255, .45); color: inherit; font-weight: 800; line-height: 1; }
.tracking-board-main-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(150px, .7fr) minmax(190px, .8fr); gap: 1rem; margin-top: 1.1rem; }
.tracking-work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.tracking-work-card { position: relative; min-height: 94px; padding: 1rem .8rem .65rem; border: 2px solid #315ba4; border-radius: 5px; background: #dceaff; overflow: hidden; }
.tracking-work-large { grid-row: span 2; min-height: 235px; padding-top: 1.6rem; }
.tracking-work-card strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; }
.tracking-work-large strong { margin-top: 1.1rem; font-size: 1.2rem; }
.tracking-work-fill { position: absolute; right: 0; bottom: 0; left: 0; height: 38%; background: #3f83ef; clip-path: polygon(0 35%, 15% 15%, 30% 30%, 47% 8%, 64% 30%, 82% 10%, 100% 23%, 100% 100%, 0 100%); }
.tracking-work-card em { position: absolute; right: .7rem; bottom: .5rem; z-index: 1; padding: .08rem .3rem; border-radius: 3px; background: rgba(255,255,255,.86); color: #233247; font-size: .58rem; font-style: normal; }
.tracking-pomodoro-card, .tracking-timer-card { min-height: 70px; padding: .75rem .55rem; text-align: center; }
.tracking-pomodoro-card { display: grid; grid-template-columns: 2.35rem minmax(0, 1fr) 3.1rem; gap: .55rem; align-items: center; padding: .85rem .55rem .55rem; text-align: center; }
.tracking-pomodoro-icon, .tracking-timer-icon { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border: 1px solid #efb0b0; border-radius: 6px; background: rgba(255,255,255,.65); font-size: 1.25rem; }
.tracking-pomodoro-copy strong, .tracking-pomodoro-copy small, .tracking-pomodoro-copy em { display: block; }
.tracking-pomodoro-copy strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; }
.tracking-pomodoro-copy small { color: #536274; font-size: .65rem; }
.tracking-pomodoro-card em { display: block; color: #c64b59; font-size: .56rem; font-style: normal; }
.tracking-pomodoro-card .tracking-card-actions { justify-content: flex-end; }
.tracking-pomodoro-card button { position: static; }
.tracking-timer-card { display: grid; grid-template-columns: 2.35rem minmax(0, 1fr) 1.6rem; gap: .55rem; align-items: center; padding: .85rem .55rem .55rem; text-align: center; }
.tracking-timer-icon { border-color: #aab6c5; }
.tracking-timer-card strong, .tracking-timer-card small { display: block; }
.tracking-timer-card strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; }
.tracking-timer-card small { color: #536274; font-size: .65rem; }
.tracking-timer-card button { position: static; width: 1.5rem; height: 1.5rem; border: 0; border-radius: 50%; background: #46566c; color: #fff; }
.tracking-project-card { position: relative; min-height: 235px; padding: 1.6rem .7rem .7rem; border: 2px solid #28724f; border-radius: 5px; background: #10b981; text-align: center; }
.tracking-project-card strong { display: block; color: #143c32; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.1rem; }
.tracking-project-card small { display: block; color: #194d3d; font-size: .7rem; }
.tracking-project-orb { display: grid; place-items: center; height: 125px; font-size: 4rem; }
.tracking-project-timer { border: 0; border-radius: 4px; background: #fff; color: #263f3a; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .65rem; }
.tracking-achievement-card { position: relative; overflow: hidden; border: 2px solid #196087; border-radius: 5px; background: #dff3fc; }
.tracking-achievement-card > strong, .tracking-achievement-card > small { display: block; padding: .55rem .7rem 0; text-align: center; }
.tracking-achievement-card > small { padding-top: .05rem; color: #324b5b; font-size: .68rem; }
.tracking-achievement-percent { margin: .5rem 0; padding: .55rem; border-top: 1px solid #9bcce1; border-bottom: 1px solid #9bcce1; color: #1d6c9b; font-size: 1.4rem; font-weight: 800; text-align: center; }
.tracking-achievement-row { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); gap: .1rem .5rem; align-items: center; padding: .45rem .7rem; border-top: 1px solid #9bcce1; }
.tracking-achievement-row span { grid-row: span 2; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 1px solid #8cc6df; border-radius: 5px; background: #f4fcff; }
.tracking-achievement-row strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
.tracking-achievement-row small { color: #466474; font-size: .6rem; }
.tracking-tea { margin-top: 1.1rem; }
.tracking-tea-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tracking-tea-card { display: grid; grid-template-columns: 2rem minmax(0, 1fr) 1.6rem; gap: .5rem; align-items: center; min-height: 64px; padding: .75rem .7rem .55rem; text-align: center; }
.tracking-tea-icon { width: 1.8rem; height: 1.8rem; font-size: 1rem; }
.tracking-tea-card strong, .tracking-tea-card small { display: block; }
.tracking-tea-card strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; }
.tracking-tea-card small { color: #536274; font-size: .65rem; }
.tracking-tea-card button { width: 1.5rem; height: 1.5rem; border: 0; border-radius: 50%; background: #3c9d24; color: #fff; font-size: .65rem; }

/* Reference-board finish: thick inked borders, offset shadows and inset highlights. */
.tracking-board {
  border: 1px solid #c7d0da;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 8px 0 rgba(37, 53, 70, .08), 0 16px 28px rgba(37, 53, 70, .12);
}

.tracking-board-toolbar {
  min-height: 4.55rem;
  padding: .75rem 1.15rem;
  background: linear-gradient(#f4f8fc, #e7edf4);
  box-shadow: inset 0 -1px 0 #c7d0da, inset 0 1px 0 rgba(255,255,255,.95);
}

.tracking-view-button,
.tracking-board-settings {
  border-width: 1px 2px 2px 1px;
  border-radius: 4px;
  box-shadow: 2px 2px 0 rgba(42, 63, 83, .15), inset 0 1px 0 rgba(255,255,255,.9);
}

.tracking-view-button.active {
  box-shadow: 2px 2px 0 #0e1722, inset 0 1px 0 rgba(255,255,255,.2);
}

.tracking-board-body {
  padding: 1.15rem 1.2rem 1.45rem;
  background: linear-gradient(90deg, rgba(31, 48, 67, .025) 1px, transparent 1px), #fff;
  background-size: 18px 18px;
}

.tracking-board-section h2 {
  margin-bottom: .72rem;
  color: #18232f;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.tracking-pomodoro h2 { color: #d43d43; }
.tracking-side-project h2 { color: #83bd27; }
.tracking-achievements h2 { color: #17232f; }
.tracking-tea h2 { color: #34451e; }

.tracking-pomodoro {
  padding: .9rem .85rem;
  border: 0;
  background: rgba(255, 241, 242, .78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 -1px 0 rgba(215, 65, 72, .08);
}

.tracking-habit-card,
.tracking-pomodoro-card,
.tracking-timer-card,
.tracking-work-card,
.tracking-project-card,
.tracking-achievement-card,
.tracking-tea-card {
  border-width: 3px;
  border-radius: 4px;
  box-shadow: 4px 5px 0 rgba(32, 52, 75, .18), 0 10px 18px rgba(32, 52, 75, .08), inset 0 1px 0 rgba(255,255,255,.8);
}

.tracking-habit-card,
.tracking-pomodoro-card,
.tracking-timer-card,
.tracking-tea-card {
  transition: transform .15s ease, box-shadow .15s ease;
}

.tracking-habit-card:hover,
.tracking-pomodoro-card:hover,
.tracking-timer-card:hover,
.tracking-tea-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 6px 0 rgba(32, 52, 75, .2), 0 12px 20px rgba(32, 52, 75, .1), inset 0 1px 0 rgba(255,255,255,.85);
}

.tracking-card-grip {
  top: .12rem;
  font-size: .85rem;
  font-weight: 900;
}

.tracking-card-edit { top: .2rem; left: .28rem; font-weight: 900; }
.tracking-card-close { top: .1rem; right: .28rem; font-weight: 800; }

.tracking-habit-card {
  grid-template-columns: 2.65rem minmax(0, 1fr) 3.1rem;
  min-height: 72px;
  padding: .9rem .55rem .55rem .6rem;
  isolation: isolate;
  overflow: hidden;
  background-image: linear-gradient(135deg, rgba(255,255,255,.26), transparent 42%);
}

.tracking-habit-fill {
  position: absolute;
  right: -8%;
  bottom: 0;
  left: -8%;
  z-index: 0;
  height: var(--habit-fill, 0%);
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(68, 143, 241, .62), rgba(42, 102, 210, .95));
  opacity: .9;
  transition: height .45s cubic-bezier(.22, .8, .22, 1), background .3s ease;
}

.tracking-habit-card .tracking-habit-icon,
.tracking-habit-card .tracking-habit-copy,
.tracking-habit-card .tracking-card-actions,
.tracking-habit-card .tracking-card-edit,
.tracking-habit-card .tracking-card-close {
  z-index: 2;
}

.tracking-habit-fill::before {
  content: '';
  position: absolute;
  top: -9px;
  right: -12%;
  left: -12%;
  height: 18px;
  border-radius: 45%;
  background: rgba(164, 216, 255, .72);
  box-shadow: 0 -2px 0 rgba(255,255,255,.25);
  animation: tracker-wave 5.5s ease-in-out infinite alternate;
}

.tracking-habit-fill::after {
  content: '';
  position: absolute;
  top: -6px;
  right: -14%;
  left: -14%;
  height: 15px;
  border-radius: 42%;
  background: rgba(255,255,255,.18);
  opacity: .75;
  animation: tracker-wave-reverse 7s ease-in-out infinite alternate;
}

.tracking-tone-slate .tracking-habit-fill {
  background: linear-gradient(180deg, rgba(119, 137, 157, .62), rgba(65, 83, 103, .92));
}

.tracking-tone-slate .tracking-habit-fill::before { background: rgba(213, 224, 234, .68); }
.tracking-tone-purple .tracking-habit-fill { background: linear-gradient(180deg, rgba(206, 88, 214, .66), rgba(151, 43, 162, .94)); }
.tracking-tone-purple .tracking-habit-fill::before { background: rgba(246, 184, 247, .72); }
.tracking-tone-amber .tracking-habit-fill { background: linear-gradient(180deg, rgba(244, 183, 47, .7), rgba(214, 135, 12, .95)); }
.tracking-tone-amber .tracking-habit-fill::before { background: rgba(255, 226, 137, .75); }

.tracking-habit-card[data-habit-done] .tracking-habit-fill { box-shadow: inset 0 2px 0 rgba(255,255,255,.28); }

@keyframes tracker-wave {
  from { transform: translateX(-5%) scaleX(1); }
  to { transform: translateX(5%) scaleX(1.04); }
}

@keyframes tracker-wave-reverse {
  from { transform: translateX(5%) scaleX(1.04); }
  to { transform: translateX(-5%) scaleX(1); }
}

.tracking-habit-copy {
  min-width: 0;
  text-align: center;
}

.tracking-habit-copy strong,
.tracking-habit-copy small,
.tracking-habit-copy em {
  display: block;
}

.tracking-habit-copy strong {
  color: #182534;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  line-height: 1.05;
}

.tracking-habit-copy strong b { font-weight: 800; }
.tracking-habit-copy small { margin-top: .12rem; color: #243445; font-size: .72rem; }
.tracking-habit-copy em { margin-top: .12rem; color: #3577ba; font-size: .56rem; font-style: normal; }
.tracking-tone-slate .tracking-habit-copy em { color: #68727d; }
.tracking-tone-purple .tracking-habit-copy em { color: #b246b9; }
.tracking-tone-amber .tracking-habit-copy em { color: #9b6517; }

.tracking-habit-icon {
  width: 2.45rem;
  height: 2.45rem;
  border-color: #8dbce7;
  border-radius: 7px;
  font-size: 1.35rem;
}

.tracking-card-actions {
  justify-content: flex-end;
}

.tracking-card-actions button {
  width: 1.45rem;
  height: 1.45rem;
  font-size: .95rem;
}

.tracking-habit-icon,
.tracking-tea-icon {
  border-width: 1px 2px 2px 1px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.tracking-card-actions button,
.tracking-pomodoro-card button {
  border-width: 1px 2px 2px 1px;
  box-shadow: 1px 1px 0 rgba(32, 52, 75, .2), inset 0 1px 0 rgba(255,255,255,.75);
}

.tracking-work-card {
  border-width: 3px;
  box-shadow: 4px 5px 0 rgba(32, 52, 75, .2), 0 12px 22px rgba(32, 52, 75, .1), inset 0 1px 0 rgba(255,255,255,.8);
}

.tracking-work-fill {
  background: #3f83ef;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.22);
}

.tracking-project-card {
  border-color: #1d6b4a;
  box-shadow: 4px 5px 0 rgba(20, 77, 56, .23), 0 12px 22px rgba(20, 77, 56, .12), inset 0 1px 0 rgba(255,255,255,.38);
}

.tracking-project-timer {
  border: 1px solid #d6e1df;
  box-shadow: 1px 2px 0 rgba(28, 60, 52, .2), inset 0 1px 0 #fff;
}

.tracking-achievement-card {
  box-shadow: 4px 5px 0 rgba(25, 75, 103, .2), 0 12px 22px rgba(25, 75, 103, .1), inset 0 1px 0 rgba(255,255,255,.85);
}

.tracking-achievement-percent {
  font-size: 1.6rem;
  font-weight: 900;
  text-shadow: 1px 1px 0 rgba(255,255,255,.8);
}

.tracking-tea-card {
  min-height: 70px;
  background-image: linear-gradient(135deg, rgba(255,255,255,.28), transparent 48%);
}

/* Work / project / achievement cards follow the same fixed three-zone layout. */
.tracking-work-card {
  border-width: 3px;
}

.tracking-work-card.tracking-work-large,
.tracking-work-card.tracking-work-tall {
  display: block;
  min-height: 235px;
  text-align: center;
}

.tracking-work-card.tracking-work-tall { grid-row: auto; }
.tracking-work-card.tracking-work-large .tracking-work-icon,
.tracking-work-card.tracking-work-tall .tracking-work-icon { display: none; }

.tracking-work-copy {
  min-width: 0;
  text-align: center;
}

.tracking-work-large .tracking-work-copy,
.tracking-work-tall .tracking-work-copy { position: relative; z-index: 1; padding-top: .35rem; }
.tracking-work-copy strong, .tracking-work-copy small, .tracking-work-copy em { display: block; }
.tracking-work-copy strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.08rem; }
.tracking-work-copy small { color: #233247; font-size: .72rem; }
.tracking-work-copy em { margin-top: .1rem; color: #3776bc; font-size: .56rem; font-style: normal; }

.tracking-work-card:not(.tracking-work-large):not(.tracking-work-tall) {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr) 3.1rem;
  gap: .55rem;
  align-items: center;
  min-height: 72px;
  padding: .85rem .55rem .55rem;
  text-align: center;
}

.tracking-work-icon {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid #8dbce7;
  border-radius: 6px;
  background: rgba(255,255,255,.65);
  font-size: 1.2rem;
}

.tracking-work-card:not(.tracking-work-large):not(.tracking-work-tall) .tracking-work-fill,
.tracking-work-card:not(.tracking-work-large):not(.tracking-work-tall) > em { display: none; }
.tracking-work-card .tracking-card-actions { justify-content: flex-end; }

.tracking-work-large .tracking-work-fill,
.tracking-work-tall .tracking-work-fill { height: max(2%, var(--work-fill, 2%)); clip-path: none; overflow: hidden; background: linear-gradient(180deg, rgba(83, 150, 241, .8), #3f83ef); transition: height .5s cubic-bezier(.22, .8, .22, 1); }
.tracking-work-large .tracking-work-fill::before,
.tracking-work-tall .tracking-work-fill::before { content: ''; position: absolute; top: -12px; right: -12%; left: -12%; height: 24px; border-radius: 45%; background: rgba(167, 218, 255, .68); animation: work-wave 5.5s ease-in-out infinite alternate; }
.tracking-work-large .tracking-work-fill::after,
.tracking-work-tall .tracking-work-fill::after { content: ''; position: absolute; top: -6px; right: -14%; left: -14%; height: 16px; border-radius: 42%; background: rgba(255,255,255,.18); animation: work-wave-reverse 7s ease-in-out infinite alternate; }
.tracking-work-mascot { position: absolute; right: 0; bottom: 2.4rem; left: 0; z-index: 1; display: grid; place-items: center; font-size: 4.1rem; filter: drop-shadow(0 4px 0 rgba(22, 76, 166, .28)); }
.tracking-work-timer { position: absolute; right: 50%; bottom: .5rem; z-index: 2; border: 1px solid #d6e1ef; border-radius: 4px; background: #fff; color: #263b57; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .62rem; transform: translateX(50%); box-shadow: 1px 2px 0 rgba(28, 60, 92, .2); }
.tracking-work-card[data-work-running] .tracking-work-timer { background: #e7f2ff; box-shadow: inset 0 1px 0 #fff, 1px 2px 0 rgba(28, 60, 92, .2); }

@keyframes work-wave {
  from { transform: translateX(-5%) scaleX(1); }
  to { transform: translateX(5%) scaleX(1.04); }
}

@keyframes work-wave-reverse {
  from { transform: translateX(5%) scaleX(1.04); }
  to { transform: translateX(-5%) scaleX(1); }
}

.tracking-project-copy { position: relative; z-index: 1; text-align: center; }
.tracking-project-copy strong, .tracking-project-copy small { display: block; }
.tracking-project-copy strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tracking-project-card { overflow: hidden; }
.tracking-project-card::before { content: ''; position: absolute; right: 0; bottom: 0; left: 0; z-index: 0; height: var(--project-fill, 0%); background: linear-gradient(180deg, rgba(86, 224, 174, .28), rgba(0, 119, 84, .3)); transition: height .5s ease; }
.tracking-project-card::after { content: ''; position: absolute; right: -12%; bottom: var(--project-fill, 0%); left: -12%; z-index: 0; height: 18px; border-radius: 45%; background: rgba(190, 255, 212, .32); opacity: 0; transition: bottom .5s ease, opacity .2s ease; animation: project-wave 6s ease-in-out infinite alternate; }
.tracking-project-card[data-project-running]::after { opacity: .7; }
.tracking-project-card[data-project-running] .tracking-project-orb { animation: project-orb 2.8s ease-in-out infinite; }
.tracking-project-copy, .tracking-project-orb, .tracking-project-timer { position: relative; z-index: 1; }

@keyframes project-wave {
  from { transform: translateX(-5%) scaleX(1); }
  to { transform: translateX(5%) scaleX(1.04); }
}

@keyframes project-orb {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.04); }
}

.tracking-achievement-heading { padding: .65rem .7rem .45rem; text-align: center; }
.tracking-achievement-heading strong, .tracking-achievement-heading small { display: block; }
.tracking-achievement-heading strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.tracking-achievement-heading small { color: #324b5b; font-size: .68rem; }
.tracking-achievement-card .tracking-card-edit[data-achievement-edit] { top: .25rem; left: .28rem; z-index: 3; width: 1.35rem; height: 1.35rem; padding: 0; border: 1px solid #8bbbd2; border-radius: 4px; background: rgba(255,255,255,.68); color: #38667c; font: inherit; font-size: .78rem; line-height: 1; cursor: pointer; box-shadow: 1px 1px 0 rgba(25, 75, 103, .15); }
.tracking-achievement-card .tracking-card-edit[data-achievement-edit]::after { content: '编辑'; position: absolute; top: 50%; left: calc(100% + .35rem); display: none; padding: .12rem .3rem; border-radius: 3px; background: #213b4b; color: #fff; font-size: .58rem; white-space: nowrap; transform: translateY(-50%); }
.tracking-achievement-card .tracking-card-edit[data-achievement-edit]:hover::after { display: block; }
.tracking-achievement-card[data-achievement-editing] .tracking-card-edit[data-achievement-edit] { background: #2d789e; color: #fff; }
.tracking-achievement-card[data-achievement-editing] [data-achievement-field] { outline: 1px dashed #2d789e; outline-offset: 2px; background: rgba(255,255,255,.45); cursor: text; }

.tracking-history-view {
  min-height: 32rem;
  padding: 1.25rem 1.35rem 1.5rem;
  background: #fff;
}

.tracking-history-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid #d9e3eb;
}

.tracking-history-heading p { color: #2d789e; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tracking-history-heading h2 { margin-top: .15rem; color: #1e2e3d; font-size: 1.25rem; }
.tracking-history-heading > span { color: #6d7c8b; font-size: .72rem; }
.tracking-history-summary { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.tracking-history-summary span { padding: .55rem .75rem; border: 1px solid #bad2df; border-radius: 5px; background: #eff8fc; color: #476170; font-size: .72rem; }
.tracking-history-summary b { color: #1e6d9c; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.tracking-week-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tracking-week-summary-title { margin: .15rem 0 .7rem; color: #26384a; font-size: .72rem; letter-spacing: .12em; }
.tracking-week-subheading { display: none; }
.tracking-week-breakdown-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 1.15rem 0 .7rem; }
.tracking-week-breakdown-heading h3 { margin: 0; color: #26384a; font-size: .72rem; letter-spacing: .12em; }
.tracking-week-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .7rem; color: #526878; font-size: .62rem; }
.tracking-week-legend span { display: inline-flex; align-items: center; gap: .25rem; }
.tracking-week-legend i { display: inline-grid; place-items: center; width: .65rem; height: .65rem; border-radius: 50%; font-style: normal; }
.tracking-legend-work { background: #3475c5; }.tracking-legend-pomodoro { background: #d85259; }.tracking-legend-habit { background: #7b3fa0; }.tracking-legend-best { color: #d19118; font-size: .82rem; }.tracking-legend-streak { color: #4b9b2d; font-size: .72rem; }
.tracking-week-summary article { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .65rem; align-items: center; min-height: 5.2rem; padding: .65rem .75rem; border: 2px solid #315ba4; border-radius: 5px; background: #dceaff; box-shadow: 3px 4px 0 rgba(32, 52, 75, .17); }
.tracking-week-summary article:nth-child(2) { border-color: #7b2b82; background: #f4d8f7; }
.tracking-week-summary article:nth-child(3) { border-color: #922226; background: #f6b9bb; }
.tracking-week-summary article:nth-child(4) { border-color: #9a6112; background: #fff0bd; }
.tracking-week-summary article > span { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid rgba(37,75,117,.3); border-radius: 6px; background: rgba(255,255,255,.7); font-size: 1.2rem; }
.tracking-week-summary small, .tracking-week-summary b, .tracking-week-summary em { display: block; }
.tracking-week-summary small { color: #536274; font-size: .57rem; font-weight: 800; letter-spacing: .08em; }
.tracking-week-summary b { margin-top: .12rem; color: #192534; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; }
.tracking-week-summary em { color: #536274; font-size: .6rem; font-style: normal; }
.tracking-history-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .55rem; }
.tracking-week-day-card { overflow: hidden; border: 2px solid #2f69ba; border-radius: 4px; background: #eaf3ff; box-shadow: 3px 4px 0 rgba(33, 72, 141, .2); text-align: center; }
.tracking-week-day-card.is-best { border-color: #a86416; background: #fff8df; box-shadow: 3px 4px 0 rgba(151, 97, 23, .2); }
.tracking-week-day-card.is-rest { border-color: #aab8c4; background: #f2f5f7; box-shadow: 3px 4px 0 rgba(71, 92, 108, .12); }
.tracking-week-day-card.is-today { outline: 2px solid #173e73; outline-offset: 2px; }
.tracking-week-day-card header { display: flex; align-items: start; justify-content: space-between; min-height: 3.35rem; padding: .55rem .6rem; border-bottom: 1px solid #c6dbe9; background: rgba(255,255,255,.32); }
.tracking-week-day-card header strong, .tracking-week-day-card header small { display: block; }.tracking-week-day-card header strong { color: #22354a; font-size: .66rem; letter-spacing: .08em; }.tracking-week-day-card header small { margin-top: .2rem; color: #526a79; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .58rem; }.tracking-week-day-card header b { display: grid; place-items: center; width: 1rem; height: 1rem; border-radius: 50%; background: #51a22c; color: #fff; font-size: .62rem; line-height: 1; }.tracking-week-day-card.is-best header b { background: transparent; color: #d19118; font-size: 1.25rem; }.tracking-week-day-card.is-rest header b { border: 1px solid #d4dde3; background: #fff; color: #9eacb7; }
.tracking-week-progress { display: grid; place-items: center; padding: .7rem 0 .6rem; }.tracking-week-progress > span { display: grid; place-items: center; width: 3.45rem; height: 3.45rem; border-radius: 50%; background: radial-gradient(circle, #f9fcff 55%, transparent 56%), conic-gradient(#2f69ba var(--day-percent), #d8e3eb 0); }.tracking-week-day-card.is-best .tracking-week-progress > span { background: radial-gradient(circle, #fffdf4 55%, transparent 56%), conic-gradient(#7b3fa0 var(--day-percent), #eadfbf 0); }.tracking-week-day-card.is-rest .tracking-week-progress > span { background: radial-gradient(circle, #fff 55%, transparent 56%), conic-gradient(#aab8c4 var(--day-percent), #e0e6eb 0); }.tracking-week-progress b { color: #253a4f; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.tracking-week-metrics { border-top: 1px solid #c6dbe9; }.tracking-week-metrics span { display: flex; align-items: center; gap: .35rem; padding: .48rem .65rem; border-bottom: 1px solid #c6dbe9; color: #2f69ba; font-size: .7rem; text-align: left; }.tracking-week-metrics b { color: #2e4053; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .67rem; }.tracking-week-day-card.is-best .tracking-week-metrics span { border-color: #e7d7ad; color: #c27615; }.tracking-week-day-card.is-rest .tracking-week-metrics span { border-color: #dae1e6; color: #8698a5; }
.tracking-week-note { min-height: 3.5rem; padding: .5rem .35rem .6rem; }.tracking-week-note small, .tracking-week-note em { display: block; }.tracking-week-note small { color: #516b7d; font-size: .58rem; }.tracking-week-note em { display: inline-block; margin-top: .4rem; padding: .16rem .35rem; border: 1px solid #6da954; border-radius: 3px; background: #eef9e5; color: #377327; font-size: .56rem; font-style: normal; font-weight: 800; letter-spacing: .03em; }.tracking-week-day-card.is-best .tracking-week-note em { border-color: #d69b43; background: #fff3d7; color: #a65b0b; }.tracking-week-day-card.is-rest .tracking-week-note em { border-color: #c2cdd5; background: #f8fafb; color: #7b8c98; }
.tracking-history-day { min-height: 9rem; padding: .65rem .5rem; border: 1px solid #c5d4df; border-radius: 4px; background: #f6fafc; box-shadow: 2px 3px 0 rgba(34, 70, 95, .1); }
.tracking-history-day.is-today { border-color: #2d789e; background: #e4f4fb; box-shadow: 3px 4px 0 rgba(45, 120, 158, .2); }
.tracking-history-day strong, .tracking-history-day small, .tracking-history-day span { display: block; }
.tracking-history-day strong { color: #1d6d95; font-size: .8rem; }
.tracking-history-day small { margin-bottom: 1.1rem; color: #718291; font-size: .64rem; }
.tracking-history-day span { padding: .35rem 0; border-top: 1px solid #dae5eb; color: #506777; font-size: .64rem; }
.tracking-history-day i { display: block; height: .25rem; margin-top: .65rem; border-radius: 3px; background: linear-gradient(90deg, #2d789e var(--day-progress), #dce8ee var(--day-progress)); }
.tracking-history-note { margin-top: .9rem; color: #6b7d89; font-size: .67rem; }
.tracking-week-insight-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(190px, .65fr) minmax(220px, .8fr); gap: .9rem; margin-top: .9rem; }
.tracking-week-insights, .tracking-week-panel { padding: .75rem; border: 1px solid #bad0df; border-radius: 4px; background: #f8fbfd; box-shadow: 2px 3px 0 rgba(34, 70, 95, .1); }
.tracking-week-insights { border-color: #b1d78e; background: #f1ffdc; }.tracking-week-insights h3, .tracking-week-panel h3 { margin: 0 0 .65rem; color: #1d2d3e; font-size: .7rem; letter-spacing: .1em; }.tracking-week-insights > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }.tracking-week-insights article { min-height: 6.2rem; padding: .6rem; border: 1px solid #bad2df; border-radius: 4px; background: #fff; text-align: center; }.tracking-week-insights article strong, .tracking-week-insights article small, .tracking-week-insights article b, .tracking-week-insights article span { display: block; }.tracking-week-insights article strong { color: #d19118; font-size: 1rem; }.tracking-week-insights article small { margin-top: .2rem; color: #607888; font-size: .57rem; letter-spacing: .08em; }.tracking-week-insights article b { margin-top: .4rem; color: #263b4c; font-size: .75rem; }.tracking-week-insights article span { margin-top: .35rem; color: #607888; font-size: .6rem; }
.tracking-week-trend { border-color: #c6b4da; background: #f5effb; }.tracking-week-trend h3 { color: #634f70; }.tracking-week-trend-chart { display: flex; align-items: end; justify-content: space-around; height: 6.2rem; padding: .6rem .25rem .25rem; border-bottom: 1px solid #cfc1dc; background: repeating-linear-gradient(to bottom, transparent 0, transparent 1.45rem, rgba(123, 63, 160, .13) 1.5rem); }.tracking-week-trend-chart span { display: flex; align-items: center; flex-direction: column; justify-content: end; height: 100%; gap: .25rem; }.tracking-week-trend-chart i { width: .8rem; min-height: .35rem; border-radius: 3px 3px 0 0; background: #7b3fa0; }.tracking-week-trend-chart small { color: #634f70; font-size: .58rem; }.tracking-week-trend > small { display: block; margin-top: .45rem; color: #705f80; font-size: .62rem; }
.tracking-week-notes { background: #eff8fc; }.tracking-week-notes ul { margin: 0; padding-left: 1.1rem; color: #536b7b; font-size: .63rem; line-height: 1.7; }.tracking-week-controls { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .9rem; padding: .65rem .75rem; border: 1px solid #c3d2dc; border-radius: 4px; background: #f6fafc; color: #4d6575; font-size: .64rem; }.tracking-week-controls b { color: #20374b; }
.tracking-week-footer { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .7fr) minmax(180px, .55fr); gap: .9rem; margin-top: .9rem; }
.tracking-week-footer-panel, .tracking-week-export { min-height: 4.4rem; padding: .65rem .75rem; border: 1px solid #c8d6df; border-radius: 4px; background: #f8fbfd; box-shadow: 2px 3px 0 rgba(34, 70, 95, .08); }
.tracking-week-footer-panel h3 { margin: 0 0 .45rem; color: #314353; font-size: .65rem; letter-spacing: .1em; }.tracking-week-footer-panel h3 small { color: #617989; font-size: .55rem; letter-spacing: 0; }
.tracking-week-habit-legend { border-color: #bad894; background: #f1ffdc; }.tracking-week-habit-legend h3 { color: #406028; }.tracking-week-habit-legend > div { display: flex; flex-wrap: wrap; gap: .45rem .85rem; }.tracking-week-habit-legend span { display: inline-flex; align-items: center; gap: .2rem; color: #465a4d; font-size: .6rem; }.tracking-week-habit-legend i { font-style: normal; font-size: .9rem; }
.tracking-week-navigation { background: #fffdf2; border-color: #d8d2af; text-align: center; }.tracking-week-navigation > div { display: flex; align-items: center; justify-content: center; gap: .45rem; }.tracking-week-navigation button { width: 1.65rem; height: 1.55rem; border: 1px solid #9db0bf; border-radius: 3px; background: #fff; color: #24405a; font-weight: 800; }.tracking-week-navigation button:disabled { cursor: not-allowed; opacity: .35; }.tracking-week-navigation b { min-width: 9.4rem; padding: .25rem .45rem; border: 1px solid #b6c4cd; border-radius: 3px; background: #fff; color: #344a5e; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .6rem; }
.tracking-week-export { display: flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid #a9c7e3; background: #eff8ff; color: #2b557c; font-size: .65rem; font-weight: 800; letter-spacing: .06em; }.tracking-week-export:hover { background: #dfefff; }.tracking-week-export:first-letter { font-size: 1rem; }
.tracking-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .45rem; }
.tracking-month-day { min-height: 4.2rem; padding: .45rem; border: 1px solid #d2dee6; border-radius: 4px; background: #f7fafc; }
.tracking-month-day strong, .tracking-month-day small { display: block; }
.tracking-month-day strong { color: #3b5568; font-size: .72rem; }
.tracking-month-day small { margin-top: .7rem; color: #68808f; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .62rem; }
.tracking-month-day[data-intensity="1"] { background: #e8f4fa; }
.tracking-month-day[data-intensity="2"] { background: #cce8f5; }
.tracking-month-day[data-intensity="3"] { background: #a9d7eb; }
.tracking-month-day[data-intensity="4"] { background: #79bddb; border-color: #448eaf; }
.tracking-month-breakdown { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0; }
.tracking-month-breakdown span { display: flex; align-items: baseline; gap: .5rem; padding: .45rem .65rem; border: 1px solid #bad2df; border-radius: 4px; background: #f3f9fc; }
.tracking-month-breakdown small { color: #607888; font-size: .65rem; }
.tracking-month-breakdown b { color: #1d6d95; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.tracking-focus-list { display: grid; gap: .65rem; max-width: 38rem; margin: 1.2rem auto; }
.tracking-focus-item { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border: 2px solid #315ba4; border-radius: 5px; background: #dceaff; box-shadow: 3px 4px 0 rgba(32, 52, 75, .16); }
.tracking-focus-item span { color: #2b4259; font-size: .8rem; }
.tracking-focus-item strong { color: #172c43; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; }
.tracking-goal-summary { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.tracking-goal-summary span { padding: .5rem .7rem; border: 1px solid #bad2df; border-radius: 4px; background: #eff8fc; color: #476170; font-size: .7rem; }
.tracking-goal-summary b { color: #1e6d9c; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.tracking-goal-grid { display: grid; gap: .7rem; max-width: 46rem; margin: 0 auto; }
.tracking-goal-card { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: .75rem; padding: .75rem; border: 2px solid #196087; border-radius: 5px; background: #dff3fc; box-shadow: 3px 4px 0 rgba(25, 96, 135, .18); }
.tracking-goal-card[data-goal-status="completed"] { border-color: #467b1e; background: #eaffcb; }
.tracking-goal-card[data-goal-status="paused"] { border-color: #8b4a12; background: #fff0c8; }
.tracking-goal-icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid #8cc6df; border-radius: 5px; background: #f4fcff; font-size: 1.1rem; }
.tracking-goal-title, .tracking-goal-values { display: flex; align-items: baseline; justify-content: space-between; gap: .7rem; }
.tracking-goal-title strong { color: #1e2e3d; font-size: .86rem; }
.tracking-goal-title small, .tracking-goal-date { color: #5d7685; font-size: .64rem; }
.tracking-goal-values { margin-top: .5rem; color: #5d7685; font-size: .7rem; }
.tracking-goal-values b { color: #1d6d95; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95rem; }
.tracking-goal-values em { color: #1e6d9c; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; font-style: normal; font-weight: 800; }
.tracking-goal-progress { height: .55rem; margin: .55rem 0 .35rem; overflow: hidden; border: 1px solid #8cc6df; border-radius: 3px; background: #f4fcff; }
.tracking-goal-progress i { display: block; height: 100%; background: linear-gradient(90deg, #72b6dc, #1e6d9c); }
.tracking-empty-state { padding: 2.5rem; border: 2px dashed #bad2df; color: #6b7d89; text-align: center; }
.tracking-goal-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, .75fr); gap: .9rem; }
.tracking-goal-main-column { display: grid; gap: .95rem; }
.tracking-goal-section { padding: .75rem; border: 1px solid #b7d28f; border-radius: 4px; background: #f1ffdc; box-shadow: 2px 3px 0 rgba(70, 123, 30, .12); }
.tracking-goal-section h3, .tracking-goal-panel h3 { margin: 0 0 .65rem; color: #334b24; font-size: .7rem; letter-spacing: .1em; }
.tracking-goal-section .tracking-goal-grid { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tracking-goal-section.tracking-money-goals { background: #eff8ff; border-color: #a9c7e3; }
.tracking-goal-section.tracking-money-goals h3 { color: #234c73; }
.tracking-goal-history { background: #f3f5f6; border-color: #aebbc4; }
.tracking-goal-history h3 { color: #40515d; }
.tracking-goal-sidebar { display: grid; align-content: start; gap: .9rem; }
.tracking-goal-panel { padding: .75rem; border: 1px solid #a9c7e3; border-radius: 4px; background: #eff8ff; box-shadow: 2px 3px 0 rgba(34, 70, 95, .1); }
.tracking-goal-panel h3 { color: #234c73; }
.tracking-money-summary-row { display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); gap: .15rem .45rem; align-items: center; padding: .6rem 0; border-top: 1px solid #cbdde9; }
.tracking-money-summary-row:first-child { border-top: 0; }
.tracking-money-summary-row span { grid-row: span 2; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border: 1px solid #a9c7e3; border-radius: 4px; background: #fff; }
.tracking-money-summary-row strong { color: #1d6d95; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.tracking-money-summary-row small { color: #607888; font-size: .6rem; }
.tracking-money-summary-row small b { color: #1e6d9c; }
.tracking-goal-notes { background: #fff9e7; border-color: #e0c77e; }
.tracking-goal-notes h3 { color: #795b18; }
.tracking-goal-notes ul { margin: 0; padding-left: 1rem; color: #6c5d3b; font-size: .63rem; line-height: 1.7; }
.tracking-goal-controls { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-top: .9rem; padding: .65rem .75rem; border: 1px solid #c3d2dc; border-radius: 4px; background: #f6fafc; color: #526a79; font-size: .64rem; }
.tracking-goal-controls > div { display: flex; flex-wrap: wrap; gap: .35rem; }
.tracking-goal-controls button { padding: .22rem .45rem; border: 1px solid #aebfca; border-radius: 3px; background: #fff; color: #526a79; font-size: .62rem; }
.tracking-goal-controls button.active { border-color: #315ba4; background: #dceaff; color: #1d4d87; font-weight: 800; }

/* Monthly trends view: same inked desktop-board language as the reference. */
.tracking-month-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.tracking-month-summary article { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .65rem; align-items: center; min-height: 5.2rem; padding: .65rem .75rem; border: 2px solid #315ba4; border-radius: 5px; background: #dceaff; box-shadow: 3px 4px 0 rgba(32, 52, 75, .17); }
.tracking-month-summary article:nth-child(2) { border-color: #7b2b82; background: #f4d8f7; }
.tracking-month-summary article:nth-child(3) { border-color: #7b2b82; background: #f4d8f7; }
.tracking-month-summary article:nth-child(4) { border-color: #922226; background: #f6b9bb; }
.tracking-month-summary article > span { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid rgba(37,75,117,.3); border-radius: 6px; background: rgba(255,255,255,.7); font-size: 1.2rem; }
.tracking-month-summary small, .tracking-month-summary b, .tracking-month-summary em { display: block; }
.tracking-month-summary small { color: #536274; font-size: .57rem; font-weight: 800; letter-spacing: .08em; }
.tracking-month-summary b { margin-top: .12rem; color: #192534; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; }
.tracking-month-summary em { color: #536274; font-size: .6rem; font-style: normal; }
.tracking-month-main-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: .9rem; }
.tracking-month-calendar-panel, .tracking-month-panel, .tracking-month-insights { border: 1px solid #bad0df; border-radius: 4px; background: #f8fbfd; box-shadow: 2px 3px 0 rgba(34, 70, 95, .1); }
.tracking-month-calendar-panel { padding: .7rem; }
.tracking-month-calendar-panel h3, .tracking-month-panel h3, .tracking-month-insights h3 { margin: 0 0 .65rem; color: #1d2d3e; font-size: .7rem; letter-spacing: .1em; }
.tracking-month-calendar-panel h3 { padding-bottom: .55rem; border-bottom: 1px solid #d4e1e9; }
.tracking-month-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-bottom: .25rem; color: #506777; font-size: .58rem; font-weight: 800; text-align: center; }
.tracking-month-weekdays span:nth-last-child(-n+2) { color: #a33c42; }
.tracking-month-grid { gap: 1px; overflow: hidden; border: 1px solid #8ea4b2; background: #8ea4b2; }
.tracking-month-day { position: relative; min-height: 5.2rem; padding: .35rem; border: 0; border-radius: 0; background: #fbfdfe; box-shadow: none; }
.tracking-month-day.is-muted { background: #eef3f6; color: #a8b7c1; }
.tracking-month-day.is-today { outline: 2px solid #2d789e; outline-offset: -2px; }
.tracking-month-day strong { color: #293b4a; font-size: .68rem; }
.tracking-month-day.is-muted strong { color: #9aabb7; }
.tracking-month-day > em { position: absolute; top: .3rem; right: .35rem; color: #d19118; font-size: .72rem; font-style: normal; }
.tracking-month-work-bars { display: flex; gap: 2px; margin-top: .7rem; }
.tracking-month-work-bars i { flex: 1; height: .35rem; background: #d8e6f5; }
.tracking-month-day[data-intensity="1"] .tracking-month-work-bars i:nth-child(-n+1) { background: #a9c6ea; }
.tracking-month-day[data-intensity="2"] .tracking-month-work-bars i:nth-child(-n+2) { background: #729dd7; }
.tracking-month-day[data-intensity="3"] .tracking-month-work-bars i:nth-child(-n+3) { background: #3d76c4; }
.tracking-month-day[data-intensity="4"] .tracking-month-work-bars i { background: #173e73; }
.tracking-month-dots { display: flex; gap: 3px; margin-top: .45rem; }
.tracking-month-habit-dot { display: inline-block; width: .42rem; height: .42rem; border-radius: 50%; background: #d5dde3; }
.tracking-dot-blue { background: #2e6fc2; }.tracking-dot-slate { background: #4b443f; }.tracking-dot-purple { background: #7b3fa0; }.tracking-dot-amber { background: #edae17; }.tracking-dot-none { background: #d6dde1; }
.tracking-month-day small { display: block; margin-top: .42rem; color: #566d7d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .55rem; }
.tracking-month-legend { display: flex; flex-wrap: wrap; gap: .5rem .75rem; margin-top: .65rem; color: #526878; font-size: .58rem; }
.tracking-month-legend span { display: inline-flex; align-items: center; gap: .25rem; }
.tracking-month-legend-scale { width: 2.5rem; height: .42rem; background: linear-gradient(90deg, #d8e6f5, #173e73); }
.tracking-month-side-panels { display: grid; gap: .9rem; }
.tracking-month-panel { padding: .75rem; }
.tracking-month-breakdown-row { display: grid; grid-template-columns: 1.65rem minmax(0, 1fr) auto auto; gap: .45rem; align-items: center; padding: .55rem 0; border-top: 1px solid #d6e3eb; }
.tracking-month-breakdown-row > span { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border: 1px solid #a7c6dc; border-radius: 4px; background: #fff; }
.tracking-month-breakdown-row strong { display: block; color: #2b4259; font-size: .66rem; }
.tracking-month-breakdown-row i { display: block; height: .35rem; margin-top: .25rem; background: #d9e6f2; }
.tracking-month-breakdown-row i b { display: block; height: 100%; background: #2f6ec0; }
.tracking-month-breakdown-row em, .tracking-month-breakdown-row small { color: #536b7b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .62rem; font-style: normal; }
.tracking-month-habit-row { display: grid; grid-template-columns: 1.5rem 5.6rem minmax(0, 1fr) 2rem; gap: .45rem; align-items: center; padding: .5rem 0; border-top: 1px solid #dfd4e2; }
.tracking-month-habit-row > span { font-size: 1rem; }.tracking-month-habit-row strong { color: #4d3c59; font-size: .62rem; }
.tracking-month-habit-row i { display: flex; gap: 2px; }.tracking-month-habit-row i b { flex: 1; height: .55rem; border-radius: 2px; background: #e7ddea; }.tracking-month-habit-row em { color: #634f70; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .65rem; font-style: normal; }
.tracking-habit-block-blue { background: #2e6fc2 !important; }.tracking-habit-block-slate { background: #4b443f !important; }.tracking-habit-block-purple { background: #7b3fa0 !important; }.tracking-habit-block-amber { background: #edae17 !important; }
.tracking-month-insight-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(190px, .65fr) minmax(220px, .8fr); gap: .9rem; margin-top: .9rem; }
.tracking-month-insights { padding: .75rem; border-color: #b1d78e; background: #f1ffdc; }.tracking-month-insights > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }.tracking-month-insights article { min-height: 6.2rem; padding: .6rem; border: 1px solid #bad2df; border-radius: 4px; background: #fff; text-align: center; }.tracking-month-insights article strong, .tracking-month-insights article small, .tracking-month-insights article b, .tracking-month-insights article span { display: block; }.tracking-month-insights article strong { color: #d19118; font-size: 1rem; }.tracking-month-insights article small { margin-top: .2rem; color: #607888; font-size: .57rem; letter-spacing: .08em; }.tracking-month-insights article b { margin-top: .4rem; color: #263b4c; font-size: .75rem; }.tracking-month-insights article span { margin-top: .35rem; color: #607888; font-size: .6rem; }
.tracking-pomodoro-summary { border-color: #e2a5a8; background: #fff1f2; }.tracking-pomodoro-summary h3 { color: #ad353e; }.tracking-pomodoro-summary p { display: flex; justify-content: space-between; margin: .55rem 0; padding-bottom: .45rem; border-bottom: 1px solid #efd1d3; color: #6c3b40; font-size: .64rem; }.tracking-pomodoro-summary p:last-child { border-bottom: 0; }.tracking-pomodoro-summary b { color: #8e2931; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tracking-month-notes { background: #eff8fc; }.tracking-month-notes ul { margin: 0; padding-left: 1.1rem; color: #536b7b; font-size: .63rem; line-height: 1.7; }
.tracking-month-controls { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .9rem; padding: .65rem .75rem; border: 1px solid #c3d2dc; border-radius: 4px; background: #f6fafc; color: #4d6575; font-size: .64rem; }.tracking-month-controls b { color: #20374b; }.tracking-month-filter { display: flex; flex-wrap: wrap; gap: .4rem; }.tracking-month-filter i { padding: .2rem .35rem; border: 1px solid #c6d7e2; border-radius: 3px; background: #fff; font-style: normal; }.tracking-month-source { color: #718391; }

/* Reference palette: each tracker family has its own background, ink and action color. */
.tracking-pomodoro {
  background: #fff1f2;
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #f6d9db;
}

.tracking-pomodoro-card.done {
  border-color: #922226;
  background: #f6b9bb;
  color: #7d1d23;
  box-shadow: 4px 5px 0 rgba(117, 32, 37, .2), 0 10px 18px rgba(117, 32, 37, .1), inset 0 1px 0 rgba(255,255,255,.65);
}

.tracking-pomodoro-card.done .tracking-pomodoro-icon {
  border-color: #e89a9d;
  background: #fff2e8;
}

.tracking-pomodoro-card.done .tracking-pomodoro-copy strong,
.tracking-pomodoro-card.done .tracking-pomodoro-copy small { color: #541d24; }

.tracking-pomodoro-card.done .tracking-pomodoro-copy em { color: #b4363e; }
.tracking-pomodoro-card.done .tracking-card-actions button { border-color: #a6383e; background: #f5b2b4; color: #7d1d23; }

.tracking-pomodoro-grid .tracking-timer-card:nth-child(2) {
  border-color: #922226;
  background: #f6b9bb;
  color: #6c2027;
  box-shadow: 4px 5px 0 rgba(117, 32, 37, .2), 0 10px 18px rgba(117, 32, 37, .1), inset 0 1px 0 rgba(255,255,255,.65);
}

.tracking-pomodoro-grid .tracking-timer-card:nth-child(2) .tracking-timer-icon { border-color: #e89a9d; background: #fff0e6; }
.tracking-pomodoro-grid .tracking-timer-card:nth-child(2) button { background: #d92731; }

.tracking-pomodoro-grid .tracking-timer-card:nth-child(3),
.tracking-pomodoro-grid .tracking-timer-card:nth-child(4) {
  border-color: #1a2938;
  background: #eef2f5;
  color: #273649;
  box-shadow: 4px 5px 0 rgba(27, 42, 58, .2), 0 10px 18px rgba(27, 42, 58, .09), inset 0 1px 0 rgba(255,255,255,.9);
}

.tracking-pomodoro-grid .tracking-timer-card:nth-child(3) .tracking-timer-icon,
.tracking-pomodoro-grid .tracking-timer-card:nth-child(4) .tracking-timer-icon { border-color: #bec9d4; background: #f9fbfc; }
.tracking-pomodoro-grid .tracking-timer-card:nth-child(3) button,
.tracking-pomodoro-grid .tracking-timer-card:nth-child(4) button { background: #46566c; }

.tracking-work-card.tracking-tone-blue {
  border-color: #21488d;
  background: #d9e7f9;
}

.tracking-work-card.tracking-tone-blue .tracking-work-icon { border-color: #8bb6e8; background: #eff7ff; }
.tracking-work-card.tracking-tone-blue .tracking-work-fill { background: #3f83ef; }

.tracking-side-project {
  padding: .75rem;
  border-radius: 2px;
  background: #efffd2;
}

.tracking-side-project h2 { color: #83bd27; }
.tracking-project-card { border-color: #257251; background: #11b982; }
.tracking-project-copy strong { color: #123d32; }
.tracking-project-copy small { color: #1c5945; }

.tracking-achievements {
  padding: .75rem;
  border-radius: 2px;
  background: #eef4f8;
}

.tracking-achievement-card { border-color: #185d83; background: #dff2fb; }
.tracking-achievement-heading strong { color: #172d3b; }
.tracking-achievement-percent { color: #1e6d9c; background: #e4f5fc; }
.tracking-achievement-row { border-color: #9bcce1; }

.tracking-tea-card.tracking-tone-green {
  border-color: #486d1e;
  background: #e7f8bf;
}

.tracking-tea-card.tracking-tone-green button { background: #55a51f; }
.tracking-tea-card.tracking-tone-orange { border-color: #814317; background: #ffe5cc; }
.tracking-tea-card.tracking-tone-orange button { background: #ef6c0b; }
.tracking-tea-card.tracking-tone-yellow { border-color: #9a6112; background: #fff0bd; }
.tracking-tea-card.tracking-tone-yellow button { background: #df8d00; }

.habit-card {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  gap: .7rem;
  align-items: center;
  min-height: 82px;
  padding: .85rem .75rem .7rem;
  overflow: hidden;
  border: 2px solid #315ba4;
  border-radius: 9px;
  background: #dceaff;
  box-shadow: 0 5px 12px rgba(37, 66, 112, .09);
}

.habit-card-blue { border-color: #315ba4; background: #dceaff; }
.habit-card-green { border-color: #237b51; background: #def7e8; }
.habit-card-purple { border-color: #7b2b82; background: #f4d8f7; }
.habit-card-amber { border-color: #8b4a12; background: #fff0c8; }

.tracker-card-tools {
  position: absolute;
  top: .05rem;
  left: 50%;
  color: rgba(32, 43, 56, .45);
  font-size: .8rem;
  letter-spacing: -.15em;
  line-height: 1;
  transform: translateX(-50%);
}

.habit-card-icon,
.progress-card-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(37, 75, 117, .3);
  border-radius: 8px;
  background: rgba(255, 255, 255, .6);
  font-size: 1.35rem;
}

.habit-card-content,
.progress-card-header > div {
  min-width: 0;
}

.habit-card-content strong,
.habit-card-content span,
.progress-card-header strong,
.progress-card-header span {
  display: block;
}

.habit-card-content strong,
.progress-card-header strong {
  color: var(--dark);
  font-size: .86rem;
}

.habit-card-content span,
.progress-card-header span {
  margin-top: .1rem;
  color: #536274;
  font-size: .7rem;
}

.habit-card-content b { color: var(--dark); font-size: 1rem; }

.tracker-progress {
  height: .32rem;
  margin-top: .4rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .65);
}

.tracker-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  transition: width .2s ease;
}

.habit-card-blue .tracker-progress { color: #3477db; }
.habit-card-green .tracker-progress { color: #16a36b; }
.habit-card-purple .tracker-progress { color: #b447bd; }
.habit-card-amber .tracker-progress { color: #e59e16; }

.habit-card-actions {
  display: flex;
  gap: .3rem;
}

.habit-card-actions button,
.progress-card-footer button {
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid currentColor;
  border-radius: 5px;
  background: rgba(255, 255, 255, .38);
  color: inherit;
  font-weight: 800;
  line-height: 1;
}

.habit-card-actions button:hover,
.progress-card-footer button:hover { background: rgba(255, 255, 255, .8); }

.progress-card {
  position: relative;
  padding: 1rem .9rem .8rem;
  border: 2px solid #315ba4;
  border-radius: 9px;
  background: #dceaff;
  box-shadow: 0 5px 12px rgba(37, 66, 112, .09);
}

.progress-card-green { border-color: #237b51; background: #def7e8; }
.progress-card-purple { border-color: #7b2b82; background: #f4d8f7; }

.progress-card-header {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.progress-card-value {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  margin-top: .8rem;
}

.progress-card-value input {
  width: 7rem;
  border: 0;
  border-bottom: 2px solid rgba(44, 65, 89, .28);
  outline: 0;
  background: transparent;
  color: var(--dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.35rem;
  font-weight: 800;
}

.progress-card-value span {
  color: #536274;
  font-size: .76rem;
}

.progress-card-track { height: .5rem; margin-top: .65rem; color: #3477db; }
.progress-card-green .progress-card-track { color: #16a36b; }
.progress-card-purple .progress-card-track { color: #b447bd; }

.progress-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .55rem;
  color: #536274;
  font-size: .72rem;
}

.progress-card-footer button {
  width: auto;
  padding: 0 .45rem;
  color: var(--dark);
  font-size: .7rem;
}

.weather-widget-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.weather-place {
  min-width: 0;
}

.weather-place h4 {
  margin: 0 0 .45rem .2rem;
  color: var(--dark);
  font-size: .84rem;
  font-weight: 800;
}

.weather-widget-frame {
  display: flex;
  justify-content: center;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
}

.weather-widget-frame iframe {
  display: block;
  width: min(100%, 320px);
  max-width: 100%;
  border: 0;
}

.calendar-widget-frame {
  display: flex;
  justify-content: center;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
}

.calendar-widget-frame iframe {
  display: block;
  width: min(100%, 340px);
  max-width: 100%;
  border: 0;
}

.pomodoro-widget-frame {
  display: flex;
  justify-content: center;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
}

.pomodoro-widget-frame iframe {
  display: block;
  width: min(100%, 340px);
  max-width: 100%;
  border: 0;
}

.github-profile-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.github-profile-summary {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  padding: 1rem;
}

.github-profile-summary img {
  border: 1px solid var(--line);
  border-radius: 50%;
}

.github-profile-summary strong,
.github-profile-summary a {
  display: block;
}

.github-profile-summary strong {
  color: var(--dark);
  font-size: .95rem;
}

.github-profile-summary a {
  color: var(--muted);
  font-size: .76rem;
  text-decoration: none;
}

.github-profile-summary a:hover,
.github-repo-list a:hover strong {
  color: var(--green);
}

.github-repo-count {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .74rem;
}

.github-repo-list {
  border-top: 1px solid var(--line);
  list-style: none;
}

.github-repo-list li + li {
  border-top: 1px solid var(--line);
}

.github-repo-list a {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: center;
  padding: .75rem 1rem;
  color: var(--muted);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.github-repo-list a:hover {
  background: var(--surface-soft);
}

.github-repo-list strong,
.github-repo-list small {
  display: block;
}

.github-repo-list strong {
  color: var(--dark);
  font-size: .83rem;
}

.github-repo-list small {
  margin-top: .1rem;
  color: var(--muted);
  font-size: .69rem;
}

.github-repo-icon {
  color: var(--green);
  font-size: 1rem;
  font-weight: 800;
}

.music-library { min-height: 430px; }

.playlist-card-list {
  display: grid;
  gap: .7rem;
}

.playlist-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 1.7rem;
  align-items: center;
  gap: .75rem;
  min-height: 116px;
  width: 100%;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.playlist-card[hidden] { display: none; }

.playlist-card:hover {
  border-color: #b6d4c8;
  box-shadow: 0 7px 17px rgba(45, 91, 72, .1);
  transform: translateY(-1px);
}

.playlist-card img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.playlist-card-copy { min-width: 0; }
.playlist-card-copy strong,
.playlist-card-copy small { display: block; }
.playlist-card-copy strong {
  overflow: hidden;
  color: var(--dark);
  font-size: .82rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playlist-card-copy small {
  margin-top: .35rem;
  color: var(--muted);
  font-size: .68rem;
}
.playlist-card-mobile-meta { display: none; }
.playlist-card-play {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: .62rem;
}

.playlist-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  margin-top: .8rem;
}

.playlist-pagination button,
.music-player-actions button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.playlist-pagination button { width: 1.8rem; height: 1.8rem; }
.playlist-pagination button:disabled { cursor: default; opacity: .4; }
.playlist-pagination span { color: var(--muted); font-size: .72rem; }

.music-player-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.music-player-actions button { padding: .4rem .55rem; font-size: .72rem; }
.music-player-actions a { color: var(--green); font-size: .75rem; font-weight: 800; text-decoration: none; }
.music-player-actions a:hover { text-decoration: underline; }

.music-widget-frame {
  display: flex;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.music-widget-frame iframe {
  display: block;
  width: min(100%, 340px);
  max-width: 100%;
  border: 0;
}

.weather-widget-caption {
  margin-top: .75rem;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.55;
}

@media (max-width: 1000px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .gradient-sky-frame {
    justify-content: flex-start;
  }

  .dashboard-widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tracking-board-main-grid { grid-template-columns: 1fr 1fr; }
  .tracking-work { grid-row: span 2; }
  .tracking-achievements { grid-column: 2; }
  .tracking-month-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tracking-month-main-grid, .tracking-month-insight-grid, .tracking-week-insight-grid { grid-template-columns: 1fr; }
  .tracking-goal-layout { grid-template-columns: 1fr; }

}

@media (max-width: 760px) {
  .weather-widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playlist-card-desktop-meta { display: none; }
  .playlist-card-mobile-meta {
    display: block;
    color: var(--green);
    font-weight: 800;
  }
}

@media (max-width: 600px) {
  .dashboard-search form {
    min-height: 3.7rem;
    padding-left: 1rem;
  }

  .search-field {
    height: auto;
  }

  .weather-widget-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-widget-grid {
    grid-template-columns: 1fr;
  }

  .tracking-board-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .tracking-board-clock { order: 3; width: 100%; margin: 0; padding: .5rem 0 0; border-top: 1px solid #e1e5ea; border-left: 0; }
  .tracking-habit-grid, .tracking-pomodoro-grid, .tracking-tea-grid { grid-template-columns: 1fr; }
  .tracking-board-main-grid { grid-template-columns: 1fr; }
  .tracking-work, .tracking-achievements { grid-row: auto; grid-column: auto; }
  .tracking-month-summary { grid-template-columns: 1fr; }
  .tracking-month-controls { align-items: flex-start; flex-direction: column; }
  .tracking-goal-section .tracking-goal-grid { grid-template-columns: 1fr; }
  .tracking-goal-controls { align-items: flex-start; flex-direction: column; }
  .tracking-week-summary { grid-template-columns: 1fr; }
  .tracking-week-insights > div { grid-template-columns: 1fr; }
  .tracking-week-controls { align-items: flex-start; flex-direction: column; }
}

/* ─── Calendar ─── */

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cal-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: .04em;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.cal-nav-btn {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.cal-nav-btn:hover {
  border-color: #c08a2f;
  color: #c08a2f;
}

.cal-today-btn {
  height: 2rem;
  padding: 0 .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.cal-today-btn:hover {
  background: var(--line);
  border-color: #c08a2f;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.cal-weekday {
  padding: .55rem .3rem;
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid var(--line);
}

.cal-cell {
  position: relative;
  min-height: 5rem;
  padding: .4rem .5rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  transition: background .12s;
}

.cal-cell:hover {
  background: var(--surface-soft);
}

.cal-other-month .cal-date,
.cal-other-month .cal-lunar {
  color: #c9c1b7;
}

.cal-lunar {
  display: block;
  font-size: .68rem;
  color: var(--muted);
  line-height: 1.3;
}

.cal-lunar-start {
  color: var(--red);
  border-bottom: 2px solid var(--red);
  display: inline-block;
}

.cal-date {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-top: .15rem;
}

.cal-today {
  background: #fef2f2;
}

.cal-date-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  margin-top: .35rem;
}

.cal-has-data {
  cursor: pointer;
}

.cal-has-data:hover {
  background: #f0ece6;
}

.cal-value {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--amber);
  margin-top: .25rem;
}

.cal-selected {
  outline: 2px solid #c08a2f;
  outline-offset: -2px;
  background: #fdf8ed;
  z-index: 1;
}

/* ─── Detail panel ─── */

.detail-panel {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: fadeIn .2s ease;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: #2f2924;
  border-radius: var(--radius) var(--radius) 0 0;
}

.detail-title {
  font-size: .95rem;
  font-weight: 800;
  color: #fff;
}

.detail-close {
  width: 1.7rem;
  height: 1.7rem;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
}

.detail-close:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
}

.detail-body {
  padding: .8rem 1rem;
}

.detail-row {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .45rem 0;
}

.detail-row + .detail-row {
  border-top: 1px solid var(--line);
}

.detail-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  min-width: 4.5rem;
}

.detail-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.detail-note-text {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.55;
}

/* ─── Task list in detail panel ─── */

.detail-tasks {
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .35rem 0;
}

.task-num {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #2f2924;
  color: #f7c974;
  font-size: .7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: .1rem;
}

.task-time {
  flex-shrink: 0;
  min-width: 7rem;
  font-size: .76rem;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  color: var(--muted);
  font-weight: 600;
  margin-top: .15rem;
  white-space: nowrap;
}

.task-text {
  font-size: .85rem;
  color: var(--text);
  line-height: 1.5;
}

/* ─── Summary bar ─── */

.summary-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-item {
  display: flex;
  align-items: baseline;
  gap: .35rem;
}

.summary-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
}

.summary-value {
  font-size: .95rem;
  font-weight: 800;
  color: var(--dark);
}

.summary-divider {
  width: 1px;
  height: 1.4rem;
  background: var(--line);
  flex-shrink: 0;
}

/* ─── Route Table ─── */

.route-search {
  margin-bottom: 1rem;
}

.route-search input {
  width: 100%;
  min-height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  padding: .55rem .7rem;
  font-size: .9rem;
  outline: none;
}

.route-search input:focus {
  border-color: #c08a2f;
  box-shadow: 0 0 0 3px rgba(192, 138, 47, .16);
}

.empty-state {
  border: 1px dashed #c9c1b7;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .6);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.check-section {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: visible;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  font: inherit;
  text-align: left;
  padding: .9rem 1.1rem;
  background: #2f2924;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}

.section-header:hover {
  background: #3b342d;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
}

.section-header h2 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.section-header-right {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}

.section-count {
  font-size: .75rem;
  font-weight: 700;
  color: #f7c974;
}

.section-arrow {
  font-size: .85rem;
  transition: transform .2s ease;
  color: #f7c974;
}

.check-section.open .section-arrow {
  transform: rotate(90deg);
}

.section-body {
  overflow: visible;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .9rem 1rem;
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  text-decoration: none;
  color: var(--text);
  font-size: .84rem;
  font-weight: 700;
  transition: border-color .15s, box-shadow .15s, background .15s, color .15s;
  cursor: default;
  white-space: nowrap;
}

a.pill {
  cursor: pointer;
}

.pill:hover {
  z-index: 10;
}

a.pill:hover {
  border-color: #c08a2f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  background: var(--surface);
  color: #8b5e1a;
}

.pill-icon img {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}

.pill-static {
  background: var(--surface);
  border-style: dashed;
}

.pill-path {
  padding: .1rem .35rem;
  font-size: .68rem;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  margin-left: .2rem;
}

.pill-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 100;
  max-width: 480px;
  min-width: 200px;
  padding: .6rem .9rem;
  border-radius: 8px;
  background: #2f2924;
  color: #f5f0e8;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
}

.pill-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #2f2924;
}

.pill:hover .pill-tip {
  opacity: 1;
}

@media (max-width: 719px) {
  .pill-group {
    padding: .7rem .6rem;
    gap: .4rem;
  }

  .pill {
    font-size: .8rem;
    padding: .35rem .7rem;
  }

  .pill-tip {
    left: 0;
    transform: none;
    bottom: calc(100% + 4px);
  }

  .pill-tip::after {
    left: 1rem;
    transform: none;
  }
}

/* ─── Responsive ─── */

@media (max-width: 719px) {
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: .5rem;
    left: .5rem;
    z-index: 15;
    width: 2.3rem;
    height: 2.3rem;
    border: none;
    border-radius: 8px;
    background: #2f2924;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    -webkit-backface-visibility: hidden;
    transition: opacity .2s;
  }

  .sidebar-toggle:hover {
    opacity: .85;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 24;
    background: rgba(0, 0, 0, .45);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 25;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%);
    will-change: transform;
    transition: -webkit-transform .25s ease, transform .25s ease;
    width: var(--sidebar-w);
  }

  .sidebar.open {
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }

  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: 1.8rem;
    height: 1.8rem;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .7);
    font-size: .9rem;
    cursor: pointer;
    transition: background .15s;
  }

  .sidebar-close:hover {
    background: rgba(255, 255, 255, .18);
    color: #fff;
  }

  .sidebar-brand {
    padding: 1.2rem .8rem .9rem;
    position: relative;
  }

  .sidebar-title {
    font-size: 1.1rem;
  }

  .sidebar-nav {
    padding: .4rem .4rem .8rem;
  }

.sidebar-item {
    padding: .6rem .6rem;
    font-size: .82rem;
  }

  .main-area {
    padding-top: .2rem;
  }
}

/* ─── League of Legends ─── */

.lol-view {
  --lol-bg: #07111f;
  --lol-panel: #121f32;
  --lol-text: #eef5ff;
  --lol-muted: #91a2b9;
  --lol-gold: #f5c542;
  color: var(--lol-text);
  animation: fadeIn .2s ease;
}

/* RESG data banner */

.lol-data-link {
  width: min(100%, 760px);
  margin: 0 auto 1.15rem;
}

.lol-data-link a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 58px;
  padding: .85rem 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(245, 197, 66, .42);
  border-radius: 16px;
  background:
    radial-gradient(circle at 10% 50%, rgba(67, 189, 242, .22), transparent 34%),
    linear-gradient(120deg, rgba(13, 35, 60, .96), rgba(28, 36, 58, .94) 55%, rgba(74, 55, 24, .76));
  color: #f7e8b4;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 10px 26px rgba(0, 0, 0, .24),
    0 0 20px rgba(245, 197, 66, .08);
  transition:
    transform .25s ease,
    border-color .25s ease,
    box-shadow .25s ease,
    background .25s ease;
}

.lol-data-link a::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      105deg,
      transparent 20%,
      rgba(255, 255, 255, .09) 42%,
      transparent 62%
    );
  transform: translateX(-110%);
  transition: transform .55s ease;
}

.lol-data-link a::after {
  content: '';
  position: absolute;
  right: -45px;
  bottom: -60px;
  width: 150px;
  height: 150px;
  pointer-events: none;
  border: 1px solid rgba(245, 197, 66, .12);
  border-radius: 50%;
  box-shadow:
    0 0 0 18px rgba(245, 197, 66, .035),
    0 0 0 36px rgba(67, 189, 242, .025);
}

.lol-data-link a:hover {
  border-color: rgba(245, 197, 66, .72);
  background:
    radial-gradient(circle at 10% 50%, rgba(67, 189, 242, .3), transparent 36%),
    linear-gradient(120deg, rgba(14, 41, 69, .98), rgba(35, 43, 67, .97) 55%, rgba(91, 66, 25, .82));
  transform: translateY(-4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 16px 34px rgba(0, 0, 0, .3),
    0 0 26px rgba(245, 197, 66, .16);
}

.lol-data-link a:hover::before {
  transform: translateX(110%);
}

.lol-data-link-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border: 1px solid rgba(245, 197, 66, .38);
  border-radius: 10px;
  background: rgba(245, 197, 66, .12);
  color: var(--lol-gold);
  font-size: 1.1rem;
  box-shadow: 0 0 14px rgba(245, 197, 66, .12);
}

.lol-data-link-text {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .4);
}

.lol-data-link-arrow {
  position: relative;
  z-index: 1;
  color: var(--lol-gold);
  font-size: .9rem;
  opacity: .72;
  transform: translateX(0);
  transition:
    opacity .2s ease,
    transform .2s ease;
}

.lol-data-link a:hover .lol-data-link-arrow {
  opacity: 1;
  transform: translateX(4px);
}

.lol-guide-panel {
  animation: fadeIn .2s ease;
}

/* Guide tabs */

.lol-guide-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
  width: min(100%, 760px);
  margin: 0 auto 1.55rem;
  padding: .42rem;
  border: 1px solid rgba(99, 129, 170, .34);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(20, 36, 57, .92), rgba(8, 21, 38, .94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 10px 25px rgba(0, 0, 0, .22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lol-guide-switcher button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--lol-muted);
  cursor: pointer;
  transition:
    color .22s ease,
    background .22s ease,
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s ease;
}

.lol-guide-switcher button::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, .08),
    transparent
  );
  opacity: 0;
  transform: translateX(-80%);
  transition:
    opacity .22s ease,
    transform .45s ease;
}

.lol-guide-switcher button:hover {
  border-color: rgba(67, 189, 242, .18);
  background: rgba(67, 189, 242, .065);
  color: var(--lol-text);
  transform: translateY(-1px);
}

.lol-guide-switcher button:hover::before {
  opacity: 1;
  transform: translateX(80%);
}

.lol-guide-switcher button.active {
  border-color: rgba(255, 222, 119, .88);
  background:
    linear-gradient(135deg, #d99a25 0%, #f5c542 48%, #ffe28a 100%);
  color: #191405;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -1px 0 rgba(126, 78, 9, .2),
    0 5px 16px rgba(245, 197, 66, .28),
    0 0 24px rgba(245, 197, 66, .18);
  transform: translateY(-1px);
}

.lol-guide-switcher button.active::before {
  opacity: .5;
}

.lol-guide-switcher span {
  position: relative;
  z-index: 1;
  color: var(--lol-gold);
  font-size: .65rem;
  font-weight: 950;
  letter-spacing: .08em;
}

.lol-guide-switcher button.active span {
  color: #61420a;
}

.lol-guide-switcher strong {
  position: relative;
  z-index: 1;
  font-size: .9rem;
  font-weight: 850;
}

/* ─── View switch: hub / formula ─── */

.lol-view-switch {
  display: inline-flex;
  gap: .3rem;
  width: min(100%, 760px);
  margin: 0 auto 1.35rem;
  padding: .38rem;
  border: 1px solid rgba(99, 129, 170, .34);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(20, 36, 57, .92), rgba(8, 21, 38, .94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 10px 25px rgba(0, 0, 0, .22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lol-view-switch button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--lol-muted);
  font-size: .9rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    color .22s ease,
    background .22s ease,
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s ease;
}

.lol-view-switch button:hover {
  color: var(--lol-text);
  background: rgba(67, 189, 242, .06);
}

.lol-view-switch button.active {
  border-color: rgba(255, 222, 119, .88);
  background: linear-gradient(135deg, #d99a25 0%, #f5c542 48%, #ffe28a 100%);
  color: #191405;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -1px 0 rgba(126, 78, 9, .2),
    0 5px 16px rgba(245, 197, 66, .28),
    0 0 24px rgba(245, 197, 66, .18);
}

.lol-view-switch-ico {
  font-size: 1.05rem;
}

.lol-view-scope {
  animation: fadeIn .22s ease;
}

/* ─── Champion Index Hub (gallery) ─── */

.lol-hub {
  position: relative;
  margin-bottom: 1.4rem;
  padding: 1.2rem 1.15rem 1rem;
  overflow: hidden;
  border: 1px solid rgba(77, 139, 189, .3);
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 199, 255, .12), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(177, 122, 255, .12), transparent 40%),
    linear-gradient(150deg, rgba(16, 31, 50, .92), rgba(7, 17, 31, .9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 18px 44px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

.lol-hub-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.lol-hub-eyebrow {
  display: block;
  margin-bottom: .15rem;
  color: var(--lol-gold);
  font-size: .66rem;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(245, 197, 66, .3);
}

.lol-hub-title h2 {
  color: var(--lol-text);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 950;
  line-height: 1.15;
}

.lol-hub-title p {
  margin-top: .2rem;
  color: var(--lol-muted);
  font-size: .84rem;
  font-weight: 650;
}

.lol-hub-source {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex: 0 0 auto;
  align-self: flex-end;
  padding: .38rem .7rem;
  border: 1px solid rgba(145, 162, 185, .22);
  border-radius: 999px;
  background: rgba(5, 14, 26, .4);
  color: #93a7bf;
  font-size: .76rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color .2s ease,
    border-color .2s ease,
    background .2s ease,
    transform .2s ease;
}

.lol-hub-source:hover {
  border-color: rgba(245, 197, 66, .45);
  background: rgba(245, 197, 66, .07);
  color: var(--lol-gold);
  transform: translateY(-1px);
}

.lol-hub-source-ico {
  color: var(--lol-gold);
  font-size: .85rem;
}

.lol-hub-source-arrow {
  color: var(--lol-gold);
  font-size: .72rem;
  opacity: .6;
  transition:
    opacity .2s ease,
    transform .2s ease;
}

.lol-hub-source:hover .lol-hub-source-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.lol-hub-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.lol-hub-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 200px;
  padding: .4rem .8rem;
  border: 1px solid rgba(99, 129, 170, .32);
  border-radius: 999px;
  background: rgba(5, 14, 26, .45);
  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}

.lol-hub-search:focus-within {
  border-color: rgba(56, 199, 255, .55);
  background: rgba(5, 14, 26, .6);
  box-shadow: 0 0 0 3px rgba(56, 199, 255, .12);
}

.lol-hub-search-ico {
  color: var(--lol-muted);
  font-size: .85rem;
}

.lol-hub-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--lol-text);
  font-size: .85rem;
  font-weight: 650;
}

.lol-hub-search input::placeholder {
  color: #6c7f97;
}

/* 筛选/排序浮窗 */
.lol-hub-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex: 0 0 auto;
}

.lol-hub-drop {
  position: relative;
}

.lol-hub-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .46rem .8rem;
  border: 1px solid rgba(99, 129, 170, .34);
  border-radius: 999px;
  background: rgba(5, 14, 26, .5);
  color: var(--lol-muted);
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    color .2s ease,
    border-color .2s ease,
    background .2s ease,
    box-shadow .2s ease;
}

.lol-hub-drop-btn:hover {
  color: var(--lol-text);
  border-color: rgba(56, 199, 255, .5);
}

.lol-hub-drop-btn.open {
  border-color: rgba(245, 197, 66, .6);
  background: rgba(245, 197, 66, .08);
  color: var(--lol-gold);
  box-shadow: 0 0 0 3px rgba(245, 197, 66, .12);
}

.lol-hub-drop-ico {
  color: var(--lol-gold);
  font-size: .85rem;
}

.lol-hub-drop-value {
  padding: .1rem .45rem;
  border-radius: 999px;
  background: rgba(56, 199, 255, .12);
  color: #7fcfff;
  font-size: .72rem;
  font-weight: 900;
}

.lol-hub-drop-arrow {
  color: var(--lol-muted);
  font-size: .7rem;
  transition: transform .2s ease;
}

.lol-hub-drop-btn.open .lol-hub-drop-arrow {
  transform: rotate(180deg);
}

.lol-hub-drop-panel {
  position: absolute;
  top: calc(100% + .55rem);
  right: 0;
  z-index: 30;
  min-width: 180px;
  padding: .5rem;
  border: 1px solid rgba(99, 129, 170, .4);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(177, 122, 255, .1), transparent 40%),
    linear-gradient(160deg, rgba(20, 36, 57, .98), rgba(8, 21, 38, .99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 20px 44px rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity .18s ease,
    transform .18s ease,
    visibility .18s;
}

.lol-hub-drop-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lol-hub-drop-title {
  padding: .2rem .55rem .4rem;
  color: var(--lol-muted);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.lol-hub-drop-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  width: 100%;
  padding: .5rem .55rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--lol-muted);
  font-size: .84rem;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
  transition:
    color .15s ease,
    background .15s ease;
}

.lol-hub-drop-option:hover {
  color: var(--lol-text);
  background: rgba(67, 189, 242, .08);
}

.lol-hub-drop-option.active {
  color: var(--lol-gold);
  background: rgba(245, 197, 66, .08);
}

.lol-hub-drop-option.active::after {
  content: '✓';
  color: var(--lol-gold);
  font-size: .8rem;
}

.lol-hero-card-wr {
  display: inline-block;
  margin-top: .18rem;
  color: #5ee6a5;
  font-size: .64rem;
  font-weight: 850;
}

.lol-hub-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: rgba(67, 189, 242, .14);
  color: #7fcfff;
  font-size: .68rem;
  font-weight: 900;
}

.lol-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: .55rem;
}

.lol-hero-card {
  position: relative;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(84, 115, 156, .4);
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--hub-tone, #38c7ff) 14%, transparent), transparent 45%),
    rgba(7, 17, 31, .55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .045),
    0 8px 20px rgba(0, 0, 0, .16);
  transition:
    transform .26s cubic-bezier(.2, .8, .2, 1),
    border-color .26s ease,
    box-shadow .26s ease;
}

.lol-hero-card:hover {
  border-color: color-mix(in srgb, var(--hub-tone, #38c7ff) 66%, #40526c);
  transform: translateY(-5px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 18px 34px rgba(0, 0, 0, .3),
    0 0 26px color-mix(in srgb, var(--hub-tone, #38c7ff) 16%, transparent);
}

.lol-hub-tone-gold { --hub-tone: #ffd34f; }
.lol-hub-tone-red { --hub-tone: #ff5f70; }
.lol-hub-tone-blue { --hub-tone: #38c7ff; }
.lol-hub-tone-purple { --hub-tone: #b17aff; }
.lol-hub-tone-orange { --hub-tone: #ff963f; }
.lol-hub-tone-cyan { --hub-tone: #38c7f2; }

.lol-hero-card-btn {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: .2rem .7rem;
  align-items: center;
  width: 100%;
  padding: .65rem .7rem;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.lol-hero-card-avatar {
  width: 46px;
  height: 46px;
}

.lol-hero-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--hub-tone, #38c7ff) 70%, white 8%);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, .4),
    0 0 16px color-mix(in srgb, var(--hub-tone, #38c7ff) 30%, transparent);
}

.lol-hero-card-info {
  min-width: 0;
}

.lol-hero-card-info strong {
  display: block;
  color: var(--lol-text);
  font-size: .95rem;
  font-weight: 950;
  line-height: 1.2;
}

.lol-hero-card-info em {
  display: block;
  max-width: 100%;
  margin-top: .2rem;
  padding: .1rem .4rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--hub-tone, #38c7ff) 55%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--hub-tone, #38c7ff) 10%, transparent);
  color: var(--hub-tone, #7fcfff);
  font-size: .6rem;
  font-weight: 850;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lol-hero-card-arrow {
  grid-area: arrow;
  color: var(--hub-tone, var(--lol-gold));
  font-size: .85rem;
  font-weight: 900;
  opacity: .6;
  transition:
    opacity .2s ease,
    transform .2s ease;
}

.lol-hero-card-btn:hover .lol-hero-card-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.lol-hero-card-core {
  grid-area: core;
  display: flex;
  gap: .45rem;
  margin-top: .4rem;
}

.lol-hero-card-core img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, .1);
  background: #0b1525;
  object-fit: cover;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
  transition:
    transform .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.lol-hero-card:hover .lol-hero-card-core img {
  border-color: color-mix(in srgb, var(--hub-tone, #38c7ff) 55%, transparent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35), 0 0 12px color-mix(in srgb, var(--hub-tone, #38c7ff) 25%, transparent);
}

.lol-hero-card:hover .lol-hero-card-core img:nth-child(1) { transform: translateY(-2px); }
.lol-hero-card:hover .lol-hero-card-core img:nth-child(2) { transform: translateY(-4px); }
.lol-hero-card:hover .lol-hero-card-core img:nth-child(3) { transform: translateY(-2px); }

.lol-hub-tip {
  margin: .9rem 0 0;
  color: #7f93ab;
  font-size: .74rem;
  font-weight: 650;
  text-align: center;
}

/* ─── Hero Build Drawer ─── */

.lol-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.lol-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 15, .66);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn .18s ease;
}

.lol-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(700px, 94vw);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-left: 1px solid rgba(99, 129, 170, .4);
  background:
    radial-gradient(circle at 100% 0, rgba(177, 122, 255, .12), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(56, 199, 255, .1), transparent 38%),
    linear-gradient(160deg, rgba(16, 31, 50, .98), rgba(7, 17, 31, .99));
  box-shadow: -24px 0 60px rgba(0, 0, 0, .5);
  animation: drawerIn .28s cubic-bezier(.2, .8, .2, 1);
}

@keyframes drawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.lol-drawer-close {
  position: sticky;
  top: .7rem;
  left: auto;
  z-index: 3;
  margin: .6rem .6rem 0 auto;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(145, 162, 185, .3);
  border-radius: 999px;
  background: rgba(5, 14, 26, .55);
  color: var(--lol-muted);
  font-size: 1rem;
  cursor: pointer;
  transition:
    color .2s ease,
    border-color .2s ease,
    background .2s ease,
    transform .2s ease;
}

.lol-drawer-close:hover {
  border-color: rgba(245, 197, 66, .5);
  background: rgba(245, 197, 66, .08);
  color: var(--lol-gold);
  transform: rotate(90deg);
}

.lol-drawer-content {
  padding: 0 1.3rem 1.6rem;
}

.lol-drawer-head {
  position: relative;
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: -.4rem 0 1.2rem;
  padding: 1.4rem 0 1.2rem;
  border-bottom: 1px solid rgba(99, 129, 170, .28);
}

.lol-drawer-hero {
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  border-radius: 22px;
  border: 3px solid color-mix(in srgb, var(--hub-tone, #38c7ff) 75%, white 10%);
  object-fit: cover;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, .45),
    0 0 30px color-mix(in srgb, var(--hub-tone, #38c7ff) 32%, transparent);
}

.lol-drawer-headinfo {
  min-width: 0;
}

.lol-drawer-kicker {
  display: inline-block;
  margin-bottom: .3rem;
  padding: .16rem .5rem;
  border: 1px solid color-mix(in srgb, var(--hub-tone, #38c7ff) 55%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--hub-tone, #38c7ff) 10%, transparent);
  color: var(--hub-tone, #7fcfff);
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .04em;
}

.lol-drawer-headinfo h2 {
  color: var(--lol-text);
  font-size: 1.7rem;
  font-weight: 950;
  line-height: 1.1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}

.lol-drawer-headinfo p {
  margin-top: .25rem;
  color: var(--lol-muted);
  font-size: .85rem;
  font-weight: 700;
}

.lol-drawer-note {
  display: block;
  margin-top: .45rem;
  padding: .45rem .7rem;
  border-left: 3px solid var(--hub-tone, var(--lol-gold));
  border-radius: 6px;
  background: rgba(5, 14, 26, .5);
  color: #bcd2ec;
  font-size: .78rem;
  font-weight: 700;
  font-style: normal;
  line-height: 1.5;
}

.lol-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.lol-drawer-step {
  padding: .9rem .95rem;
  border: 1px solid rgba(84, 115, 156, .38);
  border-radius: 16px;
  background: rgba(7, 17, 31, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.lol-drawer-step > h3,
.lol-drawer-rules > h3 {
  margin-bottom: .6rem;
  color: var(--lol-muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.lol-drawer-step-core { border-color: rgba(245, 197, 66, .4); }
.lol-drawer-step-starter { border-color: rgba(56, 229, 165, .4); }

.lol-drawer-picks {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem .75rem;
}

.lol-drawer-pick {
  width: 64px;
  text-align: center;
  color: #cbd7e6;
}

.lol-drawer-pick img {
  display: block;
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border: 2px solid var(--lol-gold);
  border-radius: 12px;
  background: #0b1525;
  object-fit: cover;
  box-shadow:
    0 5px 14px rgba(0, 0, 0, .38),
    0 0 14px rgba(245, 197, 66, .14);
}

.lol-drawer-pick.lol-pick-starter img {
  border-color: #38e5a5;
  box-shadow:
    0 5px 14px rgba(0, 0, 0, .38),
    0 0 13px rgba(56, 229, 165, .16);
}

.lol-drawer-pick figcaption {
  margin-top: .3rem;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
}

.lol-drawer-callout {
  padding: .7rem .85rem;
  border: 1px solid rgba(56, 199, 255, .4);
  border-radius: 12px;
  background: rgba(56, 199, 255, .07);
  color: #9fd0f0;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.55;
}

.lol-drawer-branches {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.lol-drawer-branch {
  padding: .7rem .8rem;
  border: 1px solid rgba(84, 115, 156, .3);
  border-radius: 12px;
  background: rgba(5, 14, 26, .4);
}

.lol-drawer-branch-badge {
  display: inline-block;
  margin-bottom: .35rem;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: rgba(56, 199, 255, .12);
  color: #7fcfff;
  font-size: .62rem;
  font-weight: 850;
}

.lol-drawer-branch strong {
  display: block;
  color: var(--lol-text);
  font-size: .92rem;
  font-weight: 900;
}

.lol-drawer-branch p {
  margin: .25rem 0 .5rem;
  color: var(--lol-muted);
  font-size: .78rem;
  line-height: 1.55;
}

.lol-drawer-later {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.lol-drawer-later-group {
  --hub-tone: #ff963f;
  padding: .7rem .8rem;
  border: 1px solid color-mix(in srgb, var(--hub-tone, #ff963f) 42%, #263750);
  border-radius: 12px;
  background: rgba(5, 14, 26, .4);
}

.lol-drawer-later-group strong {
  display: block;
  margin-bottom: .4rem;
  color: var(--lol-text);
  font-size: .88rem;
  font-weight: 900;
}

.lol-drawer-later-group p {
  margin-bottom: .45rem;
  color: var(--lol-muted);
  font-size: .76rem;
}

.lol-drawer-boot .lol-drawer-picks {
  justify-content: flex-start;
}

/* Hero augments recommendation */

.lol-drawer-augs {
  border-color: rgba(177, 122, 255, .42);
}

.lol-drawer-augs > h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.lol-drawer-augs-src {
  padding: .08rem .42rem;
  border: 1px solid rgba(177, 122, 255, .4);
  border-radius: 999px;
  background: rgba(177, 122, 255, .08);
  color: #c29bff;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .05em;
}

.lol-drawer-aug-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem .75rem;
}

.lol-drawer-aug-group {
  min-width: 0;
  margin-bottom: 0;
}

.lol-drawer-aug-group:last-child {
  margin-bottom: 0;
}

.lol-drawer-aug-label {
  display: inline-block;
  margin-bottom: .35rem;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: rgba(177, 122, 255, .1);
  color: #b98aff;
  font-size: .62rem;
  font-weight: 900;
}

.lol-drawer-aug-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.lol-drawer-aug-item {
  padding: .5rem .65rem;
  border: 1px solid rgba(84, 115, 156, .3);
  border-radius: 11px;
  background: rgba(5, 14, 26, .42);
  transition:
    border-color .2s ease,
    background .2s ease;
}

.lol-drawer-aug-item:hover {
  border-color: rgba(177, 122, 255, .5);
  background: rgba(177, 122, 255, .06);
}

.lol-drawer-aug-name {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.lol-drawer-aug-name em {
  padding: .14rem .5rem;
  border-radius: 999px;
  background: rgba(56, 199, 255, .12);
  color: #8fd0ff;
  font-size: .74rem;
  font-weight: 800;
  font-style: normal;
  white-space: nowrap;
}

.lol-drawer-aug-name strong {
  margin-left: auto;
  color: #5ee6a5;
  font-size: .82rem;
  font-weight: 950;
  text-shadow: 0 0 12px rgba(94, 230, 165, .35);
}

.lol-drawer-aug-build {
  margin-top: .35rem;
  color: #8498b1;
  font-size: .68rem;
  font-weight: 650;
  line-height: 1.4;
}

.lol-drawer-rules {
  margin-top: 1.1rem;
  padding: .9rem .95rem;
  border: 1px solid rgba(96, 122, 157, .4);
  border-radius: 16px;
  background: rgba(5, 14, 26, .45);
}

.lol-drawer-rules ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lol-drawer-rules li {
  position: relative;
  margin: .3rem 0;
  padding-left: 1.05rem;
  color: var(--lol-muted);
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.5;
}

.lol-drawer-rules li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--lol-gold);
  font-size: .6rem;
  top: .42em;
}

/* Hero banner */

.lol-hero {
  position: relative;
  margin-bottom: 1rem;
  padding: 1.5rem 1.25rem 1.4rem;
  overflow: hidden;
  border: 1px solid rgba(77, 139, 189, .22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% -30%, rgba(245, 197, 66, .24), transparent 42%),
    radial-gradient(circle at 8% 30%, rgba(67, 189, 242, .18), transparent 34%),
    radial-gradient(circle at 92% 72%, rgba(34, 105, 172, .17), transparent 32%),
    linear-gradient(145deg, rgba(14, 34, 57, .98), rgba(7, 17, 31, .98));
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 20px 45px rgba(0, 0, 0, .25);
}

.lol-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .36;
  background-image:
    linear-gradient(rgba(67, 189, 242, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 189, 242, .06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), transparent 90%);
}

.lol-hero::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(72%, 520px);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 197, 66, .4),
    var(--lol-gold),
    rgba(245, 197, 66, .4),
    transparent
  );
  box-shadow:
    0 0 14px rgba(245, 197, 66, .42),
    0 0 30px rgba(245, 197, 66, .16);
  transform: translateX(-50%);
}

.lol-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--lol-text);
  font-size: clamp(1.6rem, 3.8vw, 2.4rem);
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-shadow:
    0 3px 18px rgba(0, 0, 0, .55),
    0 0 28px rgba(67, 189, 242, .1);
}

.lol-hero p {
  position: relative;
  z-index: 1;
  margin-top: .4rem;
  color: var(--lol-gold);
  font-size: clamp(.9rem, 1.8vw, 1.05rem);
  font-weight: 900;
  letter-spacing: .04em;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, .5),
    0 0 18px rgba(245, 197, 66, .22);
}

.lol-source {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: .75rem;
  padding: .3rem .7rem;
  border: 1px solid rgba(145, 162, 185, .16);
  border-radius: 999px;
  background: rgba(5, 14, 26, .36);
  color: #8fa4bf;
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    color .2s ease,
    border-color .2s ease,
    background .2s ease;
}

.lol-source:hover {
  border-color: rgba(245, 197, 66, .4);
  background: rgba(245, 197, 66, .08);
  color: var(--lol-gold);
}

/* Main build cards */

.lol-build,
.lol-rules {
  position: relative;
  margin-bottom: 1rem;
  padding: 1.05rem 1.05rem .9rem;
  border: 1px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(
      145deg,
      rgba(18, 31, 50, .88),
      rgba(8, 20, 36, .82)
    ) padding-box,
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--lol-tone, #50617a) 88%, white 12%),
      rgba(255, 255, 255, .06) 42%,
      color-mix(in srgb, var(--lol-tone, #50617a) 62%, transparent)
    ) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .055),
    0 14px 36px rgba(0, 0, 0, .2),
    0 0 24px color-mix(in srgb, var(--lol-tone, #50617a) 13%, transparent);
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
}

.lol-build::before,
.lol-rules::before {
  content: '';
  position: absolute;
  top: 0;
  left: 7%;
  width: 36%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--lol-tone, #50617a) 85%, white 15%),
    transparent
  );
  box-shadow: 0 0 12px var(--lol-tone, #50617a);
}

.lol-tone-gold {
  --lol-tone: #ffd34f;
}

.lol-tone-red {
  --lol-tone: #ff5f70;
}

.lol-tone-blue {
  --lol-tone: #38c7ff;
}

.lol-tone-purple {
  --lol-tone: #b17aff;
}

/* Mage view: 3-column build grid to raise density */

.lol-mage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
  margin-bottom: .9rem;
}

.lol-mage-guide .lol-build {
  margin-bottom: 0;
  padding: 1rem .95rem .9rem;
  border-radius: 18px;
}

.lol-mage-guide .lol-build-heading {
  display: block;
  margin-bottom: .7rem;
}

.lol-mage-guide .lol-build-heading h2 {
  font-size: 1.15rem;
}

.lol-mage-guide .lol-build-heading span {
  display: block;
  margin-top: .1rem;
  font-size: .8rem;
}

.lol-mage-guide .lol-row {
  grid-template-columns: 1fr;
  gap: .35rem;
  min-height: 0;
  padding: .55rem 0;
}

.lol-mage-guide .lol-row-label {
  padding-top: 0;
  font-size: .8rem;
}

.lol-mage-guide .lol-pick {
  width: 56px;
}

.lol-mage-guide .lol-pick img {
  width: 52px;
  height: 52px;
  border-width: 2px;
  border-radius: 11px;
}

.lol-mage-guide .lol-pick figcaption {
  font-size: .72rem;
}

.lol-mage-guide .lol-join {
  margin: 0 -.35rem 1.1rem;
  font-size: 1.25rem;
}

.lol-build-heading {
  display: flex;
  align-items: baseline;
  gap: 2.2rem;
  margin-bottom: .75rem;
}

.lol-build-heading h2,
.lol-rules h2 {
  color: var(--lol-text);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 950;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.lol-build-heading span {
  color: var(--lol-tone);
  font-size: .98rem;
  font-weight: 900;
  text-shadow: 0 0 14px color-mix(in srgb, var(--lol-tone) 35%, transparent);
}

.lol-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: .85rem;
  align-items: start;
  min-height: 96px;
  padding: .55rem 0;
}

.lol-row + .lol-row {
  border-top: 1px solid rgba(145, 162, 185, .08);
}

.lol-row-label {
  padding-top: .75rem;
  color: var(--lol-muted);
  font-size: 1.05rem;
  font-weight: 900;
  white-space: nowrap;
}

.lol-label-core {
  color: var(--lol-gold);
  text-shadow: 0 0 12px rgba(245, 197, 66, .2);
}

.lol-label-champion {
  color: #38c7ff;
  text-shadow: 0 0 12px rgba(56, 199, 255, .2);
}

.lol-picks {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .8rem 1.2rem;
  min-width: 0;
}

.lol-pick {
  width: 80px;
  color: #d4dfed;
  text-align: center;
}

.lol-pick img {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto;
  border: 3px solid var(--lol-gold);
  border-radius: 14px;
  background: #0b1525;
  object-fit: cover;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, .4),
    0 0 0 1px rgba(255, 255, 255, .07),
    0 0 16px rgba(245, 197, 66, .15);
  transition:
    transform .24s cubic-bezier(.2, .8, .2, 1),
    border-color .24s ease,
    box-shadow .24s ease,
    filter .24s ease;
}

.lol-pick:hover img {
  z-index: 2;
  filter: brightness(1.1) saturate(1.08);
  transform: translateY(-3px) scale(1.1);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, .48),
    0 0 0 1px rgba(255, 255, 255, .12),
    0 0 24px color-mix(in srgb, var(--lol-tone, var(--lol-gold)) 42%, transparent);
}

.lol-pick-starter img {
  border-color: #38e5a5;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, .4),
    0 0 15px rgba(56, 229, 165, .16);
}

.lol-pick-champion img {
  border-color: #38c7ff;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, .4),
    0 0 15px rgba(56, 199, 255, .18);
}

.lol-pick figcaption {
  margin-top: .38rem;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  transition: color .2s ease;
}

.lol-pick:hover figcaption {
  color: #fff;
}

.lol-join {
  align-self: center;
  margin: 0 -.75rem 1.45rem;
  color: var(--lol-muted);
  font-size: 1.75rem;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(67, 189, 242, .18);
}

.lol-rules {
  --lol-tone: #607a9d;
  margin-bottom: 0;
}

.lol-rules ul {
  margin: .8rem 0 1.15rem;
  padding: 0;
  color: var(--lol-muted);
  font-size: .96rem;
  font-weight: 700;
  list-style: none;
}

.lol-rules li {
  position: relative;
  margin: .36rem 0;
  padding-left: 1.15rem;
  line-height: 1.55;
}

.lol-rules li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--lol-gold);
  text-shadow: 0 0 8px rgba(245, 197, 66, .4);
}

.lol-special {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: .8rem;
  align-items: start;
}

.lol-special h3 {
  padding-top: .7rem;
  color: var(--lol-gold);
  font-size: 1rem;
  font-weight: 900;
}

.lol-special-picks {
  gap: .8rem 1.2rem;
}

/* AP assassin formula view */

.lol-assassin-guide {
  --assassin-purple: #b17aff;
}

.lol-assassin-custom {
  background:
    linear-gradient(
      145deg,
      rgba(24, 31, 56, .91),
      rgba(12, 22, 42, .87)
    ) padding-box,
    linear-gradient(
      135deg,
      rgba(177, 122, 255, .8),
      rgba(67, 189, 242, .2),
      rgba(177, 122, 255, .45)
    ) border-box;
}

.lol-assassin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
}

.lol-assassin-card {
  position: relative;
  min-width: 0;
  padding: .8rem;
  border: 1px solid rgba(100, 128, 167, .38);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(177, 122, 255, .1), transparent 38%),
    rgba(7, 17, 31, .58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 8px 20px rgba(0, 0, 0, .14);
  transition:
    transform .25s cubic-bezier(.2, .8, .2, 1),
    border-color .25s ease,
    box-shadow .25s ease,
    background .25s ease;
}

.lol-assassin-card:hover {
  border-color: rgba(177, 122, 255, .62);
  background:
    radial-gradient(circle at 100% 0, rgba(177, 122, 255, .17), transparent 40%),
    rgba(9, 21, 39, .72);
  transform: translateY(-6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 16px 32px rgba(0, 0, 0, .26),
    0 0 24px rgba(177, 122, 255, .1);
}

.lol-assassin-card > header {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 56px;
  margin-bottom: .6rem;
}

.lol-assassin-card > header > img {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 2px solid #38c7ff;
  border-radius: 11px;
  object-fit: cover;
  box-shadow:
    0 5px 14px rgba(0, 0, 0, .38),
    0 0 0 1px rgba(255, 255, 255, .08),
    0 0 18px rgba(56, 199, 255, .28);
  transition:
    transform .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}

.lol-assassin-card:hover > header > img {
  border-color: #7ddcff;
  transform: scale(1.06);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, .42),
    0 0 0 1px rgba(255, 255, 255, .12),
    0 0 26px rgba(56, 199, 255, .46);
}

.lol-assassin-card h3 {
  color: var(--lol-text);
  font-size: .95rem;
  font-weight: 950;
}

.lol-assassin-card header p {
  margin-top: .1rem;
  color: #9aabc1;
  font-size: .68rem;
  font-weight: 650;
  line-height: 1.4;
}

.lol-assassin-line {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: .55rem;
  align-items: start;
  padding-top: .65rem;
  border-top: 1px dashed rgba(84, 110, 148, .5);
}

.lol-assassin-line + .lol-assassin-line {
  margin-top: .55rem;
}

.lol-assassin-line > span {
  padding-top: .38rem;
  color: #96a8bf;
  font-size: .72rem;
  font-weight: 900;
}

.lol-assassin-line:last-child > span {
  color: var(--lol-gold);
}

.lol-assassin-picks {
  gap: .55rem .7rem;
}

.lol-assassin-picks .lol-pick {
  width: 58px;
}

.lol-assassin-picks .lol-pick img {
  width: 54px;
  height: 54px;
  border-width: 2px;
  border-radius: 10px;
}

.lol-assassin-picks .lol-pick figcaption {
  font-size: .68rem;
  white-space: normal;
  line-height: 1.2;
}

.lol-assassin-rules {
  border-color: transparent;
}

/* ADC formula view */

.lol-adc-guide {
  --adc-orange: #ff963f;
  --adc-panel: #111e30;
}

.lol-adc-hero p {
  color: #ffae63;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, .5),
    0 0 18px rgba(255, 150, 63, .24);
}

.lol-adc-title-part,
.lol-adc-title-divider {
  display: inline;
}

.lol-adc-card {
  position: relative;
  margin-bottom: 1rem;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid rgba(67, 92, 127, .55);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 150, 63, .08), transparent 32%),
    linear-gradient(145deg, rgba(19, 32, 53, .94), rgba(10, 24, 42, .92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .045),
    0 14px 32px rgba(0, 0, 0, .19);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lol-adc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 4%;
  width: 42%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 150, 63, .75),
    transparent
  );
  box-shadow: 0 0 12px rgba(255, 150, 63, .4);
}

.lol-adc-heading {
  margin-bottom: 1rem;
}

.lol-adc-heading > span {
  display: block;
  margin-bottom: .1rem;
  color: var(--adc-orange);
  font-size: .64rem;
  font-weight: 950;
  letter-spacing: .13em;
  text-shadow: 0 0 12px rgba(255, 150, 63, .25);
}

.lol-adc-heading h2 {
  color: var(--lol-text);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 950;
}

.lol-adc-heading > p {
  margin-top: .25rem;
  color: var(--lol-muted);
  font-size: .84rem;
  font-weight: 650;
}

.lol-formula-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.lol-formula-step {
  --adc-tone: var(--adc-orange);
  position: relative;
  min-width: 0;
  padding: .85rem;
  border: 1px solid rgba(61, 84, 118, .58);
  border-radius: 14px;
  background:
    linear-gradient(
      90deg,
      var(--adc-tone),
      color-mix(in srgb, var(--adc-tone) 28%, transparent),
      transparent 72%
    ) top / 100% 3px no-repeat,
    radial-gradient(
      circle at 100% 0,
      color-mix(in srgb, var(--adc-tone) 12%, transparent),
      transparent 40%
    ),
    rgba(7, 17, 31, .58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .035),
    0 8px 20px rgba(0, 0, 0, .13);
  transition:
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s ease;
}

.lol-formula-step:hover {
  border-color: color-mix(in srgb, var(--adc-tone) 58%, #40526c);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .055),
    0 13px 26px rgba(0, 0, 0, .2),
    0 0 18px color-mix(in srgb, var(--adc-tone) 10%, transparent);
}

.lol-formula-step:not(:last-child)::after {
  content: '›';
  position: absolute;
  top: 50%;
  right: -.8rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid rgba(255, 182, 101, .72);
  border-radius: 50%;
  background:
    linear-gradient(145deg, #263c58, #101e31);
  color: #ffc27d;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 150, 63, .7);
  box-shadow:
    0 0 0 4px rgba(7, 17, 31, .88),
    0 0 16px rgba(255, 150, 63, .32);
  transform: translateY(-50%);
}

.lol-step-topline {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.lol-step-number {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 171, 98, .22);
  border-radius: 9px;
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--adc-tone) 25%, transparent),
      color-mix(in srgb, var(--adc-tone) 10%, transparent)
    );
  color: #ffc184;
  font-size: .85rem;
  font-weight: 950;
  box-shadow: 0 0 12px color-mix(in srgb, var(--adc-tone) 14%, transparent);
}

.lol-step-topline h3 {
  color: var(--lol-text);
  font-size: 1rem;
  font-weight: 900;
}

.lol-step-topline strong {
  display: block;
  color: #ffab62;
  font-size: .76rem;
  font-weight: 800;
}

.lol-formula-step > p,
.lol-branch-card > p,
.lol-later-group > p {
  margin: .75rem 0;
  color: var(--lol-muted);
  font-size: .79rem;
  line-height: 1.6;
}

.lol-adc-picks {
  gap: .65rem .8rem;
}

.lol-adc-picks .lol-pick {
  width: 68px;
}

.lol-adc-picks .lol-pick img {
  width: 64px;
  height: 64px;
  border-width: 2px;
  border-radius: 12px;
  border-color: var(--adc-tone, var(--adc-orange));
  box-shadow:
    0 6px 16px rgba(0, 0, 0, .4),
    0 0 16px color-mix(in srgb, var(--adc-tone, var(--adc-orange)) 20%, transparent);
}

.lol-adc-picks .lol-pick-champion img {
  border-color: #38c7ff;
}

.lol-adc-picks .lol-pick small {
  display: block;
  width: 78px;
  margin: .18rem auto 0;
  color: #7d91aa;
  font-size: .58rem;
  line-height: 1.25;
}

.lol-adc-exception {
  margin-top: .8rem;
  padding-top: .7rem;
  border-top: 1px dashed rgba(67, 91, 126, .64);
}

.lol-adc-exception > span,
.lol-adc-branch-champions > span {
  display: block;
  margin-bottom: .55rem;
  color: #8da0b8;
  font-size: .67rem;
  font-weight: 800;
}

.lol-branch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.lol-branch-card {
  --adc-tone: #ff963f;
  position: relative;
  padding: .85rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--adc-tone) 55%, #263750);
  border-radius: 14px;
  background:
    radial-gradient(
      circle at 100% 0,
      color-mix(in srgb, var(--adc-tone) 12%, transparent),
      transparent 42%
    ),
    rgba(7, 17, 31, .52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .035),
    0 8px 18px rgba(0, 0, 0, .12);
  transition:
    transform .22s ease,
    border-color .22s ease,
    box-shadow .22s ease;
}

.lol-branch-card:hover {
  border-color: color-mix(in srgb, var(--adc-tone) 76%, white 8%);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .055),
    0 13px 25px rgba(0, 0, 0, .2),
    0 0 18px color-mix(in srgb, var(--adc-tone) 10%, transparent);
}

.lol-adc-tone-orange {
  --adc-tone: #ff963f;
}

.lol-adc-tone-gold {
  --adc-tone: #ffd34f;
}

.lol-adc-tone-cyan {
  --adc-tone: #38c7f2;
}

.lol-adc-tone-green {
  --adc-tone: #43d894;
}

.lol-adc-tone-purple {
  --adc-tone: #b77cff;
}

.lol-branch-badge {
  display: inline-block;
  margin-bottom: .6rem;
  padding: .18rem .55rem;
  border: 1px solid color-mix(in srgb, var(--adc-tone) 72%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--adc-tone) 8%, transparent);
  color: var(--adc-tone);
  font-size: .62rem;
  font-weight: 850;
  box-shadow: 0 0 12px color-mix(in srgb, var(--adc-tone) 8%, transparent);
}

.lol-branch-card h3,
.lol-later-group h3 {
  color: var(--lol-text);
  font-size: .96rem;
  font-weight: 900;
}

.lol-adc-branch-champions {
  margin-top: .75rem;
  padding-top: .65rem;
  border-top: 1px dashed rgba(67, 91, 126, .64);
}

.lol-later-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr .75fr;
  gap: .85rem;
}

.lol-later-group {
  --adc-tone: #ff963f;
  min-width: 0;
  padding: .85rem;
  border: 1px solid color-mix(in srgb, var(--adc-tone) 48%, #263750);
  border-radius: 14px;
  background:
    radial-gradient(
      circle at 100% 0,
      color-mix(in srgb, var(--adc-tone) 10%, transparent),
      transparent 42%
    ),
    rgba(7, 17, 31, .5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .03),
    0 8px 18px rgba(0, 0, 0, .11);
  transition:
    transform .22s ease,
    border-color .22s ease,
    box-shadow .22s ease;
}

.lol-later-group:hover {
  border-color: color-mix(in srgb, var(--adc-tone) 68%, #40526c);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 13px 24px rgba(0, 0, 0, .18);
}

.lol-adc-rules {
  position: relative;
  padding-right: 7rem;
  border-color: transparent;
}

.lol-adc-boot {
  position: absolute;
  right: 1.4rem;
  bottom: 1rem;
  text-align: center;
}

.lol-adc-boot > span {
  display: block;
  margin-bottom: .35rem;
  color: #8498b1;
  font-size: .64rem;
  font-weight: 800;
}

@media (max-width: 719px) {
  .app-shell.lol-shell {
    padding: 1.2rem .65rem 2rem;
  }

  .lol-data-link {
    margin-bottom: .8rem;
  }

  .lol-data-link a {
    min-height: 52px;
    padding: .7rem 1rem;
    border-radius: 14px;
    font-size: .88rem;
  }

  .lol-data-link-icon {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 9px;
  }

  .lol-view-switch {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 16px;
  }

  .lol-view-switch button {
    min-height: 42px;
    padding: 0 .5rem;
    font-size: .85rem;
    gap: .4rem;
  }

  .lol-guide-switcher {
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-radius: 18px;
  }

  .lol-guide-switcher button {
    min-height: 44px;
    gap: .35rem;
    border-radius: 14px;
  }

  .lol-guide-switcher strong {
    font-size: .78rem;
  }

  .lol-hub {
    padding: 1rem .85rem .85rem;
    border-radius: 18px;
  }

  .lol-hub-header {
    flex-direction: column;
    align-items: stretch;
    gap: .7rem;
    margin-bottom: .85rem;
  }

  .lol-hub-source {
    align-self: flex-start;
    font-size: .72rem;
  }

  .lol-hub-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
    margin-bottom: .8rem;
  }

  .lol-hub-search {
    min-width: 0;
    width: 100%;
  }

  .lol-hub-actions {
    align-self: flex-end;
  }

  .lol-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
  }

  .lol-hero-card-btn {
    grid-template-columns: 1fr;
    gap: .4rem;
    justify-items: center;
    text-align: center;
    padding: .6rem .4rem;
  }

  .lol-hero-card-avatar {
    width: 44px;
    height: 44px;
  }

  .lol-hero-card-info em {
    text-align: center;
  }

  .lol-hero-card-info strong {
    font-size: .85rem;
  }

  .lol-hero-card-arrow {
    display: none;
  }

  .lol-hero {
    margin-bottom: .8rem;
    padding: 1.25rem .9rem 1.15rem;
    border-radius: 16px;
  }

  .lol-hero h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .lol-drawer-panel {
    width: 100%;
    border-left: none;
  }

  .lol-drawer-content {
    padding: 0 .9rem 1.3rem;
  }

  .lol-drawer-aug-grid {
    gap: .5rem .55rem;
  }

  .lol-drawer-aug-name em {
    font-size: .68rem;
    padding: .12rem .4rem;
  }

  .lol-drawer-aug-build {
    font-size: .64rem;
  }

  .lol-drawer-hero {
    width: 68px;
    height: 68px;
    border-radius: 18px;
  }

  .lol-drawer-headinfo h2 {
    font-size: 1.4rem;
  }

  .lol-drawer-pick {
    width: 54px;
  }

  .lol-drawer-pick img {
    width: 50px;
    height: 50px;
  }

  .lol-mage-grid {
    grid-template-columns: 1fr;
    gap: .7rem;
    margin-bottom: .7rem;
  }

  .lol-mage-guide .lol-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: .6rem;
    min-height: 72px;
  }

  .lol-mage-guide .lol-row-label {
    padding-top: .5rem;
    font-size: .9rem;
  }

  .lol-build,
  .lol-rules {
    padding: 1rem .85rem .8rem;
    border-radius: 16px;
  }

  .lol-build-heading {
    display: block;
    margin-bottom: .6rem;
  }

  .lol-build-heading span {
    display: block;
    margin-top: .15rem;
    font-size: .86rem;
  }

  .lol-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: .6rem;
    min-height: 78px;
  }

  .lol-row-label {
    padding-top: .55rem;
    font-size: .9rem;
  }

  .lol-picks,
  .lol-special-picks {
    gap: .65rem .75rem;
  }

  .lol-pick {
    width: 58px;
  }

  .lol-pick img {
    width: 54px;
    height: 54px;
    border-width: 2px;
    border-radius: 10px;
  }

  .lol-pick:hover img {
    transform: translateY(-2px) scale(1.07);
  }

  .lol-pick figcaption {
    margin-top: .28rem;
    font-size: .7rem;
  }

  .lol-join {
    margin-right: -.45rem;
    margin-left: -.45rem;
    font-size: 1.3rem;
  }

  .lol-special {
    display: block;
  }

  .lol-special h3 {
    margin-bottom: .65rem;
    padding-top: 0;
  }

  .lol-assassin-grid {
    grid-template-columns: 1fr;
  }

  .lol-assassin-card {
    padding: .85rem;
  }

  .lol-assassin-card:hover {
    transform: translateY(-3px);
  }

  .lol-assassin-card > header > img {
    width: 58px;
    height: 58px;
  }

  .lol-assassin-picks .lol-pick {
    width: 54px;
  }

  .lol-assassin-picks .lol-pick img {
    width: 50px;
    height: 50px;
  }

  .lol-adc-card {
    padding: .9rem;
    border-radius: 16px;
  }

  .lol-adc-title-part {
    display: block;
  }

  .lol-adc-title-divider {
    display: none;
  }

  .lol-formula-steps,
  .lol-branch-grid,
  .lol-later-grid {
    grid-template-columns: 1fr;
  }

  .lol-formula-step:not(:last-child)::after {
    content: '⌄';
    top: auto;
    right: 50%;
    bottom: -.82rem;
    line-height: 1;
    transform: translateX(50%);
  }

  .lol-adc-picks .lol-pick {
    width: 58px;
  }

  .lol-adc-picks .lol-pick small {
    width: 72px;
    margin-left: -7px;
  }

  .lol-adc-rules {
    padding-right: .85rem;
    padding-bottom: .9rem;
  }

  .lol-adc-boot {
    position: static;
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: .8rem;
    padding-top: .75rem;
    border-top: 1px dashed #3b4d67;
    text-align: left;
  }

  .lol-adc-boot > span {
    margin-bottom: 0;
  }
}

@media (max-width: 430px) {
  .lol-data-link a {
    padding: .6rem .75rem;
    gap: .5rem;
    font-size: .82rem;
  }

  .lol-data-link-icon {
    width: 1.65rem;
    height: 1.65rem;
    font-size: .95rem;
  }

  .lol-guide-switcher {
    gap: .25rem;
    padding: .3rem;
    border-radius: 16px;
  }

  .lol-guide-switcher button {
    flex-direction: column;
    gap: .05rem;
    padding: .3rem .15rem;
    border-radius: 12px;
  }

  .lol-guide-switcher strong {
    font-size: .68rem;
  }

  .lol-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
  }

  .lol-hero-card-btn {
    grid-template-columns: 1fr;
  }

  .lol-hero-card-avatar {
    width: 42px;
    height: 42px;
  }

  .lol-hero {
    padding-right: .65rem;
    padding-left: .65rem;
  }
}

/* ─── Callouts ─── */

.callout {
  margin: .7rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: .86rem;
  line-height: 1.6;
}

.callout .callout-title {
  padding: .6rem 1rem;
  font-weight: 800;
  font-size: .88rem;
}

details.callout > summary {
  display: flex;
  align-items: center;
  padding: .65rem 2rem .65rem 1rem;
  font-weight: 800;
  font-size: .88rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  position: relative;
  transition: filter .15s;
}

details.callout > summary::-webkit-details-marker { display: none; }

details.callout > summary::after {
  content: '';
  position: absolute;
  right: .9rem;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
  opacity: .5;
}

details.callout[open] > summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

details.callout > summary:hover {
  filter: brightness(1.06);
}

.callout > :is(.callout-title, summary) + * {
  padding: .6rem 1rem .8rem;
}

.callout > :is(.callout-title, summary) + :is(p, ul, ol, .callout-body) {
  margin-top: 0;
}

.callout .callout-body > :first-child { margin-top: 0; }
.callout .callout-body > :last-child { margin-bottom: 0; }

.callout p { margin: .3rem 0; }
.callout ul, .callout ol { margin: .3rem 0; padding-left: 1.2rem; }
.callout li { margin: .15rem 0; }
.callout li > p { margin: 0; }
.callout table { margin: .4rem 0; width: 100%; border-collapse: collapse; font-size: .82rem; }
.callout th, .callout td { padding: .3rem .5rem; border: 1px solid var(--line); text-align: left; }
.callout th { background: rgba(0,0,0,.03); font-weight: 700; }

.callout-note > :is(.callout-title, summary) { background: #eff6ff; color: #1d4ed8; }

.callout-warning > :is(.callout-title, summary) { background: #fffbeb; color: #b45309; }

.callout-tip > :is(.callout-title, summary) { background: #ecfdf5; color: #047857; }

.callout-info > :is(.callout-title, summary) { background: #f8fafc; color: #475569; }

/* ─── Expense ─── */

.expense-view {
  animation: fadeIn .2s ease;
}

.expense-amount {
  color: var(--red);
}

.expense-cat-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.expense-cat-amount {
  font-size: .82rem;
  font-weight: 800;
  color: #f7c974;
}

.expense-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.expense-item:last-child {
  border-bottom: none;
}

.expense-item-left {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}

.expense-item-sub {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
}

.expense-item-note {
  font-size: .78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .15rem;
  flex-shrink: 0;
  margin-left: .8rem;
}

.expense-item-amount {
  font-size: .92rem;
  font-weight: 800;
  color: var(--red);
}

.expense-item-date {
  font-size: .72rem;
  color: var(--muted);
}

.cal-expense-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  position: absolute;
  bottom: .4rem;
  right: .4rem;
}

.detail-expenses {
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px solid var(--line);
}

.expense-detail-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem 0;
  font-size: .84rem;
}

.expense-detail-sub {
  font-weight: 700;
  color: var(--text);
}

.expense-detail-note {
  color: var(--muted);
  font-size: .78rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-detail-amount {
  font-weight: 800;
  color: var(--red);
  margin-left: auto;
  flex-shrink: 0;
}

/* ─── Membership View ─── */

.membership-view { animation: fadeIn .2s ease; }

.membership-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin-bottom: 1rem;
}

.membership-filter-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: border-color .15s ease, background .15s ease;
}

.membership-filter-card:hover {
  border-color: var(--accent);
}

.membership-filter-card.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--surface), #fff8e8);
  box-shadow: var(--shadow);
}

.mfc-label {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}

.mfc-count {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .2rem;
}

.mfc-amount {
  font-size: .9rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: .3rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: .8rem;
}

.membership-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

.membership-table th,
.membership-table td {
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.membership-table th {
  background: var(--surface-soft);
  font-weight: 700;
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.mt-name {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.mt-note {
  color: var(--muted);
  font-size: .8rem;
  max-width: 26ch;
  white-space: normal;
  overflow-wrap: anywhere;
}

.mt-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 1.1rem;
}

.mt-link:hover {
  color: var(--dark);
}

.membership-tag {
  display: inline-block;
  padding: .15rem .5rem;
  margin-right: .25rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .72rem;
  color: var(--text);
}

.days-expired { color: var(--red); font-weight: 700; }
.days-warning { color: #d97706; font-weight: 700; }
.days-ok      { color: var(--green); font-weight: 600; }
.days-unknown { color: var(--muted); font-style: italic; }

.row-unknown td { background: rgba(0, 0, 0, .02); }

@media (max-width: 719px) {
  .membership-filter-grid { grid-template-columns: 1fr; }
  .membership-table { font-size: .78rem; }
  .membership-table th, .membership-table td { padding: .45rem .5rem; }
}

/* Weekly review footer: deliberately kept after the general responsive rules.
   The dashboard sits beside a desktop sidebar, so it remains a three-column
   strip until a genuinely narrow viewport. */
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(13.75rem, .7fr) minmax(11.25rem, .55fr);
  gap: .9rem;
  margin-top: .9rem;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-footer-panel,
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-export {
  box-sizing: border-box;
  min-height: 4.35rem;
  margin: 0;
  padding: .65rem .75rem;
  border: 1px solid #c8d6df;
  border-radius: 4px;
  box-shadow: 2px 3px 0 rgba(34, 70, 95, .1);
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-footer-panel h3 {
  margin: 0 0 .45rem;
  color: #314353;
  font-size: .65rem;
  line-height: 1.1;
  letter-spacing: .1em;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-footer-panel h3 small {
  color: #617989;
  font-size: .55rem;
  letter-spacing: 0;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-habit-legend {
  background: #f1ffdc;
  border-color: #bad894;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-habit-legend h3 { color: #406028; }
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-habit-legend > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .75rem;
}
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-habit-legend span {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  color: #465a4d;
  font-size: .6rem;
  white-space: nowrap;
}
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-habit-legend i { font-size: .9rem; font-style: normal; }
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-legend-average {
  margin-left: auto;
  color: #627459;
  font-size: .5rem;
  line-height: 1.25;
  text-align: right;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-navigation {
  background: #fffdf2;
  border-color: #d8d2af;
  text-align: center;
}
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-navigation > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
}
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-navigation button {
  width: 1.65rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid #9db0bf;
  border-radius: 3px;
  background: #fff;
  color: #24405a;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-navigation button:disabled { cursor: not-allowed; opacity: .35; }
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-navigation b {
  min-width: 9.4rem;
  padding: .25rem .45rem;
  border: 1px solid #b6c4cd;
  border-radius: 3px;
  background: #fff;
  color: #344a5e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .6rem;
  line-height: 1;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-export {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  appearance: none;
  background: #eff8ff;
  border-color: #a9c7e3;
  color: #2b557c;
  font: inherit;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .06em;
  cursor: pointer;
}
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-export:hover { background: #dfefff; }
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-export:first-letter { font-size: 1rem; }

@media (max-width: 719px) {
  .tracking-history-view[data-tracking-view-panel="week"] .tracking-week-footer { grid-template-columns: 1fr; }
}

/* Final visual calibration for the tracker cards: thick ink outlines, hard
   offset shadows, and a shared baseline for emoji icon boxes. */
.tracking-board .tracking-habit-card,
.tracking-board .tracking-pomodoro-card,
.tracking-board .tracking-timer-card,
.tracking-board .tracking-work-card,
.tracking-board .tracking-project-card,
.tracking-board .tracking-achievement-card,
.tracking-board .tracking-tea-card {
  border-width: 3px;
  box-shadow: 4px 5px 0 rgba(32, 52, 75, .2), 0 10px 18px rgba(32, 52, 75, .08), inset 0 1px 0 rgba(255,255,255,.8);
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary article,
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-day-card {
  border-width: 3px;
  box-shadow: 4px 5px 0 rgba(32, 52, 75, .2), 0 8px 14px rgba(32, 52, 75, .07);
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-day-card.is-best {
  box-shadow: 4px 5px 0 rgba(151, 97, 23, .23), 0 8px 14px rgba(151, 97, 23, .08);
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-day-card.is-rest {
  box-shadow: 4px 5px 0 rgba(71, 92, 108, .14), 0 8px 14px rgba(71, 92, 108, .06);
}

.tracking-habit-icon,
.tracking-tea-icon,
.tracking-work-icon,
.tracking-pomodoro-icon,
.tracking-timer-icon,
.tracking-week-summary article > span,
.tracking-achievement-row span {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  overflow: hidden;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

/* Emoji fonts tend to sit slightly low on macOS. This tiny baseline correction
   keeps the tomato and the other pictograms visually centred in their boxes. */
.tracking-pomodoro-icon,
.tracking-timer-icon,
.tracking-week-summary article > span { padding-bottom: 1px; }

.tracking-pomodoro-icon,
.tracking-timer-icon {
  border-width: 1px 2px 2px 1px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 1px 1px 0 rgba(32, 52, 75, .1);
}

/* WEEK SUMMARY: icon / three-line metric / action is intentionally a fixed
   three-column composition, matching the reference card anatomy. */
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
  margin: 0 0 1.45rem;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-card {
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr) 2rem;
  align-items: center;
  gap: .65rem;
  min-height: 5.25rem;
  padding: .65rem .75rem;
  border: 3px solid #315ba4;
  border-radius: 4px;
  background: linear-gradient(135deg, #e7f1ff 0%, #d3e3fa 100%);
  box-shadow: 4px 5px 0 rgba(32, 52, 75, .2), 0 8px 14px rgba(32, 52, 75, .07), inset 0 1px 0 rgba(255,255,255,.9);
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-card.tracking-week-summary-habits {
  border-color: #7b2b82;
  background: linear-gradient(135deg, #f7e5f9 0%, #eeccef 100%);
  box-shadow: 4px 5px 0 rgba(96, 42, 105, .18), 0 8px 14px rgba(96, 42, 105, .07), inset 0 1px 0 rgba(255,255,255,.85);
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-card.tracking-week-summary-pomodoros {
  border-color: #922226;
  background: linear-gradient(135deg, #fad6d7 0%, #f3b3b4 100%);
  box-shadow: 4px 5px 0 rgba(117, 32, 37, .2), 0 8px 14px rgba(117, 32, 37, .07), inset 0 1px 0 rgba(255,255,255,.8);
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-card.tracking-week-summary-streak {
  border-color: #9a6112;
  background: linear-gradient(135deg, #fff5cf 0%, #ffebaa 100%);
  box-shadow: 4px 5px 0 rgba(125, 80, 14, .2), 0 8px 14px rgba(125, 80, 14, .07), inset 0 1px 0 rgba(255,255,255,.8);
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-icon,
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-action {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255,255,255,.75);
  line-height: 1;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-icon {
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(37, 75, 117, .32);
  box-shadow: inset 0 1px 0 #fff;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.3rem;
  padding: 0;
  text-indent: 0;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-work .tracking-week-summary-icon { font-size: 1.24rem; }
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-habits .tracking-week-summary-icon { font-size: 1.3rem; }
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-pomodoros .tracking-week-summary-icon { font-size: 1.25rem; }
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-streak .tracking-week-summary-icon { font-size: 1.28rem; }

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-action {
  justify-self: end;
  width: 1.8rem;
  height: 1.8rem;
  border: 2px solid currentColor;
  color: #314353;
  padding: .26rem;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-action.is-trend {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 2px;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-action.is-trend i {
  display: block;
  width: 100%;
  background: currentColor;
  border-radius: 1px 1px 0 0;
}
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-action.is-trend i:nth-child(1) { height: 34%; }
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-action.is-trend i:nth-child(2) { height: 62%; }
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-action.is-trend i:nth-child(3) { height: 88%; }
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-action.is-trend i:nth-child(4) { height: 48%; }

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-action.is-calendar {
  position: relative;
  padding: 0;
}
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-action.is-calendar::before {
  content: '';
  position: absolute;
  top: .32rem;
  left: .32rem;
  width: .82rem;
  height: .15rem;
  border-top: 2px solid currentColor;
  border-bottom: 1px solid currentColor;
}
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-action.is-calendar i {
  width: .78rem;
  height: .56rem;
  margin-top: .28rem;
  border: 1px solid currentColor;
  background: repeating-linear-gradient(90deg, transparent 0, transparent 2px, currentColor 2px, currentColor 3px);
  opacity: .75;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-copy {
  min-width: 0;
  text-align: center;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-copy b,
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-copy small,
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-copy em {
  display: block;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-copy b {
  margin: 0;
  color: #192534;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-copy small {
  margin-top: .28rem;
  color: #526474;
  font-size: .63rem;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-copy em {
  margin-top: .28rem;
  overflow: hidden;
  color: #526474;
  font-size: .57rem;
  font-style: normal;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-habits .tracking-week-summary-action { color: #5f3470; }
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-pomodoros .tracking-week-summary-action { color: #7b292e; }
.tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary-streak .tracking-week-summary-action { color: #68501d; }

@media (max-width: 760px) {
  .tracking-history-view[data-tracking-view-panel="week"] .tracking-week-summary { grid-template-columns: 1fr; }
}

/* ─── Dashboard warm-paper surfaces ─── */
.life-dashboard .dashboard-section {
  border-color: #e5d9c7;
  background: rgba(250, 246, 239, .92);
  box-shadow: 0 2px 7px rgba(84, 52, 25, .07);
}

.life-dashboard .weather-widget-frame,
.life-dashboard .calendar-widget-frame,
.life-dashboard .pomodoro-widget-frame,
.life-dashboard .music-widget-frame,
.life-dashboard .github-profile-card,
.life-dashboard .playlist-card {
  border-color: #eadfce;
  background: #fffdf8;
}

.life-dashboard .github-repo-list,
.life-dashboard .github-repo-list li + li {
  border-color: #eee4d6;
}

.life-dashboard .github-repo-list a:hover {
  background: #faf4e9;
}

.life-dashboard .playlist-pagination button,
.life-dashboard .music-player-actions button {
  border-color: #e4d4bc;
  background: #fffaf0;
}

.life-dashboard .tracking-board {
  border-color: #dfd0bb;
  background: #fbf6ed;
  box-shadow: 0 4px 12px rgba(84, 52, 25, .09);
}

.life-dashboard .tracking-board-toolbar {
  border-bottom-color: #e4d5c1;
  background: linear-gradient(#fffaf0, #f4eadb);
  box-shadow: inset 0 -1px 0 #e4d5c1, inset 0 1px 0 rgba(255,255,255,.95);
}

.life-dashboard .tracking-board-body {
  background:
    linear-gradient(90deg, rgba(117, 81, 43, .025) 1px, transparent 1px),
    #fffaf2;
  background-size: 18px 18px;
}
