/* Majaako Studio — admin console.
   Served only from the Node server, never linked from the public site.
   No external fonts or scripts, so the page runs under a strict CSP. */

:root {
  --ink: #111417;
  --ink-2: #333A42;
  --muted: #5E6771;
  --muted-2: #8A939D;
  --paper: #F5F5F2;
  --surface: #FFFFFF;
  --line: #E2E2DC;
  --line-soft: #EDEDE8;
  --accent: #B8332A;
  --accent-dk: #94261F;
  --accent-tint: #F7EAE8;
  --ok: #1E8A4C;
  --slate: #14181C;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 8px;
}

/* ── Common Design Token System: Dark Theme ───────────────────────────── */
[data-theme="dark"] {
  --ink: #F0F2F5;
  --ink-2: #C4CCD6;
  --muted: #919BA6;
  --muted-2: #656F7C;
  --paper: #0F1215;
  --surface: #181C21;
  --line: #272E37;
  --line-soft: #1D232B;
  --accent: #E05A4E;
  --accent-dk: #EB7166;
  --accent-tint: rgba(224, 90, 78, 0.16);
  --ok: #28A745;
  --slate: #12161A;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
input, select, textarea, button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .88em; background: var(--line-soft); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; border-color: var(--line); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #000; }
.btn-quiet { background: transparent; }
.btn-danger { color: var(--accent); border-color: var(--accent-tint); }
.btn-danger:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-icon { padding: 6px 10px; font-size: 13px; }

/* ── sign in ───────────────────────────────────────────────────────────── */
.gate { position: relative; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.gate-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 34px 30px 30px; display: flex; flex-direction: column;
  box-shadow: 0 30px 60px -40px rgba(17,20,23,.5);
}
.gate-mark {
  width: 54px; height: 54px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: #f6f1ea;
  border: 1.5px solid rgba(184, 51, 42, 0.22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}
.gate-mark img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

.mark {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: #f6f1ea;
  border: 1px solid rgba(184, 51, 42, 0.22);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.mark img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.gate-card h1 { font-size: 21px; }
.gate-sub { margin: 6px 0 26px; color: var(--muted); font-size: 13.5px; }
.gate-card label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.gate-card input {
  padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--paper); margin-bottom: 18px;
}
.gate-card input:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.gate-card .btn { margin-top: 6px; padding: 12px; }
.gate-msg { min-height: 20px; margin: 14px 0 0; font-size: 13.5px; color: var(--accent); text-align: center; }
.gate-foot { margin: 16px 0 0; font-size: 12.5px; color: var(--muted-2); text-align: center; line-height: 1.5; }

/* ── frame ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 22px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-left strong { display: block; font-size: 15px; }
.who { font-size: 12.5px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.save-state { font-size: 12.5px; color: var(--muted); }
.save-state.dirty { color: var(--accent); font-weight: 500; }

.tabs { display: flex; gap: 4px; padding: 14px 22px 0; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab {
  border: 0; background: none; padding: 10px 14px 14px; cursor: pointer;
  font-size: 14.5px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 500; }
.pill {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--paper); font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.tab.is-on .pill { background: var(--accent-tint); color: var(--accent-dk); }

.panel { max-width: 1060px; margin: 0 auto; padding: 26px 22px 80px; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.view-note { margin: 0; font-size: 13.5px; color: var(--muted); max-width: 62ch; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters select, .filters input {
  padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px;
}
.filters input { min-width: 220px; }
.hint { font-size: 13px; color: var(--muted); margin: 16px 0 0; line-height: 1.6; }

.warn {
  border: 1px dashed var(--accent); background: var(--accent-tint);
  border-radius: var(--r); padding: 14px 16px; margin-bottom: 18px;
  font-size: 13.5px; line-height: 1.6; color: var(--ink-2);
}

/* ── rows ──────────────────────────────────────────────────────────────── */
.rows { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px;
}
.row.is-hidden { opacity: .55; }
.row-move { display: flex; flex-direction: column; gap: 2px; }
.row-move button {
  width: 22px; height: 17px; padding: 0; line-height: 1; font-size: 10px;
  border: 1px solid var(--line); background: var(--paper); border-radius: 4px; cursor: pointer; color: var(--muted);
}
.row-move button:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.row-move button:disabled { opacity: .3; cursor: default; }

.row-main { min-width: 0; }
.row-title { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 6px; }

.tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: 4px; padding: 2px 6px; color: var(--muted);
}
.tag.cat { background: var(--accent-tint); border-color: var(--accent-tint); color: var(--accent-dk); }
.tag.star { background: none; border: 0; color: var(--accent); letter-spacing: .1em; }
.tag.lead { background: var(--slate); border-color: var(--slate); color: #fff; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; }
.switch input { width: 34px; height: 20px; appearance: none; background: var(--line); border-radius: 999px; position: relative; cursor: pointer; transition: background-color .18s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .18s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(14px); }

.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; border: 1px dashed var(--line); border-radius: var(--r); }

.setting { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 14px; }
.setting h3 { font-size: 15px; margin-bottom: 8px; }

/* ── editor dialog ─────────────────────────────────────────────────────── */
.editor {
  border: 0; border-radius: 14px; padding: 0; width: min(680px, 96vw);
  box-shadow: 0 40px 80px -30px rgba(17,20,23,.55);
}
.editor::backdrop { background: rgba(17,20,23,.45); }
.editor form { padding: 26px 26px 22px; }
.editor h2 { font-size: 18px; margin-bottom: 20px; }
.fields { display: flex; flex-direction: column; gap: 16px; max-height: 72vh; overflow-y: auto; padding-right: 6px; }
.f { display: flex; flex-direction: column; gap: 6px; }
.f label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.f input[type="text"], .f input[type="search"], .f input[type="email"], .f textarea, .f select, .f input[type="number"] {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); width: 100%;
}
.f textarea { min-height: 80px; resize: vertical; line-height: 1.55; }
.f input:focus, .f textarea:focus, .f select:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.f .note { font-size: 12px; color: var(--muted-2); margin: 0; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.f-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.tints { display: flex; gap: 8px; }
.tints label { display: grid; place-items: center; width: 42px; height: 34px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; font-size: 11px; color: var(--muted); }
.tints input { position: absolute; opacity: 0; pointer-events: none; }
.tints label:nth-of-type(1) { background: #F7EAE8; }
.tints label:nth-of-type(2) { background: #E9EEEA; }
.tints label:nth-of-type(3) { background: #E7ECF1; }
.tints label:nth-of-type(4) { background: #EFEEEA; }
.tints label.on { border-color: var(--ink); }

/* ── Multiple Image Uploader ───────────────────────────────────────────── */
.img-uploader {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--paper); border: 1px dashed var(--line); border-radius: var(--r); padding: 14px;
}
.img-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 16px; border: 1.5px dashed var(--muted-2); border-radius: 6px;
  background: var(--surface); cursor: pointer; text-align: center;
  transition: border-color .15s, background-color .15s;
}
.img-dropzone:hover { border-color: var(--accent); }
.img-dropzone input[type="file"] { display: none; }
.img-dropzone span.drop-label { font-size: 13px; font-weight: 500; color: var(--ink); }
.img-dropzone span.drop-hint { font-size: 11.5px; color: var(--muted); }
.img-previews {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px;
}
.img-thumb-box {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
}
.img-thumb-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-thumb-box.is-primary { border: 2px solid var(--accent); }
.img-thumb-primary-tag {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--accent); color: #fff; font-size: 9px; font-weight: 600;
  text-align: center; padding: 2px 0; text-transform: uppercase;
}
.img-thumb-del {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(0,0,0,0.65); color: #fff;
  border: none; cursor: pointer; display: grid; place-items: center; font-size: 11px;
  line-height: 1; padding: 0; transition: background-color .15s;
}
.img-thumb-del:hover { background: var(--accent); }
.img-thumb-set-primary {
  position: absolute; bottom: 4px; left: 4px; font-size: 9px;
  background: rgba(0,0,0,0.6); color: #fff; border: none; border-radius: 3px;
  padding: 2px 4px; cursor: pointer;
}

/* ── Product Admin Grid (Small Cards) ──────────────────────────────────── */
.product-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 10px;
}
.pac-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  position: relative;
}
.pac-card:hover {
  border-color: var(--muted-2);
  box-shadow: 0 8px 24px -12px rgba(17,20,23,.18);
}
.pac-card.is-hidden { opacity: .55; }
.pac-top {
  position: relative;
  width: 100%;
  height: 140px;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.pac-top img {
  width: 100%; height: 100%; object-fit: cover;
}
.pac-top svg {
  width: 64px; height: 64px; stroke: var(--muted-2); opacity: .7;
}
.pac-top-badges {
  position: absolute; top: 8px; left: 8px; display: flex; flex-wrap: wrap; gap: 5px; z-index: 2;
}
.pac-top-badges .badge {
  font-size: 10.5px; font-weight: 600; padding: 3px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .02em;
}
.badge-stock-in { background: #E8F5E9; color: #1E8A4C; }
.badge-stock-out { background: #FFEBEE; color: #B8332A; font-weight: 700; }
.badge-discount { background: #FFF3E0; color: #E65100; }
.pac-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pac-cat {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin-bottom: 4px;
}
.pac-title {
  font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 6px; line-height: 1.35;
}
.pac-specs {
  font-size: 12px; color: var(--muted); margin-bottom: 8px; line-height: 1.45;
}
.pac-specs span { display: inline-block; }
.pac-price-row {
  display: flex; align-items: baseline; justify-content: space-between; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line-soft);
}
.pac-price { font-size: 15px; font-weight: 700; color: var(--ink); }
.pac-price-unit { font-size: 11.5px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.pac-price-orig { font-size: 12px; color: var(--muted-2); text-decoration: line-through; margin-right: 6px; }
.pac-footer {
  padding: 10px 14px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pac-move-group { display: flex; gap: 4px; }
.pac-move-btn {
  width: 26px; height: 26px; padding: 0; font-size: 10px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; display: grid; place-items: center;
}
.pac-move-btn:disabled { opacity: .3; cursor: default; }
.pac-actions-group { display: flex; align-items: center; gap: 6px; }

/* ── Hero Banners Admin Grid ───────────────────────────────────────────── */
.banners-admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 14px;
}
.bac-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
}
.bac-preview {
  height: 140px; background: linear-gradient(135deg, #1E4D3B 0%, #143A2C 100%);
  color: #fff; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; background-size: cover; background-position: center;
}
.bac-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: .06em; background: rgba(255,255,255,.2);
  display: inline-block; padding: 2px 7px; border-radius: 3px; margin-bottom: 6px; align-self: flex-start;
}
.bac-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.bac-body { padding: 14px; flex: 1; }
.bac-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; line-height: 1.45; }
.bac-cta-info { font-size: 11.5px; color: var(--muted-2); font-family: var(--mono); }
.bac-foot {
  padding: 10px 14px; background: var(--paper); border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}

/* ── Settings Grid ─────────────────────────────────────────────────────── */
.settings-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px;
}
.setting-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px;
  display: flex; flex-direction: column; gap: 18px;
}
.setting-card-head {
  display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); padding-bottom: 12px;
}
.setting-card-head h3 { font-size: 16px; color: var(--ink); margin: 0; }
.setting-field { display: flex; flex-direction: column; gap: 6px; }
.setting-field label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.setting-field input, .setting-field textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
}
.setting-field input:focus, .setting-field textarea:focus {
  outline: none; border-color: var(--ink); background: var(--surface);
}
.setting-field .note { font-size: 11.5px; color: var(--muted-2); margin: 0; line-height: 1.45; }

