/* DiabEats — MVP: 简中 + English only. Fonts: Noto Sans SC, DM Sans */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@700&family=Noto+Sans+SC:wght@300;400;500;700&family=DM+Serif+Display&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── THEME VARIABLES ── */
:root {
  /* 品牌色（專業藍 / 活力綠 / 中性黃 / 冷靜底色） */
  --primary-color: #2d84a1;
  --success-color: #00bf7d;
  --warning-color: #bd9361;
  --bg-color: #f5f5f5;

  --accent: var(--primary-color);
  --accent2: var(--success-color);
  --accent-pale: #d4e8ee;
  --accent-grad: linear-gradient(150deg, #1d6b85 0%, var(--primary-color) 50%, var(--success-color) 100%);
  --bg: var(--bg-color);
  --card: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --navbar: #ffffff;
  --input-bg: var(--bg-color);
  --amber: var(--warning-color);
  --amber-l: #d4b896;
  --red: #e63946;
  --blue: var(--primary-color);
  --radius: 16px;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* DARK MODE */
[data-theme="dark"] {
  --bg: #0f1117;
  --card: #1e2130;
  --text: #f0f0f0;
  --text-muted: #8892a4;
  --border: #2e3347;
  --navbar: #1a1d2e;
  --input-bg: #252838;
  --shadow: 0 2px 14px rgba(0,0,0,0.3);
}

/* THEME COLORS */
[data-accent="green"]  { --accent:#2d6a4f; --accent2:#52b788; --accent-pale:#d8f3dc; --accent-grad:linear-gradient(150deg,#1b4332,#2d6a4f 60%,#52b788); }
[data-accent="blue"]   { --accent:#1d4ed8; --accent2:#3b82f6; --accent-pale:#dbeafe; --accent-grad:linear-gradient(150deg,#1e3a8a,#1d4ed8 60%,#3b82f6); }
[data-accent="purple"] { --accent:#7c3aed; --accent2:#a78bfa; --accent-pale:#ede9fe; --accent-grad:linear-gradient(150deg,#4c1d95,#7c3aed 60%,#a78bfa); }
[data-accent="rose"]   { --accent:#be185d; --accent2:#f472b6; --accent-pale:#fce7f3; --accent-grad:linear-gradient(150deg,#831843,#be185d 60%,#f472b6); }
[data-accent="amber"]  { --accent:#b45309; --accent2:#f59e0b; --accent-pale:#fef3c7; --accent-grad:linear-gradient(150deg,#78350f,#b45309 60%,#f59e0b); }

* { box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent; }

body {
  font-family:'Noto Sans SC','DM Sans',sans-serif;
  background:var(--bg); color:var(--text);
  max-width:430px; margin:0 auto; min-height:100vh;
  overflow-x:hidden; transition:background 0.3s, color 0.3s;
}

/* ── TOP BAR ── */
.topbar {
  position:fixed; top:0; left:50%; transform:translateX(-50%);
  width:100%; max-width:430px; z-index:200;
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 14px; background:rgba(var(--card-rgb,255,255,255),0.85);
  backdrop-filter:blur(10px); border-bottom:1px solid var(--border);
  transition:background 0.3s;
}
[data-theme="dark"] .topbar { background:rgba(30,33,48,0.9); }
.topbar-logo { font-size:19px; font-weight:700; color:var(--accent); }
.topbar-right { display:flex; gap:6px; align-items:center; }
.icon-btn {
  width:32px; height:32px; border-radius:50%; border:none; cursor:pointer;
  background:var(--input-bg); color:var(--text); font-size:19px;
  display:flex; align-items:center; justify-content:center;
  transition:all 0.18s;
}
.icon-btn:active { transform:scale(0.92); }

.topbar-langs { display:flex; gap:3px; align-items:center; }
.tb-lang {
  padding:4px 8px; border-radius:7px; border:1.5px solid var(--border);
  background:var(--input-bg); color:var(--text-muted);
  font-size:13px; font-weight:600; font-family:inherit; cursor:pointer;
  transition:all 0.18s; white-space:nowrap; line-height:1.2;
}
.tb-lang:active { transform:scale(0.93); }
.tb-lang.active {
  background:var(--accent) !important; color:white !important; border-color:var(--accent) !important;
}

/* ── NAVBAR ── */
.navbar {
  position:fixed; bottom:0; left:50%; transform:translateX(-50%);
  width:100%; max-width:430px;
  background:var(--navbar); border-top:1px solid var(--border);
  display:flex; z-index:100;
  padding-bottom:env(safe-area-inset-bottom);
  transition:background 0.3s;
}
.nav-item {
  flex:1; display:flex; flex-direction:column; align-items:center;
  padding:10px 0 8px; cursor:pointer; color:var(--text-muted);
  font-size:19px; gap:3px; transition:color 0.2s;
}
.nav-item.active { color:var(--accent); }
.nav-item svg { width:22px; height:22px; }

/* ── SCREENS ── */
.screen { display:none; padding-top:56px; padding-bottom:80px; min-height:100vh; animation:fadeIn 0.28s ease; }
.screen.active { display:block; }
@keyframes fadeIn { from{opacity:0;transform:translateY(5px);}to{opacity:1;transform:translateY(0);} }

/* ── HEADER ── */
.hdr { background:var(--accent-grad); padding:24px 20px 26px; color:white; position:relative; overflow:hidden; }
.hdr::before { content:''; position:absolute; top:-50px; right:-50px; width:200px; height:200px; background:rgba(255,255,255,0.07); border-radius:50%; }
.hdr-title { font-family:'Noto Serif SC','DM Serif Display',serif; font-size:24px; font-weight:700; }
.hdr-sub { font-size:19px; opacity:0.82; margin-top:4px; }

/* ── CARDS ── */
.card { background:var(--card); border-radius:var(--radius); padding:16px; margin:0 14px 12px; box-shadow:var(--shadow); transition:background 0.3s; }
.card-title { font-size:19px; font-weight:700; margin-bottom:12px; }

/* ── BS WIDGET ── */
.bs-top { display:flex; align-items:center; justify-content:space-between; background:var(--accent-pale); border-radius:12px; padding:14px; margin-bottom:12px; }
.bs-big { font-size:44px; font-weight:700; color:var(--accent); line-height:1; }
.bs-unit-label { font-size:19px; color:var(--text-muted); margin-top:3px; }
.bs-badge { padding:5px 13px; border-radius:20px; font-size:19px; font-weight:600; }
.bsok  { background:var(--accent-pale); color:var(--accent); }
.bswarn{ background:#fef9c3; color:#854d0e; }
.bshi  { background:#fee2e2; color:var(--red); }
.stats-row { display:flex; }
.stat { flex:1; text-align:center; }
.stat-v { font-size:19px; font-weight:700; }
.stat-l { font-size:13px; color:var(--text-muted); margin-top:1px; }

/* ── UNIT TOGGLE ── */
.unit-toggle {
  display:flex; background:var(--input-bg); border-radius:8px; padding:3px;
  width:fit-content; border:1.5px solid var(--border);
}
.unit-btn { padding:5px 12px; border-radius:6px; font-size:19px; font-weight:600; cursor:pointer; border:none; background:transparent; color:var(--text-muted); font-family:inherit; transition:all 0.18s; }
.unit-btn.active { background:var(--accent); color:white; }

/* ── QUICK GRID ── */
.qgrid { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:0 14px 4px; }
.qbtn { background:var(--card); border-radius:14px; padding:16px; cursor:pointer; box-shadow:var(--shadow); transition:transform 0.15s; }
.qbtn:active { transform:scale(0.97); }
.qi { width:36px; height:36px; margin:0 auto 8px; display:flex; align-items:center; justify-content:center; }
.qi svg { width:26px; height:26px; }
.ql { font-size:19px; font-weight:700; }
.qd { font-size:19px; color:var(--text-muted); margin-top:2px; }

/* ── RECIPE ── */
.ri { display:flex; gap:12px; align-items:center; padding:11px 0; border-bottom:1px solid var(--border); }
.ri:last-child { border-bottom:none; }
.re { font-size:28px; width:42px; text-align:center; flex-shrink:0; }
.rn { font-size:19px; font-weight:600; }
.rm { font-size:19px; color:var(--text-muted); margin-top:2px; }
.gi-b { display:inline-block; font-size:19px; padding:2px 8px; border-radius:10px; margin-top:4px; }
.gi-low { background:var(--accent-pale); color:var(--accent); }
.gi-mid { background:#fef9c3; color:#854d0e; }
.tag { display:inline-flex; padding:2px 8px; border-radius:10px; font-size:19px; }
.tag-blue { background:#dbeafe; color:#1e40af; }
.tag-green { background:var(--accent-pale); color:var(--accent); }

/* ── SHOP ── */
.si { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--border); }
.si:last-child { border-bottom:none; }
.sck { width:22px; height:22px; border-radius:6px; border:2px solid var(--border); cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center; transition:all 0.18s; }
.sck.on { background:var(--accent); border-color:var(--accent); }
.sck.on::after { content:'✓'; color:white; font-size:19px; font-weight:700; }
.sn { flex:1; font-size:19px; }
.sn.done { text-decoration:line-through; color:var(--text-muted); }
.sq { font-size:19px; color:var(--text-muted); }

/* ── TABS ── */
.tabs { display:flex; gap:7px; padding:0 14px 10px; overflow-x:auto; scrollbar-width:none; }
.tabs::-webkit-scrollbar { display:none; }
.tab { padding:7px 14px; border-radius:20px; font-size:15px; font-weight:500; white-space:nowrap; cursor:pointer; border:2px solid var(--border); background:var(--card); color:var(--text); transition:all 0.18s; }
.tab.active { background:var(--accent); color:white; border-color:var(--accent); }

/* ── BS LOG ── */
.bsl { display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--border); }
.bsl:last-child { border-bottom:none; }
.bsl-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.bsl-left { flex:1; min-width:0; }
.bsl-m { font-size:19px; font-weight:500; }
.bsl-t { font-size:13px; color:var(--text-muted); margin-top:1px; }
.bsl-note { font-size:13px; color:var(--text-muted); margin-top:2px; font-style:italic; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bsl-right { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.bsl-v { font-size:20px; font-weight:700; }
.bsl-del { width:28px; height:28px; border-radius:8px; border:none; background:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center; color:var(--text-muted); opacity:0.5; transition:all 0.15s; }
.bsl-del:hover { background:var(--border); opacity:1; color:var(--red); }
.cok{color:var(--accent);} .cwarn{color:#d97706;} .chi{color:var(--red);}

.bs-range-bar { height:6px; border-radius:3px; background:linear-gradient(to right,#3b82f6 0%,var(--accent) 30%,#d97706 65%,var(--red) 100%); margin:8px 0 4px; position:relative; }
.bs-range-labels { display:flex; justify-content:space-between; font-size:12px; color:var(--text-muted); }
.bs-empty { text-align:center; padding:32px 0 16px; color:var(--text-muted); }

.period-tabs { display:flex; gap:6px; padding:0 14px 12px; }
.period-tab { flex:1; padding:7px 0; border-radius:10px; border:1.5px solid var(--border); background:var(--card); color:var(--text-muted); font-size:14px; font-weight:500; cursor:pointer; text-align:center; transition:all 0.15s; }
.period-tab.active { background:var(--accent); border-color:var(--accent); color:#fff; }

.bs-stats-row { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:0; }
.bs-stat { background:var(--input-bg); border-radius:10px; padding:10px 8px; text-align:center; }
.bs-stat-v { font-size:19px; font-weight:700; }
.bs-stat-l { font-size:13px; color:var(--text-muted); margin-top:2px; }

.seg-btns { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:14px; }
.seg-btn { flex:1; min-width:calc(50% - 4px); padding:10px 8px; border-radius:10px; border:1.5px solid var(--border); background:var(--input-bg); color:var(--text-muted); font-size:19px; cursor:pointer; text-align:center; transition:all 0.15s; }
.seg-btn.sel { background:var(--accent-pale); border-color:var(--accent); color:var(--accent); font-weight:600; }
.hint-ok { background:#f0fdf4; color:#166534; border-radius:9px; padding:8px 11px; font-size:19px; line-height:1.5; }
.hint-warn { background:#fffbeb; color:#92400e; border-radius:9px; padding:8px 11px; font-size:19px; line-height:1.5; }
.hint-hi { background:#fff1f2; color:#9f1239; border-radius:9px; padding:8px 11px; font-size:19px; line-height:1.5; }
[data-theme="dark"] .hint-ok { background:#052e16; color:#bbf7d0; }
[data-theme="dark"] .hint-warn { background:#2d1f00; color:#fde68a; }
[data-theme="dark"] .hint-hi { background:#2d0011; color:#fecdd3; }

.chart-sc { overflow-x:auto; scrollbar-width:none; }
.chart-sc::-webkit-scrollbar { display:none; }
.chart { display:flex; align-items:flex-end; gap:5px; height:80px; min-width:260px; }
.bw { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; }
.bars { display:flex; gap:2px; align-items:flex-end; height:56px; }
.bar { width:11px; border-radius:3px 3px 0 0; transition:height 0.5s cubic-bezier(.34,1.56,.64,1); }
.cday { font-size:13px; color:var(--text-muted); }

.phdr { background:var(--accent-grad); padding:70px 20px 26px; color:white; }
.ava { width:58px; height:58px; border-radius:50%; background:rgba(255,255,255,0.18); display:flex; align-items:center; justify-content:center; font-size:24px; margin-bottom:10px; }
.pname { font-family:'Noto Serif SC','DM Serif Display',serif; font-size:21px; font-weight:700; }
.ptags { display:flex; gap:6px; margin-top:7px; flex-wrap:wrap; }
.ptag { padding:3px 11px; border-radius:20px; font-size:13px; background:rgba(255,255,255,0.18); }
.kgrid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.kpi { text-align:center; }
.kv { font-size:26px; font-weight:700; }
.kl { font-size:13px; color:var(--text-muted); margin-top:2px; }
.srow { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid var(--border); }
.srow:last-child { border-bottom:none; }
.sk { font-size:19px; font-weight:600; }
.sv { font-size:19px; color:var(--text-muted); margin-top:2px; }

.theme-panel { background:var(--card); border-radius:var(--radius); padding:16px; margin:0 14px 12px; box-shadow:var(--shadow); }
.theme-panel-title { font-size:19px; font-weight:700; margin-bottom:12px; }
.color-row { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.color-dot {
  width:36px; height:36px; border-radius:50%; cursor:pointer;
  transition:transform 0.2s, box-shadow 0.2s;
  border:3px solid transparent; position:relative;
}
.color-dot.active { box-shadow:0 0 0 3px var(--accent); transform:scale(1.1); }
.color-dot::after { content:'✓'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:white; font-size:19px; font-weight:700; opacity:0; }
.color-dot.active::after { opacity:1; }
.mode-row { display:flex; gap:10px; }
.mode-btn {
  flex:1; padding:10px; border-radius:10px; border:2px solid var(--border);
  cursor:pointer; background:var(--input-bg); color:var(--text);
  font-size:19px; font-weight:500; font-family:inherit;
  display:flex; align-items:center; justify-content:center; gap:6px;
  transition:all 0.18s;
}
.mode-btn.active { border-color:var(--accent); background:var(--accent-pale); color:var(--accent); }
.unit-row { display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--border); }
.sl { font-size:13px; font-weight:700; letter-spacing:0.07em; color:var(--text-muted); text-transform:uppercase; padding:14px 18px 6px; }

.btn { width:100%; padding:14px; border-radius:12px; border:none; cursor:pointer; font-size:19px; font-weight:600; font-family:inherit; transition:all 0.18s; display:flex; align-items:center; justify-content:center; gap:8px; }
.btn-p { background:var(--accent); color:white; }
.btn-p:active { transform:scale(0.98); filter:brightness(1.1); }
.btn-o { background:var(--card); color:var(--accent); border:2px solid var(--accent); }
.btn-sm { padding:8px 14px; font-size:19px; border-radius:9px; width:auto; }

.ob {
  min-height:100vh;
  background: linear-gradient(160deg, #0d1117 0%, #161d28 50%, #1a2535 100%);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:44px 24px 36px; color:white; text-align:center;
  position:relative; overflow:hidden;
}
.ob::before {
  content:''; position:absolute;
  width:360px; height:360px; border-radius:50%;
  background: radial-gradient(circle, rgba(82,183,136,0.08) 0%, transparent 70%);
  top:-80px; right:-80px; pointer-events:none;
}
.ob::after {
  content:''; position:absolute;
  width:280px; height:280px; border-radius:50%;
  background: radial-gradient(circle, rgba(45,106,79,0.12) 0%, transparent 70%);
  bottom:-60px; left:-60px; pointer-events:none;
}
.ob-logo { margin-bottom:20px; display:flex; justify-content:center; position:relative; z-index:1; }
@keyframes pulse{0%,100%{transform:scale(1);}50%{transform:scale(1.04);}}
.ob-logo svg { animation:pulse 3s ease-in-out infinite; }
.ob-title { font-family:'DM Serif Display','Noto Serif SC',serif; font-size:30px; font-weight:700; margin-bottom:6px; letter-spacing:-0.3px; position:relative; z-index:1; }
.ob-sub { font-size:19px; opacity:0.55; line-height:1.7; margin-bottom:28px; font-weight:400; position:relative; z-index:1; }
.ob-feats { display:flex; flex-direction:column; gap:2px; width:100%; margin-bottom:28px; position:relative; z-index:1; }
.ob-feat { display:flex; align-items:center; gap:14px; padding:12px 4px; border-bottom:1px solid rgba(255,255,255,0.06); }
.ob-feat:last-child { border-bottom:none; }
.ob-fi { width:36px; height:36px; flex-shrink:0; background:rgba(255,255,255,0.06); border-radius:10px; display:flex; align-items:center; justify-content:center; }
.ob-ft { font-size:19px; font-weight:600; text-align:left; letter-spacing:0.01em; }
.ob-fd { font-size:19px; opacity:0.45; margin-top:2px; text-align:left; font-weight:400; }
.ob-lang-bar { display:flex; gap:6px; flex-wrap:nowrap; justify-content:center; margin-bottom:24px; width:100%; position:relative; z-index:1; }
.ob-lang-btn {
  padding:6px 10px; border-radius:8px; font-size:13px; font-weight:600;
  border:1px solid rgba(255,255,255,0.15); background:rgba(255,255,255,0.05);
  color:rgba(255,255,255,0.6); cursor:pointer; font-family:inherit;
  transition:all 0.18s; letter-spacing:0.02em; white-space:nowrap;
}
.ob-lang-btn:active { transform:scale(0.95); }
.ob-lang-btn.active { background:rgba(255,255,255,0.12); color:white; border-color:rgba(255,255,255,0.35); }
.ob-unit-row { display:flex; align-items:center; justify-content:space-between; width:100%; max-width:320px; background:rgba(255,255,255,0.05); border-radius:10px; padding:10px 14px; margin-bottom:20px; border:1px solid rgba(255,255,255,0.1); position:relative; z-index:1; }
.ob-unit-btn { padding:5px 14px; border-radius:6px; font-size:19px; font-weight:600; border:none; background:transparent; color:rgba(255,255,255,0.4); cursor:pointer; font-family:inherit; transition:all 0.18s; }
.ob-unit-btn.active { background:var(--accent); color:white; }
.ob-start-btn { background:var(--accent); color:white; border:none; cursor:pointer; padding:15px 40px; border-radius:12px; font-size:19px; font-weight:700; font-family:inherit; width:100%; max-width:320px; letter-spacing:0.02em; transition:all 0.2s; position:relative; z-index:1; }
.ob-start-btn:active { transform:scale(0.97); opacity:0.9; }
.ob-signin { margin-top:14px; font-size:19px; opacity:0.35; cursor:pointer; position:relative; z-index:1; letter-spacing:0.02em; }
.ob-signin:hover { opacity:0.6; }

.shop-price { font-size:19px; font-weight:600; color:var(--accent); white-space:nowrap; padding-left:8px; }
.store-tag { font-size:19px; font-weight:500; color:var(--accent2); background:var(--accent-pale); border-radius:6px; padding:1px 5px; margin-left:5px; vertical-align:middle; }
.add-shop-btn { width:100%; margin-top:10px; padding:9px; border-radius:10px; border:1.5px solid var(--accent2); background:var(--accent-pale); color:var(--accent); font-size:19px; font-weight:600; font-family:inherit; cursor:pointer; transition:all 0.18s; }
.add-shop-btn:active { transform:scale(0.98); }
.add-shop-btn.added { background:var(--accent); color:white; border-color:var(--accent); }
.rsi { display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--border); }
.rsi:last-child { border-bottom:none; }
.rsi-dot { width:7px; height:7px; border-radius:50%; background:var(--accent); flex-shrink:0; }
.rsi-name { flex:1; font-size:19px; }
.rsi-from { font-size:19px; color:var(--text-muted); }

.quest { display:none; padding:24px 18px 40px; min-height:100vh; background:var(--bg); transition:background 0.3s; }
.qprog { display:flex; gap:5px; margin-bottom:20px; }
.qd2 { height:4px; flex:1; border-radius:2px; background:var(--border); transition:background 0.3s; }
.qd2.done { background:var(--accent); }
.qd2.cur { background:var(--accent2); }
.q-hint { font-size:19px; color:var(--text-muted); margin-bottom:6px; }
.q-title { font-size:21px; font-weight:700; margin-bottom:4px; }
.q-sub { font-size:19px; color:var(--text-muted); margin-bottom:18px; line-height:1.5; }
.q-opts { display:flex; flex-direction:column; gap:9px; }
.q-opt { padding:13px 16px; border-radius:13px; border:2px solid var(--border); cursor:pointer; font-size:19px; transition:all 0.18s; display:flex; align-items:center; gap:11px; background:var(--card); color:var(--text); }
.q-opt:hover { border-color:var(--accent2); }
.q-opt.sel { border-color:var(--accent); background:var(--accent-pale); color:var(--accent); font-weight:600; }
.q-oi { width:28px; height:28px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.q-oi svg { width:20px; height:20px; }
.q-acts { display:flex; gap:10px; margin-top:20px; }

.overlay { position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:300; display:none; align-items:flex-end; justify-content:center; }
.overlay.open { display:flex; }
.modal { background:var(--card); border-radius:22px 22px 0 0; width:100%; max-width:430px; padding:20px 18px 40px; animation:slideUp 0.26s ease; transition:background 0.3s; }
@keyframes slideUp{from{transform:translateY(100%);}to{transform:translateY(0);}}
.m-handle { width:38px; height:4px; background:var(--border); border-radius:2px; margin:0 auto 16px; }
.m-title { font-size:19px; font-weight:700; margin-bottom:14px; }
.irow { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.ilabel { font-size:19px; color:var(--text-muted); width:50px; flex-shrink:0; }
.ifield { flex:1; padding:10px 12px; border-radius:10px; border:2px solid var(--border); font-size:19px; font-family:inherit; background:var(--input-bg); color:var(--text); outline:none; transition:border-color 0.18s; }
.ifield:focus { border-color:var(--accent); }
.bs-hint { font-size:19px; padding:9px 11px; border-radius:9px; background:var(--input-bg); margin-bottom:13px; min-height:34px; }
.ai-spin { display:flex; flex-direction:column; align-items:center; padding:36px 20px; gap:13px; }
.spinner { width:42px; height:42px; border:4px solid var(--accent-pale); border-top-color:var(--accent); border-radius:50%; animation:spin 0.7s linear infinite; }
@keyframes spin{to{transform:rotate(360deg);}}
.wcard { background:#fffbeb; border:1px solid #fcd34d; border-radius:var(--radius); padding:13px 15px; margin:0 14px 12px; display:flex; gap:10px; font-size:19px; color:#78350f; line-height:1.6; }
[data-theme="dark"] .wcard { background:#2d2500; border-color:#7c6200; color:#fde68a; }
#settingsScreen .hdr { padding-top:24px; }
