


:root {
  

  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --surface-3: #f0f0f2;

  

  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #a1a1a6;

  

  --line: #e8e8ed;
  --line-2: #d2d2d7;

  

  --accent: #1d1d1f;
  --on-accent: #ffffff;

  


  

  --tint: #007aff;
  

  --ring: color-mix(in srgb, var(--tint) 32%, transparent);     

  --ring-soft: color-mix(in srgb, var(--tint) 12%, transparent);

  --green: #34c759;
  --red: #ff3b30;
  --track: #e8e8ed;
  

  --ring-track-outer: color-mix(in srgb, var(--green) 18%, var(--track));
  --ring-track-inner: color-mix(in srgb, var(--tint) 10%, var(--track));
  --warn: #b42318;

  

  --fs-display: 32px;
  --fs-title: 20px;
  --fs-body: 16px;
  --fs-section: 14px;
  --fs-meta: 12px;
  --lh-display: 1.15;   

  --lh-title: 1.25;     

  --lh-body: 1.5;       

  --lh-meta: 1.4;       


  

  --num-feature: tabular-nums;   


  

  --empty-ink: var(--text-2, #6e6e73);

  

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;

  

  --badge-radius: var(--capsule);
  --badge-weight: 500;
  --badge-s-h: 20px;  --badge-s-font: 11px;  --badge-s-pad: 0 var(--sp-2);
  --badge-m-h: 24px;  --badge-m-font: 12px;  --badge-m-pad: 0 10px;
  --badge-l-h: 28px;  --badge-l-font: 14px;  --badge-l-pad: 0 var(--sp-3);

  

  --btn-l-h: 44px;
  --btn-m-h: 36px;
  --btn-s-h: 28px;
  --btn-pad-l: var(--sp-6);   

  --btn-pad-m: var(--sp-4);   

  --btn-pad-s: var(--sp-3);   

  --btn-radius: var(--capsule);

  

  --input-h: 44px;
  --input-h-search: 40px;
  --input-pad-y: 12px;
  --input-pad-x: 15px;
  --input-line: 1.5;            


  

  --radius-sm: 10px;   

  --radius: 20px;      

  --radius-lg: 26px;   

  --capsule: 980px;    


  

  --shadow: 0 2px 6px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.07);
  --shadow-pop: 0 16px 48px rgba(0, 0, 0, 0.16), 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.035);   


  

  --card-border: var(--line);
  --card-border-subtle: color-mix(in srgb, var(--line) 60%, transparent);
  --card-shadow-primary: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.07);
  --card-shadow-secondary: var(--shadow);
  --card-shadow-nested: none;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);          

  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);   

  

  --ease-pop: cubic-bezier(0.165, 0.84, 0.44, 1);
  --dur-fast: 0.3s;                                

  --dur-base: 0.45s;                               

  --dur-slow: 0.85s;                               

  --dur-instant: 0.15s;                            

  

  --dur-data: 0.9s;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d0f;
    --surface: #1c1c1e;
    --surface-2: #232326;
    --surface-3: #2c2c2e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #6e6e73;
    --line: #2c2c2e;
    --line-2: #3d3d41;
    --accent: #f5f5f7;
    --on-accent: #0d0d0f;
    --track: #2c2c2e;
    --warn: #e06a5c;
    --tint: #0a84ff;
    --ring: color-mix(in srgb, var(--tint) 45%, transparent);
    --ring-soft: color-mix(in srgb, var(--tint) 20%, transparent);
    --green: #30d158;
    --red: #ff453a;
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-pop: 0 16px 48px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.25);
    --card-shadow-primary: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme="dark"] {
  --bg: #0d0d0f;
  --surface: #1c1c1e;
  --surface-2: #232326;
  --surface-3: #2c2c2e;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --line: #2c2c2e;
  --line-2: #3d3d41;
  --accent: #f5f5f7;
  --on-accent: #0d0d0f;
  --track: #2c2c2e;
  --warn: #e06a5c;
  --tint: #0a84ff;
  --ring: color-mix(in srgb, var(--tint) 45%, transparent);
  --ring-soft: color-mix(in srgb, var(--tint) 20%, transparent);
  --green: #30d158;
  --red: #ff453a;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 16px 48px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.25);
    --card-shadow-primary: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", "Helvetica", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { min-height: 100vh; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; }
a { color: var(--text); text-decoration: none; }
.hidden { display: none !important; }



button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}


