*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ed-bg: #111214;
  --ed-surface: #1a1b1f;
  --ed-panel: #202226;
  --ed-control: #2a2c32;
  --ed-control-hover: #32353d;
  --ed-border: rgba(255,255,255,0.07);
  --ed-border-strong: rgba(255,255,255,0.12);
  --ed-text: #e1e3ea;
  --ed-muted: #6b6e7d;
  --ed-accent: #2780e6;
  --ed-accent-hover: #1e63b3;
  --ed-success: #3ba55d;
  --ed-danger: #ed4245;
  --ed-radius: 8px;
  --ed-radius-sm: 5px;
  --sidebar-w: 340px;
  /* Updated dynamically from the theme's main/hover colors */
  --theme-main: #2780e6;
  --theme-hover: #1e63b3;
}

html, body { height: 100%; background: var(--ed-bg); color: var(--ed-text); font-family: 'Manrope', sans-serif; font-size: 13px; overflow: hidden; }
#app { display: flex; flex-direction: column; position: fixed; inset: 0; }

/* ─── HEADER ─────────────────────────────────────── */
#topbar {
  height: 54px;
  background: var(--ed-surface);
  border-bottom: 1px solid var(--ed-border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  flex-shrink: 0;
  z-index: 100;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--ed-text);
}
.logo-name span {
  color: var(--ed-accent);
}
.logo-badge {
  font-size: 10px;
  font-weight: 600;
  background: rgba(39, 128, 230, 0.2);
  color: var(--ed-accent);
  border: 1px solid rgba(39, 128, 230, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.topbar-divider { width: 1px; height: 24px; background: var(--ed-border); flex-shrink: 0; }

.preset-area {
  display: flex;
  align-items: center;
  gap: 8px;
}
.preset-area label {
  color: var(--ed-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
#preset-select {
  background: var(--ed-control);
  border: 1px solid var(--ed-border-strong);
  color: var(--ed-text);
  border-radius: var(--ed-radius-sm);
  padding: 5px 10px;
  font-size: 12px;
  font-family: 'Manrope', sans-serif;
  cursor: pointer;
  outline: none;
  min-width: 160px;
}
#preset-select:focus { border-color: var(--ed-accent); }

.platform-tabs {
  display: flex;
  background: var(--ed-control);
  border-radius: var(--ed-radius-sm);
  border: 1px solid var(--ed-border);
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}
.ptab {
  background: none;
  border: none;
  color: var(--ed-muted);
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.ptab:hover { color: var(--ed-text); }
.ptab.active { background: var(--ed-accent); color: #fff; }

.topbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.discord-theme-area {
  display: flex;
  align-items: center;
  gap: 8px;
}
.discord-theme-area label {
  color: var(--ed-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
#discord-theme-select {
  background: var(--ed-control);
  border: 1px solid var(--ed-border-strong);
  color: var(--ed-text);
  border-radius: var(--ed-radius-sm);
  padding: 5px 10px;
  font-size: 12px;
  font-family: 'Manrope', sans-serif;
  cursor: pointer;
  outline: none;
}

.btn {
  border: none;
  border-radius: var(--ed-radius-sm);
  padding: 6px 14px;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--ed-border-strong);
  color: var(--ed-text);
}
.btn-outline:hover { background: var(--ed-control); }
.btn-primary { background: var(--ed-accent); color: #fff; }
.btn-primary:hover { background: var(--ed-accent-hover); }

/* ─── LAYOUT ──────────────────────────────────────── */
#body { display: flex; flex: 1; overflow: hidden; }

/* ─── SIDEBAR ─────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--ed-surface);
  border-right: 1px solid var(--ed-border);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--ed-control) transparent;
}
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb { background: var(--ed-control); border-radius: 4px; }

/* ─── SECTION ─────────────────────────────────────── */
.section { border-bottom: 1px solid var(--ed-border); }
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  cursor: pointer;
  user-select: none;
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ed-muted);
  transition: color 0.15s;
}
.section-header:hover { color: var(--ed-text); }
.section-header .section-chevron {
  margin-left: auto;
  transition: transform 0.2s;
  opacity: 0.5;
  font-size: 10px;
}
.sec-icon {
  color: var(--theme-main);
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s;
}
.section.open .section-header { color: var(--ed-text); }
.section.open .section-chevron { transform: rotate(90deg); }
.section-body {
  display: none;
  padding: 4px 16px 16px;
  gap: 10px;
  flex-direction: column;
}
.section.open .section-body { display: flex; }

/* ─── CONTROLS ────────────────────────────────────── */
.control-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.control-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ed-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.control-label .label-default {
  font-size: 10px;
  font-weight: 400;
  font-family: 'Fira Code', monospace;
  color: rgba(107, 110, 125, 0.6);
}

/* Color row: swatch + hex input */
.color-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.color-swatch-wrap {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: var(--ed-radius-sm);
  overflow: hidden;
  border: 1px solid var(--ed-border-strong);
  flex-shrink: 0;
  cursor: pointer;
}
.color-swatch-wrap input[type=color] {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}
.color-swatch {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 4px;
}
.hex-input {
  flex: 1;
  background: var(--ed-control);
  border: 1px solid var(--ed-border-strong);
  border-radius: var(--ed-radius-sm);
  color: var(--ed-text);
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  padding: 5px 10px;
  outline: none;
  transition: border-color 0.15s;
  height: 30px;
}
.hex-input:focus { border-color: var(--ed-accent); }

/* RGBA row */
.rgba-row { display: flex; gap: 6px; align-items: center; }
.opacity-wrap { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.opacity-label { font-size: 10px; color: var(--ed-muted); display: flex; justify-content: space-between; }
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--ed-control-hover);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ed-accent);
  border: 2px solid var(--ed-surface);
  cursor: pointer;
}
input[type=range].slim { height: 3px; }

/* Text / select inputs */
.text-input, .select-input {
  width: 100%;
  background: var(--ed-control);
  border: 1px solid var(--ed-border-strong);
  border-radius: var(--ed-radius-sm);
  color: var(--ed-text);
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  padding: 6px 10px;
  outline: none;
  transition: border-color 0.15s;
  height: 30px;
}
.text-input:focus, .select-input:focus { border-color: var(--ed-accent); }
.select-input { cursor: pointer; }

/* Checkbox row */
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  font-size: 12px;
  color: var(--ed-text);
}
.check-row input[type=checkbox] { accent-color: var(--ed-accent); cursor: pointer; width: 14px; height: 14px; }

/* Shading group */
.shading-group {
  background: var(--ed-control);
  border-radius: var(--ed-radius);
  border: 1px solid var(--ed-border);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shading-group .shading-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ed-muted);
  margin-bottom: 2px;
}

