/* ═══════════════════════════════════════════════════════════════
   LEarn2arn Community — Theme Variables (edit here!)
   Switch active theme via data-theme on <html>: windows (Light) | macos (Soft Blue) | linux (Dark)
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 16px;
  --sidebar-w: clamp(280px, 28vw, 380px);
  --mid-w: 0px;
  --titlebar-h: 88px;
  --toolbar-h: 96px;
  --emoji-size: 34px;
}

/* ── Windows 11 Fluent ── */
[data-theme="windows"] {
  --font: "Segoe UI", "Segoe UI Variable", Tahoma, system-ui, sans-serif;
  --font-mono: "Cascadia Code", Consolas, "Courier New", monospace;
  --bg: #f3f3f3;
  --bg-elevated: #ffffff;
  --bg-sidebar: #f9f9f9;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-active: #cce8ff;
  --bg-selected: #cce8ff;
  --border: #e5e5e5;
  --border-strong: #d1d1d1;
  --text: #1a1a1a;
  --text-secondary: #5c5c5c;
  --text-muted: #8a8a8a;
  --accent: #0067c0;
  --accent-soft: #e8f2fc;
  --accent-text: #0067c0;
  --titlebar-bg: #ffffff;
  --titlebar-btn: #1a1a1a;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.1);
  --window-radius: 16px;
  --item-radius: 8px;
  --chrome-blur: none;
  --scrollbar: #c1c1c1;
  --scrollbar-hover: #a8a8a8;
}