[role="button"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}



.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--text-2); margin-bottom: var(--sp-2); letter-spacing: 0.2px; }


.field input, .field select {
  box-sizing: border-box;
  width: 100%;
  height: var(--input-h);
  padding: 0 var(--input-pad-x);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--input-line);
  outline: none;
  appearance: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 98px;                 

  padding: var(--input-pad-y) var(--input-pad-x);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--input-line);
  outline: none;
  resize: vertical;                 

  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}


.field input[type="date"] {
  appearance: auto;
  -webkit-appearance: auto;
  min-height: var(--input-h);
  padding-right: var(--input-pad-x);
}


.field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a1a1a6' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
  cursor: pointer;
}


.field input:focus, .field select:focus, .field textarea:focus, .search:focus {
  border-color: var(--tint);
  box-shadow: 0 0 0 3px var(--ring-soft);
}
.row-inline { display: flex; gap: var(--sp-3); }



.btn,
.title-action,
.btn-mini,
.icon-btn,
.sec-action,
.toast-action,
#sheet-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: var(--btn-radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease),
    opacity var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}


.btn:active,
.title-action:active,
.btn-mini:active,
.icon-btn:active,
.sec-action:active,
.chip:active,
.check:active,
.toast-action:active,
#sheet-close:active { transform: scale(0.98); }


.title-action:disabled,
.sec-action:disabled,
.btn-mini:disabled,
.icon-btn:disabled,
.chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}



