html.cloak { visibility: hidden; }
:root {
  color-scheme: only light;
  --white: #FFFFFF;
  --royal-blue: #002366;
  --royal-blue-dark: #001a4d;
  --sky-blue: #87CEEB;
  --sky-blue-dark: #6FBCDD;
  --sky-blue-light: #D6EFFA;
  --royal-blue-hover: #003399;
  --text-dark: #1A1A2E;
  --text-muted: #5A6A7A;
  --border: #D0DCE8;
  --danger: #B42318;
  --success: #176B35;
  --warning: #D4830A;
  --info: #0B667D;
  --status-danger-text: var(--danger);
  --status-success-text: var(--success);
  --status-warning-text: #925400;
  --status-info-text: var(--info);
  --badge-danger-bg: #FBE4E1;
  --badge-danger-text: #A5271A;
  --badge-success-bg: #DDF3E7;
  --badge-success-text: #176B35;
  --adventist-green: #3F7D3B;
  --sna-gold: #E7AF18;
  --focus-ring: #E7AF18;
  --surface: #FFFFFF;
  --surface-2: #F2F7FB;
  --page-bg: #D6EFFA;
  --accent: var(--royal-blue);
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0, 35, 102, 0.08);
  --shadow-md: 0 4px 24px rgba(0, 35, 102, 0.14);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--page-bg);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: clip;
  max-width: 100%;
}
img, table { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--accent); line-height: 1.25; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--royal-blue-hover); }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo .monogram {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--white);
  object-fit: cover;
  flex-shrink: 0;
}
.logo .name { font-family: var(--font-heading); font-weight: 600; font-size: 1rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  min-height: 42px; padding: 10px 18px; border: none; border-radius: var(--radius);
  cursor: pointer; transition: background 0.15s, opacity 0.15s, transform 0.15s; text-align: center;
}
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn-primary { background: var(--royal-blue); color: var(--white); }
.btn-primary:hover { background: var(--royal-blue-hover); color: var(--white); }
.btn-secondary { background: var(--sky-blue); color: #0d2647; }
.btn-secondary:hover { background: var(--sky-blue-dark); }
.btn-outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--royal-blue); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--text-dark); }
input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 0.95rem;
  min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text-dark);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 35, 102, 0.12);
}
input[type="checkbox"], input[type="radio"] {
  width: auto; min-height: 0; margin: 0; padding: 0; flex: 0 0 auto; vertical-align: middle;
}
input:disabled, select:disabled, textarea:disabled {
  cursor: not-allowed; opacity: 0.7; background: var(--surface-2);
}
.form-hint { color: var(--text-muted); font-size: 0.8rem; margin-top: 6px; line-height: 1.45; }
.btn:focus-visible,
.sidebar a:focus-visible,
a.stat-card:focus-visible,
a.assignment-pill:focus-visible,
.password-toggle:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--focus-ring);
  outline-offset: 1px;
}
.navbar a:focus-visible,
.navbar .btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 9998;
  transform: translateY(-200%); transition: transform 0.15s ease;
  background: var(--royal-blue); color: var(--white);
  padding: 10px 16px; border-radius: var(--radius); font-weight: 600;
  box-shadow: var(--shadow-md); text-decoration: none;
}
.skip-link:focus { transform: none; outline: 2px solid var(--white); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 9998;
  transform: translateY(-200%); transition: transform 0.15s ease;
  background: var(--royal-blue); color: var(--white);
  padding: 10px 16px; border-radius: var(--radius); font-weight: 600;
  box-shadow: var(--shadow-md); text-decoration: none;
}
.skip-link:focus { transform: none; outline: 2px solid var(--white); outline-offset: 2px; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }
.auth-alert {
  display: none; margin-bottom: 16px; padding: 11px 14px; border-radius: var(--radius);
  font-size: 0.88rem; line-height: 1.4;
  background: color-mix(in srgb, var(--status-danger-text) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-danger-text) 42%, transparent);
  color: var(--status-danger-text);
}
.auth-alert.show { display: block; }
.auth-alert.is-info {
  background: color-mix(in srgb, var(--status-info-text) 10%, transparent);
  border-color: color-mix(in srgb, var(--status-info-text) 42%, transparent);
  color: var(--status-info-text);
}
.password-wrap { position: relative; }
.password-wrap input { padding-right: 70px; }
.password-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; border-radius: 6px;
  color: var(--accent); font-family: var(--font-body); font-weight: 600;
  font-size: 0.82rem; padding: 4px 8px;
}
.password-toggle:hover { background: var(--sky-blue-light); }
.input-icon { position: relative; }
.input-icon > input { padding-left: 40px; }
.input-icon-lead {
  position: absolute; top: 50%; left: 12px; transform: translateY(-50%);
  display: inline-flex; width: 18px; height: 18px; pointer-events: none;
  color: var(--text-muted); transition: color 0.15s ease;
}
.input-icon-lead svg { width: 18px; height: 18px; }
.input-icon:focus-within .input-icon-lead { color: var(--accent); }
.form-group.has-error .input-icon-lead { color: var(--status-danger-text); }
.btn-ic-print::before,
.btn-ic-download::before,
.btn-ic-upload::before {
  content: ""; width: 1.05em; height: 1.05em; flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat var(--btn-ic);
          mask: center / contain no-repeat var(--btn-ic);
}
.btn-ic-print { --btn-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 6 2 18 2 18 9'/%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='8'/%3E%3C/svg%3E"); }
.btn-ic-download { --btn-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E"); }
.btn-ic-upload { --btn-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E"); }
.field-error { color: var(--status-danger-text); font-size: 0.82rem; margin-top: 6px; display: none; }
.form-group.has-error input { border-color: var(--status-danger-text); }
.form-group.has-error input:focus { box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12); }
.form-group.has-error .field-error { display: block; }
.ic-inline { vertical-align: -0.15em; flex-shrink: 0; }
.ic-arrow { vertical-align: middle; flex-shrink: 0; }
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px;
}
.card h2, .card h3 { margin-bottom: 14px; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 0.92rem; }
thead th {
  background: var(--surface-2); color: var(--accent);
  font-family: var(--font-heading); font-weight: 600; text-align: left;
  padding: 11px 14px; white-space: nowrap;
}
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--sky-blue-light); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge-success { background: var(--badge-success-bg); color: var(--badge-success-text); }
.badge-danger { background: var(--badge-danger-bg); color: var(--badge-danger-text); }
.badge-muted { background: var(--surface-2); color: var(--text-muted); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.gap { gap: 12px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.hidden { display: none !important; }
.spinner {
  width: 22px; height: 22px; border: 3px solid var(--sky-blue-light);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
#toast-container {
  position: fixed; top: calc(var(--nav-h, 64px) + 12px); right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  min-width: 240px; max-width: min(360px, calc(100vw - 40px)); padding: 13px 16px;
  border-radius: var(--radius); color: var(--white); box-shadow: var(--shadow-md);
  font-weight: 500; font-size: 0.9rem; animation: slideIn 0.2s ease;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast-progress { display: inline-flex; align-items: baseline; }
.toast-dots { display: inline-block; width: 1.5ch; text-align: left; }
.empty-state { text-align: center; color: var(--text-muted); padding: 32px 16px; }
.server-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: none; visibility: visible;
  align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box;
  background: rgba(0, 35, 102, 0.55);
}
.server-overlay.show { display: flex; }
.server-overlay-box {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 30px 26px;
  max-width: 340px; text-align: center;
}
.server-overlay-box .spinner { width: 30px; height: 30px; border-width: 4px; margin-bottom: 14px; }
.server-overlay-title { font-weight: 600; color: var(--accent); margin-bottom: 6px; font-size: 1.02rem; }
.server-overlay-sub { color: var(--text-muted); font-size: 0.86rem; line-height: 1.45; margin: 0; }
.reauth-overlay {
  position: fixed; inset: 0; z-index: 10001; visibility: visible;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box;
  background: rgba(0, 35, 102, 0.72);
  overflow-y: auto;
}
.reauth-box {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 26px 24px;
  width: 100%; max-width: 380px; text-align: left;
  max-height: calc(100vh - 48px); overflow-y: auto;
}
.reauth-title { font-weight: 700; color: var(--accent); margin: 0 0 8px; font-size: 1.15rem; }
.reauth-text { color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; margin: 0 0 14px; }
.reauth-email { font-size: 0.85rem; color: var(--text-dark); margin: 0 0 12px; }
.reauth-error { color: var(--status-danger-text); font-size: 0.82rem; margin: 6px 0 0; min-height: 1em; }
.reauth-error:empty { display: none; }
.reauth-logout {
  display: block; margin: 12px auto 0; padding: 4px 8px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font: inherit; font-size: 0.85rem; text-decoration: underline;
}
.reauth-logout:hover { color: var(--accent); }
.dialog-backdrop {
  position: fixed; inset: 0; z-index: 10002;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0, 35, 102, 0.55);
  overflow-y: auto;
}
.dialog {
  background: var(--surface); color: var(--text-dark);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 22px 22px 18px;
  max-height: calc(100vh - 40px); overflow-y: auto;
  width: 100%; max-width: 400px; animation: dialogIn 0.15s ease;
}
@keyframes dialogIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.dialog-title { margin: 0 0 8px; font-size: 1.1rem; }
.dialog-msg { margin: 0 0 18px; color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.file-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-field .file-btn { margin: 0; cursor: pointer; }
.file-name {
  color: var(--text-muted); font-size: 0.85rem;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .spinner { animation: none !important; }
}
html[data-theme="dark"],
html[data-theme="midnight"],
html[data-theme="contrast"] {
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --page-bg: #0f1620;
    --surface: #1b2533;
    --surface-2: #243244;
    --text-dark: #e7eef6;
    --text-muted: #a3b3c6;
    --border: #33425a;
    --sky-blue-light: #243244;
    --accent: #6fb2f2;
    --royal-blue: #1a3a66;
    --royal-blue-hover: #224a80;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 6px 26px rgba(0, 0, 0, 0.6);
  }
}
html[data-theme="dark"] {
  --page-bg: #0f1620;
  --surface: #1b2533;
  --surface-2: #243244;
  --text-dark: #e7eef6;
  --text-muted: #a3b3c6;
  --border: #33425a;
  --sky-blue-light: #243244;
  --accent: #6fb2f2;
  --royal-blue: #1a3a66;
  --royal-blue-hover: #224a80;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 6px 26px rgba(0, 0, 0, 0.6);
}
html[data-theme="midnight"] {
  --page-bg: #05080d;
  --surface: #0d141f;
  --surface-2: #141e2c;
  --text-dark: #e3ebf4;
  --text-muted: #94a4b7;
  --border: #233044;
  --sky-blue-light: #141e2c;
  --accent: #5aa6ef;
  --royal-blue: #122a4d;
  --royal-blue-hover: #18365f;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 6px 28px rgba(0, 0, 0, 0.72);
}
html[data-theme="emerald"] {
  --page-bg: #e9f5ef;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --text-dark: #16271f;
  --text-muted: #4f6960;
  --border: #cfe5da;
  --sky-blue-light: #e1f0e9;
  --accent: #0f7a52;
  --royal-blue: #0f7a52;
  --royal-blue-hover: #0b6242;
  --shadow: 0 2px 12px rgba(15, 122, 82, 0.12);
  --shadow-md: 0 6px 24px rgba(15, 122, 82, 0.18);
}
html[data-theme="sepia"] {
  --page-bg: #f3ece0;
  --surface: #fbf7f0;
  --surface-2: #f0ebe0;
  --text-dark: #2e2a23;
  --text-muted: #6b6256;
  --border: #ddcfbc;
  --sky-blue-light: #efe6d8;
  --accent: #6b4e2e;
  --royal-blue: #6b4e2e;
  --royal-blue-hover: #553d22;
  --shadow: 0 2px 12px rgba(107, 78, 46, 0.12);
  --shadow-md: 0 6px 24px rgba(107, 78, 46, 0.18);
}
html[data-theme="contrast"] {
  --page-bg: #000000;
  --surface: #000000;
  --surface-2: #111111;
  --text-dark: #ffffff;
  --text-muted: #e6e6e6;
  --border: #ffffff;
  --sky-blue-light: #1a1a1a;
  --accent: #ffd400;
  --royal-blue: #0046c0;
  --royal-blue-hover: #0057ee;
  --shadow: 0 0 0 1px #ffffff;
  --shadow-md: 0 0 0 2px #ffffff;
}
html[data-theme="dark"],
html[data-theme="midnight"],
html[data-theme="contrast"] {
  --status-danger-text: #FF9A92;
  --status-success-text: #69D695;
  --status-warning-text: #F5BF68;
  --status-info-text: #75D2ED;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --status-danger-text: #FF9A92;
    --status-success-text: #69D695;
    --status-warning-text: #F5BF68;
    --status-info-text: #75D2ED;
  }
}
.sheet, .scard {
  color: var(--text-dark);
  --surface: #FFFFFF;
  --surface-2: #F2F7FB;
  --page-bg: #FFFFFF;
  --accent: #002366;
  --text-dark: #1A1A2E;
  --text-muted: #5A6A7A;
  --border: #D0DCE8;
  --sky-blue-light: #D6EFFA;
  --royal-blue: #002366;
  --royal-blue-hover: #003399;
  --shadow: 0 2px 12px rgba(0, 35, 102, 0.08);
  --shadow-md: 0 4px 24px rgba(0, 35, 102, 0.14);
}
@media print {
  html:root,
  html[data-theme] {
    color-scheme: only light;
    --surface: #FFFFFF;
    --surface-2: #F2F7FB;
    --page-bg: #FFFFFF;
    --accent: #002366;
    --text-dark: #1A1A2E;
    --text-muted: #5A6A7A;
    --border: #D0DCE8;
    --sky-blue-light: #D6EFFA;
    --royal-blue: #002366;
    --royal-blue-hover: #003399;
  }
}
.theme-switch {
  position: fixed; right: 16px; bottom: 16px; z-index: 9000;
  display: inline-flex; touch-action: none;
}
.theme-btn {
  width: 44px; height: 44px; padding: 0; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: grab; user-select: none; font-size: 1.25rem; line-height: 1;
  background: var(--surface); color: var(--text-dark);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.theme-btn:active { cursor: grabbing; }
.theme-switch.theme-anim .theme-btn {
  transition: width 0.2s ease, height 0.2s ease, border-radius 0.2s ease,
              opacity 0.2s ease, background 0.2s ease, right 0.2s ease;
}
.theme-switch.theme-hidden { right: 0 !important; left: auto !important; bottom: auto; }
.theme-switch.theme-hidden .theme-menu { display: none !important; }
.theme-switch.theme-hidden .theme-btn {
  width: 8px; height: 52px; min-width: 0; padding: 0;
  border-radius: 8px 0 0 8px; font-size: 0;
  background: var(--accent); border-color: var(--accent); color: transparent;
  opacity: 0.55;
}
.theme-switch.theme-hidden .theme-btn svg { display: none; }
.theme-switch.theme-hidden .theme-btn:hover { width: 12px; opacity: 0.95; }
.theme-menu {
  position: absolute; z-index: 9500; min-width: 170px; padding: 6px;
  background: var(--surface); color: var(--text-dark);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md);
  top: calc(100% + 8px); right: 0; bottom: auto; left: auto;
}
.theme-menu[hidden] { display: none; }
.theme-switch.menu-up .theme-menu { top: auto; bottom: calc(100% + 8px); }
.theme-switch.menu-left .theme-menu { right: auto; left: 0; }
.theme-opt {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 8px 10px; border: none; background: transparent; border-radius: 6px;
  font: inherit; font-size: 0.88rem; color: var(--text-dark); text-align: left; cursor: pointer;
}
.theme-opt::before { content: ''; display: inline-block; width: 1em; height: 1em; flex-shrink: 0; }
.theme-opt:hover { background: var(--sky-blue-light); }
.theme-opt.is-active { font-weight: 700; color: var(--accent); }
.theme-opt.is-active::before {
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
          mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
.theme-notice {
  position: fixed; right: 16px; bottom: 72px; z-index: 9500;
  max-width: 300px; padding: 10px 28px 10px 14px;
  background: var(--surface); color: var(--text-dark);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md);
  font-size: 0.82rem; line-height: 1.4;
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.theme-notice.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.theme-notice-title { margin: 0 0 3px; color: var(--accent); font-weight: 700; font-size: 0.88rem; }
.theme-notice-text { margin: 0; color: var(--text-muted); }
.theme-notice-x {
  position: absolute; top: 5px; right: 8px; border: none; background: none;
  font-size: 1.1rem; line-height: 1; cursor: pointer; color: var(--text-muted);
  padding: 2px 7px; border-radius: 4px;
}
.theme-notice-x:hover { background: var(--surface-2); color: var(--text-dark); }
@media (max-width: 480px) {
  .theme-notice { right: 12px; bottom: 60px; left: 12px; max-width: none; }
}
@media print { .theme-switch { display: none !important; } }
