:root {
  --canvas: #f5f8fc;
  --surface: #ffffff;
  --surface-2: #f3f5f7;
  --surface-3: #eef3f7;
  --border: #e1e7ec;
  --text: #24303a;
  --text-secondary: #687782;
  --accent: #2783de;
  --accent-soft: #e5f2fc;
  --ok: #46a171;
  --warn: #d5803b;
  --danger: #e56458;
  --section-accent: #4fb9c9;
  --shadow: 0 1px 2px rgba(20,35,50,.05), 0 8px 24px rgba(39,83,120,.08);
}

[data-theme="dark"] {
  --canvas: #191919;
  --surface: #202020;
  --surface-2: #292927;
  --surface-3: #323230;
  --border: rgba(255,255,255,.16);
  --text: #ffffff;
  --text-secondary: rgba(255,255,255,.65);
  --accent: #5e9fe8;
  --accent-soft: rgba(94,159,232,.14);
  --ok: #72bc8f;
  --warn: #de9255;
  --danger: #e97366;
  --section-accent: #4fb9c9;
  --shadow: 0 1px 2px rgba(0,0,0,.28), 0 8px 24px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body {
  background: radial-gradient(circle at top left, rgba(79,185,201,.14), transparent 34%), var(--canvas);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
button { font: inherit; }
.hero { background: linear-gradient(135deg, #206fbd, #4fb9c9); color: #fff; padding: 20px 16px 46px; }
.hero-inner, .shell { width: 100%; max-width: 760px; margin: 0 auto; }
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 2px; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
h1 { margin: 0; font-size: clamp(24px, 7vw, 34px); line-height: 1.08; letter-spacing: -0.04em; }
.updated-label { margin: 6px 0 0; color: rgba(255,255,255,.84); font-size: 14px; }
.actions { display: flex; gap: 8px; flex-shrink: 0; }
.icon-btn { width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.38); border-radius: 12px; background: rgba(255,255,255,.16); color: #fff; cursor: pointer; }
.icon-btn:focus-visible { outline: 3px solid rgba(255,255,255,.7); outline-offset: 2px; }
.icon-btn.loading { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shell { padding: 0 16px 40px; }
.error-banner { display: none; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(229,100,88,.12); color: var(--danger); border: 1px solid rgba(229,100,88,.28); }
.error-banner.show { display: block; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: -30px; position: relative; z-index: 2; }
.summary-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 15px 12px; text-align: center; box-shadow: var(--shadow); min-width: 0; }
.summary-number { font-size: 23px; font-weight: 850; color: var(--accent); letter-spacing: -.02em; }
.summary-label { margin-top: 2px; font-size: 12px; color: var(--text-secondary); }
.tabs-section { margin-top: 20px; }
.tabs, .day-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.day-tabs { margin-top: 12px; flex-wrap: wrap; overflow-x: visible; }
.tab, .day-tab { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: rgba(255,255,255,.74); color: var(--text); border-radius: 999px; padding: 9px 13px; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 2px rgba(20,35,50,.03); }
[data-theme="dark"] .tab, [data-theme="dark"] .day-tab { background: var(--surface); }
.day-tab { flex-direction: column; align-items: flex-start; gap: 1px; border-radius: 14px; min-height: 54px; }
.day-tab > span:first-of-type { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.day-tab small { color: var(--text-secondary); font-size: 11px; }
.tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.day-tab.active { background: var(--accent-soft); color: var(--accent); border-color: rgba(39,131,222,.35); }
.day-tab.active small { color: var(--text-secondary); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.panel { margin-top: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 2px 2px 14px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.panel-kicker { margin: 0 0 2px; color: var(--text-secondary); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.panel h2 { margin: 0; font-size: 22px; line-height: 1.15; letter-spacing: -.03em; }
.panel-summary { text-align: right; color: var(--text); font-size: 13px; font-weight: 700; white-space: nowrap; }
.panel-summary span { color: var(--text-secondary); font-weight: 600; }
.record-card { position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface-3)); border: 1px solid var(--border); border-radius: 14px; padding: 13px 13px 13px 15px; margin-top: 10px; overflow: hidden; }
.record-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--section-accent); }
.record-time { color: var(--text-secondary); font-size: 13px; font-weight: 650; margin-bottom: 10px; text-align: right; }
.section-list { display: grid; gap: 8px; }
.section-card { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.section-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(79,185,201,.13); font-size: 17px; }
.section-name { color: var(--text); font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.section-value { color: var(--text-secondary); font-size: 13px; margin-top: 1px; }
.empty-note { color: var(--text-secondary); padding: 6px 0; }
.empty-section { margin: 0; color: var(--text-secondary); font-size: 13px; padding: 4px 0; }
.skeleton { height: 130px; border-radius: 12px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (max-width: 460px) { .hero { padding-top: 18px; } .hero-inner { align-items: flex-start; } .summary-grid { gap: 10px; } .summary-card { padding: 12px 8px; } .summary-number { font-size: 20px; } .summary-label { font-size: 11px; } .panel-header { align-items: flex-start; } .panel h2 { font-size: 20px; } .panel-summary { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }
