:root {
  --bg: #071715;
  --bg-soft: #0b211e;
  --surface: #102a26;
  --surface-2: #15332f;
  --surface-3: #1b3d38;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f8f5e9;
  --muted: #a9bdb7;
  --mint: #4de0b7;
  --mint-dark: #0bb78c;
  --gold: #f1bd5b;
  --blue: #63a8ff;
  --violet: #a98cff;
  --danger: #ff6d72;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.27);
  --radius: 24px;
  --radius-sm: 16px;
  --header-height: 74px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 8%, rgba(36, 158, 125, 0.16), transparent 28rem),
    radial-gradient(circle at 14% 86%, rgba(187, 126, 45, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

body.light {
  --bg: #eef6f2;
  --bg-soft: #e4f0eb;
  --surface: #ffffff;
  --surface-2: #f5faf8;
  --surface-3: #e6f3ee;
  --line: rgba(8, 46, 39, 0.11);
  --line-strong: rgba(8, 46, 39, 0.2);
  --text: #102822;
  --muted: #5d746e;
  --shadow: 0 20px 52px rgba(16, 56, 47, 0.11);
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(77, 224, 183, 0.45); outline-offset: 3px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 1000; background: var(--mint); color: #03211a; padding: 10px 16px; border-radius: 10px; font-weight: 800; }
.skip-link:focus { top: 10px; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
  background: rgba(7, 23, 21, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.light .app-header { background: rgba(238, 246, 242, 0.9); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 226px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--gold); border: 1px solid rgba(241, 189, 91, .42); background: rgba(241, 189, 91, .1); border-radius: 14px; }
.brand-mark svg { width: 27px; height: 27px; fill: currentColor; stroke-width: 1.4; }
.brand strong { display: block; font-size: 18px; letter-spacing: -0.03em; }
.brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.desktop-nav { display: flex; align-items: center; justify-content: center; gap: 3px; flex: 1; }
.nav-link { background: transparent; border: 0; color: var(--muted); padding: 10px 12px; border-radius: 11px; cursor: pointer; font-size: 14px; white-space: nowrap; transition: .2s ease; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { color: var(--text); background: rgba(77, 224, 183, .11); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.status-chip, .mini-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 11px; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(77, 224, 183, .12); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.icon-button svg { width: 19px; height: 19px; }
.mobile-nav { display: none; }

.view { display: none; animation: viewIn .35s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.content-shell { width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding: 44px 0 72px; }

.hero { width: min(1540px, 100%); min-height: calc(100vh - var(--header-height)); margin: 0 auto; padding: 72px max(36px, calc((100vw - 1380px) / 2)); display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 50px; overflow: hidden; position: relative; }
.ornament-grid::before { content: ""; position: absolute; inset: 0; opacity: .13; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 72px 72px; mask-image: radial-gradient(circle at 70% 50%, black, transparent 62%); }
.eyebrow { color: var(--mint); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 800; }
.hero h1 { margin: 18px 0 22px; font-size: clamp(48px, 6vw, 86px); line-height: .98; letter-spacing: -.065em; max-width: 760px; }
.hero h1 span { color: var(--mint); }
.hero-copy > p { max-width: 650px; font-size: clamp(16px, 1.6vw, 20px); color: var(--muted); line-height: 1.75; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.primary-button, .secondary-button, .ghost-button, .danger-button { border: 0; border-radius: 13px; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 760; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.primary-button { color: #03271e; background: var(--mint); box-shadow: 0 12px 28px rgba(77, 224, 183, .2); }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(77, 224, 183, .26); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.primary-button svg, .secondary-button svg { width: 20px; height: 20px; }
.secondary-button { color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); }
.secondary-button:hover, .ghost-button:hover { background: var(--surface-3); }
.ghost-button { padding: 10px 12px; color: var(--muted); background: transparent; border: 1px solid var(--line); }
.danger-button { color: #fff; background: rgba(255, 109, 114, .82); }
.wide { width: 100%; }
.privacy-note { margin-top: 28px; display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.privacy-note svg { width: 20px; color: var(--mint); flex: 0 0 auto; }

.hero-visual { height: 650px; display: grid; place-items: center; position: relative; }
.instrument-card { width: min(520px, 92%); height: 610px; position: relative; border: 1px solid var(--line); border-radius: 44% 44% 32% 32% / 28% 28% 42% 42%; background: radial-gradient(circle at 50% 45%, rgba(77,224,183,.11), transparent 45%), linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.01)); box-shadow: var(--shadow), inset 0 0 80px rgba(77,224,183,.05); }
.dombra-art { position: absolute; height: 570px; width: 360px; left: 50%; bottom: 5px; transform: translateX(-50%); filter: drop-shadow(0 20px 28px rgba(0,0,0,.32)); }
.dombra-art * { stroke-linecap: round; stroke-linejoin: round; }
.wave-orbit { position: absolute; left: 50%; top: 56%; border: 1px solid rgba(77,224,183,.3); border-radius: 50%; transform: translate(-50%,-50%); animation: pulseWave 2.8s ease-out infinite; }
.wave-one { width: 230px; height: 230px; }
.wave-two { width: 320px; height: 320px; animation-delay: .8s; }
.wave-three { width: 430px; height: 430px; animation-delay: 1.6s; }
@keyframes pulseWave { 0% { opacity: .5; transform: translate(-50%,-50%) scale(.78); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.14); } }
.floating-metric { position: absolute; padding: 13px 16px; background: rgba(11,33,30,.88); border: 1px solid var(--line-strong); backdrop-filter: blur(14px); border-radius: 14px; box-shadow: var(--shadow); }
.light .floating-metric { background: rgba(255,255,255,.9); }
.floating-metric small { color: var(--muted); font-size: 9px; letter-spacing: .15em; display: block; }
.floating-metric strong { font-size: 23px; color: var(--mint); }
.floating-metric strong span { font-size: 11px; color: var(--muted); }
.metric-note { top: 29%; left: -8%; }
.metric-frequency { right: -7%; bottom: 25%; }

.home-features { padding-top: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 25px; }
.section-heading h2, .page-heading h1 { margin: 8px 0 0; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.04em; line-height: 1.08; }
.section-heading > p { color: var(--muted); max-width: 520px; margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card { text-align: left; color: var(--text); min-height: 205px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, var(--surface), var(--surface-2)); padding: 24px; cursor: pointer; transition: .25s ease; }
.feature-card:hover { transform: translateY(-5px); border-color: rgba(77,224,183,.35); box-shadow: var(--shadow); }
.feature-card strong { display: block; font-size: 18px; margin: 20px 0 8px; }
.feature-card > span:last-child { color: var(--muted); font-size: 14px; line-height: 1.6; }
.feature-icon { width: 47px; height: 47px; border-radius: 15px; display: grid; place-items: center; }
.feature-icon svg { width: 25px; height: 25px; }
.feature-icon.mint { background: rgba(77,224,183,.12); color: var(--mint); }
.feature-icon.gold { background: rgba(241,189,91,.12); color: var(--gold); }
.feature-icon.blue { background: rgba(99,168,255,.12); color: var(--blue); }
.feature-icon.violet { background: rgba(169,140,255,.12); color: var(--violet); }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-heading p { margin: 10px 0 0; color: var(--muted); }
.large-status { display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); white-space: nowrap; }
.large-status > span { width: 8px; height: 8px; border-radius: 50%; background: #7c8f89; }
.large-status.live { color: var(--mint); }.large-status.live > span { background: var(--mint); box-shadow: 0 0 0 5px rgba(77,224,183,.12); animation: blink 1s infinite; }
.large-status.done { color: var(--gold); }.large-status.done > span { background: var(--gold); }
@keyframes blink { 50% { opacity: .45; } }

.analyzer-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, .7fr); gap: 18px; align-items: start; }
.main-column, .side-column { display: grid; gap: 18px; }
.panel { border: 1px solid var(--line); background: linear-gradient(145deg, var(--surface), var(--surface-2)); border-radius: var(--radius); padding: 24px; box-shadow: 0 12px 35px rgba(0,0,0,.08); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.panel-heading.compact { align-items: center; margin-bottom: 13px; }
.panel h2, .panel-heading h2 { font-size: 19px; margin: 0; letter-spacing: -.02em; }
.panel-heading p { color: var(--muted); margin: 5px 0 0; font-size: 13px; }
.mini-chip { font-size: 11px; }
.mini-chip.ok { color: var(--mint); border-color: rgba(77,224,183,.25); }
.mini-chip.warn { color: var(--gold); border-color: rgba(241,189,91,.25); }

.record-area { min-height: 190px; display: grid; place-items: center; align-content: center; gap: 14px; }
.record-button { width: 92px; height: 92px; border: 0; background: transparent; position: relative; cursor: pointer; }
.record-core { position: absolute; inset: 10px; border-radius: 50%; background: var(--mint); color: #06231d; display: grid; place-items: center; box-shadow: 0 0 0 8px rgba(77,224,183,.1), 0 12px 30px rgba(77,224,183,.2); transition: .25s ease; }
.record-core svg { width: 31px; height: 31px; }
.record-button:hover .record-core { transform: scale(1.05); }
.record-button.recording .record-core { background: var(--danger); color: #fff; }
.record-button.recording .record-core svg { display: none; }
.record-button.recording .record-core::after { content: ""; width: 25px; height: 25px; background: #fff; border-radius: 6px; }
.record-rings { position: absolute; inset: 0; border: 1px solid rgba(77,224,183,.3); border-radius: 50%; }
.record-button.recording .record-rings { border-color: rgba(255,109,114,.42); animation: recordPulse 1.4s ease-out infinite; }
@keyframes recordPulse { 100% { transform: scale(1.28); opacity: 0; } }
.record-copy { text-align: center; }
.record-copy strong { display: block; }
.record-copy span { display: block; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.level-meter { width: min(320px, 80%); height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.level-meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--gold), var(--danger)); transition: width .08s linear; }
.source-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.file-button input { display: none; }
.inline-message { color: var(--muted); text-align: center; font-size: 13px; margin: 17px 0 0; }
.inline-message.error { color: var(--danger); }
#audioPlayback { display: block; width: 100%; height: 40px; margin-top: 16px; }
#audioPlayback[hidden] { display: none; }

.chart-panel { padding-bottom: 28px; }
.legend { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.legend-line { width: 20px; border-top: 2px solid var(--mint); }
.legend-block { width: 10px; height: 10px; background: linear-gradient(var(--mint), rgba(77,224,183,.18)); border-radius: 2px; }
.canvas-wrap { height: 260px; position: relative; overflow: hidden; border: 1px solid var(--line); background: rgba(0,0,0,.09); border-radius: 16px; }
.canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.axis-label { position: absolute; color: var(--muted); font-size: 10px; pointer-events: none; }
.axis-y { top: 8px; left: 10px; }.axis-x { right: 12px; bottom: 8px; }

.note-card { text-align: center; overflow: hidden; position: relative; background: radial-gradient(circle at 50% 30%, rgba(77,224,183,.14), transparent 65%), linear-gradient(145deg, var(--surface), var(--surface-2)); border: 1px solid rgba(77,224,183,.2); border-radius: var(--radius); padding: 28px 20px; }
.note-card::before { content: ""; position: absolute; width: 180px; height: 180px; border: 1px solid rgba(77,224,183,.08); border-radius: 50%; top: -90px; left: calc(50% - 90px); }
.note-label { color: var(--muted); letter-spacing: .13em; font-size: 10px; font-weight: 800; }
.note-display { margin: 14px 0 12px; line-height: 1; }
.note-display strong { font-size: 76px; letter-spacing: -.08em; color: var(--mint); }
.note-display span { font-size: 30px; color: var(--mint); }
.tuner { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 8px; margin: 10px 0 16px; }
.tuner-label { font-size: 9px; color: var(--muted); }
.tuner-track { height: 10px; position: relative; background: linear-gradient(90deg, var(--gold), var(--mint) 50%, var(--gold)); opacity: .85; border-radius: 999px; }
.tuner-track i { position: absolute; left: 50%; top: -4px; width: 1px; height: 18px; background: var(--text); opacity: .5; }
#tunerNeedle { position: absolute; left: 50%; top: -7px; width: 3px; height: 24px; background: var(--text); border-radius: 2px; transform: translateX(-50%); transition: left .2s ease; box-shadow: 0 0 8px rgba(0,0,0,.3); }
.tuning-text { display: block; }.cents-text { color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric-card { min-height: 100px; border: 1px solid var(--line); background: var(--surface); border-radius: 17px; padding: 15px; }
.metric-card > span { color: var(--muted); display: block; font-size: 11px; }
.metric-card strong { display: block; margin-top: 12px; font-size: 21px; }.metric-card small { font-size: 10px; color: var(--muted); }
.ai-panel { border-color: rgba(169,140,255,.26); }
.ai-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ai-icon { width: 39px; height: 39px; border-radius: 13px; background: rgba(169,140,255,.13); color: var(--violet); display: grid; place-items: center; }
.ai-icon svg { width: 22px; }
.ai-heading span:not(.ai-icon) { display: block; color: var(--violet); letter-spacing: .11em; font-size: 10px; font-weight: 800; }
.ai-heading strong { display: block; margin-top: 2px; }
.ai-panel > p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.expert-tips { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 9px; }
.expert-tips li { font-size: 12px; color: var(--muted); padding-left: 20px; position: relative; }
.expert-tips li::before { content: "✓"; position: absolute; left: 0; color: var(--mint); font-weight: 800; }
.settings-panel { padding: 0; overflow: hidden; }
.settings-toggle { width: 100%; border: 0; background: transparent; display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; cursor: pointer; font-weight: 700; }
.settings-toggle svg { width: 18px; transition: .2s ease; }.settings-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.settings-body { padding: 0 20px 20px; border-top: 1px solid var(--line); }
.settings-body label { display: block; margin-top: 17px; font-size: 12px; color: var(--muted); }.settings-body output { float: right; color: var(--text); }

input[type="range"] { width: 100%; appearance: none; height: 5px; margin-top: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--mint), var(--surface-3)); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--text); border: 4px solid var(--mint-dark); box-shadow: 0 2px 8px rgba(0,0,0,.25); }

.two-column-layout, .string-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .65fr); gap: 18px; align-items: start; }
.formula-card { padding: 20px; border-radius: 17px; background: rgba(77,224,183,.08); border: 1px solid rgba(77,224,183,.18); margin-bottom: 18px; }
.formula-card span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.formula-card strong { display: block; margin-top: 8px; font-family: Cambria, Georgia, serif; font-size: clamp(20px, 3vw, 31px); font-weight: 500; overflow-wrap: anywhere; }.formula-card i { color: var(--mint); font-style: normal; }
.model-canvas { height: 390px; }
.model-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.model-facts div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }.model-facts span { color: var(--muted); font-size: 11px; display: block; }.model-facts strong { display: block; margin-top: 5px; font-size: 15px; }
.controls-panel h2 { margin-bottom: 25px; }
.controls-panel > label { display: block; margin-bottom: 27px; }.controls-panel label > span { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }.controls-panel output { color: var(--text); font-weight: 700; }
.preset-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: -7px 0 22px; }.preset-row button { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: 10px; padding: 8px; cursor: pointer; font-size: 12px; }.preset-row button:hover { color: var(--mint); border-color: rgba(77,224,183,.3); }
.explanation { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 20px 0 0; }

.string-stage { text-align: center; }
.string-result { display: flex; justify-content: center; gap: 70px; margin-bottom: 24px; }.string-result span { display: block; color: var(--muted); font-size: 11px; }.string-result strong { display: block; margin-top: 6px; font-size: 23px; }.string-result b { color: var(--mint); }
#stringCanvas { width: 100%; height: 300px; display: block; border-radius: 18px; border: 1px solid var(--line); background: radial-gradient(circle at center, rgba(77,224,183,.07), transparent 60%), rgba(0,0,0,.08); }
.bridge-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin: 7px 5px 22px; }
.select-label select { width: 100%; margin-top: 10px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); padding: 11px 12px; border-radius: 11px; }
.equation-explainer { margin-top: 9px; padding: 17px; border: 1px solid rgba(241,189,91,.19); border-radius: 15px; background: rgba(241,189,91,.06); }.equation-explainer > span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }.equation-explainer strong { display: block; color: var(--gold); font-family: Georgia, serif; font-size: 20px; margin: 8px 0; }.equation-explainer p { margin: 0; color: var(--muted); font-size: 12px; }
.experiment-panel { margin-top: 18px; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px; font-size: 13px; }
th { text-align: left; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 13px 12px; border-bottom: 1px solid var(--line-strong); }
td { padding: 15px 12px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
.empty-row td { text-align: center; color: var(--muted); padding: 40px; }
.table-delete { border: 0; background: rgba(255,109,114,.1); color: var(--danger); border-radius: 8px; padding: 6px 9px; cursor: pointer; }

.action-heading { align-items: center; }.heading-actions { display: flex; gap: 10px; }
.history-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; text-align: center; }.history-summary > div:not(:last-child) { border-right: 1px solid var(--line); }.history-summary span { color: var(--muted); font-size: 12px; display: block; }.history-summary strong { display: block; font-size: 29px; margin-top: 7px; color: var(--mint); }
.score-pill { display: inline-flex; padding: 5px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; }.score-good { background: rgba(77,224,183,.12); color: var(--mint); }.score-mid { background: rgba(241,189,91,.13); color: var(--gold); }.score-low { background: rgba(255,109,114,.12); color: var(--danger); }

.theory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.theory-card { position: relative; min-height: 230px; overflow: hidden; }.theory-card .chapter { position: absolute; right: 17px; top: 10px; font-size: 50px; color: rgba(77,224,183,.08); font-weight: 900; }.theory-card h2 { margin-top: 28px; }.theory-card p { color: var(--muted); font-size: 13px; line-height: 1.75; }.wide-theory { grid-column: span 2; }.theory-formula { display: inline-block; color: var(--gold); font: 24px Georgia, serif; background: rgba(241,189,91,.07); border-radius: 11px; padding: 10px 14px; margin-top: 18px; }
.quick-guide { margin-top: 18px; }.quick-guide ol { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 0; margin: 25px 0 0; }.quick-guide li { display: flex; gap: 12px; }.quick-guide li > span { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; background: rgba(77,224,183,.1); color: var(--mint); border-radius: 10px; font-weight: 800; }.quick-guide strong { font-size: 14px; }.quick-guide p { color: var(--muted); font-size: 12px; margin: 5px 0 0; }

.toast { position: fixed; z-index: 300; right: 22px; bottom: 24px; max-width: min(390px, calc(100vw - 44px)); transform: translateY(110px); opacity: 0; transition: .3s ease; padding: 13px 16px; background: var(--text); color: var(--bg); border-radius: 13px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); }
.toast.show { transform: none; opacity: 1; }
.modal[hidden] { display: none; }.modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; }.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.63); backdrop-filter: blur(4px); }.modal-card { z-index: 1; width: min(430px, calc(100% - 34px)); border: 1px solid var(--line-strong); background: var(--surface); border-radius: 22px; padding: 25px; box-shadow: var(--shadow); }.modal-card h2 { margin: 0 0 8px; }.modal-card p { color: var(--muted); }.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

