:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #14211d;
  background: #e9eee9;
  font-synthesis: none;
  --brand-950: #04291e;
  --brand-900: #073d2d;
  --brand-800: #075a3b;
  --brand-700: #067647;
  --lime: #b9f227;
  --lime-dark: #4e6810;
  --accent: #f0a11c;
  --accent-soft: #fff4d8;
  --primary: var(--brand-700);
  --surface: #fff;
  --surface-alt: #f5f7f2;
  --text: #14211d;
  --muted: #52645c;
  --border: #d7dfd9;
  --danger: #a71d2a;
  --success: #08753f;
  --shadow: 0 8px 24px rgb(4 41 30 / 8%);
  --radius: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: #e9eee9; }
body { margin: 0; min-width: 320px; min-height: 100dvh; background: var(--surface-alt); font-size: 16px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--brand-700); text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.65rem, 7vw, 2.15rem); line-height: 1.17; }
h2 { font-size: 1.125rem; line-height: 1.3; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
time, small { color: var(--muted); }
.app-shell { width: 100%; max-width: 480px; min-height: 100dvh; margin: 0 auto; background: var(--surface-alt); overflow-x: clip; }
.page { min-height: 100dvh; padding: 16px 16px calc(24px + var(--safe-bottom)); outline: none; }
.page.with-tabs { padding-top: calc(16px + var(--safe-top)); padding-bottom: calc(92px + var(--safe-bottom)); }
.skip-link { position: fixed; z-index: 100; top: -100px; left: 8px; padding: 12px; background: #fff; color: var(--brand-900); }
.skip-link:focus { top: 8px; }
.sr-only, .file-button input { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.top-bar { position: sticky; z-index: 20; top: 0; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; min-height: calc(56px + var(--safe-top)); padding: var(--safe-top) 8px 0; color: #fff; background: var(--brand-900); text-align: center; }
.top-bar__spacer { width: 48px; }
.icon-button { display: inline-grid; width: 48px; height: 48px; padding: 0; place-items: center; color: inherit; border: 0; background: transparent; border-radius: 50%; }
.icon-button:active { background: rgb(255 255 255 / 16%); }
.icon { width: 24px; height: 24px; }
.bottom-tabs { position: fixed; z-index: 30; bottom: 0; left: 50%; display: grid; grid-template-columns: repeat(5, 1fr); width: min(100%, 480px); min-height: calc(68px + var(--safe-bottom)); padding: 6px 4px var(--safe-bottom); transform: translateX(-50%); border-top: 1px solid var(--border); background: rgb(255 255 255 / 96%); box-shadow: 0 -8px 24px rgb(4 41 30 / 8%); }
.bottom-tab { display: flex; min-width: 0; min-height: 56px; align-items: center; justify-content: center; flex-direction: column; gap: 2px; color: #5a6a63; border-radius: 14px; font-size: .75rem; font-weight: 650; }
.bottom-tab:active { background: #eef4ef; }
.bottom-tab.is-active { color: var(--brand-700); background: #e6f4e7; }
.bottom-tab:nth-child(3) .icon { width: 29px; height: 29px; }
.hero { margin: -16px -16px 20px; padding: calc(30px + var(--safe-top)) 20px 28px; color: #fff; background: radial-gradient(circle at 92% 5%, rgb(185 242 39 / 24%), transparent 34%), linear-gradient(145deg, var(--brand-950), var(--brand-800)); border-radius: 0 0 28px 28px; }
.hero h1 { max-width: 13em; margin: 8px 0; }
.hero p { max-width: 36em; margin-bottom: 0; color: #e0eee7; }
.eyebrow { color: var(--lime); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow--dark { color: var(--brand-700); }
.page-heading { margin: 8px 0 20px; }
.page-heading h1 { margin-bottom: 6px; }
.page-heading p, .muted { color: var(--muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 12px; }
.section-heading h2 { margin: 0; }
.stack { display: grid; gap: 12px; }
.card { display: block; min-width: 0; margin-bottom: 12px; padding: 16px; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card h2, .card h3 { margin-bottom: 6px; }
.card-link { position: relative; display: flex; min-height: 88px; align-items: center; gap: 14px; padding-right: 40px; }
.card-link:active, .session-row:active { background: #f1f6f1; }
.card__body { min-width: 0; flex: 1; }
.card-cover, .felt-cover { width: 96px; min-width: 96px; height: 78px; object-fit: cover; border-radius: 13px; background: linear-gradient(135deg, #075a3b, #073d2d); }
.felt-cover { position: relative; overflow: hidden; }
.felt-cover::after { position: absolute; width: 48px; height: 2px; top: 38px; left: 24px; content: ""; transform: rotate(-24deg); background: var(--lime); }
.felt-cover--detail { width: 100%; height: 200px; border-radius: 0; }
.chevron { position: absolute; right: 17px; color: var(--muted); font-size: 1.8rem; }
.meta { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--muted); font-size: .82rem; }
.search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 16px; }
input, select, textarea { width: 100%; min-height: 48px; padding: 11px 12px; color: var(--text); border: 1px solid #b8c5bd; border-radius: 12px; background: #fff; }
textarea { min-height: 112px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgb(6 118 71 / 32%); outline-offset: 2px; }
.button { display: inline-flex; min-width: 48px; min-height: 48px; padding: 10px 16px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 13px; font-weight: 750; text-align: center; }
.button:active { filter: brightness(.93); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-error { display: block; width: 100%; margin: 6px 0; color: var(--danger); font-size: .86rem; }
.button--primary { color: #fff; background: var(--brand-700); }
.button--accent { color: var(--brand-950); background: var(--lime); }
.button--secondary { color: var(--brand-800); border-color: #9eb8aa; background: #fff; }
.button--quiet { color: var(--brand-800); background: #e7efe9; }
.button--danger { color: var(--danger); border-color: #e5b4b9; background: #fff; }
.button--light { color: var(--brand-900); background: #fff; }
.button.compact { min-height: 44px; padding: 8px 12px; }
.full { width: 100%; }
.button-row { display: flex; gap: 8px; margin: 12px 0; }
.button-row > * { flex: 1; }
.button-row.wrap { flex-wrap: wrap; }
.field { display: grid; gap: 6px; margin: 16px 0; font-weight: 650; }
.field small { font-weight: 400; text-align: right; }
.field--surface { margin: 0 0 16px; padding: 14px; border-radius: 15px; background: #fff; }
fieldset { margin: 18px 0; padding: 0; border: 0; }
legend { margin-bottom: 8px; font-weight: 700; }
.form-card { padding-bottom: 20px; }
.stepper { display: flex; justify-content: center; gap: 28px; margin-bottom: 20px; }
.stepper span { display: grid; width: 34px; height: 34px; place-items: center; color: var(--muted); border: 2px solid #b8c5bd; border-radius: 50%; font-weight: 800; }
.stepper span.is-active { color: #fff; border-color: var(--brand-700); background: var(--brand-700); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.impact-note { padding: 12px; color: #66430c; border-radius: 12px; background: #fff4d8; }
.file-button { position: relative; overflow: hidden; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.metrics span { display: flex; flex-direction: column; color: var(--muted); font-size: .8rem; }
.metrics b { color: var(--text); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.details { margin: 0; }
.details div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.details dt { color: var(--muted); }
.details dd { margin: 0; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips span, .chip { display: inline-flex; min-height: 28px; padding: 4px 10px; align-items: center; color: var(--brand-800); border-radius: 99px; background: #e7f2e9; font-size: .8rem; font-weight: 700; }
.chips--buttons button { min-height: 44px; padding: 8px 13px; color: var(--brand-800); border: 1px solid #a8bcae; border-radius: 99px; background: #fff; }
.chips--buttons button.is-selected { color: #fff; border-color: var(--brand-700); background: var(--brand-700); }
.album-strip { display: flex; gap: 10px; margin: -16px -16px 16px; padding: 0 16px 4px; overflow-x: auto; scroll-snap-type: x proximity; }
.album-strip img, .album-strip video { width: 280px; min-width: 280px; height: 200px; object-fit: cover; border-radius: 17px; scroll-snap-align: start; }
.image-button { padding: 0; border: 0; background: transparent; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.review-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.merchant-reply { padding: 12px; border-radius: 10px; background: var(--surface-alt); }
.sticky-actions { position: sticky; z-index: 10; bottom: calc(8px + var(--safe-bottom)); display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 20px -8px 0; padding: 8px; border: 1px solid var(--border); border-radius: 17px; background: rgb(255 255 255 / 96%); box-shadow: var(--shadow); }
.page-state { display: grid; min-height: 180px; padding: 28px 16px; place-items: center; align-content: center; text-align: center; border-radius: var(--radius); background: #fff; }
.page-state h1 { margin: 10px 0 4px; font-size: 1.2rem; }
.page-state p { max-width: 30em; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid #c8d7ce; border-top-color: var(--brand-700); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner--small { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.inline-problem, .inline-note, .success-panel { margin: 12px 0; padding: 13px 14px; border-radius: 12px; }
.inline-problem { color: #7f1721; border: 1px solid #efc2c6; background: #fff1f2; }
.inline-note { color: #274c3a; background: #e7f0ea; }
.success-panel { color: #075a3b; border: 1px solid #a8d5ba; background: #eaf8ee; }
.toast { position: fixed; z-index: 60; top: calc(12px + var(--safe-top)); left: 50%; display: flex; width: min(calc(100% - 32px), 448px); min-height: 48px; padding: 12px 12px 12px 16px; align-items: center; justify-content: space-between; transform: translateX(-50%); color: #fff; border-radius: 14px; background: #183b2d; box-shadow: 0 10px 30px rgb(0 0 0 / 22%); }
.toast button { width: 44px; height: 44px; color: #fff; border: 0; background: transparent; font-size: 1.4rem; }
.dialog { width: min(calc(100% - 24px), 456px); max-height: 88dvh; padding: 14px; border: 0; border-radius: 20px; }
.dialog::backdrop { background: rgb(0 0 0 / 55%); }
.dialog__header { display: flex; align-items: center; justify-content: space-between; }
.dialog__header h2 { margin: 0; }
.preview-image { width: 100%; max-height: 72dvh; object-fit: contain; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dashboard-grid .card { min-height: 148px; flex-direction: column; align-items: flex-start; justify-content: center; }
.dashboard-grid .card:first-child, .dashboard-grid .card:last-child { grid-column: 1 / -1; min-height: 120px; flex-direction: row; }
.big-number { color: var(--brand-700); font-size: 2rem; font-variant-numeric: tabular-nums; }
.avatar { display: inline-grid; width: 48px; min-width: 48px; height: 48px; place-items: center; color: #fff; border-radius: 50%; background: var(--brand-700); font-size: 1.2rem; font-weight: 800; }
.avatar--large { width: 72px; height: 72px; font-size: 1.8rem; }
.profile-row { display: flex; align-items: center; gap: 14px; }
.segmented { display: flex; gap: 4px; margin: 8px 0 16px; padding: 4px; border-radius: 14px; background: #dfe8e1; }
.segmented button { min-width: 88px; min-height: 44px; flex: 1; padding: 7px 12px; color: var(--muted); border: 0; border-radius: 11px; background: transparent; font-weight: 700; white-space: nowrap; }
.segmented button.is-active { color: var(--brand-900); background: #fff; box-shadow: 0 2px 7px rgb(4 41 30 / 10%); }
.segmented.scrollable { overflow-x: auto; }
.read-dot { width: 10px; min-width: 10px; height: 10px; border-radius: 50%; background: var(--lime-dark); }
.read-dot.is-read { background: #aeb9b2; }
.notification p { white-space: pre-wrap; }
.lead { font-size: 1.1rem; font-weight: 650; }
.switch-row { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.switch-row input { width: 48px; min-width: 48px; height: 28px; accent-color: var(--brand-700); }
.scanner video { width: 100%; min-height: 220px; margin-bottom: 10px; object-fit: cover; border-radius: 18px; background: #061a13; }
.connection { display: inline-flex; padding: 4px 9px; color: var(--success); border-radius: 99px; background: #e5f6ea; font-size: .8rem; font-weight: 750; }
.connection.is-offline { color: #8a5610; background: #fff3d5; }
.metrics-card { display: grid; grid-template-columns: repeat(4, 1fr); margin: 12px 0; padding: 18px 6px; border-radius: var(--radius); color: #fff; background: var(--brand-900); }
.metrics-card span { display: flex; align-items: center; flex-direction: column; color: #d8e9df; font-size: .8rem; }
.metrics-card b { color: var(--lime); font-size: clamp(1.05rem, 5vw, 1.5rem); }
.overview-strip { display: flex; gap: 10px; margin: 0 -16px 18px; padding: 0 16px 5px; overflow-x: auto; scroll-snap-type: x proximity; }
.overview-card { display: grid; min-width: 142px; padding: 14px; gap: 3px; text-align: left; color: var(--text); border: 1px solid var(--border); border-radius: 15px; background: var(--surface); scroll-snap-align: start; box-shadow: var(--shadow); }
.overview-card > span { color: var(--brand-700); font-size: .82rem; font-weight: 800; }
.overview-card > strong { font-size: 1.35rem; }
.overview-card progress { width: 100%; height: 8px; margin-top: 7px; accent-color: var(--brand-700); }
.overview-card.is-selected { border-color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand-700), var(--shadow); }
.ranking-list, .level-list { margin: 14px 0; padding: 0; list-style: none; }
.ranking-list li, .level-list li { display: grid; grid-template-columns: 38px 1fr auto; min-height: 64px; padding: 8px 12px; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); background: #fff; }
.ranking-list li:first-child { border-radius: 15px 15px 0 0; }
.ranking-list li:last-child { border-radius: 0 0 15px 15px; }
.ranking-list li.is-me { background: #ebf7df; }
.ranking-list small { display: block; }
.level-hero { text-align: center; }
.level-hero b { display: block; margin: 8px; color: var(--brand-700); font-size: 2.4rem; }
.level-list li { grid-template-columns: 64px 1fr; }
.level-list li.is-current { border-radius: 12px; background: var(--accent-soft); box-shadow: inset 4px 0 var(--accent); padding-inline: 10px; }
.level-list li em { color: var(--primary); font-style: normal; font-weight: 800; }
.page, .card, .page-state, .top-bar, p, h1, h2, h3, dd, dt, small, strong, a, button { overflow-wrap: anywhere; }
.session-row { display: flex; width: 100%; align-items: center; justify-content: space-between; text-align: left; }
.session-row.is-selected { border: 2px solid var(--brand-700); }
.live-stage { width: 100%; aspect-ratio: 16 / 9; margin: 16px 0; border-radius: 18px; background: #07110d; box-shadow: var(--shadow); }
.player-shell { margin: 16px 0; padding: 10px; border-radius: 18px; color: #fff; background: #07110d; }
.player-shell video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; }
.player-shell .muted { margin: 8px 4px 2px; color: #c6d1cc; font-size: .8rem; }
.download-progress { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.download-progress progress { width: 100%; accent-color: var(--brand-700); }
.prose li { margin: 10px 0; }
.login { display: grid; min-height: calc(100dvh - 100px); align-content: center; text-align: center; }
.login-mark { width: 110px; height: 70px; margin: 0 auto 24px; border: 8px solid var(--brand-900); border-radius: 16px; background: var(--brand-700); box-shadow: inset 0 0 0 2px var(--lime); }
.footnote { margin-top: 16px; color: var(--muted); font-size: .8rem; }
.profile-hero { display: grid; justify-items: start; }
.menu-list { margin: 16px 0; }
.favorite-card > a { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; color: var(--text); }
.favorite-card img, .favorite-card .felt-cover { width: 88px; min-width: 88px; height: 88px; grid-row: 1 / 4; object-fit: cover; border-radius: 12px; }
.favorite-card h2, .favorite-card p { margin: 0; }

@media (orientation: landscape) and (max-height: 520px) {
  .hero { padding-top: calc(18px + var(--safe-top)); padding-bottom: 18px; }
  .page.with-tabs { padding-bottom: calc(76px + var(--safe-bottom)); }
  .bottom-tabs { min-height: calc(58px + var(--safe-bottom)); }
  .bottom-tab { min-height: 48px; flex-direction: row; font-size: .72rem; }
  .bottom-tab .icon { width: 20px; height: 20px; }
  .player-shell video { max-height: calc(100dvh - 160px); }
}
@media (max-width: 350px) {
  .page { padding-left: 12px; padding-right: 12px; }
  .hero { margin-left: -12px; margin-right: -12px; padding-left: 16px; padding-right: 16px; }
  .card { padding: 14px; }
  .card-cover, .felt-cover { width: 76px; min-width: 76px; }
  .button { padding-left: 11px; padding-right: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
