/* =========================================
   base.css — Design tokens, resets, layout, navigation
   ========================================= */

:root {
  --bg-color: #fdfbf7;
  --element-bg: #f5efe6;
  --element-hover: #ebe0d0;
  --text-primary: #2c2420;
  --text-secondary: #5d544f;
  --text-muted: #9ca3af;
  --text-highlight: #78350f;
  --border-color: rgba(0, 0, 0, 0.06);
  --modal-bg-glass: rgba(255, 255, 255, 0.92);
  --modal-text-main: #1a1a1a;
  --modal-text-sub: #8e8e93;
  --p-grad: linear-gradient(135deg, #ff5f6d 0%, #ffc371 100%);
  --e-grad: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
  --n-grad: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
  --brand-glow: linear-gradient(135deg, #00d2ff 0%, #92fe9d 100%);
  --premium-grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --ion-anim-play-state: running;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  height: 100vh;
  width: 100vw;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  margin: 0;
}

/* Periodic table page: centered when fits, scrollable with preserved gutters */

/* Screen-reader-only utility (SEO / accessibility) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.blank-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-color);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding-top: 60px;
}

.blank-page.active {
  display: flex;
}

.blank-page-content {
  width: 100%;
  height: 100%;
  padding: 40px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}

/* Main container - full viewport, single layout mode */
#main-container {
  height: 100vh;
  min-width: 1280px;
  padding: 80px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* Start from top to prevent clipping, centering handled by JS/Padding */
  overflow: hidden;
  box-sizing: border-box;
}

/* Fix Worksheet Page Padding */
.worksheet-generator-page {
  padding-top: 40px;
}

/* =========================================
   Global Fixed Navigation Pill
   ========================================= */
.global-nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  /* no max-width — stretch full width */
  height: 56px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 0 20px;
  transition:
    height 0.3s ease,
    padding 0.3s ease,
    top 0.3s ease,
    border-radius 0.3s ease;
}


/* =========================================
   窗口变矮时 - 缩小元素内容
   ========================================= */
@media (max-height: 700px) {

  /* Ion 页面 - spacing now on .ions-container */
  .ions-container {
    padding-top: 70px;
  }

  .ion-element .name {
    display: none !important;
  }
}



@media (max-height: 500px) {
  .ion-element {
    min-height: 35px;
  }
}

/* 左侧品牌区 */
.nav-brand-section {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

/* Logo */
.nav-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease;
}

.nav-logo-link:hover .nav-logo {
  transform: scale(1.1) rotate(-5deg);
}

.nav-brand {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1d1d1f;
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-brand:hover {
  opacity: 0.7;
}

/* 中间区域：版本 + 导航胶囊 */
.nav-center-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.global-nav-pill {
  display: flex;
  justify-content: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: 22px;
  flex-shrink: 0;
  position: relative;
}

/* Sliding pill indicator */
.nav-pill-slider {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 0;
  pointer-events: none;
}

.nav-pill-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 18px;
  background: transparent;
  color: #444;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s ease;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.nav-pill-btn:hover:not(.active) {
  color: #000;
}

.nav-pill-btn.active {
  color: #1d1d1f;
}

/* =========================================
   右侧区域：建议输入框 + GitHub
   ========================================= */