.info-note {
  font-size: 11px;
  color: var(--ed-muted);
  background: var(--ed-control);
  border-radius: var(--ed-radius-sm);
  padding: 7px 10px;
  border-left: 2px solid var(--ed-accent);
  line-height: 1.5;
}

/* ─── PREVIEW AREA ────────────────────────────────── */
#preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ed-bg);
}
.preview-tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--ed-border);
  background: var(--ed-surface);
  padding: 0 16px;
  gap: 0;
  flex-shrink: 0;
}
.view-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ed-muted);
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.3px;
}
.view-tab:hover { color: var(--ed-text); border-bottom-color: color-mix(in srgb, var(--theme-main) 40%, transparent); }
.view-tab.active { color: var(--ed-text); border-bottom-color: var(--theme-main); }

.view-pane { display: none; flex: 1; overflow: hidden; }
.view-pane.active { display: flex; }

/* ─── DISCORD MOCK ────────────────────────────────── */
#mock-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}
#discord-mock {
  width: 100%;
  max-width: 900px;
  height: 100%;
  max-height: 620px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.06);
}
/* Background layer */
#mock-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

/* Servers sidebar */
.mock-servers {
  width: 72px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  z-index: 2;
  position: relative;
}
.mock-servers-bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: -1;
}
.mock-server-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  transition: border-radius 0.2s;
  flex-shrink: 0;
  user-select: none;
}
.mock-server-icon:hover { border-radius: 30%; }
.mock-server-icon.home { background: #5865f2; }
.mock-server-icon.active { border-radius: 30%; }
.server-pip {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  border-radius: 0 4px 4px 0;
  background: #fff;
  display: none;
}
.mock-server-icon.active .server-pip,
.mock-server-icon:hover .server-pip { display: block; }
.mock-server-wrap { position: relative; }
.mock-divider {
  width: 32px; height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 1px;
  margin: 2px 0;
}

/* Channels sidebar */
.mock-channels {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  z-index: 2;
  position: relative;
}
.mock-channels-bg {
  position: absolute; inset: 0;
  z-index: -1;
}
.mock-server-name {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,0.2);
  cursor: pointer;
  user-select: none;
}
.mock-channel-list { flex: 1; padding: 8px 8px 0; overflow: hidden; }
.mock-category-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 8px 2px;
  opacity: 0.7;
}
.mock-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  margin-bottom: 1px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  user-select: none;
  position: relative;
}
.mock-channel.selected { border-radius: 4px; }
.mock-channel .ch-icon { font-size: 14px; opacity: 0.7; }
.mock-channel-unread-pip {
  position: absolute;
  left: -4px;
  width: 4px; height: 8px;
  border-radius: 0 4px 4px 0;
  display: none;
}
.mock-channel.unread .mock-channel-unread-pip { display: block; }
.mock-user-bar {
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.mock-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ed-accent);
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.mock-status-dot {
  position: absolute;
  bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.4);
}
.mock-user-name { font-size: 12px; font-weight: 600; }
.mock-user-tag { font-size: 11px; }