.btn {
  width: 100%;
  height: var(--btn-l-h);
  padding: 0 var(--btn-pad-l);
  border: none;
  background: var(--tint);
  color: #ffffff;
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: 0.1px;
  margin-top: var(--sp-3);
  box-shadow: none;
}
.btn:hover { background: color-mix(in srgb, #000 8%, var(--tint)); }
.btn:active { background: color-mix(in srgb, #000 14%, var(--tint)); }
.btn:disabled { opacity: 0.35; transform: none; background: var(--tint); }

.title-action {
  height: var(--btn-m-h);
  padding: 0 var(--btn-pad-m);
  border: none;
  background: var(--tint);
  color: #ffffff;
  font-size: var(--fs-section);
  font-weight: 600;
  letter-spacing: 0.1px;
  box-shadow: none;
}
.title-action:hover { background: color-mix(in srgb, #000 8%, var(--tint)); }
.title-action:active { background: color-mix(in srgb, #000 14%, var(--tint)); }



.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--text);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-3); }

.btn-mini {
  flex: none;
  height: var(--btn-m-h);
  padding: 0 var(--btn-pad-s);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-section);
  font-weight: 500;
  box-shadow: none;
}
.btn-mini:hover { background: var(--surface-2); border-color: var(--text-3); }



.btn-danger {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--warn);
  box-shadow: none;
}
.btn-danger:hover {
  background: color-mix(in srgb, var(--warn) 7%, transparent);
  border-color: color-mix(in srgb, var(--warn) 55%, transparent);
  color: var(--warn);
}
.btn-mini.danger { background: transparent; border-color: var(--line-2); color: var(--red); }
.btn-mini.danger:hover {
  background: color-mix(in srgb, var(--red) 7%, transparent);
  border-color: color-mix(in srgb, var(--red) 55%, transparent);
}


.btn-danger-solid { background: var(--warn); border-color: var(--warn); color: #ffffff; }
.btn-danger-solid:hover { background: color-mix(in srgb, #000 10%, var(--warn)); color: #ffffff; }
.btn-danger-solid:active { background: color-mix(in srgb, #000 16%, var(--warn)); }


.btn-mini.danger.armed { background: var(--red); border-color: var(--red); color: #fff; }
.btn-mini.danger.armed:hover { background: color-mix(in srgb, #000 10%, var(--red)); }



#main { padding-bottom: 84px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-5); }

.topbar {
  padding: var(--sp-3) 0 var(--sp-4);
}
.topbar-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.title-lg {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-weight: 700;
  letter-spacing: -0.8px;
  margin: 0;
}
.title-sm {
  font-size: var(--fs-section);
  line-height: var(--lh-meta);
  color: var(--text-2);
  margin: 0 0 var(--sp-1);
  letter-spacing: 0.3px;
}




.topbar-actions { display: flex; align-items: center; gap: var(--sp-2); }


.icon-btn {
  width: var(--btn-m-h);
  height: var(--btn-m-h);
  flex-shrink: 0;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text-2);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--text-3); color: var(--text); }



#refresh-btn.spin svg { animation: refreshSpin 0.6s linear infinite; }
@keyframes refreshSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }



.brand-row { display: flex; align-items: center; gap: var(--sp-2); }
.brand-logo { flex-shrink: 0; display: block; }


.brand-mark {
  fill: none;
  stroke: #34C759;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html[data-theme="dark"] .brand-mark { stroke: #30D158; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .brand-mark { stroke: #30D158; }
}
.side-brand {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.2;
  

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  

  color: var(--text);
  width: fit-content;
}



.sidebar { display: none; }
@media (min-width: 900px) {
  #main { padding-left: 248px; padding-bottom: 64px; }
  .wrap { padding: 0 calc(var(--sp-6) + var(--sp-5)); }
  .sidebar {
    display: flex;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 248px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: var(--sp-6) var(--sp-4) var(--sp-5);
    flex-direction: column;
    gap: var(--sp-1);
    z-index: 30;
  }
  .brand-row { padding: 0 var(--sp-2) var(--sp-3); }
  .brand-mobile { display: none; }
  .sidebar .nav-item {
    text-align: left;
    padding: 10px var(--sp-3);
    border-radius: var(--sp-2);
    color: var(--text-2);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  }
  

  .sidebar .nav-item:hover { background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); }
  

  .sidebar .nav-item:active { background: color-mix(in srgb, var(--text) 9%, transparent); }
  

  .sidebar .nav-item.active {
    

    background: color-mix(in srgb, var(--tint) 9%, transparent);
    color: var(--tint);
    font-weight: 600;
  }
  

  .sidebar .nav-item.active:active { background: color-mix(in srgb, var(--tint) 15%, transparent); }
  

  .sidebar .nav-item svg { width: 18px; height: 18px; stroke: currentColor; flex-shrink: 0; }
  .sidebar-foot {
    margin-top: auto;
    font-size: 11px;
    color: var(--text-3);
    padding: 0 var(--sp-2);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    align-items: flex-start;
  }
  .sidebar-foot button { color: var(--text-3); font-size: 11px; }
  .sidebar-foot button:hover { color: var(--text); }
  .sidebar-foot .foot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: var(--sp-2);
    min-width: 0;
  }
  .sidebar-foot .foot-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-foot .foot-row .icon-btn { width: 32px; height: 32px; }
  .tabbar { display: none; }
}



.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  padding: var(--sp-2) 0 max(var(--sp-2), env(safe-area-inset-bottom));
  z-index: 30;
}
.tabbar button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) 0;
  font-size: 10px;
  color: var(--text-3);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease),
    background-color var(--dur-instant) var(--ease);
}


.tabbar button:active { background-color: color-mix(in srgb, var(--text) 6%, transparent); }
.tabbar button.active:active { background-color: color-mix(in srgb, var(--tint) 10%, transparent); }
.tabbar button.active { color: var(--tint); font-weight: 600; }
.tabbar svg { stroke: currentColor; }
@media (min-width: 900px) { .tabbar { display: none; } }



.card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: var(--sp-6);
  margin-bottom: var(--sp-5);
  box-shadow: var(--card-shadow-secondary);
  transition: box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.card:hover { box-shadow: var(--shadow-hover); border-color: var(--line-2); }



.card.hero {
  box-shadow: var(--card-shadow-primary);
  border-color: color-mix(in srgb, var(--line) 82%, var(--line-2));
}



.card.card-tight {
  padding: 0;
  overflow: hidden;
  box-shadow: var(--card-shadow-nested);
  border-color: var(--card-border-subtle);
}
.card.card-tight:hover { box-shadow: none; border-color: var(--line); }


.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: var(--sp-6) var(--sp-1) var(--sp-4);
}


.sec-label {
  font-size: var(--fs-section);
  line-height: var(--lh-title);
  color: var(--text-2);
  margin: 0;
  letter-spacing: 0.2px;
  font-weight: 600;
}


.sec-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }


.sec-action {
  height: var(--btn-s-h);
  padding: 0 var(--sp-2);
  font-size: var(--fs-section);
  font-weight: 500;
  color: var(--tint);
  background: transparent;
  border: none;
}
.sec-action:hover { color: color-mix(in srgb, #000 12%, var(--tint)); }



.lv-card { padding: var(--sp-4) var(--sp-5) var(--sp-4); }
.lv-row { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-3); }
.lv-label { margin: 0; font-size: var(--fs-section); line-height: var(--lh-title); font-weight: 600; color: var(--text); }


.lv-seg {
  margin-left: var(--sp-2);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: 500;
  color: var(--tint);
  white-space: nowrap;
}
.lv-sub { margin: var(--sp-1) 0 0; font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--text-3); }
.lv-pct {
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  font-variant-numeric: tabular-nums;   

}





#view .ring-wrap text { font-size: var(--fs-display); font-weight: 600; }

.hero {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.ring-wrap { flex-shrink: 0; }
.hero-info { flex: 1; min-width: 180px; }


.hero-info p {
  margin: 0 0 var(--sp-1);
  font-size: var(--fs-section);
  line-height: var(--lh-body);
  font-weight: 500;
  color: var(--text-2);
}
.hero-info .big {
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-2);
}


.hero-info .tier {
  display: inline-block;
  margin-top: var(--sp-3);
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-title);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--tint);
  font-variant-numeric: var(--num-feature);
  white-space: nowrap;
  flex: none;
}
.legend { display: flex; gap: var(--sp-4); margin-top: var(--sp-2); flex-wrap: wrap; }
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  color: var(--text-2);
}
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }



.list-item {
  position: relative;                

  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 14px var(--sp-5);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}


.list-item::after {
  content: '';
  position: absolute;
  left: var(--sp-5);
  right: var(--sp-5);
  bottom: 0;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}
.list-item[data-id]::after { left: 66px; }   

.list-item:last-child::after { display: none; }



.list-item:hover { background-color: color-mix(in srgb, var(--tint) 4%, transparent); }
.list-item:active { background-color: color-mix(in srgb, var(--tint) 7%, transparent); }

.list-item .grow { flex: 1; min-width: 0; }
.list-item .name {
  font-size: var(--fs-body);
  font-weight: 500;                   

  line-height: var(--lh-body);
  

  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-item .meta {
  font-size: var(--fs-meta);          

  line-height: var(--lh-meta);
  color: var(--text-2);
  margin-top: var(--sp-1);
}





.list-item .name { position: relative; }
.list-item.done .name { color: var(--text-2); }
.list-item .name::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;                          

  height: 1px;
  background: currentColor;              

  transform: scaleX(0);
  transform-origin: left center;         

  opacity: 0;
  pointer-events: none;                  

}


.list-item.done .name::after {
  opacity: 1;
  transform: scaleX(1);
}


.list-item.done[data-line-anim] .name::after {
  animation: lineDraw var(--line-dur, 0.9s) var(--ease);
}
@keyframes lineDraw {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}




.list-item:not(.done)[data-line-anim] .name::after {
  animation: lineRetract var(--line-dur-retract, 0.6s) var(--ease-in-out) both;
}
@keyframes lineRetract {
  from { transform: scaleX(1); opacity: 1; }
  to   { transform: scaleX(0); opacity: 0; }
}
.list-item.done .meta { color: var(--text-3); }



.trash-item { gap: var(--sp-2); }
.trash-item .btn-mini { background: transparent; }   




.trash-clear-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-2);
}



.badge,
.list-item .badge,
.trash-count,
.pagoda-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--badge-radius);
  font-weight: var(--badge-weight);
  line-height: 1;
  white-space: nowrap;
  flex: none;
}


.trash-count,
.pagoda-hint {
  height: var(--badge-s-h);
  font-size: var(--badge-s-font);
  padding: var(--badge-s-pad);
}


.badge {
  height: var(--badge-m-h);
  font-size: var(--badge-m-font);
  padding: var(--badge-m-pad);
}


.list-item .badge {
  height: var(--badge-l-h);
  font-size: var(--badge-l-font);
  padding: var(--badge-l-pad);
}



