:root {
  color-scheme: light;
  --blue: #1d9bf0;
  --ink: #0f1419;
  --muted: #536471;
  --line: #eff3f4;
  --bg: #fff;
  --navy: #0f1419;
  --mono: Inter, "Segoe UI", Arial, sans-serif;
  --hover: #f7f9f9;
  --frame: 1266px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1,h2,h3,p { margin: 0; }
button,input,textarea,select { font: inherit; }
button { color: inherit; border: 0; background: transparent; cursor: pointer; }
button:disabled { cursor: not-allowed; }
button,a,input,select,summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
a { color: #167bbd; }
[hidden] { display: none !important; }
.icon { display: inline-block; flex: none; vertical-align: middle; }
.skip-link { position: fixed; z-index: 20; top: -60px; left: 20px; padding: 10px; border-radius: 9px; background: #fff; }
.skip-link:focus { top: 8px; }
.creator-avatar,.avatar { border-radius: 50%; flex: none; display: inline-block; }
.creator-avatar { background: #eff3f4 url("../assets/creator-avatars.svg") no-repeat; background-size: 400% 300%; }
.avatar { width: 42px; height: 42px; object-fit: cover; background: #d0def3; }
.x-layout {
  display: grid;
  grid-template-columns: minmax(214px,258px) minmax(0,600px) minmax(270px,350px);
  justify-content: center;
  max-width: var(--frame);
  margin-inline: auto;
  padding-inline: 12px;
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 4px 21px 10px 4px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}
.brand { display: grid; place-items: center; width: 52px; min-height: 52px; padding: 12px; border-radius: 50%; }
.brand img { display: block; width: 29px; height: 29px; }
.brand:hover,.nav-btn:hover,.side-profile:hover,.top-back:hover,.menu-toggle:hover { background: #0f14190c; }
.side-nav { display: grid; justify-items: start; gap: 3px; margin: 5px 0 12px; }
.nav-btn { display: inline-flex; align-items: center; gap: 19px; padding: 12px 17px 12px 13px; min-height: 50px; font-size: 19px; line-height: 1.35; white-space: nowrap; border-radius: 999px; text-align: left; }
.nav-btn.selected { font-weight: 760; }
.nav-btn.selected .icon { stroke-width: 2.45; }
.nav-btn.selected[data-page=home] .icon { fill: var(--ink); }
.nav-post { display: grid; place-items: center; width: 100%; max-width: 215px; height: 50px; flex: none; font-size: 17px; font-weight: 700; background: var(--ink); color: white; border-radius: 999px; }
.nav-post:hover,.shell-btn.dark:hover { background: #272c30; }
.nav-post .icon { display: none; }
.sidebar-tail { width: 100%; margin-top: auto; padding-top: 22px; }
.side-profile { display: flex; align-items: center; gap: 10px; padding: 10px 9px; border-radius: 999px; width: 100%; text-align: left; }
.side-profile > .icon { margin-left: auto; }
.user-details { min-width: 0; }
.profile-name { display: flex; align-items: center; gap: 3px; font-weight: 700; font-size: 14px; }
.handle { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.workspace { min-width: 0; border-inline: 1px solid var(--line); }
.topbar { display: flex; position: sticky; top: 0; z-index: 3; min-height: 54px; align-items: center; justify-content: space-between; padding: 6px 16px; gap: 8px; border-bottom: 1px solid var(--line); background: #fffffff2; backdrop-filter: blur(10px); }
.page-title,.header-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.page-title h1 { font-size: 20px; font-weight: 760; letter-spacing: -.6px; line-height: 1.35; }
.title-sub { display: block; font-size: 12px; color: var(--muted); }
.title-sub:empty { display: none; }
.top-back,.menu-toggle { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; padding: 0; margin-left: -4px; }
.menu-toggle,.nav-scrim,#bottom-nav { display: none; }
.day-stamp { display: inline-flex; align-items: center; gap: 3px; min-height: 28px; padding: 4px 7px; border-radius: 999px; font-size: 12px; white-space: nowrap; color: var(--muted); }
.day-stamp:hover:enabled { background: var(--hover); }
.day-stamp:disabled { cursor: default; opacity: 1; }
.day-stamp:disabled .icon { display: none; }
.day-end-button { padding: 5px 10px; font-size: 12px; font-weight: 600; color: #394750; border: 1px solid #cfd9de; border-radius: 999px; white-space: nowrap; }
.day-end-button:hover { background: var(--hover); }
main { min-width: 0; }
main:focus { outline: none; }
.x-aside { position: sticky; top: 0; align-self: start; max-height: 100dvh; overflow-y: auto; scrollbar-width: thin; min-width: 0; padding: 5px 0 32px clamp(18px,2vw,30px); }
#x-rail { display: grid; align-content: start; gap: 14px; }
#mobile-start:not(:empty) { padding: 12px 16px; border-bottom: 1px solid var(--line); }
#x-start { scroll-margin-top: 64px; }
.save-warning,.dialog-notice { padding: 9px 16px; color: #735529; font-size: 13px; background: #fff8e7; }
.shell-btn,.rest-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 650; line-height: 1.4; }
.shell-btn.primary,.shell-btn.dark { color: white; background: var(--ink); }
.rest-button { margin-left: 5px; padding: 3px 7px; font-size: 11px; background: #eff6fb; color: #1478b8; }
button:disabled { opacity: .55; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; }
.page-head h1 { font-size: 20px; }.page-head p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.analytics-body { padding: 16px; display: grid; gap: 14px; }
.section-title,.panel-top,.panel-heading { display: flex; align-items: center; gap: 8px; }
.section-title,.panel-top { justify-content: space-between; }
.section-title h2 { font-size: 20px; }.section-title small { color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.stat,.panel { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.stat-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.stat-icon { color: #536471; }
.stat-value { display: block; margin: 7px 0 2px; font-size: 27px; font-weight: 750; letter-spacing: -1px; }
.stat-foot,.chart-note { font-size: 12px; color: var(--muted); }
.stat-foot .gain { color: #00845b; }
.panel-heading h2 { font-size: 17px; }.panel-heading>.icon { color: #536471; }
.range-tabs { display: flex; padding: 2px; background: #f3f5f6; border-radius: 999px; }
.range-tabs button { font-size: 12px; color: var(--muted); border-radius: 999px; padding: 4px 8px; }
.range-tabs button.active { color: white; background: var(--ink); }
.series-choice { display: inline-flex; position: relative; align-items: center; }
.series-choice select { border: 0; font-size: 16px; font-weight: 700; color: var(--ink); background: transparent; appearance: none; cursor: pointer; padding: 4px 17px 4px 0; }
.series-choice .icon { position: absolute; right: 0; pointer-events: none; }
.chart-legend,.chart-legend span { display: flex; align-items: center; }
.chart-legend { margin-top: 15px; gap: 14px; color: var(--muted); font-size: 11px; }
.chart-legend span { gap: 5px; }.swatch { width: 8px; height: 8px; background: #1d9bf0; border-radius: 2px; }.swatch.qualified { background: #65c2ae; }
.graph { display: flex; height: 184px; gap: 8px; padding-top: 10px; }
.axis { display: flex; flex-direction: column; justify-content: space-between; align-items: end; width: 30px; padding-bottom: 22px; color: var(--muted); font-size: 10px; }
.plot { display: flex; flex: 1; min-width: 0; align-items: stretch; justify-content: space-around; position: relative; margin: 4px 0 25px; background: repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),var(--line) calc(25% - 1px),var(--line) 25%); border-bottom: 1px solid var(--line); }
.bar-group { position: relative; display: flex; flex: 1; min-width: 0; align-items: end; justify-content: center; gap: 2px; padding: 0; }
.bar { width: 42%; max-width: 22px; min-height: 1px; border-radius: 3px 3px 0 0; background: var(--blue); }.bar.second { width: 22%; max-width: 12px; background: #65c2ae; }
.xval { position: absolute; top: calc(100% + 5px); color: var(--muted); white-space: nowrap; font-size: 10px; }
.chart-tooltip { position: absolute; display: none; z-index: 2; left: 50%; bottom: 65%; transform: translateX(-50%); padding: 5px 8px; border-radius: 5px; color: white; background: var(--ink); font-size: 10px; width: max-content; max-width: 135px; }
.bar-group:hover .chart-tooltip,.bar-group:focus-visible .chart-tooltip { display: block; }
.bar-group:first-child .chart-tooltip { left: 0; transform: none; }.bar-group:last-child .chart-tooltip { left: auto; right: 0; transform: none; }
.status-pill { display: inline-flex; gap: 4px; align-items: center; padding: 3px 7px; border-radius: 5px; font-size: 11px; color: #536471; background: #f3f5f6; }
.status-pill.unlocked { color: #007f51; background: #e6f6ef; }
.reward-sub { color: var(--muted); font-size: 13px; margin-top: 7px; }
.progress-row { margin-top: 15px; }.progress-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.progress-label span:last-child { color: var(--muted); }.progress-track { height: 5px; background: #eff3f4; border-radius: 4px; overflow: hidden; margin-top: 7px; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }.progress-row.purple .progress-track i { background: #826cce; }
.reward-go { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 12px 0 0; margin-top: 16px; border-top: 1px solid var(--line); color: #1486cc; font-size: 14px; }
.log-row { display: flex; align-items: flex-start; padding: 17px 20px; gap: 14px; border-bottom: 1px solid var(--line); }
.log-symbol { color: var(--blue); }.log-day { color: var(--muted); font-size: 13px; }.log-row p { font-size: 15px; line-height: 1.55; margin-top: 4px; }.empty-note { padding: 20px; font-size: 14px; color: var(--muted); }
dialog { padding: 0; color: var(--ink); background: #fff; border: none; border-radius: 18px; width: min(540px,calc(100vw - 24px)); max-height: min(90dvh,820px); overflow: auto; box-shadow: 0 10px 50px #14232f30; }
dialog::backdrop { background: #35424c75; }
body.modal-open { overflow: hidden; }.dialog-notice { position: sticky; bottom: 0; }
.toast { position: fixed; z-index: 10; bottom: 24px; left: 50%; transform: translate(-50%,8px); width: max-content; max-width: min(92vw,600px); background: #0f1419; color: white; box-shadow: 0 3px 14px #0f141926; padding: 11px 17px; border-radius: 10px; font-size: 14px; pointer-events: none; opacity: 0; transition: opacity .15s,transform .15s; }
.toast.visible { opacity: 1; transform: translate(-50%,0); }
@media (min-width: 1300px) {
  .x-layout { grid-template-columns: 262px 600px 378px; }
  .sidebar { padding-right: 26px; }
}
@media (max-width: 1150px) and (min-width: 701px) {
  .x-layout { grid-template-columns: 76px minmax(0,600px) minmax(265px,330px); }
  .sidebar { align-items: center; padding-inline: 4px; }.side-nav { justify-items: center; }
  .nav-btn { padding: 12px; }.nav-btn span,.side-profile .user-details,.side-profile>.icon,.nav-post span { display: none; }
  .nav-post { width: 49px; height: 49px; }.nav-post .icon { display: block; }
  .side-profile { justify-content: center; }.sidebar-tail { width: auto; }
}
@media (max-width: 1000px) {
  .x-layout { grid-template-columns: 76px minmax(0,650px); }
  .x-aside { display: none; }
}
@media (max-width: 700px) {
  .x-layout { display: block; padding: 0; }
  .workspace { min-height: 100dvh; padding-bottom: calc(60px + env(safe-area-inset-bottom)); border: none; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; align-items: flex-start; z-index: 7; background: #fff; padding: 6px 16px 8px 12px; width: min(275px,82vw); visibility: hidden; transform: translateX(-100%); transition: transform .16s; }
  body.menu-open { overflow: hidden; }
  .menu-open .sidebar { transform: none; visibility: visible; }
  .menu-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 6; background: #0f141966; }
  .menu-toggle { display: grid; margin-left: 0; }.menu-toggle img { width: 30px; height: 30px; }
  .top-back { display: none; }.topbar { padding: 7px 14px; min-height: 50px; }
  .page-title h1 { font-size: 18px; }.header-actions { gap: 6px; }.day-end-button { padding: 5px 7px; }
  #bottom-nav { display: flex; position: fixed; z-index: 4; bottom: 0; left: 0; right: 0; background: #fffffff7; border-top: 1px solid var(--line); justify-content: space-around; padding-bottom: env(safe-area-inset-bottom); }
  #bottom-nav .nav-btn { justify-content: center; flex: 1; padding: 11px 0; border-radius: 0; min-height: 49px; }
  #bottom-nav .nav-btn span { display: none; }.toast { bottom: calc(68px + env(safe-area-inset-bottom)); }
  .analytics-body { padding: 12px; }.stat-value { font-size: 24px; }
}
@media (max-height: 630px) and (min-width:701px) {
  .nav-btn { min-height: 41px; padding-block: 7px; }.side-nav { gap: 1px; margin-block: 2px 5px; }.sidebar-tail { padding-top: 8px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