/* Chat area */
.mock-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  z-index: 2;
  position: relative;
  overflow: hidden;
}
.mock-chat-bg {
  position: absolute; inset: 0;
  z-index: -1;
}
.mock-chat-header {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.mock-chat-header .ch-icon { opacity: 0.6; }
.mock-messages { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; justify-content: flex-end; }
.mock-msg { display: flex; gap: 12px; align-items: flex-start; }
.mock-msg-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.mock-msg-content { flex: 1; }
.mock-msg-header { display: flex; gap: 8px; align-items: baseline; margin-bottom: 3px; }
.mock-msg-name { font-size: 13px; font-weight: 700; }
.mock-msg-time { font-size: 10px; opacity: 0.4; }
.mock-msg-text { font-size: 13px; line-height: 1.5; opacity: 0.9; }
.mock-msg-text.code-block {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  padding: 8px 10px;
  border-radius: 4px;
  margin-top: 4px;
  background: rgba(0,0,0,0.3);
  opacity: 1;
}
.mock-msg-mention {
  background: rgba(39,128,230,0.25);
  color: #7ab4f5;
  padding: 0 3px;
  border-radius: 3px;
}

.mock-input-bar {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.mock-input {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 13px;
  opacity: 0.5;
}

/* Members sidebar */
.mock-members {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  z-index: 2;
  position: relative;
  padding: 16px 8px;
  gap: 4px;
  overflow: hidden;
}
.mock-members-bg { position: absolute; inset: 0; z-index: -1; }
.mock-member-cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  opacity: 0.5;
  margin-top: 8px;
}
.mock-member-cat:first-child { margin-top: 0; }
.mock-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.mock-member:hover { background: rgba(255,255,255,0.05); }
.mock-member-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  position: relative;
}
.mock-member-status {
  position: absolute;
  bottom: -1px; right: -1px;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid transparent;
}
.mock-member-name { font-size: 13px; font-weight: 500; }