@media (max-width: 1180px) {
  .desktop-nav .nav-link { padding-inline: 8px; font-size: 12px; }
  .status-chip { display: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .theory-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-guide ol { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-height: 66px; }
  body { padding-bottom: 68px; }
  .app-header { padding: 0 18px; }
  .brand { min-width: 0; flex: 1; }
  .desktop-nav { display: none; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5,1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 180; min-height: 66px; padding: 5px 7px calc(5px + env(safe-area-inset-bottom)); background: rgba(7,23,21,.95); border-top: 1px solid var(--line); backdrop-filter: blur(18px); }
  .light .mobile-nav { background: rgba(238,246,242,.96); }
  .mobile-nav .nav-link { display: grid; place-items: center; gap: 2px; padding: 3px; font-size: 10px; }
  .mobile-nav svg { width: 21px; height: 21px; }
  .content-shell { width: min(100% - 28px, 780px); padding: 32px 0 52px; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 65px 24px 35px; text-align: center; }
  .hero-copy > p { margin-inline: auto; }.hero-actions, .privacy-note { justify-content: center; }
  .hero-visual { height: 560px; }
  .instrument-card { height: 525px; width: min(460px, 88%); }
  .dombra-art { height: 500px; width: 315px; }
  .section-heading { align-items: start; flex-direction: column; }
  .analyzer-layout, .two-column-layout, .string-layout { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: 1fr 1fr; align-items: start; }
  .note-card, .metric-grid, .ai-panel, .settings-panel { min-width: 0; }
  .note-card { grid-row: span 2; }
  .settings-panel { grid-column: span 2; }
}

@media (max-width: 620px) {
  .brand small { display: none; }.brand strong { font-size: 16px; }.brand-mark { width: 38px; height: 38px; }
  .hero { padding-top: 48px; }.hero h1 { font-size: 45px; }.hero-copy > p { font-size: 16px; }
  .hero-visual { height: 465px; }.instrument-card { height: 440px; }.dombra-art { height: 420px; width: 270px; }.metric-note { left: -4%; }.metric-frequency { right: -4%; }.wave-three { width: 330px; height: 330px; }
  .feature-grid { grid-template-columns: 1fr; }.feature-card { min-height: 170px; }
  .page-heading { align-items: start; flex-direction: column; }.page-heading h1 { font-size: 35px; }
  .analyzer-layout { display: block; }.main-column, .side-column { margin-bottom: 14px; }.side-column { grid-template-columns: 1fr; margin-top: 14px; }.settings-panel { grid-column: auto; }.note-card { grid-row: auto; }
  .panel { padding: 19px; border-radius: 20px; }.panel-heading { flex-direction: column; }
  .source-actions { flex-direction: column; }.source-actions > * { width: 100%; }
  .canvas-wrap { height: 220px; }
  .model-canvas { height: 290px; }.model-facts { grid-template-columns: 1fr; }
  .string-result { gap: 24px; }.string-result strong { font-size: 19px; }#stringCanvas { height: 240px; }
  .experiment-panel .panel-heading { align-items: stretch; }.experiment-panel .secondary-button { width: 100%; }
  .action-heading .heading-actions { width: 100%; }.heading-actions button { flex: 1; padding-inline: 9px; }
  .history-summary { grid-template-columns: 1fr; gap: 15px; }.history-summary > div:not(:last-child) { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
  .theory-grid { grid-template-columns: 1fr; }.wide-theory { grid-column: auto; }.quick-guide ol { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
