


:root {
  
  --bg-deep: #0d0f13;
  --bg-panel: #13161b;
  --bg-card: #191d24;
  --bg-hover: #20252e;
  --border-subtle: #262c37;
  --border-accent: #5b8aff;
  
  --text-primary: #e7eaf0;
  --text-secondary: #a3abb8;
  --text-dim: #76808f;
  
  --accent: #6c9bff;
  --accent-2: #b39aff;
  --success: #52d489;
  --warn: #e8b64c;
  --danger: #f27575;
  --expense: #f08aa8;
  --violet: #a78bfa;
  --orange: #eda15c;
  
  --netease: #D43C33;
  
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, 'Courier New', monospace;
  
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --overlay: rgba(10, 12, 16, 0.55);
  
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 4px 12px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
  
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.24s;
  
  
  --fs-2xs: 12px;       
  --fs-xs: 13px;        
  --fs-r: 1;            
  --fs-sm: max(12px, calc(14px * var(--fs-r)));    
  --fs-base: max(12.5px, calc(15px * var(--fs-r))); 
  --fs-md: max(13px, calc(16px * var(--fs-r)));    
  --fs-lg: calc(18px * var(--fs-r));    
  --fs-xl: calc(20px * var(--fs-r));    
  --fs-2xl: calc(22px * var(--fs-r));   
  --fs-3xl: calc(26px * var(--fs-r));   
  --fs-hero: calc(40px * var(--fs-r));  
  --fs-display: calc(38px * var(--fs-r)); 
  --ls-tight: -0.02em;
  
  --scroll-thumb: #313846;
  --scroll-thumb-hover: #46516180;

  
  .font-panel {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
    width: 232px; padding: 12px 14px 10px;
    background: var(--bg-panel); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.28);
  }
  .font-panel-row { display: flex; align-items: center; gap: 8px; }
  .font-panel-tip { font-size: var(--fs-2xs); color: var(--text-dim); flex: none; }
  .font-range {
    flex: 1; min-width: 0; height: 28px;                 
    -webkit-appearance: none; appearance: none;
    background: transparent; touch-action: pan-y;
  }
  .font-range::-webkit-slider-runnable-track {
    height: 4px; border-radius: 2px;
    background: var(--border);
  }
  .font-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px; margin-top: -9px;         
    border-radius: 50%; background: var(--accent);
    border: 2px solid var(--bg-panel);
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
  }
  .font-range::-moz-range-track {
    height: 4px; border-radius: 2px; background: var(--border);
  }
  .font-range::-moz-range-thumb {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--accent); border: 2px solid var(--bg-panel);
  }
  .font-panel-foot {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-top: 8px; gap: 8px;
  }
  .font-panel-note { font-size: var(--fs-2xs); color: var(--text-dim); }
  .font-panel-px {
    font-size: var(--fs-sm); font-weight: 700; color: var(--accent);
    font-variant-numeric: tabular-nums; flex: none;   
  }
  .font-panel-reset {
    width: 100%; margin-top: 8px; padding: 7px 0; min-height: 34px;
    font-size: var(--fs-xs); color: var(--text-secondary);
    background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer;
  }
  .font-panel-reset:active { background: var(--bg-deep); }

  
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 35%, transparent);

  
  --xq-stone: #acb099;        
  --xq-stone-dark: #8b9980;   
  --xq-groove: #7c816a;       
  --xq-groove-hi: #b7baa5;    
  --xq-coin-face: #ffe3a3;    
  --xq-coin-edge: #e0bc82;    
  --xq-coin-side: #b8873f;    
  --xq-coin-rim: #fde2ac;     
  --xq-coin-shadow: rgba(38, 46, 32, 0.45);
  --xq-red-ink: #a8231f;      
  --xq-black-ink: #241a12;    
  --xq-sel-ring: #ffcf5c;     
}


html.light {
  --bg-deep: #f4f5f7;
  --bg-panel: #fbfbfc;
  --bg-card: #ffffff;
  --bg-hover: #eef0f3;
  --border-subtle: #e3e6ea;
  --border-accent: #2d5ecd;
  --text-primary: #1c2230;
  --text-secondary: #565e6c;
  --text-dim: #666e7a;      
  --accent: #2d5ecd;        
  --accent-2: #7d5ce0;
  --success: #128045;       
  --warn: #a8741a;
  --danger: #cc3d3d;        
  --expense: #bd4c76;       
  --violet: #7c5cd6;
  --orange: #a85715;        
  --overlay: rgba(16, 24, 40, 0.35);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.07);
  --shadow-pop: 0 4px 12px rgba(16, 24, 40, 0.1), 0 16px 40px rgba(16, 24, 40, 0.14);
  --scroll-thumb: #d3d8df;
  --scroll-thumb-hover: #b9c0c9;
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
}


.app-container {
  
  position: relative;
  max-width: 1100px; margin: 0 auto;
  padding: 16px 16px 24px;
}

@media (min-width: 769px) {
  .app-container { padding-bottom: calc(var(--tabbar-h) + var(--tabbar-safe) + 20px); }
}


.header {
  
  padding: 2px 0 0;
  margin-bottom: 2px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}





.panel {
  display: none;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 20px;
  min-height: 500px;
  position: relative;
  box-shadow: var(--shadow-card);
}
.panel.active { display: block; }


.card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--accent-line); }
.card-title {
  font-size:var(--fs-base); font-weight: 600;
  color: var(--text-primary);
}


.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size:var(--fs-2xs); font-weight: 500;
}


.btn {
  padding: 8px 16px; border: 1px solid var(--border-subtle);
  background: var(--bg-card); color: var(--text-secondary);
  font-family: var(--font-sans); font-size:var(--fs-sm); font-weight: 500;
  border-radius: var(--radius-sm); cursor: pointer; min-height: 36px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { border-color: var(--accent-line); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); color: #fff; }
.btn-danger { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn-sm { padding: 4px 10px; font-size:var(--fs-xs); min-height: 32px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }


input, select, textarea {
  background: var(--bg-deep); border: 1px solid var(--border-subtle);
  color: var(--text-primary); font-family: var(--font-sans);
  font-size:var(--fs-base); padding: 8px 12px; border-radius: var(--radius-sm);
  width: 100%; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
textarea { resize: vertical; min-height: 60px; }
select { cursor: pointer; appearance: none; }
select option { background: var(--bg-panel); color: var(--text-primary); }
label {
  display: block; font-size:var(--fs-sm); color: var(--text-secondary);
  margin-bottom: 4px;
}
.form-group { margin-bottom: 12px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }


.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.stat-value {
  font-family: var(--font-mono); font-size:var(--fs-3xl); font-weight: 700;
  color: var(--text-primary);
}
.stat-label { font-size:var(--fs-xs); color: var(--text-dim); margin-top: 4px; }





.task-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--bg-card);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  margin-bottom: 6px; transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.task-item:hover { border-color: var(--accent-line); }
.task-item.completed { opacity: 0.5; }
.task-item.completed .task-title { text-decoration: line-through; }
.task-check {
  width: 20px; height: 20px; border: 2px solid var(--border-subtle);
  border-radius: 6px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s; font-size:var(--fs-xs);
}
.task-check:hover { border-color: var(--accent); }
.task-check.checked {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}
.task-info { flex: 1; min-width: 0; }
.task-title { font-size:var(--fs-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta {
  font-size:var(--fs-xs); color: var(--text-dim);
  display: flex; gap: 12px; margin-top: 2px;
}

.task-actions { display: flex; gap: 4px; flex-shrink: 0; }


.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.section-title {
  font-size:var(--fs-base); font-weight: 600;
  color: var(--text-primary);
  display: inline-flex; align-items: center; gap: 8px;
}
.section-title::before {
  content: ""; width: 3px; height: 0.85em; border-radius: 2px;
  background: var(--accent); flex: none;
}
.section-count {
  font-size:var(--fs-xs);
  color: var(--text-dim);
}



.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--overlay); backdrop-filter: blur(4px); z-index: 300;
  align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--bg-panel); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 24px; width: 90%; max-width: 500px;
  position: relative;
  box-shadow: var(--shadow-pop);
  max-height: 85vh; overflow-y: auto;
}
.modal-title {
  font-size:var(--fs-md); font-weight: 700;
  color: var(--text-primary); margin-bottom: 16px;
}
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }


.toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
  
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size:var(--fs-sm); box-shadow: var(--shadow-pop);
  border: 1px solid; background: var(--bg-card);
  word-break: break-word;
  animation: slideIn 0.18s ease-out;
}
.toast-success { border-color: var(--success); color: var(--success); }
.toast-info { border-color: var(--accent); color: var(--accent); }
.toast-warning, .toast-warn { border-color: var(--warn); color: var(--warn); }

.toast-error { border-color: var(--danger); color: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }


::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); color: var(--text-primary); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: none;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: var(--ring); }
button:focus-visible, a:focus-visible { box-shadow: var(--ring); }
a { color: var(--accent); text-underline-offset: 2px; }


.sync-btn {
  position: absolute; top: 20px; right: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: var(--bg-card);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  cursor: pointer; white-space: nowrap;
  font-size:var(--fs-sm); color: var(--text-secondary);
  transition: border-color 0.15s, color 0.15s;
}
.sync-btn:hover { border-color: var(--accent); color: var(--accent); }
.sync-btn.syncing { border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); }
.sync-btn.error { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.srv-dot { width:7px; height:7px; border-radius:50%; background:var(--text-dim); display:inline-block; flex:none; }
.srv-dot.ok { background:var(--success); box-shadow:0 0 6px var(--success); }
.srv-dot.err { background:#e5484d; }


.t-dim-xs  { font-size:var(--fs-xs);   color:var(--text-dim); }
.t-dim-2xs { font-size:var(--fs-2xs);  color:var(--text-dim); }
.t-dim-sm  { font-size:var(--fs-sm);   color:var(--text-dim); }
.t-sec-sm  { font-size:var(--fs-sm);   color:var(--text-secondary); }
.t-pri-base{ font-size:var(--fs-base); color:var(--text-primary); }

.t-field-label { font-size:var(--fs-xs); color:var(--text-dim); display:block; margin-bottom:4px; }


.daily-date-header {
  display: flex; justify-content: space-between; align-items: center;
  padding:16px; background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.daily-date-main { display: flex; align-items: center; gap: 12px; }
.daily-date-big {
  font-family: var(--font-mono); font-size:var(--fs-hero); font-weight: 700;
  color: var(--text-primary); line-height: 1;
}
.daily-date-info { font-size:var(--fs-sm); color: var(--text-secondary); }
.daily-streak-badge {
  font-family: var(--font-mono); font-size:var(--fs-sm);
  padding: 4px 10px; border-radius: 12px;
  background: color-mix(in srgb, var(--orange) 10%, transparent); border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent);
  color: var(--orange);
}
.daily-section {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}

.daily-section.collapsible.collapsed {
  padding: 10px 14px;
  margin-bottom: 8px;
}

.daily-section.collapsible.collapsed > .section-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  min-height: 26px;                 
}

.daily-section.collapsible.collapsed:has(> .sec-always-show) {
  padding-bottom: 12px;
}
.daily-section.collapsible.collapsed > .sec-always-show {
  margin-top: 8px;
}


body.compact .daily-section { padding: 12px; margin-bottom: 8px; }
body.compact .section-header { margin-bottom: 8px; padding-bottom: 6px; }
body.compact .en-block { padding: 8px 10px; }
body.compact .en-block + .en-block { margin-top: 6px; }
body.compact .daily-section.collapsible.collapsed { padding: 8px 12px; margin-bottom: 6px; }



.exp-preview {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
  line-height: 1.7;
  display: none;                 
}
.exp-preview.show { display: block; }
.exp-preview .ep-row {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.exp-preview .ep-k { color: var(--text-dim); font-size: var(--fs-2xs); flex: none; }
.exp-preview .ep-v { color: var(--text-primary); font-weight: 600; }
.exp-preview .ep-amt-exp { color: var(--expense); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.exp-preview .ep-amt-inc { color: var(--success); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.exp-preview .ep-why {
  color: var(--text-dim); font-size: var(--fs-2xs);
  background: var(--bg-panel); border-radius: 4px; padding: 1px 6px;
}
.exp-preview .ep-warn { color: var(--warning, #d97706); font-size: var(--fs-2xs); }
.exp-preview .ep-note { color: var(--text-secondary); font-size: var(--fs-2xs); }

.exp-hint {
  margin-top: 8px;
  font-size: var(--fs-2xs);
  color: var(--text-dim);
  line-height: 1.6;
  word-break: break-all;
}


.inv-locchip {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-raised);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-family: inherit;
  cursor: pointer;
}
.inv-locchip.active {
  border-color: var(--accent);
  color: var(--accent);
}
.inv-item { transition: opacity .15s; }


.en-block {
  padding: 10px 12px; background: var(--bg-panel);
  border: 1px solid var(--border-subtle); border-radius: 8px;
}
.en-block + .en-block { margin-top: 8px; }
.en-head { display: flex; align-items: baseline; gap: 8px; }
.en-word { font-family: var(--font-mono); font-size:var(--fs-xl); font-weight: 600; color: var(--text-primary); }
.en-phon { font-size:var(--fs-xs); color: var(--text-dim); }
.en-say {
  margin-left: auto; appearance: none; border: 1px solid var(--border-subtle);
  background: var(--bg-card); color: var(--accent); border-radius: 6px;
  padding: 3px 9px; cursor: pointer; line-height: 1; min-height: 30px;
}
.en-say:active { background: var(--accent-soft); }
.en-mean { margin-top: 5px; font-size:var(--fs-base); color: var(--text-secondary); line-height: 1.55; }
.en-pos {
  display: inline-block; margin-right: 6px; padding: 0 4px; border-radius: 3px;
  font-family: var(--font-mono); font-size:var(--fs-2xs); color: var(--accent);
  background: var(--accent-soft);
}
.en-eg { margin-top: 4px; font-size:var(--fs-sm); color: var(--text-dim); font-style: italic; line-height: 1.5; }
.en-sent-en { font-size:var(--fs-base); color: var(--text-primary); line-height: 1.5; }
.en-sent-zh { margin-top: 3px; font-size:var(--fs-sm); color: var(--text-secondary); }




.xq-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 8px;
  border-radius: var(--radius);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--xq-stone) 20%, var(--bg-panel)),
    color-mix(in srgb, var(--xq-stone-dark) 14%, var(--bg-panel)));
  border: 1px solid color-mix(in srgb, var(--xq-coin-side) 22%, var(--border-subtle));
}

.xq-avatar {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xl); font-weight: 700; line-height: 1;
  color: var(--xq-red-ink);
  background: radial-gradient(circle at 36% 30%, #fff6e2 0%, var(--xq-coin-edge) 68%, var(--xq-coin-side) 100%);
  box-shadow:
    0 0 0 2px var(--xq-coin-rim),
    0 0 0 3px var(--xq-coin-side),
    0 2px 6px var(--xq-coin-shadow);
}
.xq-bar-text { flex: 1 1 auto; min-width: 0; }
.xq-name {
  font-size: var(--fs-base); font-weight: 600; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.xq-turn { font-size: var(--fs-xs); color: var(--text-dim); margin-top: 1px; }
.xq-turn.is-red { color: var(--xq-red-ink); }


.xq-lvs { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; min-width: 0; }
.xq-tiers { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; min-width: 0; }
.xq-tier {
  flex: 1 1 0; min-width: 0; min-height: 44px;      
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 7px 4px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: var(--fs-xs); color: var(--text-secondary);
  border: 1px solid var(--border-subtle); background: var(--bg-panel);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xq-tier.cur {
  color: var(--xq-coin-side); border-color: var(--xq-coin-side);
  background: color-mix(in srgb, var(--xq-coin-face) 22%, transparent);
  font-weight: 600;
}
.xq-tier-n { font-family: var(--font-mono); font-size: var(--fs-2xs); opacity: 0.75; }
.xq-lv {
  width: 28px; height: 28px; border-radius: 50%; flex: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  color: var(--text-dim); border: 1px solid var(--border-subtle); background: var(--bg-panel);
  -webkit-tap-highlight-color: transparent;
}
.xq-lv.done { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, transparent); }
.xq-lv.cur {
  color: var(--xq-coin-side); border-color: var(--xq-coin-side);
  background: color-mix(in srgb, var(--xq-coin-face) 26%, transparent); font-weight: 700;
}


.xq-ops {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px; margin-bottom: 8px; min-width: 0;
}
.xq-op {
  min-height: 44px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  padding: 5px 2px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--xq-coin-side) 26%, var(--border-subtle));
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--xq-coin-face) 14%, var(--bg-panel)),
    color-mix(in srgb, var(--xq-coin-side) 10%, var(--bg-panel)));
  color: var(--xq-coin-side); -webkit-tap-highlight-color: transparent;
}
.xq-op:disabled { opacity: 0.38; cursor: default; }
.xq-op-label { font-size: var(--fs-2xs); color: var(--text-secondary); line-height: 1.2; }
.xq-op:disabled .xq-op-label { color: var(--text-dim); }