/* CSS Output pane */
#css-pane {
  flex: 1;
  overflow: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--ed-control) transparent;
}
#css-pane::-webkit-scrollbar { width: 6px; }
#css-pane::-webkit-scrollbar-thumb { background: var(--ed-control); border-radius: 4px; }
#css-output {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ed-text);
  white-space: pre;
  background: var(--ed-surface);
  padding: 20px;
  border-radius: var(--ed-radius);
  border: 1px solid var(--ed-border);
}
/* Syntax highlighting */
.css-comment { color: #5a6a7e; }
.css-property { color: #c3e88d; }
.css-value { color: #89ddff; }
.css-selector { color: #82aaff; }
.css-atrule { color: #c792ea; }
.css-punct { color: #89ddff; }
.css-bracket { color: #89ddff; }

/* ─── NOTIFICATION TOAST ──────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%) translateY(0);
  background: var(--ed-success);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--ed-radius);
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s, visibility 0.25s;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
}
#toast.show { opacity: 1; visibility: visible; }

/* ─── RESPONSIVE helper ───────────────────────────── */
.mock-members { display: flex; }
@media (max-width: 900px) { .mock-members { display: none; } }

/* ─── MOBILE BOTTOM NAV ───────────────────────────── */
#mobile-nav {
  display: none;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--ed-surface);
  border-top: 1px solid var(--ed-border);
  flex-shrink: 0;
  z-index: 200;
}
#mobile-nav-inner {
  display: flex;
  height: 56px;
}
.mnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--ed-muted);
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: color 0.15s;
  padding: 0;
  position: relative;
}
.mnav-btn:hover:not(.active) { color: var(--theme-hover); }
.mnav-btn.active { color: var(--theme-main); }
.mnav-btn.active::after {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--theme-main);
  border-radius: 0 0 3px 3px;
}
.mnav-icon {
  width: 20px; height: 20px;
  display: block;
  fill: currentColor;
}

@media (max-width: 680px) {
  html, body { overflow: hidden; }

  /* Topbar: compact, no wrapping */
  #topbar {
    height: 50px;
    padding: 0 12px;
    gap: 8px;
    overflow: hidden;
  }
  /* Hide all topbar extras on mobile — they move to settings sheet or are redundant */
  .topbar-divider,
  .preset-area label,
  .platform-tabs,
  .discord-theme-area,
  .topbar-right { display: none !important; }

  /* Show just logo + mobile export btn */
  .logo-badge { display: none; }
  .logo-name { font-size: 14px; }
  #mobile-export-btn { display: flex !important; }

  /* Preset select stays visible, styled inline */
  .preset-area {
    margin-left: auto;
    gap: 0;
  }
  #preset-select {
    font-size: 12px;
    padding: 5px 8px;
    min-width: 0;
    max-width: 150px;
  }

  /* Layout: stacked, body fills remaining height */
  #body { position: relative; overflow: hidden; }

  /* Sidebar: full width, shown/hidden via mobile tab */
  #sidebar {
    position: absolute;
    inset: 0;
    width: 100%;
    border-right: none;
    z-index: 10;
    transform: translateX(0);
    transition: transform 0.25s ease;
  }
  #sidebar.mobile-hidden { transform: translateX(-100%); }

  /* Preview: full width, shown/hidden */
  #preview-area {
    position: absolute;
    inset: 0;
    z-index: 10;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }
  #preview-area.mobile-visible { transform: translateX(0); }

  /* Mobile CSS output pane */
  #css-pane { padding: 12px; }
  #css-output { font-size: 11px; white-space: pre-wrap; word-break: break-all; }

  /* Preview tabs bar on mobile — hide it, bottom nav handles this */
  .preview-tabs-bar { display: none; }

  /* Mock: smaller, full width */
  #mock-wrap { padding: 12px; align-items: flex-start; }
  #discord-mock {
    max-width: 100%;
    max-height: none;
    height: 380px;
    border-radius: 8px;
  }
  .mock-channels { width: 160px; }
  .mock-servers { width: 52px; }
  .mock-server-icon { width: 36px; height: 36px; font-size: 11px; }

  /* Controls: larger touch targets */
  .hex-input, .text-input, .select-input { height: 38px; font-size: 13px; }
  .color-swatch-wrap { width: 38px; height: 38px; }
  .section-header { padding: 14px 16px; font-size: 12px; }

  /* Mobile nav visible */
  #mobile-nav { display: flex; flex-direction: column; }

  /* Mobile settings sheet */
  #mobile-settings {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }
  #mobile-settings.open {
    opacity: 1;
    pointer-events: all;
  }
  #mobile-settings-sheet {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: var(--ed-surface);
    border-radius: 16px 16px 0 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
  }
  #mobile-settings.open #mobile-settings-sheet { transform: translateY(0); }
  .settings-sheet-handle {
    width: 36px; height: 4px;
    background: var(--ed-border-strong);
    border-radius: 2px;
    margin: 0 auto 4px;
  }
  .settings-sheet-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
  }
  .settings-sheet-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .settings-sheet-row label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ed-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .settings-sheet-row select {
    background: var(--ed-control);
    border: 1px solid var(--ed-border-strong);
    color: var(--ed-text);
    border-radius: var(--ed-radius-sm);
    padding: 10px 12px;
    font-size: 14px;
    font-family: 'Manrope', sans-serif;
    width: 100%;
    outline: none;
  }
  .settings-sheet-btns {
    display: flex;
    gap: 10px;
  }
  .settings-sheet-btns .btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    border-radius: var(--ed-radius);
  }
  #mobile-export-btn {
    margin-left: auto;
    align-items: center;
    gap: 6px;
  }
}