/* ── macOS Soft Blue (#D5E5F5) ── */
[data-theme="macos"] {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, monospace;
  --bg: #D5E5F5;
  --bg-elevated: rgba(232, 241, 250, 0.88);
  --bg-sidebar: rgba(196, 216, 235, 0.82);
  --bg-hover: rgba(90, 145, 195, 0.12);
  --bg-active: rgba(74, 144, 200, 0.22);
  --bg-selected: #A8C8E8;
  --border: #B8CDE0;
  --border-strong: #A0B8D0;
  --text: #1E2A3A;
  --text-secondary: #3D5068;
  --text-muted: #6B8299;
  --accent: #4A90C8;
  --accent-soft: rgba(74, 144, 200, 0.18);
  --accent-text: #2E6A9A;
  --titlebar-bg: rgba(232, 241, 250, 0.78);
  --titlebar-btn: #1E2A3A;
  --shadow: 0 8px 28px rgba(40, 80, 120, 0.12), 0 0 0 0.5px rgba(160, 184, 208, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  --window-radius: 24px;
  --item-radius: 12px;
  --chrome-blur: blur(28px) saturate(140%);
  --scrollbar: #A0B8D0;
  --scrollbar-hover: #4A90C8;
}

[data-theme="macos"] html,
[data-theme="macos"] body {
  background: linear-gradient(155deg, #E4EFF8 0%, #D5E5F5 42%, #C8DCEF 100%);
}

[data-theme="macos"] ::selection {
  background: rgba(74, 144, 200, 0.28);
  color: #1E2A3A;
}

[data-theme="macos"] .toolbar,
[data-theme="macos"] .content-toolbar,
[data-theme="macos"] .status-bar {
  background: rgba(232, 241, 250, 0.78);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}

[data-theme="macos"] .theme-switcher {
  background: rgba(184, 205, 224, 0.35);
  border-color: #B8CDE0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

[data-theme="macos"] .theme-btn.active {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 8px rgba(40, 80, 120, 0.1);
}

[data-theme="macos"] .path-bar,
[data-theme="macos"] .search-box {
  background: rgba(255, 255, 255, 0.55);
  border-color: #B8CDE0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

[data-theme="macos"] .path-bar:focus-within,
[data-theme="macos"] .search-box:focus-within {
  border-color: rgba(74, 144, 200, 0.7);
  box-shadow: 0 0 0 4px rgba(74, 144, 200, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

[data-theme="macos"] .card,
[data-theme="macos"] .bip39-word,
[data-theme="macos"] .seed-ui-shell,
[data-theme="macos"] .gallery-item {
  background: rgba(255, 255, 255, 0.62);
  border-color: #B8CDE0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 4px 16px rgba(40, 80, 120, 0.08);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

[data-theme="macos"] .card:hover {
  border-color: #A0B8D0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 24px rgba(40, 80, 120, 0.12), 0 0 0 1px rgba(74, 144, 200, 0.18);
}

[data-theme="macos"] .nav-item.active {
  background: var(--bg-selected);
  color: #1E2A3A;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 10px rgba(74, 144, 200, 0.18);
}

[data-theme="macos"] .nav-item.active .nav-label,
[data-theme="macos"] .nav-item.active .nav-count {
  color: rgba(30, 42, 58, 0.72);
}

[data-theme="macos"] .nav-item:hover,
[data-theme="macos"] .accordion-header:hover {
  background: rgba(90, 145, 195, 0.14);
}

[data-theme="macos"] .bip39-filter-btn {
  background: rgba(255, 255, 255, 0.55);
  border-color: #B8CDE0;
}

[data-theme="macos"] .bip39-filter-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(74, 144, 200, 0.28);
}

[data-theme="macos"] .content-iframe {
  background: #D5E5F5;
}

/* ── Linux Dark ── */
[data-theme="linux"] {
  --font: "Cantarell", "Ubuntu", "Noto Sans", "DejaVu Sans", system-ui, sans-serif;
  --font-mono: "Source Code Pro", "Ubuntu Mono", "DejaVu Sans Mono", monospace;
  --bg: #1e1e1e;
  --bg-elevated: #252526;
  --bg-sidebar: #252526;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-active: rgba(99, 102, 241, 0.22);
  --bg-selected: #6366f1;
  --border: #3c3c3c;
  --border-strong: #505050;
  --text: #e4e4e4;
  --text-secondary: #a0a0a0;
  --text-muted: #808080;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.22);
  --accent-text: #a5b4fc;
  --titlebar-bg: #2d2d2d;
  --titlebar-btn: #e4e4e4;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 16px 48px rgba(0, 0, 0, 0.35);
  --window-radius: 24px;
  --item-radius: 16px;
  --chrome-blur: none;
  --scrollbar: #555555;
  --scrollbar-hover: #777777;
}

[data-theme="linux"] ::selection {
  background: rgba(99, 102, 241, 0.4);
  color: #fff;
}

[data-theme="linux"] .path-bar,
[data-theme="linux"] .search-box,
[data-theme="linux"] .theme-switcher {
  background: #2a2a2a;
}

[data-theme="linux"] .path-bar:focus-within,
[data-theme="linux"] .search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

[data-theme="linux"] .theme-btn.active {
  background: #3a3a3a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

[data-theme="linux"] .dot:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

[data-theme="linux"] .nav-item.active {
  background: var(--bg-selected);
  color: #fff;
}

[data-theme="linux"] .nav-item.active .nav-label,
[data-theme="linux"] .nav-item.active .nav-count {
  color: rgba(255, 255, 255, 0.82);
}

[data-theme="linux"] .accordion-header:hover {
  background: var(--bg-hover);
}

[data-theme="linux"] .seed-ui-shell select,
[data-theme="linux"] .seed-ui-shell input {
  background: #2a2a2a;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="linux"] .content-iframe {
  background: #1e1e1e;
}

/* ═══════════════════════════════════════════════════════════════
   Layout & Components (2× scaled from inspiration)
   ═══════════════════════════════════════════════════════════════ */

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.stage {
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: block;
  padding: 0;
  animation: fadeIn 0.35s var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.window {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  transition: background 0.35s var(--ease);
}

/* Title bar */
.titlebar {
  height: var(--titlebar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: var(--titlebar-bg);
  backdrop-filter: var(--chrome-blur);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  user-select: none;
}

.traffic {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100px;
}

[data-theme="windows"] .traffic { order: 3; justify-content: flex-end; width: auto; gap: 0; }
[data-theme="windows"] .title-center { order: 2; flex: 1; }
[data-theme="windows"] .theme-switcher { order: 1; margin-left: auto; }
[data-theme="windows"] .btn-menu { order: 0; }

.dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  cursor: default;
  transition: transform 0.15s var(--ease), filter 0.15s;
}
.dot:hover { transform: scale(1.08); filter: brightness(1.05); }

[data-theme="windows"] .dot {
  width: 72px;
  height: 56px;
  border-radius: 0;
  background: transparent;
  color: var(--titlebar-btn);
  font-size: 20px;
  display: grid;
  place-items: center;
}
[data-theme="windows"] .dot:hover { background: var(--bg-hover); transform: none; }
[data-theme="windows"] .dot.close:hover { background: #c42b1c; color: #fff; }

[data-theme="macos"] .dot.close { background: #ff5f57; }
[data-theme="macos"] .dot.minimize { background: #febc2e; }
[data-theme="macos"] .dot.maximize { background: #28c840; }

[data-theme="linux"] .traffic { gap: 12px; }
[data-theme="linux"] .dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
}
[data-theme="linux"] .dot:hover { background: var(--bg-hover); }

.title-center {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 26px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.traffic { display: none; }

.title-emoji { font-size: 32px; line-height: 1; }

.theme-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-hover);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.theme-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 22px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.theme-btn:hover { color: var(--text); }
.theme-btn.active {
  background: var(--bg-elevated);
  color: var(--accent-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Toolbar */
.toolbar {
  height: var(--toolbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.nav-btns { display: flex; gap: 4px; }

.icon-btn {
  width: 64px;
  height: 64px;
  border: none;
  background: transparent;
  border-radius: var(--item-radius);
  color: var(--text-secondary);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 28px;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text);
}
.icon-btn:disabled { opacity: 0.35; cursor: default; }

.path-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height:60px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: calc(var(--item-radius) - 2px);
  font-size: 18px;
  color: var(--text-secondary);
  overflow: hidden;
  white-space: nowrap;
}
.path-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.path-seg {
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.path-sep {
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 180px;
  height: 60px;
  padding: 0 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--item-radius);
  transition: border-color 0.2s, box-shadow 0.2s, width 0.25s var(--ease);
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  width: 100%;
  max-width: 180px;
}
.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font);
  font-size: 25px;
  color: var(--text);
  min-width: 0;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-icon { flex-shrink: 0; font-size: 26px; }

/* ── Mobile layout (default: below desktop) ── */
.body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.btn-menu { display: grid; }
.btn-preview-back { display: none; }

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(400px, 82vw);
  z-index: 40;
  transform: translateX(-105%);
  transition: transform 0.28s var(--ease);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.18);
  background: var(--bg-sidebar);
  backdrop-filter: var(--chrome-blur);
  border-right: 1px solid var(--border);
  padding: 24px 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.body.sidebar-open .sidebar { transform: translateX(0); }

.sidebar-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}

.body.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.nav-brand-emoji {
  font-size: 36px;
  line-height: 1;
}

.nav-brand-label {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.accordion {
  margin-bottom: 6px;
}

.accordion-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--item-radius);
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.accordion-header:hover { background: var(--bg-hover); }

.accordion-chevron {
  width: 1.1em;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.accordion-panel {
  padding: 4px 0 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.accordion-panel[hidden] {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--item-radius);
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s, transform 0.15s var(--ease);
}
.nav-item:hover { background: var(--bg-hover); }
.nav-item.active { background: var(--bg-active); color: var(--accent-text); }
.nav-item:active { transform: scale(0.98); }

.nav-icon {
  width: var(--emoji-size);
  height: var(--emoji-size);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: calc(var(--emoji-size) - 4px);
  line-height: 1;
}

.nav-label { flex: 1; min-width: 0; }
.nav-count { font-size: 18px; color: var(--text-muted); font-weight: 500; }

/* Content pane — hidden on mobile until an item is opened */
.content-pane {
  background: var(--bg);
  display: none;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.body.has-preview .sidebar { display: none; }
.body.has-preview .content-pane { display: flex; }
.body.has-preview .btn-preview-back { display: grid; }

/* Burger menu must show the drawer even while content preview is active */
.body.has-preview.sidebar-open .sidebar {
  display: flex;
  transform: translateX(0);
}
.body.has-preview.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-shrink: 0;
  min-height: 85px;
}

.content-title {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.content-title h2 {
  font-size: 28px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.content-badge {
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-text);
  flex-shrink: 0;
}

.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  animation: contentFade 0.28s var(--ease);
}

.content-body.content-body--embed {
  padding: 0;
  overflow: hidden;
}

.content-iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: none;
  display: block;
  background: #fff;
}

@keyframes contentFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 24px;
  color: var(--text-muted);
  text-align: center;
  min-height: 320px;
}
.preview-placeholder .big-emoji { font-size: 96px; opacity: 0.35; }
.preview-placeholder h3 { font-size: 32px; font-weight: 600; color: var(--text-secondary); }
.preview-placeholder p { font-size: 26px; max-width: 480px; line-height: 1.5; }

/* Page content styles */
.page-hero {
  margin-bottom: 32px;
}
.page-hero h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.page-hero p {
  font-size: 26px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 720px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.card {
  padding: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card-emoji { font-size: 48px; margin-bottom: 16px; }
.card h3 { font-size: 28px; margin-bottom: 12px; }
.card p { font-size: 24px; color: var(--text-secondary); line-height: 1.5; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 64px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.gallery-item span {
  font-size: 24px;
  margin-top: 12px;
  color: var(--text-secondary);
}

/* BIP39 */
.bip39-panel { max-width: 100%; }
.bip39-intro {
  font-size: 24px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}
.bip39-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.bip39-filter-btn {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font);
  font-size: 22px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--item-radius);
  cursor: pointer;
  transition: all 0.15s;
  min-width: 52px;
}
.bip39-filter-btn:hover { background: var(--bg-hover); }
.bip39-filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.bip39-search {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  margin: -8px 0 28px;
  max-width: none;
}
.bip39-search-input {
  flex: 1;
  min-width: 180px;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--item-radius);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--font);
  font-size: 22px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bip39-search-input::placeholder { color: var(--text-muted); }
.bip39-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.bip39-search-btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 22px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--item-radius);
  cursor: pointer;
  transition: filter 0.15s, transform 0.12s;
  white-space: nowrap;
}
.bip39-search-btn:hover { filter: brightness(1.06); }
.bip39-search-btn:active { transform: scale(0.98); }
.bip39-search-btn { width: 100%; }
.bip39-status {
  font-size: 22px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.bip39-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.bip39-word {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--item-radius);
  font-size: 22px;
}
.bip39-num {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--text-muted);
  min-width: 48px;
  text-align: right;
  flex-shrink: 0;
}
.bip39-text { font-weight: 500; }

/* Seed generator placeholder */
.seed-placeholder {
  text-align: center;
  padding: 48px 24px;
}
.seed-placeholder .big-emoji { font-size: 96px; margin-bottom: 24px; }
.seed-placeholder h3 { font-size: 32px; margin-bottom: 16px; }
.seed-placeholder p { font-size: 26px; color: var(--text-secondary); max-width: 520px; margin: 0 auto 32px; line-height: 1.6; }
.seed-ui-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.seed-ui-shell label {
  display: block;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: left;
}
.seed-ui-shell select,
.seed-ui-shell input {
  width: 100%;
  padding: 16px 20px;
  font-size: 24px;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: var(--item-radius);
  margin-bottom: 20px;
  background: var(--bg);
  color: var(--text);
}
.seed-btn {
  width: 100%;
  padding: 18px;
  font-size: 26px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: var(--item-radius);
  background: var(--accent);
  color: #fff;
  cursor: not-allowed;
  opacity: 0.6;
}

.status-bar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  font-size: 23px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar::-webkit-scrollbar,
.content-body::-webkit-scrollbar { width: 16px; }
.sidebar::-webkit-scrollbar-thumb,
.content-body::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border-radius: 8px;
  border: 4px solid transparent;
  background-clip: padding-box;
}

/* ── Desktop layout (1024px and above) ── */
@media (min-width: 1024px) {
  :root {
    --titlebar-h: 80px;
    --toolbar-h: 88px;
  }

  .body {
    grid-template-columns: var(--sidebar-w) 1fr;
    position: static;
  }

  .btn-menu { display: none; }
  .btn-preview-back { display: none; }

  .sidebar {
    position: static;
    width: auto;
    z-index: auto;
    transform: none;
    box-shadow: none;
    padding: 20px 16px;
  }

  .body.sidebar-open .sidebar { transform: none; }

  .sidebar-backdrop {
    display: none !important;
    opacity: 0;
    pointer-events: none;
  }

  .content-pane { display: flex; }

  .body.has-preview .sidebar { display: flex; }

  .title-center { display: flex; }
  .traffic { display: flex; }

  .bip39-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .bip39-search { max-width: 640px; }
  .bip39-search-btn { width: auto; }

  .search-box {
    width: 280px;
    max-width: none;
  }
  .search-box:focus-within {
    width: 340px;
    max-width: none;
  }

  [data-theme="windows"] .theme-switcher { margin-left: 0; }

  .content-body { padding: 40px 48px; }

  .status-bar {
    font-size: 23px;
    padding: 0 28px;
  }
}
