/* ═══════════════════════════════════════════════════════════════
   LEarn2Earn Community — Theme Variables (edit here!)
   Switch active theme via data-theme on <html>: windows (Light) | macos (Golden Gate #C3C3C3) | 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 27 Golden Gate (#C3C3C3) ── */
[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: #C3C3C3;
  --bg-elevated: rgba(236, 236, 236, 0.92);
  --bg-sidebar: rgba(180, 180, 180, 0.88);
  --bg-hover: rgba(0, 0, 0, 0.06);
  --bg-active: rgba(0, 122, 255, 0.18);
  --bg-selected: #A8C4E8;
  --border: #A8A8A8;
  --border-strong: #909090;
  --text: #1C1C1E;
  --text-secondary: #48484A;
  --text-muted: #6E6E73;
  --accent: #007AFF;
  --accent-soft: rgba(0, 122, 255, 0.16);
  --accent-text: #0056B3;
  --titlebar-bg: rgba(214, 214, 214, 0.82);
  --titlebar-btn: #1C1C1E;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --window-radius: 24px;
  --item-radius: 12px;
  --chrome-blur: blur(28px) saturate(140%);
  --scrollbar: #9A9A9A;
  --scrollbar-hover: #707070;
}

[data-theme="macos"] html,
[data-theme="macos"] body {
  background: linear-gradient(155deg, #D6D6D6 0%, #C3C3C3 45%, #B0B0B0 100%);
}

[data-theme="macos"] ::selection {
  background: rgba(0, 122, 255, 0.28);
  color: #1C1C1E;
}

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

[data-theme="macos"] .theme-switcher {
  background: rgba(160, 160, 160, 0.4);
  border-color: #A8A8A8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

[data-theme="macos"] .theme-btn.active {
  background: rgba(242, 242, 242, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

[data-theme="macos"] .path-bar:focus-within,
[data-theme="macos"] .search-box:focus-within {
  border-color: rgba(0, 122, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 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(242, 242, 242, 0.72);
  border-color: #A8A8A8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 4px 16px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

[data-theme="macos"] .card:hover {
  border-color: #909090;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 122, 255, 0.16);
}

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

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

[data-theme="macos"] .nav-item:hover,
[data-theme="macos"] .accordion-header:hover {
  background: rgba(0, 0, 0, 0.08);
}

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

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

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

/* ── 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;
}
.friendly-reminder{
  border-radius: 10px;
  padding: 10px;
  margin: 5px;
  font-size: 21px;
  font-weight: 500;
  color: yellow;
  background-color: darkblue;
}
.serious-warning{
  border-radius: 10px;
  padding: 10px;
  margin: 5px;
  font-size: 21px;
  font-weight: 500;
  color: orange;
  background-color: #3300AA;
}
.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 {
  position: relative;
  z-index: 60;
  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;
  overflow: visible;
}

.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-wrap {
  position: relative;
  width: 100%;
  max-width: 180px;
  flex-shrink: 0;
  z-index: 70;
}
.search-wrap .search-box {
  width: 100%;
  max-width: none;
}
.search-wrap:focus-within,
.search-wrap.is-open {
  max-width: min(420px, 72vw);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  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;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.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; }

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  width: min(420px, 90vw);
  min-width: 100%;
  max-height: min(420px, 55vh);
  overflow-y: auto;
  padding: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 80;
}
.search-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  border-radius: var(--item-radius);
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  cursor: pointer;
}
.search-result:hover,
.search-result.is-active {
  background: var(--bg-hover);
}
.search-result.is-active {
  background: var(--bg-active);
}
.search-result-emoji {
  font-size: 28px;
  line-height: 1.2;
  flex-shrink: 0;
}
.search-result-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.search-result-title {
  font-size: 22px;
  font-weight: 600;
}
.search-result-meta {
  font-size: 16px;
  color: var(--text-muted);
}
.search-result-snippet {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-result mark {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-radius: 3px;
  padding: 0 2px;
}
.search-empty {
  padding: 16px;
  font-size: 20px;
  color: var(--text-muted);
  text-align: center;
}

/* ── 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; }

@media (max-width: 1023px) {
  .path-bar {
    display: none !important;
  }
}

.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-width: 0;
  min-height: 0;
  overflow: hidden;
}

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

/* 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-body {
  flex: 1 1 auto;
  min-height: 0;
  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 {
  width: 100%;
  max-width: none;
  font-size: 26px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Standalone paragraphs in the content pane — full width, not inside cards */
.content-body > p {
  width: 100%;
  max-width: none;
  margin-top: 32px;
  font-size: 24px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Text alignment utilities — add class to any element */
.centered {
  text-align: center;
}
.justified {
  text-align: justify;
  text-justify: inter-word;
}

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

.card {
  padding: 20px;
  margin-bottom: 20px;
  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%; }
.short-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;
}

/* Permutation & Combination Calculator */
.permcomb-panel { max-width: 100%; }
.permcomb-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 8px;
  align-items: start;
}
.permcomb-input {
  max-width: none;
  margin: 0;
}
.permcomb-form label {
  display: block;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: left;
}
.permcomb-form input[type="number"] {
  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);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.permcomb-form input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.permcomb-check-label {
  display: flex !important;
  align-items: center;
  gap: 12px;
  margin: 4px 0 18px;
  font-size: 20px !important;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.permcomb-check-label input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.permcomb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.permcomb-calc-btn {
  flex: 1;
  min-width: 160px;
}
.permcomb-result {
  padding: 0;
  overflow: hidden;
  margin-bottom: 0;
}
.permcomb-result:hover {
  transform: none;
}
.permcomb-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.permcomb-result-header h3 {
  font-size: 26px;
  font-weight: 600;
  margin: 0;
}
.permcomb-copy-btn {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--item-radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.permcomb-copy-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}
.permcomb-result-body {
  padding: 24px 28px 28px;
}
.permcomb-block + .permcomb-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.permcomb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
}
.permcomb-label {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.permcomb-fraction {
  display: inline-grid;
  text-align: center;
  font-size: 22px;
  font-family: var(--font-mono);
  line-height: 1.3;
  color: var(--text-secondary);
}
.permcomb-frac-num,
.permcomb-frac-den {
  padding: 2px 8px;
}
.permcomb-frac-bar {
  height: 2px;
  background: var(--border-strong);
  margin: 2px 0;
}
.permcomb-equals {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-text);
  margin: 12px 0 8px;
}
.permcomb-value {
  font-family: var(--font-mono);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 600;
  color: var(--accent-text);
  line-height: 1.45;
  word-break: break-all;
}
.permcomb-meta {
  display: grid;
  gap: 8px;
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.permcomb-meta strong {
  color: var(--text);
  font-weight: 600;
}
.permcomb-inline-formula {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--text-secondary);
}
.permcomb-note {
  margin: 14px 0 0;
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.permcomb-error {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--item-radius);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 22px;
  border: 1px solid var(--border);
}

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

/* Mobile / small screens: show visit count only */
@media (max-width: 1023px) {
  .status-bar {
    justify-content: center;
    padding: 0 16px;
    font-size: 20px;
  }
  #statusLeft,
  #statusRight {
    display: none;
  }
  #statusVisits {
    flex: none;
    width: 100%;
    text-align: center;
  }
}

.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 {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    position: static;
  }

  .btn-menu { display: none; }

  .path-bar {
    display: flex;
  }

  .sidebar {
    position: static;
    grid-column: 1;
    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 !important;
    grid-column: 2;
    min-width: 0;
    min-height: 0;
    height: 100%;
  }

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

  .body.has-preview .content-pane {
    display: flex !important;
  }

  .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; }

  .permcomb-layout {
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 32px;
  }

  .search-wrap {
    max-width: 280px;
  }
  .search-wrap:focus-within,
  .search-wrap.is-open {
    max-width: 420px;
  }

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

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

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