:root {
        color-scheme: light;
        --bg: #f7f5f0;
        --bg-soft: #fafaf7;
        --surface: rgba(255, 255, 255, 0.78);
        --surface-subtle: rgba(238, 231, 255, 0.62);
        --surface-raised: rgba(255, 255, 255, 0.9);
        --surface-tint: rgba(227, 244, 239, 0.6);
        --text: #202124;
        --muted: #6b6b73;
        --soft: #44464f;
        --line: rgba(32, 33, 36, 0.08);
        --line-strong: rgba(32, 33, 36, 0.14);
        --shadow: 0 20px 56px rgba(42, 43, 47, 0.1);
        --radius: 8px;
        --max: 1180px;
        --sleep: #9C27B0;
        --rest: #00BCD4;
        --todo: #5E6AD2;
        --study: #4CAF50;
        --school: #E91E63;
        --development: #3949AB;
        --work: #546E7A;
        --meal: #FF9800;
        --exercise: #2196F3;
        --move: #26A69A;
        --snack: #FFCA28;
        --reading: #7CB342;
        --toothbrush: #80CBC4;
        --wash: #4DB6AC;
        --etc: #757575;
        --danger: #c76f6f;
      }

      * { box-sizing: border-box; }

      [hidden] { display: none !important; }

      html {
        scroll-behavior: smooth;
        background-color: #fafaf7;
        color: #202124;
      }

      body {
        min-height: 100vh;
        margin: 0;
        overflow-x: clip;
        background:
          radial-gradient(circle at 14% 0%, rgba(123, 196, 189, 0.22), transparent 30rem),
          radial-gradient(circle at 92% 12%, rgba(139, 92, 246, 0.13), transparent 28rem),
          linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 54%, #f3f0ea 100%);
        color: var(--text);
        font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        letter-spacing: 0;
      }

      body::before {
        position: fixed;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        content: "";
        background-image:
          linear-gradient(rgba(32, 33, 36, 0.025) 1px, transparent 1px),
          linear-gradient(90deg, rgba(32, 33, 36, 0.025) 1px, transparent 1px);
        background-size: 48px 48px;
        mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), transparent 68%);
      }

      button,
      input,
      select { font: inherit; }

      a { color: inherit; }

      .page {
        width: min(100% - 40px, var(--max));
        margin: 0 auto;
      }

      .site-header {
        position: sticky;
        top: 0;
        z-index: 20;
        border-bottom: 1px solid rgba(32, 33, 36, 0.07);
        background: rgba(250, 250, 247, 0.82);
        backdrop-filter: blur(18px);
      }

      .nav {
        display: flex;
        min-height: 68px;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
      }

      .brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        color: var(--text);
        font-weight: 760;
        text-decoration: none;
      }

      .brand-mark {
        display: grid;
        width: 32px;
        gap: 5px;
      }

      .brand-mark span {
        display: block;
        height: 6px;
        border-radius: 99px;
        background: linear-gradient(90deg, #b16cf0, #13bdbd);
      }

      .brand-mark span:nth-child(1) { width: 30px; }
      .brand-mark span:nth-child(2) { width: 20px; }
      .brand-mark span:nth-child(3) { width: 26px; }
      .brand-mark span:nth-child(4) { width: 12px; }

      .nav-actions {
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .button {
        display: inline-flex;
        min-height: 40px;
        align-items: center;
        justify-content: center;
        padding: 0 14px;
        border: 1px solid var(--line);
        border-radius: 7px;
        background: rgba(255, 255, 255, 0.72);
        box-shadow: 0 8px 22px rgba(42, 43, 47, 0.05);
        color: var(--text);
        cursor: pointer;
        font-size: 14px;
        font-weight: 680;
        text-decoration: none;
      }

      .language-toggle {
        min-width: 74px;
      }

      .calendar-nav-button {
        gap: 8px;
      }

      .calendar-button-icon {
        position: relative;
        width: 15px;
        height: 15px;
        flex: 0 0 auto;
        border: 1.8px solid currentColor;
        border-radius: 4px;
      }

      .calendar-button-icon::before {
        position: absolute;
        left: 2px;
        right: 2px;
        top: 4px;
        height: 1.8px;
        background: currentColor;
        content: "";
      }

      .calendar-button-icon::after {
        position: absolute;
        left: 3px;
        top: -3px;
        width: 7px;
        height: 4px;
        border-left: 1.8px solid currentColor;
        border-right: 1.8px solid currentColor;
        content: "";
      }

      .button.primary {
        border-color: transparent;
        background: linear-gradient(135deg, #7f37d6, #b15fea);
        box-shadow: 0 14px 28px rgba(139, 92, 246, 0.2);
        color: #fff;
      }

      .button:disabled {
        cursor: not-allowed;
        opacity: 0.62;
      }

      .status-chip {
        display: inline-flex;
        min-height: 40px;
        max-width: 220px;
        align-items: center;
        gap: 8px;
        padding: 0 15px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.72);
        backdrop-filter: blur(12px);
        color: var(--muted);
        font-size: 14px;
        font-weight: 520;
        line-height: 1;
        white-space: nowrap;
      }

      .status-dot {
        width: 7px;
        height: 7px;
        flex: 0 0 auto;
        border-radius: 50%;
        background: var(--rest);
        opacity: 0.85;
      }

      .status-chip span:last-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      main { padding: 36px 0 76px; }

      .hero {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
        gap: 24px;
        align-items: stretch;
        margin-bottom: 18px;
      }

      .hero-copy,
      .maturity-card,
      .card,
      .panel {
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: var(--shadow);
      }

      .hero-copy {
        padding: 34px;
        background:
          linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(238, 231, 255, 0.55) 100%);
      }

      .eyebrow {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 0 18px;
        color: var(--muted);
        font-size: 13px;
        font-weight: 720;
      }

      .eyebrow::before {
        width: 28px;
        height: 1px;
        content: "";
        background: var(--rest);
      }

      h1,
      h2,
      h3,
      p { margin-top: 0; }

      h1 {
        max-width: 760px;
        margin-bottom: 16px;
        color: var(--text);
        font-size: clamp(42px, 7vw, 86px);
        line-height: 0.96;
        font-weight: 780;
      }

      .lede {
        max-width: 720px;
        margin-bottom: 0;
        color: var(--muted);
        font-size: 16px;
        line-height: 1.72;
      }

      .maturity-card {
        display: flex;
        padding: 24px;
        flex-direction: column;
        justify-content: space-between;
        gap: 22px;
      }

      .maturity-top {
        display: flex;
        align-items: start;
        justify-content: space-between;
        gap: 16px;
      }

      .label {
        margin-bottom: 8px;
        color: var(--soft);
        font-size: 12px;
        font-weight: 760;
        text-transform: uppercase;
      }

      .maturity-title {
        margin-bottom: 8px;
        font-size: 24px;
        line-height: 1.18;
      }

      .maturity-copy {
        margin: 0;
        color: var(--muted);
        line-height: 1.62;
      }

      .stage-badge {
        flex: 0 0 auto;
        padding: 7px 10px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: rgba(238, 231, 255, 0.78);
        color: var(--soft);
        font-size: 12px;
        font-weight: 760;
      }

      .progress-track {
        height: 8px;
        overflow: hidden;
        border-radius: 999px;
        background: rgba(32, 33, 36, 0.08);
      }

      .progress-bar {
        width: var(--progress, 0%);
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--todo), var(--rest));
      }

      .progress-meta {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        margin-top: 10px;
        color: var(--soft);
        font-size: 13px;
      }

      .chapter {
        margin-top: 58px;
      }

      .chapter-head {
        display: flex;
        align-items: end;
        justify-content: space-between;
        gap: 24px;
        margin-bottom: 16px;
      }

      .chapter-kicker {
        margin-bottom: 7px;
        color: #6f52bb;
        font-size: 12px;
        font-weight: 760;
        text-transform: uppercase;
      }

      .chapter h2 {
        margin-bottom: 0;
        font-size: clamp(28px, 4vw, 44px);
        line-height: 1.05;
      }

      .chapter-head p {
        max-width: 480px;
        margin-bottom: 0;
        color: var(--muted);
        line-height: 1.65;
      }

      .summary-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
      }

      .card {
        min-height: 132px;
        padding: 18px;
      }

      .metric-value {
        display: block;
        margin: 10px 0 8px;
        font-size: clamp(28px, 4vw, 38px);
        font-weight: 780;
        line-height: 1;
      }

      .metric-note {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.5;
      }

      .grid-two {
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
        gap: 14px;
        margin-top: 14px;
      }

      .grid-two--exercise {
        align-items: start;
      }

      .exercise-more-btn {
        display: block;
        text-align: center;
        margin-top: 14px;
        padding: 9px 16px;
        font-size: 13px;
        font-weight: 500;
        color: var(--exercise);
        text-decoration: none;
        border: 1px solid rgba(33, 150, 243, 0.25);
        border-radius: 8px;
        transition: background 0.15s, border-color 0.15s;
      }

      .exercise-more-btn:hover {
        background: rgba(33, 150, 243, 0.06);
        border-color: rgba(33, 150, 243, 0.45);
      }

      .grid-three {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
        margin-top: 14px;
      }

      .panel {
        min-width: 0;
        overflow: hidden;
      }

      .panel-head {
        display: flex;
        align-items: start;
        justify-content: space-between;
        gap: 16px;
        padding: 18px 18px 0;
      }

      .panel h3 {
        margin-bottom: 5px;
        font-size: 17px;
      }

      .panel-desc {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.5;
      }

      .panel-body {
        padding: 18px;
      }

      .timeline {
        position: relative;
        border: 1px solid var(--line);
        border-radius: 7px;
        background: rgba(255, 255, 255, 0.48);
        overflow: hidden;
      }

      .timeline-row {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        min-height: 34px;
        border-bottom: 1px solid rgba(32, 33, 36, 0.07);
      }

      .timeline-row:last-child {
        border-bottom: 0;
      }

      .timeline-label {
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 0 10px;
        color: var(--soft);
        font-size: 12px;
        font-weight: 700;
      }

      .timeline-label::before {
        width: 8px;
        height: 8px;
        border-radius: 2px;
        content: "";
        background: var(--color);
      }

      .timeline-label.productive {
        --color: var(--todo);
      }

      .timeline-track {
        position: relative;
        min-height: 34px;
        background:
          linear-gradient(90deg, rgba(32, 33, 36, 0.06) 1px, transparent 1px) 0 0 / 12.5% 100%;
      }

      .timeline-block {
        position: absolute;
        left: var(--left);
        top: 7px;
        width: max(var(--width), 8px);
        height: 20px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 5px;
        background: var(--color);
        color: transparent;
        cursor: pointer;
      }

      .timeline-tip {
        position: absolute;
        z-index: 200;
        width: 200px;
        padding: 8px 12px;
        border: 1px solid rgba(32, 33, 36, 0.1);
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 6px 20px rgba(32, 33, 36, 0.13);
        backdrop-filter: blur(10px);
        pointer-events: none;
      }
      .timeline-tip[hidden] { display: none; }
      .timeline-tip-time {
        display: block;
        color: var(--soft);
        font-size: 11px;
        font-weight: 500;
      }
      .timeline-tip-title {
        display: block;
        margin-top: 3px;
        font-size: 13px;
        font-weight: 650;
        color: var(--fg);
      }

      .timeline-hours {
        display: grid;
        grid-template-columns: 112px repeat(4, 1fr);
        margin-top: 9px;
        color: var(--soft);
        font-size: 12px;
      }

      .timeline-hours span:nth-child(3),
      .timeline-hours span:nth-child(4) { text-align: center; }
      .timeline-hours span:last-child { text-align: right; }

      .breakdown {
        display: grid;
        gap: 12px;
      }

      .breakdown-row {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr) 64px;
        gap: 10px;
        align-items: center;
        color: var(--muted);
        font-size: 13px;
      }

      .bar-track {
        height: 9px;
        overflow: hidden;
        border-radius: 999px;
        background: rgba(32, 33, 36, 0.07);
      }

      .bar-fill {
        width: var(--width);
        height: 100%;
        border-radius: inherit;
        background: var(--color);
      }

      .stacked-days {
        display: grid;
        gap: 10px;
      }

      .stacked-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 12px;
        margin-bottom: 14px;
        color: var(--muted);
        font-size: 12px;
      }

      .stacked-legend span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }

      .stacked-legend span::before {
        width: 8px;
        height: 8px;
        border-radius: 2px;
        content: "";
        background: var(--color);
      }

      .exercise-overview-inline {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        color: var(--muted);
        margin-bottom: 14px;
        padding: 7px 10px;
        background: rgba(33, 150, 243, 0.07);
        border-radius: 8px;
      }

      .exercise-overview-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--exercise);
        flex-shrink: 0;
      }

      .exercise-overview-inline strong {
        color: var(--fg);
      }

      .overview-sep { opacity: 0.4; }

      .overview-top-ex {
        color: var(--fg);
        font-weight: 520;
      }

      .exercise-stat-row {
        display: flex;
        gap: 20px;
        margin-bottom: 14px;
        font-size: 13px;
        color: var(--muted);
      }

      .exercise-stat-row strong {
        color: var(--fg);
        margin-right: 4px;
      }

      .exercise-agg-list {
        display: grid;
        gap: 9px;
        margin-top: 4px;
      }

      .exercise-agg-list--below-days {
        margin-top: 16px;
        padding-top: 14px;
        border-top: 1px solid var(--line);
      }

      .exercise-agg-row {
        display: grid;
        grid-template-columns: 100px minmax(0, 1fr) max-content max-content;
        gap: 8px;
        align-items: center;
        font-size: 13px;
      }

      .agg-name {
        font-weight: 560;
        color: var(--fg);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .agg-detail {
        color: var(--fg);
        font-variant-numeric: tabular-nums;
        text-align: right;
        white-space: nowrap;
      }

      .agg-sets {
        color: var(--muted);
        font-size: 11px;
        white-space: nowrap;
        min-width: 36px;
        text-align: right;
      }

      .exercise-set-table {
        display: grid;
        grid-template-columns: 1fr auto auto;
        gap: 1px 10px;
        margin-top: 7px;
        padding-top: 7px;
        border-top: 1px solid var(--line);
      }

      .exercise-set-table > span {
        font-size: 12px;
        line-height: 1.9;
        color: var(--soft);
      }

      .exercise-set-table .set-name {
        color: var(--fg);
        font-weight: 520;
      }

      .exercise-set-table .set-detail {
        text-align: right;
        font-variant-numeric: tabular-nums;
      }

      .exercise-set-table .set-intensity { text-align: right; }
      .intensity-hard   { color: #E64A19; }
      .intensity-easy   { color: #558B2F; }
      .intensity-normal { color: var(--muted); }

      .stacked-header {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 72px;
        gap: 10px;
        margin-bottom: 8px;
        color: var(--soft);
        font-size: 11px;
        font-weight: 760;
        text-transform: uppercase;
      }

      .stacked-day {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 72px;
        gap: 10px;
        align-items: center;
        color: var(--muted);
        font-size: 12px;
      }

      .stacked-day strong {
        color: var(--soft);
        text-align: right;
      }

      .stacked-bar {
        display: flex;
        height: 18px;
        overflow: hidden;
        border-radius: 5px;
        background: rgba(32, 33, 36, 0.07);
      }

      .stacked-segment {
        width: var(--width);
        min-width: 2px;
        background: var(--color);
      }

      .stacked-segment--ghost {
        opacity: 0.28;
        background-image: repeating-linear-gradient(135deg, transparent 0 3px, rgba(255,255,255,0.5) 3px 5px);
      }

      .line-chart {
        width: 100%;
        height: 210px;
      }

      .chart-axis,
      .chart-grid {
        stroke: rgba(32, 33, 36, 0.11);
        stroke-width: 1;
      }

      .chart-line {
        fill: none;
        stroke: var(--color);
        stroke-width: 2.4;
        stroke-linecap: round;
        stroke-linejoin: round;
      }

      .chart-area {
        fill: var(--color);
        opacity: 0.08;
      }

      .chart-dot {
        fill: var(--color);
      }

      .chart-label {
        fill: var(--muted);
        font-size: 11px;
        font-weight: 650;
      }

      .chart-float-label {
        fill: var(--color);
        font-size: 10px;
        font-weight: 650;
        opacity: 0.8;
      }

      .donut-wrap {
        display: grid;
        grid-template-columns: 156px minmax(0, 1fr);
        gap: 18px;
        align-items: center;
      }

      .donut {
        width: 156px;
        aspect-ratio: 1;
        border-radius: 50%;
        background: var(--donut);
        box-shadow: inset 0 0 0 28px rgba(255, 255, 255, 0.88);
      }

      .donut-stack {
        display: grid;
        grid-template-columns: 172px minmax(0, 1fr);
        gap: 20px;
        align-items: center;
      }

      .donut-stat {
        position: relative;
        display: grid;
        width: 172px;
        aspect-ratio: 1;
        place-items: center;
        border-radius: 50%;
        background: var(--donut);
        box-shadow: inset 0 0 0 24px rgba(255, 255, 255, 0.88);
      }

      .donut-stat-center {
        display: grid;
        width: 78px;
        height: 78px;
        place-items: center;
        border: 1px solid var(--line);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.9);
        text-align: center;
      }

      .donut-stat-center span {
        display: block;
        color: var(--soft);
        font-size: 11px;
        font-weight: 760;
        text-transform: uppercase;
      }

      .donut-stat-center strong {
        display: block;
        margin-top: 4px;
        color: var(--text);
        font-size: 18px;
      }

      .donut-list {
        display: grid;
        gap: 10px;
      }

      .donut-list-row {
        display: grid;
        grid-template-columns: 10px minmax(0, 1fr) auto auto auto;
        gap: 9px;
        align-items: center;
        color: var(--muted);
        font-size: 13px;
      }

      .donut-list-dot {
        width: 10px;
        height: 10px;
        border-radius: 3px;
        background: var(--color);
      }

      .donut-list-row strong {
        color: var(--soft);
        font-size: 13px;
      }

      .donut-list-row em {
        color: var(--muted);
        font-style: normal;
        font-size: 12px;
      }

      .change {
        min-width: 34px;
        color: var(--soft);
        font-size: 12px;
        font-weight: 760;
        text-align: right;
      }

      .change.up { color: var(--rest); }
      .change.down { color: var(--danger); }
      .change.flat { color: var(--etc); }

      .legend {
        display: grid;
        gap: 9px;
      }

      .legend-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        color: var(--muted);
        font-size: 13px;
      }

      .legend-row::before {
        width: 9px;
        height: 9px;
        flex: 0 0 auto;
        border-radius: 3px;
        content: "";
        background: var(--color);
      }

      .legend-name {
        flex: 1;
      }

      .notice {
        display: flex;
        align-items: start;
        gap: 12px;
        margin-top: 14px;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(227, 244, 239, 0.58);
        color: var(--muted);
        line-height: 1.58;
      }

      .notice strong {
        display: block;
        margin-bottom: 4px;
        color: var(--text);
      }

      .notice-mark {
        display: grid;
        width: 26px;
        height: 26px;
        flex: 0 0 auto;
        place-items: center;
        border-radius: 7px;
        background: rgba(139, 92, 246, 0.1);
        color: var(--soft);
        font-weight: 800;
      }

      .recent-list {
        display: grid;
        gap: 8px;
      }

      .recent-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
      }

      .recent-item:last-child { border-bottom: 0; }

      .recent-item strong {
        display: block;
        margin-bottom: 3px;
        font-size: 14px;
      }

      .recent-item span {
        color: var(--soft);
        font-size: 12px;
      }

      .recent-item--timer {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        background: rgba(33, 150, 243, 0.06);
        border-radius: 10px;
        border-bottom: none;
        padding: 10px 12px;
      }

      .recent-item-icon {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(33, 150, 243, 0.14);
        color: var(--exercise);
        font-size: 16px;
      }

      .pill {
        align-self: start;
        padding: 5px 8px;
        border-radius: 999px;
        background: rgba(227, 244, 239, 0.74);
        color: var(--muted);
        font-size: 12px;
        font-weight: 760;
      }

      .pill--timer {
        background: rgba(33, 150, 243, 0.14);
        color: var(--exercise);
        font-weight: 800;
        font-size: 13px;
      }

      .empty {
        padding: 22px;
        border: 1px dashed var(--line-strong);
        border-radius: 8px;
        color: var(--muted);
        line-height: 1.62;
      }

      .error { color: var(--danger); }

      /* ── Today Recommendation Summary ──────────────── */
      .today-rec-wrap { margin-bottom: 28px; }

      .today-rec-header {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 14px;
      }

      .today-rec-header h2 { font-size: 22px; margin: 0; }
      .today-rec-date { font-size: 12px; color: var(--muted); flex: 0 0 auto; }

      .today-rec-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
      }

      .today-panel {
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: 0 6px 22px rgba(42, 43, 47, 0.07);
        overflow: hidden;
        min-height: 160px;
      }

      .today-panel-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 14px;
        border-bottom: 1px solid var(--line);
        background: rgba(250, 250, 247, 0.84);
      }

      .today-panel-head .label { margin: 0; }

      .today-panel-count {
        font-size: 11px;
        color: var(--muted);
        font-weight: 520;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .today-panel-body { padding: 8px 14px 12px; }

      .today-item {
        display: flex;
        align-items: start;
        gap: 8px;
        padding: 6px 0;
        border-bottom: 1px solid rgba(32, 33, 36, 0.05);
      }

      .today-item:last-child { border-bottom: 0; }

      .today-item-dot {
        width: 8px;
        height: 8px;
        border-radius: 2px;
        flex: 0 0 auto;
        margin-top: 5px;
        background: var(--color, var(--etc));
      }

      .today-item-content { min-width: 0; flex: 1; }

      .today-item-title {
        font-size: 13px;
        font-weight: 680;
        color: var(--text);
        line-height: 1.3;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .today-item-meta {
        font-size: 11px;
        color: var(--muted);
        margin-top: 2px;
        line-height: 1.4;
      }

      .today-item-reason {
        font-size: 10px;
        color: var(--soft);
        margin-top: 2px;
        line-height: 1.3;
        font-style: italic;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .today-source-badge {
        display: inline-block;
        padding: 2px 8px;
        border-radius: 999px;
        font-size: 10px;
        font-weight: 600;
        margin-bottom: 8px;
      }

      /* ── Todo 추천 검증 패널 서브섹션 ── */
      .verify-sub { margin-bottom: 10px; }
      .verify-sub-label {
        font-size: 9px;
        font-weight: 700;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.06em;
        padding: 0 14px;
        margin-bottom: 3px;
      }
      .verify-row {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 12px;
        color: var(--text);
        padding: 2px 14px;
        line-height: 1.4;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .verify-dot {
        flex: 0 0 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--color, var(--muted));
      }
      .verify-match { font-size: 12px; padding: 3px 14px; color: var(--rest); font-weight: 600; }
      .verify-nomatch { font-size: 12px; padding: 3px 14px; color: var(--meal); font-weight: 600; }
      .verify-diff-row { font-size: 11px; padding: 1px 14px; color: var(--soft); line-height: 1.5; }

      .today-item-badge {
        flex: 0 0 auto;
        padding: 2px 7px;
        border-radius: 999px;
        font-size: 10px;
        font-weight: 760;
        align-self: center;
        background: rgba(32, 33, 36, 0.06);
        color: var(--soft);
      }

      .today-empty {
        padding: 18px 0;
        color: var(--muted);
        font-size: 13px;
        text-align: center;
      }

      @media (max-width: 980px) {
        .today-rec-grid { grid-template-columns: 1fr; }
      }

      /* ── Admin Tab Navigation ───────────────────────── */
      .admin-tab-bar {
        position: sticky;
        top: 68px;
        z-index: 15;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 12px 0 14px;
        background: linear-gradient(to bottom, var(--bg-soft) 80%, transparent 100%);
        overflow-x: auto;
        scrollbar-width: none;
        margin-bottom: 28px;
        border-bottom: 1px solid var(--line);
      }

      .admin-tab-bar::-webkit-scrollbar { display: none; }

      .admin-tab {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 36px;
        padding: 0 14px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.72);
        color: var(--muted);
        cursor: pointer;
        font-size: 13px;
        font-weight: 680;
        white-space: nowrap;
        transition: background 0.12s, color 0.12s, border-color 0.12s;
      }

      .admin-tab:hover {
        color: var(--text);
        border-color: var(--line-strong);
        background: rgba(255, 255, 255, 0.9);
      }

      .admin-tab.active {
        background: linear-gradient(135deg, #7f37d6, #b15fea);
        border-color: transparent;
        color: #fff;
        box-shadow: 0 4px 14px rgba(139, 92, 246, 0.22);
      }

      .tab-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 760;
      }

      .admin-tab.active .tab-count { background: rgba(255, 255, 255, 0.25); }
      .admin-tab:not(.active) .tab-count { background: rgba(32, 33, 36, 0.08); color: var(--soft); }

      @media (max-width: 660px) {
        .admin-tab-bar { top: 0; padding: 10px 0 12px; margin-bottom: 18px; }
      }

      /* ── Button Lab ─────────────────────────────────── */
      .btn-lab-divider {
        display: flex;
        align-items: center;
        gap: 14px;
        margin: 44px 0 24px;
        color: var(--muted);
        font-size: 12px;
        font-weight: 760;
        text-transform: uppercase;
        letter-spacing: 0.06em;
      }
      .btn-lab-divider::before,
      .btn-lab-divider::after {
        flex: 1; height: 1px; content: "";
        background: var(--line-strong);
      }

      .btn-lab-badge {
        display: inline-flex; align-items: center;
        padding: 2px 8px; border-radius: 4px;
        background: rgba(202, 165, 101, 0.15);
        color: #a07c3a;
        font-size: 11px; font-weight: 760;
        text-transform: uppercase; letter-spacing: 0.04em;
      }

      .confidence-HIGH  { color: var(--rest);   font-weight: 700; }
      .confidence-MEDIUM { color: var(--meal);  font-weight: 700; }
      .confidence-LOW   { color: var(--muted);  }

      .btn-bar-wrap { overflow-x: auto; }
      .btn-bar-svg  { display: block; min-width: 420px; }

      .score-pill {
        display: inline-block;
        padding: 1px 6px;
        border-radius: 999px;
        background: rgba(202, 165, 101, 0.18);
        color: #a07c3a;
        font-size: 11px; font-weight: 760;
      }

      @media (max-width: 980px) {
        .hero,
        .grid-two,
        .grid-three {
          grid-template-columns: 1fr;
        }

        .summary-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }

      @media (max-width: 660px) {
        .page {
          width: min(100% - 28px, var(--max));
        }

        .site-header { position: static; }

        .nav,
        .chapter-head,
        .maturity-top {
          align-items: start;
          flex-direction: column;
        }

        .nav-actions {
          width: 100%;
          flex-wrap: wrap;
        }

        .status-chip {
          max-width: 142px;
          padding: 0 12px;
          font-size: 13px;
        }

        .button {
          flex: 1 1 auto;
        }

        .calendar-nav-button {
          min-width: 128px;
        }

        .hero-copy,
        .maturity-card {
          padding: 20px;
        }

        .summary-grid {
          grid-template-columns: 1fr;
        }

        .donut-wrap {
          grid-template-columns: 1fr;
        }

        .donut-stack {
          grid-template-columns: 1fr;
        }

        .donut {
          width: 132px;
        }

        .donut-stat {
          width: 148px;
        }

        .breakdown-row,
        .stacked-day,
        .stacked-header {
          grid-template-columns: 1fr;
        }

        .stacked-header {
          display: none;
        }

      }

      /* ── Admin page ──────────────────────────────────── */

      .admin-badge {
        display: inline-flex;
        align-items: center;
        padding: 2px 8px;
        border-radius: 4px;
        background: rgba(139, 92, 246, 0.13);
        color: #6f52bb;
        font-size: 11px;
        font-weight: 760;
        text-transform: uppercase;
        letter-spacing: 0.04em;
      }

      .button.admin-nav-btn {
        border-color: rgba(139, 92, 246, 0.28);
        background: rgba(238, 231, 255, 0.62);
        color: #6f52bb;
      }

      .admin-page-header {
        display: flex;
        align-items: start;
        justify-content: space-between;
        gap: 16px;
        padding: 28px 0 22px;
        border-bottom: 1px solid var(--line);
        margin-bottom: 28px;
      }

      .admin-page-header h1 {
        font-size: 28px;
        margin-bottom: 6px;
        line-height: 1.1;
      }

      .admin-page-header > div > p {
        color: var(--muted);
        font-size: 14px;
        margin: 0;
      }

      .admin-page-actions {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
        flex-wrap: wrap;
        align-items: start;
      }

      .access-denied {
        padding: 64px 32px;
        text-align: center;
        border: 1px dashed var(--line-strong);
        border-radius: 12px;
        margin-top: 64px;
        color: var(--muted);
        line-height: 1.7;
        font-size: 15px;
      }

      .access-denied strong {
        display: block;
        margin-bottom: 10px;
        color: var(--text);
        font-size: 20px;
      }

      .admin-loading {
        padding: 64px 32px;
        text-align: center;
        color: var(--muted);
        font-size: 15px;
      }

      .cluster-summary-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 20px;
      }

      .cluster-card {
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: 0 4px 18px rgba(42, 43, 47, 0.06);
      }

      .cluster-card .label { margin-bottom: 6px; }

      .cluster-card strong {
        display: block;
        font-size: 30px;
        font-weight: 780;
        line-height: 1;
        margin-bottom: 6px;
      }

      .cluster-card p {
        margin: 0;
        color: var(--muted);
        font-size: 12px;
        line-height: 1.5;
      }

      .algo-strip {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 28px;
      }

      .algo-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 10px;
        border: 1px solid var(--line);
        border-radius: 999px;
        font-size: 12px;
        color: var(--muted);
        background: rgba(255, 255, 255, 0.7);
      }

      .admin-section {
        margin-bottom: 28px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: var(--shadow);
        overflow: hidden;
      }

      .admin-section-head {
        display: flex;
        align-items: start;
        justify-content: space-between;
        gap: 16px;
        padding: 18px 18px 0;
      }

      .admin-section-head h2 {
        font-size: 17px;
        margin-bottom: 4px;
      }

      .admin-section-head p {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.5;
      }

      .admin-section-body { padding: 18px; }

      .cluster-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 14px;
      }

      .cluster-filters select,
      .cluster-filters input[type="text"] {
        min-height: 34px;
        padding: 0 10px;
        border: 1px solid var(--line);
        border-radius: 6px;
        font-size: 13px;
        background: rgba(255, 255, 255, 0.82);
        color: var(--text);
        cursor: pointer;
      }

      .cluster-filters input[type="text"] { min-width: 180px; }

      .table-wrap { overflow-x: auto; }

      .cluster-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 12px;
        white-space: nowrap;
      }

      .cluster-table th {
        padding: 7px 10px;
        text-align: left;
        border-bottom: 1px solid var(--line);
        color: var(--soft);
        font-size: 11px;
        font-weight: 760;
        text-transform: uppercase;
        background: rgba(250, 250, 247, 0.72);
        cursor: pointer;
        user-select: none;
      }

      .cluster-table th:hover { color: var(--text); }

      .cluster-table th[data-dir="asc"]::after { content: " ↑"; }
      .cluster-table th[data-dir="desc"]::after { content: " ↓"; }

      .cluster-table td {
        padding: 7px 10px;
        border-bottom: 1px solid rgba(32, 33, 36, 0.05);
        color: var(--soft);
        max-width: 240px;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .cluster-table tr:last-child td { border-bottom: 0; }

      .burden-LIGHT { color: var(--rest); font-weight: 700; }
      .burden-MEDIUM { color: var(--meal); font-weight: 700; }
      .burden-HEAVY { color: var(--danger); font-weight: 700; }
      .burden-UNKNOWN { color: var(--etc); }

      .label-cell { white-space: nowrap; padding: 4px 6px; }
      .admin-label-btn {
        font-size: 11px; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line);
        background: transparent; cursor: pointer; color: var(--muted); line-height: 1.4;
      }
      .admin-label-btn:hover { border-color: var(--text); color: var(--text); }
      .admin-label-btn.active.label-REMOVE { background: var(--danger); color: #fff; border-color: var(--danger); }
      .cluster-table tr.row-removed { opacity: 0.35; text-decoration: line-through; }

      .scatter-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 18px;
        align-items: stretch;
      }

      .scatter-panel {
        min-width: 0;
        border: 1px solid rgba(32, 33, 36, 0.08);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.54);
        padding: 14px;
      }

      .scatter-svg { width: 100%; height: 340px; display: block; }

      .scatter-legend {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        margin-top: 10px;
        font-size: 12px;
        color: var(--muted);
      }

      .scatter-legend span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
      }

      .scatter-side {
        display: grid;
        gap: 12px;
      }

      .scatter-metric {
        border: 1px solid rgba(32, 33, 36, 0.08);
        border-radius: 10px;
        padding: 12px;
        background: rgba(247, 245, 239, 0.45);
      }

      .scatter-metric .label {
        margin: 0 0 4px;
        color: var(--muted);
        font-size: 11px;
        text-transform: uppercase;
      }

      .scatter-metric strong {
        display: block;
        font-size: 22px;
        line-height: 1;
        margin-bottom: 6px;
      }

      .scatter-metric p {
        margin: 0;
        color: var(--soft);
        font-size: 12px;
        line-height: 1.45;
      }

      .ignored-list {
        display: grid;
        gap: 8px;
        margin-top: 8px;
      }

      .ignored-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
        font-size: 12px;
      }

      .ignored-row span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--soft);
      }

      .ignored-row b {
        color: var(--danger);
        font-size: 12px;
      }

      @media (max-width: 980px) {
        .cluster-summary-grid { grid-template-columns: repeat(2, 1fr); }
        .scatter-layout { grid-template-columns: 1fr; }
      }

      @media (max-width: 660px) {
        .cluster-summary-grid { grid-template-columns: 1fr; }
        .admin-page-header { flex-direction: column; align-items: start; }
        .admin-page-actions { width: 100%; }
      }

      /* ── 30-day Rhythm Averages ────────────────────────── */
      .rhythm-avg-section { margin-top: 14px; }

      .rhythm-avg-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
      }

      .rhythm-avg-card {
        padding: 16px 18px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: linear-gradient(135deg, rgba(227, 244, 239, 0.52) 0%, rgba(238, 231, 255, 0.38) 100%);
      }

      .rhythm-avg-card .label { margin-bottom: 6px; }

      .rhythm-avg-card strong {
        display: block;
        font-size: 26px;
        font-weight: 780;
        line-height: 1.1;
        margin-bottom: 5px;
      }

      .rhythm-avg-card .metric-note { font-size: 11px; }

      /* ── Donut comparison conditional ─────────────────── */
      .donut-list-row--no-cmp {
        grid-template-columns: 10px minmax(0, 1fr) auto auto;
      }

      .panel-no-cmp {
        margin: 10px 0 0;
        color: var(--muted);
        font-size: 12px;
        font-style: italic;
      }

      @media (max-width: 980px) {
        .rhythm-avg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      }

      @media (max-width: 660px) {
        .rhythm-avg-grid { grid-template-columns: 1fr; }
      }

      /* ── Distribution Tab ────────────────────────────────── */
      .dist-summary-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 10px;
        margin-bottom: 24px;
      }
      .dist-stat {
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 10px 14px;
        background: var(--surface);
      }
      .dist-stat-label {
        font-size: 10px;
        font-weight: 700;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 4px;
      }
      .dist-stat-value { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; }
      .dist-charts-grid, .dist-tables-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
        margin-bottom: 24px;
      }
      .dist-chart-section, .dist-table-section {
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 14px 16px;
        background: var(--surface);
        min-width: 0;
        overflow: hidden;
      }
      .dist-chart-label {
        font-size: 11px;
        font-weight: 700;
        color: var(--soft);
        margin-bottom: 10px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
      }
      .dist-svg { width: 100%; height: 100px; display: block; overflow: visible; }
      .dist-legend {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        margin-top: 8px;
        font-size: 11px;
        color: var(--muted);
      }
      .dist-legend i {
        display: inline-block;
        width: 10px;
        height: 10px;
        border-radius: 2px;
        vertical-align: middle;
        margin-right: 3px;
      }
      .dist-table { font-size: 11px; }
      .dist-table th { font-size: 10px; }
      .dist-table td { padding: 5px 8px; }
      @media (max-width: 980px) {
        .dist-charts-grid, .dist-tables-grid { grid-template-columns: 1fr; }
      }

      /* ── 4-graph comparison grid ─────────────────────── */
      .dist-2x2-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        margin-bottom: 20px;
      }
      .dist-comp-panel { position: relative; }
      .dist-comp-badge-used {
        display: inline-flex; align-items: center;
        padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700;
        background: rgba(92,200,138,0.15); color: var(--rest);
        border: 1px solid rgba(92,200,138,0.3);
      }
      .dist-comp-badge-lowconf {
        display: inline-flex; align-items: center;
        padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 600;
        background: rgba(255,180,0,0.1); color: var(--meal);
        border: 1px solid rgba(255,180,0,0.25);
      }
      @media (max-width: 980px) { .dist-2x2-grid { grid-template-columns: 1fr; } }

      /* ── Next Action Card ───────────────────────────────────────────── */
      .next-action-panel {
        display: flex;
        align-items: center;
        gap: 24px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        padding: 20px 24px;
        margin-bottom: 32px;
      }
      .next-action-left {
        flex: 1;
        min-width: 0;
      }
      .next-action-desc {
        margin: 0;
        font-size: 14px;
        color: var(--muted);
      }
      .next-action-lesson {
        display: flex;
        flex-direction: column;
        gap: 3px;
        padding: 12px 16px;
        border-left: 3px solid #7f37d6;
        background: rgba(139, 92, 246, 0.04);
        border-radius: 0 6px 6px 0;
        min-width: 180px;
      }
      .next-action-week {
        font-size: 11px;
        font-weight: 760;
        text-transform: uppercase;
        color: var(--muted);
      }
      .next-action-title {
        margin: 0;
        font-size: 14px;
        font-weight: 640;
        color: var(--text);
      }
      .next-action-time {
        font-size: 12px;
        color: var(--muted);
      }
      .next-action-btns {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
      }
      @media (max-width: 720px) {
        .next-action-panel {
          flex-direction: column;
          align-items: flex-start;
        }
        .next-action-btns {
          flex-wrap: wrap;
        }
      }

      /* ── Today's Flow Preview ──────────────────────────────────────── */
      .today-preview-panel {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        padding: 12px 14px 14px;
        margin-bottom: 32px;
      }
      .today-preview-panel .panel-head {
        display: block;
        padding: 0;
        margin-bottom: 10px;
      }
      .preview-t-short { display: none; }
      .today-preview-panel h3 {
        font-size: 14px;
        font-weight: 600;
        margin: 0 0 2px;
        color: var(--text);
      }
      .today-preview-panel .panel-desc { font-size: 12px; color: var(--muted); margin: 0; }
      .today-preview-panel .timeline { margin-top: 10px; border-radius: 4px; }
      .today-preview-panel .timeline-hours { margin-top: 4px; }
      .today-preview-sub {
        margin-top: 14px;
        opacity: 0.65;
      }
      .today-preview-sub-label {
        font-size: 11px;
        color: var(--muted);
        margin: 6px 0 0;
      }
      .today-flow-actions {
        display: flex;
        justify-content: flex-end;
        margin-top: 8px;
      }
      .today-flow-detail-btn {
        display: inline-flex;
        align-items: center;
        padding: 4px 12px;
        font-size: 12px;
        font-weight: 500;
        color: #5140D8;
        background: #EDE9FF;
        border: none;
        border-radius: 20px;
        cursor: pointer;
        transition: background 0.15s;
        line-height: 1.6;
      }
      .today-flow-detail-btn:hover {
        background: #DDD8FF;
      }
      .preview-cutoff-line {
        position: absolute;
        top: 0;
        bottom: 0;
        width: 2px;
        background: rgba(0,0,0,0.18);
        z-index: 2;
      }
      .preview-legend {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        align-items: center;
        font-size: 11px;
        color: var(--muted);
        flex-shrink: 0;
      }
      .preview-legend-item { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
      .preview-legend-swatch { display: inline-block; width: 14px; height: 9px; border-radius: 2px; flex-shrink: 0; }
      .preview-legend-swatch--fixed { background: var(--school); }
      .preview-legend-swatch--todo  { background: transparent; border: 2px dashed var(--todo); box-sizing: border-box; }
      .preview-legend-swatch--pred  { background: var(--sleep); }
      .preview-time-labels {
        position: relative;
        height: 14px;
        margin-bottom: 0;
        font-size: 10px;
        color: var(--muted);
        font-variant-numeric: tabular-nums;
      }
      .preview-time-labels span {
        position: absolute;
        transform: translateX(-50%);
        white-space: nowrap;
        line-height: 14px;
      }
      .preview-time-labels span:first-child { transform: none; }
      .preview-time-labels span:last-child  { transform: translateX(-100%); }
      .preview-ticks {
        height: 6px;
        background-image: linear-gradient(90deg, rgba(32,33,36,0.25) 1px, transparent 1px);
        background-size: 12.5% 100%;
        border-right: 1px solid rgba(32,33,36,0.25);
        margin-bottom: 2px;
      }
      .preview-bar-wrap {
        position: relative;
        width: 100%;
        height: 52px;
        background-color: rgba(32, 33, 36, 0.05);
        background-image: linear-gradient(90deg, rgba(32,33,36,0.15) 1px, transparent 1px);
        background-size: 8.3333% 100%;
        border-radius: 4px;
        overflow: hidden;
      }
      .preview-blk {
        position: absolute;
        top: 3px;
        bottom: 3px;
        border-radius: 3px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
      }
      .preview-blk--fixed { background: var(--color); }
      .preview-blk--todo  { background: transparent; border: 2px dashed var(--color); box-sizing: border-box; }
      .preview-blk--pred  { background: var(--color); }
      .preview-blk-lbl {
        font-size: 10px;
        font-weight: 600;
        color: rgba(255,255,255,0.92);
        padding: 0 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        pointer-events: none;
        flex: 1;
        min-width: 0;
      }
      .preview-blk--todo .preview-blk-lbl { color: var(--color); }
      .preview-stats-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin-top: 12px;
      }
      .preview-stat-card {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        background: rgba(255,255,255,0.55);
        border: 1px solid var(--line);
        border-radius: 6px;
      }
      .preview-stat-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color); flex-shrink: 0; }
      .preview-stat-name { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 1px; }
      .preview-stat-val  { font-size: 11px; color: var(--muted); }

      .routine-check-panel {
        margin-top: 16px;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: linear-gradient(135deg, rgba(255,255,255,0.74), rgba(238,231,255,0.38));
      }
      .routine-check-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
      }
      .routine-check-head .label { margin-bottom: 4px; }
      .routine-check-head h4 {
        margin: 0;
        color: var(--text);
        font-size: 18px;
        line-height: 1.3;
      }
      .routine-progress-count {
        color: #6f52bb;
        font-size: 20px;
        font-weight: 780;
      }
      .routine-progress-track {
        height: 6px;
        margin: 12px 0 14px;
        overflow: hidden;
        border-radius: 999px;
        background: rgba(32,33,36,0.07);
      }
      .routine-progress-track span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, #7f37d6, var(--rest));
      }
      .routine-check-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }
      .routine-check-row {
        display: grid;
        grid-template-columns: 24px 8px minmax(0, 1fr) auto;
        min-height: 54px;
        align-items: center;
        gap: 9px;
        padding: 9px 10px;
        border: 1px solid var(--line);
        border-radius: 7px;
        background: rgba(255,255,255,0.62);
      }
      .routine-check-icon {
        display: grid;
        width: 22px;
        height: 22px;
        place-items: center;
        border: 1px solid var(--line-strong);
        border-radius: 50%;
        color: transparent;
        font-size: 13px;
        font-weight: 800;
      }
      .routine-check-row--completed .routine-check-icon {
        border-color: transparent;
        background: var(--rest);
        color: #fff;
      }
      .routine-check-row--skipped .routine-check-icon {
        background: rgba(32,33,36,0.07);
        color: var(--muted);
      }
      .routine-check-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--color);
      }
      .routine-check-copy { min-width: 0; }
      .routine-check-copy strong,
      .routine-check-copy small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .routine-check-copy strong {
        color: var(--text);
        font-size: 13px;
        font-weight: 680;
      }
      .routine-check-copy small {
        margin-top: 2px;
        color: var(--muted);
        font-size: 11px;
      }
      .routine-status {
        padding: 4px 7px;
        border-radius: 999px;
        background: rgba(32,33,36,0.05);
        color: var(--muted);
        font-size: 10px;
        font-weight: 720;
        white-space: nowrap;
      }
      .routine-check-row--completed .routine-status {
        background: rgba(0,188,212,0.1);
        color: #087f8f;
      }
      .routine-check-row--active .routine-status {
        background: rgba(94,106,210,0.1);
        color: #4c58b8;
      }
      .routine-check-row--incomplete .routine-status {
        background: rgba(199,111,111,0.1);
        color: #a65353;
      }
      .routine-more-note {
        margin: 10px 0 0;
        color: var(--muted);
        font-size: 11px;
      }
      .routine-detail-button {
        display: flex;
        min-height: 42px;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 14px;
        padding: 0 14px;
        border: 1px solid rgba(127,55,214,0.16);
        border-radius: 7px;
        background: linear-gradient(135deg, rgba(127,55,214,0.1), rgba(0,188,212,0.08));
        color: #6540ae;
        font-size: 13px;
        font-weight: 720;
        text-decoration: none;
        transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
      }
      .routine-detail-button:hover {
        border-color: rgba(127,55,214,0.28);
        background: linear-gradient(135deg, rgba(127,55,214,0.14), rgba(0,188,212,0.11));
        transform: translateY(-1px);
      }
      /* ── Flowlog Analyst ──────────────────────────────────────────── */

      .analyst-section { margin-top: 28px; }

      .analyst-badge {
        background: rgba(16, 163, 127, 0.13);
        color: #0d8a6a;
      }

      .analyst-input-wrap {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 18px;
      }

      .analyst-textarea {
        width: 100%;
        box-sizing: border-box;
        padding: 10px 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--bg);
        color: var(--text);
        font-family: inherit;
        font-size: 14px;
        resize: vertical;
        line-height: 1.5;
      }
      .analyst-textarea:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.12);
      }

      .analyst-btn-row {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
      }

      .analyst-output,
      .analyst-chart-area {
        margin-top: 18px;
      }

      .analyst-result-card {
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        padding: 18px;
        margin-bottom: 14px;
      }

      .analyst-result-title {
        font-size: 16px;
        font-weight: 700;
        margin: 0 0 8px;
      }

      .analyst-summary {
        margin: 0 0 12px;
        color: var(--text);
        font-size: 14px;
        line-height: 1.6;
      }

      .analyst-section-label {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--muted);
        margin: 14px 0 6px;
      }

      .analyst-list {
        margin: 0 0 8px;
        padding-left: 20px;
        font-size: 14px;
        line-height: 1.65;
      }

      .analyst-list--insight li { color: var(--text); }

      .analyst-list--caution li {
        color: #9a6800;
      }

      .analyst-chart-title {
        font-size: 13px;
        font-weight: 600;
        color: var(--muted);
        margin: 0 0 10px;
      }

      .analyst-chart-wrap {
        overflow-x: auto;
        margin-bottom: 10px;
      }

      .analyst-chart-svg {
        display: block;
        width: 100%;
        max-width: 480px;
        height: auto;
        color: var(--text);
      }

      .analyst-rec-card {
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 12px 14px;
        margin-bottom: 10px;
        background: var(--bg);
      }

      .analyst-rec-title-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
      }

      .analyst-rec-title {
        font-size: 14px;
        font-weight: 700;
      }

      .analyst-chip {
        display: inline-flex;
        align-items: center;
        padding: 1px 7px;
        border-radius: 999px;
        background: rgba(94, 106, 210, 0.1);
        color: #3e4aa8;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
      }

      .analyst-rec-why {
        font-size: 13px;
        color: var(--text);
        margin: 0 0 6px;
        line-height: 1.5;
      }

      .analyst-rec-meta,
      .analyst-rec-fields {
        font-size: 11px;
        color: var(--muted);
        margin: 0 0 4px;
        font-family: monospace;
      }

      .analyst-report-section {
        border-left: 3px solid var(--line-strong);
        padding-left: 12px;
        margin-bottom: 14px;
      }

      .analyst-report-heading {
        font-size: 13px;
        font-weight: 700;
        margin: 0 0 4px;
        color: var(--text);
      }

      .analyst-report-body {
        font-size: 14px;
        color: var(--muted);
        margin: 0;
        line-height: 1.65;
      }

      .analyst-mock-note {
        font-size: 11px;
        color: var(--muted);
        background: rgba(255, 165, 0, 0.07);
        border: 1px solid rgba(255, 165, 0, 0.25);
        border-radius: 4px;
        padding: 5px 10px;
        margin: 0 0 12px;
      }

      .analyst-loading {
        font-size: 14px;
        color: var(--muted);
        padding: 18px 0;
        text-align: center;
      }

      .analyst-error {
        font-size: 13px;
        color: var(--danger, #c0392b);
        padding: 10px 14px;
        border: 1px solid rgba(192, 57, 43, 0.25);
        border-radius: 6px;
        background: rgba(192, 57, 43, 0.05);
      }

      .analyst-unavail {
        font-size: 13px;
        color: var(--muted);
        padding: 10px 14px;
        border: 1px dashed var(--line-strong);
        border-radius: 6px;
        background: transparent;
      }

      .analyst-chat-panel {
        margin-top: 22px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        overflow: hidden;
      }

      .analyst-chat-head {
        display: flex;
        justify-content: space-between;
        align-items: start;
        gap: 12px;
        padding: 14px 16px;
        border-bottom: 1px solid var(--line);
      }

      .analyst-chat-head h3 {
        margin: 0;
        font-size: 15px;
        font-weight: 760;
      }

      .analyst-chat-head p {
        margin: 4px 0 0;
        color: var(--muted);
        font-size: 12px;
        line-height: 1.45;
      }

      .analyst-chat-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
      }

      .analyst-chat-shell {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        min-height: 430px;
      }

      .analyst-chat-sidebar {
        border-right: 1px solid var(--line);
        background: var(--bg);
        padding: 12px;
      }

      .analyst-chat-sidebar-title {
        color: var(--muted);
        font-size: 11px;
        font-weight: 760;
        margin: 0 0 8px;
      }

      .analyst-chat-sessions {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }

      .analyst-chat-session {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 3px;
        width: 100%;
        min-height: 48px;
        padding: 8px 10px;
        border: 1px solid transparent;
        border-radius: 8px;
        background: transparent;
        color: var(--text);
        cursor: pointer;
        text-align: left;
      }

      .analyst-chat-session:hover {
        background: rgba(32, 33, 36, 0.04);
      }

      .analyst-chat-session.active {
        border-color: rgba(94, 106, 210, 0.25);
        background: rgba(94, 106, 210, 0.09);
      }

      .analyst-chat-session-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
        font-weight: 680;
      }

      .analyst-chat-session-meta {
        color: var(--muted);
        font-size: 11px;
      }

      .analyst-chat-main {
        min-width: 0;
        display: flex;
        flex-direction: column;
      }

      .analyst-chat-log {
        display: flex;
        flex-direction: column;
        gap: 12px;
        flex: 1;
        min-height: 320px;
        max-height: 520px;
        overflow-y: auto;
        padding: 16px;
        background: var(--bg-soft);
      }

      .analyst-chat-message {
        display: flex;
        flex-direction: column;
        gap: 4px;
        max-width: min(82%, 680px);
      }

      .analyst-chat-message--user {
        align-self: flex-end;
        align-items: flex-end;
      }

      .analyst-chat-message--assistant {
        align-self: flex-start;
        align-items: flex-start;
      }

      .analyst-chat-role {
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
      }

      .analyst-chat-bubble {
        white-space: pre-wrap;
        overflow-wrap: anywhere;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 10px 12px;
        color: var(--text);
        font-size: 13px;
        line-height: 1.6;
        background: var(--bg);
      }

      .analyst-chat-message--user .analyst-chat-bubble {
        border-color: rgba(94, 106, 210, 0.25);
        background: rgba(94, 106, 210, 0.1);
      }

      .analyst-chat-compose {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        align-items: end;
        padding: 14px 16px;
        border-top: 1px solid var(--line);
      }

      .analyst-chat-input {
        width: 100%;
        min-height: 52px;
        box-sizing: border-box;
        padding: 10px 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--bg);
        color: var(--text);
        font-family: inherit;
        font-size: 14px;
        line-height: 1.45;
        resize: vertical;
      }

      .analyst-chat-input:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.12);
      }

      @media (max-width: 660px) {
        .analyst-chat-head,
        .analyst-chat-compose {
          grid-template-columns: 1fr;
          flex-direction: column;
          align-items: stretch;
        }

        .analyst-chat-actions {
          justify-content: stretch;
        }

        .analyst-chat-actions .button {
          flex: 1 1 auto;
        }

        .analyst-chat-shell {
          grid-template-columns: 1fr;
        }

        .analyst-chat-sidebar {
          border-right: 0;
          border-bottom: 1px solid var(--line);
        }

        .analyst-chat-sessions {
          flex-direction: row;
          overflow-x: auto;
          padding-bottom: 2px;
        }

        .analyst-chat-session {
          min-width: 180px;
        }

        .analyst-chat-message {
          max-width: 100%;
        }
      }

      .preview-note { font-size: 11px; color: var(--muted); margin: 10px 0 0; }
      .preview-total {
        font-size: 11px;
        color: var(--muted);
        text-align: center;
        margin-top: 8px;
        padding: 5px 10px;
        background: rgba(32,33,36,0.04);
        border: 1px solid var(--line);
        border-radius: 20px;
      }
      .preview-content { display: flex; gap: 24px; align-items: flex-start; }
      .preview-timeline-col { flex: 1; min-width: 0; }
      .preview-donut-col    { flex-shrink: 0; }
      @media (max-width: 660px) {
        .preview-content { flex-direction: column; }
        .preview-stats-row { grid-template-columns: repeat(2, 1fr); }
        .routine-check-list { grid-template-columns: 1fr; }
        .preview-blk-lbl { display: none; }
        .preview-t-full  { display: none; }
        .preview-t-short { display: inline; }
      }