.nav-right-section {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

/* GitHub Icon Link */
.nav-github-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d1d1f;
  opacity: 0.5;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.nav-github-link:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Suggestion Box Container */
.suggestion-box {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 22px;
  padding: 4px 4px 4px 16px;
  gap: 6px;
  transition:
    width 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid transparent;
  position: relative;
  width: 140px;
  min-width: 140px;
  overflow: hidden;
}

.suggestion-box:focus-within {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Suggestion Input */
.suggestion-input {
  border: none;
  background: transparent;
  outline: none;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #1d1d1f;
  width: 100%;
  min-width: 80px;
  padding: 6px 0;
  letter-spacing: -0.01em;
}

.suggestion-input::placeholder {
  color: rgba(0, 0, 0, 0.22);
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0;
}

/* Send Button */
.suggestion-send-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  border: none;
  background: #1d1d1f;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
  flex-shrink: 0;
}

.suggestion-send-btn.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.suggestion-send-btn.sent {
  background: #16a34a;
  opacity: 1;
  transform: scale(1);
  pointer-events: none;
}

.suggestion-send-btn:hover {
  background: #333;
  transform: scale(1.1);
}

.suggestion-send-btn:active {
  transform: scale(0.9);
}

.suggestion-send-btn svg {
  width: 14px;
  height: 14px;
}

.suggestion-send-btn .icon-send,
.suggestion-send-btn .icon-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navigation Hiding Logic */
body.hide-nav .global-nav {
  transform: translate(-50%, -150%) !important;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.hide-nav .floating-about-btn {
  transform: translateY(150%) !important;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================\n   Copyright Notice - Bottom Left\n   ======================================== */
.copyright-notice {
  position: fixed;
  bottom: 16px;
  left: 24px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0.45;
  z-index: 9998;
  pointer-events: none;
  user-select: none;
  letter-spacing: 0.02em;
  transition: opacity 0.3s ease;
}

/* Hide copyright when modals are active */
body.hide-nav .copyright-notice {
  opacity: 0;
}

/* =========================================
   Version Dropdown (Nav-integrated, Left of Pill)
   ========================================= */
.version-dropdown {
  position: relative;
  flex-shrink: 0;
}

.version-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px 7px 13px;
  border: none;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.04);
  color: #555;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: -0.01em;
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.04);
}

.version-dropdown-toggle:hover {
  color: #1d1d1f;
  background: rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.version-dropdown-toggle:active {
  transform: scale(0.96);
  background: rgba(0, 0, 0, 0.09);
}

.version-chevron {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0.45;
  margin-top: 1px;
}

.version-dropdown.open .version-chevron {
  transform: rotate(180deg);
  opacity: 0.7;
}

.version-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px) scale(0.92);
  min-width: calc(100% + 16px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.06),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.8);
  padding: 4px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    visibility 0.2s;
  z-index: 10001;
}

.version-dropdown.open .version-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.version-dropdown-option {
  display: block;
  width: 100%;
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #bbb;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: default;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-align: center;
  font-family: inherit;
  letter-spacing: -0.01em;
}

.version-dropdown-option:hover {
  background: rgba(0, 0, 0, 0.03);
  color: #aaa;
}

.version-dropdown-option:active {
  background: rgba(0, 0, 0, 0.10);
}

/* =========================================
   Table Version-Switch Transition
   ========================================= */
.periodic-table.version-switching-out {
  animation: versionFadeOut 0.3s ease forwards;
}

.periodic-table.version-switching-in {
  animation: versionFadeIn 0.35s ease forwards;
}

@keyframes versionFadeOut {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }

  100% {
    opacity: 0;
    transform: scale(0.98);
    filter: blur(4px);
  }
}

@keyframes versionFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.98);
    filter: blur(4px);
  }

  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

body.hide-nav .version-dropdown {
  display: none;
}

/* =========================================
   Desktop Only Block (Mobile Fallback)
   ========================================= */
.desktop-only-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-color);
  z-index: 999999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.desktop-only-content {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 3rem 2.5rem;
  border-radius: 24px;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.desktop-only-icon {
  width: 64px;
  height: 64px;
  color: #1d1d1f;
  margin-bottom: 1.5rem;
  opacity: 0.85;
}

.desktop-only-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.desktop-only-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.desktop-only-btn {
  background: #1d1d1f;
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.desktop-only-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.desktop-only-btn:active {
  transform: scale(0.95);
}

/* =========================================
   Responsive Navigation — Progressive Hiding (JS-controlled)
   ========================================= */
.nav-hide-brand .nav-brand {
  display: none !important;
}

/* =========================================
   Worksheet Preview Header — Responsive Wrap
   ========================================= */
@media (max-width: 1100px) {
  .preview-header {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .preview-tabs,
  .export-buttons {
    justify-content: center;
  }
}

/* =========================================
   Settings Page — Premium 3-column layout
   ========================================= */

/* Full-viewport wrapper — NO scroll */
.settings-viewport {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 32px;
  padding: 32px 48px 28px;
  box-sizing: border-box;
  overflow: hidden;
  align-content: start;
}

/* ── Left sidebar ── */
.sv-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Card-style link items */
.sv-quick-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sv-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.03),
    0 4px 16px rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
  text-align: left;
}

.sv-link-card:hover {
  background: rgba(255, 255, 255, 0.75);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.sv-link-card:active {
  transform: scale(0.98) translateY(0);
}

.sv-link-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
  opacity: 0.75;
}

.sv-icon-warm {
  background: rgba(255, 140, 50, 0.1);
  color: #d97706;
}

.sv-icon-blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.sv-link-card-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sv-link-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.sv-link-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.sv-link-arrow {
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
  color: var(--text-muted);
}

.sv-link-card:hover .sv-link-arrow {
  opacity: 0.45;
  transform: translateX(2px);
}

/* ── Center main area ── */
.sv-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 540px;
  width: 100%;
  justify-self: center;
}

