/* cat shelter staff dashboard: dark night colours from the server, gold and pink accents. */
:root {
  --bg: #0c0d22;
  --bg-2: #11122e;
  --panel: #16173a;
  --panel-2: #1d1e47;
  --field: #0f1030;
  --border: #282a5a;
  --border-strong: #363a78;
  --text: #ecebff;
  --muted: #9d9ecb;
  --faint: #6f70a3;
  --gold: #ffc93c;
  --gold-dark: #d9961a;
  --gold-soft: rgba(255, 201, 60, 0.14);
  --pink: #ff6b9d;
  --pink-soft: rgba(255, 107, 157, 0.16);
  --lilac: #cdbaff;
  --good: #3ccf7a;
  --danger: #ff5c6c;
  --radius: 14px;
  --radius-sm: 9px;
  /* Discord's own colours, for the message previews only */
  --dc-bg: #313338;
  --dc-embed: #2b2d31;
  --dc-text: #dbdee1;
  --dc-muted: #949ba4;
  --dc-link: #00a8fc;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(123, 76, 220, 0.22), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255, 107, 157, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
}

h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 4px; }
h3 { font-size: 15px; margin: 0 0 10px; color: var(--lilac); }
p { margin: 0 0 8px; }
code { background: var(--field); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.muted { color: var(--muted); }
.hint { color: var(--faint); font-size: 13px; margin: 10px 0 0; }
.top-gap { margin-top: 18px; }

/* ---------- layout ---------- */

.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(13, 14, 38, 0.92);
  border-right: 1px solid var(--border);
}

.side-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 16px 18px;
  text-align: center;
  background: linear-gradient(160deg, #2a1b5e 0%, #181a4a 55%, #121331 100%);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
/* Darkens a staff-provided image so the name stays readable. */
.side-hero.has-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 13, 34, 0.15), rgba(12, 13, 34, 0.85));
}
.side-hero > * { position: relative; }
.server-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: var(--panel-2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  margin-bottom: 6px;
  object-fit: cover;
}
.side-hero strong { font-size: 17px; }
.side-sub { color: var(--lilac); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }

nav { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}
nav a:hover { background: var(--panel); color: var(--text); }
nav a.active { background: var(--gold-soft); color: var(--gold); }
nav a.active .ico { color: var(--gold); }
.nav-heading { color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; padding: 16px 12px 6px; }
.ico { display: inline-flex; width: 20px; height: 20px; color: var(--faint); flex: none; }
.ico svg { width: 20px; height: 20px; }

