/* Interface tokens inspired by https://coss.com/ui/docs/styling.
   Calendar paper stays white with darker green cells in both appearances. */
@font-face {
  font-family: "Lilita One";
  src: url("/fonts/LilitaOne-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  --font-display: "Lilita One", ui-rounded, system-ui, sans-serif;
  color-scheme: light dark;
  --paper: #fff; --ink: #262626; --muted: #666;
  --surface: #fff; --secondary: #f5f5f5; --border: #00000017;
  --primary-ink: #fafafa; --shadow: #00000008;
  --disabled-surface: #e5e5e5; --disabled-ink: #737373; --ring: #b4f153;
  --lime: #b4f153; --goal: #90c142; --progress-ink: #000;
  --logo-filter: none;
  --illustration-light: block; --illustration-dark: none;
}
:root[data-theme="dark"] {
  --progress-ink: #fff;
  color-scheme: dark;
  --paper: #161616; --ink: #f5f5f5; --muted: #a3a3a3;
  --surface: #1b1b1b; --secondary: #262626; --border: #ffffff17;
  --primary-ink: #262626; --shadow: #00000030;
  --disabled-surface: #a3a3a3; --disabled-ink: #262626; --ring: #b4f153;
  --logo-filter: invert(1);
    --illustration-light: none; --illustration-dark: block;
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --progress-ink: #fff;
      --paper: #161616; --ink: #f5f5f5; --muted: #a3a3a3;
    --surface: #1b1b1b; --secondary: #262626; --border: #ffffff17;
    --primary-ink: #262626; --shadow: #00000030;
  --disabled-surface: #a3a3a3; --disabled-ink: #262626; --ring: #b4f153;
    --logo-filter: invert(1);
    --illustration-light: none; --illustration-dark: block;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { position: relative; margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, select, input, textarea { font: inherit; color: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
:where(button, a, select, input, textarea, summary):focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
:where(input, textarea):focus-visible { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 24%, transparent); outline: none; }
:where(input, textarea)[aria-invalid="true"] { border-color: #ef4444; }
:where(input, textarea)[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px #ef444429; }
:where(button, select, input, textarea):disabled { cursor: not-allowed; }
:where(select, input, textarea):disabled { color: var(--muted); background: var(--secondary); box-shadow: none; }
.shell { width: min(1160px, calc(100% - 64px)); margin: auto; }
nav { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 25px; letter-spacing: 0; font-weight: 400; font-synthesis: none; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand-wordmark { font-family: var(--font-display); font-weight: 400; font-synthesis: none; letter-spacing: 0; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav-links > a:not(.button), .footer-links a { color: var(--muted); }
.nav-links > a:hover, .footer-links a:hover { color: var(--ink); }
.button { border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 13px 20px; border-radius: 10px; background: var(--button-bg, var(--ink)); color: var(--button-ink, var(--primary-ink)); font-weight: 600; font-size: 14px; cursor: pointer; box-shadow: 0 1px 2px var(--shadow); transition: background-color .15s, box-shadow .15s; }
@media (hover: hover) {
  .button:hover:not(:disabled):not([aria-disabled="true"]) { background: color-mix(in srgb, var(--button-bg, var(--ink)) 90%, var(--paper)); }
  :where(.appearance, .card-head) select:hover:not(:disabled) { border-color: var(--ring); }
}
.button:active:not(:disabled):not([aria-disabled="true"]) { background: color-mix(in srgb, var(--button-bg, var(--ink)) 90%, var(--paper)); box-shadow: inset 0 1px #00000014; }
.button:is(:disabled, [aria-disabled="true"]) { background: var(--disabled-surface); color: var(--disabled-ink); box-shadow: none; cursor: not-allowed; }
a:not(.button):active { text-decoration: underline; text-underline-offset: 3px; }
:where(.appearance, .card-head) select:active:not(:disabled) { background: var(--secondary); }

.button.lime { --button-bg: var(--ink); --button-ink: var(--primary-ink); }
.button.small { min-height: 40px; padding: 10px 16px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.hero { display: grid; grid-template-columns: 1.12fr 1fr; align-items: start; gap: 95px; padding: 46px 0 66px; }
.hero > div { min-width: 0; }
.hero-eyebrow { display: block; color: var(--muted); margin-bottom: 16px; }
.hero-copy { container-type: inline-size; text-align: center; }
.hero h1.hero-title {
  display: flex; flex-direction: column; align-items: center;
  width: fit-content; max-width: 100%; margin: 0 auto 26px; padding: .14em .14em .18em;
  font-size: min(5.25rem, 15cqi); line-height: .88;
  color: #fff; filter: drop-shadow(0 2px 1px #00000030);
}
.hero-title span {
  display: block; white-space: nowrap;
  -webkit-text-stroke: .15em #000; paint-order: stroke fill;
  text-shadow: 0 .035em 0 #000;
}
.hero-title span:first-child { color: var(--lime); }
.hero p { font-size: 17px; line-height: 1.7; color: var(--muted); max-width: 390px; margin: 0 auto 28px; }
/* Preserve both official badge proportions at a matching height, including on phones. */
.hero-actions { display: grid; grid-template-columns: 119.66407fr 143.72881fr; align-items: center; gap: 16px; width: min(100%, 346px); margin-inline: auto; }
.hero-actions > * { min-width: 0; }
.health-mark { display: block; }
.hero-actions .app-store-badge img, .health-mark img { display: block; width: 100%; height: auto; }
.hero-illustration { display: block; width: min(100%, 440px); height: auto; margin: 64px auto 0; }
.preview-wrap { position: relative; }
.section-rule { border-top: 1px solid var(--border); }
.features { padding: 60px 0 74px; }
.progress-section { padding: 60px 0; --chart-green: #90c142; --chart-ghost: color-mix(in srgb, var(--ink) 12%, transparent); }
:root[data-theme="dark"] .progress-section { --chart-green: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .progress-section { --chart-green: var(--lime); } }
.progress-section h2 { font-size: clamp(32px, 4vw, 42px); line-height: 1.15; letter-spacing: -1.6px; font-weight: 650; margin: 12px 0; }
.progress-section .features-header p { font-size: 16px; line-height: 1.65; color: var(--muted); margin: 16px 0 0; }
.progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.progress-card { position: relative; min-width: 0; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 1px 2px var(--shadow); }
.progress-card header h3 { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: -.5px; }
.progress-card header p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.daily-stage { position: relative; margin: 38px auto 0; }
.daily-viewport { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--border) transparent; border-radius: 4px; }
.daily-rail { display: flex; width: max-content; }
.chart-day { flex: 0 0 76px; width: 76px; padding: 0; border: 0; background: none; cursor: crosshair; transition: opacity .18s; }
.chart-day svg { display: block; width: 76px; height: 260px; }
.chart-day:focus-visible { outline-offset: -3px; }
.friend-bar { fill: var(--chart-green); }
.own-bar { fill: var(--chart-ghost); }
.day-baseline { stroke: var(--ink); stroke-opacity: .15; stroke-width: 1; }
.day-caption { fill: var(--muted); font-size: 13px; }
.day-caption.is-today { fill: var(--ink); font-weight: 650; }
.daily-reference { position: absolute; top: 70px; left: 0; right: 0; border-top: 1px dashed color-mix(in srgb, var(--ink) 25%, transparent); pointer-events: none; }
.daily-reference span { position: absolute; bottom: 8px; left: 0; padding-right: 5px; background: var(--surface); color: var(--muted); font-size: 12px; }
.is-inspecting .chart-day:not(.is-selected) { opacity: .25; }
.chart-segments { display: flex; border: 0; border-radius: 8px; padding: 2px; gap: 2px; margin: 18px 0 26px; background: var(--secondary); }
.chart-segments label { position: relative; flex: 1; min-width: 0; cursor: pointer; }
.chart-segments input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chart-segments span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--muted); transition: background .18s, color .18s; }
.chart-segments input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px var(--shadow); }
.chart-segments input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px; }
@media (hover: hover) { .chart-segments label:hover span { background: color-mix(in srgb, var(--ink) 6%, var(--surface)); } }
.chart-segments label:active span { background: color-mix(in srgb, var(--ink) 8%, var(--surface)); }
.cumulative-stage { touch-action: pan-y; cursor: crosshair; }
.daily-viewport:focus-visible, .cumulative-stage:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; border-radius: 4px; }
.cumulative-stage svg { display: block; width: 100%; height: 260px; overflow: visible; }
.friend-line, .own-line { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.friend-line { stroke: var(--chart-green); }
.own-line { stroke: var(--chart-ghost); stroke-dasharray: 4 5; }
.chart-guide { stroke: var(--ink); stroke-opacity: .16; stroke-dasharray: 4 5; }
.chart-guide-label { fill: var(--muted); font-size: 12px; }
.avatar-connector { stroke: var(--ink); stroke-opacity: .15; }
.chart-tooltip { position: absolute; z-index: 3; pointer-events: none; width: 234px; max-width: calc(100% - 24px); padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: 0 4px 18px #00000012; font-size: 13px; transition: left .15s ease-out; animation: chart-tip-in .15s ease-out; }
.chart-tooltip[hidden] { display: none; }
.chart-tooltip strong { display: block; font-size: 13px; margin-bottom: 10px; }
.chart-tooltip div { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.chart-tooltip img { width: 24px; height: 24px; border-radius: 50%; }
.chart-tooltip b { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-tooltip b, .daily-reference span, .chart-guide-label {
  font-family: var(--font-display); font-weight: 400; font-synthesis: none;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@keyframes chart-tip-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) { .progress-grid { grid-template-columns: 1fr; gap: 16px; } .progress-card { padding: 20px; } .progress-section { padding: 44px 0; } }
@media (prefers-reduced-motion: reduce) { .progress-section *, .progress-section *::before { animation: none !important; transition: none !important; } }
.features-header { max-width: 520px; margin-bottom: 36px; }
.features-header > .eyebrow { color: var(--muted); }
.features h2 { font-size: 42px; line-height: 1.15; letter-spacing: -1.6px; font-weight: 650; margin: 12px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { min-width: 0; }
.feature-art { width: 88px; }
.feature-illustration { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; margin: 0; }
.feature-copy { min-width: 0; }
.feature-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 20px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 2px var(--shadow); }
.feature h3 { font-size: 21px; font-weight: 650; letter-spacing: -.5px; margin: 0 0 10px; }
.feature p { font-size: 14px; line-height: 1.65; color: var(--muted); margin: 0; }
.join { background: var(--secondary); border: 1px solid var(--border); border-radius: 16px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.join h2 { font-size: 40px; font-weight: 650; letter-spacing: -1.5px; line-height: 1.15; margin: 0 0 12px; }
.join p { font-size: 14px; color: var(--muted); margin: 0; }
.creator-card { margin-top: 24px; background: var(--surface); }
.creator-card p { margin-bottom: 12px; }
.creator-card img { display: block; width: 200px; max-width: 100%; height: auto; filter: var(--logo-filter); }
.creator-card .button { --button-bg: var(--secondary); --button-ink: var(--ink); }
.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding: 36px 0 24px; color: var(--muted); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.appearance { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.appearance select { border: 1px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 7px; min-height: 36px; padding: 6px 10px; }
.trademark-credit { font-size: 10px; line-height: 1.6; color: var(--muted); margin: 0 0 24px; }
.text-link { text-decoration: underline; text-underline-offset: 4px; font-size: 13px; }
.document-page { max-width: 760px; margin: 48px auto 80px; }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 650; letter-spacing: -1.6px; line-height: 1.12; margin: 0 0 16px; }
.page-header p { font-size: 16px; line-height: 1.65; color: var(--muted); margin: 0; }
.document-sections { display: grid; gap: 16px; }
.content-card { padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 1px 2px var(--shadow); }
.content-card h2 { font-size: 21px; font-weight: 650; letter-spacing: -.5px; margin: 0 0 12px; }
.content-card p, .content-card li { font-size: 15px; line-height: 1.7; color: var(--muted); }
.content-card p { margin: 0; }
.content-card p + p { margin-top: 14px; }
.content-card a:not(.button) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.content-card .button { color: var(--primary-ink); }
.profile-hero { text-align: center; max-width: 560px; margin: 48px auto 80px; padding: 40px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 1px 2px var(--shadow); }
.profile-hero img { width: 100px; border-radius: 24px; }
.profile-hero h1 { font-size: 40px; font-weight: 650; letter-spacing: -1.8px; line-height: 1.12; }
.profile-hero p { color: var(--muted); line-height: 1.7; }
.profile-hero .button { margin-top: 20px; }
.app-store-badge { display: inline-block; line-height: 0; }
.app-store-badge img { display: block; width: 180px; height: auto; max-width: 100%; border-radius: 0; }
.skip { position: absolute; top: -70px; background: var(--ink); color: var(--primary-ink); padding: 12px; z-index: 10; }
.skip:focus { top: 10px; }
@media (max-width: 1000px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-art { width: 100px; }
}
@media (max-width: 900px) {
  .hero { gap: 45px; }
  .nav-links { gap: 20px; }
  .feature-card { padding: 22px; } .join h2 { font-size: 34px; }
}
@media (min-width: 651px) and (max-width: 767px) {
  .nav-links { gap: 16px; }
  .nav-links > a[href="/#how-it-works"] { display: none; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 40px); } nav { min-height: 80px; gap: 12px; }
  .brand { font-size: 23px; } .brand img { width: 34px; height: 34px; }
  .nav-links > a:not(.button) { display: none; } .button.small { font-size: 12px; padding: 9px 12px; }
  .hero { grid-template-columns: 1fr; gap: 26px; padding: 30px 0 50px; }
  .hero h1.hero-title { margin-bottom: 21px; }
  .hero p { font-size: 16px; max-width: 340px; }
  .hero-illustration { width: min(80%, 300px); margin-top: 32px; }
  .preview-wrap { width: min(360px, 90%); justify-self: center; margin-top: 10px; }
  .features { padding: 35px 0 48px; } .features h2 { font-size: 36px; }
  .feature-grid { gap: 16px; }
  .feature-card { padding: 20px; gap: 16px; }
  .feature-art { width: 80px; }
  .join { padding: 30px 24px; align-items: flex-start; flex-direction: column; }
  .join h2 { font-size: 32px; }
  .footer { align-items: flex-start; flex-direction: column; gap: 20px; padding-top: 32px; }
  .footer-links { gap: 18px; } .document-page { margin: 32px auto 56px; }
  .content-card { padding: 20px; }
  .profile-hero h1 { font-size: 32px; }
  .profile-hero { margin: 32px auto 56px; padding: 28px 20px; }
}
@media (max-width: 380px) { .feature-art { width: 60px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } :where(button, a, input, textarea, select) { transition: none; } }

/* The annual artwork stays white; its footer follows the interface appearance. */
.calendar-card { font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif; padding: 0; border-radius: 0; border: 1px solid var(--border); box-shadow: 0 22px 50px -25px #233b1e30; position: relative; --calendar-padding: 25px; }
.calendar-artwork { border-radius: 0; padding: 25px 25px 20px; background: #fff; color: #000; color-scheme: light; }
.calendar-canvas { width: 100%; }
canvas { display: block; max-width: 100%; }
.calendar-controls { background: var(--surface); color: var(--ink); }
.calendar-divider { display: block; width: 100%; height: 1px; }
.calendar-control-content { padding: 8px var(--calendar-padding); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 16px; font-weight: 500; color: var(--muted); }
.card-head label { white-space: nowrap; }
.card-head select { border: 1px solid var(--border); min-height: 32px; padding: 4px 10px; border-radius: 7px; background: var(--secondary); color: var(--ink); font-size: 15px; font-weight: 600; }
.card-head { min-height: 44px; }
@media (pointer: coarse) { .card-head select { min-height: 44px; } }
#day-detail { font-size: 9px; text-align: center; color: var(--muted); min-height: 14px; margin: 12px 0 0; }
@media (max-width: 900px) { .calendar-card { --calendar-padding: 20px; } .calendar-artwork { border-radius: 0; padding: 20px; } }

#day-detail:empty { display: none; }

.document-page .updated { font-size: .875rem; color: var(--muted); }
.document-page .content-card p + p { margin-top: 1rem; }
.document-page .content-card li { margin: .5rem 0; }
.legal-table { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--border); border-radius: 12px; }
.legal-table table { border-collapse: collapse; width: 100%; font-size: .9rem; line-height: 1.6; }
.legal-table th, .legal-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); min-width: 160px; }
.legal-table th { background: var(--secondary); color: var(--ink); }
.legal-table tr:last-child td { border-bottom: 0; }

/* Public username pages reuse the neutral card, button and type tokens. */
.username-profile h1 { margin: 20px 0 6px; font-size: 30px; letter-spacing: -.8px; overflow-wrap: anywhere; }
.username-profile .profile-username { margin-top: 0; font-size: 15px; }
.username-profile .profile-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.profile-avatar-placeholder { display: inline-flex; overflow: hidden; background: var(--secondary); }
.profile-avatar-placeholder::before {
  content: ""; width: 100%; height: 100%; background: var(--ink); opacity: .3;
  -webkit-mask: url('/images/avatar-placeholder.svg') center / contain no-repeat;
  mask: url('/images/avatar-placeholder.svg') center / contain no-repeat;
}
.profile-qr { background: #fff; padding: 12px; width: 184px; margin: 24px auto 8px; border: 1px solid var(--border); border-radius: 12px; }
.profile-qr svg { display: block; width: 100%; height: auto; }
.username-profile .profile-address { font-size: 13px; margin: 8px 0 24px; overflow-wrap: anywhere; }
.profile-actions { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.profile-actions .button { margin-top: 0; width: 100%; }
.profile-actions .app-store-badge img { width: auto; height: 40px; border-radius: 0; }
.username-profile .profile-note { font-size: 13px; margin: 24px 0 0; }

/* Follow both the saved appearance and the system theme, without changing artwork colors. */
.illustration-light { display: var(--illustration-light); }
.illustration-dark { display: var(--illustration-dark); }

/* Public world rankings reuse the site's neutral surfaces, controls and chart segments. */
.world-page { max-width: 900px; margin: 64px auto 72px; }
.world-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 36px; }
.world-heading h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.08; letter-spacing: -1.8px; margin: 12px 0 16px; }
.world-heading p { max-width: 470px; font-size: 17px; line-height: 1.65; color: var(--muted); margin: 0; }
.world-heading > .button { white-space: nowrap; flex-shrink: 0; }
.world-card { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); overflow: hidden; }
.world-controls { padding: 24px 28px 20px; }
.world-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.world-summary-copy { min-width: 0; }
.world-summary h2 { font-size: 20px; letter-spacing: -.4px; margin: 0; }
.world-count { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.world-refresh { background: transparent; color: var(--ink); border: 0; min-height: 44px; }
.world-controls .chart-segments { margin: 16px 0 14px; }
.world-window { min-height: 20px; margin: 0; font-size: 13px; color: var(--muted); }
.world-table { border-collapse: collapse; width: 100%; table-layout: auto; text-align: left; font-variant-numeric: tabular-nums; }
.world-table thead { color: var(--muted); font-size: 12px; font-weight: 500; background: var(--secondary); }
/* Size totals from their full formatted value plus padding, including yearly totals. */
.world-table th:last-child { width: 1%; text-align: right; white-space: nowrap; }
.world-table th, .world-table td { padding: 12px 28px; }
.world-table tbody tr { border-top: 1px solid var(--border); }
.world-table tbody th { font-weight: normal; padding: 0; }
.world-table tbody td { padding-top: 18px; padding-bottom: 18px; }
.world-table td.world-steps { text-align: right; white-space: nowrap; font-size: 22px; font-weight: 750; letter-spacing: -.5px; }
.world-steps-value { display: block; }
.world-steps-label { display: block; margin-top: 2px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 12px; font-weight: 400; line-height: 1.4; letter-spacing: 0; color: var(--muted); }
.world-walker { display: flex; align-items: center; gap: 14px; min-height: 80px; padding: 14px 4px 14px 28px; border-radius: 8px; }
.world-walker:focus-visible { outline-offset: -2px; }
.world-walker:active, .world-refresh:active { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.world-avatar { position: relative; display: block; flex: 0 0 44px; height: 44px; isolation: isolate; }
.world-avatar-photo { position: absolute; inset: 6px; border-radius: 50%; background: var(--secondary); overflow: hidden; z-index: 2; }
.world-crown { position: absolute; width: 30px; height: 30px; left: calc(50% - 11px); top: -15px; transform: rotate(6deg); transform-origin: bottom center; z-index: 1; pointer-events: none; }
.world-avatar-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.world-progress-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.world-ring-track { stroke: color-mix(in srgb, var(--ink) 18%, transparent); }
.world-ring-fill { stroke: var(--progress-ink); }
.world-progress-ring.is-complete .world-ring-fill { stroke: #ffbe2c; }
.world-avatar-placeholder::after { content: ''; position: absolute; inset: 6px; background: var(--ink); opacity: .3; mask: url('/images/avatar-placeholder.svg') center/contain no-repeat; }
.world-identity { flex: 1; width: 0; min-width: 0; display: grid; gap: 3px; }
.world-identity strong { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.world-rank { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.world-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.world-streak { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; }
.world-streak img { display: block; width: 20px; height: 24px; object-fit: contain; }
.world-streak-value { font-family: var(--font-display); font-size: 20px; font-weight: 400; font-synthesis: none; color: #ffbe2c; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; line-height: 1.3; }
.world-status { min-height: 60px; display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; padding: 24px; margin: 0; font-size: 14px; line-height: 20px; color: var(--muted); text-align: center; }
.world-status > .line-wave { flex: none; color: var(--ink); }
.world-status-label { font-weight: 500; }
.world-results[aria-busy="true"]:has(.world-table[hidden]) .world-status { min-height: 180px; }
.world-status[hidden], .world-table[hidden], .world-empty[hidden], .world-pagination button[hidden] { display: none; }
.world-empty { text-align: center; padding: 34px 24px; }
.world-empty h3 { font-size: 18px; margin: 0 0 8px; }
.world-empty p { margin: 0; color: var(--muted); line-height: 1.6; }
.world-pagination { display: flex; justify-content: center; gap: 12px; }
.world-pagination:has(button:not([hidden])) { padding: 12px 24px 24px; }
.world-pagination .button { min-width: 140px; }
.world-notes { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 22px 0; }
.world-notes p { margin: 8px 0; }
.world-no-script { padding: 0 28px 28px; color: var(--muted); }
.line-wave { display: inline-flex; gap: 3px; align-items: center; height: 24px; flex: 0 0 32px; }
.line-wave i { width: 4px; height: 8px; background: currentColor; border-radius: 2px; animation: line-wave 1.5s ease-in-out infinite; }
.line-wave i:nth-child(2) { animation-delay: -.2s; } .line-wave i:nth-child(3) { animation-delay: -.4s; } .line-wave i:nth-child(4) { animation-delay: -.6s; } .line-wave i:nth-child(5) { animation-delay: -.8s; }
@keyframes line-wave { 0%, 40%, 100% { transform: scaleY(1); } 20% { transform: scaleY(2.5); } }
@media (hover: hover) { .world-walker:hover, .world-refresh:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); } }
@media (max-width: 760px) {
  .world-page { margin-top: 32px; }
  .world-heading { align-items: flex-start; flex-direction: column; gap: 22px; }
  .world-controls { padding: 20px; }
  .world-summary h2 { font-size: 18px; }
  .world-table th, .world-table td { padding-left: 16px; padding-right: 16px; }
  .world-table td.world-steps { font-size: 18px; }
  .world-walker { gap: 10px; padding-left: 16px; }
  .world-identity strong { font-size: 14px; }
  .world-rank { font-size: 12px; }
}
@media (max-width: 650px) {
  .nav-links { gap: 12px; }
  .nav-links > a[href="/leaderboard/"] { display: inline-flex; min-height: 44px; align-items: center; font-size: 12px; }
}
@media (max-width: 420px) { .nav-links > a[href="/leaderboard/"] { display: none; } }
@media (prefers-reduced-motion: reduce) { .line-wave i { animation: none; } .line-wave i:nth-child(2n) { height: 16px; } }

/* Match the native display typography while retaining system body and controls. */
.hero h1,
.world-rank, .world-table td.world-steps {
  font-family: var(--font-display); font-weight: 400; font-synthesis: none; letter-spacing: 0;
}