.badge {
  color: var(--text-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.badge.urgent { color: #ffffff; background: var(--red); border-color: var(--red); }
.badge.done { color: var(--text-3); background: transparent; }
.badge.muted { color: var(--text-3); background: transparent; border-color: var(--line); }







.list-item .check {
  flex: none;
  width: 30px;
  height: 30px;
  border: 2px solid var(--text-3);
  border-radius: 50%;
  background: transparent;
  color: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  

  transition: background-color var(--dur-instant) var(--ease),
    border-color var(--dur-instant) var(--ease),
    color var(--dur-instant) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.list-item .check svg { width: 14px; height: 14px; display: block; stroke-width: 4; }
.list-item .check:hover { border-color: var(--green); }


.list-item.done .check {
  background: color-mix(in srgb, #000 18%, var(--green));
  border-color: color-mix(in srgb, #000 18%, var(--green));
  color: #ffffff;
}





#trash-btn { position: relative; }
.trash-count {
  position: absolute;
  top: -5px; right: -5px;
  min-width: var(--badge-s-h);
  background: var(--red);
  color: #fff;
}

.bar {
  height: 4px;
  background: var(--track);
  border-radius: var(--capsule);
  overflow: hidden;
  margin-top: 8px;
}
.bar > i {
  display: block;
  height: 100%;
  width: 100%;                          

  background: var(--tint);
  border-radius: var(--capsule);
}
.bar.thick { height: 8px; }
.bar.thick > i { border-radius: var(--capsule); }



.grp-head { display: flex; align-items: center; gap: var(--sp-2); }
.cat-badge {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}



.win-year { position: relative; padding-left: 28px; margin-bottom: 20px; }
.win-year::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 32px;
  bottom: 4px;
  width: 2px;
  border-radius: var(--capsule);
  background: var(--line);
}
.win-year-label {
  margin: 0 0 10px;
  font-size: var(--fs-section);
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--text-3);
}


.win-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 14px var(--sp-3);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease);
}
.win-item::after {
  content: '';
  position: absolute;
  left: var(--sp-3);
  right: var(--sp-3);
  bottom: 0;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}
.win-item:last-child::after { display: none; }
.win-item:hover { background-color: color-mix(in srgb, var(--tint) 4%, transparent); }
.win-item .grow { flex: 1; min-width: 0; }
.win-item .grow > div:first-child {
  font-size: var(--fs-body) !important;
  font-weight: 500 !important;
  line-height: var(--lh-body);
}
.win-item .grow > div:last-child {
  font-size: var(--fs-meta) !important;
  font-weight: 400 !important;
  line-height: var(--lh-meta);
}
.win-dot {
  position: absolute;
  left: -23px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--surface);
}





.search {
  box-sizing: border-box;
  width: 100%;
  height: var(--input-h-search);
  padding: 0 var(--input-pad-x) 0 var(--sp-4);
  margin: 0 0 var(--sp-3);
  border: 1px solid var(--line-2);
  border-radius: var(--capsule);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-section);
  font-weight: 400;
  line-height: var(--input-line);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.search::placeholder { color: var(--text-3); }




.field input::placeholder,
.field textarea::placeholder,
.search::placeholder { color: var(--text-3); opacity: 1; -webkit-text-fill-color: var(--text-3); }



.field input:disabled,
.field select:disabled,
.field textarea:disabled,
.search:disabled {
  background: var(--surface-3);
  border-color: var(--line);
  color: var(--text-3);
  -webkit-text-fill-color: var(--text-3);
  cursor: not-allowed;
}

.chips { display: flex; gap: var(--sp-2); overflow-x: auto; padding-bottom: 2px; margin-bottom: var(--sp-4); scrollbar-width: none; -ms-overflow-style: none; }
.chips::-webkit-scrollbar { display: none; }


.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-s-h);
  padding: 0 var(--btn-pad-s);
  border: 1px solid var(--line-2);
  border-radius: var(--btn-radius);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--fs-section);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  flex: none;
  cursor: pointer;
  

  transition: background-color var(--dur-instant) var(--ease),
    border-color var(--dur-instant) var(--ease),
    color var(--dur-instant) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.chip:hover { background: var(--surface-2); border-color: var(--text-3); color: var(--text); }
