:root {
  --pilot-page: #f6f7f4;
  --pilot-card: #ffffff;
  --pilot-ink: #263238;
  --pilot-muted: #65736f;
  --pilot-line: #e5e9e3;
  --pilot-accent: #315a64;
  --pilot-accent-ink: #ffffff;
  --pilot-soft: #edf2ef;
}

body[data-theme="ocean"] { --pilot-page:#eef5f7; --pilot-card:#ffffff; --pilot-ink:#183b4a; --pilot-muted:#54717c; --pilot-line:#d8e6eb; --pilot-accent:#176b87; --pilot-soft:#e2f0f4; }
body[data-theme="lavender"] { --pilot-page:#f5f2fa; --pilot-card:#ffffff; --pilot-ink:#382e49; --pilot-muted:#726883; --pilot-line:#e6dff0; --pilot-accent:#7153a0; --pilot-soft:#eee8f7; }
body[data-theme="sunrise"] { --pilot-page:#fbf3ed; --pilot-card:#ffffff; --pilot-ink:#49352c; --pilot-muted:#806d61; --pilot-line:#efdfd3; --pilot-accent:#b5613f; --pilot-soft:#f8e9de; }
body[data-theme="midnight"] { --pilot-page:#151b20; --pilot-card:#202930; --pilot-ink:#edf2f3; --pilot-muted:#a7b6bb; --pilot-line:#35434b; --pilot-accent:#7ac6b1; --pilot-accent-ink:#10221f; --pilot-soft:#293b3d; color-scheme:dark; }

body[data-theme] { background:var(--pilot-page) !important; color:var(--pilot-ink) !important; }
body[data-theme] header { background:var(--pilot-card) !important; border-color:var(--pilot-line) !important; color:var(--pilot-ink) !important; }
body[data-theme] .card-surface,
body[data-theme] main > .grid:first-child > div { background:var(--pilot-card) !important; border-color:var(--pilot-line) !important; color:var(--pilot-ink) !important; }
body[data-theme] .desktop-page-tabs { background:transparent !important; border-color:var(--pilot-line) !important; }
body[data-theme] .desktop-page-tabs .tab-button[aria-current="page"] { background:var(--pilot-accent) !important; color:var(--pilot-accent-ink) !important; border-color:var(--pilot-accent) !important; }
body[data-theme] .accent-button { background:var(--pilot-accent) !important; border-color:var(--pilot-accent) !important; color:var(--pilot-accent-ink) !important; }
body[data-theme] .soft-button,
body[data-theme] .field-control { background:var(--pilot-card) !important; border-color:var(--pilot-line) !important; color:var(--pilot-ink) !important; }
body[data-theme="midnight"] [class*="text-slate-900"],
body[data-theme="midnight"] [class*="text-slate-800"],
body[data-theme="midnight"] [class*="text-slate-700"],
body[data-theme="midnight"] [class*="text-slate-600"],
body[data-theme="midnight"] [class*="text-slate-500"],
body[data-theme="midnight"] [class*="text-slate-400"] { color:var(--pilot-ink) !important; }
body[data-theme="midnight"] [class*="bg-white"],
body[data-theme="midnight"] [class*="bg-slate-950"],
body[data-theme="midnight"] [class*="bg-slate-900"] { background-color:var(--pilot-card) !important; }
body[data-theme="midnight"] [class*="border-slate"],
body[data-theme="midnight"] [class*="border-gray"] { border-color:var(--pilot-line) !important; }
body[data-theme="midnight"] .homework-task,
body[data-theme="midnight"] #homeworkList > .homework-task { background:var(--pilot-card) !important; border-color:var(--pilot-line) !important; }
body[data-theme="midnight"] input,
body[data-theme="midnight"] select,
body[data-theme="midnight"] textarea { background-color:#182127 !important; color:var(--pilot-ink) !important; border-color:var(--pilot-line) !important; }

.pilot-personalise { border:1px solid var(--pilot-line); border-radius:20px; padding:22px; background:var(--pilot-card); box-shadow:0 3px 12px rgba(38,53,47,.035); color:var(--pilot-ink); }
.pilot-personalise h2 { margin:0; font-size:1.45rem; }
.pilot-personalise p { color:var(--pilot-muted); }
.pilot-theme-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px; margin:16px 0 24px; }
.pilot-theme-choice { min-height:92px; border:1px solid var(--pilot-line); border-radius:15px; padding:12px; text-align:left; background:var(--pilot-card); color:var(--pilot-ink); }
.pilot-theme-choice[aria-pressed="true"] { outline:2px solid var(--pilot-accent); outline-offset:2px; }
.pilot-theme-swatch { display:flex; gap:5px; margin-bottom:11px; }
.pilot-theme-swatch i { height:14px; width:27px; border-radius:99px; background:var(--swatch); }
.pilot-layout-list { list-style:none; padding:0; margin:12px 0; }
.pilot-layout-row { display:grid; grid-template-columns:1fr auto auto; gap:9px; align-items:center; border-bottom:1px solid var(--pilot-line); padding:10px 0; }
.pilot-layout-row button { border:1px solid var(--pilot-line); background:var(--pilot-card); color:var(--pilot-ink); border-radius:9px; padding:7px 10px; min-width:42px; }
.pilot-layout-row button:disabled { opacity:.4; }
.pilot-layout-row [data-layout-toggle][aria-pressed="false"] { opacity:.6; text-decoration:line-through; }
.pilot-layout-hidden { display:none !important; }
.pilot-save-note { font-size:.82rem; margin:12px 0 0; }
#tab-settings > .pilot-legacy-settings { display:none !important; }
@media (max-width:640px) { .pilot-personalise { padding:17px; } }
