/* 配色テーマ。標準（ダーク）は app.css / Tailwind のまま。ここでは ライト と ハイコントラスト だけ上書きします。
   <html data-theme="light|contrast"> は assets/js/00-theme-boot.js が付けます。 */

/* ================= ライト ================= */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"] body { color:#1e293b; }
html[data-theme="light"] body[data-mode="work"] { background-color:#fff3f1 !important; }
html[data-theme="light"] body[data-mode="shortBreak"] { background-color:#ecf8f4 !important; }
html[data-theme="light"] body[data-mode="longBreak"] { background-color:#edf2fd !important; }
html[data-theme="light"] body:not([data-mode]) { background-color:#fff3f1 !important; }

/* 文字色（色つきの面の上の白文字は変えない） */
html[data-theme="light"] .text-white:not([class*="bg-gradient"]):not([class*="bg-emerald-"]):not([class*="bg-rose-"]):not([class*="bg-red-"]):not([class*="bg-teal-"]):not([class*="bg-blue-"]):not([class*="bg-amber-"]) { color:#0f172a; }
html[data-theme="light"] .text-slate-100 { color:#0f172a; }
html[data-theme="light"] .text-slate-200, html[data-theme="light"] .hover\:text-slate-200:hover { color:#1e293b; }
html[data-theme="light"] .text-slate-300 { color:#334155; }
html[data-theme="light"] .text-slate-400 { color:#475569; }
html[data-theme="light"] .text-slate-500 { color:#64748b; }
html[data-theme="light"] .hover\:text-white:hover { color:#0f172a; }
html[data-theme="light"] .text-teal-100, html[data-theme="light"] .text-teal-200, html[data-theme="light"] .text-teal-300, html[data-theme="light"] .text-teal-400, html[data-theme="light"] .text-teal-200\/80, html[data-theme="light"] .text-teal-100\/80 { color:#0f766e; }
html[data-theme="light"] .text-emerald-200, html[data-theme="light"] .text-emerald-300 { color:#047857; }
html[data-theme="light"] .text-amber-300 { color:#b45309; }
html[data-theme="light"] .text-red-300, html[data-theme="light"] .text-red-400 { color:#b91c1c; }
html[data-theme="light"] .text-rose-200, html[data-theme="light"] .text-rose-300 { color:#be123c; }
html[data-theme="light"] .text-blue-400 { color:#1d4ed8; }
html[data-theme="light"] h1 { background-image:none !important; -webkit-text-fill-color:#0f172a; color:#0f172a !important; }
html[data-theme="light"] .text-white\/5 { color:rgba(15,23,42,.09); }
html[data-theme="light"] ::placeholder { color:#94a3b8; }

/* 面と枠 */
html[data-theme="light"] .glass-panel { background:rgba(255,255,255,.72); border-color:rgba(15,23,42,.1); box-shadow:0 1px 3px rgba(15,23,42,.06); }
html[data-theme="light"] .glass-modal { background:rgba(255,255,255,.97); border-color:rgba(15,23,42,.12); }
html[data-theme="light"] .bg-white\/5 { background-color:rgba(15,23,42,.05); }
html[data-theme="light"] .bg-white\/10 { background-color:rgba(15,23,42,.1); }
html[data-theme="light"] .hover\:bg-white\/10:hover { background-color:rgba(15,23,42,.1); }
html[data-theme="light"] .hover\:bg-white\/15:hover { background-color:rgba(15,23,42,.14); }
html[data-theme="light"] .hover\:bg-white\/20:hover { background-color:rgba(15,23,42,.18); }
html[data-theme="light"] .border-white\/10 { border-color:rgba(15,23,42,.12); }
html[data-theme="light"] .border-white\/20, html[data-theme="light"] .border-white\/30 { border-color:rgba(15,23,42,.22); }
html[data-theme="light"] .bg-black\/60 { background-color:rgba(15,23,42,.35); }
html[data-theme="light"] .bg-slate-900\/95, html[data-theme="light"] .bg-slate-900\/90, html[data-theme="light"] .bg-slate-950\/90, html[data-theme="light"] .bg-slate-950\/80 { background-color:rgba(255,255,255,.95); }
html[data-theme="light"] .bg-slate-900\/70, html[data-theme="light"] .bg-slate-900\/50 { background-color:rgba(15,23,42,.05); }
html[data-theme="light"] .bg-slate-800, html[data-theme="light"] .bg-slate-700 { background-color:#e2e8f0; color:#1e293b; }
html[data-theme="light"] .hover\:bg-slate-800:hover, html[data-theme="light"] .hover\:bg-slate-600:hover { background-color:#cbd5e1; }
html[data-theme="light"] .bg-slate-500 { background-color:#94a3b8; }
html[data-theme="light"] .bg-teal-900\/70, html[data-theme="light"] .bg-teal-900\/35 { background-color:rgba(20,184,166,.12); }
html[data-theme="light"] .peer-checked\:bg-red-500:is(:checked ~ *) { background-color:#ef4444; }
html[data-theme="light"] select option { background:#fff; color:#0f172a; }
html[data-theme="light"] input[type=range] { background:rgba(15,23,42,.18); }
html[data-theme="light"] input, html[data-theme="light"] textarea, html[data-theme="light"] select { color:#0f172a; }

/* 自作スタイル（app.css）のライト版 */
html[data-theme="light"] .task-memo input { color:#0f172a; }
html[data-theme="light"] .task-memo i { color:#64748b; }
html[data-theme="light"] .ring-task { color:#334155; }
html[data-theme="light"] .task-fav { color:#94a3b8; }
html[data-theme="light"] .task-fav[aria-pressed="true"] { color:#d97706; }
html[data-theme="light"] .task-chip, html[data-theme="light"] .preset-chip, html[data-theme="light"] .break-tip-chips button { color:#334155; background:rgba(15,23,42,.05); border-color:rgba(15,23,42,.14); }
html[data-theme="light"] .task-chip:hover, html[data-theme="light"] .task-chip.is-active, html[data-theme="light"] .break-tip-chips button:hover, html[data-theme="light"] .break-tip-chips button.is-active { color:#0f766e; background:rgba(20,184,166,.14); border-color:rgba(13,148,136,.55); }
html[data-theme="light"] .task-chip i { color:#d97706; }
html[data-theme="light"] .stats-cta { color:#0f766e; background:rgba(20,184,166,.12); border-color:rgba(13,148,136,.45); }
html[data-theme="light"] .stats-open-btn { color:#334155; background:rgba(15,23,42,.05); border-color:rgba(15,23,42,.14); }
html[data-theme="light"] .ff-modal { background:rgba(15,23,42,.35); }
html[data-theme="light"] .ff-modal-foot { border-color:rgba(15,23,42,.12); }
html[data-theme="light"] .ff-icon-btn { color:#475569; }
html[data-theme="light"] .ff-icon-btn:hover, html[data-theme="light"] .ff-icon-btn:focus-visible { color:#0f172a; }
html[data-theme="light"] .ff-btn { color:#1e293b; background:rgba(15,23,42,.05); border-color:rgba(15,23,42,.16); }
html[data-theme="light"] .ff-btn:hover, html[data-theme="light"] .ff-btn:focus-visible { background:rgba(15,23,42,.1); }
html[data-theme="light"] .ff-btn.primary { color:#fff; background:#0d9488; border-color:#0d9488; }
html[data-theme="light"] .ff-btn.primary:hover { background:#0f766e; }
html[data-theme="light"] .ff-btn.danger { color:#be123c; background:rgba(244,63,94,.08); border-color:rgba(225,29,72,.35); }
html[data-theme="light"] .stats-h, html[data-theme="light"] .stats-tile .label, html[data-theme="light"] .stats-bar .day, html[data-theme="light"] .stats-cal .wd, html[data-theme="light"] .stats-cal .dn, html[data-theme="light"] .stats-hours .h { color:#64748b; }
html[data-theme="light"] .stats-note, html[data-theme="light"] .stats-empty, html[data-theme="light"] .break-tip-note { color:#64748b; }
html[data-theme="light"] .stats-tile { background:rgba(255,255,255,.7); border-color:rgba(15,23,42,.1); }
html[data-theme="light"] .stats-tile .value, html[data-theme="light"] .stats-bar .num, html[data-theme="light"] .stats-month-label, html[data-theme="light"] .stats-cal .cn { color:#0f172a; }
html[data-theme="light"] .stats-tile .value small { color:#64748b; }
html[data-theme="light"] .stats-tile .sub { color:#0f766e; }
html[data-theme="light"] .stats-bar .col, html[data-theme="light"] .stats-hours .col { background:rgba(13,148,136,.4); }
html[data-theme="light"] .stats-bar.is-today .col, html[data-theme="light"] .stats-hours .col.is-peak { background:#0d9488; }
html[data-theme="light"] .stats-bar.is-today .day { color:#0f766e; }
html[data-theme="light"] .stats-task, html[data-theme="light"] .stats-rec { background:rgba(255,255,255,.7); border-color:rgba(15,23,42,.08); }
html[data-theme="light"] .stats-task .fill { background:rgba(13,148,136,.16); }
html[data-theme="light"] .stats-task .meta, html[data-theme="light"] .stats-rec .time, html[data-theme="light"] .stats-rec .dur { color:#64748b; }
html[data-theme="light"] .stats-rec .del { color:#94a3b8; }
html[data-theme="light"] .stats-tabs { background:rgba(15,23,42,.05); border-color:rgba(15,23,42,.12); }
html[data-theme="light"] .stats-tabs button { color:#475569; }
html[data-theme="light"] .stats-tabs button[aria-selected="true"] { color:#fff; background:#0d9488; }
html[data-theme="light"] .stats-cal .cell { background:rgba(15,23,42,.05); }
html[data-theme="light"] .stats-cal .lv1 { background:rgba(13,148,136,.18); }
html[data-theme="light"] .stats-cal .lv2 { background:rgba(13,148,136,.34); }
html[data-theme="light"] .stats-cal .lv3 { background:rgba(13,148,136,.58); }
html[data-theme="light"] .stats-cal .lv4 { background:rgba(13,148,136,.85); }
html[data-theme="light"] .stats-cal .lv3 .dn, html[data-theme="light"] .stats-cal .lv4 .dn, html[data-theme="light"] .stats-cal .lv4 .cn, html[data-theme="light"] .stats-cal .lv3 .cn { color:#fff; }
html[data-theme="light"] .stats-cal .is-today { border-color:#0f172a; }
html[data-theme="light"] .break-tip { border-color:rgba(13,148,136,.35); }
html[data-theme="light"] .break-tip-head { color:#0f766e; }
html[data-theme="light"] .break-tip-text, html[data-theme="light"] .break-tip-answer { color:#1e293b; }
html[data-theme="light"] .break-tip-link { color:#475569; }
html[data-theme="light"] .break-tip-ask input { color:#0f172a; background:rgba(15,23,42,.05); border-color:rgba(15,23,42,.16); }
html[data-theme="light"] .break-tip-ask button { color:#fff; background:#0d9488; }
html[data-theme="light"] .break-tip-answer { background:rgba(20,184,166,.1); border-color:rgba(13,148,136,.3); }
html[data-theme="light"] .undo-bar { color:#e2e8f0; }
html[data-theme="light"] .settings-quick-nav { background:rgba(255,255,255,.9); }
html[data-theme="light"] .mini-view, html[data-theme="light"] body.mini-mode #miniView { background:rgba(255,255,255,.98); }
html[data-theme="light"] .mini-time { color:#0f172a; }
html[data-theme="light"] .mini-label { color:#475569; }
html[data-theme="light"] .mini-btn-quiet { color:#334155; background:rgba(15,23,42,.08); }
html[data-theme="light"] .mini-bar { background:rgba(15,23,42,.1); }
html[data-theme="light"] .mini-btn, html[data-theme="light"] .mini-bar #miniFill { color:#fff; }
html[data-theme="light"] .mini-btn:not(.mini-btn-quiet) { background:#0d9488; }

/* ================= ハイコントラスト（黒地・白文字・太い枠） ================= */
html[data-theme="contrast"] { color-scheme: dark; }
html[data-theme="contrast"] body, html[data-theme="contrast"] body[data-mode] { background-color:#000 !important; color:#fff; }
html[data-theme="contrast"] .text-slate-200, html[data-theme="contrast"] .text-slate-300, html[data-theme="contrast"] .text-slate-400, html[data-theme="contrast"] .text-slate-500, html[data-theme="contrast"] .text-slate-100 { color:#fff; }
html[data-theme="contrast"] .text-teal-100, html[data-theme="contrast"] .text-teal-200, html[data-theme="contrast"] .text-teal-300, html[data-theme="contrast"] .text-teal-400 { color:#5eead4; }
html[data-theme="contrast"] .text-amber-300 { color:#fde047; }
html[data-theme="contrast"] .text-emerald-300, html[data-theme="contrast"] .text-emerald-200 { color:#86efac; }
html[data-theme="contrast"] ::placeholder { color:#d1d5db; }
html[data-theme="contrast"] .glass-panel, html[data-theme="contrast"] .glass-modal { background:#000; border:2px solid #fff; backdrop-filter:none; -webkit-backdrop-filter:none; }
html[data-theme="contrast"] .glass-modal { background:#050505; }
html[data-theme="contrast"] .bg-white\/5, html[data-theme="contrast"] .bg-white\/10, html[data-theme="contrast"] .bg-slate-900\/70, html[data-theme="contrast"] .bg-slate-900\/50 { background-color:#111; }
html[data-theme="contrast"] .border-white\/10, html[data-theme="contrast"] .border-white\/20, html[data-theme="contrast"] .border-white\/30 { border-color:rgba(255,255,255,.7); }
html[data-theme="contrast"] .bg-slate-900\/95, html[data-theme="contrast"] .bg-slate-900\/90, html[data-theme="contrast"] .bg-slate-950\/90, html[data-theme="contrast"] .bg-slate-950\/80 { background-color:#000; }
html[data-theme="contrast"] .bg-black\/60 { background-color:rgba(0,0,0,.85); }
html[data-theme="contrast"] .text-white\/5 { color:rgba(255,255,255,.25); }
html[data-theme="contrast"] *:focus-visible { outline:3px solid #fde047 !important; outline-offset:2px; }
html[data-theme="contrast"] .stats-tile, html[data-theme="contrast"] .stats-task, html[data-theme="contrast"] .stats-rec, html[data-theme="contrast"] .stats-tabs, html[data-theme="contrast"] .break-tip-answer { background:#000; border:1px solid #fff; }
html[data-theme="contrast"] .stats-h, html[data-theme="contrast"] .stats-tile .label, html[data-theme="contrast"] .stats-bar .day, html[data-theme="contrast"] .stats-cal .wd, html[data-theme="contrast"] .stats-cal .dn, html[data-theme="contrast"] .stats-hours .h, html[data-theme="contrast"] .stats-note, html[data-theme="contrast"] .stats-empty, html[data-theme="contrast"] .break-tip-note, html[data-theme="contrast"] .stats-task .meta, html[data-theme="contrast"] .stats-rec .time, html[data-theme="contrast"] .stats-rec .dur, html[data-theme="contrast"] .stats-tile .value small, html[data-theme="contrast"] .ring-task, html[data-theme="contrast"] .mini-label { color:#e5e7eb; }
html[data-theme="contrast"] .stats-tile .sub { color:#5eead4; }
html[data-theme="contrast"] .stats-bar .col, html[data-theme="contrast"] .stats-hours .col { background:#5eead4; }
html[data-theme="contrast"] .stats-cal .cell { background:#111; border:1px solid #555; }
html[data-theme="contrast"] .stats-cal .lv1 { background:#0f4f48; }
html[data-theme="contrast"] .stats-cal .lv2 { background:#14746a; }
html[data-theme="contrast"] .stats-cal .lv3 { background:#1fa597; }
html[data-theme="contrast"] .stats-cal .lv4 { background:#5eead4; }
html[data-theme="contrast"] .stats-cal .is-today { border:2px solid #fde047; }
html[data-theme="contrast"] .task-chip, html[data-theme="contrast"] .preset-chip, html[data-theme="contrast"] .break-tip-chips button, html[data-theme="contrast"] .ff-btn, html[data-theme="contrast"] .stats-open-btn { color:#fff; background:#000; border:2px solid #fff; }
html[data-theme="contrast"] .task-chip.is-active, html[data-theme="contrast"] .task-chip:hover, html[data-theme="contrast"] .break-tip-chips button:hover, html[data-theme="contrast"] .ff-btn:hover { background:#1f2937; border-color:#fde047; }
html[data-theme="contrast"] .ff-btn.primary, html[data-theme="contrast"] .break-tip-ask button, html[data-theme="contrast"] .stats-tabs button[aria-selected="true"] { color:#000; background:#5eead4; border-color:#5eead4; }
html[data-theme="contrast"] .task-memo input, html[data-theme="contrast"] .break-tip-ask input { color:#fff; background:#000; }
html[data-theme="contrast"] .break-tip-ask input { border:2px solid #fff; }
html[data-theme="contrast"] .mini-view, html[data-theme="contrast"] body.mini-mode #miniView { background:#000; }
html[data-theme="contrast"] .mini-btn-quiet { color:#fff; background:#000; border:2px solid #fff; }

/* ---- 追加：設定画面・積み上げカード ---- */
html[data-theme="light"] #sessionProgressCard { background-image:none; background-color:rgba(255,255,255,.78); border-color:rgba(13,148,136,.3); box-shadow:0 1px 3px rgba(15,23,42,.08); }
html[data-theme="light"] .settings-group { background:rgba(255,255,255,.7); border-color:rgba(15,23,42,.12); }
html[data-theme="light"] .settings-group > summary { color:#0f172a; }
html[data-theme="light"] .settings-group > summary::after { color:#0d9488; }
html[data-theme="light"] .settings-group-note { color:#475569; }
html[data-theme="light"] .settings-quick-nav { border-color:rgba(15,23,42,.12); }
html[data-theme="light"] .settings-quick-nav button { color:#334155; background:rgba(15,23,42,.05); border-color:rgba(15,23,42,.16); }
html[data-theme="light"] .settings-quick-nav button:hover, html[data-theme="light"] .settings-quick-nav button:focus-visible { background:rgba(13,148,136,.14); border-color:rgba(13,148,136,.5); }
html[data-theme="light"] .settings-quick-nav button.is-active { color:#fff; background:#0d9488; border-color:#0d9488; }
html[data-theme="light"] .settings-quick-nav button.is-active i { color:#fff; }
html[data-theme="contrast"] #sessionProgressCard { background-image:none; background-color:#000; border:2px solid #fff; box-shadow:none; }
html[data-theme="contrast"] .settings-group { background:#000; border:2px solid #fff; }
html[data-theme="contrast"] .settings-group > summary { color:#fff; }
html[data-theme="contrast"] .settings-group-note { color:#e5e7eb; }
html[data-theme="contrast"] .settings-quick-nav { background:#000; border:2px solid #fff; }
html[data-theme="contrast"] .settings-quick-nav button { color:#fff; background:#000; border:2px solid #fff; }
html[data-theme="contrast"] .settings-quick-nav button.is-active { color:#000; background:#5eead4; border-color:#5eead4; }

/* ---- 追加：設定内の見出し・通知カード・目標バー ---- */
html[data-theme="light"] #settingsScrollArea label, html[data-theme="light"] .notice-image-input { color:#1e293b; }
html[data-theme="light"] .notice-switch { color:#334155; background:rgba(15,23,42,.05); border-color:rgba(15,23,42,.16); }
html[data-theme="light"] .notice-switch.active { color:#0f766e; background:rgba(20,184,166,.16); border-color:rgba(13,148,136,.6); box-shadow:none; }
html[data-theme="light"] .notice-card { background:rgba(255,255,255,.7); border-color:rgba(15,23,42,.12); }
html[data-theme="light"] .notice-card summary::after { color:#475569; }
html[data-theme="light"] .notice-card summary .notice-summary-icon { color:#334155; background:rgba(15,23,42,.07); }
html[data-theme="light"] .notification-intro { background:rgba(20,184,166,.1); border-color:rgba(13,148,136,.3); }
html[data-theme="light"] .preset-chip small { color:#64748b; }
html[data-theme="light"] .goal-head { color:#475569; }
html[data-theme="light"] .goal-head span:last-child { color:#0f172a; }
html[data-theme="light"] .goal-row.is-done .goal-head span:last-child { color:#0f766e; }
html[data-theme="light"] .goal-track { background:rgba(15,23,42,.1); }
html[data-theme="contrast"] #settingsScrollArea label, html[data-theme="contrast"] .notice-image-input { color:#fff; }
html[data-theme="contrast"] .notice-switch, html[data-theme="contrast"] .notice-card { color:#fff; background:#000; border:2px solid #fff; }
html[data-theme="contrast"] .notice-switch.active { color:#000; background:#5eead4; border-color:#5eead4; box-shadow:none; }
html[data-theme="contrast"] .notification-intro { background:#000; border:2px solid #5eead4; }
html[data-theme="contrast"] .preset-chip small, html[data-theme="contrast"] .goal-head, html[data-theme="contrast"] .goal-head span:last-child { color:#fff; }
html[data-theme="contrast"] .goal-track { background:#333; }