.xq-board {
  display: flex;
  position: relative; width: 100%;
  aspect-ratio: 8 / 9.75;
  padding: 7% 6% 8%;
  border-radius: 12px; box-sizing: border-box;
  background:
    radial-gradient(125% 85% at 50% 0%,
      color-mix(in srgb, var(--xq-stone) 94%, #fff) 0%, transparent 68%),
    linear-gradient(160deg, var(--xq-stone), var(--xq-stone-dark));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -2px 7px rgba(0, 0, 0, 0.20),
    0 2px 8px rgba(0, 0, 0, 0.16);
  touch-action: manipulation;   
}

.xq-plane { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; }

.xq-plane > svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none;
}

.xq-groove {
  fill: none; stroke: var(--xq-groove); stroke-width: 1.7;
  transform: translate(0, 0.009);
}
.xq-ridge {
  fill: none; stroke: var(--xq-groove-hi); stroke-width: 1;
}
.xq-groove line, .xq-ridge line { vector-effect: non-scaling-stroke; }

.xq-hit {
  position: absolute; width: 16%; aspect-ratio: 1; transform: translate(-50%, -50%);
  z-index: 3; cursor: pointer; -webkit-tap-highlight-color: transparent;
}


.xq-river {
  position: absolute; left: 0; right: 0; top: 44.44%; transform: translateY(-50%);
  display: flex; justify-content: center; gap: 8%; pointer-events: none;
}
.xq-river span {
  padding: 1px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--xq-stone-dark) 50%, transparent);
  border: 1px solid color-mix(in srgb, var(--xq-groove-hi) 42%, transparent);
  font-size: var(--fs-xs); letter-spacing: 0.3em; text-indent: 0.3em;
  color: color-mix(in srgb, var(--xq-groove) 88%, #4e5340);
}


.xq-p {
  position: absolute; width: 11.25%; aspect-ratio: 1; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: var(--fs-lg); font-weight: 700; line-height: 1;
  pointer-events: none;
  border: 1.5px solid var(--xq-coin-rim);
  background: radial-gradient(circle at 34% 28%,
    var(--xq-coin-face) 0%, #ffdb9b 40%, var(--xq-coin-edge) 76%, var(--xq-coin-side) 100%);
  box-shadow:
    0 2px 0 var(--xq-coin-side),
    0 3px 7px var(--xq-coin-shadow),
    inset 0 -2px 4px rgba(140, 96, 32, 0.32),
    inset 0 1px 2px rgba(255, 255, 255, 0.55);
}

.xq-p::after {
  content: ''; position: absolute; inset: 9%;
  border-radius: 50%; border: 1px solid currentColor; opacity: 0.42;
}
.xq-p.red { color: var(--xq-red-ink); }
.xq-p.black { color: var(--xq-black-ink); }

.xq-p.sel::before, .xq-p.last::before {
  content: ''; position: absolute; inset: -16%; border-radius: 50%;
  border: 2px solid var(--xq-sel-ring);
  box-shadow: 0 0 8px rgba(255, 207, 92, 0.6);
}
.xq-p.last::before {
  border-color: color-mix(in srgb, var(--orange) 72%, transparent);
  box-shadow: none; opacity: 0.85;
}


.xq-hint {
  position: absolute; width: 4.6%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--xq-black-ink); opacity: 0.32; pointer-events: none;
}
.xq-hint.cap {
  width: 11.25%; background: none; opacity: 1;
  border: 2px dashed color-mix(in srgb, var(--xq-red-ink) 80%, transparent);
}
.xq-tip { margin-top: 8px; font-size: var(--fs-xs); color: var(--text-dim); line-height: 1.55; }
.xq-done { margin-top: 6px; font-size: var(--fs-base); font-weight: 600; color: var(--success); }
.xq-done.xq-bad { color: var(--danger); }
.xq-side { min-width: 0; }

@media (min-width: 560px) {
  .xq-board { max-width: 420px; margin-inline: auto; }
  .xq-ops { max-width: 420px; margin-inline: auto; }
}
@media (min-width: 900px) {
  .xq-wrap { display: grid; grid-template-columns: 420px 1fr; gap: 16px; align-items: start; }
  .xq-board, .xq-ops { margin-inline: 0; }
}
.history-filter.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }


:root {
  --tabbar-h: 52px;                              
  --tabbar-safe: env(safe-area-inset-bottom, 6px); 
}
.bottom-tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; background: color-mix(in srgb, var(--bg-panel) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  z-index: 50; padding: 6px 0 var(--tabbar-safe);
  box-sizing: content-box;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding:6px 0; border: none; background: transparent;
  color: var(--text-dim); cursor: pointer; transition: color 0.15s;
  font-size:var(--fs-2xs); min-height: 52px;
}
.tab-item:hover { color: var(--text-secondary); }
.tab-item.active { color: var(--accent); font-weight: 600; }
.tab-icon { font-size:var(--fs-2xl); line-height: 1; }
.tab-label { font-size:var(--fs-2xs); }


.tab-item--hidden { display: none !important; flex: 0 0 0 !important; }


@media (max-width: 768px) {
  .form-row { flex-direction: column; gap: 0; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }

  
  .course-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .course-view-toggle { justify-content: flex-start; }
  .course-view-btn { flex: 1; text-align: center; }

  .sync-btn { position: static; margin-top: 12px; }
  .app-container { padding: 12px 12px calc(var(--tabbar-h) + var(--tabbar-safe) + 20px); }
  .panel { padding:12px; min-height: auto; }
  .task-item { min-height: 52px; }
  .tab-item { min-height: 52px; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 36px; }
  .course-view-btn { padding:8px 12px; }
  .modal { width: 94%; padding:16px; }
  .wallet-stats-row { grid-template-columns: repeat(2, 1fr); }
  input, select, textarea { font-size: 16px; }
}



.collapsible > .section-header { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }

.sec-count-badge {
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  color: var(--text-dim); margin-left: auto; padding-left: 8px; flex: none;
}


.collapsible > .section-header .section-title::after { content: ' ▾'; font-size:var(--fs-2xs); opacity: .45; }
.collapsible.collapsed > .section-header .section-title::after { content: ' ▸'; }
.collapsible.collapsed > .section-header { opacity: .55; }
.collapsible.collapsed > *:not(.section-header):not(.sec-always-show) { display: none !important; }

.collapsible.collapsed > .sec-always-show { margin-top: 10px; }


.daily-section.collapsible.collapsed > .section-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  min-height: 26px;                 
}



.budget-bar { height:8px; border-radius:4px; background:var(--bg-hover); overflow:hidden; margin-top:8px; }

.inv-group {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  margin-bottom: 10px;
  overflow: hidden;
  
  scroll-margin-top: 62px;
}
.inv-group-sum {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; cursor: pointer; user-select: none;
  list-style: none;
}

.inv-group-sum::-webkit-details-marker { display: none; }
.inv-group-sum::before {
  content: ''; flex: none;
  width: 6px; height: 6px; margin-left: 2px;
  border-right: 1.5px solid var(--text-dim);
  border-bottom: 1.5px solid var(--text-dim);
  transform: rotate(-45deg);
  transition: transform 0.16s var(--ease);
}
.inv-group[open] > .inv-group-sum::before { transform: rotate(45deg); }
.inv-group-sum:hover { background: var(--bg-hover); }
.inv-group-head {
  flex: 1;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.inv-group-num {
  font-size:var(--fs-xs); color: var(--text-dim);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  text-align: right; white-space: nowrap;
}
.inv-group-body { padding: 0 10px 6px; }
.inv-group-hint { font-size:var(--fs-2xs); color: var(--text-dim); padding: 2px 4px 10px; line-height: 1.7; }
.cash-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-top: 1px solid var(--border-subtle);
}
.budget-fill { height:100%; border-radius:4px; background:var(--accent); transition:width .3s; }
.budget-fill.warn { background:var(--warn); }
.budget-fill.over { background:var(--danger); }

.cat-row { margin-bottom:10px; }
.cat-row:last-child { margin-bottom:0; }
.cat-row-sum { display:flex; align-items:center; gap:8px; min-height:44px; padding:4px 0; cursor:pointer; list-style:none; -webkit-tap-highlight-color:transparent; user-select:none; -webkit-user-select:none; }
.cat-row-sum::-webkit-details-marker { display:none; }
.cat-row-sum:active { opacity:.7; }
.cat-row-main { flex:1; min-width:0; }
.cat-row-head { display:flex; justify-content:space-between; gap:8px; font-size:var(--fs-sm); margin-bottom:4px; color:var(--text-secondary); }
.cat-row-head .amt { flex:none; font-family:var(--font-mono); color:var(--text-primary); }
.cat-row-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cat-row-caret { flex:none; width:6px; height:6px; border-right:1.5px solid var(--text-dim); border-bottom:1.5px solid var(--text-dim); transform:rotate(-45deg); transition:transform .16s var(--ease); }
.cat-row[open] > .cat-row-sum .cat-row-caret { transform:rotate(45deg); }
.cat-row-body { margin-top:6px; padding-top:8px; border-top:1px solid var(--border-subtle); max-height:264px; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.cat-item { display:flex; align-items:baseline; gap:8px; padding:6px 2px; font-size:var(--fs-sm); }
.cat-item-day { flex:none; width:40px; font-family:var(--font-mono); font-size:var(--fs-xs); color:var(--text-dim); }
.cat-item-note { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-secondary); }
.cat-item-amt { flex:none; font-family:var(--font-mono); color:var(--expense); }
.cat-bar { height:6px; border-radius:3px; background:var(--bg-hover); overflow:hidden; }
.cat-bar-fill { height:100%; border-radius:3px; background:var(--accent); }
.quick-add { display:flex; gap:6px; flex-wrap:wrap; }
.quick-cat { padding:8px 14px; border-radius:var(--radius-sm); border:1px solid var(--border-subtle); background:var(--bg-card); color:var(--text-secondary); font-size:var(--fs-sm); cursor:pointer; min-height:40px; -webkit-tap-highlight-color:transparent; }
.quick-cat.active { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }





.insp-kind, .insp-status-pick-item { flex:1; padding:8px 10px; border-radius:var(--radius-sm); border:1px solid var(--border-subtle); background:var(--bg-card); color:var(--text-secondary); font-size:var(--fs-sm); cursor:pointer; min-height:40px; white-space:nowrap; }
.insp-kind.active, .insp-status-pick-item.active { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.insp-card { background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--radius); padding:14px; margin-bottom:10px; }
.insp-card-head { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.insp-card-title { font-size:var(--fs-base); color:var(--text-primary); flex:1; word-break:break-word; }
.insp-card-time { font-size:var(--fs-2xs); color:var(--text-dim); font-family:var(--font-mono); white-space:nowrap; }
.insp-card-body { font-size:var(--fs-sm); color:var(--text-secondary); line-height:1.55; white-space:pre-wrap; word-break:break-word; }
.insp-thumb { width:100%; max-height:220px; object-fit:cover; border-radius:var(--radius-sm); margin:8px 0; cursor:pointer; display:block; }
.insp-tag { font-size:var(--fs-2xs); color:var(--accent); background:var(--accent-soft); padding:2px 8px; border-radius:10px; }

.insp-tagbar-item { font-size:var(--fs-xs); padding:5px 12px; border-radius:999px; border:1px solid var(--border-subtle); background:var(--bg-card); color:var(--text-secondary); cursor:pointer; min-height:32px; }
.insp-tagbar-item.active { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.insp-empty { color:var(--text-dim); font-size:var(--fs-sm); text-align:center; padding:28px 10px; }


.insp-status { flex:none; white-space:nowrap; }
.insp-status.is-doing {
  border-color:color-mix(in srgb, var(--accent) 45%, transparent);
  color:var(--accent);
  background:var(--accent-soft);
}
.insp-status.is-done {
  border-color:color-mix(in srgb, var(--success) 45%, transparent);
  color:var(--success);
  background:color-mix(in srgb, var(--success) 10%, transparent);
}

.insp-status.is-dropped { color:var(--text-dim); opacity:.8; }

.insp-card.is-done .insp-card-title,
.insp-card.is-done .insp-card-body,
.insp-card.is-dropped .insp-card-title,
.insp-card.is-dropped .insp-card-body { color:var(--text-dim); }


.insp-card-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:10px; }

.insp-act { flex:none; white-space:nowrap; }
.insp-act.is-linked { color:var(--text-dim); border-style:dashed; }
.insp-viewer { position:fixed; top:0; left:0; right:0; bottom:0; z-index:300; background:var(--overlay); display:flex; align-items:center; justify-content:center; padding:16px; }
.insp-viewer img { max-width:100%; max-height:100%; border-radius:var(--radius); }


.insp-archive-sep { display:flex; align-items:center; gap:10px; margin:18px 0 10px; color:var(--text-dim); font-size:var(--fs-2xs); }
.insp-archive-sep::before,
.insp-archive-sep::after { content:''; flex:1; height:1px; background:var(--border-subtle); }
.insp-archive-sep span { white-space:nowrap; }



.wallet-balance-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.wallet-balance-label {
  font-size:var(--fs-sm);
  color: var(--text-dim);
  position: relative;
}
.wallet-balance-amount {
  font-size: var(--fs-display);
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin: 8px 0 12px;
  font-variant-numeric: tabular-nums;
}

.wallet-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.wallet-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding:12px 10px;
  text-align: center;
}
.wallet-stat-value {
  font-size:var(--fs-lg);
  font-weight: 700;
  font-family: var(--font-mono);
}
.wallet-stat-label {
  font-size:var(--fs-2xs);
  color: var(--text-dim);
  margin-top: 4px;
}

.wallet-txn-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.wallet-txn-item:hover { background: var(--bg-hover); }
.wallet-txn-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size:var(--fs-md);
  font-weight: bold;
  flex-shrink: 0;
}
.wallet-txn-icon.expense {
  background: color-mix(in srgb, var(--danger) 15%, transparent);
  color: var(--expense);
}
.wallet-txn-icon.income {
  background: color-mix(in srgb, var(--success) 15%, transparent);
  color: var(--success);
}

.txn-day { border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); margin-bottom: 8px; overflow: hidden; background: var(--bg-panel); }
.txn-day-sum {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; cursor: pointer; user-select: none; -webkit-user-select: none;
  list-style: none;
}
.txn-day-sum::-webkit-details-marker { display: none; }
.txn-day-sum::before {
  content: ''; flex: none; width: 6px; height: 6px; margin-right: 6px;
  border-right: 1.5px solid var(--text-dim); border-bottom: 1.5px solid var(--text-dim);
  transform: rotate(-45deg); transition: transform 0.16s var(--ease);
}
.txn-day[open] > .txn-day-sum::before { transform: rotate(45deg); }
.txn-day-sum:hover { background: var(--bg-hover); }
.txn-day-label { flex: 1; font-family: var(--font-mono); font-size:var(--fs-sm); }
.txn-day > .wallet-txn-item:not(:last-child) { border-bottom: 1px solid var(--border-subtle); }




.course-view-toggle { display:flex; gap:6px; flex-wrap:nowrap; }
.course-view-btn { background:var(--bg-card); border:1px solid var(--border-subtle); color:var(--text-secondary); padding:6px 10px; border-radius:6px; font-size:var(--fs-sm); cursor:pointer; transition:.2s; white-space:nowrap; -webkit-tap-highlight-color:transparent; }
.course-view-btn.active { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
@media (max-width:360px) { .course-view-btn { padding:6px 8px; font-size:var(--fs-xs); } }


.ai-gran-btn { background:var(--bg-card); border:1px solid var(--border-subtle); color:var(--text-secondary); padding:8px 14px; border-radius:6px; font-size:var(--fs-sm); cursor:pointer; transition:.2s; min-height:38px; }
.ai-gran-btn.active { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }

.forecast-block { margin-bottom: 22px; }
.forecast-title { display:flex; align-items:baseline; gap:8px; margin-bottom:10px; }
.forecast-title .ft-main { font-size:var(--fs-md); font-weight:600; color:var(--text-primary); }
.forecast-title .ft-sub { font-size:var(--fs-xs); color:var(--text-dim); font-family:var(--font-mono); }
.forecast-day { margin-bottom:14px; }
.forecast-day-head { display:flex; align-items:center; gap:8px; font-size:var(--fs-sm); color:var(--text-secondary); margin-bottom:6px; }
.forecast-day-head .fd-tag { font-family:var(--font-mono); color:var(--accent); }
.forecast-day-head .fd-none { color:var(--text-dim); font-size:var(--fs-xs); }
.forecast-row { display:flex; align-items:center; gap:10px; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--radius-sm); padding:8px 12px; margin-bottom:6px; font-size:var(--fs-sm); }
.forecast-row .fr-time { font-family:var(--font-mono); font-size:var(--fs-xs); color:var(--accent); white-space:nowrap; }
.forecast-row .fr-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.forecast-row .fr-loc { font-size:var(--fs-xs); color:var(--text-dim); white-space:nowrap; }
.forecast-off { font-size:var(--fs-xs); color:var(--text-dim); padding:8px 0; }
.course-card { display:flex; gap:12px; align-items:center; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--radius-sm); padding:12px; margin-bottom:10px; }
.course-time { font-family:var(--font-mono); font-size:var(--fs-sm); color:var(--accent); text-align:center; min-width:48px; line-height:1.3; }
.course-body { flex:1; min-width:0; }
.course-name { font-size:var(--fs-md); color:var(--text-primary); font-weight:600; }
.course-meta { font-size:var(--fs-xs); color:var(--text-dim); margin-top:3px; }
.course-countdown { font-size:var(--fs-xs); color:var(--success); white-space:nowrap; }
.course-empty { text-align:center; color:var(--text-dim); padding:24px 0; font-size:var(--fs-base); }

.week-scroll { overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; }
.week-grid { display:grid; grid-template-columns: 62px repeat(7,minmax(38px,1fr)); gap:3px; font-size:var(--fs-xs); min-width:0; }
.week-corner { }
.week-head { text-align:center; color:var(--accent); padding:6px 0; font-weight:600; white-space:nowrap; }

.week-head-date { display:block; font-size:var(--fs-2xs); font-weight:400; color:var(--text-dim); font-family:var(--font-mono); margin-top:1px; }

.week-sec { background:var(--bg-card); border-radius:6px; padding:6px 4px; text-align:center; color:var(--text-secondary); line-height:1.2; }
.week-sec-idx { display:block; font-size:var(--fs-sm); font-weight:600; color:var(--text-secondary); }

.week-sec-time { display:block; font-size:var(--fs-2xs); color:var(--text-dim); font-family:var(--font-mono); line-height:1.1; word-break:break-all; }
.week-cell { background:var(--bg-card); border-radius:6px; min-height:46px; padding:4px; }
.week-cell-course { background:color-mix(in srgb, var(--accent) 8%, transparent); border:1px solid color-mix(in srgb, var(--accent) 20%, transparent); border-radius:4px; padding:4px; margin-bottom:3px; color:var(--text-primary); line-height:1.25; word-break:normal; overflow-wrap:anywhere; }
.week-cell-loc { font-size:var(--fs-2xs); color:var(--text-dim); }
.daily-next-class { background:var(--accent-soft); border:1px solid var(--accent-line); border-radius:var(--radius-sm); padding:10px 12px; margin-bottom:12px; font-size:var(--fs-sm); color:var(--accent); cursor:pointer; }


.week-head-holiday { color:var(--text-dim); font-weight:500; }
.week-head-hol-label, .week-head-makeup-label { display:block; font-size:var(--fs-2xs); font-weight:600; margin-top:2px; line-height:1.2; }
.week-head-hol-label { color:var(--orange); }
.week-head-makeup-label { color:var(--accent); }
.week-cell-holiday { background:repeating-linear-gradient(45deg, color-mix(in srgb, var(--text-dim) 7%, transparent) 0 5px, transparent 5px 10px); }
.holiday-card { display:flex; align-items:center; gap:10px; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--radius-sm); padding:12px; font-size:var(--fs-base); color:var(--text-primary); }
.holiday-card .hc-icon { font-size:var(--fs-2xl); }
.holiday-card .hc-sub { font-size:var(--fs-xs); color:var(--text-dim); margin-top:3px; }
.makeup-bar { font-size:var(--fs-xs); color:var(--accent); background:var(--accent-soft); border:1px solid var(--accent-line); border-radius:var(--radius-sm); padding:8px 10px; margin-bottom:8px; }
.daily-next-class-holiday { background:color-mix(in srgb, var(--orange) 10%, transparent); border-color:color-mix(in srgb, var(--orange) 28%, transparent); color:var(--orange); }
.forecast-holiday { font-size:var(--fs-xs); color:var(--orange); padding:6px 0; }
.forecast-day-head .fd-hol { font-size:var(--fs-xs); color:var(--orange); }
.forecast-day-head .fd-makeup { font-size:var(--fs-xs); color:var(--accent); }


#course-week-picker { margin-bottom:12px; min-width:0; }
.wk-bar { display:flex; align-items:center; gap:6px; min-width:0; }
.wk-step {
  flex:none; width:36px; height:44px;                    
  display:flex; align-items:center; justify-content:center;
  background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--radius-sm);
  color:var(--text-secondary); font-size:var(--fs-lg); line-height:1; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.wk-step:disabled { opacity:0.35; cursor:default; }
.wk-track {
  flex:1; min-width:0; display:flex; gap:5px;
  overflow-x:auto; overflow-y:hidden; padding:2px 0;
  scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
.wk-track::-webkit-scrollbar { display:none; }
.wk-cell {
  flex:none; min-width:44px; height:44px;                 
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px;
  background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--radius-sm);
  color:var(--text-secondary); font-size:var(--fs-sm); cursor:pointer;
  padding:0 8px; -webkit-tap-highlight-color:transparent; transition:border-color .15s, color .15s;
}
.wk-cell .wk-n { font-family:var(--font-mono); font-size:var(--fs-2xs); color:var(--text-dim); line-height:1; }
.wk-cell .wk-n-empty { opacity:0.5; }

.wk-cell.now { border-style:dashed; border-color:color-mix(in srgb, var(--accent) 45%, transparent); }
.wk-cell.cur {
  border-color:var(--accent); color:var(--accent); background:var(--accent-soft); font-weight:700;
}
.wk-cell.cur .wk-n { color:var(--accent); }
.wk-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:6px; min-height:20px; }
.wk-hint { font-size:var(--fs-2xs); color:var(--text-dim); }
.wk-now {
  flex:none; background:var(--accent-soft); border:1px solid var(--accent-line); color:var(--accent);
  border-radius:999px; padding:3px 12px; font-size:var(--fs-2xs); cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}


