/* 画面デザインテーマ（theme.js が html の data-theme を切り替える）。
   土台のデザインは friendly。ここでは各テーマの上書きだけを定義する。 */

/* 標準（元のデザイン） */
html[data-theme="standard"] {
  --primary: #1b5e20; --primary-dark: #144a18;
  --grad: linear-gradient(135deg, #17451a 0%, #1b5e20 55%, #2e7d32 100%);
  --bg: #f2f5f1; --surface: #ffffff; --border: #dde4dc;
  --ink: #1c231d; --sub: #5b6b62;
  --shadow-card: 0 1px 2px rgba(23, 54, 24, 0.05), 0 4px 14px rgba(23, 54, 24, 0.05); --radius: 14px;
}
html[data-theme="standard"] .header { background: var(--grad); color: #ffffff; }
html[data-theme="standard"] .btn-gear { color: #ffffff; }
html[data-theme="standard"] #user-badge { background: rgba(255, 255, 255, 0.2) !important; }
html[data-theme="standard"] .btn-qty { background: #edf1ed; border-radius: 12px; }
html[data-theme="standard"] .card input[type="number"] { border-radius: 10px; }
html[data-theme="standard"] .section-label { background: #e6f1e6; border-left-color: #1b5e20; border-radius: 10px; }
html[data-theme="standard"] .btn-copy-bar { background: #dfe7df; color: #144a18; border-radius: 10px; }
html[data-theme="standard"] .btn-save { border-radius: 12px; }
html[data-theme="standard"] .btn-form { background: #37474f; border-radius: 12px; }
html[data-theme="standard"] .btn-history { background: #607d8b; border-radius: 12px; }
html[data-theme="standard"] .btn-gift { background: #37474f; border-radius: 12px; }
html[data-theme="standard"] .btn-card { background: #455a64; border-radius: 12px; }
html[data-theme="standard"] .btn-login { border-radius: 12px; }
html[data-theme="standard"] table.card-table thead th, html[data-theme="standard"] table.card-table thead th.term-head { background: #1e4620; }
html[data-theme="standard"] thead tr:first-child th, html[data-theme="standard"] .view-table thead tr:first-child th, html[data-theme="standard"] thead th.sticky-brand, html[data-theme="standard"] thead th.sticky-price, html[data-theme="standard"] .view-table th.vs-brand, html[data-theme="standard"] .view-table th.vs-price { background: #1e4620; }
html[data-theme="standard"] thead tr:nth-child(2) th, html[data-theme="standard"] .view-table thead tr:nth-child(2) th { background: #2c5c2e; }
html[data-theme="standard"] .md th { background: #1e4620; }

/* clean（すっきり） */
html[data-theme="clean"] {
  --primary: #1b5e20; --primary-dark: #144a18;
  --grad: linear-gradient(135deg, #17451a 0%, #1b5e20 55%, #2e7d32 100%);
  --bg: #f7f9f7; --surface: #ffffff; --border: #e3eae3;
  --ink: #1c231d; --sub: #5b6b62;
  --shadow-card: 0 1px 2px rgba(23, 54, 24, 0.04), 0 6px 18px rgba(23, 54, 24, 0.05); --radius: 14px;
}
html[data-theme="clean"] .header { background: var(--grad); color: #ffffff; }
html[data-theme="clean"] .btn-gear { color: #ffffff; }
html[data-theme="clean"] #user-badge { background: rgba(255, 255, 255, 0.2) !important; }
html[data-theme="clean"] .btn-qty { background: #f0f4f0; border-radius: 12px; }
html[data-theme="clean"] .card input[type="number"] { border-radius: 10px; }
html[data-theme="clean"] .section-label { background: #eef4ee; border-left-color: #1b5e20; border-radius: 10px; }
html[data-theme="clean"] .btn-copy-bar { background: #e8efe8; color: #144a18; border-radius: 10px; }
html[data-theme="clean"] .btn-save { border-radius: 12px; }
html[data-theme="clean"] .btn-form { background: #37474f; border-radius: 12px; }
html[data-theme="clean"] .btn-history { background: #607d8b; border-radius: 12px; }
html[data-theme="clean"] .btn-gift { background: #37474f; border-radius: 12px; }
html[data-theme="clean"] .btn-card { background: #455a64; border-radius: 12px; }
html[data-theme="clean"] .btn-login { border-radius: 12px; }
html[data-theme="clean"] table.card-table thead th, html[data-theme="clean"] table.card-table thead th.term-head { background: #1e4620; }
html[data-theme="clean"] thead tr:first-child th, html[data-theme="clean"] .view-table thead tr:first-child th, html[data-theme="clean"] thead th.sticky-brand, html[data-theme="clean"] thead th.sticky-price, html[data-theme="clean"] .view-table th.vs-brand, html[data-theme="clean"] .view-table th.vs-price { background: #1e4620; }
html[data-theme="clean"] thead tr:nth-child(2) th, html[data-theme="clean"] .view-table thead tr:nth-child(2) th { background: #2c5c2e; }
html[data-theme="clean"] .md th { background: #1e4620; }

/* friendly（やさしい） */
html[data-theme="friendly"] {
  --primary: #3e7d4e; --primary-dark: #2f613d;
  --grad: linear-gradient(135deg, #2f613d 0%, #3e7d4e 55%, #458257 100%);
  --bg: #fdf8f2; --surface: #ffffff; --border: #eedfd8;
  --ink: #1c231d; --sub: #5b6b62;
  --shadow-card: 0 2px 10px rgba(180, 140, 130, 0.13); --radius: 20px;
}
html[data-theme="friendly"] .header { background: linear-gradient(135deg, #f6dde0 0%, #dcf2da 100%); color: #274435; }
html[data-theme="friendly"] .btn-gear { color: #274435; }
html[data-theme="friendly"] #user-badge { background: rgba(39, 68, 53, 0.12) !important; }
html[data-theme="friendly"] .btn-qty { background: #edf7ed; border-radius: 999px; }
html[data-theme="friendly"] .card input[type="number"] { border-radius: 999px; }
html[data-theme="friendly"] .section-label { background: #e6f4e2; border-left-color: #8fce9b; border-radius: 16px; }
html[data-theme="friendly"] .btn-copy-bar { background: #f9e9ec; color: #7a4a52; border-radius: 999px; }
html[data-theme="friendly"] .btn-save { border-radius: 16px; }
html[data-theme="friendly"] .btn-form { background: #66796a; border-radius: 16px; }
html[data-theme="friendly"] .btn-history { background: #5a7a5e; border-radius: 16px; }
html[data-theme="friendly"] .btn-gift { background: #66796a; border-radius: 16px; }
html[data-theme="friendly"] .btn-card { background: #627662; border-radius: 16px; }
html[data-theme="friendly"] .btn-login { border-radius: 16px; }
html[data-theme="friendly"] table.card-table thead th, html[data-theme="friendly"] table.card-table thead th.term-head { background: #3e7d4e; }
html[data-theme="friendly"] thead tr:first-child th, html[data-theme="friendly"] .view-table thead tr:first-child th, html[data-theme="friendly"] thead th.sticky-brand, html[data-theme="friendly"] thead th.sticky-price, html[data-theme="friendly"] .view-table th.vs-brand, html[data-theme="friendly"] .view-table th.vs-price { background: #3e7d4e; }
html[data-theme="friendly"] thead tr:nth-child(2) th, html[data-theme="friendly"] .view-table thead tr:nth-child(2) th { background: #4c7a55; }
html[data-theme="friendly"] .md th { background: #3e7d4e; }

/* modern（紫＋明朝） */
html[data-theme="modern"] {
  --primary: #553f83; --primary-dark: #41305f;
  --grad: linear-gradient(135deg, #41305f 0%, #553f83 60%, #6d549f 100%);
  --bg: #f6f4f9; --surface: #ffffff; --border: #ddd6ea;
  --ink: #241d33; --sub: #6a6080;
  --shadow-card: 0 1px 3px rgba(65, 48, 95, 0.10); --radius: 6px;
}
html[data-theme="modern"] body { font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, Georgia, serif; }
html[data-theme="modern"] .header { background: var(--grad); color: #ffffff; }
html[data-theme="modern"] .btn-gear { color: #ffffff; }
html[data-theme="modern"] #user-badge { background: rgba(255, 255, 255, 0.2) !important; }
html[data-theme="modern"] .btn-qty { background: #f0ebf7; border-radius: 6px; }
html[data-theme="modern"] .card input[type="number"] { border-radius: 6px; }
html[data-theme="modern"] .section-label { background: #efeaf6; border-left-color: #553f83; border-radius: 4px; }
html[data-theme="modern"] .btn-copy-bar { background: #e7def3; color: #41305f; border-radius: 6px; }
html[data-theme="modern"] .btn-save { border-radius: 6px; }
html[data-theme="modern"] .btn-form { background: #41305f; border-radius: 6px; }
html[data-theme="modern"] .btn-history { background: #6d549f; border-radius: 6px; }
html[data-theme="modern"] .btn-gift { background: #41305f; border-radius: 6px; }
html[data-theme="modern"] .btn-card { background: #58467f; border-radius: 6px; }
html[data-theme="modern"] .btn-login { border-radius: 6px; }
html[data-theme="modern"] table.card-table thead th, html[data-theme="modern"] table.card-table thead th.term-head { background: #41305f; }
html[data-theme="modern"] thead tr:first-child th, html[data-theme="modern"] .view-table thead tr:first-child th, html[data-theme="modern"] thead th.sticky-brand, html[data-theme="modern"] thead th.sticky-price, html[data-theme="modern"] .view-table th.vs-brand, html[data-theme="modern"] .view-table th.vs-price { background: #41305f; }
html[data-theme="modern"] thead tr:nth-child(2) th, html[data-theme="modern"] .view-table thead tr:nth-child(2) th { background: #6d549f; }
html[data-theme="modern"] .md th { background: #41305f; }

/* minimal（白黒） */
html[data-theme="minimal"] {
  --primary: #0c0c09; --primary-dark: #0c0c09;
  --grad: #0c0c09;
  --bg: #f4f4f1; --surface: #fffef9; --border: #d8d8d0;
  --ink: #0c0c09; --sub: #55554e;
  --shadow-card: none; --radius: 4px;
}
html[data-theme="minimal"] .header { background: var(--grad); color: #ffffff; }
html[data-theme="minimal"] .btn-gear { color: #ffffff; }
html[data-theme="minimal"] #user-badge { background: rgba(255, 255, 255, 0.2) !important; }
html[data-theme="minimal"] .btn-qty { background: #ecece6; border-radius: 4px; }
html[data-theme="minimal"] .card input[type="number"] { border-radius: 4px; }
html[data-theme="minimal"] .section-label { background: #ecece6; border-left-color: #0c0c09; border-radius: 2px; }
html[data-theme="minimal"] .btn-copy-bar { background: #e2e2da; color: #0c0c09; border-radius: 4px; }
html[data-theme="minimal"] .btn-save { border-radius: 4px; }
html[data-theme="minimal"] .btn-form { background: #0c0c09; border-radius: 4px; }
html[data-theme="minimal"] .btn-history { background: #55554e; border-radius: 4px; }
html[data-theme="minimal"] .btn-gift { background: #0c0c09; border-radius: 4px; }
html[data-theme="minimal"] .btn-card { background: #3a3a35; border-radius: 4px; }
html[data-theme="minimal"] .btn-login { border-radius: 4px; }
html[data-theme="minimal"] table.card-table thead th, html[data-theme="minimal"] table.card-table thead th.term-head { background: #0c0c09; }
html[data-theme="minimal"] thead tr:first-child th, html[data-theme="minimal"] .view-table thead tr:first-child th, html[data-theme="minimal"] thead th.sticky-brand, html[data-theme="minimal"] thead th.sticky-price, html[data-theme="minimal"] .view-table th.vs-brand, html[data-theme="minimal"] .view-table th.vs-price { background: #0c0c09; }
html[data-theme="minimal"] thead tr:nth-child(2) th, html[data-theme="minimal"] .view-table thead tr:nth-child(2) th { background: #3a3a35; }
html[data-theme="minimal"] .md th { background: #0c0c09; }

/* vibrant（元気） */
html[data-theme="vibrant"] {
  --primary: #7c61d4; --primary-dark: #5f45b8;
  --grad: linear-gradient(135deg, #5f45b8 0%, #7c61d4 100%);
  --bg: #f7f3ff; --surface: #ffffff; --border: #e3d9f7;
  --ink: #2f281d; --sub: #7a7264;
  --shadow-card: 0 3px 12px rgba(124, 97, 212, 0.16); --radius: 18px;
}
html[data-theme="vibrant"] .header { background: var(--grad); color: #ffffff; }
html[data-theme="vibrant"] .btn-gear { color: #ffffff; }
html[data-theme="vibrant"] #user-badge { background: rgba(255, 255, 255, 0.25) !important; }
html[data-theme="vibrant"] .btn-qty { background: #efe9fd; border-radius: 14px; }
html[data-theme="vibrant"] .card input[type="number"] { border-radius: 14px; }
html[data-theme="vibrant"] .section-label { background: #fdeee2; border-left-color: #eaae87; border-radius: 14px; }
html[data-theme="vibrant"] .btn-copy-bar { background: #ffe3c2; color: #8a5a33; border-radius: 999px; }
html[data-theme="vibrant"] .btn-save { border-radius: 16px; }
html[data-theme="vibrant"] .btn-form { background: #5f45b8; border-radius: 16px; }
html[data-theme="vibrant"] .btn-history { background: #7c61d4; border-radius: 16px; }
html[data-theme="vibrant"] .btn-gift { background: #5f45b8; border-radius: 16px; }
html[data-theme="vibrant"] .btn-card { background: #7c61d4; border-radius: 16px; }
html[data-theme="vibrant"] .btn-login { border-radius: 16px; }
html[data-theme="vibrant"] table.card-table thead th, html[data-theme="vibrant"] table.card-table thead th.term-head { background: #5f45b8; }
html[data-theme="vibrant"] thead tr:first-child th, html[data-theme="vibrant"] .view-table thead tr:first-child th, html[data-theme="vibrant"] thead th.sticky-brand, html[data-theme="vibrant"] thead th.sticky-price, html[data-theme="vibrant"] .view-table th.vs-brand, html[data-theme="vibrant"] .view-table th.vs-price { background: #5f45b8; }
html[data-theme="vibrant"] thead tr:nth-child(2) th, html[data-theme="vibrant"] .view-table thead tr:nth-child(2) th { background: #7c61d4; }
html[data-theme="vibrant"] .md th { background: #5f45b8; }

/* colorful（青→紫） */
html[data-theme="colorful"] {
  --primary: #2563eb; --primary-dark: #1d4ed8;
  --grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --bg: #f5f8ff; --surface: #ffffff; --border: #dbe7fd;
  --ink: #111827; --sub: #5b6b82;
  --shadow-card: 0 2px 10px rgba(59, 130, 246, 0.14); --radius: 16px;
}
html[data-theme="colorful"] .header { background: var(--grad); color: #ffffff; }
html[data-theme="colorful"] .btn-gear { color: #ffffff; }
html[data-theme="colorful"] #user-badge { background: rgba(255, 255, 255, 0.25) !important; }
html[data-theme="colorful"] .btn-qty { background: #e3eefe; border-radius: 12px; }
html[data-theme="colorful"] .card input[type="number"] { border-radius: 12px; }
html[data-theme="colorful"] .section-label { background: #e8f0fe; border-left-color: #3b82f6; border-radius: 12px; }
html[data-theme="colorful"] .btn-copy-bar { background: #efe7fd; color: #6d28d9; border-radius: 999px; }
html[data-theme="colorful"] .btn-save { border-radius: 14px; }
html[data-theme="colorful"] .btn-form { background: #1d4ed8; border-radius: 14px; }
html[data-theme="colorful"] .btn-history { background: #7c3aed; border-radius: 14px; }
html[data-theme="colorful"] .btn-gift { background: #1d4ed8; border-radius: 14px; }
html[data-theme="colorful"] .btn-card { background: #3b82f6; border-radius: 14px; }
html[data-theme="colorful"] .btn-login { border-radius: 14px; }
html[data-theme="colorful"] table.card-table thead th, html[data-theme="colorful"] table.card-table thead th.term-head { background: #1d4ed8; }
html[data-theme="colorful"] thead tr:first-child th, html[data-theme="colorful"] .view-table thead tr:first-child th, html[data-theme="colorful"] thead th.sticky-brand, html[data-theme="colorful"] thead th.sticky-price, html[data-theme="colorful"] .view-table th.vs-brand, html[data-theme="colorful"] .view-table th.vs-price { background: #1d4ed8; }
html[data-theme="colorful"] thead tr:nth-child(2) th, html[data-theme="colorful"] .view-table thead tr:nth-child(2) th { background: #7c3aed; }
html[data-theme="colorful"] .md th { background: #1d4ed8; }

/* flat（影なし・オレンジ） */
html[data-theme="flat"] {
  --primary: #c94f26; --primary-dark: #a63e1d;
  --grad: #c94f26;
  --bg: #fafafa; --surface: #ffffff; --border: #e5e5e5;
  --ink: #111827; --sub: #6b7280;
  --shadow-card: none; --radius: 8px;
}
html[data-theme="flat"] .header { background: var(--grad); color: #ffffff; }
html[data-theme="flat"] .btn-gear { color: #ffffff; }
html[data-theme="flat"] #user-badge { background: rgba(255, 255, 255, 0.25) !important; }
html[data-theme="flat"] .btn-qty { background: #fdeee7; border-radius: 8px; }
html[data-theme="flat"] .card input[type="number"] { border-radius: 8px; }
html[data-theme="flat"] .section-label { background: #fdeee7; border-left-color: #c94f26; border-radius: 8px; }
html[data-theme="flat"] .btn-copy-bar { background: #efe9fd; color: #5b21b6; border-radius: 8px; }
html[data-theme="flat"] .btn-save { border-radius: 8px; }
html[data-theme="flat"] .btn-form { background: #374151; border-radius: 8px; }
html[data-theme="flat"] .btn-history { background: #6b7280; border-radius: 8px; }
html[data-theme="flat"] .btn-gift { background: #374151; border-radius: 8px; }
html[data-theme="flat"] .btn-card { background: #4b5563; border-radius: 8px; }
html[data-theme="flat"] .btn-login { border-radius: 8px; }
html[data-theme="flat"] table.card-table thead th, html[data-theme="flat"] table.card-table thead th.term-head { background: #c94f26; }
html[data-theme="flat"] thead tr:first-child th, html[data-theme="flat"] .view-table thead tr:first-child th, html[data-theme="flat"] thead th.sticky-brand, html[data-theme="flat"] thead th.sticky-price, html[data-theme="flat"] .view-table th.vs-brand, html[data-theme="flat"] .view-table th.vs-price { background: #c94f26; }
html[data-theme="flat"] thead tr:nth-child(2) th, html[data-theme="flat"] .view-table thead tr:nth-child(2) th { background: #7c3aed; }
html[data-theme="flat"] .md th { background: #c94f26; }

/* paper（紙） */
html[data-theme="paper"] {
  --primary: #111111; --primary-dark: #111111;
  --grad: #111111;
  --bg: #faf6ec; --surface: #fffdf7; --border: #ddd5c0;
  --ink: #111111; --sub: #6b6250;
  --shadow-card: 0 1px 0 rgba(0, 0, 0, 0.06); --radius: 2px;
}
html[data-theme="paper"] body { font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, Georgia, serif; }
html[data-theme="paper"] .header { background: #fffdf7; color: #111111; }
html[data-theme="paper"] .btn-gear { color: #111111; }
html[data-theme="paper"] #user-badge { background: rgba(0, 0, 0, 0.08) !important; }
html[data-theme="paper"] .btn-qty { background: #f3edda; border-radius: 2px; }
html[data-theme="paper"] .card input[type="number"] { border-radius: 2px; }
html[data-theme="paper"] .section-label { background: #f3edda; border-left-color: #111111; border-radius: 2px; }
html[data-theme="paper"] .btn-copy-bar { background: #efe8d2; color: #111111; border-radius: 2px; }
html[data-theme="paper"] .btn-save { border-radius: 2px; }
html[data-theme="paper"] .btn-form { background: #111111; border-radius: 2px; }
html[data-theme="paper"] .btn-history { background: #6b6250; border-radius: 2px; }
html[data-theme="paper"] .btn-gift { background: #111111; border-radius: 2px; }
html[data-theme="paper"] .btn-card { background: #4a4436; border-radius: 2px; }
html[data-theme="paper"] .btn-login { border-radius: 2px; }
html[data-theme="paper"] table.card-table thead th, html[data-theme="paper"] table.card-table thead th.term-head { background: #111111; }
html[data-theme="paper"] thead tr:first-child th, html[data-theme="paper"] .view-table thead tr:first-child th, html[data-theme="paper"] thead th.sticky-brand, html[data-theme="paper"] thead th.sticky-price, html[data-theme="paper"] .view-table th.vs-brand, html[data-theme="paper"] .view-table th.vs-price { background: #111111; }
html[data-theme="paper"] thead tr:nth-child(2) th, html[data-theme="paper"] .view-table thead tr:nth-child(2) th { background: #6b6250; }
html[data-theme="paper"] .md th { background: #111111; }

/* sleek（青・洗練） */
html[data-theme="sleek"] {
  --primary: #2563eb; --primary-dark: #1e40af;
  --grad: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --bg: #f8fafc; --surface: #ffffff; --border: #e2e8f0;
  --ink: #0f172a; --sub: #64748b;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.05); --radius: 10px;
}
html[data-theme="sleek"] .header { background: var(--grad); color: #ffffff; }
html[data-theme="sleek"] .btn-gear { color: #ffffff; }
html[data-theme="sleek"] #user-badge { background: rgba(255, 255, 255, 0.2) !important; }
html[data-theme="sleek"] .btn-qty { background: #eff6ff; border-radius: 10px; }
html[data-theme="sleek"] .card input[type="number"] { border-radius: 10px; }
html[data-theme="sleek"] .section-label { background: #eff6ff; border-left-color: #3b82f6; border-radius: 10px; }
html[data-theme="sleek"] .btn-copy-bar { background: #e2e8f0; color: #334155; border-radius: 10px; }
html[data-theme="sleek"] .btn-save { border-radius: 10px; }
html[data-theme="sleek"] .btn-form { background: #1e40af; border-radius: 10px; }
html[data-theme="sleek"] .btn-history { background: #64748b; border-radius: 10px; }
html[data-theme="sleek"] .btn-gift { background: #1e40af; border-radius: 10px; }
html[data-theme="sleek"] .btn-card { background: #475569; border-radius: 10px; }
html[data-theme="sleek"] .btn-login { border-radius: 10px; }
html[data-theme="sleek"] table.card-table thead th, html[data-theme="sleek"] table.card-table thead th.term-head { background: #1e40af; }
html[data-theme="sleek"] thead tr:first-child th, html[data-theme="sleek"] .view-table thead tr:first-child th, html[data-theme="sleek"] thead th.sticky-brand, html[data-theme="sleek"] thead th.sticky-price, html[data-theme="sleek"] .view-table th.vs-brand, html[data-theme="sleek"] .view-table th.vs-price { background: #1e40af; }
html[data-theme="sleek"] thead tr:nth-child(2) th, html[data-theme="sleek"] .view-table thead tr:nth-child(2) th { background: #64748b; }
html[data-theme="sleek"] .md th { background: #1e40af; }

/* spacious（余白たっぷり） */
html[data-theme="spacious"] {
  --primary: #2563eb; --primary-dark: #1d4ed8;
  --grad: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --bg: #fbfdff; --surface: #ffffff; --border: #e5edf5;
  --ink: #111827; --sub: #64748b;
  --shadow-card: 0 2px 12px rgba(37, 99, 235, 0.07); --radius: 12px;
}
html[data-theme="spacious"] .header { background: var(--grad); color: #ffffff; }
html[data-theme="spacious"] .btn-gear { color: #ffffff; }
html[data-theme="spacious"] #user-badge { background: rgba(255, 255, 255, 0.2) !important; }
html[data-theme="spacious"] .btn-qty { background: #eff6ff; border-radius: 12px; }
html[data-theme="spacious"] .card input[type="number"] { border-radius: 12px; }
html[data-theme="spacious"] .section-label { background: #eff6ff; border-left-color: #3b82f6; border-radius: 12px; }
html[data-theme="spacious"] .btn-copy-bar { background: #e8f0fe; color: #1d4ed8; border-radius: 12px; }
html[data-theme="spacious"] .btn-save { border-radius: 12px; }
html[data-theme="spacious"] .btn-form { background: #1d4ed8; border-radius: 12px; }
html[data-theme="spacious"] .btn-history { background: #2563eb; border-radius: 12px; }
html[data-theme="spacious"] .btn-gift { background: #1d4ed8; border-radius: 12px; }
html[data-theme="spacious"] .btn-card { background: #2563eb; border-radius: 12px; }
html[data-theme="spacious"] .btn-login { border-radius: 12px; }
html[data-theme="spacious"] table.card-table thead th, html[data-theme="spacious"] table.card-table thead th.term-head { background: #1d4ed8; }
html[data-theme="spacious"] thead tr:first-child th, html[data-theme="spacious"] .view-table thead tr:first-child th, html[data-theme="spacious"] thead th.sticky-brand, html[data-theme="spacious"] thead th.sticky-price, html[data-theme="spacious"] .view-table th.vs-brand, html[data-theme="spacious"] .view-table th.vs-price { background: #1d4ed8; }
html[data-theme="spacious"] thead tr:nth-child(2) th, html[data-theme="spacious"] .view-table thead tr:nth-child(2) th { background: #2563eb; }
html[data-theme="spacious"] .md th { background: #1d4ed8; }
html[data-theme="spacious"] .card { padding: 16px; }
html[data-theme="spacious"] .container { gap: 12px; padding: 16px 14px; }
html[data-theme="spacious"] .card-top { margin-bottom: 10px; }

/* corporate（紺・業務） */
html[data-theme="corporate"] {
  --primary: #1e40af; --primary-dark: #172f5e;
  --grad: linear-gradient(135deg, #172f5e 0%, #1e40af 100%);
  --bg: #f4f6fa; --surface: #ffffff; --border: #d5dce8;
  --ink: #17233b; --sub: #5a6a84;
  --shadow-card: 0 1px 3px rgba(23, 47, 94, 0.10); --radius: 4px;
}
html[data-theme="corporate"] .header { background: var(--grad); color: #ffffff; }
html[data-theme="corporate"] .btn-gear { color: #ffffff; }
html[data-theme="corporate"] #user-badge { background: rgba(255, 255, 255, 0.2) !important; }
html[data-theme="corporate"] .btn-qty { background: #e8eef8; border-radius: 4px; }
html[data-theme="corporate"] .card input[type="number"] { border-radius: 4px; }
html[data-theme="corporate"] .section-label { background: #e8eef8; border-left-color: #1e40af; border-radius: 4px; }
html[data-theme="corporate"] .btn-copy-bar { background: #dde5f2; color: #172f5e; border-radius: 4px; }
html[data-theme="corporate"] .btn-save { border-radius: 4px; }
html[data-theme="corporate"] .btn-form { background: #172f5e; border-radius: 4px; }
html[data-theme="corporate"] .btn-history { background: #54677f; border-radius: 4px; }
html[data-theme="corporate"] .btn-gift { background: #172f5e; border-radius: 4px; }
html[data-theme="corporate"] .btn-card { background: #3c4f6b; border-radius: 4px; }
html[data-theme="corporate"] .btn-login { border-radius: 4px; }
html[data-theme="corporate"] table.card-table thead th, html[data-theme="corporate"] table.card-table thead th.term-head { background: #172f5e; }
html[data-theme="corporate"] thead tr:first-child th, html[data-theme="corporate"] .view-table thead tr:first-child th, html[data-theme="corporate"] thead th.sticky-brand, html[data-theme="corporate"] thead th.sticky-price, html[data-theme="corporate"] .view-table th.vs-brand, html[data-theme="corporate"] .view-table th.vs-price { background: #172f5e; }
html[data-theme="corporate"] thead tr:nth-child(2) th, html[data-theme="corporate"] .view-table thead tr:nth-child(2) th { background: #54677f; }
html[data-theme="corporate"] .md th { background: #172f5e; }

/* premium（Apple風） */
html[data-theme="premium"] {
  --primary: #0071e3; --primary-dark: #005bb5;
  --grad: linear-gradient(135deg, #005bb5 0%, #0071e3 100%);
  --bg: #f5f5f7; --surface: #ffffff; --border: #d2d2d7;
  --ink: #1d1d1f; --sub: #6e6e73;
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.07); --radius: 18px;
}
html[data-theme="premium"] .header { background: #f5f5f7; color: #1d1d1f; }
html[data-theme="premium"] .btn-gear { color: #1d1d1f; }
html[data-theme="premium"] #user-badge { background: rgba(0, 0, 0, 0.06) !important; }
html[data-theme="premium"] .btn-qty { background: #eef4fb; border-radius: 999px; }
html[data-theme="premium"] .card input[type="number"] { border-radius: 999px; }
html[data-theme="premium"] .section-label { background: #eef4fb; border-left-color: #0071e3; border-radius: 14px; }
html[data-theme="premium"] .btn-copy-bar { background: #e8e8ec; color: #1d1d1f; border-radius: 999px; }
html[data-theme="premium"] .btn-save { border-radius: 16px; }
html[data-theme="premium"] .btn-form { background: #0071e3; border-radius: 16px; }
html[data-theme="premium"] .btn-history { background: #86868b; border-radius: 16px; }
html[data-theme="premium"] .btn-gift { background: #0071e3; border-radius: 16px; }
html[data-theme="premium"] .btn-card { background: #515154; border-radius: 16px; }
html[data-theme="premium"] .btn-login { border-radius: 16px; }
html[data-theme="premium"] table.card-table thead th, html[data-theme="premium"] table.card-table thead th.term-head { background: #1d1d1f; }
html[data-theme="premium"] thead tr:first-child th, html[data-theme="premium"] .view-table thead tr:first-child th, html[data-theme="premium"] thead th.sticky-brand, html[data-theme="premium"] thead th.sticky-price, html[data-theme="premium"] .view-table th.vs-brand, html[data-theme="premium"] .view-table th.vs-price { background: #1d1d1f; }
html[data-theme="premium"] thead tr:nth-child(2) th, html[data-theme="premium"] .view-table thead tr:nth-child(2) th { background: #6e6e73; }
html[data-theme="premium"] .md th { background: #1d1d1f; }

/* editorial（雑誌） */
html[data-theme="editorial"] {
  --primary: #111111; --primary-dark: #111111;
  --grad: #111111;
  --bg: #fcfcfa; --surface: #ffffff; --border: #d9d9d4;
  --ink: #111827; --sub: #5a5a52;
  --shadow-card: none; --radius: 0px;
}
html[data-theme="editorial"] body { font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, Georgia, serif; }
html[data-theme="editorial"] .header { background: var(--grad); color: #ffffff; }
html[data-theme="editorial"] .btn-gear { color: #ffffff; }
html[data-theme="editorial"] #user-badge { background: rgba(255, 255, 255, 0.2) !important; }
html[data-theme="editorial"] .btn-qty { background: #f1f1ec; border-radius: 0px; }
html[data-theme="editorial"] .card input[type="number"] { border-radius: 0px; }
html[data-theme="editorial"] .section-label { background: #f1f1ec; border-left-color: #111111; border-radius: 0px; }
html[data-theme="editorial"] .btn-copy-bar { background: #e9e9e2; color: #111111; border-radius: 0px; }
html[data-theme="editorial"] .btn-save { border-radius: 0px; }
html[data-theme="editorial"] .btn-form { background: #111111; border-radius: 0px; }
html[data-theme="editorial"] .btn-history { background: #5a5a52; border-radius: 0px; }
html[data-theme="editorial"] .btn-gift { background: #111111; border-radius: 0px; }
html[data-theme="editorial"] .btn-card { background: #3d3d38; border-radius: 0px; }
html[data-theme="editorial"] .btn-login { border-radius: 0px; }
html[data-theme="editorial"] table.card-table thead th, html[data-theme="editorial"] table.card-table thead th.term-head { background: #111111; }
html[data-theme="editorial"] thead tr:first-child th, html[data-theme="editorial"] .view-table thead tr:first-child th, html[data-theme="editorial"] thead th.sticky-brand, html[data-theme="editorial"] thead th.sticky-price, html[data-theme="editorial"] .view-table th.vs-brand, html[data-theme="editorial"] .view-table th.vs-price { background: #111111; }
html[data-theme="editorial"] thead tr:nth-child(2) th, html[data-theme="editorial"] .view-table thead tr:nth-child(2) th { background: #5a5a52; }
html[data-theme="editorial"] .md th { background: #111111; }

/* 差額の状態表示は全テーマ共通（テーマの .header 指定より優先させる） */
html[data-theme] .header.has-diff { background: var(--warning-bg); color: #000000; }
html[data-theme] .header.diff-ok { background: linear-gradient(135deg, #2e7d32 0%, #66bb6a 100%); color: #ffffff; }