/* ── Audit Timeline ────────────────────────────────────────────────────── */
.audit-timeline {
  display: flex; flex-direction: column; gap: 10px; margin-top: 14px;
}
.audit-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
}
.audit-main { display: flex; flex-direction: column; gap: 4px; }
.audit-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.audit-badge {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; padding: 2px 7px; border-radius: 4px;
  background: var(--line-soft); color: var(--ink-2);
}
.audit-badge.cat-products { background: #E3F2FD; color: #1565C0; }
.audit-badge.cat-categories { background: #EDE7F6; color: #512DA8; }
.audit-badge.cat-banners { background: #FCE4EC; color: #C2185B; }
.audit-badge.cat-reviews { background: #FFF8E1; color: #F57F17; }
.audit-badge.cat-settings { background: #E8F5E9; color: #2E7D32; }
.audit-badge.cat-publish { background: #E0F2F1; color: #00695C; }
.audit-user { font-size: 13px; font-weight: 600; color: var(--ink); }
.audit-action { font-size: 13.5px; color: var(--ink); }
.audit-details { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.audit-time { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; flex: none; }

/* ── toast ─────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: var(--slate); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 14px; z-index: 50; box-shadow: 0 16px 34px -18px rgba(0,0,0,.7);
}
.toast.bad { background: var(--accent); }

@media (max-width: 620px) {
  .row { grid-template-columns: 30px 1fr; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .topbar { padding: 10px 14px; }
  .panel { padding: 20px 14px 70px; }
  .f-row { grid-template-columns: 1fr; }
}

/* ── Dark Theme Component Refinements ──────────────────────────────────── */
[data-theme="dark"] .gate-mark,
[data-theme="dark"] .mark {
  background: #20262E;
  border-color: rgba(224, 90, 78, 0.35);
}

[data-theme="dark"] .editor {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .editor::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .tints label:nth-of-type(1) { background: rgba(224, 90, 78, 0.2); }
[data-theme="dark"] .tints label:nth-of-type(2) { background: rgba(70, 160, 110, 0.2); }
[data-theme="dark"] .tints label:nth-of-type(3) { background: rgba(70, 130, 200, 0.2); }
[data-theme="dark"] .tints label:nth-of-type(4) { background: rgba(180, 160, 100, 0.2); }

[data-theme="dark"] .badge-stock-in { background: rgba(40, 167, 69, 0.2); color: #4EBA88; }
[data-theme="dark"] .badge-stock-out { background: rgba(224, 90, 78, 0.2); color: #FF7B72; }
[data-theme="dark"] .badge-discount { background: rgba(255, 152, 0, 0.2); color: #FFB74D; }
[data-theme="dark"] .audit-badge.cat-products { background: rgba(33, 150, 243, 0.2); color: #64B5F6; }
[data-theme="dark"] .audit-badge.cat-categories { background: rgba(156, 39, 176, 0.2); color: #BA68C8; }
[data-theme="dark"] .audit-badge.cat-banners { background: rgba(233, 30, 99, 0.2); color: #F06292; }
[data-theme="dark"] .audit-badge.cat-reviews { background: rgba(255, 193, 7, 0.2); color: #FFD54F; }
[data-theme="dark"] .audit-badge.cat-settings { background: rgba(76, 175, 80, 0.2); color: #81C784; }
[data-theme="dark"] .audit-badge.cat-publish { background: rgba(0, 150, 136, 0.2); color: #4DB6AC; }

/* ── Theme Toggle ───────────────────────────────────────────────────────── */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.theme-toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: scale(1.06);
}
.theme-toggle svg {
  width: 17px;
  height: 17px;
  display: block;
  pointer-events: none;
}
.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }

[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

.gate-theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
}

