:root {
  
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-sunken: #f1f5f9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-strong: #cbd5e1;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --accent-color: #0284c7;
  --accent-hover: #0369a1;
  --accent-subtle: #e0f2fe;
  
  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --color-warning: #d97706;
  --color-warning-bg: #fffbeb;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  
  --meter-track: #e2e8f0;
  --meter-needle: #0f172a;
  --meter-active: #10b981;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --header-height: 64px;
}

[data-theme="dark"] {
  
  --bg-primary: #0b0f17;
  --bg-surface: #141b27;
  --bg-surface-elevated: #1a2332;
  --bg-surface-sunken: #080c13;
  --bg-card: #141b27;
  --border-color: #222d42;
  --border-subtle: #192233;
  --border-strong: #33435c;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0b0f17;
  
  --accent-color: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-subtle: #0c2d48;
  
  --color-success: #34d399;
  --color-success-bg: #064e3b;
  --color-warning: #fbbf24;
  --color-warning-bg: #451a03;
  --color-danger: #f87171;
  --color-danger-bg: #450a0a;
  
  --meter-track: #1e293b;
  --meter-needle: #f8fafc;
  --meter-active: #34d399;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.site-header {
  position: relative;
  z-index: 1000;
  background-color: #f59e0b; 
  border-bottom: 1px solid #d97706;
  height: var(--header-height);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.site-header .site-brand {
  color: #0f172a;
}

.site-header .brand-symbol {
  background-color: #1e293b;
  border-color: #0f172a;
  color: #f59e0b;
}

.site-header .brand-badge {
  background-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.22);
}

.site-header .nav-link {
  color: #0f172a;
  font-weight: 700;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: #000000;
  background-color: rgba(0, 0, 0, 0.1);
}

.site-header .theme-toggle-btn {
  background-color: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
  color: #0f172a;
}

.site-header .theme-toggle-btn:hover {
  background-color: rgba(0, 0, 0, 0.16);
  color: #000000;
}

.site-header .hamburger-line {
  background-color: #0f172a;
}

[data-theme="dark"] .site-header {
  background-color: #b45309; 
  border-bottom: 1px solid #78350f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .site-header .site-brand {
  color: #fffbeb;
}

[data-theme="dark"] .site-header .brand-symbol {
  background-color: #78350f;
  border-color: #92400e;
  color: #fbbf24;
}

[data-theme="dark"] .site-header .brand-badge {
  background-color: rgba(0, 0, 0, 0.25);
  color: #fde68a;
  border-color: rgba(253, 230, 138, 0.3);
}

[data-theme="dark"] .site-header .nav-link {
  color: #fef3c7;
}

[data-theme="dark"] .site-header .nav-link:hover,
[data-theme="dark"] .site-header .nav-link.active {
  color: #ffffff;
  background-color: rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .site-header .theme-toggle-btn {
  background-color: rgba(0, 0, 0, 0.2);
  border-color: rgba(254, 243, 199, 0.25);
  color: #fef3c7;
}

[data-theme="dark"] .site-header .theme-toggle-btn:hover {
  background-color: rgba(0, 0, 0, 0.35);
  color: #ffffff;
}

[data-theme="dark"] .site-header .hamburger-line {
  background-color: #fef3c7;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-sunken);
  border: 1px solid var(--border-strong);
  color: var(--accent-color);
}

.brand-title {

  font-weight: 800;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  background-color: var(--bg-surface-sunken);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.desktop-nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-menu {
  display: flex;
  list-style: none;
  height: 100%;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background-color: var(--bg-surface-sunken);
}

.dropdown-toggle {
  background: none;
  border: none;
}

.chevron-icon {
  transition: transform 0.2s ease;
}

.has-dropdown:hover .chevron-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% - 4px);
  left: 0;
  min-width: 280px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1010;
}

.dropdown-grid {
  min-width: 500px;
  max-width: min(560px, calc(100vw - 2rem));
  right: 0;
  left: auto; 
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
}

.has-dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.has-dropdown:hover .dropdown-grid {
  display: grid;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover, .dropdown-item.active {
  background-color: var(--bg-surface-sunken);
}

.dropdown-item.active {
  border-left: 3px solid #F59E0B;
}

.nav-svg-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-sunken);
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 2px;
}

.dropdown-item:hover .nav-svg-icon {
  color: var(--accent-color);
}

.item-info {
  display: flex;
  flex-direction: column;
}

.item-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-sunken);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.sun-icon {
  display: block;
}

.moon-icon {
  display: none;
}

[data-theme="dark"] .sun-icon {
  display: none;
}

[data-theme="dark"] .moon-icon {
  display: block;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background-color: #E2920A;
    border: 1px solid #b3770f;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.2s ease;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background-color: var(--bg-surface-elevated);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.mobile-drawer-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.mobile-drawer-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-group-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--text-primary);
  background-color: var(--bg-surface-sunken);
}

.mobile-link-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-color);
}

.main-wrapper {
  flex: 1;
  width: 100%;
}