.ov-summary {
  display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:6px; margin-bottom:10px;
}
.ov-sum-item {
  background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--radius-sm);
  padding:8px 4px; text-align:center; min-width:0;
}
.ov-sum-n { display:block; font-size:var(--fs-lg); font-weight:700; color:var(--accent); font-family:var(--font-mono); line-height:1.2; }
.ov-sum-k { display:block; font-size:var(--fs-2xs); color:var(--text-dim); margin-top:2px; }
.ov-legend { font-size:var(--fs-2xs); color:var(--text-dim); margin-bottom:12px; line-height:1.5; }
.ov-card {
  background:var(--bg-card); border:1px solid var(--border-subtle); border-left-width:3px;
  border-radius:var(--radius-sm); padding:10px 12px; margin-bottom:10px;
}
.ov-w0 { border-left-color:var(--text-dim); opacity:0.75; }
.ov-w1 { border-left-color:color-mix(in srgb, var(--accent) 35%, transparent); }
.ov-w2 { border-left-color:color-mix(in srgb, var(--accent) 65%, transparent); }
.ov-w3 { border-left-color:var(--accent); background:color-mix(in srgb, var(--accent) 5%, var(--bg-card)); }

.ov-shown { border-color:var(--accent-line); box-shadow:0 0 0 1px var(--accent-line) inset; }
.ov-card-head {
  display:flex; align-items:baseline; gap:8px; cursor:pointer;
  -webkit-tap-highlight-color:transparent; min-width:0;
}
.ov-week { font-size:var(--fs-base); font-weight:700; color:var(--text-primary); flex:none; }
.ov-range { font-size:var(--fs-2xs); color:var(--text-dim); font-family:var(--font-mono); flex:1; min-width:0; }
.ov-now {
  flex:none; font-size:var(--fs-2xs); color:var(--accent); border:1px solid var(--accent-line);
  background:var(--accent-soft); border-radius:999px; padding:1px 8px;
}
.ov-count { flex:none; font-size:var(--fs-2xs); color:var(--text-secondary); font-family:var(--font-mono); }
.ov-hol { font-size:var(--fs-xs); color:var(--orange); margin-top:6px; line-height:1.5; }
.ov-none { font-size:var(--fs-xs); color:var(--text-dim); margin-top:6px; }
.ov-day { margin-top:8px; }
.ov-day-head { font-size:var(--fs-2xs); color:var(--accent); margin-bottom:3px; font-weight:600; }
.ov-mk { color:var(--text-dim); font-weight:400; }
.ov-row {
  display:flex; align-items:center; gap:8px; padding:5px 0;
  border-top:1px solid color-mix(in srgb, var(--border-subtle) 60%, transparent);
  font-size:var(--fs-sm); min-width:0; cursor:pointer;
}
.ov-sec {
  flex:none; width:20px; height:20px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--accent-soft); color:var(--accent); font-size:var(--fs-2xs); font-weight:600;
}
.ov-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-primary); }
.ov-loc { flex:none; max-width:96px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--fs-2xs); color:var(--text-dim); }
.ov-time { flex:none; font-size:var(--fs-2xs); color:var(--text-dim); font-family:var(--font-mono); }


@keyframes panelIn {
  from { opacity: 0.4; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.panel.active { animation: panelIn var(--dur) var(--ease); }


.icn { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: -0.18em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab-item .tab-icon { width: 23px; height: 23px; }
.tab-label { font-size:var(--fs-2xs); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .panel.active { animation: none; }
}


.bd-wrap { max-width: 720px; margin: 0 auto; padding: 14px 14px 80px; }


.bd-head {
  display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; background: var(--bg-deep);
  padding: 8px 0 12px; z-index: 2;
}
.bd-head-ic { flex: none; width: 1.35rem; height: 1.35rem; color: var(--accent); }
.bd-head-ic svg, .bd-entry-ic svg { width: 100%; height: 100%; }
.bd-title { flex: 1; font-size: var(--fs-lg); font-weight: bold; color: var(--text-primary); }
.bd-close { flex: none; min-width: 44px; min-height: 44px; }


.bd-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 10px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
  background: var(--bg-card); color: var(--text-secondary);
  font-size: var(--fs-xs); line-height: 1.6;
}
.bd-status > span { flex: 1; min-width: 0; }
.bd-status-ok { border-color: color-mix(in srgb, var(--success) 45%, transparent); color: var(--success); }
.bd-status-bad { border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }

.bd-retry { flex: none; min-height: 44px; }


.bd-step { display: flex; gap: 10px; margin-bottom: 16px; }
.bd-step-no {
  flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent); font-family: var(--font-mono); font-size: var(--fs-2xs);
}
.bd-step-body { flex: 1; min-width: 0; }   
.bd-step-title { margin-bottom: 8px; font-size: var(--fs-base); color: var(--text-primary); }


.bd-file-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.bd-pick { width: 100%; min-height: 52px; font-size: var(--fs-md); }

.bd-dir { width: 100%; min-height: 44px; }

.bd-hint { margin-top: 6px; font-size: var(--fs-2xs); color: var(--text-dim); line-height: 1.6; }
.bd-hint code {
  padding: 1px 4px; border-radius: 4px;
  background: var(--bg-card); font-family: var(--font-mono); color: var(--text-secondary);
}


.bd-flist {
  margin-top: 10px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); overflow: hidden;
}
.bd-frow {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-sm);
}
.bd-frow:last-child { border-bottom: 0; }
.bd-frow-bad { background: color-mix(in srgb, var(--danger) 8%, var(--bg-card)); }
.bd-fname {
  flex: 1; min-width: 0; color: var(--text-primary);
  line-height: 1.4; word-break: break-all;   
}
.bd-fmeta { flex: none; font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-dim); }
.bd-fbadge {
  flex: none; padding: 2px 7px; border-radius: 999px;
  font-size: var(--fs-2xs); letter-spacing: 0.04em; text-transform: uppercase;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.bd-fbadge-bad { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }

.bd-warn {
  margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--warn); font-size: var(--fs-2xs); line-height: 1.6;
}


.bd-submit { width: 100%; min-height: 52px; margin-top: 4px; font-size: var(--fs-md); }


.bd-progress { margin-top: 14px; }
.bd-bar { height: 8px; border-radius: 999px; background: var(--bg-hover); overflow: hidden; }
.bd-bar-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: var(--accent); transition: width 0.2s var(--ease);
}
.bd-bar-done { background: var(--success); }
.bd-progress-text { margin-top: 8px; font-size: var(--fs-xs); color: var(--text-secondary); line-height: 1.6; }


.bd-result {
  margin-top: 16px; padding: 12px; border-radius: var(--radius);
  border: 1px solid var(--border-subtle); background: var(--bg-card);
}
.bd-result-ok { border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.bd-result-bad { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.bd-result-title { margin-bottom: 8px; font-size: var(--fs-base); color: var(--text-primary); }
.bd-rlist { margin-top: 6px; }
.bd-rrow {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-sm);
}
.bd-rrow:last-child { border-bottom: 0; }
.bd-goto {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 12px; text-decoration: none;
}


.bd-entry { cursor: pointer; padding: 14px; margin-bottom: 16px; }
.bd-entry-ic { flex: none; width: 1.4rem; height: 1.4rem; color: var(--accent); }


@media (max-width: 360px) {
  .bd-wrap { padding-left: 10px; padding-right: 10px; }
  .bd-frow { padding: 10px 9px; gap: 6px; }
}


.bd-wrap { max-width: 720px; margin: 0 auto; padding: 14px 14px 80px; }


.bd-head {
  display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; background: var(--bg-deep);
  padding: 8px 0 12px; z-index: 2;
}
.bd-head-ic { flex: none; width: 1.35rem; height: 1.35rem; color: var(--accent); }
.bd-head-ic svg, .bd-entry-ic svg { width: 100%; height: 100%; }
.bd-title { flex: 1; font-size: var(--fs-lg); font-weight: bold; color: var(--text-primary); }
.bd-close { flex: none; min-width: 44px; min-height: 44px; }


.bd-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 10px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
  background: var(--bg-card); color: var(--text-secondary);
  font-size: var(--fs-xs); line-height: 1.6;
}
.bd-status > span { flex: 1; min-width: 0; }
.bd-status-ok { border-color: color-mix(in srgb, var(--success) 45%, transparent); color: var(--success); }
.bd-status-bad { border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }

.bd-retry { flex: none; min-height: 44px; }


.bd-step { display: flex; gap: 10px; margin-bottom: 16px; }
.bd-step-no {
  flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent); font-family: var(--font-mono); font-size: var(--fs-2xs);
}
.bd-step-body { flex: 1; min-width: 0; }   
.bd-step-title { margin-bottom: 8px; font-size: var(--fs-base); color: var(--text-primary); }


.bd-file-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.bd-pick { width: 100%; min-height: 52px; font-size: var(--fs-md); }

.bd-dir { width: 100%; min-height: 44px; }

.bd-hint { margin-top: 6px; font-size: var(--fs-2xs); color: var(--text-dim); line-height: 1.6; }
.bd-hint code {
  padding: 1px 4px; border-radius: 4px;
  background: var(--bg-card); font-family: var(--font-mono); color: var(--text-secondary);
}


.bd-flist {
  margin-top: 10px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); overflow: hidden;
}
.bd-frow {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-sm);
}
.bd-frow:last-child { border-bottom: 0; }
.bd-frow-bad { background: color-mix(in srgb, var(--danger) 8%, var(--bg-card)); }
.bd-fname {
  flex: 1; min-width: 0; color: var(--text-primary);
  line-height: 1.4; word-break: break-all;   
}
.bd-fmeta { flex: none; font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-dim); }
.bd-fbadge {
  flex: none; padding: 2px 7px; border-radius: 999px;
  font-size: var(--fs-2xs); letter-spacing: 0.04em; text-transform: uppercase;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.bd-fbadge-bad { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }

.bd-warn {
  margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--warn); font-size: var(--fs-2xs); line-height: 1.6;
}


.bd-submit { width: 100%; min-height: 52px; margin-top: 4px; font-size: var(--fs-md); }


.bd-progress { margin-top: 14px; }
.bd-bar { height: 8px; border-radius: 999px; background: var(--bg-hover); overflow: hidden; }
.bd-bar-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: var(--accent); transition: width 0.2s var(--ease);
}
.bd-bar-done { background: var(--success); }
.bd-progress-text { margin-top: 8px; font-size: var(--fs-xs); color: var(--text-secondary); line-height: 1.6; }