/* Shared card base */
.sv-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.03),
    0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: box-shadow 0.25s ease;
}

.sv-card:hover {
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.09);
}

.sv-card-icon-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sv-card-icon-row h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.sv-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
}

.sv-icon-purple {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

/* Animation controls */
.sv-anim-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sv-anim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sv-anim-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sv-speed-val {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-left: 4px;
}

.sv-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sv-play-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.14);
}

.sv-play-btn:active {
  transform: scale(0.92);
}

/* Range slider */
.sv-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 240px;
  height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.08);
  outline: none;
}

.sv-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1d1d1f;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease;
}

.sv-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.sv-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1d1d1f;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* Suggestion card */
.sv-card-suggest {
  gap: 12px;
}

.sv-suggest-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: -4px 0 0;
}

/* Prompt chips */
.sv-suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sv-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid rgba(0, 0, 0, 0.07);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sv-chip:hover {
  background: rgba(102, 126, 234, 0.08);
  border-color: rgba(102, 126, 234, 0.25);
  color: #667eea;
}

.sv-chip.active {
  background: rgba(102, 126, 234, 0.12);
  border-color: rgba(102, 126, 234, 0.35);
  color: #667eea;
}

.sv-suggest-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.sv-suggest-input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  resize: none;
  overflow-y: auto;
  line-height: 1.5;
  min-height: 42px;
  max-height: 160px;
  transition: all 0.2s ease, height 0.1s ease;
}

.sv-suggest-input:focus {
  border-color: rgba(102, 126, 234, 0.45);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: #fff;
}

.sv-suggest-input::placeholder {
  color: var(--text-muted);
}

.sv-suggest-send {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  border: none;
  background: #1d1d1f;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sv-suggest-send svg {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sv-suggest-send:hover {
  background: #333;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.sv-suggest-send:hover svg {
  transform: translate(1px, -1px);
}

.sv-suggest-send:active {
  transform: scale(0.92);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sv-suggest-send.sent {
  background: #16a34a;
  transform: scale(1.05);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.2);
}

.sv-suggest-send.sent svg {
  transform: scale(1.2);
}

.sv-suggest-status {
  font-size: 0.78rem;
  font-weight: 500;
  min-height: 1em;
  transition: all 0.2s ease;
}

.sv-suggest-status.success {
  color: #16a34a;
}

/* ── Right changelog column — wider ── */
.sv-changelog {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.sv-changelog-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.sv-changelog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding-right: 6px;
  max-height: calc(100vh - 170px);
}

.sv-changelog-list::-webkit-scrollbar {
  width: 3px;
}

.sv-changelog-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
}

.changelog-entry {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.changelog-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.changelog-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.changelog-version {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
  padding: 3px 10px;
  border-radius: 6px;
}

.changelog-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.changelog-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.changelog-items li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  padding-left: 14px;
  position: relative;
}

.changelog-items li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-weight: 700;
}

/* ── Responsive: collapse to single column on narrow screens ── */
@media (max-width: 960px) {
  .settings-viewport {
    grid-template-columns: 1fr;
    padding: 24px;
    overflow-y: auto;
    align-content: unset;
  }

  .sv-sidebar {
    order: 2;
  }

  .sv-main {
    order: 1;
    max-width: 100%;
  }

  .sv-changelog {
    order: 3;
  }

  .sv-changelog-list {
    max-height: 300px;
  }
}

/* =========================================
   Floating About Button (existing style, unchanged)
   ========================================= */