@font-face{font-family:"Source Han Sans SC Local";src:url("./assets/fonts/SourceHanSansSC-VF.woff2") format("woff2-variations");font-style:normal;font-weight:250 900;font-display:swap}
:root {
  color-scheme: light; --ink:#1b1a17; --muted:#746f66; --paper:#f5f0e6; --surface:#fffdf7;
  --line:rgba(27,26,23,.11); --primary:#1b1a17; --accent:#f2b84b; --action-mint:#a9ce91; --action-mint-soft:#dcebd4; --action-coral:#e8bbc3; --action-cream:#f5e6c8; --safe-top:env(safe-area-inset-top,0px);
  --font-ui:"Source Han Sans SC Local","Source Han Sans SC","Noto Sans CJK SC",system-ui,-apple-system,sans-serif;
  --font-display:var(--font-ui);
  --font-latin:var(--font-ui);
  --font-numeric:var(--font-ui);
  font-family:var(--font-ui); font-synthesis:weight; font-variant-numeric:proportional-nums; text-rendering:optimizeLegibility; -webkit-font-smoothing:antialiased;
}

/* Same-day index: real reminder-spectrum colors, visually separated from M.D. */
.date-cluster i{--dot-color:#8f8c84;border-color:var(--dot-color)}
.date-cluster i[data-level="due"]{--dot-color:#ad4438}
.date-cluster i[data-level="urgent"]{--dot-color:#eb7564}
.date-cluster i[data-level="attention"]{--dot-color:#e4ae3d}
.date-cluster i[data-level="early"]{--dot-color:#6aa9dc}
.date-cluster i[data-level="normal"]{--dot-color:#69a979}
.date-cluster i[data-level="future"]{--dot-color:#a6a69f}
.date-cluster i[data-level]{border-color:var(--dot-color)}
.date-cluster i[data-level].is-self{background:var(--dot-color);border-color:var(--dot-color)}
@media(max-width:760px){.date-cluster{margin-bottom:6px}}
*{box-sizing:border-box}[hidden]{display:none!important}html{background:var(--paper)}
body{min-width:320px;min-height:100vh;margin:0;padding-top:var(--safe-top);color:var(--ink);background:radial-gradient(circle at 8% 6%,rgba(242,184,75,.13),transparent 22%),var(--paper)}
button,input{font:inherit}button{color:inherit}button:focus-visible,input:focus-visible{outline:3px solid rgba(27,26,23,.22);outline-offset:2px}
.device-status-bar{display:none}html.phone-preview{--safe-top:44px}html.phone-preview .device-status-bar{position:fixed;inset:0 0 auto;z-index:20;height:44px;padding:0 18px 0 22px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;color:var(--ink);background:var(--paper);font-size:12px;font-weight:850}
.dynamic-island{width:88px;height:25px;border-radius:99px;background:#111}.device-indicators{justify-self:end;display:flex;align-items:center;gap:5px}.device-indicators svg{width:16px;height:11px;fill:currentColor;stroke:currentColor;stroke-width:1.4}.device-indicators svg:nth-child(2){fill:none}.battery{width:20px;height:10px;padding:1px;border:1px solid currentColor;border-radius:3px;position:relative}.battery::after{content:"";position:absolute;right:-3px;top:3px;width:2px;height:4px;background:currentColor;opacity:.5}.battery i{display:block;width:78%;height:100%;background:currentColor}
.app-shell{width:min(1180px,calc(100% - 40px));min-height:100vh;margin:0 auto}.topbar{height:84px;display:flex;align-items:center;justify-content:space-between}.brand{display:inline-flex;align-items:center;gap:12px;color:inherit;text-decoration:none}.brand-mark{width:42px;height:42px;border-radius:15px;display:grid;place-items:center;color:var(--primary);background:var(--surface);box-shadow:0 10px 28px rgba(27,26,23,.08)}.brand-mark svg{width:24px;fill:none;stroke:currentColor;stroke-width:1.8}.brand-copy{display:grid;gap:2px}.brand-copy small{color:var(--muted);font:800 8px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.14em}.brand-copy strong{font-size:19px;line-height:1.05}
.button{min-height:48px;padding:0 20px;border:0;border-radius:16px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-weight:800;cursor:pointer}.button-primary{color:#fff;background:var(--primary);box-shadow:0 10px 26px rgba(27,26,23,.15)}.button-secondary{border:1px solid var(--line);background:var(--surface)}.button-danger{color:#fff;background:#a83b30}.button-danger-ghost{color:#9f392e;background:#f8e8e2}.delete-icon-button{width:48px;padding:0;border:1px solid rgba(159,57,46,.16);border-radius:15px;font-size:25px;font-weight:400;line-height:1}.button-compact{min-height:44px;border-radius:99px;padding:0 18px}
.hero{padding:56px 0 42px;display:grid;grid-template-columns:1fr 420px;gap:64px;align-items:end}.eyebrow{margin:0 0 12px;color:var(--muted);font-size:11px;font-weight:850;letter-spacing:.14em;text-transform:uppercase}.hero-copy h1{margin:0;font-family:var(--font-display);font-size:clamp(54px,6vw,86px);line-height:.98;font-weight:700;letter-spacing:.025em}.hero-description{max-width:480px;margin:22px 0 0;color:var(--muted);line-height:1.75}
.hero-summary{min-height:250px;padding:30px;border-radius:34px;display:grid;grid-template-columns:1fr auto;align-items:center;position:relative;overflow:hidden;color:#fff;background:var(--primary);box-shadow:0 28px 60px rgba(27,26,23,.16)}.hero-summary::after{content:"";position:absolute;width:180px;height:180px;right:-70px;top:-76px;border:1px solid rgba(242,184,75,.35);border-radius:50%;box-shadow:0 0 0 32px rgba(242,184,75,.06),0 0 0 64px rgba(242,184,75,.025)}.summary-copy{min-width:0;z-index:1}.summary-kicker{display:block;max-width:230px;color:#c8c5be;font-size:11px;font-weight:800;letter-spacing:.04em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.summary-main{margin-top:16px;display:flex;align-items:flex-end;gap:10px}.summary-number{color:var(--accent);font-size:84px;line-height:.78;letter-spacing:-.08em}.summary-unit{padding-bottom:7px;font-size:13px;font-weight:750}.summary-copy p{margin:22px 0 0;color:#c8c5be;font-size:12px}.summary-gauge{--gauge:0%;width:112px;height:112px;padding:10px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--accent) var(--gauge),rgba(255,255,255,.12) 0);z-index:1}.summary-gauge::before{content:"";grid-area:1/1;width:88px;height:88px;border-radius:50%;background:var(--primary)}.summary-gauge span{grid-area:1/1;z-index:1;display:grid;text-align:center}.summary-gauge b{font-size:28px;line-height:1}.summary-gauge small{margin-top:4px;color:#c8c5be;font-size:9px}
.board{padding:38px 0 54px;border-top:1px solid var(--line)}.section-heading{margin-bottom:18px;display:flex;align-items:flex-end;justify-content:space-between}.section-heading h2{margin:0;font-family:var(--font-display);font-size:38px;font-weight:700;letter-spacing:.025em}.count-pill{padding:7px 13px;border-radius:99px;color:var(--muted);background:var(--surface);font-size:12px;font-weight:800;box-shadow:0 7px 20px rgba(27,26,23,.05)}
.period-chips{display:flex;gap:8px;margin-bottom:18px}.period-chip{height:36px;padding:0 14px;border:0;border-radius:99px;display:inline-flex;align-items:center;gap:7px;color:var(--muted);background:var(--surface);font-size:11px;font-weight:800;cursor:pointer}.period-chip svg{width:14px;fill:none;stroke:currentColor;stroke-width:1.35}.period-chip.is-current{color:#fff;background:var(--primary)}.period-chip.is-current svg{color:var(--accent)}
.subscription-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.subscription-card{--level-color:#69a979;min-width:0;min-height:150px;padding:16px;border:0;border-radius:24px;display:flex;flex-direction:column;position:relative;overflow:hidden;color:var(--ink);text-align:left;background:var(--surface);box-shadow:0 14px 34px rgba(27,26,23,.07);cursor:pointer}.subscription-card::after{content:"";position:absolute;width:76px;height:76px;right:-34px;top:-34px;border-radius:50%;background:color-mix(in srgb,var(--level-color) 12%,transparent)}.level-normal{--level-color:#69a979}.level-early{--level-color:#6aa9dc}.level-attention{--level-color:#e4ae3d}.level-urgent{--level-color:#eb7564}.level-due{--level-color:#ad4438}.level-future{--level-color:#a6a69f}.card-topline{display:flex;align-items:center;justify-content:space-between}.card-identity{display:inline-flex;align-items:center;gap:8px}.subscription-icon{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;color:color-mix(in srgb,var(--level-color) 76%,#222);background:color-mix(in srgb,var(--level-color) 15%,white)}.subscription-icon svg{width:19px;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}.card-code{color:var(--muted);font:800 10px ui-monospace,SFMono-Regular,Consolas,monospace}.card-period{padding:5px 8px;border-radius:99px;color:var(--muted);background:#f3eee5;font-size:9px;font-weight:800}.subscription-card h3{margin:16px 0 7px;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-expiry{margin:auto 0 10px;display:grid;gap:3px}.card-expiry strong{font:800 11px ui-monospace,SFMono-Regular,Consolas,monospace}.card-expiry span{color:var(--muted);font-size:10px}.card-progress{height:4px;border-radius:99px;overflow:hidden;background:#eee8dc}.card-progress i{display:block;height:100%;border-radius:inherit;background:var(--level-color)}
.empty-state{min-height:300px;padding:36px;border-radius:30px;display:grid;place-items:center;align-content:center;text-align:center;background:var(--surface);box-shadow:0 18px 44px rgba(27,26,23,.06)}.empty-visual{width:126px;height:82px;margin-bottom:20px;position:relative}.empty-visual::before,.empty-visual::after{content:"";position:absolute;border-radius:50%}.empty-visual::before{width:82px;height:82px;left:22px;background:#f4d777}.empty-visual::after{width:52px;height:52px;left:0;bottom:0;background:#b9ccec;mix-blend-mode:multiply}.empty-visual span{position:absolute;z-index:1;left:43px;width:54px;height:12px;border-radius:99px;background:var(--surface);box-shadow:0 5px 12px rgba(27,26,23,.08)}.empty-visual span:nth-child(1){top:20px;transform:rotate(-5deg)}.empty-visual span:nth-child(2){top:39px;width:42px}.empty-visual span:nth-child(3){top:58px;width:30px;transform:rotate(5deg)}.empty-state h3{margin:0;font-family:Georgia,"Songti SC",serif;font-size:28px;font-weight:500}.empty-state p{max-width:340px;margin:10px 0 20px;color:var(--muted);line-height:1.55}.text-button{border:0;padding:10px;color:var(--ink);background:transparent;font-weight:800;text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.status-legend{margin-top:20px;padding:17px 18px;border-radius:24px;display:grid;grid-template-columns:210px 1fr;gap:18px;align-items:center;background:var(--surface);box-shadow:0 14px 36px rgba(27,26,23,.055)}.legend-heading{display:flex;align-items:center;gap:10px}.legend-spark{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;color:var(--accent);background:var(--primary)}.legend-heading div{display:grid;gap:2px}.legend-heading strong{font-size:15px}.legend-heading small{color:var(--muted);font-size:9px}.legend-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px}.legend-item{min-width:0;display:flex;align-items:center;gap:6px;color:var(--muted);font-size:9px;font-weight:750;white-space:nowrap}.legend-item i{width:8px;height:8px;border-radius:3px;background:var(--level-color)}.card-pager{display:none}
.privacy-note{margin:0 0 54px;padding:20px 22px;border-radius:22px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;background:var(--surface)}.privacy-icon{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;color:var(--ink);background:#f0d47a}.privacy-icon svg{width:22px;fill:none;stroke:currentColor;stroke-width:1.6}.privacy-note strong{font-size:13px}.privacy-note p{margin:4px 0 0;color:var(--muted);font-size:12px}footer{padding:20px 0 28px;border-top:1px solid var(--line);display:flex;justify-content:space-between;color:var(--muted);font-size:11px}
dialog{color:var(--ink);border:0;padding:0;box-shadow:0 30px 90px rgba(27,26,23,.24)}dialog::backdrop{background:rgba(27,26,23,.42);backdrop-filter:blur(5px)}.form-dialog{width:min(600px,calc(100% - 28px));max-height:min(820px,calc(100dvh - 28px));border-radius:30px;overflow:hidden;background:var(--paper)}.form-dialog form{padding:0 28px 28px}.dialog-header{margin:0 -28px 26px;padding:28px;display:flex;align-items:flex-start;justify-content:space-between;position:relative;overflow:hidden;color:#fff;background:var(--primary)}.dialog-header::after{content:"";position:absolute;width:150px;height:150px;right:-70px;top:-90px;border:1px solid rgba(242,184,75,.35);border-radius:50%;box-shadow:0 0 0 28px rgba(242,184,75,.07)}.dialog-header .eyebrow{color:#bebbb4}.dialog-header h2{margin:0;font-family:Georgia,"Songti SC",serif;font-size:34px;font-weight:500}.dialog-lead{margin:8px 0 0;color:#bebbb4;font-size:11px}.icon-button{width:40px;height:40px;border:1px solid rgba(255,255,255,.24);border-radius:14px;color:#fff;background:rgba(255,255,255,.08);font-size:24px;cursor:pointer;z-index:1}.field{margin-bottom:20px}.field>label,.field legend,.field-label-row label{display:block;margin-bottom:8px;font-size:12px;font-weight:850}.field-label-row{display:flex;justify-content:space-between}.field-label-row span,.field-hint{color:var(--muted);font-size:10px}.field input[type="text"],.field input[type="date"]{width:100%;height:50px;padding:0 15px;border:0;border-radius:16px;color:var(--ink);background:var(--surface);box-shadow:0 8px 22px rgba(27,26,23,.05)}.field-error{margin:6px 2px 0;color:#a53d31;font-size:11px;font-weight:700}.field-error:empty{display:none}.period-field{padding:0;border:0}.segmented-control{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.segmented-control label{cursor:pointer}.segmented-control input{position:absolute;opacity:0;pointer-events:none}.segmented-control span{min-height:72px;border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--surface);box-shadow:0 8px 22px rgba(27,26,23,.05);font-weight:850}.segmented-control small{margin-top:4px;color:var(--muted);font-size:9px;font-weight:500}.segmented-control input:checked+span{color:#fff;background:var(--primary)}.segmented-control input:checked+span small{color:#c8c5be}.form-preview{min-height:88px;margin:4px 0 22px;padding:16px 18px 16px 24px;border-radius:20px;display:grid;grid-template-columns:auto 1fr;align-items:baseline;gap:3px 10px;position:relative;overflow:hidden;background:var(--surface);box-shadow:0 10px 26px rgba(27,26,23,.055)}.form-preview::before{content:"";position:absolute;inset:15px auto 15px 8px;width:5px;border-radius:99px;background:var(--level-color,var(--accent))}.form-preview span{color:var(--muted);font-size:10px;font-weight:800}.form-preview strong{font-family:Georgia,"Songti SC",serif;font-size:22px}.form-preview small{grid-column:2;color:var(--muted)}.dialog-actions{display:flex;align-items:center;gap:9px}.action-spacer{flex:1}.confirm-dialog{width:min(420px,calc(100% - 30px));padding:30px;border-radius:28px;text-align:center;background:var(--surface)}.confirm-icon{width:50px;height:50px;margin:0 auto 16px;border-radius:16px;display:grid;place-items:center;color:#9e342b;background:#f7d9cf;font-weight:900}.confirm-dialog h2{margin:0;font-family:Georgia,"Songti SC",serif;font-size:28px;font-weight:500}.confirm-dialog p{color:var(--muted);line-height:1.55}.confirm-actions{margin-top:22px;display:grid;grid-template-columns:1fr 1fr;gap:9px}.toast{position:fixed;left:50%;bottom:24px;z-index:30;transform:translate(-50%,16px);padding:11px 16px;border-radius:99px;color:#fff;background:var(--primary);opacity:0;pointer-events:none;transition:.2s ease;font-size:12px;font-weight:800}.toast.is-visible{opacity:1;transform:translate(-50%,0)}
@media(max-width:760px){
  html,body{height:100%;overflow:hidden}body{height:100dvh;background:radial-gradient(circle at 0 0,rgba(242,184,75,.16),transparent 28%),var(--paper)}.app-shell{width:100%;height:calc(100dvh - var(--safe-top));min-height:0;padding:0 16px;display:flex;flex-direction:column;overflow:hidden}.topbar{height:62px;flex:none}.brand{gap:9px}.brand-mark{width:38px;height:38px;border-radius:14px}.brand-mark svg{width:22px}.brand-copy small{font-size:7px}.brand-copy strong{font-size:17px}.button-compact{width:40px;height:40px;min-height:40px;padding:0;border-radius:14px;font-size:21px}.button-compact span:last-child{display:none}main{min-height:0;flex:1;display:flex;flex-direction:column;overflow:hidden}
  .hero{flex:none;height:120px;padding:3px 0 7px;display:block}.hero-copy{display:none}.hero-summary{min-height:110px;height:110px;padding:16px 18px;border-radius:28px;grid-template-columns:1fr auto;box-shadow:0 18px 38px rgba(27,26,23,.14)}.hero-summary::after{width:116px;height:116px;right:-52px;top:-60px;box-shadow:0 0 0 22px rgba(242,184,75,.07),0 0 0 44px rgba(242,184,75,.025)}.summary-kicker{max-width:210px;font-size:8px}.summary-main{margin-top:10px;gap:7px}.summary-number{font-size:48px}.summary-unit{max-width:78px;padding-bottom:4px;font-size:10px;line-height:1.2}.summary-copy p{margin-top:9px;font-size:8.5px}.summary-gauge{width:72px;height:72px;padding:7px}.summary-gauge::before{width:57px;height:57px}.summary-gauge b{font-size:20px}.summary-gauge small{margin-top:2px;font-size:7px}
  .board{flex:1;min-height:0;padding:4px 0 max(7px,env(safe-area-inset-bottom));display:flex;flex-direction:column;overflow:hidden;border-top:0}.section-heading{flex:none;height:32px;margin:0;align-items:center}.section-heading .eyebrow{display:none}.section-heading h2{font-family:var(--font-display);font-size:23px;font-weight:750;letter-spacing:.02em}.count-pill{padding:5px 9px;background:transparent;box-shadow:none;font-size:10px}.period-chips{flex:none;height:34px;margin:5px 0 9px;gap:7px;overflow:hidden}.period-chip{height:32px;padding:0 10px;gap:5px;font-size:9px;box-shadow:0 6px 16px rgba(27,26,23,.045)}.period-chip svg{width:12px}
  .subscription-list{flex:none;height:306px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,96px);gap:9px 10px}.subscription-card{display:none;height:96px;min-height:0;padding:8px 10px 7px;border-radius:20px;box-shadow:0 9px 24px rgba(27,26,23,.07)}.subscription-card.is-active{display:flex}.subscription-card::after{width:54px;height:54px;right:-28px;top:-28px}.card-topline{flex:none}.subscription-icon{width:25px;height:25px;border-radius:9px}.subscription-icon svg{width:14px}.card-identity{gap:5px}.card-code{font-size:7px}.card-period{padding:3px 6px;font-size:7px}.subscription-card h3{flex:none;height:15px;margin:5px 0 2px;font-size:12.5px;line-height:15px}.card-expiry{flex:none;margin-bottom:4px;gap:0}.card-expiry strong{font-size:8px;line-height:10px}.card-expiry span{font-size:7.5px;line-height:10px}.card-progress{flex:none;height:3px}
  .empty-state{flex:none;min-height:306px;height:306px;padding:20px;border-radius:26px}.empty-visual{width:110px;height:72px;margin-bottom:14px;transform:scale(.88)}.empty-state h3{font-size:24px}.empty-state p{max-width:275px;margin:8px 0 14px;font-size:10px}.empty-state .button{min-height:42px}.empty-state .text-button{padding:8px;font-size:10px}
  .status-legend{flex:none;min-height:78px;margin-top:auto;padding:9px 11px;border-radius:20px;display:block;box-shadow:0 10px 26px rgba(27,26,23,.055)}.legend-heading{gap:7px;margin-bottom:7px}.legend-spark{width:23px;height:23px;border-radius:9px;font-size:9px}.legend-heading strong{font-size:11px}.legend-heading small{font-size:7px}.legend-items{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px 6px}.legend-item{gap:4px;font-size:7px}.legend-item i{width:6px;height:6px;border-radius:2px}.card-pager{flex:none;height:34px;margin-top:3px;display:grid;grid-template-columns:38px 1fr 38px;align-items:center}.card-pager[hidden]{display:none!important}.card-pager span{text-align:center;color:var(--muted);font-size:10px;font-weight:850;letter-spacing:.08em}.pager-button{width:36px;height:30px;border:0;border-radius:12px;color:var(--ink);background:var(--surface);box-shadow:0 6px 18px rgba(27,26,23,.06);cursor:pointer}.pager-button:last-child{justify-self:end}.pager-button:disabled{opacity:.35}.privacy-note,footer{display:none}
  .form-dialog{width:100%;height:calc(100dvh - var(--safe-top));max-width:none;max-height:none;margin:var(--safe-top) 0 0;border-radius:0}html.phone-preview .form-dialog::backdrop{background:transparent;backdrop-filter:none}.form-dialog form{height:100%;padding:0 18px max(14px,env(safe-area-inset-bottom));display:flex;flex-direction:column;overflow:hidden}.dialog-header{flex:none;min-height:132px;margin:0 -18px 16px;padding:22px 18px 20px;border-radius:0 0 30px 30px}.dialog-header h2{font-size:30px}.field{flex:none;margin-bottom:14px}.field input[type="text"],.field input[type="date"]{height:46px}.segmented-control span{min-height:62px}.form-preview{flex:none;min-height:76px;margin:0 0 10px;padding:12px 14px 12px 21px}.form-preview strong{font-size:19px}.dialog-actions{flex:none;margin-top:auto;padding-top:12px;border-top:1px solid var(--line)}.dialog-actions .button{min-height:46px;padding:0 15px}.button-danger-ghost{width:48px;padding:0;font-size:0}.button-danger-ghost::after{content:"删除";font-size:12px}
}

.brand-copy small,.eyebrow,.summary-kicker,.card-code{font-family:var(--font-latin)}
.summary-number,.summary-gauge b,.count-pill,.card-expiry strong,.field input[type="date"],.field-label-row span,.card-pager span{font-variant-numeric:tabular-nums lining-nums}
.card-code,.card-expiry strong,.field input[type="date"],.card-pager span{font-family:var(--font-numeric)}
.hero-copy h1,.section-heading h2,.empty-state h3,.dialog-header h2,.confirm-dialog h2{font-family:var(--font-display);font-weight:700;letter-spacing:.025em}
.brand-copy strong,.subscription-card h3,.period-chip,.button,.field>label,.field legend,.field-label-row label{font-family:var(--font-ui)}
.brand-copy strong{font-weight:700;letter-spacing:.025em}.brand-copy small{font-weight:600;letter-spacing:.1em}
.hero-copy h1{line-height:1.08}.hero-description{line-height:1.7}.section-heading h2{line-height:1.2}.empty-state h3,.dialog-header h2,.confirm-dialog h2{line-height:1.25}
.period-chip,.button,.field>label,.field legend,.field-label-row label{font-weight:650}.subscription-card h3{font-weight:650;letter-spacing:.01em}
.card-expiry strong{font-weight:700;letter-spacing:.01em}.card-expiry span{font-weight:500;line-height:1.35}.legend-item{font-weight:600;line-height:1.35}
.dialog-lead,.field-hint,.empty-state p,.privacy-note p{line-height:1.6}.field input[type="text"],.field input[type="date"]{font-size:15px;font-weight:500}
@media(max-width:760px){
  .brand-copy small{font-size:7.5px;line-height:1.2}.brand-copy strong{font-size:17px;line-height:1.2}
  .summary-kicker{font-size:8.5px;letter-spacing:.04em}.summary-number{font-family:var(--font-latin);font-weight:700;letter-spacing:-.055em}.summary-unit{font-size:10px;font-weight:600;line-height:1.35}.summary-copy p{font-size:9px;line-height:1.4}.summary-gauge b{font-family:var(--font-latin);font-weight:700}.summary-gauge small{font-size:7.5px;font-weight:600}
  .section-heading h2{font-family:var(--font-ui);font-size:22px;font-weight:800;letter-spacing:.01em}.count-pill{font-size:10px;font-weight:700}.period-chip{font-size:10px;font-weight:600}
  .subscription-card h3{height:16px;font-size:13px;line-height:16px}.card-code{font-size:7.5px;font-weight:700}.card-period{font-size:7.5px;font-weight:600}.card-expiry strong{font-size:9px;line-height:11px}.card-expiry span{font-size:8.5px;line-height:11px}
  .legend-heading strong{font-size:11.5px;font-weight:700}.legend-heading small{font-size:7.5px;line-height:1.3}.legend-item{font-size:8px}
  .empty-state h3{font-size:23px}.empty-state p{font-size:11px}.empty-state .button{font-size:12px}.empty-state .text-button{font-size:10.5px}
  .dialog-header h2{font-size:29px}.dialog-lead{font-size:11px}.field>label,.field legend,.field-label-row label{font-size:12.5px}.field-hint{font-size:10.5px}.segmented-control span{font-size:14px}.segmented-control small{font-size:10px}.form-preview strong{font-family:var(--font-display);font-weight:600}.dialog-actions .button{font-size:12px}
}
/* Final mobile typography pass: readable at a physical 390 × 844 viewport. */
@media(max-width:760px){
  .topbar{height:64px}.brand-copy{gap:3px}.brand-copy small{font-size:8px;line-height:1.15;letter-spacing:.09em}.brand-copy strong{font-size:18px;line-height:1.15;font-weight:750}
  .hero{height:124px;padding:2px 0 8px}.hero-summary{height:114px;min-height:114px;padding:15px 17px;border-radius:27px;grid-template-columns:minmax(0,1fr) 76px;column-gap:12px}.summary-copy{overflow:hidden}.summary-kicker{max-width:220px;font-size:9px;line-height:1.3;font-weight:600;letter-spacing:.025em}.summary-main{margin-top:6px;align-items:baseline;gap:10px}.summary-number{font-size:52px;line-height:.9;font-weight:750;letter-spacing:-.04em}.summary-unit{max-width:none;padding:0;font-size:11px;line-height:1.3;font-weight:600;white-space:nowrap}.summary-copy p{margin-top:5px;font-size:10px;line-height:1.35;font-weight:400}.summary-gauge{width:74px;height:74px}.summary-gauge::before{width:59px;height:59px}.summary-gauge b{font-size:21px}.summary-gauge small{font-size:8px}
  .section-heading{height:34px}.section-heading h2{font-size:24px;line-height:1.2;font-weight:750}.count-pill{font-size:11px}.period-chips{height:37px;margin:5px 0 10px;gap:8px}.period-chip{height:34px;padding:0 11px;font-size:10.5px;gap:6px}.period-chip svg{width:13px}
  .subscription-list{height:342px;grid-template-rows:repeat(3,108px);gap:9px 10px}.subscription-card{height:108px;padding:9px 11px 8px;border-radius:21px}.subscription-icon{width:27px;height:27px;border-radius:9px}.subscription-icon svg{width:15px}.card-identity{gap:6px}.card-code{font-family:var(--font-latin);font-size:8px;font-weight:600}.card-period{padding:3px 7px;font-size:8.5px;font-weight:500}.subscription-card h3{height:18px;margin:6px 0 3px;font-size:14px;line-height:18px;font-weight:650}.card-expiry{margin-bottom:5px;gap:0}.card-expiry strong{font-family:var(--font-latin);font-size:10px;line-height:13px;font-weight:650}.card-expiry span{font-size:9px;line-height:12px;font-weight:400}.card-progress{height:3px}
  .empty-state{height:342px;min-height:342px}.empty-state h3{font-size:24px;font-weight:700}.empty-state p{font-size:12px;line-height:1.55}
  .status-legend{min-height:92px;padding:10px 12px;border-radius:21px}.legend-heading{margin-bottom:8px}.legend-spark{width:25px;height:25px}.legend-heading strong{font-size:12px;line-height:1.25}.legend-heading small{font-size:8.5px;line-height:1.35}.legend-items{gap:6px 8px}.legend-item{font-size:9px;line-height:1.35;font-weight:450}.legend-item i{width:7px;height:7px}.card-pager{height:34px;margin-top:3px}.card-pager span{font-family:var(--font-latin);font-size:10px;font-weight:600}
  .dialog-header h2{font-size:29px;font-weight:700;letter-spacing:.02em}.dialog-lead{font-size:11.5px}.field>label,.field legend,.field-label-row label{font-size:13px;font-weight:650}.field-hint{font-size:11px}.form-preview strong{font-family:var(--font-ui);font-weight:600}.dialog-actions .button{font-size:13px}
}
/* Visual-first dashboard: data and shapes lead, copy supports. */
.hero-summary{--hero-tone:#f2b84b;--hero-soft:#f7dfa0;color:var(--ink);background:linear-gradient(135deg,var(--hero-soft),color-mix(in srgb,var(--hero-tone) 20%,#fffdf7));box-shadow:0 22px 52px color-mix(in srgb,var(--hero-tone) 18%,transparent)}
.hero-summary[data-level="due"]{--hero-tone:#ad4438;--hero-soft:#f2c5b8}.hero-summary[data-level="urgent"]{--hero-tone:#eb7564;--hero-soft:#ffd2c8}.hero-summary[data-level="attention"]{--hero-tone:#e4ae3d;--hero-soft:#f6dfa1}.hero-summary[data-level="early"]{--hero-tone:#6aa9dc;--hero-soft:#d5e9f7}.hero-summary[data-level="normal"]{--hero-tone:#69a979;--hero-soft:#d7ead9}.hero-summary[data-level="future"]{--hero-tone:#9e9b91;--hero-soft:#e8e2d7}.hero-summary[data-level="empty"]{--hero-tone:#f2b84b;--hero-soft:#f7e1a4}
.hero-summary::after{right:-38px;top:-48px;border:0;background:color-mix(in srgb,var(--hero-tone) 18%,transparent);box-shadow:0 0 0 28px color-mix(in srgb,var(--hero-tone) 9%,transparent),0 0 0 58px color-mix(in srgb,var(--hero-tone) 5%,transparent)}
.summary-kicker,.summary-copy p{color:color-mix(in srgb,var(--ink) 68%,transparent)}.summary-number{color:var(--ink)}.summary-copy p b{color:var(--ink);font-weight:750}.summary-visual{width:118px;height:118px;display:grid;place-items:center;position:relative;z-index:1}.summary-gauge{background:conic-gradient(var(--ink) var(--gauge),rgba(27,26,23,.12) 0)}.summary-gauge::before{background:var(--hero-soft)}.summary-gauge small{color:color-mix(in srgb,var(--ink) 62%,transparent)}.summary-orbit{position:absolute;border:1px solid color-mix(in srgb,var(--ink) 18%,transparent);border-radius:50%;animation:orbitFloat 5s ease-in-out infinite}.orbit-one{width:104px;height:48px;transform:rotate(32deg)}.orbit-two{width:74px;height:112px;transform:rotate(-28deg);animation-delay:-2.4s}
.subscription-card{background:linear-gradient(145deg,color-mix(in srgb,var(--level-color) 13%,#fffdf7),#fffdf7 72%);isolation:isolate;transition:transform .2s ease,box-shadow .2s ease}.subscription-card::before{content:"";position:absolute;z-index:-1;width:82px;height:82px;right:-28px;top:-34px;border-radius:50%;background:color-mix(in srgb,var(--level-color) 16%,transparent);transform:rotate(12deg)}.subscription-card[data-period="quarterly"]::before{border-radius:30% 70% 60% 40%/42% 36% 64% 58%;transform:rotate(28deg)}.subscription-card[data-period="yearly"]::before{right:-18px;top:-24px;background:transparent;border:13px solid color-mix(in srgb,var(--level-color) 13%,transparent)}.subscription-card::after{width:28px;height:28px;right:22px;top:18px;background:color-mix(in srgb,var(--level-color) 10%,transparent)}.subscription-card:hover{transform:translateY(-3px);box-shadow:0 17px 38px color-mix(in srgb,var(--level-color) 15%,rgba(27,26,23,.08))}.subscription-card:active{transform:scale(.975)}.subscription-card.is-active{animation:cardIn .34s cubic-bezier(.2,.8,.2,1) both}.subscription-card.is-active:nth-child(even){animation-delay:.045s}
.card-topline{position:relative;z-index:1}.card-code{min-width:24px;height:22px;padding:0 7px;border-radius:99px;display:inline-grid;place-items:center;color:color-mix(in srgb,var(--level-color) 76%,var(--ink));background:color-mix(in srgb,var(--level-color) 14%,#fff);font-family:var(--font-latin);font-weight:700}.card-period{background:rgba(255,253,247,.7);backdrop-filter:blur(4px)}.subscription-card h3{position:relative;z-index:1}.card-data{margin-top:auto;display:flex;align-items:flex-end;justify-content:space-between;gap:8px;position:relative;z-index:1}.card-metric{display:flex;align-items:baseline;gap:4px;min-width:0}.card-metric strong{font-family:var(--font-latin);font-size:34px;line-height:.82;font-weight:720;letter-spacing:-.06em}.card-metric small{max-width:48px;color:var(--muted);font-size:9px;line-height:1.15;font-weight:550}.card-renewal{display:grid;gap:2px;text-align:right}.card-renewal small{color:var(--muted);font-size:8px}.card-renewal strong{font-family:var(--font-latin);font-size:10px;font-weight:620;font-variant-numeric:tabular-nums}.card-progress{margin-top:7px;background:rgba(27,26,23,.08)}
.period-chip{transition:transform .18s ease,background .18s ease,color .18s ease,box-shadow .18s ease}.period-chip:hover{transform:translateY(-2px)}.period-chip:active{transform:scale(.96)}.period-chip.is-current{box-shadow:0 9px 22px rgba(27,26,23,.15)}
.legend-item>span{display:grid;gap:1px}.legend-item b{color:var(--ink);font-size:10px;line-height:1.15}.legend-item small{color:var(--muted);font-size:8px;line-height:1.15}.legend-item i{box-shadow:0 0 0 4px color-mix(in srgb,var(--level-color) 12%,transparent)}
.dialog-header{color:var(--ink);background:linear-gradient(135deg,#f7dfa0,#f4c9b8);box-shadow:0 18px 38px rgba(228,174,61,.14)}.dialog-header::after{border-color:rgba(27,26,23,.13);box-shadow:0 0 0 28px rgba(255,253,247,.19)}.dialog-header .eyebrow,.dialog-lead{color:color-mix(in srgb,var(--ink) 62%,transparent)}.icon-button{color:var(--ink);border-color:rgba(27,26,23,.18);background:rgba(255,253,247,.34)}.form-preview{background:linear-gradient(135deg,color-mix(in srgb,var(--level-color,var(--accent)) 10%,#fffdf7),#fffdf7)}
@keyframes cardIn{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}@keyframes orbitFloat{0%,100%{translate:0 -2px}50%{translate:0 3px}}
@media(max-width:760px){
  .hero-summary{grid-template-columns:minmax(0,1fr) 82px;padding:15px 16px}.summary-visual{width:82px;height:82px}.summary-gauge{width:72px;height:72px}.orbit-one{width:78px;height:34px}.orbit-two{width:50px;height:82px}.summary-kicker{font-size:9.5px;font-weight:550}.summary-main{margin-top:4px}.summary-number{font-size:54px}.summary-unit{font-size:11px}.summary-copy p{margin-top:3px;font-size:9.5px}
  .subscription-list{height:360px;grid-template-rows:repeat(3,114px)}.subscription-card{height:114px;padding:9px 11px 8px}.subscription-card::before{width:68px;height:68px}.subscription-card::after{right:18px;top:18px}.card-code{min-width:23px;height:20px;padding:0 6px;font-size:8px}.card-period{font-size:8.5px}.subscription-card h3{height:18px;margin:6px 0 2px;font-size:13.5px;line-height:18px}.card-metric strong{font-size:30px}.card-metric small{font-size:8px}.card-renewal small{font-size:7px}.card-renewal strong{font-size:8.5px}.card-progress{margin-top:6px}
  .status-legend{min-height:88px;padding:9px 11px}.legend-heading{margin-bottom:7px}.legend-items{grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}.legend-item{flex-direction:column;justify-content:center;gap:4px;text-align:center;white-space:normal}.legend-item i{width:9px;height:9px;border-radius:50%}.legend-item>span{display:grid}.legend-item b{font-size:9px}.legend-item small{font-size:7px}.legend-heading strong{font-size:12px}.legend-heading small{font-size:8px}
}
/* The spectrum is a controller: the same semantic color follows every linked value. */
.legend-spark{color:transparent;background:#fff;box-shadow:0 6px 16px rgba(27,26,23,.08)}.legend-spark>i{width:18px;height:18px;border-radius:50%;position:relative;background:conic-gradient(#eb7564 0 16.6%,#e4ae3d 16.6% 33.2%,#69a979 33.2% 49.8%,#6aa9dc 49.8% 66.4%,#8d79c8 66.4% 83%,#d46d9b 83% 100%)}.legend-spark>i::after{content:"";position:absolute;inset:4px;border-radius:50%;background:#fff}
.summary-number,.summary-gauge b{color:var(--hero-tone)}
.summary-gauge{background:conic-gradient(var(--hero-tone) var(--gauge),rgba(27,26,23,.12) 0)}
.subscription-card .card-metric strong,.subscription-card .card-renewal strong{color:color-mix(in srgb,var(--level-color) 82%,var(--ink))}
.count-pill[data-level="due"]{color:#ad4438;background:#f7e5df}.count-pill[data-level="urgent"]{color:#c95749;background:#ffe6e0}.count-pill[data-level="attention"]{color:#a27316;background:#fff0c6}.count-pill[data-level="early"]{color:#397eaf;background:#e3f2fc}.count-pill[data-level="normal"]{color:#3f8050;background:#e4f2e5}.count-pill[data-level="future"]{color:#716f68;background:#ece8e0}
.legend-item{padding:5px 7px;border:0;border-radius:12px;background:transparent;cursor:pointer;transition:transform .18s ease,background .18s ease,opacity .18s ease,filter .18s ease}.legend-item i{transition:transform .18s ease,box-shadow .18s ease}.legend-item:hover,.legend-item.is-preview{transform:translateY(-2px);background:color-mix(in srgb,var(--level-color) 10%,transparent)}.legend-item:hover i,.legend-item.is-preview i{transform:scale(1.18);box-shadow:0 0 0 6px color-mix(in srgb,var(--level-color) 15%,transparent)}.legend-item.is-current{color:var(--ink);background:color-mix(in srgb,var(--level-color) 18%,#fffdf7);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--level-color) 34%,transparent),0 5px 14px color-mix(in srgb,var(--level-color) 13%,transparent)}.legend-item.is-current i{transform:scale(1.2);box-shadow:0 0 0 6px color-mix(in srgb,var(--level-color) 18%,transparent)}
.subscription-list.is-link-preview .subscription-card:not(.is-linked){opacity:.32;filter:saturate(.45);transform:scale(.975)}.subscription-list.is-link-preview .subscription-card.is-linked{transform:translateY(-3px);box-shadow:0 17px 38px color-mix(in srgb,var(--level-color) 20%,rgba(27,26,23,.08))}
@media(max-width:760px){.legend-spark>i{width:15px;height:15px}.legend-spark>i::after{inset:3px}.legend-item{min-height:38px;padding:3px 1px;gap:5px}.legend-item>span{order:1}.legend-item>i{order:2}}
.legend-item.is-current{position:relative;isolation:isolate;background:transparent;box-shadow:none}.legend-item.is-current::before{content:"";position:absolute;z-index:-1;inset:-4px -7px;border-radius:15px;background:color-mix(in srgb,var(--level-color) 18%,#fffdf7);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--level-color) 34%,transparent),0 5px 14px color-mix(in srgb,var(--level-color) 13%,transparent)}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}

/* Renewal workflow: structure and text carry action state; the existing spectrum remains urgency-only. */
.workflow-chips{align-items:center}.workflow-chips .period-chip{min-width:92px;justify-content:center}.workflow-chips .period-chip:last-child{margin-left:auto}
.subscription-card .card-code{min-width:auto;color:var(--ink);background:rgba(255,253,247,.74);box-shadow:inset 0 0 0 1px rgba(27,26,23,.09)}
.subscription-card[data-action-state="pending"] .card-code{font-weight:800;box-shadow:inset 0 0 0 1.5px var(--ink)}
.subscription-card[data-action-state="snoozed"] .card-code{border:1px dashed rgba(27,26,23,.35);box-shadow:none}
.subscription-card[data-action-state="later"] .card-code{color:var(--muted)}
.subscription-card[data-action-state="ended"]{--level-color:#8d8a82;filter:saturate(0);opacity:.82}

.action-dialog{width:min(470px,calc(100% - 28px));padding:0;border-radius:30px;background:var(--paper);overflow:hidden}
.action-sheet{padding:25px}.action-sheet-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.action-sheet-header .eyebrow{margin-bottom:7px}.action-sheet-header h2{max-width:330px;margin:0;font-size:27px;line-height:1.22;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.action-close{width:38px;height:38px;flex:none;border:1px solid var(--line);border-radius:13px;background:var(--surface);font-size:23px;cursor:pointer}
.action-renewal{--level-color:#69a979;margin-top:20px;padding:17px 18px 16px 23px;border-radius:21px;display:grid;gap:3px;position:relative;overflow:hidden;background:linear-gradient(135deg,color-mix(in srgb,var(--level-color) 13%,#fffdf7),#fffdf7)}.action-renewal::before{content:"";position:absolute;inset:15px auto 15px 8px;width:5px;border-radius:99px;background:var(--level-color)}.action-renewal span{color:var(--muted);font-size:10px;font-weight:700}.action-renewal strong{font-size:22px;line-height:1.25}.action-renewal small{color:var(--muted);font-size:11px}
.action-hint{margin:10px 2px 16px;color:var(--muted);font-size:10px}.action-hint:empty{display:none}.action-active-controls{display:grid;gap:12px}.action-main-button{width:100%;min-height:68px;padding:12px 15px;border:0;border-radius:19px;display:flex;align-items:center;gap:13px;text-align:left;color:#fff;background:var(--primary);cursor:pointer}.action-main-button>span:first-child{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;color:var(--ink);background:var(--accent);font-size:18px;font-weight:900}.action-main-button>span:last-child{display:grid;gap:2px}.action-main-button strong{font-size:14px}.action-main-button small{color:#c8c5be;font-size:9px}.snooze-field{margin:0;padding:0;border:0}.snooze-field legend{margin-bottom:7px;color:var(--muted);font-size:10px;font-weight:700}.snooze-options{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.snooze-options button{min-height:42px;border:1px solid var(--line);border-radius:14px;background:var(--surface);font-size:11px;font-weight:700;cursor:pointer}.action-text-button{width:100%;min-height:42px;border:0;background:transparent;font-size:11px;font-weight:750;text-decoration:underline;text-underline-offset:4px;cursor:pointer}.action-end{color:#805f58}.action-restore{margin-top:4px}.action-dialog .action-text-button:last-child{margin-top:6px}

@media(max-width:760px){
  .workflow-chips{overflow:visible}.workflow-chips .period-chip{min-width:0;flex:1;padding:0 9px}.workflow-chips .period-chip:last-child{margin-left:0}
  .subscription-card .card-code{height:20px;padding:0 6px;font-size:7.5px}
  .action-dialog{width:100%;max-width:none;margin:auto 0 0;border-radius:28px 28px 0 0}.action-sheet{padding:22px 18px max(20px,env(safe-area-inset-bottom))}.action-sheet-header h2{max-width:285px;font-size:23px}.action-renewal{margin-top:16px;padding:14px 15px 14px 22px}.action-renewal strong{font-size:20px}.action-hint{margin-bottom:13px}.action-main-button{min-height:62px}.snooze-options button{min-height:40px}
}

/* Recognition stack: identity shape → due-date axis → urgency spectrum. */
.subscription-card{container-type:inline-size}.subscription-card::after{display:none}
.card-topline{min-width:0;gap:8px}.card-identity{min-width:0;display:flex;align-items:center;gap:9px}.identity-mark{width:38px;height:38px;flex:none;display:grid;place-items:center;position:relative;overflow:hidden;color:#fff;background:var(--ink);box-shadow:0 5px 12px rgba(27,26,23,.14)}.identity-mark::before{content:"";position:absolute;inset:5px;border:1px solid rgba(255,255,255,.28);border-radius:inherit}.identity-mark b{position:relative;z-index:1;font-size:11px;line-height:1;font-weight:760;letter-spacing:-.06em}.identity-mark[data-motif="0"]{border-radius:50%}.identity-mark[data-motif="1"]{border-radius:11px 19px 11px 19px}.identity-mark[data-motif="2"]{clip-path:polygon(18% 0,82% 0,100% 22%,100% 78%,82% 100%,18% 100%,0 78%,0 22%)}.identity-mark[data-motif="3"]{border-radius:50% 16% 50% 16%}.identity-mark[data-motif="4"]{clip-path:polygon(50% 0,94% 24%,94% 76%,50% 100%,6% 76%,6% 24%)}.identity-mark[data-motif="5"]{border-radius:8px 8px 20px 8px}.identity-mark.has-custom-icon{border-radius:11px;background:#fff}.identity-mark.has-custom-icon::before{display:none}.identity-mark img{width:100%;height:100%;object-fit:cover}.identity-copy{min-width:0;display:grid;align-content:center;gap:1px}.subscription-card .identity-copy h3{height:auto;margin:0;line-height:1.2;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.identity-copy small{color:var(--muted);font-size:8px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.subscription-card .card-code{flex:none;align-self:flex-start;margin-top:1px}
.card-data{min-height:54px;margin-top:auto;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}.card-renewal{min-width:0;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;column-gap:7px;align-items:end;text-align:left}.date-top{grid-column:1/-1;display:flex;align-items:center;gap:5px;color:var(--muted);font-family:var(--font-latin);font-variant-numeric:tabular-nums}.date-top small{font-size:7px;line-height:1}.date-top b{font-size:8px;line-height:1}.card-renewal>strong{grid-row:2;font-family:var(--font-latin);font-size:34px;line-height:.82;font-weight:760;letter-spacing:-.07em;font-variant-numeric:tabular-nums}.date-cluster{grid-row:2;align-self:center;display:flex;flex-wrap:wrap;width:23px;gap:3px}.date-cluster i{width:4px;height:4px;border:1px solid color-mix(in srgb,var(--ink) 48%,transparent);border-radius:50%;background:transparent}.date-cluster i.is-self{background:var(--ink);border-color:var(--ink)}.card-metric{min-width:42px;padding:4px 0 2px 8px;border-left:1px solid rgba(27,26,23,.12);display:grid;justify-items:end;align-items:end;gap:0}.card-metric strong{font-size:19px;line-height:1;font-weight:700;letter-spacing:-.05em}.card-metric small{max-width:none;font-size:7.5px;line-height:1.2;white-space:nowrap}.card-progress{margin-top:6px}

@media(max-width:760px){
  .card-topline{height:32px;gap:5px}.card-identity{gap:7px}.identity-mark{width:31px;height:31px}.identity-mark::before{inset:4px}.identity-mark b{font-size:9px}.subscription-card .identity-copy h3{font-size:12px;line-height:14px}.identity-copy small{font-size:7px}.subscription-card .card-code{max-width:38px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-data{min-height:48px;gap:5px}.card-renewal{column-gap:5px}.card-renewal>strong{font-size:29px}.date-top{gap:4px}.date-top small{font-size:6.5px}.date-top b{font-size:7.5px}.date-cluster{width:19px;gap:2px}.date-cluster i{width:3.5px;height:3.5px}.card-metric{min-width:39px;padding-left:6px}.card-metric strong{font-size:17px}.card-metric small{font-size:7px}.card-progress{margin-top:5px}
}

/* Compact edit flow: calculated result occupies the former dead zone; actions stay attached. */
@media(max-width:760px){
  .form-dialog form{padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .dialog-header{min-height:88px;margin-bottom:12px;padding:20px 18px 17px;border-radius:0 0 26px 26px;align-items:center}.dialog-header h2{font-size:27px}.dialog-header .icon-button{width:38px;height:38px;border-radius:13px}
  .field{margin-bottom:11px}.field>label,.field legend,.field-label-row label{margin-bottom:6px}.field input[type="text"],.field input[type="date"]{height:48px;border-radius:15px}.field-hint{margin:6px 1px 0}.segmented-control{gap:7px}.segmented-control span{min-height:58px;border-radius:16px}
  .form-preview{flex:1 1 150px;min-height:118px;margin:1px 0 12px;padding:18px 72px 18px 23px;align-content:center;overflow:hidden}.form-preview::before{inset:18px auto 18px 9px}.form-preview::after{content:"";position:absolute;width:94px;height:94px;right:-27px;bottom:-28px;border:1px solid color-mix(in srgb,var(--level-color,var(--accent)) 28%,transparent);border-radius:50%;box-shadow:0 0 0 18px color-mix(in srgb,var(--level-color,var(--accent)) 7%,transparent)}.form-preview strong{font-size:21px;line-height:1.25}.form-preview small{font-size:11px}
  .dialog-actions{display:grid;grid-template-columns:46px minmax(0,1fr) minmax(0,1.35fr);gap:9px;margin-top:0;padding-top:11px}.dialog-actions:has(.delete-icon-button[hidden]){grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);padding-left:55px}.dialog-actions .action-spacer{display:none}.dialog-actions .button{width:100%;min-height:48px;padding:0 12px;border-radius:15px;font-size:13px}.dialog-actions .delete-icon-button{padding:0;font-size:25px;color:#9f392e;background:rgba(248,232,226,.72)}.dialog-actions .delete-icon-button::after{content:none}
}

@media(max-width:760px){
  .form-preview:has(.preview-copy){grid-template-columns:minmax(0,1fr) 136px;grid-template-rows:1fr;gap:10px;padding:22px 12px 22px 22px;align-items:center}.form-preview:has(.preview-copy)::after{width:132px;height:132px;right:-42px;bottom:-48px}
  .form-preview .preview-copy{min-width:0;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr);gap:7px;align-content:center;color:var(--ink)}.form-preview .preview-copy small{grid-column:auto;color:var(--muted);font-size:10px;font-weight:700}.form-preview .preview-copy strong{max-width:100%;font-family:var(--font-ui);font-size:26px;line-height:1.16;font-weight:730;letter-spacing:-.025em;white-space:normal;word-break:keep-all;overflow-wrap:normal}.form-preview .preview-copy b{max-width:100%;color:var(--muted);font-size:10px;line-height:1.5;font-weight:500;overflow-wrap:anywhere}
  .form-preview .preview-calendar{align-self:stretch;display:grid;grid-template-columns:1fr auto 1fr;place-items:center;align-content:center;gap:5px;position:relative;z-index:1;border-left:1px solid rgba(27,26,23,.1);color:color-mix(in srgb,var(--level-color,var(--ink)) 76%,var(--ink))}.form-preview .preview-calendar>i{font-family:var(--font-latin);font-size:24px;font-style:normal;font-weight:500;opacity:.48}.form-preview .preview-date-unit{display:grid;justify-items:center;gap:5px;color:inherit}.form-preview .preview-date-unit small{grid-column:auto;color:inherit;font-family:var(--font-ui);font-size:10px;font-weight:650}.form-preview .preview-date-unit strong{color:inherit;font-family:var(--font-latin);font-size:43px;line-height:.9;font-weight:760;letter-spacing:-.08em;font-variant-numeric:tabular-nums}
}

@media(max-width:360px){
  .form-dialog form{padding-inline:14px}.dialog-header{margin-inline:-14px;padding-inline:14px}.form-preview:has(.preview-copy){grid-template-columns:minmax(0,1fr) 116px;gap:8px;padding-inline:18px 9px}.form-preview .preview-copy strong{font-size:23px}.form-preview .preview-calendar{gap:3px}.form-preview .preview-date-unit strong{font-size:36px}.form-preview .preview-calendar>i{font-size:20px}.dialog-actions:has(.delete-icon-button[hidden]){padding-left:0}.dialog-actions{grid-template-columns:44px minmax(0,1fr) minmax(0,1.25fr)}
  .subscription-card{padding-inline:9px}.card-identity{gap:5px}.identity-mark{width:29px;height:29px}.subscription-card .identity-copy h3{font-size:11.5px}.subscription-card .card-code{max-width:32px}.card-renewal>strong{font-size:22px}.card-metric{min-width:34px;padding-left:4px}.card-metric strong{font-size:15px}
}

/* Month and day are one date key and therefore share visual weight. */
.card-renewal>strong{grid-column:1/-1;width:100%;text-align:center;font-size:31px;letter-spacing:-.075em;white-space:nowrap}.date-top b{display:none}.date-cluster{grid-row:1;grid-column:2;align-self:center;justify-self:end;margin-right:2px}
@media(max-width:760px){.card-renewal>strong{font-size:25px}.card-renewal{column-gap:4px}.date-cluster{width:20px}}

/* Identity is a readable neutral emblem, not a miniature or invented brand logo. */
.identity-mark:not(.has-custom-icon){color:var(--ink);background:#e9e3d8;border:0;box-shadow:inset 0 0 0 1px rgba(27,26,23,.28),0 4px 10px rgba(27,26,23,.08)}.identity-mark:not(.has-custom-icon)::before{display:none}.identity-mark b{font-size:14px;font-weight:780;letter-spacing:0}.identity-mark[data-motif="0"]{border-radius:50%}.identity-mark[data-motif="1"]{border-radius:8px}.identity-mark[data-motif="2"]{clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}.identity-mark[data-motif="3"]{border-radius:50% 50% 10px 10px}.identity-mark[data-motif="4"]{clip-path:polygon(25% 0,75% 0,100% 25%,100% 75%,75% 100%,25% 100%,0 75%,0 25%)}.identity-mark[data-motif="5"]{border-radius:18px 6px 18px 6px}
.identity-mark.has-brand-icon{border-radius:10px;clip-path:none;color:inherit;background:var(--brand-color);box-shadow:inset 0 0 0 1px rgba(27,26,23,.08),0 5px 12px rgba(27,26,23,.13)}.identity-mark.has-brand-icon::before{display:none}.identity-mark.has-brand-icon svg{width:100%;height:100%;display:block}.identity-mark.has-brand-icon[data-brand="youku"],.identity-mark.has-brand-icon[data-brand="notion"]{box-shadow:inset 0 0 0 1px rgba(27,26,23,.16),0 5px 12px rgba(27,26,23,.11)}
.identity-mark.has-brand-icon svg{padding:5px}.identity-mark.has-brand-icon.has-audited-asset img{width:100%;height:100%;display:block;object-fit:cover;border-radius:inherit}.identity-mark.has-brand-icon.has-audited-asset{overflow:hidden}.identity-mark.has-brand-icon.has-audited-asset svg{padding:0}
@media(max-width:760px){.identity-mark{width:33px;height:33px}.identity-mark b{font-size:14px}.card-topline:has(.card-identity:only-child) .card-identity{max-width:100%}.card-topline:has(.card-identity:only-child) .identity-copy{padding-right:5px}}

/* 选中态使用纸面材质，不再用黑底与页面割裂。 */
.period-chip.is-current{
  color:var(--ink);
  background:linear-gradient(145deg,#fffdf7,#f7edd6);
  box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--accent) 72%,#9b7b2d),0 6px 16px rgba(99,78,28,.09);
}
.period-chip.is-current svg{color:color-mix(in srgb,var(--accent) 72%,#7d641f)}
.period-chip.is-current::after{
  content:"";
  width:5px;
  height:5px;
  margin-left:1px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent);
}
.segmented-control span{position:relative;border:1px solid transparent;transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.segmented-control label:hover span{transform:translateY(-1px);border-color:rgba(27,26,23,.09)}
.segmented-control input:checked+span{
  color:var(--ink);
  border-color:color-mix(in srgb,var(--accent) 72%,#9b7b2d);
  background:linear-gradient(145deg,#fffdf7,#f7edd6);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.82),0 8px 20px rgba(99,78,28,.1);
}
.segmented-control input:checked+span::before{
  content:"";
  position:absolute;
  top:9px;
  right:10px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 15%,transparent);
}
.segmented-control input:checked+span small{color:var(--muted)}
.segmented-control input:focus-visible+span,.period-chip:focus-visible{outline:2px solid color-mix(in srgb,var(--accent) 72%,#78601f);outline-offset:2px}

/* Mobile vertical rhythm: distribute real content, do not park unused space between blocks. */
@media(max-width:760px){
  .subscription-list{
    height:402px;
    grid-template-rows:repeat(3,128px);
    gap:9px 10px;
  }
  .subscription-card{
    height:128px;
    padding:10px 11px 9px;
  }
  .empty-state{
    width:100%;
    height:278px;
    min-height:278px;
    margin: auto 0 0;
    padding:18px 20px;
    border-radius:24px;
  }
  .empty-visual{
    width:96px;
    height:64px;
    margin-bottom:9px;
    transform:scale(.78);
  }
  .empty-state h3{font-size:22px}
  .empty-state p{max-width:290px;margin:7px 0 11px;font-size:11px;line-height:1.5}
  .empty-state .button{min-height:40px;padding-inline:18px}
  .empty-state .text-button{padding:6px 8px}
  .status-legend{margin:12px 0 auto}
  .board:has(.status-legend[hidden]) .empty-state{margin-block:auto}
}

/* The form result is a two-level date board, so its height carries information. */
@media(max-width:760px){
  .form-preview:has(.preview-copy){
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr);
    gap:16px;
    padding:25px 23px 21px;
    align-items:stretch;
  }
  .form-preview:has(.preview-copy)::after{
    width:150px;
    height:150px;
    right:-48px;
    bottom:-54px;
  }
  .form-preview .preview-copy{
    gap:5px;
    align-content:start;
  }
  .form-preview .preview-copy strong{font-size:27px}
  .form-preview .preview-copy b{font-size:11px;line-height:1.4}
  .form-preview .preview-calendar{
    align-self:stretch;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    gap:12px;
    border-left:0;
    border-top:1px solid rgba(27,26,23,.1);
    padding-top:15px;
  }
  .form-preview .preview-date-unit{gap:8px}
  .form-preview .preview-date-unit strong{font-size:64px}
  .form-preview .preview-date-unit small{font-size:11px}
  .form-preview .preview-calendar>i{font-size:30px}
}

@media(max-width:360px){
  .form-preview:has(.preview-copy){
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr);
    gap:12px;
    padding:20px 18px 17px;
  }
  .form-preview .preview-copy strong{font-size:24px}
  .form-preview .preview-date-unit strong{font-size:54px}
  .form-preview .preview-calendar{gap:8px;padding-top:12px}
}

/* Empty results belong directly to the active filter; keep that relationship contiguous. */
@media(max-width:760px){
  .empty-state{
    flex:1 1 0;
    width:100%;
    height:auto;
    min-height:0;
    margin:0;
  }
  .status-legend{margin:12px 0 0}
  .board:has(.status-legend[hidden]) .empty-state{margin:0}
}

/* Six-card pages yield to the status bar, legend and pager instead of clipping them. */
@media(max-width:760px){
  .subscription-list{
    flex:1 1 auto;
    height:auto;
    max-height:402px;
    min-height:0;
    grid-template-rows:repeat(3,minmax(0,1fr));
  }
  .subscription-card{
    height:auto;
    min-height:0;
  }
}

/* Focus pass: one illustration anchor, quieter cards, and a single-row spectrum. */
.summary-art,.empty-visual img{width:100%;height:100%;display:block;object-fit:contain}
.empty-visual:has(img)::before,.empty-visual:has(img)::after{display:none}

@media(max-width:760px){
  .hero-summary{
    grid-template-columns:minmax(0,1fr) 104px;
    column-gap:8px;
    padding:13px 13px 13px 17px;
  }
  .hero-summary::after{display:none}
  .summary-copy p{display:none}
  .summary-kicker{max-width:210px;font-size:9px}
  .summary-main{margin-top:7px;gap:8px}
  .summary-number{font-size:56px}
  .summary-unit{font-size:10px}
  .summary-visual{width:104px;height:88px}
  .summary-art{transform:scale(1.12);transform-origin:center}

  .subscription-list{max-height:450px}
  .subscription-card{
    padding:12px 11px 11px;
    background:color-mix(in srgb,var(--level-color) 7%,#fffdf7);
    box-shadow:0 8px 20px rgba(27,26,23,.055);
  }
  .subscription-card::before{display:none}
  .identity-copy{gap:0}
  .identity-copy small{font-size:7px}
  .card-data{min-height:42px}
  .card-renewal>strong{font-size:27px}
  .card-metric{border-left-color:rgba(27,26,23,.08)}
  .card-progress{display:none}

  .status-legend{
    min-height:62px;
    height:62px;
    padding:7px 8px;
    display:grid;
    grid-template-columns:28px minmax(0,1fr);
    gap:4px;
    align-items:center;
    border-radius:19px;
  }
  .legend-heading{margin:0;display:grid;place-items:center}
  .legend-heading>div{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .legend-spark{width:24px;height:24px}
  .legend-items{grid-template-columns:repeat(6,minmax(0,1fr));gap:1px}
  .legend-item{min-height:44px;gap:4px;padding:2px 0}
  .legend-item b{font-size:8px}
  .legend-item i{width:8px;height:8px}
  .legend-item.is-current::before{inset:0 -2px;border-radius:12px}

  .empty-visual{
    width:160px;
    height:118px;
    margin-bottom:13px;
    transform:none;
  }
  .empty-state h3{font-size:22px}
  .empty-state p{margin:6px 0 12px}
}

/* Functional illustration system: focus the next renewal; keep all repeated cards neutral. */
@media(max-width:760px){
  .summary-art{transform:scale(1.18)}

  .subscription-card{
    background:#fffdf7;
    box-shadow:inset 0 0 0 1px rgba(27,26,23,.055),0 7px 18px rgba(27,26,23,.045);
  }
  .subscription-card::after{
    display:none;
  }
  .subscription-card .card-renewal>strong,
  .subscription-card .card-metric strong{color:var(--ink)}
  .card-metric{padding-bottom:0}
  .card-metric small:empty{display:none}
  .subscription-card.is-page-lead .card-data{
    min-height:0;
    margin-top:3px;
    flex:1;
    align-items:stretch;
  }
  .subscription-card.is-page-lead .card-renewal{
    grid-template-rows:auto auto;
    align-items:center;
    place-content:center;
    justify-items:center;
  }
  .subscription-card .card-renewal>strong{
    position:relative;
  }
  .subscription-card.is-page-lead .card-renewal>strong{
    width:100%;
    text-align:center;
    font-size:31px;
    transform:translateY(-4.5px);
  }
  .subscription-card .card-renewal>strong::after{
    content:"";
    position:absolute;
    width:16px;
    height:3px;
    left:50%;
    top:calc(100% + 6px);
    transform:translateX(-50%);
    border-radius:99px;
    background:var(--level-color);
    opacity:.72;
  }
  .subscription-card.is-page-lead .card-metric,
  .subscription-card.is-due-today .card-metric{
    align-self:stretch;
    place-items:center;
    align-content:center;
    padding:0 0 0 6px;
  }
  .subscription-card.is-due-today .card-metric strong{
    writing-mode:vertical-rl;
    text-orientation:upright;
    font-size:11px;
    line-height:1;
    font-weight:700;
    letter-spacing:2px;
  }
  .subscription-card.level-due .card-renewal>strong,
  .subscription-card.level-due .card-metric strong,
  .subscription-card.level-urgent .card-renewal>strong,
  .subscription-card.level-urgent .card-metric strong,
  .subscription-card.level-attention .card-renewal>strong,
  .subscription-card.level-attention .card-metric strong{
    color:color-mix(in srgb,var(--level-color) 82%,var(--ink));
  }
  .subscription-list.is-link-preview .subscription-card,
  .subscription-list.is-link-preview .subscription-card:not(.is-linked),
  .subscription-list.is-link-preview .subscription-card.is-linked{
    opacity:1;
    filter:none;
    transform:none;
    box-shadow:inset 0 0 0 1px rgba(27,26,23,.055),0 7px 18px rgba(27,26,23,.045);
  }
  .identity-mark,
  .identity-mark.has-brand-icon{
    width:36px;
    height:36px;
    border-radius:12px;
    clip-path:none;
  }
  .identity-mark.has-brand-icon.has-audited-asset{
    padding:5px;
    overflow:hidden;
    background:#fff;
    border:1px solid rgba(27,26,23,.1);
    box-shadow:0 4px 10px rgba(27,26,23,.07);
  }
  .identity-mark.has-brand-icon.has-audited-asset img{
    border-radius:7px;
    object-fit:cover;
  }
}

/* Restrained brand recognition: audited logo contours tint the card background. */
.subscription-card.has-brand-texture::before{
  content:"";
  display:block;
  position:absolute;
  z-index:2;
  width:112px;
  height:112px;
  right:10px;
  top:50%;
  border:0;
  border-radius:0;
  background:var(--brand-color);
  opacity:.1;
  transform:translateY(-50%);
  pointer-events:none;
  -webkit-mask:var(--brand-outline) center/contain no-repeat;
  mask:var(--brand-outline) center/contain no-repeat;
}
.subscription-card.has-brand-texture>*{position:relative;z-index:auto}
.subscription-card.has-brand-texture .card-topline{z-index:3}
.subscription-card.has-brand-texture .card-data{z-index:auto}
.subscription-card.has-brand-texture .date-top,
.subscription-card.has-brand-texture .card-renewal>strong,
.subscription-card.has-brand-texture .card-metric strong,
.subscription-card.has-brand-texture .card-metric small{position:relative;z-index:3}
.subscription-card.has-brand-texture .date-cluster{z-index:3}

@media(max-width:760px){
  .subscription-card.has-brand-texture::before{
    display:block;
    width:84px;
    height:84px;
    right:8px;
    top:51%;
    opacity:.13;
    transform:translateY(-50%);
  }
  .subscription-card.has-brand-texture::after{
    content:"";
    display:block;
    position:absolute;
    z-index:1;
    width:84px;
    height:84px;
    right:8px;
    top:51%;
    border-radius:18px;
    background:#fffdf7;
    transform:translateY(-50%);
    pointer-events:none;
  }
  .subscription-card.has-brand-texture.is-page-lead::before{
    width:88px;
    height:88px;
    right:6px;
    opacity:.12;
  }
  .subscription-card.has-brand-texture.is-page-lead::after{
    width:88px;
    height:88px;
    right:6px;
  }
}

/* Same-day dots sit above the day digits, away from the right-side brand texture. */
.card-renewal{position:relative}
.date-cluster{
  position:absolute;
  left:64%;
  top:-13px;
  z-index:2;
  width:23px;
  margin:0;
  justify-content:flex-start;
  transform:translateX(-50%);
}
@media(max-width:760px){
  .date-cluster{
    left:64%;
    top:-12px;
    width:20px;
  }
}

/* Pastel action surfaces keep controls distinct without introducing black slabs. */
.button-primary{
  color:var(--ink);
  border:1px solid rgba(27,26,23,.42);
  background:linear-gradient(145deg,#c6dfb5,var(--action-mint));
  box-shadow:inset 0 1px rgba(255,255,255,.62),0 7px 16px rgba(85,117,64,.13);
}
#addButton{
  background:linear-gradient(145deg,#f2d3d8,var(--action-coral));
  box-shadow:inset 0 1px rgba(255,255,255,.68),0 7px 16px rgba(139,79,91,.11);
}
.button-primary:hover,.action-main-button:hover{filter:saturate(1.06) brightness(1.02)}
.button-primary:active,.action-main-button:active{transform:scale(.98)}
.action-main-button{
  color:var(--ink);
  border:1px solid rgba(27,26,23,.34);
  background:linear-gradient(145deg,#edf4e8,var(--action-mint-soft));
  box-shadow:inset 0 1px rgba(255,255,255,.72),0 8px 18px rgba(85,117,64,.11);
}
.action-main-button>span:first-child{background:var(--action-cream);box-shadow:inset 0 0 0 1px rgba(27,26,23,.13)}
.action-main-button small{color:color-mix(in srgb,var(--ink) 62%,transparent)}
.action-restore{background:linear-gradient(145deg,#f5e1e4,var(--action-coral))}

/* Success is already visible in the updated cards. This notice remains for exceptional errors/recovery only. */
.toast{
  top:calc(var(--safe-top) + 18px);
  bottom:auto;
  width:max-content;
  max-width:min(360px,calc(100% - 32px));
  color:var(--ink);
  border:1px solid rgba(27,26,23,.32);
  background:linear-gradient(145deg,#f7dde1,var(--action-coral));
  box-shadow:0 9px 22px rgba(112,65,74,.14);
  transform:translate(-50%,-14px);
  text-align:center;
}
.toast.is-visible{transform:translate(-50%,0)}
@media(max-width:760px){.toast{top:calc(var(--safe-top) + 8px);font-size:11px}}

/* Mobile form hierarchy: input first, result second, one unmistakable primary action. */
@media(max-width:760px){
  .form-dialog form{padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .dialog-header{
    min-height:78px;
    margin-bottom:12px;
    padding:17px 18px 15px;
    border-radius:0 0 24px 24px;
    box-shadow:none;
  }
  .dialog-header h2{font-size:25px;line-height:1.15;letter-spacing:.015em}
  .dialog-header .icon-button{width:36px;height:36px;border-radius:12px;font-size:22px}
  .field{margin-bottom:10px}
  .field>label,.field legend,.field-label-row label{margin-bottom:5px;font-size:11.5px;font-weight:650}
  .field-label-row span{font-size:9px}
  .field input[type="text"],.field input[type="date"]{
    height:43px;
    padding-inline:13px;
    border:1px solid rgba(27,26,23,.1);
    border-radius:14px;
    box-shadow:none;
    font-size:14px;
  }
  #nameInput{border-color:rgba(27,26,23,.25);box-shadow:0 3px 0 rgba(27,26,23,.07)}
  .segmented-control{gap:7px}
  .segmented-control span{
    min-height:49px;
    border-radius:14px;
    background:rgba(255,253,247,.72);
    box-shadow:none;
    font-size:12.5px;
    font-weight:650;
  }
  .segmented-control small{margin-top:2px;font-size:8.5px;font-weight:450}
  .segmented-control input:checked+span{
    border-color:color-mix(in srgb,var(--accent) 72%,#9b7b2d);
    background:#fbf1d9;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.74);
  }
  .segmented-control input:checked+span::before{top:7px;right:8px;width:5px;height:5px;box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 14%,transparent)}
  .form-preview:has(.preview-copy){
    flex:0 0 146px;
    min-height:146px;
    max-height:146px;
    margin:3px 0 8px;
    padding:17px 12px 17px 21px;
    grid-template-columns:minmax(0,1fr) 122px;
    grid-template-rows:1fr;
    gap:10px;
    align-items:center;
    border:1px solid rgba(27,26,23,.06);
    border-radius:20px;
    box-shadow:0 7px 18px rgba(27,26,23,.035);
  }
  .form-preview:has(.preview-copy)::before{inset:18px auto 18px 8px;width:4px}
  .form-preview:has(.preview-copy)::after{width:84px;height:84px;right:-25px;bottom:-29px;box-shadow:0 0 0 15px color-mix(in srgb,var(--level-color,var(--accent)) 6%,transparent)}
  .form-preview .preview-copy{gap:5px;align-content:center}
  .form-preview .preview-copy strong{font-size:21px;line-height:1.22;font-weight:700;letter-spacing:-.015em}
  .form-preview .preview-copy b{font-size:9.5px;line-height:1.35;font-weight:500}
  .form-preview .preview-calendar{
    align-self:stretch;
    grid-template-columns:1fr auto 1fr;
    gap:4px;
    padding-top:0;
    border-top:0;
    border-left:1px solid rgba(27,26,23,.1);
  }
  .form-preview .preview-date-unit{gap:4px}
  .form-preview .preview-date-unit strong{font-size:39px}
  .form-preview .preview-date-unit small{font-size:9px}
  .form-preview .preview-calendar>i{font-size:19px}
  .dialog-actions{
    grid-template-columns:44px auto minmax(0,1fr);
    gap:8px;
    margin-top:auto;
    padding-top:10px;
  }
  .dialog-actions:has(.delete-icon-button[hidden]){grid-template-columns:auto minmax(0,1fr);padding-left:0}
  .dialog-actions .button{min-height:50px;border-radius:15px;font-size:13px}
  .dialog-actions .button-secondary{
    width:auto;
    min-width:78px;
    padding-inline:15px;
    color:var(--muted);
    border-color:transparent;
    background:transparent;
    box-shadow:none;
  }
  .dialog-actions .button-primary{
    border-width:1.5px;
    border-color:rgba(51,91,37,.48);
    background:linear-gradient(145deg,#bdddac,#9fc982);
    box-shadow:inset 0 1px rgba(255,255,255,.55),0 8px 18px rgba(77,118,53,.16);
    font-weight:750;
  }
}

@media(max-width:360px){
  .form-preview:has(.preview-copy){grid-template-columns:minmax(0,1fr) 106px;padding-inline:18px 9px}
  .form-preview .preview-copy strong{font-size:19px}
  .form-preview .preview-date-unit strong{font-size:34px}
}

/* The form header identifies the task; it is not a decorative banner. */
.dialog-heading{display:grid;gap:3px}
.dialog-kicker{color:var(--muted);font-size:9px;font-weight:600;letter-spacing:.08em}
.dialog-header::after{display:none}

/* Mini-tool WebView: reserve a reliable top interaction zone below native chrome. */
html.minitool-host{
  --safe-top:max(96px,var(--safe-area-inset-top,env(safe-area-inset-top,0px)));
}
html.minitool-host .device-status-bar{display:none!important}

.form-insights{display:grid}
.form-insights[hidden]{display:none}
.insights-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.insights-heading strong{font-size:12px;font-weight:700}
.insights-heading span{color:var(--muted);font-size:9px;font-weight:500}
.reminder-stages{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.reminder-stage{min-width:0;display:grid;grid-template-columns:7px 1fr;align-items:center;gap:1px 5px}
.reminder-stage i{grid-row:1/3;width:7px;height:7px;border-radius:50%;background:var(--level-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--level-color) 13%,transparent)}
.reminder-stage b{font-size:9px;line-height:1.1;font-weight:650;white-space:nowrap}
.reminder-stage small{color:var(--muted);font-size:8px;line-height:1.1}
.schedule-facts{display:grid;grid-template-columns:1.25fr 1fr;gap:7px}
.schedule-facts>span{min-width:0;padding:7px 8px;border-radius:10px;display:grid;gap:2px;background:rgba(255,255,255,.55)}
.schedule-facts small{color:var(--muted);font-size:7.5px}
.schedule-facts b{font-size:9.5px;font-weight:650;white-space:nowrap}
.local-save-note{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:8.5px}
.local-save-note svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.5}
.post-save-hint{display:grid;gap:6px;color:var(--muted)}
.post-save-hint>span{font-size:8.5px;font-weight:550}
.post-save-hint>div{display:flex;align-items:center;gap:8px}
.post-save-hint b{color:color-mix(in srgb,var(--ink) 72%,transparent);font-size:9px;font-weight:600}
.post-save-hint i{width:3px;height:3px;border-radius:50%;background:rgba(27,26,23,.22)}

@media(max-width:760px){
  .dialog-header{
    min-height:66px;
    margin:0 0 10px;
    padding:10px 0 8px;
    border-radius:0;
    background:transparent;
  }
  .dialog-header h2{font-size:22px;font-weight:700;letter-spacing:.01em}
  .dialog-kicker{font-size:8.5px}
  .dialog-header .icon-button{background:var(--surface);border-color:rgba(27,26,23,.14);box-shadow:0 4px 12px rgba(27,26,23,.05)}
  .form-preview:has(.preview-copy){flex-basis:132px;min-height:132px;max-height:132px;margin-bottom:8px}
  .form-insights{
    flex:0 0 157px;
    min-height:157px;
    padding:12px 13px 10px;
    gap:10px;
    border:1px solid rgba(27,26,23,.07);
    border-radius:18px;
    background:rgba(255,253,247,.64);
    box-shadow:0 6px 16px rgba(27,26,23,.03);
  }
  .local-save-note{padding:6px 8px;border-radius:10px;background:var(--action-cream)}
  .post-save-hint{flex:0 0 48px;padding:9px 12px;border-radius:14px;background:rgba(255,253,247,.42)}
}

@media(max-width:360px){
  .form-insights{padding-inline:10px}.insights-heading span{font-size:8px}.reminder-stage b{font-size:8px}.reminder-stage small{font-size:7.5px}.post-save-hint{padding-inline:10px}.post-save-hint>div{gap:6px}
}

/* One exit path, one primary action; tall screens distribute rhythm instead of storing one dead gap. */
@media(max-width:760px){
  .dialog-actions{grid-template-columns:auto minmax(0,1fr);margin-top:0}
  .dialog-actions:has(.delete-icon-button[hidden]){grid-template-columns:minmax(0,1fr)}
  .dialog-actions .delete-icon-button{
    width:auto;
    min-width:88px;
    padding-inline:13px;
    color:#955247;
    border:1px solid rgba(149,82,71,.2);
    background:#faebe6;
    font-size:11px;
    font-weight:650;
  }
  .dialog-actions .delete-icon-button::after{content:none}
}
@media(max-width:760px) and (min-height:760px){
  .form-dialog form{justify-content:space-between}
  .dialog-header,.field,.form-preview:has(.preview-copy),.form-insights,.post-save-hint,.dialog-actions{margin-top:0;margin-bottom:0}
}