.bd-result {
  margin-top: 16px; padding: 12px; border-radius: var(--radius);
  border: 1px solid var(--border-subtle); background: var(--bg-card);
}
.bd-result-ok { border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.bd-result-bad { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.bd-result-title { margin-bottom: 8px; font-size: var(--fs-base); color: var(--text-primary); }
.bd-rlist { margin-top: 6px; }
.bd-rrow {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-sm);
}
.bd-rrow:last-child { border-bottom: 0; }
.bd-goto {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 12px; text-decoration: none;
}


.bd-entry { cursor: pointer; padding: 14px; margin-bottom: 16px; }
.bd-entry-ic { flex: none; width: 1.4rem; height: 1.4rem; color: var(--accent); }


@media (max-width: 360px) {
  .bd-wrap { padding-left: 10px; padding-right: 10px; }
  .bd-frow { padding: 10px 9px; gap: 6px; }
}



.aihot-lead {
  display: block; text-decoration: none; color: var(--text-primary);
  padding: 2px 0 4px;
}
.aihot-lead-title {
  font-size: var(--fs-md); line-height: 1.5; font-weight: 500; color: var(--text-primary);
}

.aihot-lead-title.is-quiet { color: var(--text-secondary); font-weight: 400; }
.aihot-lead-sum {
  font-size: var(--fs-xs); line-height: 1.6; color: var(--text-secondary);
  margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.aihot-lead-foot { margin-top: 8px; font-size: var(--fs-2xs); color: var(--accent, #6c9bff); }
.aihot-archive {
  display: block; text-align: center; text-decoration: none;
  font-size: var(--fs-xs); color: var(--accent, #6c9bff); padding: 10px 0 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .panel.active { animation: none; }
}


.aihot-item {
  display: block; width: 100%; text-decoration: none;
  padding: 10px 2px; border-bottom: 1px solid var(--border, rgba(128,128,128,.18));
  color: var(--text-primary);
}
.aihot-item:last-of-type { border-bottom: none; }
.aihot-title { font-size: var(--fs-md); line-height: 1.45; color: var(--text-primary); }
.aihot-sum {
  font-size: var(--fs-xs); line-height: 1.55; color: var(--text-secondary);
  margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.aihot-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; font-size: var(--fs-2xs); color: var(--text-dim); }
.aihot-cat {
  background: var(--accent-soft, rgba(108,155,255,.15)); color: var(--accent, #6c9bff);
  padding: 1px 7px; border-radius: 999px; font-size: var(--fs-2xs);
}
.aihot-when { margin-left: auto; font-family: var(--font-mono); }
.aihot-more {
  display: block; text-align: center; text-decoration: none;
  font-size: var(--fs-xs); color: var(--accent, #6c9bff); padding: 10px 0 2px;
}



#touxian-body { font-size: var(--fs-sm); }
.tx-group { margin-bottom: 10px; }
.tx-group:last-child { margin-bottom: 0; }
.tx-group-h { font-size: var(--fs-2xs); color: var(--text-dim); margin: 0 0 4px; letter-spacing: .02em; }
.tx-row {
  display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap;
  padding: 7px 9px; margin-bottom: 4px;
  border: 1px solid var(--border-subtle); border-radius: 8px;
  background: var(--bg-card); color: var(--text-secondary);
  line-height: 1.6; cursor: pointer;
  transition: border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.tx-row:last-child { margin-bottom: 0; }
.tx-row:hover { border-color: var(--border-accent); }
.tx-row:focus-visible { outline: 2px solid var(--border-accent); outline-offset: 1px; }
.tx-box {
  flex: 0 0 auto; width: 15px; height: 15px; margin-top: 3px;
  border: 1.5px solid var(--border-subtle); border-radius: 4px;
  transition: border-color .15s;
}
.tx-row:hover .tx-box { border-color: var(--accent); }
.tx-main { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.tx-cat { font-weight: 600; margin-right: 2px; }
.tx-p1 { color: #ff6b6b; }
.tx-p2 { color: #ffa94d; }
.tx-p3 { color: var(--accent); }
.tx-ddl { color: #63b3ed; }
.tx-status { color: var(--text-dim); font-size: var(--fs-2xs); margin-right: 4px; }
.tx-course { color: var(--text-dim); }
.tx-due { flex: 0 0 auto; font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--accent); white-space: nowrap; margin-top: 3px; }
.tx-src { flex: 0 0 auto; font-size: var(--fs-2xs); color: var(--text-dim); white-space: nowrap; margin-top: 3px; }
.tx-empty { color: var(--text-dim); padding: 6px 0; }
.tx-foot { margin-top: 6px; font-size: var(--fs-2xs); color: var(--text-dim); }
.tx-restore {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  color: var(--accent); font-size: inherit; font-family: inherit; text-decoration: underline;
}
@media (max-width: 480px) {
  .tx-due, .tx-src { margin-left: 23px; }
}


#ai-week-output .md-p, #ai-reports-list .md-p { margin: 0; }
#ai-week-output .md-gap, #ai-reports-list .md-gap { height: 6px; }
#ai-week-output .md-h, #ai-reports-list .md-h {
  font-weight: 500; color: var(--text-primary); margin: 8px 0 2px;
}
#ai-week-output .md-ul, #ai-reports-list .md-ul {
  margin: 4px 0; padding-left: 1.05em; list-style: none;
}
#ai-week-output .md-ul li, #ai-reports-list .md-ul li { position: relative; }
#ai-week-output .md-ul li::before, #ai-reports-list .md-ul li::before {
  content: '·'; position: absolute; left: -0.95em; color: var(--text-dim);
}
#ai-week-output code, #ai-reports-list code {
  font-family: var(--font-mono); font-size: var(--fs-sm);
  background: rgba(128,128,128,0.16); border-radius: 3px; padding: 0 3px;
}
#ai-week-output strong, #ai-reports-list strong { font-weight: 500; }


.mag {--paper:#faf8f5;
  --ink:#1c1917;
  --ink-soft:#57534e;
  --ink-faint:#8a827b;
  --rule:#e3ddd3;
  --dot:#cfc7bc;
  --code-bg:#f3f0ea;
  --vermilion:#bf3a2b;
  --vermilion-deep:#a52f22;
  --ok:#3b6d11;
  --bad:#a32d2d;
  --serif:Georgia,"Times New Roman","Songti SC","SimSun","Noto Serif CJK SC","Source Han Serif SC",serif;
  --sans:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Hiragino Sans GB",sans-serif;
  --mono:ui-monospace,"SFMono-Regular","SF Mono",Consolas,"Liberation Mono","Courier New",monospace;
  --ease:cubic-bezier(.16,1,.3,1);
  
  --text-dim:#6b625a;
  --border-subtle:#e3ddd3;}
.mag .wrap {
  max-width:900px;margin:0 auto;padding:clamp(28px,6vw,72px) clamp(20px,5vw,48px) 96px
}
.mag .masthead {
  border-top:3px solid var(--ink);padding-top:12px;margin-bottom:clamp(30px,6vw,54px)
}
.mag .masthead-top {
  display:flex;justify-content:space-between;align-items:baseline;gap:16px;font-size:11px;letter-spacing:.18em;color:var(--ink-faint)
}
.mag h1 {
  font-family:var(--serif);font-weight:400;font-size:clamp(2.1rem,7vw,3.4rem);line-height:1.06;letter-spacing:-.02em;margin:.45em 0 .25em
}
.mag .dek {
  font-family:var(--serif);font-size:clamp(.95rem,2.1vw,1.08rem);color:var(--ink-soft);max-width:48ch;margin:0
}
.mag nav {
  display:flex;flex-wrap:wrap;gap:18px;margin-top:22px;padding:12px 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);font-size:12px;letter-spacing:.08em
}
.mag nav a {
  color:var(--ink-soft);text-decoration:none;transition:color .2s var(--ease)
}
.mag nav a:hover {
  color:var(--vermilion)
}
.mag h2 {
  font-family:var(--serif);font-weight:400;font-size:clamp(1.5rem,4.5vw,2.1rem);letter-spacing:-.01em;margin:0 0 4px;scroll-margin-top:24px
}
.mag .sec {
  padding-top:clamp(38px,7vw,64px)
}
.mag .sec-head {
  border-top:3px solid var(--ink);padding-top:14px;margin-bottom:22px
}
.mag .sec-no {
  font-size:11px;letter-spacing:.18em;color:var(--vermilion);display:block;margin-bottom:6px
}
.mag .sec-sub {
  font-size:12px;letter-spacing:.1em;color:var(--ink-faint);margin:0 0 20px
}
.mag p {
  margin:0 0 14px
}
.mag .lead {
  font-family:var(--serif);font-size:var(--fs-md);color:var(--ink-soft)
}
.mag figure {
  margin:26px 0 8px
}
.mag figure svg {
  display:block;width:100%;height:auto
}
.mag figcaption {
  font-size:12px;color:var(--ink-faint);letter-spacing:.04em;margin-top:10px
}
.mag pre {
  background:var(--code-bg);border:1px solid var(--rule);margin:20px 0;
  padding:16px 18px;overflow-x:auto;font-family:var(--mono);font-size:13px;line-height:1.75;
}
.mag pre code {
  font-family:inherit
}
.mag .split {
  display:grid;grid-template-columns:1.15fr .85fr;gap:26px;align-items:start;margin-top:22px
}
@media(max-width:760px) {
.mag .split {
  grid-template-columns:1fr
}
}
.mag .code {
  border:1px solid var(--rule);background:var(--code-bg)
}
.mag .code-scroll {
  overflow-x:auto;padding:14px 0
}
.mag .ln {
  display:flex;gap:14px;padding:0 16px 0 12px;font-family:var(--mono);font-size:12.5px;line-height:1.95;white-space:pre;border-left:2px solid transparent
}
.mag .ln .no {
  flex:none;width:22px;text-align:right;color:#b8afa3;user-select:none
}
.mag .ln.hot {
  cursor:pointer;transition:background .18s var(--ease),border-color .18s var(--ease)
}
.mag .ln.hot:hover {
  background:#eae5dc
}
.mag .ln.hot::after {
  content:"?";margin-left:auto;color:var(--vermilion);font-size:11px;opacity:.55
}
.mag .ln.on {
  background:#efe6df;border-left-color:var(--vermilion)
}
.mag .ln.on::after {
  opacity:1
}
.mag .panel {
  display:block; border:1px solid var(--rule);background:#fff;padding:22px 22px 24px;position:sticky;top:20px
}
@media(max-width:760px) {
.mag .panel {
  display:block; position:static
}
}
.mag .panel-kicker {
  font-size:11px;letter-spacing:.16em;color:var(--vermilion);margin-bottom:10px
}
.mag .panel-title {
  font-family:var(--serif);font-size:var(--fs-xl);font-weight:400;margin:0 0 12px;line-height:1.3
}
.mag .panel-body {
  font-size:14px;color:var(--ink-soft);margin:0 0 14px
}
.mag .panel-body strong {
  color:var(--ink);font-weight:500
}
.mag .panel-code {
  background:var(--code-bg);border-left:2px solid var(--vermilion);padding:10px 14px;font-family:var(--mono);font-size:12.5px;white-space:pre-wrap;word-break:break-word;color:var(--ink)
}
.mag .panel-empty {
  color:var(--ink-faint);font-size:13px;font-style:italic
}
.mag table {
  width:100%;border-collapse:collapse;margin-top:18px;font-size:13.5px
}
.mag th, .mag td {
  text-align:left;padding:12px 10px;border-bottom:1px solid var(--rule);vertical-align:top
}
.mag th {
  font-size:11px;letter-spacing:.14em;color:var(--ink-faint);font-weight:400;border-bottom:1.5px solid var(--ink)
}
.mag td code {
  font-family:var(--mono);font-size:12.5px;background:var(--code-bg);padding:2px 6px;white-space:nowrap
}
.mag td:nth-child(3) {
  color:var(--ink-soft)
}
.mag .duo {
  display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px
}
@media(max-width:700px) {
.mag .duo {
  grid-template-columns:1fr
}
}
.mag .card {
  border:1px solid var(--rule);padding:18px 20px 20px;background:#fff
}
.mag .card h3 {
  font-family:var(--serif);font-weight:400;font-size:var(--fs-lg);margin:0 0 4px
}
.mag .card .tag {
  font-size:11px;letter-spacing:.14em;margin-bottom:12px;display:block
}
.mag .tag.no {
  color:var(--bad)
}
.mag .tag.yes {
  color:var(--ok)
}
.mag .card pre {
  margin:10px 0 0;font-size:12.5px;padding:12px 14px
}
.mag .card .note {
  font-size:13px;color:var(--ink-soft);margin:12px 0 0
}
.mag .warn {
  border:1px solid var(--vermilion);border-left-width:3px;padding:20px 22px;background:#fff;margin-top:20px
}
.mag .warn h3 {
  font-family:var(--serif);font-weight:400;font-size:var(--fs-lg);margin:0 0 6px;color:var(--vermilion)
}
.mag .warn p {
  font-size:14px;color:var(--ink-soft);margin:0 0 14px
}
.mag .callout {
  border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);padding:16px 0;margin:26px 0;font-family:var(--serif);font-size:var(--fs-md);color:var(--ink)
}
.mag footer {
  margin-top:clamp(44px,8vw,80px);padding-top:14px;border-top:1px solid var(--rule);font-size:11px;letter-spacing:.14em;color:var(--ink-faint);display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap
}
@media(prefers-reduced-motion:reduce) {
.mag .ln, .mag .panel {
  transition:none
}
}


.mag .sub-h {
  font-family:var(--serif);font-weight:400;font-size:var(--fs-lg);margin:30px 0 6px
}
.mag ul.plain {
  font-size:14.5px;color:var(--ink-soft);line-height:1.9;padding-left:20px
}


.mag .split > * {
  min-width:0
}
@media (max-width:760px) {
  .mag td code {
    white-space:normal;word-break:break-all
  }
}


.mag .p-list {
  border:1px solid var(--rule);background:var(--code-bg)
}
.mag .p-row {
  display:flex;gap:14px;padding:14px 16px;border-bottom:1px solid var(--rule);
  cursor:pointer;border-left:2px solid transparent;
  transition:background .18s var(--ease),border-color .18s var(--ease)
}
.mag .p-row:last-child {
  border-bottom:0
}
.mag .p-row:hover {
  background:#eae5dc
}
.mag .p-row.on {
  background:#efe6df;border-left-color:var(--vermilion)
}
.mag .p-row .p-no {
  flex:none;font-family:var(--mono);font-size:11px;color:var(--vermilion);letter-spacing:.1em;padding-top:2px
}
.mag .p-row .p-t {
  font-size:14px;color:var(--ink);line-height:1.5
}
.mag .p-row .p-s {
  font-size:12px;color:var(--ink-faint);margin-top:3px;line-height:1.6
}
.mag .panel-body ul {
  margin:10px 0 14px;padding-left:18px
}
.mag .panel-body li {
  font-size:13.5px;color:var(--ink-soft);margin-bottom:6px;line-height:1.65
}
.mag .panel-body code, .mag figcaption code, .mag .card .note code {
  font-family:var(--mono);font-size:12.5px;background:var(--code-bg);padding:1px 5px
}



.health-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.health-stat { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 12px 14px; }
.health-stat-v { font-size: var(--fs-xl); font-weight: 700; color: var(--text-primary); font-family: var(--font-mono); font-variant-numeric: tabular-nums; line-height: 1.15; }
.health-stat-l { font-size: var(--fs-xs); color: var(--text-dim); margin-top: 4px; }
.health-stat-u { font-size: var(--fs-xs); color: var(--text-dim); font-weight: 400; margin-left: 3px; }
.health-canvas { width: 100%; height: 120px; display: block; }


#panel-health {
  
  --bg:#12161d; --card:#1a1f28; --card2:#161b23;
  --ink:#eef2f7; --sub:#9aabbf; --hint:#7b889b; --line:rgba(255,255,255,.09);
  --accent:#e0a373; --accent-soft:rgba(224,163,115,.15);
  --maple:#e0a373; --maple-soft:rgba(224,163,115,.15); --on-accent:#2b2724; --on-maple:#2b2724;
  --thread:rgba(255,255,255,.13);
  --shadow:0 1px 2px rgba(0,0,0,.30), 0 8px 22px rgba(0,0,0,.32);
  --shadow-lift:0 2px 6px rgba(0,0,0,.34), 0 18px 40px rgba(0,0,0,.44);
  --r:16px;
  
  --e-out:cubic-bezier(.22,.61,.36,1); --e-in:cubic-bezier(.4,0,1,1);
  --spring-soft:cubic-bezier(.34,1.26,.64,1); --spring-pop:cubic-bezier(.34,1.56,.64,1);
}
html.light #panel-health {
  
  --bg:#f4f1ec; --card:#fffdfa; --card2:#faf7f1;
  --ink:#453d36; --sub:#776f68; --hint:#7b6f64; --line:#e4ded6;
  --accent:#b5533a; --accent-soft:#f2e3dc;
  --maple:#b5533a; --maple-soft:#f2e3dc; --on-accent:#fff; --on-maple:#fff;
  --thread:#ddd2c6;
  --shadow:0 1px 2px rgba(43,39,36,.04), 0 8px 22px rgba(43,39,36,.055);
  --shadow-lift:0 2px 6px rgba(43,39,36,.06), 0 18px 40px rgba(43,39,36,.10);
}

#panel-health #health-root {
  max-width:560px; margin:0 auto;
  font-size:15px; line-height:1.7; color:var(--ink);
}

[data-glass-toggle] {
  display:inline-flex; align-items:center; gap:6px;
  white-space:nowrap; flex:none;
}
[data-glass-toggle] .glass-dot {
  width:6px; height:6px; border-radius:50%; background:var(--text-dim);
  transition:background .2s var(--ease), box-shadow .2s var(--ease);
}
[data-glass-toggle].is-on {
  border-color:var(--accent);
  color:var(--accent);
  background:color-mix(in srgb, var(--accent) 12%, transparent);
}
[data-glass-toggle].is-on .glass-dot {
  background:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}


.glass-bed { position:fixed; inset:0; z-index:0; pointer-events:none; }
html.glass-on[data-liqgl="1"] body,
html.glass-on[data-liqgl="1"] .app-container { background:transparent; }
html.glass-on[data-liqgl="1"] .panel.active {
  background:transparent; border-color:transparent; box-shadow:none;
}
html.glass-on[data-liqgl="1"] .panel.active [data-glass] {
  background:none !important; box-shadow:none !important; backdrop-filter:none !important;
}

html.glass-on[data-liqgl="1"][data-glass-scroll="1"] .panel.active [data-glass] {
  background: var(--bg-card) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}




@keyframes hl-draw {from{stroke-dashoffset:var(--len)} to{stroke-dashoffset:0}}
@keyframes hl-clock{from{stroke-dashoffset:var(--circ)} to{stroke-dashoffset:var(--off)}}
@keyframes hl-sweep{from{transform:scaleX(0)} to{transform:scaleX(var(--p,1))}}
@keyframes hl-grow {from{transform:scaleY(0)} to{transform:scaleY(1)}}
@keyframes hl-rise {from{transform:translateY(10px);opacity:0} to{transform:none;opacity:1}}
@keyframes hl-pop  {from{transform:scale(0)} 60%{transform:scale(1.14)} to{transform:scale(1)}}
@keyframes hl-halo {from{transform:scale(.35);opacity:.55} to{transform:scale(2.6);opacity:0}}
@keyframes hl-fade {from{opacity:0} to{opacity:1}}
@media (prefers-reduced-motion:reduce){
  .hl *{animation-duration:.01ms !important;animation-delay:0s !important;transition-duration:.01ms !important}
}


.hl{position:relative}
.hl-trend[hidden]{display:none}

.hl-page.hl-off{position:absolute;left:0;right:0;top:0;height:0;overflow:hidden;
  visibility:hidden;pointer-events:none}
.hl .dnone{font-size:13px;color:var(--sub);margin:12px 2px;line-height:1.6}
.hl-bar{display:flex;align-items:center;gap:8px;margin:0 0 10px}
.hl-bar b{font-size:16px;font-weight:700;color:var(--ink)}
.hl-bar button{width:40px;height:40px;border:0;border-radius:12px;background:var(--card);
  box-shadow:var(--shadow);color:var(--ink);display:grid;place-items:center;cursor:pointer;
  transition:transform .28s var(--spring-pop)}
.hl-bar button:active{transform:scale(.94)}
.hl-bar button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}


.hl-page .h4{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:12px}
.hl-page .h4 .c{background:var(--card);border-radius:var(--r);box-shadow:var(--shadow);padding:13px 14px 12px;
  cursor:pointer;transition:transform .28s var(--spring-pop)}
.hl-page .h4 .c:active{transform:scale(.97)}
.hl-page .h4 .k{display:flex;align-items:center;justify-content:space-between;gap:6px;
  font-size:10.5px;letter-spacing:.14em;color:var(--sub)}
.hl-page .h4 .n{display:flex;align-items:baseline;gap:4px;margin-top:5px}
.hl-page .h4 .n b{font-size:27px;font-weight:800;letter-spacing:-.04em;
  font-variant-numeric:tabular-nums;line-height:1.05;color:var(--ink)}
.hl-page .h4 .n i{font-style:normal;font-size:12px;color:var(--sub)}
.hl-page .h4 .t{height:4px;background:var(--line);border-radius:2px;margin-top:8px;overflow:hidden}
.hl-page .h4 .t s{display:block;height:100%;border-radius:2px;background:var(--maple);
  transform-origin:left center;animation:hl-sweep .42s var(--e-out) both}


.hl-page .hb{background:var(--card);border-radius:var(--r);box-shadow:var(--shadow);
  padding:16px 16px 15px;margin-bottom:12px;color:var(--ink)}
.hl-page .hb .eyebrow{font-size:10.5px;letter-spacing:.17em;color:var(--sub)}
.hl-page .hb .big{font-size:44px;font-weight:800;letter-spacing:-.05em;
  font-variant-numeric:tabular-nums;line-height:1.02}
.hl-page .hb .u{font-size:14px;color:var(--ink);font-weight:600;margin-top:-1px}


.hl-page .tide svg{display:block;width:100%;height:auto;overflow:visible;touch-action:pan-y}
.hl-page .tide .ln{fill:none;stroke:var(--maple);stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}

.hl-page .tide .ar{fill:var(--maple);fill-opacity:.10}
.hl-page .tide .zero{stroke:var(--line);stroke-width:1}
.hl-page .tide .slp{fill:var(--thread,#ddd2c6);opacity:.30}
.hl-page .tide .halo{fill:none;stroke:var(--maple);stroke-width:1.4;transform-box:fill-box;
  transform-origin:center;animation:hl-halo .58s var(--e-out) both}
.hl-page .tide .pt{fill:var(--maple);transform-box:fill-box;transform-origin:center}
.hl-page .tide .hit{fill:transparent;cursor:pointer}
.hl-page .hours{position:relative;height:13px;margin-top:1px}
.hl-page .hours span{position:absolute;top:0;font-size:9.5px;color:var(--hint);
  font-variant-numeric:tabular-nums;white-space:nowrap}
.hl-page .tags{display:flex;gap:15px;white-space:nowrap;overflow-x:auto;
  overscroll-behavior-x:contain;scrollbar-width:none;
  margin:12px -16px 0;padding:11px 16px 0;border-top:1px solid var(--line)}
.hl-page .tags::-webkit-scrollbar{display:none}
.hl-page .tags button{background:none;border:0;padding:0;font:inherit;font-size:13px;
  color:var(--sub);cursor:pointer;white-space:nowrap}

.hl-page .tags button.on{color:var(--maple);text-decoration:underline;text-underline-offset:4px}
.hl-page .tags button i{font-style:normal;color:var(--hint);font-size:11px;margin-left:3px}


.hl-page .mini{display:flex;flex-direction:column;gap:15px}
.hl-page .mini .r{cursor:pointer}
.hl-page .mini .hd{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:4px}
.hl-page .mini .hd b{font-size:12.5px;font-weight:600}
.hl-page .mini .hd s{text-decoration:none;font-size:14px;font-weight:700;
  font-variant-numeric:tabular-nums}
.hl-page .mini .hd s i{font-style:normal;font-size:10.5px;color:var(--hint);
  margin-left:2px;font-weight:400}
.hl-page .mini svg{display:block;width:100%;height:auto;overflow:visible}
.hl-page .mini .ln{fill:none;stroke:var(--maple);stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round}
.hl-page .mini .ar{fill:var(--maple);fill-opacity:.08}
.hl-page .mini .tp{fill:var(--maple)}


.hl-page .beds svg{display:block;width:100%;height:auto;overflow:visible}
.hl-page .beds .slpbar{fill:var(--maple);opacity:.75;transform-box:fill-box;transform-origin:top center;
  animation:hl-grow .5s var(--spring-soft) both}
.hl-page .beds .slpbar.today{opacity:1}
.hl-page .beds .avg{stroke:var(--maple);stroke-width:1;stroke-dasharray:2 3;opacity:.6}
.hl-page .beds .gl{stroke:var(--line);stroke-width:1}
.hl-page .beds .lbl{fill:var(--hint);font-size:7.5px;font-family:inherit}


.hl-page .nowrow{display:flex;align-items:baseline;gap:9px;padding:9px 0;
  border-bottom:1px solid var(--line);animation:hl-rise .38s var(--e-out) both}
.hl-page .nowrow:last-child{border-bottom:0}
.hl-page .nowrow b{font-size:19px;font-weight:800;letter-spacing:-.03em;
  font-variant-numeric:tabular-nums;min-width:52px}
.hl-page .nowrow span{font-size:12.5px;color:var(--sub);line-height:1.5}
.hl-page .nowrow em{font-style:normal;color:var(--hint);font-size:11.5px;margin-left:auto;flex:none}


.hl-page .cyc{display:flex;align-items:center;gap:13px}
.hl-page .cyc svg{flex:none}
.hl-page .cyc .ring{fill:none;stroke:var(--line);stroke-width:4}
.hl-page .cyc .arc{fill:none;stroke:var(--maple);stroke-width:4;stroke-linecap:round;
  animation:hl-clock .9s var(--e-out) .1s both}
.hl-page .cstat{display:flex;gap:8px;margin:11px 0 2px}
.hl-page .cstat div{flex:1;background:var(--card2,#faf7f1);border-radius:11px;padding:8px 10px}
.hl-page .cstat s{display:block;text-decoration:none;font-size:10px;letter-spacing:.14em;color:var(--hint)}
.hl-page .cstat b{display:block;font-size:18px;font-weight:800;letter-spacing:-.03em;
  font-variant-numeric:tabular-nums;animation:hl-rise .4s var(--e-out) both}


.hl-trend{color:var(--ink)}

.hl-trend .hrange{position:relative;margin:0 0 12px;padding:3px;
  background:var(--card2,#faf7f1);border-radius:12px}
.hl-trend .hrange .pill{position:absolute;top:3px;bottom:3px;left:3px;
  width:calc((100% - 6px) / 4);background:var(--card);border-radius:9px;
  box-shadow:var(--shadow);pointer-events:none;
  transition:transform .34s var(--spring-soft)}
.hl-trend .hrange .rr{position:relative;display:flex}
.hl-trend .hrange button{flex:1;border:0;background:transparent;font-family:inherit;
  font-size:12.5px;font-weight:500;padding:8px 0;min-height:38px;cursor:pointer;
  color:var(--sub);transition:color .22s var(--e-out)}
.hl-trend .hrange button.on{color:var(--ink);font-weight:700}

.hl-trend .dcard{background:var(--card);border-radius:var(--r);box-shadow:var(--shadow);
  padding:15px 16px 14px;margin-bottom:11px}
.hl-trend .dcard .hd{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.hl-trend .dcard .hd b{font-size:15px;font-weight:700}
.hl-trend .dcard .rd{display:flex;align-items:baseline;gap:6px;margin:3px 0 0}
.hl-trend .dcard .rd b{font-size:34px;font-weight:800;letter-spacing:-.05em;
  font-variant-numeric:tabular-nums;line-height:1.08}
.hl-trend .dcard .rd i{font-style:normal;font-size:13px;color:var(--sub);font-weight:600}
.hl-trend .dcard .rd em{font-style:normal;font-size:12px;color:var(--hint);margin-left:2px;
  font-variant-numeric:tabular-nums}
.hl-trend .dcard svg{display:block;width:100%;height:auto;touch-action:pan-y}
.hl-trend .dcard .ln{fill:none;stroke:var(--maple);stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}
.hl-trend .dcard .ar{fill:var(--maple-soft,#f2e3dc)}
.hl-trend .dcard .base, .hl-trend .dcard .zl{stroke:var(--line);stroke-width:1}
.hl-trend .dcard .pt{fill:var(--maple)}
.hl-trend .dcard .hit{fill:transparent;cursor:pointer}

.hl-trend .dcard .gd{stroke:var(--maple);stroke-width:1;stroke-dasharray:2 3}
.hl-trend .dcard .gdwrap,
.hl-trend .dcard .selwrap{transition:transform .16s var(--e-out)}
.hl-trend .xax{position:relative;height:13px}
.hl-trend .xax span{position:absolute;font-size:9px;letter-spacing:.4px;color:var(--hint);
  white-space:nowrap;font-variant-numeric:tabular-nums;line-height:13px}
.hl-trend .st3{display:flex;gap:7px;margin-top:9px}
.hl-trend .st3 div{flex:1;min-width:0;overflow:hidden;background:var(--card2,#faf7f1);border-radius:11px;padding:8px 10px}
.hl-trend .st3 s{display:block;text-decoration:none;font-size:10px;letter-spacing:.14em;color:var(--hint)}

.hl-trend .st3 b{display:block;font-size:16px;font-weight:700;letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;white-space:nowrap}
.hl-trend .st3 b.big{font-size:19px;font-weight:800;animation:hl-rise .4s var(--e-out) both}

.hl-trend .st3 div.wide{flex:1.45}
.hl-trend .st3 b.big.wide{font-size:15.5px;letter-spacing:-.02em}
.hl-trend .insight{font-size:13.5px;line-height:1.65;margin:6px 0 2px;text-wrap:pretty}


.hl-trend .rh{position:relative;margin-top:8px}
.hl-trend .rh .gt{position:absolute;left:0;width:10.2%;text-align:right;
  transform:translateY(-50%);font-size:9px;letter-spacing:.5px;color:var(--hint);
  font-variant-numeric:tabular-nums;white-space:nowrap}
.hl-trend .rh .from{position:absolute;left:10.9%;bottom:0;font-size:9px;
  letter-spacing:.5px;color:var(--hint);white-space:nowrap}
.hl-trend .rh .gl{stroke:var(--line);stroke-width:1}
.hl-trend .rh .slpbar{transform-box:fill-box;transform-origin:top;
  animation:hl-grow .5s var(--spring-soft) both}
.hl-trend .rh .avg{stroke:var(--maple);stroke-width:1.6;stroke-dasharray:4 3;
  transform-box:fill-box;transform-origin:left;animation:hl-sweep .7s var(--e-out) .3s both}


.hl-trend .spot{display:flex;gap:8px}
.hl-trend .spot div{flex:1;background:var(--card2,#faf7f1);border-radius:12px;padding:11px 10px 10px}
.hl-trend .spot s{display:block;text-decoration:none;font-size:10.5px;letter-spacing:.15em;color:var(--hint)}
.hl-trend .spot b{display:block;font-size:24px;font-weight:800;letter-spacing:-.04em;
  font-variant-numeric:tabular-nums;line-height:1.15;animation:hl-rise .4s var(--e-out) both}
.hl-trend .spot i{font-style:normal;display:block;font-size:11px;color:var(--sub)}


.hl-trend .infobox{background:var(--card);border-radius:var(--r);box-shadow:var(--shadow);
  margin-top:11px;overflow:hidden}
.hl-trend .infobox > button{width:100%;border:0;background:transparent;font-family:inherit;
  color:var(--ink);text-align:left;display:flex;align-items:center;gap:10px;
  padding:14px 16px;min-height:52px;cursor:pointer}
.hl-trend .infobox > button:active{background:var(--card2,#faf7f1)}
.hl-trend .infobox > button span{flex:1;min-width:0;font-size:14.5px;font-weight:600}
.hl-trend .infobox > button svg{width:15px;height:15px;flex:none;stroke:var(--hint);
  stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round;
  transition:transform .22s var(--spring-pop)}
.hl-trend .infobox.open > button svg{transform:rotate(90deg)}
.hl-trend .infowrap{overflow:hidden;max-height:0;opacity:0;
  transition:max-height .22s var(--e-in), opacity .22s var(--e-in)}
.hl-trend .infobox.open .infowrap{max-height:900px;opacity:1;
  transition:max-height .3s var(--e-out), opacity .3s var(--e-out)}
.hl-trend .infowrap > div{padding:2px 16px 16px}
.hl-trend .bio{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hl-trend .bio label{display:block;min-width:0}
.hl-trend .bio label > s{display:block;text-decoration:none;font-size:11px;
  letter-spacing:.14em;color:var(--sub);margin-bottom:4px}
.hl-trend .bio .fld{display:flex;align-items:center;gap:6px;background:var(--card2,#faf7f1);
  border:1px solid var(--line);border-radius:11px;padding:0 11px}

.hl-trend .bio input{flex:1;min-width:0;border:0;background:transparent;
  font-family:inherit;font-size:17px;font-weight:600;letter-spacing:-.02em;
  padding:11px 0;color:var(--ink);outline:none;font-variant-numeric:tabular-nums;
  -webkit-appearance:none}
.hl-trend .bio .fld i{flex:none;font-style:normal;font-size:12px;color:var(--hint)}
.hl-trend .derived{margin-top:13px;padding:11px 12px;background:var(--card2,#faf7f1);border-radius:12px}
.hl-trend .derived s{display:block;text-decoration:none;font-size:10.5px;
  letter-spacing:.17em;color:var(--sub);margin-bottom:5px}
.hl-trend .derived p{display:flex;align-items:baseline;gap:8px;padding:3px 0;
  font-size:13px;margin:0}
.hl-trend .derived p span{flex:1;min-width:0;color:var(--sub)}
.hl-trend .derived p b{flex:none;font-weight:700;font-variant-numeric:tabular-nums}
.hl-trend .derived p em{width:104px;flex:none;text-align:right;font-style:normal;
  font-size:11px;color:var(--hint)}
.hl-trend .biosave{width:100%;margin-top:12px;
  border:1px solid color-mix(in srgb, var(--maple) 38%, transparent);
  background:transparent;color:var(--maple);border-radius:13px;padding:13px;min-height:46px;
  font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;
  transition:background .2s var(--e-out), transform .28s var(--spring-pop)}
.hl-trend .biosave:active{transform:scale(.985)}
.hl-trend .biosave.saved{background:var(--maple-soft,#f2e3dc)}




#music-fab{
  position:fixed; right:14px;
  bottom:calc(var(--tabbar-h) + var(--tabbar-safe) + 14px);
  z-index:190;
  width:56px; height:56px; border-radius:50%;
  border:none; padding:0; cursor:pointer;
  display:grid; place-items:center;
  
  background:var(--netease);
  box-shadow:0 4px 14px color-mix(in srgb, var(--netease) 42%, transparent),
             0 12px 28px rgba(0,0,0,.34);
  -webkit-tap-highlight-color:transparent;
  transition:transform var(--dur) var(--ease), opacity var(--dur) var(--ease),
             box-shadow var(--dur) var(--ease);
}

#music-fab:active{transform:scale(.93)}
#music-fab:focus-visible{outline:none; box-shadow:var(--ring),
             0 12px 28px rgba(0,0,0,.34)}

#music-fab.is-hidden{transform:translateY(88px) scale(.7); opacity:0; pointer-events:none}

#music-fab.is-idle:not(.is-on){filter:saturate(.55) brightness(.82)}



.mf-ring{position:absolute; inset:0; width:100%; height:100%; opacity:0; z-index:2;
  transition:opacity var(--dur) var(--ease)}
#music-fab.is-on .mf-ring{opacity:1}
#music-fab.is-on::after{
  content:''; position:absolute; inset:-3px; border-radius:50%;
  
  border:1.5px solid rgba(255,255,255,.5);
  animation:mf-pulse 2.6s var(--ease) infinite; pointer-events:none;
}
@keyframes mf-pulse{
  0%{transform:scale(1); opacity:.75}
  70%{transform:scale(1.3); opacity:0}
  100%{transform:scale(1.3); opacity:0}
}

.mf-ico{position:relative; z-index:1; width:56px; height:56px; color:var(--netease)}

#music-fab.is-beat .mf-ico{animation:mf-beat .42s var(--ease)}
@keyframes mf-beat{0%{transform:scale(.78) rotate(-8deg)}100%{transform:none}}


#music-mask{
  position:fixed; inset:0; z-index:205;
  background:var(--overlay);
  opacity:0; pointer-events:none;
  transition:opacity var(--dur) var(--ease);
}
#music-mask.is-on{opacity:1; pointer-events:auto}


#music-sheet{
  position:fixed; left:0; right:0; bottom:0; z-index:206;
  max-height:78vh;
  display:flex; flex-direction:column;
  background:var(--bg-panel);
  border-top:1px solid var(--border-subtle);
  border-radius:var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow:var(--shadow-pop);
  transform:translateY(101%);
  transition:transform var(--dur) var(--ease);
  padding-bottom:var(--tabbar-safe);
}
#music-sheet.is-on{transform:translateY(0)}
.ms-grip{flex:none; width:36px; height:4px; border-radius:2px;
  background:var(--border-subtle); margin:9px auto 1px}

.ms-head{flex:none; display:flex; align-items:center; gap:8px;
  padding:6px 14px 10px}
.ms-title{font-size:var(--fs-lg); font-weight:700; color:var(--text-primary)}
.ms-sub{flex:1; min-width:0; font-size:var(--fs-xs); color:var(--text-dim);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.ms-x{width:32px; height:32px; padding:0; flex:none;
  display:grid; place-items:center}
.ms-x svg{width:15px; height:15px}

.ms-body{flex:1; min-height:0; overflow-y:auto;
  -webkit-overflow-scrolling:touch; padding:0 14px 16px}



.ms-lyric{flex:none; height:118px; margin:2px 0 4px; border-radius:var(--radius-sm);
  background:var(--bg-card); box-shadow:var(--shadow-card); overflow:hidden}
.ms-lyric-scroll{height:100%; overflow-y:auto; padding:12px 14px;
  -webkit-overflow-scrolling:touch; scrollbar-width:none}
.ms-lyric-scroll::-webkit-scrollbar{display:none}
.ms-lyric-line{font-size:var(--fs-sm); line-height:22px; color:var(--text-dim);
  text-align:center; transition:color .25s ease, transform .25s ease;
  transform:scale(.94); word-break:break-all}
.ms-lyric-line.is-on{color:var(--netease); font-weight:600; transform:scale(1)}
.ms-lyric-trans{display:block; font-size:var(--fs-xs); color:var(--text-dim);
  font-weight:400}
.ms-lyric-empty{margin:0; padding:38px 0; text-align:center;
  font-size:var(--fs-xs); color:var(--text-dim)}




:root{--mtl-h:0px}
body.has-mtl:not(.music-open){--mtl-h:57px}
#mtl{position:fixed; top:0; left:0; right:0; z-index:180;
  background:color-mix(in srgb, var(--bg-panel) 76%, transparent);
  -webkit-backdrop-filter:blur(18px) saturate(1.6);
  backdrop-filter:blur(18px) saturate(1.6);
  box-shadow:0 6px 26px rgba(0,0,0,.22)}
#mtl[hidden]{display:none}
body.music-open #mtl{display:none}

body.has-mtl:not(.music-open) .app-container{padding-top:64px}
#mtl::after{content:''; position:absolute; left:0; right:0; bottom:0; height:2px;
  background:linear-gradient(90deg, transparent, var(--netease), var(--netease), transparent);
  opacity:.65}
.mtl-bar{display:flex; align-items:center; gap:8px; min-height:52px;
  padding:7px 8px 7px 12px; cursor:pointer; user-select:none;
  -webkit-tap-highlight-color:transparent}
.mtl-cover{flex:none; width:36px; height:36px; border-radius:10px; object-fit:cover;
  background:var(--bg-card); box-shadow:0 2px 8px rgba(0,0,0,.28)}
.mtl-info{flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; overflow:hidden}
.mtl-name{font-size:var(--fs-2xs); color:var(--text-secondary); line-height:1.3;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.mtl-cur{min-width:0; font-size:var(--fs-sm); font-weight:700; line-height:1.25;
  color:var(--netease); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  text-shadow:0 0 14px color-mix(in srgb, var(--netease) 35%, transparent)}
.mtl-ctrl{flex:none; display:flex; align-items:center; gap:2px}
.mtl-btn{width:34px; height:34px; padding:8px; border:none; background:transparent;
  border-radius:50%; color:var(--text-secondary); cursor:pointer;
  display:grid; place-items:center; -webkit-tap-highlight-color:transparent;
  transition:color .15s, background .15s, transform .12s var(--ease)}
.mtl-btn svg{width:100%; height:100%}
.mtl-btn:active{transform:scale(.9); color:var(--text-primary); background:var(--bg-hover)}
.mtl-btn-main{width:40px; height:40px; padding:10px; color:#fff;
  background:linear-gradient(140deg, var(--netease), var(--netease));
  box-shadow:0 3px 12px color-mix(in srgb, var(--netease) 42%, transparent)}
.mtl-btn-main:active{color:#fff}
.mtl-btn:focus-visible{outline:none; box-shadow:var(--ring)}
.mtl-tg{flex:none; display:grid; place-items:center; width:30px; height:30px;
  padding:0; border:none; border-radius:50%; cursor:pointer;
  background:transparent; color:var(--text-dim);
  transition:transform .25s var(--ease), background .2s ease, color .2s ease}
.mtl-tg svg{width:18px; height:18px}
.mtl-tg.is-open{transform:rotate(180deg); color:var(--netease)}
.mtl-tg:active{background:var(--bg-card)}
.mtl-prog{position:relative; height:3px; background:var(--bg-hover); cursor:pointer}
.mtl-prog::before{content:''; position:absolute; left:0; right:0; top:-9px; bottom:-9px}
.mtl-prog-fill{position:absolute; left:0; top:0; bottom:0; width:0;
  background:linear-gradient(90deg, var(--netease), var(--netease));
  transition:width .12s linear}
.mtl-body{height:0; overflow:hidden; opacity:0;
  transition:height .28s var(--ease), opacity .2s ease; will-change:height}
.mtl-body.is-open{height:152px; opacity:1;
  border-top:1px solid color-mix(in srgb, var(--border-subtle) 55%, transparent)}
.mtl-scroll{height:100%; overflow-y:auto; padding:14px 16px 18px;
  -webkit-overflow-scrolling:touch; scrollbar-width:none}
.mtl-scroll::-webkit-scrollbar{display:none}
.mtl-scroll .ms-lyric-line{font-size:var(--fs-sm); line-height:24px; color:var(--text-dim);
  transform:scale(.96); opacity:.5; text-align:center;
  transition:color .25s ease, transform .25s ease, opacity .25s ease;
  word-break:break-all}
.mtl-scroll .ms-lyric-trans{opacity:.7}
.mtl-scroll .ms-lyric-line.is-on{color:var(--netease); font-weight:700;
  font-size:var(--fs-base); transform:scale(1.04); opacity:1;
  text-shadow:0 0 18px color-mix(in srgb, var(--netease) 45%, transparent)}


.ms-now{padding:6px 0 12px}
.ms-top{display:flex; align-items:center; gap:11px}

.ms-cover{position:relative; flex:none; width:58px; height:58px;
  border-radius:50%; overflow:hidden; background:var(--bg-card);
  box-shadow:var(--shadow-card), 0 0 0 3px color-mix(in srgb, var(--netease) 22%, transparent)}
.ms-cover-ph{position:absolute; inset:0; display:grid; place-items:center;
  color:var(--text-dim); border-radius:50%}
.ms-cover-ph svg{width:22px; height:22px}
.ms-cover img{position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; display:block; border-radius:50%}
.ms-cover.is-spin img{animation:ms-spin 9s linear infinite}
@keyframes ms-spin{to{transform:rotate(360deg)}}
.ms-meta{flex:1; min-width:0}
.ms-name{font-size:var(--fs-base); font-weight:600; color:var(--text-primary);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.ms-artist{margin-top:3px; font-size:var(--fs-xs); color:var(--text-secondary);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

.ms-ctrl{flex:none; display:flex; align-items:center; gap:4px}
.ms-btn{width:42px; height:42px; padding:10px; border:none; background:transparent;
  border-radius:50%; color:var(--text-secondary); cursor:pointer;
  display:grid; place-items:center; -webkit-tap-highlight-color:transparent;
  transition:color .15s, background .15s, transform .12s var(--ease)}
.ms-btn svg{width:100%; height:100%}
.ms-btn:hover{background:var(--bg-hover); color:var(--text-primary)}
.ms-btn:active{transform:scale(.9); color:var(--text-primary)}
.ms-btn-main{width:54px; height:54px; padding:14px; color:#fff;
  background:linear-gradient(140deg, var(--netease), var(--netease));
  box-shadow:0 4px 16px color-mix(in srgb, var(--netease) 42%, transparent);
  transition:transform .12s var(--ease), box-shadow .15s}
.ms-btn-main:hover{box-shadow:0 6px 22px color-mix(in srgb, var(--netease) 55%, transparent)}
.ms-btn-main:active{color:#fff; transform:scale(.94)}
.ms-btn:focus-visible{outline:none; box-shadow:var(--ring)}


.ms-bar{position:relative; height:5px; margin-top:14px; border-radius:3px;
  background:var(--bg-hover); cursor:pointer; transition:height .15s var(--ease)}
.ms-bar::before{content:''; position:absolute; left:0; right:0;
  top:-11px; bottom:-11px}
.ms-bar:hover{height:7px}
.ms-bar-fill{position:absolute; left:0; top:0; bottom:0; width:0;
  border-radius:3px; background:linear-gradient(90deg, var(--netease), var(--netease));
  transition:width .12s linear}
.ms-bar-knob{position:absolute; top:50%; left:0; width:12px; height:12px;
  margin:-6px 0 0 -6px; border-radius:50%; background:#fff;
  box-shadow:0 1px 5px rgba(0,0,0,.5); transition:left .12s linear, opacity .15s, transform .15s;
  opacity:0; transform:scale(.7)}
.ms-bar:hover .ms-bar-knob{opacity:1; transform:scale(1)}
.ms-time{margin-top:7px; font-family:var(--font-mono); font-size:var(--fs-2xs);
  color:var(--text-dim); font-variant-numeric:tabular-nums}


.ms-sec{display:flex; align-items:center; gap:8px; margin:4px 0 8px}
.ms-sec-t{font-size:var(--fs-sm); font-weight:600; color:var(--text-primary)}
.ms-sec-h{font-size:var(--fs-2xs); color:var(--text-dim)}


.ms-pls{display:flex; gap:10px; overflow-x:auto; padding:2px 0 4px;
  -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity}
.ms-pls::-webkit-scrollbar{display:none}
.ms-pl{flex:none; width:88px; padding:0; border:none; background:transparent;
  cursor:pointer; text-align:center; scroll-snap-align:start;
  -webkit-tap-highlight-color:transparent}

.ms-pl-cover{display:block; position:relative; width:88px; height:88px;
  border-radius:var(--radius-sm); overflow:hidden;
  background:var(--bg-card); border:1px solid var(--border-subtle);
  transition:border-color .16s, box-shadow .16s}
.ms-pl-ph{position:absolute; inset:0; display:grid; place-items:center;
  color:var(--text-dim)}
.ms-pl-ph svg{width:22px; height:22px}
.ms-pl-cover img{position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; display:block}
.ms-pl.is-active .ms-pl-cover{border-color:var(--netease);
  box-shadow:0 0 0 2px color-mix(in srgb, var(--netease) 30%, transparent)}
.ms-pl:active .ms-pl-cover{transform:scale(.96)}
.ms-pl-name{display:block; margin-top:6px; font-size:var(--fs-2xs);
  color:var(--text-secondary); overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap}
.ms-pl.is-active .ms-pl-name{color:var(--netease)}
.ms-pl-n{display:block; font-size:var(--fs-2xs); color:var(--text-dim)}


.ms-tracks{display:flex; flex-direction:column}
.ms-tk{display:flex; align-items:center; gap:10px; width:100%;
  min-height:52px; padding:7px 0; border:none; background:transparent;
  text-align:left; cursor:pointer; border-bottom:1px solid var(--border-subtle);
  -webkit-tap-highlight-color:transparent}
.ms-tk:last-child{border-bottom:none}
.ms-tk:active{background:var(--bg-hover)}
.ms-tk-n{flex:none; width:22px; text-align:center; font-family:var(--font-mono);
  font-size:var(--fs-2xs); color:var(--text-dim)}
.ms-tk-txt{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px}
.ms-tk-name{font-size:var(--fs-sm); color:var(--text-primary); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}
.ms-tk-sub{font-size:var(--fs-2xs); color:var(--text-dim); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}
.ms-tk-d{flex:none; font-family:var(--font-mono); font-size:var(--fs-2xs);
  color:var(--text-dim); font-variant-numeric:tabular-nums}
.ms-tk.is-cur .ms-tk-name{color:var(--netease); font-weight:600}
.ms-tk.is-cur .ms-tk-n{color:var(--netease)}


.ms-eq{display:inline-flex; align-items:flex-end; gap:2px; height:12px;
  vertical-align:-1px}
.ms-eq i{width:2px; border-radius:1px; background:var(--netease);
  transform-origin:bottom; animation:ms-eq .92s ease-in-out infinite}
.ms-eq i:nth-child(1){height:62%; animation-delay:0s}
.ms-eq i:nth-child(2){height:100%; animation-delay:.16s}
.ms-eq i:nth-child(3){height:44%; animation-delay:.32s}
@keyframes ms-eq{0%,100%{transform:scaleY(.42)}50%{transform:scaleY(1)}}


.ms-opts{margin-top:14px; border-top:1px solid var(--border-subtle);
  padding-top:2px}
.ms-opt{display:flex; align-items:center; gap:12px; min-height:56px;
  padding:8px 0; cursor:pointer}
.ms-opt-txt{flex:1; min-width:0}
.ms-opt-name{display:block; font-size:var(--fs-sm); color:var(--text-primary)}
.ms-opt-desc{display:block; margin-top:2px; font-size:var(--fs-2xs);
  color:var(--text-dim); line-height:1.45}

.ms-opt{position:relative}


.ms-empty{padding:16px 0; text-align:center; font-size:var(--fs-sm);
  color:var(--text-dim); line-height:1.6}


.ms-sec-btn{margin-left:auto; flex:none; min-height:32px; padding:0 10px;
  border:none; border-radius:8px; background:transparent; color:var(--netease);
  font-family:inherit; font-size:var(--fs-2xs); cursor:pointer;
  transition:background .15s var(--ease)}
.ms-sec-btn:active{background:var(--bg-hover)}

.ms-manage{flex:1; min-height:0; display:flex; flex-direction:column}

.ms-manage[hidden]{display:none}
.ms-mhead{flex:none; display:flex; align-items:center; gap:8px;
  padding:2px 0 10px; border-bottom:1px solid var(--border-subtle)}
.ms-back{flex:none; width:34px; height:34px; padding:7px; border:none;
  border-radius:50%; background:transparent; color:var(--text-secondary);
  cursor:pointer; transition:background .15s var(--ease)}
.ms-back svg{width:100%; height:100%; display:block}
.ms-back:active{background:var(--bg-hover); color:var(--text-primary)}
.ms-mtitle{flex:1; min-width:0; font-size:var(--fs-base); font-weight:600;
  color:var(--text-primary)}
.ms-mini{flex:none; min-height:32px; padding:0 10px; border:1px solid var(--border-subtle);
  border-radius:8px; background:transparent; color:var(--text-secondary);
  font-family:inherit; font-size:var(--fs-2xs); cursor:pointer;
  transition:background .15s var(--ease), color .15s var(--ease)}
.ms-mini:active{background:var(--bg-hover); color:var(--text-primary)}

.ms-mlist{flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch;
  padding:4px 0}
.ms-mrow{position:relative; display:flex; align-items:center; gap:11px;
  min-height:60px; padding:8px 2px; cursor:pointer;
  border-radius:var(--radius-sm); -webkit-tap-highlight-color:transparent;
  transition:background .15s var(--ease)}
.ms-mrow:active{background:var(--bg-hover)}
.ms-mrow + .ms-mrow{border-top:1px solid var(--border-subtle)}
.ms-switch-in{position:absolute; width:0; height:0; opacity:0; pointer-events:none}
.ms-mcover{position:relative; flex:none; width:44px; height:44px;
  border-radius:var(--radius-sm); overflow:hidden; background:var(--bg-card);
  transition:opacity .15s var(--ease), filter .15s var(--ease)}
.ms-mcover img{position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; display:block}
.ms-mcover .ms-pl-ph{position:absolute; inset:0; display:grid; place-items:center;
  color:var(--text-dim)}
.ms-mcover .ms-pl-ph svg{width:18px; height:18px}
.ms-mmeta{flex:1; min-width:0}
.ms-mname{display:block; font-size:var(--fs-sm); color:var(--text-primary);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.ms-msub{display:block; margin-top:3px; font-size:var(--fs-2xs); color:var(--text-dim)}
.ms-mplay{color:var(--netease)}

.ms-mrow:not(.is-on) .ms-mcover{opacity:.45; filter:saturate(.5)}
.ms-mrow:not(.is-on) .ms-mname{color:var(--text-secondary)}


.ms-switch{flex:none; position:relative; width:44px; height:26px;
  border-radius:13px; background:var(--bg-hover);
  border:1px solid var(--border-subtle);
  transition:background .18s var(--ease), border-color .18s var(--ease)}
.ms-switch::after{content:''; position:absolute; top:2px; left:2px;
  width:20px; height:20px; border-radius:50%; background:var(--text-dim);
  transition:transform .18s var(--ease), background .18s var(--ease)}

.ms-switch-in:checked ~ .ms-switch{background:var(--netease); border-color:var(--netease)}
.ms-switch-in:checked ~ .ms-switch::after{transform:translateX(18px); background:#fff}
.ms-switch-in:focus-visible ~ .ms-switch{box-shadow:var(--ring)}

.ms-mfoot{flex:none; padding:10px 0 2px; border-top:1px solid var(--border-subtle)}
.ms-mfoot-r{display:flex; align-items:center; gap:10px; margin-top:8px}
.ms-mstat{flex:1; min-width:0; font-size:var(--fs-2xs); color:var(--text-dim)}
.ms-tip{font-size:var(--fs-2xs); color:var(--text-dim); line-height:1.65}
.ms-tip b{color:var(--netease); font-weight:600}


body.music-open{overflow:hidden}


@media (min-width:720px){
  #music-sheet{left:50%; right:auto; width:560px; transform:translate(-50%, 101%)}
  #music-sheet.is-on{transform:translate(-50%, 0)}
}


#points-overlay, #insp-overlay, #video-overlay, #task-overlay,
#report-overlay, #invest-overlay, #bookdrop-overlay, #learn-overlay,
#points-overlay[style], #insp-overlay[style], #video-overlay[style],
#task-overlay[style], #report-overlay[style], #invest-overlay[style],
#bookdrop-overlay[style], #learn-overlay[style] {
  padding-top: var(--mtl-h) !important;
  box-sizing: border-box !important;
}
