:root {
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --surface-soft: #F3EFE9;
  --border: #E7E0D6;
  --ink: #1F1D1B;
  --ink-muted: #5F5953; /* #6E6861 gün batımı sahnesinde 3,74:1 kalıyordu */
  --gold: #B68F4C; /* yalnız dolgu ve süs; metin için --gold-text */
  --gold-text: #816123; /* açık zeminlerin hepsinde ≥ 5:1 */
  --gold-ui: #AA8444; /* kaydırıcı, kenarlık gibi metin dışı öğeler ≥ 3:1 */
  --border-strong: #90867A;
  --stage: radial-gradient(120% 70% at 50% 38%, #F1ECE5 0%, #E6DFD5 60%, #DCD3C7 100%);
  --gold-soft: #F5EFE2;
  --charcoal: #22201E;
  --charcoal-hover: #383430;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 4px 16px rgba(31, 29, 27, 0.05);
  --shadow-md: 0 14px 36px rgba(31, 29, 27, 0.08);
  /* Yalnız cihazda bulunan yazı tipleri: dış istek yok. (Önceki marka yazı tipi adları hiç yüklenmiyordu.) */
  --font-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.hidden { display: none !important; }

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(250, 248, 245, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.progress-wrap {
  flex: 1;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-label {
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
}

.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}

/* Buttons */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  transition: all 0.2s ease;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--charcoal);
  color: #FAF8F5;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
}

.btn-primary:hover { background: var(--charcoal-hover); transform: translateY(-1px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
}

.btn-outline:hover { border-color: var(--ink); }

.btn-lg { padding: 15px 28px; font-size: 15px; }
.btn-full { width: 100%; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
}
.icon-btn:hover { border-color: var(--ink); }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
}
.pill-btn:hover { border-color: var(--ink); }
.pill-btn.active { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }

.badge-count {
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 600;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

.text-toggle, .text-link {
  font-size: 13px;
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-toggle:hover, .text-link:hover { color: var(--ink); }

/* Screens */
.screen {
  display: none;
  flex: 1;
  padding: 28px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  animation: fadeUp 0.35s ease;
}

.screen.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
}

h1 { font-size: clamp(36px, 4.6vw, 56px); margin-bottom: 18px; }
h2 { font-size: clamp(28px, 3vw, 38px); }
h3 { font-size: 22px; }

.helper-text { font-size: 14px; color: var(--ink-muted); margin-top: 4px; }

/* Welcome Screen */

/* Wizard Screens */
.wizard-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 36px;
  align-items: start;
}

.wizard-single { max-width: 860px; margin: 0 auto; }

.stage-frame {
  position: sticky;
  top: 90px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: background 0.35s ease;
}

.stage-pill {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}

.stage-metrics {
  font-size: 13px;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.8);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
}

.mannequin-mount {
  width: 100%;
  max-width: 340px;
  height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.mannequin-mount svg { width: 100%; height: 100%; overflow: visible; }
.mannequin-mount.zoomed { transform: scale(1.65) translateY(12%); cursor: zoom-out; }
.mannequin-mount.zoomable { cursor: zoom-in; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}

.control-stack { display: flex; flex-direction: column; gap: 18px; }

.slider-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.slider-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
}

.choice-group { display: flex; flex-direction: column; gap: 10px; }
.group-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.group-label-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.hint-tag { font-size: 12px; color: var(--gold); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row.compact { gap: 6px; }

.chip {
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--ink);
}
.chip:hover { border-color: var(--gold); }
.chip.selected {
  background: var(--charcoal);
  color: #FAF8F5;
  border-color: var(--charcoal);
}
.chip-row.compact .chip { padding: 7px 12px; font-size: 12px; }

.card-grid { display: grid; gap: 12px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.select-card {
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.select-card strong { font-size: 14px; font-weight: 600; }
.select-card span { font-size: 12px; color: var(--ink-muted); }
.select-card:hover { border-color: var(--gold); }
.select-card.selected {
  border-color: var(--charcoal);
  background: var(--gold-soft);
  box-shadow: inset 0 0 0 1px var(--charcoal);
}

.swatch-row { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-muted);
}
.swatch-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.45);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.swatch-btn.selected .swatch-circle {
  border-color: var(--charcoal);
  transform: scale(1.1);
}
.swatch-btn.selected { color: var(--ink); font-weight: 600; }
.swatch-row.compact .swatch-circle { width: 28px; height: 28px; }