.chip.active { background: var(--tint); border-color: var(--tint); color: #ffffff; }






.confirm-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: saturate(100%) blur(2px);
  -webkit-backdrop-filter: saturate(100%) blur(2px);
  z-index: 60;                    

  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
  animation: lbFade 0.2s var(--ease);
}
.confirm-box {
  width: min(320px, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  animation: cardIn var(--dur-base) var(--ease) backwards;
}
.confirm-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-body);
  line-height: var(--lh-title);
  font-weight: 600;
  color: var(--text);
}


.confirm-text {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-section);
  line-height: var(--lh-body);
  color: var(--text-2);
}
.confirm-ops { display: flex; gap: var(--sp-3); }
.confirm-ops .btn { flex: 1; }

.sheet-mask {
  position: fixed;
  inset: 0;
  

  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: saturate(100%) blur(2px);
  -webkit-backdrop-filter: saturate(100%) blur(2px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 900px) { .sheet-mask { align-items: center; } }
.sheet {
  background: var(--surface);
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  

  padding: var(--sp-6) var(--sp-6) 0;
  max-height: 88vh;
  overflow-y: auto;
  

  box-shadow: var(--shadow);
  

  animation: rise var(--dur-fast) var(--ease-in-out);
}


.sheet:not(.sheet--foot) { padding-bottom: max(var(--sp-6), env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .sheet { border-radius: var(--radius-lg); } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }


@keyframes toastFade { from { opacity: 0; } to { opacity: 1; } }


.sheet h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.2px; }
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}


#sheet-close {
  height: var(--btn-s-h);
  padding: 0 var(--sp-3);      

  font-size: var(--fs-section);
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: none;
  flex-shrink: 0;
}
.sheet-head button:hover { color: var(--text); }



.sheet-foot {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 0 calc(-1 * var(--sp-6));
  padding: var(--sp-3) var(--sp-6) max(var(--sp-3), env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.sheet-foot > .btn:first-child { margin-top: 0; }   




.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  color: var(--text-3);
}
.kv:last-child { border-bottom: none; }
.kv span:last-child {
  font-size: var(--fs-section);
  line-height: var(--lh-title);
  font-weight: 500;
  color: var(--text-2);
  text-align: right;
  min-width: 0;
}
.sheet-tip { font-size: var(--fs-meta); line-height: var(--lh-body); color: var(--text-2); margin: 0 0 var(--sp-4); }





.guide-card { padding: var(--sp-5); }
.guide-head { margin-bottom: 14px; }
.guide-title {
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.2px;
}
.guide-sub {
  font-size: var(--fs-meta);
  color: var(--text-3);
  margin: var(--sp-1) 0 0;
  line-height: var(--lh-meta);
  text-wrap: balance;          

}


.pagoda-wrap {
  position: relative;
  display: block;
  cursor: zoom-in;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: var(--sp-2) var(--sp-1) var(--sp-1);
  transition: border-color var(--dur-fast) var(--ease);
}
.pagoda-wrap:hover { border-color: var(--line-2); }
.pagoda {
  display: block;
  width: 100%;
  

  max-width: 400px;
  margin: 0 auto;
  height: auto;
}
.pagoda .pg-name {
  font-size: 14px;
  font-weight: 600;
  fill: #ffffff;
  text-anchor: middle;
}
.pagoda .pg-amt {
  font-size: 12px;
  font-weight: 400;
  fill: rgba(255, 255, 255, 0.92);
  text-anchor: middle;
}
.pagoda .pg-band {
  font-size: 12px;
  font-weight: 500;
  fill: #ffffff;
  text-anchor: middle;
}
.pagoda-hint {
  position: absolute;
  right: 10px;
  top: 10px;
  color: var(--text-2);
  background: var(--surface);
  border: 0.5px solid var(--line-2);
  pointer-events: none;
}



@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
.pagoda-full {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
  animation: lbFade 0.2s var(--ease);
}
.pagoda-full-body { width: min(560px, 100%); max-height: 100%; }
.pagoda-full-body .pagoda { max-height: 100%; }
.pagoda-full-close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}