.me { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); }
.me img { border-radius: 50%; background: var(--panel-2); flex: none; }
.me-text { display: flex; flex-direction: column; min-width: 0; }
.me-text span { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shell { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 36px;
  background: rgba(12, 13, 34, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.crumb { color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.crumb strong { color: var(--text); }
.crumb .sep { color: var(--faint); }
.mode-pill { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.mode-pill.shadow { background: var(--pink-soft); color: var(--pink); }
.mode-pill.live { background: rgba(60, 207, 122, 0.15); color: var(--good); }

main { padding: 30px 36px 140px; max-width: 1180px; width: 100%; }
.page-head { margin-bottom: 22px; }
.page-head p { color: var(--muted); max-width: 720px; }

/* ---------- cards and forms ---------- */

.card {
  background: linear-gradient(180deg, rgba(29, 30, 71, 0.75), rgba(22, 23, 58, 0.75));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px rgba(0, 0, 0, 0.18);
}
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.grid2, .grid3 { display: grid; gap: 16px; margin-top: 14px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid3.tight { gap: 10px; margin-top: 0; }
.narrow { max-width: 420px; margin-top: 12px; }

label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }

input[type="number"], input[type="text"], input[type="search"], input[type="url"], select, textarea {
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  width: 100%;
  transition: border-color 0.12s, box-shadow 0.12s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
select { cursor: pointer; }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
input::placeholder, textarea::placeholder { color: var(--faint); }

.checks { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 16px; }
.check { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; color: var(--text); font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--pink); margin: 0; }

.switch { position: relative; flex: none; width: 46px; height: 26px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: background 0.15s; }
.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.switch input:checked + span { background: var(--pink); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--pink-soft); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 15px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s, background 0.12s, border-color 0.12s;
}
.button:hover { border-color: var(--lilac); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.6; cursor: default; }
.button.primary { background: var(--gold); border-color: var(--gold); color: #251a00; }
.button.primary:hover { background: #ffd462; }
.button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.button.ghost:hover { color: var(--text); border-color: var(--border-strong); }
.button.small { padding: 5px 11px; font-size: 13px; }
.button.big { padding: 12px 22px; font-size: 15px; }
.link { background: none; border: 0; padding: 0; color: var(--faint); font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.link:hover { color: var(--text); text-decoration: underline; }
.remove { background: none; border: 0; color: var(--faint); font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.remove:hover { color: var(--danger); background: rgba(255, 92, 108, 0.1); }

/* ---------- pickers, rows, tables ---------- */

.picker .chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px 4px 3px 11px;
  font-size: 13px;
}
.chip .remove { font-size: 16px; padding: 0 5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex: none; }
.empty { color: var(--faint); font-size: 14px; }

.rows { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 14px; }
.row { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.row.boost { grid-template-columns: minmax(0, 1fr) 120px auto; align-items: center; }

.formula-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.formula-box { background: rgba(12, 13, 34, 0.45); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; min-width: 0; }

.table-wrap { overflow-x: auto; margin-top: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.preview th, table.preview td { padding: 6px 8px; font-size: 13px; }
table.preview tr.key td { color: var(--gold); font-weight: 700; }
table.members tr:hover td { background: rgba(255, 255, 255, 0.02); }
.who { display: flex; align-items: center; gap: 10px; }
.who img { border-radius: 50%; background: var(--panel-2); }
.who small { color: var(--faint); }
.level { display: inline-block; min-width: 34px; text-align: center; padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: 13px; }
.level.voice { background: var(--pink-soft); color: var(--pink); }

/* ---------- overview ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 210px;
  padding: 28px 30px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(500px 260px at 90% 20%, rgba(255, 201, 60, 0.20), transparent 60%),
    linear-gradient(135deg, #3a2178 0%, #24195e 45%, #141540 100%);
  background-size: cover;
  background-position: center;
}
.hero.has-art { min-height: 260px; background-position: center 40%; }
.hero.has-art::before {
  content: "";
  position: absolute;
  inset: 0;
  /* dark at the bottom-left for the welcome text, the picture clear everywhere else */
  background: linear-gradient(15deg, rgba(12, 13, 34, 0.92) 0%, rgba(12, 13, 34, 0.55) 35%, rgba(12, 13, 34, 0) 65%);
}
.hero.has-art .hero-text h1 { text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.hero > * { position: relative; }
.hero-text { max-width: 560px; }
.hero-text h1 { font-size: 30px; }
.hero-text p { color: #d4cff7; margin: 0; }
.hero-icon {
  position: absolute;
  right: 32px;
  top: 50%;
  width: 120px;
  height: 120px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 4px solid rgba(255, 201, 60, 0.85);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  object-fit: cover;
}

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat b { display: block; font-size: 24px; color: var(--gold); }
.stat span { color: var(--muted); font-size: 13px; }

.changes { list-style: none; margin: 0; padding: 0; }
.changes > li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.changes > li:last-child { border-bottom: 0; }
.changes .when { color: var(--faint); font-size: 13px; }
.changes ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; word-break: break-word; }

/* ---------- level-up editor ---------- */

.levelup-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.levelup-options { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; margin-bottom: 18px; }

.segmented { display: inline-flex; background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; gap: 3px; }
.segmented button { font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); background: transparent; border: 0; border-radius: 7px; padding: 7px 18px; cursor: pointer; }
.segmented button.on { background: var(--gold); color: #251a00; }

.editor-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.editor-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.preview-col { position: sticky; top: 76px; min-width: 0; }
.preview-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }

.placeholders { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--faint); }
.placeholders button {
  font: inherit;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: var(--lilac);
  background: rgba(205, 186, 255, 0.1);
  border: 1px solid rgba(205, 186, 255, 0.25);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
}
.placeholders button:hover { background: rgba(205, 186, 255, 0.2); }

/* The embed being edited, laid out like the embed it makes. */
.embed-editor {
  position: relative;
  background: rgba(12, 13, 34, 0.55);
  border: 1px solid var(--border);
  border-left: 5px solid var(--embed-color, var(--lilac));
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.embed-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; align-items: end; }
.field-label { display: flex; justify-content: space-between; gap: 8px; }
.count { color: var(--faint); font-weight: 400; font-variant-numeric: tabular-nums; }
.count.over { color: var(--danger); }
.colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--bg); }
.colors input[type="color"] { width: 34px; height: 28px; padding: 0; border: 1px solid var(--border-strong); border-radius: 7px; background: none; cursor: pointer; }
.image-pick { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; }
.embed-fields { display: flex; flex-direction: column; gap: 10px; }
.embed-field { background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.embed-field .field-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.embed-field textarea { min-height: 60px; }
.size-note { font-size: 12px; color: var(--faint); text-align: right; }

/* ---------- Discord message preview ---------- */

.dc {
  background: var(--dc-bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px 16px;
  color: var(--dc-text);
  font: 15px/1.375 "gg sans", "Segoe UI", system-ui, sans-serif;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0 14px;
  overflow: hidden;
}
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; background: #5865f2; object-fit: cover; }
.dc-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dc-name { font-weight: 600; color: #f2f3f5; }
.dc-app { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.dc-time { color: var(--dc-muted); font-size: 12px; }
.dc-body { min-width: 0; }
.dc-content { margin-top: 2px; word-wrap: break-word; }
.dc-embed {
  margin-top: 6px;
  max-width: 520px;
  background: var(--dc-embed);
  border-left: 4px solid #1e1f22;
  border-radius: 4px;
  padding: 10px 14px 14px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 16px;
}
.dc-embed-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dc-author { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #f2f3f5; }
.dc-author img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.dc-title { font-weight: 700; color: #f2f3f5; font-size: 16px; }
.dc-desc { font-size: 14px; }
.dc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 2px; }
.dc-field { grid-column: 1 / -1; min-width: 0; font-size: 14px; }
.dc-field.inline { grid-column: auto; }
.dc-field-name { font-weight: 700; color: #f2f3f5; margin-bottom: 2px; }
.dc-thumb { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; grid-row: 1; grid-column: 2; }
.dc-image { grid-column: 1 / -1; width: 100%; max-height: 300px; object-fit: cover; border-radius: 4px; margin-top: 12px; }
.dc-footer { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dc-muted); margin-top: 6px; }
.dc-footer img { width: 20px; height: 20px; border-radius: 50%; }

.md { word-wrap: break-word; }
.md-line { min-height: 1.375em; }
.md strong { font-weight: 700; color: inherit; }
.md code { background: #1e1f22; border: 0; color: var(--dc-text); font-size: 85%; padding: 1px 4px; }
.md blockquote { margin: 2px 0; padding-left: 12px; border-left: 4px solid #4e5058; }
.md ul { margin: 2px 0; padding-left: 22px; }
.md-h { margin: 6px 0 2px; color: #f2f3f5; line-height: 1.3; }
h3.md-h { font-size: 20px; }
h4.md-h { font-size: 17px; }
h5.md-h { font-size: 15px; }
.md-sub { font-size: 12px; color: var(--dc-muted); }
.md-link { color: var(--dc-link); }
.md-spoiler { background: #1e1f22; color: #1e1f22; border-radius: 3px; padding: 0 2px; }
.md-mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }

/* ---------- save bar, dialog, toast, login ---------- */

.savebar {
  position: fixed;
  left: calc(272px + 36px);
  right: 36px;
  bottom: 22px;
  max-width: 1108px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 20px;
  background: #1c1d4a;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  font-weight: 600;
}
.savebar div { display: flex; gap: 8px; }

dialog {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  padding: 24px;
  width: min(460px, calc(100vw - 32px));
}
dialog::backdrop { background: rgba(5, 5, 20, 0.7); backdrop-filter: blur(3px); }
dialog form { display: flex; flex-direction: column; gap: 14px; }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; }
.error { color: var(--danger); font-size: 14px; margin: 0; }

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 20;
  max-width: 380px;
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--good);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.toast.bad { border-left-color: var(--danger); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card {
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 34px;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.login-mascot { display: block; width: 128px; height: 128px; margin: -8px auto 6px; object-fit: contain; }

/* ---------- decoration sprites (dashboard/images/) ---------- */

.sprite { object-fit: contain; flex: none; }
.sprite-card { width: 56px; height: 56px; margin-right: -4px; }
#shadow-card .row-between { align-items: center; }
#shadow-card .row-between > div { flex: 1; }
.sprite-bar { width: 34px; height: 34px; margin-right: -4px; }
.savebar { gap: 12px; }
.savebar #save-text { flex: 1; }
.sprite-title { width: 34px; height: 34px; vertical-align: -6px; margin-right: 8px; }
.sprite-toast { width: 40px; height: 40px; }
.toast { display: flex; align-items: center; gap: 10px; }
.sprite-empty { width: 40px; height: 40px; opacity: 0.9; }
.empty-state { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 14px; padding: 4px 0; }
.login-card p { color: var(--muted); margin-bottom: 24px; }
.notice { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px; }

/* ---------- smaller screens ---------- */

@media (max-width: 1100px) {
  .editor-split { grid-template-columns: minmax(0, 1fr); }
  .preview-col { position: static; }
}

@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; }
  .side-hero { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 14px 16px; text-align: left; }
  .server-icon { width: 44px; height: 44px; margin: 0; border-width: 2px; }
  .side-sub { display: none; }
  nav { flex-direction: row; overflow-x: auto; padding: 8px 12px; }
  nav a { white-space: nowrap; padding: 8px 10px; }
  .nav-heading, .me { display: none; }
  .topbar { padding: 12px 16px; position: static; }
  main { padding: 20px 16px 140px; }
  .card { padding: 18px 16px; }
  .grid2, .grid3, .stats, .formula-grid, .levelup-options { grid-template-columns: minmax(0, 1fr); }
  .embed-row, .image-pick { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 170px; padding: 20px; }
  .hero-icon { width: 72px; height: 72px; right: 16px; top: 20px; transform: none; }
  .hero-text h1 { font-size: 24px; padding-right: 80px; }
  .savebar { left: 16px; right: 16px; bottom: 16px; flex-direction: column; align-items: stretch; }
  .savebar div { justify-content: flex-end; }
}
