/* 設計變數、重設、整體版面 */
:root{
  --ground:#0e0f0c; --surface:#1b1c18; --raised:#272823; --line:#3a3b34; --line-soft:#272823;
  --text:#f6f7f0; --muted:#a9ab9f; --faint:#9fa295;
  --ember:#c8f04a; --ember-deep:#a6cf2b; --gold:#e9ff8a;
  --str:#ff6f61; --end:#ffb84d; --dis:#7fe07a; --rec:#6cb4ff; --kit:#ff6b8b; --good:#7fe07a;
  --on-accent:#0e0f0c; --on-danger:#000000; --switch:#a6cf2b; --glow:#0e0f0c;
  --pop:#c8f04a; --on-pop:#0e0f0c;
  --card-shadow:none; --btn-glow:none; --bw:0px;
  /* 系統填色（按鈕、輸入框、分段控制的底）與細分隔線：深色主題用這組，淺色主題在 ios.css 換成淺色版 */
  --fill:rgba(118,118,128,.24); --fill-2:rgba(118,118,128,.32); --sep:rgba(84,84,88,.65);
  --r-sm:10px; --r:14px; --tab-h:58px;
  /* 數字用圓體（iPhone 上是 SF Pro Rounded，像「健身」App 的數字），其他平台用系統字 */
  --display:ui-rounded,"SF Pro Rounded",-apple-system,BlinkMacSystemFont,"PingFang TC","Noto Sans TC",system-ui,sans-serif;
  --body:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang TC","Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;
  color-scheme:dark;
}
/* 只有預設的深色才用的：分段控制的滑塊、彈出面板的底與面板裡的卡片（和 iPhone 深色模式一樣，面板比底亮一階） */
:root:not([data-theme]){--seg-thumb:#636366; --sheet-bg:#1c1c1e}
html,body{height:100%;margin:0}
/* 整頁捲到頂或底時不要回彈：iPhone 回彈時固定在底部的分頁列會跟著整頁一起被拉起來、晃動 */
html{overscroll-behavior-y:none}
body{overscroll-behavior-y:contain;background:var(--ground);color:var(--text);font-family:var(--body);font-size:17px;line-height:1.47;letter-spacing:0;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
button,input,select{font:inherit;color:inherit}
/* 輸入框至少 16px：iPhone Safari 點進小於 16px 的欄位會自動放大畫面，版面就會跑掉回不來 */
input,select,textarea{font-size:max(16px,1em)}
button{cursor:pointer;touch-action:manipulation}
:focus-visible{outline:2px solid var(--gold);outline-offset:2px;border-radius:6px}
.num{font-family:var(--display);font-variant-numeric:tabular-nums}
/* 任何一塊內容超出手機寬度，都不能把整頁撐寬（撐寬後瀏覽器會縮小整頁，分頁列也會跑到畫面外） */
.app{overflow-x:clip;max-width:480px;margin:0 auto;min-height:100%;position:relative;padding-bottom:calc(var(--tab-h) + env(safe-area-inset-bottom,0px) + 24px)}
@media (min-width:520px){ .app{border-inline:.5px solid var(--sep);background:var(--ground)} }
/* 列表列的 min-height 指的是整列高度（含上下留白）；預設 content-box 會把留白再加上去，列表就變得又高又散 */
.entry,.toggle-row,.field,.mrow,details.w summary,.wleaf{box-sizing:border-box}