.wizard-footer { margin-top: 26px; }

/* Loading Screen */
.loading-stage {
  max-width: 480px;
  margin: 64px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loading-orb {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 1.6s infinite ease-in-out;
}
.orb-icon { font-size: 32px; color: var(--gold); }

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(182, 143, 76, 0.25); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 18px rgba(182, 143, 76, 0); }
}

.loading-sub { font-size: 14px; color: var(--ink-muted); }

.loading-steps {
  width: 100%;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.l-step {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--ink-muted);
  opacity: 0.5;
  transition: all 0.3s ease;
}
.l-step.active { opacity: 1; border-color: var(--gold); color: var(--ink); font-weight: 500; }
.l-step.done { opacity: 0.85; border-color: #C7D7C4; background: #F5FAF4; color: #2E5A31; }

/* Studio Screen (Ekran 6) */
.studio-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}
/* Izgara çocukları varsayılan min-width:auto ile içeriği kadar genişler ve sayfayı taşırır.
   min-width:0 sütunu görünüm alanıyla sınırlar; taşan içerik kendi kutusunda kayar. */
.studio-grid > *, .wizard-layout > *, .briefing-card > * { min-width: 0; }

.studio-rail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rec-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-card {
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.rec-card:hover { border-color: var(--gold); }
.rec-card.active {
  background: var(--gold-soft);
  border-color: var(--charcoal);
}
.rec-card-info { display: block; }
.rec-card-info strong { display: block; font-size: 13px; font-weight: 600; }
.rec-card-info span { font-size: 11px; color: var(--ink-muted); }
.rec-score {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  background: var(--surface);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.studio-stage {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: background 0.4s ease;
}

/* Lighting Themes */
.light-daylight { background: linear-gradient(180deg, #F8F5F0 0%, #EDE7DE 100%); }
.light-sunset { background: linear-gradient(180deg, #F9ECE1 0%, #EBD0B9 100%); }
.light-ballroom { background: linear-gradient(180deg, #2D2926 0%, #1C1A18 100%); color: #FAF8F5; }
.light-ballroom .dress-title-wrap span { color: #C9C2B8; }
.light-ballroom .api-mode-chip { background: rgba(255,255,255,0.12); color: #FAF8F5; border-color: rgba(255,255,255,0.2); }

.stage-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
}

.match-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 13px;
}
.match-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.match-badge .muted { color: var(--ink-muted); font-size: 12px; }

.stage-top-actions { display: flex; gap: 8px; }

.circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}
.circle-btn.active { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }

.stage-canvas-area {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 0;
}

.shimmer-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 0.7s ease;
  pointer-events: none;
  z-index: 10;
}
@keyframes shimmer {
  0% { background-position: 150% 0; }
  100% { background-position: -50% 0; }
}

.compare-pane { border-left: 1px dashed rgba(110, 104, 97, 0.35); padding-left: 12px; }

.stage-bottom-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  z-index: 5;
}

.dress-title-wrap h3 { font-size: 24px; }
.dress-title-wrap span { font-size: 13px; color: var(--ink-muted); }

.api-mode-chip {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  color: var(--ink-muted);
}

/* Studio Inspector */
.studio-inspector {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 620px;
}

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface-soft);
  padding: 4px;
  border-radius: var(--radius-pill);
}
.i-tab {
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
}
.i-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.inspector-body { flex: 1; }
.tab-panel { display: none; flex-direction: column; gap: 14px; }
.tab-panel.active { display: flex; }

.control-mini { display: flex; flex-direction: column; gap: 6px; }
.control-mini label { font-size: 12px; font-weight: 600; color: var(--ink-muted); }

.inspector-utility {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.lighting-cards { display: flex; flex-direction: column; gap: 10px; }

.stylist-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stylist-badge { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--gold); letter-spacing: 0.06em; }
.stylist-card p { font-size: 13px; color: var(--ink); }
.stylist-bullets { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-muted); }

.inspector-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.mobile-toolbar { display: none; }

/* Screen 7: Style Card */
.card-screen-wrap { max-width: 960px; margin: 0 auto; }
.card-screen-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.card-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.briefing-card {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.briefing-visual {
  background: linear-gradient(180deg, #F7F3EC 0%, #EAE2D6 100%);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}
.briefing-watermark { font-family: var(--font-serif); font-size: 14px; color: var(--ink-muted); }

.briefing-details {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.briefing-top p { font-size: 14px; color: var(--ink-muted); margin-top: 6px; }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.spec-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.spec-item span { display: block; font-size: 11px; color: var(--ink-muted); }
.spec-item strong { font-size: 14px; }

.profile-strip h4 { font-size: 13px; margin-bottom: 8px; }
.profile-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-pill {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--ink);
}

.briefing-note {
  font-size: 12px;
  color: var(--ink-muted);
  background: var(--gold-soft);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

/* Modals & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 29, 27, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.modal-lg { max-width: 760px; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; max-height: 75vh; overflow-y: auto; }

.copy-box { display: flex; gap: 8px; }
.copy-box input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  background: var(--bg);
}

.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.board-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.board-thumb { height: 180px; display: flex; align-items: center; justify-content: center; background: var(--surface); border-radius: var(--radius-sm); }
.board-thumb svg { height: 100%; width: auto; }
.board-item-actions { display: flex; gap: 6px; }
.board-item-actions button { flex: 1; font-size: 12px; padding: 7px 10px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--charcoal);
  color: #FAF8F5;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  z-index: 200;
  box-shadow: var(--shadow-md);
}

/* Responsive (Mobil Öncelikli Düzen) */
@media (max-width: 980px) {
  .topbar { padding: 12px 16px; }
  .screen { padding: 16px; }
   .wizard-layout, .studio-grid, .briefing-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .stage-frame { position: static; min-height: 360px; }
  .mannequin-mount { height: 320px; }
  /* Öneri rayı sayfayı değil yalnızca kendini yatay kaydırır. */
  .rec-list {
    flex-direction: row;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .rec-card { flex: 0 0 auto; width: min(220px, 78%); scroll-snap-align: start; }
  /* Görsel sıra DOM sırasıyla aynı: öneri rayı → sahne → panel (klavye sırası da öyle). */
  .studio-inspector { min-height: auto; }
  .mobile-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: var(--radius-pill);
  }
  .m-tool-btn {
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-muted);
  }
  .m-tool-btn.active { background: var(--surface-soft); color: var(--ink); }
  .m-cta-btn { margin-left: auto; padding: 9px 14px; font-size: 12px; }
}

@media print {
  .topbar, .card-screen-head, .modal-backdrop, .toast { display: none !important; }
  body { background: #fff; }
  .screen { padding: 0; }
  .briefing-card { box-shadow: none; border: 1px solid #ddd; }
}

/* Keyboard access, honest preview labels and small-screen readability. */
:focus-visible { outline: 3px solid #816123; outline-offset: 4px; }
/* Koyu ekranlarda odak halkası şampanya renginde (koyu zeminde yeterli kontrast). */
.app-shell:not(.on-card) :focus-visible { outline-color: #D9B77E; }
.modal-body p + p { margin-top: 1rem; }
.modal-body { overflow-wrap: anywhere; }
button { touch-action: manipulation; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }
@media (max-width: 600px) { .topbar { padding: 12px; gap: 8px; }  .card-head-actions { flex-wrap: wrap; } .copy-box { flex-wrap: wrap; } .copy-box input { min-width: 0; width: 100%; } }
/* Dar telefonlar (320–480 px): üst çubuk iki satıra bölünür, sahne üst barı sarar; hiçbir şey sayfayı taşırmaz. */
@media (max-width: 480px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topbar-left { min-width: 0; }
  
  #btn-open-board > span:not(.badge-count) { display: none; }
  .progress-wrap { order: 3; flex: 1 0 100%; max-width: none; }
  .stage-top-bar { flex-wrap: wrap; gap: 8px; }
  .match-badge { min-width: 0; }
  .stage-bottom-meta { flex-wrap: wrap; }
  .mobile-toolbar { flex-wrap: wrap; border-radius: var(--radius-lg); }
  .inspector-utility { flex-wrap: wrap; gap: 8px; }
}

/* Erişilebilirlik (F06): dokunma hedefleri, görünüm düğmesi, programatik odak. */
.screen:focus { outline: none; }
.view-toggle { width: auto; padding: 0 14px; border-radius: var(--radius-pill); font-size: 12px; white-space: nowrap; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
/* Dokunmatik ekranlarda ve mobil yerleşimde tüm kontroller en az 44 px. */
@media (pointer: coarse), (max-width: 980px) {
  .chip, .chip-row.compact .chip, .i-tab, .m-tool-btn, .m-cta-btn, .pill-btn, .btn-outline, .btn-primary,
  .text-toggle, .text-link, .match-badge, .board-item-actions button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .icon-btn, .circle-btn { min-width: 44px; min-height: 44px; }
  .view-toggle { min-height: 44px; }
  .chip-row.compact .chip, .m-tool-btn, .m-cta-btn, .i-tab { font-size: 13px; }
  .swatch-btn { min-width: 48px; min-height: 44px; }
  .select-card { min-height: 44px; }
  .rec-card { min-height: 56px; }
  .brand { min-height: 44px; }
  input[type="range"] { min-height: 44px; }
}

/* =====================================================================
   Tasarım geçişi — uzman incelemesi (23 Kasım 2026)
   Yön: basılı bir couture kataloğu. Tek sıcak "stüdyo duvarı", kutular yerine
   ince çizgiler, ekran başına tek koyu ana eylem. Altın süs içindir; metin
   --gold-text kullanır. Bu blok dosyanın sonunda durur ve öncekileri ezer.
   ===================================================================== */

/* --- Tipografi --- */
h1, h2, h3 { font-weight: 400; letter-spacing: -0.01em; }
h1 { line-height: 1.08; }

.eyebrow { font-size: 11px; letter-spacing: 0.16em; margin-bottom: 12px; color: var(--gold-text); }
.screen-title { font-size: clamp(28px, 3vw, 38px); margin-bottom: 0; }
.rail-header h2 { font-size: 22px; }

/* --- Altın: metinde koyu ton, dolguda açık ton --- */
.hint-tag, .rec-score, .stylist-badge, .badge-count, .orb-icon { color: var(--gold-text); }
.match-badge .dot { background: var(--gold-ui); }
.loading-orb { border-color: var(--gold-ui); }
.progress-fill { background: var(--gold-ui); }

/* --- Bağlantı görünümlü düğmeler --- */
a.btn-primary, a.btn-outline { text-decoration: none; }

/* --- Tek "seçili" dili: açık altın dolgu + koyu ince çizgi. Koyu dolgu yalnız ana eylemde. --- */
.chip.selected {
  background: var(--gold-soft);
  color: var(--ink);
  border-color: var(--charcoal);
  box-shadow: inset 0 0 0 1px var(--charcoal);
  font-weight: 600;
}
.rec-card.active { box-shadow: inset 0 0 0 1px var(--charcoal); }
.pill-btn.active, .circle-btn.active { background: var(--gold-soft); color: var(--ink); border-color: var(--charcoal); box-shadow: inset 0 0 0 1px var(--charcoal); }
.i-tab.active, .m-tool-btn.active { font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--charcoal); }
.chip:hover, .select-card:hover, .rec-card:hover { border-color: var(--ink-muted); }
.copy-box input{ border-color: var(--border-strong); }

/* --- Karşılama --- */

/* --- Sahne: çizim ve fotoğraf aynı odada --- */
 .light-daylight, .briefing-visual { background: var(--stage); }
 .stage-frame, .studio-stage { box-shadow: inset 0 -80px 80px -60px rgba(59, 47, 34, 0.10); }

.board-thumb { background: var(--stage); padding: 10px 0 14px; height: 200px; }
.compare-pane { border-left: 1px solid var(--border-strong); }
.stage-canvas-area { align-items: flex-end; }
.mannequin-mount { position: relative; }
.mannequin-mount[data-label]:not([data-label=""])::after {
  content: attr(data-label);
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}
.mannequin-mount.zoomed { transform: scale(1.65); transform-origin: var(--zx, 50%) var(--zy, 30%); }

/* --- Kaydırıcılar: ince ray, açık altın dolgu, beyaz tutamak --- */
input[type="range"] { -webkit-appearance: none; appearance: none; height: 28px; background: transparent; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--gold-ui) var(--fill, 50%), #CFC6B8 var(--fill, 50%));
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: #CFC6B8; }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--gold-ui); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px; margin-top: -10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--gold-text);
  box-shadow: 0 2px 6px rgba(31, 29, 27, 0.14);
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--gold-text);
}
.slider-card { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 4px 0 14px; }
.slider-row { align-items: baseline; }
.slider-row strong { font-family: var(--font-serif); font-size: 20px; font-weight: 400; font-variant-numeric: tabular-nums; }

/* --- Stüdyo paneli --- */
.group-label, .control-mini .group-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted);
}
.group-label .hint-tag, .group-label-row .hint-tag { letter-spacing: 0; text-transform: none; font-weight: 500; }
.tab-panel { gap: 18px; }
.inspector-utility { flex-wrap: wrap; gap: 6px 12px; }
.inspector-utility .text-link { font-size: 12px; }
.studio-stage { box-shadow: var(--shadow-md), inset 0 -80px 80px -60px rgba(59, 47, 34, 0.10); }
.rec-score { font-family: var(--font-serif); font-size: 15px; border: 0; background: none; padding: 0; }
.studio-stage, .studio-inspector { scroll-margin-top: calc(var(--topbar-h, 62px) + 8px); }

/* --- Stil kartı: ayar paneli değil, katalog sayfası --- */
.briefing-top h2 { font-size: clamp(30px, 3.2vw, 40px); margin-top: 6px; }
.card-screen-head .screen-title { font-size: clamp(22px, 2.2vw, 28px); }
.spec-grid { gap: 0 28px; }
.spec-item { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 12px 0; }
.spec-item span { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 2px; }
.spec-item strong { font-family: var(--font-serif); font-size: 18px; font-weight: 400; }
.profile-strip h3 { font-family: var(--font-sans); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.profile-pill { background: none; border: 1px solid var(--border); }
.briefing-note { background: none; border-top: 1px solid var(--border); border-radius: 0; padding: 14px 0 0; font-style: italic; }
.briefing-watermark { letter-spacing: 0.14em; text-transform: uppercase; font-family: var(--font-sans); font-size: 10.5px; }
.briefing-details { padding: 40px; gap: 24px; }

/* --- Sihirbaz 3. adım: masaüstünde boş alan ve baskın çubuk --- */
.wizard-single { max-width: 760px; padding-top: 3vh; }
.wizard-single .control-stack { gap: 26px; }
@media (min-width: 981px) {
  .wizard-single .wizard-footer { margin-top: 36px; display: flex; justify-content: flex-end; }
  .wizard-single .wizard-footer .btn-full { width: auto; min-width: 280px; }
}

/* --- Yükleme adımları: durum yalnız saydamlıkla değil --- */
.l-step, .l-step.done { opacity: 1; }
.l-step.active { border-color: var(--gold-ui); border-width: 2px; }
.l-step.done::before { content: "✓ "; }

/* --- Erişilebilirlik yardımcıları --- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--charcoal); color: #FAF8F5; padding: 10px 16px; border-radius: var(--radius-pill); }
.skip-link:focus { top: 12px; }
html { scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
.light-ballroom :focus-visible { outline-color: #E8C987; }
@media (max-height: 480px) { .topbar { position: static; } }

/* --- Bildirim: canlı bölge hep çizili kalır, görünürlük sınıfla değişir --- */
.toast {
  left: 16px; right: 16px;
  width: fit-content;
  max-width: min(100% - 32px, 420px);
  margin-inline: auto;
  transform: none;
  text-align: center;
  bottom: calc(24px + env(safe-area-inset-bottom));
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.toast.show { visibility: visible; opacity: 1; }

/* --- Pencereler: başlık hep görünür, arka plan kaymaz, güvenli alanlar --- */
.modal-backdrop {
  padding: calc(20px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  overscroll-behavior: contain;
}
.modal-card { display: flex; flex-direction: column; max-height: 100%; }
.modal-header { flex: none; }
.modal-body { max-height: none; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
body.modal-open { overflow: hidden; }

/* --- Dokunmatik: yapışan hover yok, basılı durumu var --- */
button:active, a.btn-primary:active, a.btn-outline:active { opacity: 0.8; }
@media (hover: none) {
  .btn-primary:hover { background: var(--charcoal); transform: none; }
  .btn-outline:hover, .icon-btn:hover, .pill-btn:hover { border-color: var(--border); }
  .chip:not(.selected):hover, .select-card:not(.selected):hover, .rec-card:not(.active):hover { border-color: var(--border); }
}
@media (pointer: coarse) { .copy-box input{ font-size: 16px; } }

/* --- Güvenli alanlar ve dinamik görünüm yüksekliği (web görünümü / çentikli cihaz) --- */
body, .app-shell { min-height: 100vh; min-height: 100dvh; }

.topbar { padding-top: calc(14px + env(safe-area-inset-top)); padding-left: max(28px, env(safe-area-inset-left)); padding-right: max(28px, env(safe-area-inset-right)); }

@media screen and (max-width: 980px) {
  .topbar { padding-top: calc(12px + env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .screen { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }

  /* Karşılama: görsel üstte ve küçük, tek ana eylem tam genişlik */
  
  
  
  
  
  
  
  h1 { font-size: 34px; margin-bottom: 12px; }

  /* Stüdyo: ray kısa ve üstte, sahne daha alçak, ana eylem başparmak hizasında sabit */
  .studio-rail { padding: 12px 14px; gap: 8px; }
  .rec-list { padding: 6px; margin: -6px; }
  .rec-card:focus-visible { outline-offset: -3px; }
  .studio-stage { min-height: 500px; }
  .mobile-toolbar {
    position: fixed; z-index: 35; margin: 0;
    left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
    bottom: calc(10px + env(safe-area-inset-bottom));
    box-shadow: var(--shadow-md);
  }
  .screen[data-screen="studio"] { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  #btn-create-style-card { display: none; } /* alttaki sabit çubukta aynı eylem var */
  .toast { bottom: auto; top: calc(var(--topbar-h, 62px) + 8px); }
  .briefing-details { padding: 24px 20px; }
}

@media screen and (max-width: 600px) {
  .modal-backdrop { align-items: flex-end; } /* alt sayfa: kapat ve eylemler başparmak hizasında */
}

@media screen and (max-width: 480px) {
  .mobile-toolbar { gap: 4px; padding: 6px; }
  .m-tool-btn { padding: 8px 10px; }
  .screen[data-screen="studio"] { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
}

/* Sihirbaz (dik telefon): düzenlenen şey düzenlerken görünür kalır */
@media screen and (max-width: 980px) and (min-height: 600px) {
  .wizard-layout { display: flex; flex-direction: column; gap: 16px; }
  .wizard-preview {
    position: sticky; top: var(--topbar-h, 62px); z-index: 30;
    margin: -16px -16px 0; padding: 8px 16px;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .wizard-preview .stage-frame {
    position: static; min-height: 0; padding: 8px 14px;
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr 1fr;
    column-gap: 14px; justify-items: start;
  }
  .wizard-preview .mannequin-mount { grid-column: 1; grid-row: 1 / 3; width: auto; max-width: none; height: clamp(150px, 24vh, 210px); height: clamp(150px, 24dvh, 210px); aspect-ratio: 280 / 420; }
  .wizard-preview .stage-pill { grid-column: 2; grid-row: 1; align-self: end; margin-bottom: 6px; }
  .wizard-preview .stage-metrics { grid-column: 2; grid-row: 2; align-self: start; border-radius: var(--radius-md); }
  .wizard-footer { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 20; }
}

/* --- Yazdırma: A4'te iki sütun, renkler korunur --- */
@page { size: A4 portrait; margin: 14mm; }
@media print {
  .topbar, .card-screen-head, .modal-backdrop, .toast, .mobile-toolbar, .skip-link { display: none !important; }
  html, body { background: #fff; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .screen { padding: 0; max-width: none; animation: none; }
  .card-screen-wrap { max-width: none; }
  .briefing-card { grid-template-columns: 0.8fr 1.2fr !important; box-shadow: none; border: 0.5pt solid #CFC6B8; border-radius: 0; break-inside: avoid; }
  .briefing-visual { padding: 10mm 6mm; }
  .briefing-visual .mannequin-mount { height: 150mm; max-width: none; }
  .briefing-details { padding: 10mm; gap: 6mm; }
  .briefing-top h2 { font-size: 26pt; }
  .spec-item strong { font-size: 12pt; }
  .briefing-note { font-size: 8.5pt; }
}

/* Başlık düzeyleri değişti (ekran başına bir h1); görünüm aynı kalır. */
.dress-title-wrap h1 { font-size: 24px; margin: 0; line-height: 1.15; }
.modal-header h2 { font-size: 22px; }
.light-ballroom .dress-title-wrap h1 { color: inherit; }

/* Dar telefonlarda üst çubuk tek satırda kalsın: marka küçülür, süs işareti gizlenir. */

.m-tool-btn { min-width: 44px; }
.text-toggle { white-space: nowrap; }