.saving-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  box-shadow: var(--shadow-soft);
  border-color: var(--line-2);
}
.saving-main { flex: 1; min-width: 0; cursor: pointer; }
.saving-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.saving-name { font-size: 16px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


.saving-pct { font-size: var(--fs-section); font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.saving-pct.is-empty { color: var(--text-2); }
.saving-pct.is-progress { color: var(--tint); }
.saving-pct.is-complete { color: var(--green); }
.saving-num { font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--text-2); margin: var(--sp-1) 0 var(--sp-2); font-variant-numeric: tabular-nums; }
.saving-ops { display: flex; gap: var(--sp-2); flex-shrink: 0; }
@media (max-width: 560px) {
  .saving-card { flex-direction: column; align-items: stretch; gap: 12px; }
  .saving-ops { justify-content: flex-end; }
}






#view { transition: opacity var(--dur-fast) var(--ease); }
#view.fade-swap { opacity: 0; }



.anim-in { animation: cardIn var(--dur-slow) var(--ease) backwards; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}



#view circle[data-dash] { transition: stroke-dasharray var(--dur-data) var(--ease); }



#view .bar > i {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-data) var(--ease);
}



.sheet-mask { animation: maskIn var(--dur-fast) var(--ease); }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }



.sidebar .nav-item, .tabbar button { transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }



#view .ring-wrap text,           

.hero-info p,                    

.lv-sub,                         

.list-item .meta,                

.win-item .grow > div:last-child, 

.kv span:last-child {           

  font-variant-numeric: var(--num-feature);
}



.hero-info .big,
#view .ring-wrap text { letter-spacing: -0.4px; }






#levelup {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  

  background: rgba(0, 0, 0, 0.16);
  animation: maskIn var(--dur-fast) var(--ease) both;
}
.lvup-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  min-width: 200px;
  max-width: 76vw;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  text-align: center;
  

  animation: lvupIn var(--dur-slow) var(--ease) both;
}
.lvup-cap {
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.12em;
}
.lvup-num {
  font-size: 44px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--tint);
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}


.lvup-name {
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  font-weight: 600;
  color: var(--text);
}
.lvup-title {
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  color: var(--text-2);
}
@keyframes lvupIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: none; }
}

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti-piece {
  position: absolute;
  width: 7px; height: 12px;
  border-radius: 2px;
  opacity: 0;
  animation: fall linear forwards;
}
@keyframes fall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0.85; }
}


.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--accent) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  color: var(--on-accent);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--capsule);
  font-size: 15px;
  font-weight: 500;
  z-index: 70;
  box-shadow: var(--shadow-pop);
  animation: toastFade 0.35s var(--ease);
  transition: opacity 0.25s var(--ease);
  

  width: max-content;
  max-width: 82vw;
  text-align: center;
}


.toast > span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 900px) { .toast { bottom: 36px; } }

.empty-note {
  text-align: center;
  color: var(--text-2);          

  font-size: var(--fs-body);
  line-height: var(--lh-body);
  padding: 72px 0;
}



.empty-ill { display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(var(--sp-6) * 2) var(--sp-5) calc(var(--sp-6) * 2); }
.empty-ill .empty-art {
  width: 92px; height: 92px;
  border-radius: 24px;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  

}


.empty-ill svg { stroke: var(--empty-ink); }
.empty-ill .empty-note { padding: 0; }
.empty-sub { font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--text-3); }


@media (max-width: 560px) {
  .empty-ill { padding: 28px var(--sp-4); }
  

  .empty-ill .empty-art {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    margin-bottom: var(--sp-3);
  }
}



body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
}


body.reduced-motion #view.fade-swap { opacity: 1; }



.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}



.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-3);
  font-size: 14px;
}
.boot.hidden { display: none; }
.boot-logo {
  width: 56px;
  height: 56px;
  

  animation: boot-pop 0.75s var(--ease-pop) 3 alternate both;
}
.boot-text { letter-spacing: 0.04em; }
@keyframes boot-pop {
  from { transform: scale(0.95); opacity: 0.82; }
  to   { transform: scale(1); opacity: 1; }
}
body.reduced-motion .boot-logo { animation: none; }


body.reduced-motion #levelup,
body.reduced-motion .lvup-card { animation: none; }


body.reduced-motion #refresh-btn.spin svg { animation: none; }



.toast { display: flex; align-items: center; gap: var(--sp-3); }


.toast-action {
  flex-shrink: 0;
  height: var(--btn-s-h);
  padding: 0 var(--btn-pad-s);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  font-size: var(--fs-section);
  font-weight: 500;
  background: transparent;
}
.toast-action:hover { background: rgba(255, 255, 255, 0.18); }
.toast-action:hover { background: rgba(255, 255, 255, 0.18); }
