/* ==========================================================================
   CanerGungor.com — V2 Akort Tool (Tuner & Pitch Finder) Stylesheet
   Phase 2E Step 4A1 — Clean CSS Ownership & Broken UI Restoration
   Model: Light Page Shell + Controlled Dark Tuner Workspace
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page Shell & Body (Light Editorial Surface)
   -------------------------------------------------------------------------- */
body.page-akort {
  background-color: var(--v2-canvas, #F4F0E8);
  color: var(--v2-text-primary, #1B1B19);
}

.c-tuner-page {
  position: relative;
  overflow: clip;
  background: var(--v2-canvas, #F4F0E8);
  color: var(--v2-text-primary, #1B1B19);
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   2. Hero Section (V2 Light Editorial)
   -------------------------------------------------------------------------- */
.c-tuner-hero {
  position: relative;
  padding: var(--v2-space-32, 32px) 0 var(--v2-space-48, 48px);
  background: var(--v2-canvas, #F4F0E8);
  border-bottom: 1px solid var(--v2-border-subtle, #CFC8BB);
  text-align: center;
}

.c-tuner-hero .article-category {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-6, 6px);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v2-accent-primary, #8A3F2D);
  margin-bottom: var(--v2-space-12, 12px);
}

.c-tuner-hero-title {
  font-family: var(--v2-font-display, 'Instrument Serif', Georgia, serif);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--v2-text-primary, #1B1B19);
  margin: 0 0 var(--v2-space-12, 12px);
  text-wrap: balance;
}

.c-tuner-hero-desc {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--v2-text-secondary, #5C5952);
  max-width: 640px;
  margin: 0 auto var(--v2-space-20, 20px);
}

.c-tuner-trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--v2-space-8, 8px) var(--v2-space-12, 12px);
  margin-bottom: var(--v2-space-16, 16px);
}

.c-tuner-trust-row span {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-6, 6px);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--v2-text-secondary, #5C5952);
  background: var(--v2-surface, #FFFCF7);
  border: 1px solid var(--v2-border-subtle, #CFC8BB);
  border-radius: 9999px;
  padding: 6px 14px;
}

.c-tuner-trust-row span svg {
  width: 14px;
  height: 14px;
  color: var(--v2-accent-primary, #8A3F2D);
}

.c-tuner-hero .breadcrumb {
  margin-top: var(--v2-space-8, 8px);
}

.c-tuner-hero .breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--v2-space-8, 8px);
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 13px;
  color: var(--v2-text-secondary, #5C5952);
}

.c-tuner-hero .breadcrumb li + li::before {
  content: "›";
  margin-right: var(--v2-space-8, 8px);
  color: var(--v2-border-control, #8E877C);
}

.c-tuner-hero .breadcrumb a {
  color: var(--v2-text-secondary, #5C5952);
  text-decoration: none;
  transition: color 0.15s ease;
}

.c-tuner-hero .breadcrumb a:hover {
  color: var(--v2-accent-primary, #8A3F2D);
}

.c-tuner-hero .breadcrumb [aria-current="page"] {
  color: var(--v2-text-primary, #1B1B19);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   3. Tuner Container & Application Box (Controlled Dark Workspace)
   -------------------------------------------------------------------------- */
.c-tuner-container {
  width: min(100% - (var(--v2-gutter, 20px) * 2), 1160px);
  margin-inline: auto;
  padding: var(--v2-space-32, 32px) 0 var(--v2-space-64, 64px);
  position: relative;
  z-index: 1;
}

.c-tuner-app {
  --success: var(--v2-success, #3F6B4E);
  --gold: var(--v2-audio-active, #E0A478);
  --accent-cognac: var(--v2-accent-primary, #8A3F2D);
  background: var(--v2-workspace, #111315);
  color: var(--v2-workspace-text, #F5F1E8);
  border: 1px solid var(--v2-workspace-border, #3B4045);
  border-radius: var(--v2-radius-12, 16px);
  padding: var(--v2-space-32, 32px);
  box-shadow: 0 12px 40px rgba(17, 19, 21, 0.25);
  box-sizing: border-box;
}

.c-tuner-app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--v2-space-16, 16px);
  margin-bottom: var(--v2-space-24, 24px);
  padding-bottom: var(--v2-space-20, 20px);
  border-bottom: 1px solid var(--v2-workspace-border, #3B4045);
}

.c-tuner-app-title-wrap {
  display: flex;
  align-items: center;
  gap: var(--v2-space-12, 12px);
}

.c-tuner-app-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--v2-radius-8, 8px);
  background: rgba(224, 164, 120, 0.12);
  border: 1px solid rgba(224, 164, 120, 0.3);
  color: var(--v2-audio-active, #E0A478);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.c-tuner-app-kicker {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--v2-audio-active, #E0A478);
  font-weight: 700;
  margin: 0 0 2px;
}

.c-tuner-app-header h2 {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--v2-workspace-text, #F5F1E8);
  margin: 0;
  line-height: 1.3;
}

.c-tuner-status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-8, 8px);
  padding: 6px 16px;
  min-height: 36px;
  background: var(--v2-panel, #1A1D20);
  border: 1px solid var(--v2-workspace-border, #3B4045);
  border-radius: 9999px;
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.c-tuner-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #727B88;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.c-tuner-status-pill.is-active {
  border-color: rgba(63, 107, 78, 0.6);
  background: rgba(63, 107, 78, 0.15);
  color: var(--v2-workspace-text, #F5F1E8);
}

.c-tuner-status-pill.is-active .c-tuner-status-dot {
  background: #4ADE80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

/* --------------------------------------------------------------------------
   4. Instrument Switcher (Multi-Instrument Pills)
   -------------------------------------------------------------------------- */
.c-tuner-instrument-bar {
  display: flex;
  gap: var(--v2-space-6, 6px);
  margin-bottom: var(--v2-space-20, 20px);
  overflow-x: auto;
  padding: 4px;
  background: var(--v2-panel, #1A1D20);
  border-radius: 9999px;
  border: 1px solid var(--v2-workspace-border, #3B4045);
  scrollbar-width: thin;
  scrollbar-color: var(--v2-workspace-border, #3B4045) transparent;
  -webkit-overflow-scrolling: touch;
}

.c-tuner-instrument-bar::-webkit-scrollbar {
  height: 4px;
}

.c-tuner-instrument-bar::-webkit-scrollbar-thumb {
  background: var(--v2-workspace-border, #3B4045);
  border-radius: 4px;
}

.c-tuner-inst-btn {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-8, 8px);
  min-height: 42px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9999px;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  user-select: none;
  touch-action: manipulation;
}

.c-tuner-inst-btn:hover {
  color: var(--v2-workspace-text, #F5F1E8);
  background: rgba(255, 255, 255, 0.04);
}

.c-tuner-inst-btn.is-active {
  background: var(--v2-panel-elevated, #23272B);
  color: var(--v2-workspace-text, #F5F1E8);
  border-color: var(--v2-workspace-control-border, #5D6268);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.c-tuner-inst-btn.is-active svg {
  color: var(--v2-audio-active, #E0A478);
}

.c-tuner-inst-btn:focus-visible {
  outline: 2px solid var(--v2-audio-active, #E0A478);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   4B. Mode Switch (Segmented Control - Legacy/Alternative)
   -------------------------------------------------------------------------- */
.c-tuner-mode-switch {
  display: flex;
  gap: var(--v2-space-6, 6px);
  margin-bottom: var(--v2-space-24, 24px);
  background: var(--v2-panel, #1A1D20);
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid var(--v2-workspace-border, #3B4045);
}

.c-tuner-mode-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-8, 8px);
  min-height: 44px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9999px;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  user-select: none;
  touch-action: manipulation;
}

.c-tuner-mode-btn:hover {
  color: var(--v2-workspace-text, #F5F1E8);
  background: rgba(255, 255, 255, 0.04);
}

.c-tuner-mode-btn.is-active {
  background: var(--v2-panel-elevated, #23272B);
  color: var(--v2-workspace-text, #F5F1E8);
  border-color: var(--v2-workspace-control-border, #5D6268);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.c-tuner-mode-btn:focus-visible {
  outline: 2px solid var(--v2-audio-active, #E0A478);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   5. Workspace Grid Layout
   -------------------------------------------------------------------------- */
.c-tuner-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--v2-space-24, 24px);
  align-items: start;
}

/* --------------------------------------------------------------------------
   6. Tuner Display (Visual Instrument Meter)
   -------------------------------------------------------------------------- */
.c-tuner-display {
  background: var(--v2-panel, #1A1D20);
  border: 1px solid var(--v2-workspace-border, #3B4045);
  border-radius: var(--v2-radius-12, 16px);
  padding: var(--v2-space-24, 24px);
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 410px;
  box-sizing: border-box;
}

.c-tuner-display-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 13px;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  font-weight: 600;
  padding-bottom: var(--v2-space-12, 12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.c-tuner-confidence {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-4, 4px);
  color: var(--v2-workspace-text-secondary, #B8B2A8);
}

.c-tuner-reading {
  margin: var(--v2-space-16, 16px) 0;
}

.c-tuner-target-caption {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--v2-audio-active, #E0A478);
  margin-bottom: var(--v2-space-8, 8px);
}

.c-tuner-note-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: var(--v2-space-6, 6px);
  min-height: 80px;
}

.c-tuner-note-text {
  font-family: var(--v2-font-display, 'Instrument Serif', Georgia, serif);
  font-size: clamp(3.8rem, 7vw, 5.2rem);
  font-weight: 400;
  line-height: 1;
  color: var(--v2-workspace-text, #F5F1E8);
  transition: color 0.15s ease;
}

.c-tuner-octave {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--v2-audio-active, #E0A478);
}

.c-tuner-pitch-name {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  margin: var(--v2-space-8, 8px) 0;
  min-height: 24px;
}

.c-tuner-frequency {
  font-family: var(--v2-font-mono, ui-monospace, monospace);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--v2-audio-active, #E0A478);
  margin: 0;
}

/* --------------------------------------------------------------------------
   7. Cent Gauge Meter
   -------------------------------------------------------------------------- */
.c-tuner-gauge {
  position: relative;
  height: 32px;
  background: var(--v2-panel-elevated, #23272B);
  border: 1px solid var(--v2-workspace-border, #3B4045);
  border-radius: 16px;
  margin: var(--v2-space-20, 20px) 0 var(--v2-space-16, 16px);
  overflow: hidden;
  box-sizing: border-box;
}

.c-tuner-gauge-zone--in-tune {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 14px);
  width: 28px;
  background: rgba(63, 107, 78, 0.35);
  border-left: 1px solid rgba(63, 107, 78, 0.6);
  border-right: 1px solid rgba(63, 107, 78, 0.6);
  pointer-events: none;
}

.c-tuner-needle {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 4px;
  height: 24px;
  background: var(--v2-audio-active, #E0A478);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: left 80ms ease-out, background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 8px var(--v2-audio-active, #E0A478);
  z-index: 2;
  pointer-events: none;
}

.c-tuner-gauge-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 11px;
  font-weight: 700;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  pointer-events: none;
  user-select: none;
  letter-spacing: 0.04em;
  z-index: 1;
}

.c-tuner-gauge-label--left {
  left: 14px;
}

.c-tuner-gauge-label--center {
  left: 50%;
  transform: translate(-50%, -50%);
  color: #7ED49C;
}

.c-tuner-gauge-label--right {
  right: 14px;
}

/* --------------------------------------------------------------------------
   8. Guidance Feedback Pill
   -------------------------------------------------------------------------- */
.c-tuner-guidance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-8, 8px);
  padding: 10px 16px;
  border-radius: var(--v2-radius-8, 8px);
  background: var(--v2-panel-elevated, #23272B);
  border: 1px solid var(--v2-workspace-border, #3B4045);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--v2-workspace-text, #F5F1E8);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  min-height: 42px;
}

.c-tuner-guidance[data-tone="in-tune"] {
  background: rgba(63, 107, 78, 0.25);
  border-color: rgba(63, 107, 78, 0.65);
  color: #7ED49C;
}

.c-tuner-guidance[data-tone="flat"] {
  background: rgba(224, 164, 120, 0.15);
  border-color: rgba(224, 164, 120, 0.45);
  color: #E0A478;
}

.c-tuner-guidance[data-tone="sharp"] {
  background: rgba(154, 90, 20, 0.18);
  border-color: rgba(154, 90, 20, 0.5);
  color: #F2A950;
}

/* --------------------------------------------------------------------------
   9. Level Meter
   -------------------------------------------------------------------------- */
.c-tuner-level {
  display: flex;
  align-items: center;
  gap: var(--v2-space-12, 12px);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  margin-top: var(--v2-space-16, 16px);
}

.c-tuner-level-track {
  flex: 1;
  height: 6px;
  background: var(--v2-panel-elevated, #23272B);
  border-radius: 3px;
  overflow: hidden;
}

.c-tuner-level-track span {
  display: block;
  height: 100%;
  width: 0%;
  background: #4ADE80;
  transition: width 50ms linear;
}

/* --------------------------------------------------------------------------
   10. Idle Prompt Overlay
   -------------------------------------------------------------------------- */
.c-tuner-idle-prompt {
  position: absolute;
  inset: 0;
  background: rgba(17, 19, 21, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--v2-space-24, 24px);
  z-index: 5;
  text-align: center;
  box-sizing: border-box;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.c-tuner-idle-prompt.u-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.c-tuner-mic-orb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(224, 164, 120, 0.12);
  border: 1px solid rgba(224, 164, 120, 0.35);
  color: var(--v2-audio-active, #E0A478);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: var(--v2-space-16, 16px);
  box-shadow: 0 0 24px rgba(224, 164, 120, 0.15);
}

.c-tuner-mic-orb svg {
  width: 28px;
  height: 28px;
}

.c-tuner-idle-prompt h3 {
  font-family: var(--v2-font-display, 'Instrument Serif', Georgia, serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--v2-workspace-text, #F5F1E8);
  margin: 0 0 var(--v2-space-8, 8px);
}

.c-tuner-idle-prompt p {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  max-width: 380px;
  margin: 0 0 var(--v2-space-20, 20px);
}

.c-tuner-start-btn {
  min-height: 48px;
  padding: 12px 28px;
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--v2-accent-primary, #8A3F2D);
  color: #FFFFFF !important;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-8, 8px);
  box-shadow: 0 4px 16px rgba(138, 63, 45, 0.35);
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
}

.c-tuner-start-btn:hover {
  background: var(--v2-accent-hover, #723425);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 63, 45, 0.45);
}

.c-tuner-start-btn:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 3px;
}

.c-tuner-privacy-note {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 12px;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  margin-top: var(--v2-space-12, 12px);
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-4, 4px);
}

.c-tuner-privacy-note svg {
  width: 13px;
  height: 13px;
}

/* --------------------------------------------------------------------------
   11. Controls Panel (Right Aside)
   -------------------------------------------------------------------------- */
.c-tuner-controls {
  background: var(--v2-panel, #1A1D20);
  border: 1px solid var(--v2-workspace-border, #3B4045);
  border-radius: var(--v2-radius-12, 16px);
  padding: var(--v2-space-24, 24px);
  display: flex;
  flex-direction: column;
  gap: var(--v2-space-20, 20px);
  box-sizing: border-box;
}

.c-tuner-field-label {
  display: block;
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  font-weight: 700;
  margin-bottom: var(--v2-space-8, 8px);
}

.c-tuner-select-wrap {
  position: relative;
  width: 100%;
}

.c-tuner-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 38px 10px 14px;
  background: var(--v2-panel-elevated, #23272B);
  border: 1px solid var(--v2-workspace-control-border, #5D6268);
  border-radius: var(--v2-radius-8, 8px);
  color: var(--v2-workspace-text, #F5F1E8);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 14px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.c-tuner-select:focus {
  outline: 0;
  border-color: var(--v2-audio-active, #E0A478);
  box-shadow: 0 0 0 2px rgba(224, 164, 120, 0.2);
}

.c-tuner-select-wrap svg {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.c-tuner-control-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 13px;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  margin: var(--v2-space-16, 16px) 0 var(--v2-space-8, 8px);
  font-weight: 600;
}

.c-tuner-control-hint {
  font-size: 12px;
  color: var(--v2-audio-active, #E0A478);
  font-weight: 500;
}

.c-tuner-target-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: var(--v2-space-6, 6px);
}

.c-tuner-target-btn {
  min-height: 48px;
  padding: 8px 6px;
  background: var(--v2-panel-elevated, #23272B);
  border: 1px solid var(--v2-workspace-control-border, #5D6268);
  border-radius: var(--v2-radius-8, 8px);
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  cursor: pointer;
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-weight: 600;
  font-size: 13px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
  touch-action: manipulation;
}

.c-tuner-target-btn small {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 500;
}

.c-tuner-target-btn:hover {
  border-color: var(--v2-audio-active, #E0A478);
  color: var(--v2-workspace-text, #F5F1E8);
}

.c-tuner-target-btn.is-active {
  background: rgba(224, 164, 120, 0.15);
  border-color: var(--v2-audio-active, #E0A478);
  color: var(--v2-audio-active, #E0A478);
  font-weight: 700;
}

.c-tuner-target-btn:focus-visible {
  outline: 2px solid var(--v2-audio-active, #E0A478);
  outline-offset: 2px;
}

.c-tuner-ref-tone-wrap {
  margin-top: var(--v2-space-12, 12px);
}

.c-tuner-ref-btn {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-8, 8px);
  padding: 10px 18px;
  border-radius: var(--v2-radius-8, 8px);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--v2-workspace-text, #F5F1E8);
  background: var(--v2-panel-elevated, #23272B);
  border: 1px solid var(--v2-workspace-control-border, #5D6268);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  touch-action: manipulation;
  box-sizing: border-box;
}

.c-tuner-ref-btn:hover {
  background: rgba(224, 164, 120, 0.15);
  border-color: var(--v2-audio-active, #E0A478);
  color: var(--v2-audio-active, #E0A478);
}

.c-tuner-ref-btn:focus-visible {
  outline: 2px solid var(--v2-audio-active, #E0A478);
  outline-offset: 2px;
}

.c-tuner-ref-btn.is-playing {
  background: var(--v2-audio-active, #E0A478);
  border-color: var(--v2-audio-active, #E0A478);
  color: #111315 !important;
}

.c-tuner-ref-btn.is-playing svg {
  animation: v2-spin 1s linear infinite;
}

.c-tuner-tip {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 13px;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  line-height: 1.5;
  margin-top: var(--v2-space-8, 8px);
  display: flex;
  align-items: flex-start;
  gap: var(--v2-space-6, 6px);
}

.c-tuner-tip svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--v2-audio-active, #E0A478);
}

.c-tuner-stop-btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  background: rgba(163, 59, 52, 0.18);
  border: 1px solid rgba(163, 59, 52, 0.5);
  color: #FCA5A5;
  border-radius: var(--v2-radius-8, 8px);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-8, 8px);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  touch-action: manipulation;
  box-sizing: border-box;
}

.c-tuner-stop-btn:hover {
  background: rgba(163, 59, 52, 0.3);
  color: #FFFFFF;
}

.c-tuner-stop-btn:focus-visible {
  outline: 2px solid #F87171;
  outline-offset: 2px;
}

.c-tuner-stop-btn.u-hidden {
  display: none !important;
}

.c-tuner-local-note {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 12px;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  margin-top: var(--v2-space-8, 8px);
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-6, 6px);
}

.c-tuner-local-note svg {
  width: 13px;
  height: 13px;
}

/* --------------------------------------------------------------------------
   12. Pitch Analysis Card (Perde Bulucu Mode)
   -------------------------------------------------------------------------- */
.c-tuner-analysis-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--v2-space-8, 8px);
  background: var(--v2-panel-elevated, #23272B);
  padding: var(--v2-space-16, 16px);
  border-radius: var(--v2-radius-8, 8px);
  border: 1px solid var(--v2-workspace-border, #3B4045);
  text-align: center;
}

.c-tuner-analysis-card span {
  display: block;
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  margin-bottom: 4px;
  font-weight: 600;
}

.c-tuner-analysis-card strong {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 1.15rem;
  color: var(--v2-workspace-text, #F5F1E8);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   13. Fine-Tuning Calibration (A4 = 440 Hz)
   -------------------------------------------------------------------------- */
.c-tuner-advanced {
  background: var(--v2-panel-elevated, #23272B);
  border: 1px solid var(--v2-workspace-border, #3B4045);
  border-radius: var(--v2-radius-8, 8px);
  padding: 12px 16px;
  transition: border-color 0.15s ease;
}

.c-tuner-advanced summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--v2-workspace-text, #F5F1E8);
  list-style: none;
  user-select: none;
}

.c-tuner-advanced summary::-webkit-details-marker {
  display: none;
}

.c-tuner-advanced summary span:first-child {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-6, 6px);
}

.c-tuner-advanced summary svg {
  width: 15px;
  height: 15px;
  color: var(--v2-audio-active, #E0A478);
}

#calibration-summary {
  font-family: var(--v2-font-mono, monospace);
  font-size: 12px;
  color: var(--v2-audio-active, #E0A478);
}

.c-tuner-calibration {
  margin-top: var(--v2-space-12, 12px);
  padding-top: var(--v2-space-12, 12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.c-tuner-calibration-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 12px;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  margin-bottom: var(--v2-space-8, 8px);
  font-weight: 500;
}

.c-tuner-calibration output {
  font-family: var(--v2-font-mono, monospace);
  color: var(--v2-audio-active, #E0A478);
  font-weight: 600;
}

.c-tuner-calibration input[type="range"] {
  width: 100%;
  accent-color: var(--v2-audio-active, #E0A478);
  cursor: pointer;
  min-height: 36px;
}

.c-tuner-range-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--v2-font-mono, monospace);
  font-size: 11px;
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  margin-top: 2px;
}

.c-tuner-reset-calibration {
  background: transparent;
  border: 1px solid var(--v2-workspace-control-border, #5D6268);
  color: var(--v2-workspace-text-secondary, #B8B2A8);
  border-radius: var(--v2-radius-4, 4px);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 500;
  min-height: 36px;
  padding: 6px 14px;
  margin-top: var(--v2-space-12, 12px);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
  touch-action: manipulation;
}

.c-tuner-reset-calibration:hover {
  border-color: var(--v2-audio-active, #E0A478);
  color: var(--v2-audio-active, #E0A478);
}

.c-tuner-reset-calibration:focus-visible {
  outline: 2px solid var(--v2-audio-active, #E0A478);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   14. Permission Alert Box
   -------------------------------------------------------------------------- */
.c-tuner-alert {
  background: rgba(163, 59, 52, 0.15);
  border: 1px solid rgba(163, 59, 52, 0.45);
  border-radius: var(--v2-radius-8, 8px);
  padding: var(--v2-space-16, 16px) var(--v2-space-20, 20px);
  margin-bottom: var(--v2-space-24, 24px);
  display: flex;
  gap: var(--v2-space-12, 12px);
  align-items: flex-start;
  color: #FCA5A5;
}

.c-tuner-alert-icon svg {
  width: 22px;
  height: 22px;
  color: #F87171;
  flex-shrink: 0;
  margin-top: 2px;
}

.c-tuner-alert h3 {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 4px;
}

.c-tuner-alert p {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 0.9rem;
  line-height: 1.5;
  color: #FCA5A5;
  margin: 0 0 var(--v2-space-8, 8px);
}

.c-tuner-permission-help {
  font-size: 0.85rem;
  margin-top: var(--v2-space-8, 8px);
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 12px;
  border-radius: var(--v2-radius-4, 4px);
}

.c-tuner-permission-help summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--v2-audio-active, #E0A478);
}

.c-tuner-permission-help p {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--v2-workspace-text, #F5F1E8);
}

/* --------------------------------------------------------------------------
   15. Instructional Steps Section (V2 Light Editorial)
   -------------------------------------------------------------------------- */
.c-tuner-how {
  margin: var(--v2-space-48, 48px) 0 var(--v2-space-32, 32px);
}

.c-tuner-section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--v2-space-32, 32px);
}

.c-tuner-section-heading--left {
  text-align: left;
  max-width: 100%;
  margin: 0 0 var(--v2-space-24, 24px);
}

.c-tuner-eyebrow {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--v2-accent-primary, #8A3F2D);
  font-weight: 700;
  margin-bottom: var(--v2-space-4, 4px);
}

.c-tuner-section-heading h2 {
  font-family: var(--v2-font-display, 'Instrument Serif', Georgia, serif);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 400;
  color: var(--v2-text-primary, #1B1B19);
  margin: 0 0 var(--v2-space-8, 8px);
  letter-spacing: -0.015em;
}

.c-tuner-section-heading p {
  color: var(--v2-text-secondary, #5C5952);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 0.98rem;
  margin: 0;
}

.c-tuner-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--v2-space-20, 20px);
  list-style: none;
  padding: 0;
  margin: 0;
}

.c-tuner-steps li {
  background: var(--v2-surface, #FFFCF7);
  border: 1px solid var(--v2-border-subtle, #CFC8BB);
  border-radius: var(--v2-radius-8, 8px);
  padding: var(--v2-space-24, 24px) var(--v2-space-20, 20px);
  display: flex;
  gap: var(--v2-space-16, 16px);
  align-items: flex-start;
  box-sizing: border-box;
}

.c-tuner-step-number {
  font-family: var(--v2-font-display, 'Instrument Serif', Georgia, serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--v2-accent-primary, #8A3F2D);
  line-height: 1;
  flex-shrink: 0;
}

.c-tuner-steps h3 {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--v2-text-primary, #1B1B19);
  margin: 0 0 var(--v2-space-6, 6px);
}

.c-tuner-steps p {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 0.9rem;
  color: var(--v2-text-secondary, #5C5952);
  line-height: 1.6;
  margin: 0;
}

/* --------------------------------------------------------------------------
   16. Educational Guide & FAQ Container (V2 Light Editorial)
   -------------------------------------------------------------------------- */
.c-tuner-article-container {
  background: var(--v2-surface, #FFFCF7);
  border: 1px solid var(--v2-border-subtle, #CFC8BB);
  border-radius: var(--v2-radius-12, 16px);
  padding: var(--v2-space-40, 40px) var(--v2-space-32, 32px);
  margin-top: var(--v2-space-48, 48px);
  box-sizing: border-box;
}

.c-tuner-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--v2-space-32, 32px);
  margin-bottom: var(--v2-space-40, 40px);
}

.c-tuner-guide-grid section h3 {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--v2-text-primary, #1B1B19);
  margin: 0 0 var(--v2-space-12, 12px);
}

.c-tuner-guide-grid section p {
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 0.95rem;
  color: var(--v2-text-secondary, #5C5952);
  line-height: 1.7;
  margin: 0 0 var(--v2-space-12, 12px);
}

.c-tuner-guide-grid section p:last-child {
  margin-bottom: 0;
}

.c-tuner-guide-grid section strong {
  color: var(--v2-text-primary, #1B1B19);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   17. FAQ Section (Details/Summary)
   -------------------------------------------------------------------------- */
.c-tuner-faq details {
  background: var(--v2-canvas, #F4F0E8);
  border: 1px solid var(--v2-border-subtle, #CFC8BB);
  border-radius: var(--v2-radius-4, 4px);
  margin-bottom: var(--v2-space-12, 12px);
  padding: var(--v2-space-16, 16px) var(--v2-space-20, 20px);
  transition: border-color 0.15s ease;
}

.c-tuner-faq details[open] {
  border-color: var(--v2-border-control, #8E877C);
}

.c-tuner-faq summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--v2-text-primary, #1B1B19);
  gap: var(--v2-space-12, 12px);
  list-style: none;
  user-select: none;
}

.c-tuner-faq summary::-webkit-details-marker {
  display: none;
}

.c-tuner-faq summary svg {
  color: var(--v2-text-secondary, #5C5952);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.c-tuner-faq details[open] summary svg {
  transform: rotate(180deg);
}

.c-tuner-faq details p {
  margin: var(--v2-space-12, 12px) 0 0;
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 0.92rem;
  color: var(--v2-text-secondary, #5C5952);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   18. Related Tool Links
   -------------------------------------------------------------------------- */
.tool-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--v2-space-16, 16px);
  justify-content: space-between;
  margin-top: var(--v2-space-32, 32px);
  padding: var(--v2-space-20, 20px) var(--v2-space-24, 24px);
  background: var(--v2-surface-muted, #EAE4DA);
  border: 1px solid var(--v2-border-subtle, #CFC8BB);
  border-radius: var(--v2-radius-8, 8px);
}

.tool-related-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-8, 8px);
  color: var(--v2-text-primary, #1B1B19);
  font-family: var(--v2-font-body, system-ui, sans-serif);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  transition: color 0.15s ease;
}

.tool-related-links a:hover {
  color: var(--v2-accent-primary, #8A3F2D);
}

.tool-related-links a svg {
  color: var(--v2-accent-primary, #8A3F2D);
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.tool-related-links a:hover svg {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   19. Utilities & Accessibility
   -------------------------------------------------------------------------- */
.c-tuner-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.u-hidden {
  display: none !important;
}

@keyframes v2-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.v2-spin {
  animation: v2-spin 1.2s linear infinite;
}

/* --------------------------------------------------------------------------
   20. Responsive Breakpoints (900px, 680px, 480px, 320px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .c-tuner-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--v2-space-20, 20px);
  }

  .c-tuner-guide-grid {
    grid-template-columns: 1fr;
    gap: var(--v2-space-24, 24px);
  }

  .c-tuner-steps {
    grid-template-columns: 1fr;
    gap: var(--v2-space-16, 16px);
  }
}

@media (max-width: 680px) {
  .c-tuner-container {
    padding: var(--v2-space-20, 20px) 0 var(--v2-space-40, 40px);
  }

  .c-tuner-app {
    padding: var(--v2-space-20, 20px) var(--v2-space-16, 16px);
    border-radius: var(--v2-radius-8, 12px);
  }

  .c-tuner-display {
    padding: var(--v2-space-20, 20px) var(--v2-space-16, 16px);
    min-height: 370px;
  }

  .c-tuner-note-text {
    font-size: 3.8rem;
  }

  .c-tuner-octave {
    font-size: 1.3rem;
  }

  .c-tuner-controls {
    padding: var(--v2-space-16, 16px);
  }

  .c-tuner-article-container {
    padding: var(--v2-space-24, 24px) var(--v2-space-16, 16px);
  }

  .tool-related-links {
    flex-direction: column;
    gap: var(--v2-space-8, 8px);
  }
}

@media (max-width: 480px) {
  .c-tuner-target-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .c-tuner-analysis-card {
    grid-template-columns: 1fr;
    gap: var(--v2-space-6, 6px);
  }

  .c-tuner-idle-prompt {
    padding: var(--v2-space-16, 16px);
  }

  .c-tuner-idle-prompt p {
    font-size: 0.85rem;
  }

  .c-tuner-start-btn {
    width: 100%;
    max-width: 260px;
  }

  .c-tuner-mode-btn {
    font-size: 13px;
    padding: 6px 10px;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .c-tuner-needle {
    transition: none !important;
  }
  .v2-spin {
    animation: none !important;
  }
}
