:root {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: #172033; background: #f7f7fb; font-synthesis: none;
  --ink: #172033; --muted: #62687b; --purple: #6740a5; --deep-purple: #543389;
  --lavender: #f0eafd; --lavender-border: #ded3f4; --mint: #eaf8f1; --mint-ink: #245b45;
  --stroke: #e4e3ec; --white: #fff; --shadow: 0 10px 34px rgba(38, 30, 60, .055);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button:not([disabled]), select:not([disabled]) { cursor: pointer; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #6740a5; outline-offset: 3px; }
h1,h2,h3,p { margin: 0; }
p { line-height: 1.65; }
svg { display: block; width: 20px; height: 20px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 10; top: 10px; left: 10px; transform: translateY(-200%); padding: 10px 14px; background: var(--white); border-radius: 10px; }
.skip-link:focus { transform: none; }
.first-load { padding: 32px; color: var(--muted); }
.app-shell { min-height: 100dvh; }
.side-brand { display: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 14px; padding: 12px clamp(16px, 4vw, 42px); border-bottom: 1px solid var(--stroke); background: var(--white); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: var(--deep-purple); background: var(--lavender); }
.brand-icon svg { width: 22px; height: 22px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.04rem; line-height: 1.35; }
.brand small { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.top-context { display: none; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.account { position: relative; }
.account summary { cursor: pointer; list-style: none; }
.account summary::-webkit-details-marker { display: none; }
.account-popover { position: absolute; z-index: 3; top: calc(100% + 8px); right: 0; width: min(310px, calc(100vw - 34px)); padding: 16px; border: 1px solid var(--stroke); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }
.account-popover label { margin-top: 12px; }
.account-popover p { color: var(--muted); font-size: .83rem; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); font-size: .86rem; font-weight: 800; }
.icon-button, .button { min-height: 44px; border: 1px solid var(--stroke); border-radius: 12px; background: var(--white); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; font-weight: 700; text-align: center; }
.icon-button { min-width: 44px; }
.button.primary { background: var(--purple); border-color: var(--purple); color: white; }
.button.primary:hover { background: var(--deep-purple); }
.button:hover, .icon-button:hover { border-color: #b5a2d9; }
.button[disabled] { cursor: default; background: #f6f5f8; color: #626176; border-color: #e4e2ea; }
.message-button { position: relative; }
.message-button .counter { position: absolute; top: -5px; right: -5px; border: 2px solid white; min-width: 21px; border-radius: 12px; padding: 1px 3px; font-size: .66rem; color: white; background: var(--purple); }
.account-name, .message-text { display: none; }
.nav { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--stroke); background: var(--white); padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); }
.nav-list { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 3px; margin: 0; padding: 0; list-style: none; }
.nav-link { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; min-height: 56px; color: var(--muted); border-radius: 13px; padding: 4px 2px; font-size: .79rem; font-weight: 700; }
.nav-link:hover { background: #f7f4fc; color: var(--deep-purple); }
.nav-link[aria-current="page"] { color: var(--deep-purple); background: var(--lavender); }
.side-note { display: none; }
.main { max-width: 1250px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 45px) calc(92px + env(safe-area-inset-bottom)); }
.main:focus { outline: none; }
.page-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.eyebrow { display: block; color: var(--deep-purple); font-weight: 750; font-size: .8rem; margin-bottom: 5px; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.25; letter-spacing: -.035em; }
h2 { font-size: 1.19rem; line-height: 1.35; }
h3 { font-size: 1rem; }
.description { color: var(--muted); margin-top: 6px; font-size: .94rem; }
.card { min-width: 0; border-radius: 24px; border: 1px solid var(--stroke); background: var(--white); padding: clamp(16px, 3vw, 26px); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.hero { margin-bottom: 18px; background: #f0eafd; border-color: var(--lavender-border); display: grid; gap: 18px; }
.hero .hero-title { font-size: clamp(1.32rem, 4vw, 2rem); margin: 7px 0 5px; overflow-wrap: anywhere; }
.hero .tag { background: #fff9; color: var(--deep-purple); }
.hero-actions { align-self: end; }
.hero-actions .description { margin-top: 5px; font-size: .78rem; }
.tag { display: inline-flex; min-height: 26px; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; color: var(--deep-purple); background: var(--lavender); font-size: .75rem; font-weight: 750; }
.tag.mint { background: var(--mint); color: var(--mint-ink); }
.tag.neutral { background: #efeff4; color: #53576b; }
.tag svg { width: 14px; height: 14px; }
.dashboard-grid { display: grid; gap: 16px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 13px; }
.section-heading .button { padding-inline: 10px; font-size: .86rem; }
.list { list-style: none; padding: 0; margin: 0; }
.row, .todo { display: flex; align-items: center; min-height: 66px; gap: 12px; padding: 10px 0; border-top: 1px solid var(--stroke); }
.row:first-child, .todo:first-child { border-top: 0; }
.row-text { min-width: 0; flex: 1; }
.row-text strong, .row-text small { display: block; overflow-wrap: anywhere; }
.row-text small { margin-top: 4px; font-size: .82rem; color: var(--muted); }
.time-label { min-width: 50px; color: var(--deep-purple); font-size: .89rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.todo { width: 100%; }
.todo .metric { color: var(--deep-purple); font-size: 1.14rem; font-weight: 800; }
.todo-arrow { color: var(--muted); width: 17px; height: 17px; }
.small-icon { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--deep-purple); background: var(--lavender); }
.small-icon.mint { color: var(--mint-ink); background: var(--mint); }
.empty { padding: 14px 0; color: var(--muted); }
.empty p + .button { margin-top: 12px; }
.switcher { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.switcher a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 13px; color: var(--muted); border-radius: 12px; font-weight: 700; }
.switcher a[aria-current="page"], .switcher a:hover { background: var(--lavender); color: var(--deep-purple); }
.day-group + .day-group { margin-top: 15px; }
.day-group > h3 { margin: 10px 0 3px; padding: 8px 11px; border-radius: 10px; background: #f7f6fa; color: var(--deep-purple); font-size: .84rem; }
.placeholder { display: grid; justify-items: start; gap: 10px; }
.placeholder p { max-width: 50ch; color: var(--muted); }
.error { color: #963344; }
.notice { margin: 0 0 16px; padding: 11px 13px; border-radius: 12px; background: var(--mint); color: var(--mint-ink); }
dialog { width: min(520px, calc(100% - 26px)); max-height: calc(100% - 26px); border: 1px solid var(--stroke); border-radius: 22px; padding: clamp(16px, 4vw, 24px); color: var(--ink); }
dialog::backdrop { background: rgb(23 32 51 / 42%); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
form { display: grid; gap: 13px; }
label { display: grid; min-width: 0; gap: 6px; font-weight: 700; font-size: .91rem; }
input, select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #d5d0e1; border-radius: 10px; background: var(--white); color: var(--ink); }
.form-grid { display: grid; gap: 12px; }
.form-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 8px; }
.form-error:empty { display: none; }
@media (min-width: 550px) {
  .message-text { display: inline; }
  .hero { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
  .form-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
}
@media (min-width: 760px) {
  .dashboard-grid { grid-template-columns: minmax(0,1.32fr) minmax(0,1fr); }
  .account-name { display: inline; }
}
@media (min-width: 960px) {
  .app-shell { display: grid; grid-template: "nav top" 72px "nav content" 1fr / 216px minmax(0,1fr); }
  .topbar { grid-area: top; }
  .topbar .brand { display: none; }
  .top-context { display: block; color: var(--muted); font-size: .9rem; }
  .nav { position: sticky; grid-area: nav; display: flex; flex-direction: column; top: 0; bottom: auto; align-self: start; height: 100dvh; padding: 22px 14px 16px; border-top: 0; border-right: 1px solid var(--stroke); }
  .side-brand { display: block; margin: 0 6px 24px; }
  .nav-list { display: flex; flex-direction: column; gap: 5px; }
  .nav-link { flex-direction: row; justify-content: start; gap: 11px; min-height: 49px; padding: 9px 13px; font-size: .92rem; }
  .side-note { display: grid; gap: 4px; margin-top: auto; padding: 12px 10px; color: var(--muted); font-size: .78rem; }
  .main { grid-area: content; width: 100%; padding-bottom: 46px; }
}
@media (max-width: 360px) {
  .topbar { gap: 8px; }
  .account-toggle { padding-inline: 5px; }
  .row, .todo { gap: 8px; }
}

.demo-banner{grid-column:1/-1;padding:8px 16px;text-align:center;background:#fff3cd;color:#4d3d18;font-size:.8125rem;line-height:1.5}
@media (min-width: 960px) {
  .app-shell:has(.demo-banner) { grid-template: "notice notice" auto "nav top" 72px "nav content" 1fr / 216px minmax(0, 1fr); }
  .demo-banner { grid-area: notice; }
}