.tool-page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

body.page-inst-piano .tool-page-container,
body.page-inst-guitar .tool-page-container,
body.page-inst-violin .tool-page-container,
body.page-inst-xylophone .tool-page-container,
body.page-inst-drums .tool-page-container {
  max-width: 100%;
  width: 100%;
  padding: 1.5rem 0.75rem 4rem;
  box-sizing: border-box;
}

body.page-inst-piano .workbench-card,
body.page-inst-guitar .workbench-card,
body.page-inst-violin .workbench-card,
body.page-inst-xylophone .workbench-card,
body.page-inst-drums .workbench-card {
  max-width: 100%;
  width: 100%;
  padding: 1.5rem 0.5rem;
  box-sizing: border-box;
}

body.page-inst-piano .workbench-header,
body.page-inst-guitar .workbench-header,
body.page-inst-violin .workbench-header,
body.page-inst-xylophone .workbench-header,
body.page-inst-drums .workbench-header,
body.page-inst-piano .piano-controls-bar,
body.page-inst-piano .tool-hero,
body.page-inst-guitar .tool-hero,
body.page-inst-violin .tool-hero,
body.page-inst-xylophone .tool-hero,
body.page-inst-drums .tool-hero {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

body.page-inst-piano .guide-article,
body.page-inst-guitar .guide-article,
body.page-inst-violin .guide-article,
body.page-inst-xylophone .guide-article,
body.page-inst-drums .guide-article {
  max-width: 960px;
  margin: 3rem auto 2rem;
}

.tool-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.tool-badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-sunken);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.tool-hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.tool-hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
}

.workbench-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 3rem;
  position: relative;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.workbench-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.workbench-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.led-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.led-indicator.live {
  background-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.led-indicator.warning {
  background-color: var(--color-warning);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--accent-color);
  color: var(--text-inverse);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--bg-surface-sunken);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background-color: var(--border-subtle);
  border-color: var(--border-strong);
}

.btn-pill {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
}

.control-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.control-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.studio-select, .studio-input {
  background-color: var(--bg-surface-sunken);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.studio-select:focus, .studio-input:focus {
  border-color: var(--accent-color);
}

.guide-article {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-top: 3rem;
  box-shadow: var(--shadow-sm);
}

.guide-article h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.guide-article h2:first-of-type {
  margin-top: 0;
}

.guide-article h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.guide-article p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.15rem;
  line-height: 1.7;
}

.guide-article ul, .guide-article ol {
  color: var(--text-secondary);
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.guide-article li {
  margin-bottom: 0.4rem;
}

.luthier-callout {
  background-color: var(--bg-surface-sunken);
  border-left: 4px solid var(--accent-color);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.luthier-callout p {
  margin-bottom: 0;
  font-size: 0.925rem;
}

.pitch-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.pitch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.pitch-table th {
  background-color: var(--bg-surface-sunken);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.pitch-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.pitch-table tr:last-child td {
  border-bottom: none;
}

.pitch-table code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background-color: var(--bg-surface-sunken);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent-color);
}

.faq-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.guide-article .faq-title,
.faq-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 1.25rem;
  border-bottom: none;
  padding-bottom: 0;
  letter-spacing: -0.01em;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--bg-surface-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  transition: border-color 0.15s ease;
}

.faq-item:hover {
  border-color: var(--border-color);
}

.faq-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.faq-answer {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}

.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 4rem 1.25rem 2rem;
  margin-top: auto;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75rem;
}

.footer-brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.footer-brand-sub {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.footer-engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-sunken);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.footer-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.meta-sep {
  color: var(--border-strong);
}

.footer-lang-switcher {
  display: flex;
  align-items: center;
}

.footer-lang-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-surface-sunken);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.75rem 0.35rem 0.65rem;
  transition: all 0.2s ease;
}

.footer-lang-wrapper:hover,
.footer-lang-wrapper:focus-within {
  border-color: var(--accent-color, #F59E0B);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.lang-globe-icon {
  color: var(--text-muted);
  margin-right: 0.5rem;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.footer-lang-wrapper:hover .lang-globe-icon,
.footer-lang-wrapper:focus-within .lang-globe-icon {
  color: var(--accent-color, #F59E0B);
}

.footer-lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding-right: 1.5rem;
  outline: none;
}

.footer-lang-select option {
  background-color: var(--bg-card);
  color: var(--text-primary);
  padding: 0.5rem;
}

.lang-arrow-icon {
  position: absolute;
  right: 0.65rem;
  pointer-events: none;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.footer-lang-wrapper:hover .lang-arrow-icon {
  color: var(--text-primary);
}

@media (max-width: 992px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .header-container {
    padding: 0 1rem;
  }
  
  .tool-page-container {
    padding: 1.5rem 1rem 3rem;
  }
  
  .tool-hero-title {
    font-size: 1.85rem;
  }
  
  .workbench-card {
    padding: 1.25rem 1rem;
  }
  
  .guide-article {
    padding: 1.5rem 1.25rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
