:root {
  --bg: #f6f1ea;
  --panel: #fffdfa;
  --line: #eadfd3;
  --ink: #2f2622;
  --ink-2: #6f625a;
  --accent: #b8385e;
  --accent-2: #93284a;
  --accent-soft: #f8e3ea;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(60, 35, 20, 0.05), 0 8px 24px rgba(60, 35, 20, 0.06);
  --serif: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--ink-2); font-weight: 400; }

/* ---------- Üst bar ---------- */
.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.8);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 38px; height: 38px; }
.brand h1 { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 0; letter-spacing: -0.01em; }
.brand p { margin: 1px 0 0; color: var(--ink-2); font-size: 13px; }

/* ---------- Yerleşim ---------- */
.layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr) 300px;
  gap: 18px;
  padding: 18px 24px 24px;
  height: calc(100vh - 68px);
  min-height: 620px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
  min-height: 0;
}

/* ---------- Sekmeler ---------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  margin: 14px 14px 4px;
  background: #f4ece3;
  border-radius: 12px;
  position: sticky;
  top: 14px;
  z-index: 2;
}
.tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px 10px;
  border-radius: 9px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.tab.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(60, 35, 20, 0.1); }
.tab-panel { padding: 6px 18px 18px; }

.group { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.group:last-of-type { border-bottom: 0; }
.group-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}
.step {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 600;
}

/* ---------- Çiçek kartları ---------- */
.flower-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.flower-card {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 7px 4px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.flower-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(60, 35, 20, 0.08); }
.flower-card .thumb { width: 54px; height: 54px; }
.flower-card .thumb svg, .flower-card .thumb img { width: 100%; height: 100%; display: block; object-fit: contain; }
.flower-card span { text-align: center; line-height: 1.15; }
.flower-card span { font-size: 13px; font-weight: 500; }
.flower-card.is-active { border-color: var(--accent); background: #fff8fa; box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Renk örnekleri ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), inset 0 -4px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.12s;
}
.swatches.small .swatch { width: 24px; height: 24px; }
.swatch:hover { transform: scale(1.1); }
.swatch.is-active::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--ink);
}
.swatch.custom {
  background: conic-gradient(#f44 0deg, #fd4 70deg, #4d6 140deg, #4bf 210deg, #a4f 280deg, #f44 360deg);
  overflow: visible;
  display: grid;
  place-items: center;
}
.swatch.custom input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.swatch.custom .dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.swatches.disabled { opacity: 0.35; pointer-events: none; }

/* ---------- Adet ---------- */
.qty-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.stepper button {
  border: 0;
  background: transparent;
  width: 30px;
  height: 30px;
  font-size: 17px;
  line-height: 1;
  color: var(--ink-2);
}
.stepper button:hover { background: #f6efe7; color: var(--ink); }
.stepper input, .stepper output {
  width: 34px;
  text-align: center;
  border: 0;
  background: transparent;
  font-weight: 600;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.big button { width: 40px; height: 40px; font-size: 20px; }
.stepper.big input { width: 44px; font-size: 16px; }
.quick { display: flex; gap: 6px; }
.quick button {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 10px;
  min-width: 36px;
  height: 34px;
  font-weight: 500;
  color: var(--ink-2);
}
.quick button.is-active { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }

/* ---------- Ekleme kutusu ---------- */
.add-box {
  position: sticky;
  bottom: 12px;
  z-index: 2;
  box-shadow: 0 -10px 24px rgba(255, 253, 250, 0.9), 0 8px 24px rgba(60, 35, 20, 0.08);
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7f4, #fcf1f4);
  border: 1px solid #f1dce2;
}
.add-preview { width: 58px; height: 58px; flex: none; border-radius: 50%; background: #fff; box-shadow: var(--shadow); padding: 5px; }
.add-preview svg, .add-preview img { width: 100%; height: 100%; display: block; object-fit: contain; }
.add-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.add-text strong { font-size: 15px; }
.add-text .muted { font-size: 12px; line-height: 1.35; }
.add-head { display: flex; align-items: center; gap: 12px; }
.add-row { display: flex; gap: 10px; align-items: center; }
.add-row .btn { flex: 1; }
.add-text b.plus {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px dashed var(--accent); color: var(--accent); font-size: 12px; line-height: 1; font-weight: 700;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(184, 56, 94, 0.28); }
.btn.primary:hover { background: var(--accent-2); }
.btn.primary:disabled { background: #d9c3ca; box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink-2); width: 100%; }
.btn.ghost:hover { border-color: #d9b9c2; color: var(--accent-2); background: #fff8fa; }

/* ---------- Süsleme ---------- */
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: #f4ece3;
  margin-bottom: 12px;
}
.segmented button {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 9px;
  font-weight: 500;
  color: var(--ink-2);
}
.segmented button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(60, 35, 20, 0.1); }
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  cursor: pointer;
}
.switch-row span { display: flex; flex-direction: column; gap: 2px; }
.switch-row small { font-size: 12px; }
.switch-row + .swatches { margin: 2px 0 10px; }
.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #ddd2c6;
  position: relative;
  flex: none;
  cursor: pointer;
  transition: background 0.2s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }

/* ---------- Sahne ---------- */
.stage {
  position: relative;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 60% 55% at 50% 45%, #fffaf4 0%, rgba(255, 250, 244, 0) 70%),
    linear-gradient(180deg, #f3ebe1, #ede2d5);
  border: 1px solid var(--line);
  overflow: hidden;
  min-height: 0;
}
.stage::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3%;
  width: 40%;
  height: 4%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(70, 45, 25, 0.18), rgba(70, 45, 25, 0) 70%);
  pointer-events: none;
}
#bouquet {
  position: absolute;
  inset: 16px 16px 20px;
  width: calc(100% - 32px);
  height: calc(100% - 36px);
  filter: drop-shadow(0 18px 24px rgba(70, 40, 20, 0.16));
}
.stage-tools {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 3;
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.9);
  backdrop-filter: blur(6px);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(60, 35, 20, 0.06);
}
.chip-btn:hover { border-color: #d9b9c2; color: var(--accent-2); }
.chip-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.empty-hint {
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  background: rgba(255, 253, 250, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  max-width: min(360px, 80%);
  box-shadow: var(--shadow);
  z-index: 2;
}
.empty-hint span { color: var(--ink-2); font-size: 13px; }

.head.pop {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.6s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
@keyframes pop {
  from { transform: scale(0.15) rotate(-25deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

/* ---------- Sağ panel ---------- */
.panel-right { display: flex; flex-direction: column; }
.right-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 10px;
}
.right-head h2 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin: 0; }
.badge {
  background: var(--accent-soft);
  color: var(--accent-2);
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}
.bq-list { list-style: none; margin: 0; padding: 0 10px; flex: 1; overflow: auto; }
.bq-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
}
.bq-item.is-new { animation: slide 0.25s ease both; }
.bq-item:hover { background: #faf5ef; }
.bq-item .ico { width: 42px; height: 42px; }
.bq-item .ico svg, .bq-item .ico img { width: 100%; height: 100%; display: block; object-fit: contain; }
.bq-item .meta { display: flex; flex-direction: column; min-width: 0; }
.bq-item .meta strong { font-size: 14px; font-weight: 600; }
.bq-item .meta span { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.bq-item .meta i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.bq-item .ctrl { display: flex; align-items: center; gap: 4px; }
.bq-item .remove {
  border: 0;
  background: transparent;
  color: #b3a59a;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 16px;
}
.bq-item .remove:hover { background: #fbe9ee; color: var(--accent-2); }
@keyframes slide { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.list-empty { padding: 8px 18px 16px; font-size: 13px; }
.right-foot { padding: 14px 18px 18px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 12px; }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 12.5px; color: var(--ink-2); }
.summary b { font-weight: 500; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.summary i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }

/* ---------- Bildirim ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 340px minmax(0, 1fr);
    grid-template-rows: minmax(560px, 1fr) auto;
    height: auto;
  }
  .panel-left { grid-row: 1 / span 2; max-height: calc(100vh - 100px); position: sticky; top: 18px; }
  .stage { min-height: 600px; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 16px; }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; padding: 12px 16px 20px; gap: 14px; }
  .layout > * { min-width: 0; }
  .brand p { font-size: 12px; }
  .panel-left { grid-row: auto; max-height: none; position: static; order: 2; }
  .stage { order: 1; min-height: 440px; height: min(72vh, 560px); }
  .stage-tools { left: 10px; right: 10px; justify-content: center; top: 10px; }
  .chip-btn { padding: 7px 10px; font-size: 12.5px; }
  .tab { padding: 9px 6px; font-size: 13px; }
  .panel-right { order: 3; }
}

/* ---------- Mod geçişi (Çizim / Gerçek) ---------- */
.mode-switch {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 14px;
  background: #f1e8de;
  border: 1px solid var(--line);
}
.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.mode-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.mode-btn.is-active { background: #fff; color: var(--accent-2); box-shadow: 0 1px 4px rgba(60, 35, 20, 0.12); }

/* ---------- Buket boyutu ---------- */
.size-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.size-chip {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 7px 2px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transition: border-color 0.15s, background 0.15s;
}
.size-chip b { font-size: 16px; font-weight: 600; }
.size-chip small { font-size: 11px; color: var(--ink-2); }
.size-chip.is-active { border-color: var(--accent); background: var(--accent-soft); }
.size-chip.is-active b { color: var(--accent-2); }
.size-custom { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }

.link-btn {
  border: 0;
  background: none;
  padding: 2px 0;
  color: var(--accent-2);
  font-weight: 500;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: left;
}
.link-btn.center { text-align: center; }
.link-btn:disabled { color: #bba8ae; cursor: not-allowed; }

/* ---------- Sahne araçları ---------- */
.stage-tools { flex-wrap: wrap; justify-content: flex-end; left: 14px; }
.segmented.small { margin: 0; padding: 3px; background: rgba(241, 232, 222, 0.92); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 999px; }
.segmented.small button { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.segmented.small button:disabled { opacity: 0.4; cursor: not-allowed; }
.chip-btn.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }

.gl-wrap { position: absolute; inset: 0; }
.gl-wrap canvas { width: 100% !important; height: 100% !important; display: block; outline: none; }

/* Buketteki yer işaretleri */
.slot-node.empty { cursor: pointer; }
.slot-hit { fill: transparent; }
.slot-ring { fill: rgba(255, 255, 255, 0.55); stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 4 3; transition: fill 0.15s; }
.slot-plus { stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.slot-node.empty:hover .slot-ring, .slot-node.empty.is-target .slot-ring { fill: var(--accent); stroke: #fff; }
.slot-node.empty:hover .slot-plus, .slot-node.empty.is-target .slot-plus { stroke: #fff; }
.slot-node.filled { cursor: grab; }
.slot-node.filled.is-dragging { opacity: 0.85; cursor: grabbing; }
.dragging-active .slot-node.filled.is-dragging { pointer-events: none; }
.sel-ring { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 7 4; pointer-events: none; }
.drop-ring { fill: rgba(47, 158, 110, 0.15); stroke: #2f9e6e; stroke-width: 3; pointer-events: none; }
.deco { pointer-events: none; }
.hide-slots .slot-node.empty, .hide-slots .sel-ring { display: none; }

/* Seçili çiçek menüsü */
.popover {
  position: absolute;
  z-index: 6;
  min-width: 210px;
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(60, 35, 20, 0.18);
  padding: 10px;
  transform: translate(-50%, calc(-100% - 14px));
}
.popover::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: #fffdfa;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}
.popover.below { transform: translate(-50%, 18px); }
.popover.below::after { bottom: auto; top: -7px; transform: translateX(-50%) rotate(225deg); }
.pop-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pop-head strong { flex: 1; font-size: 14px; }
.pop-ico { width: 32px; height: 32px; }
.pop-ico svg, .pop-ico img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pop-close { border: 0; background: transparent; color: #b3a59a; width: 26px; height: 26px; border-radius: 8px; }
.pop-close:hover { background: #f6efe7; color: var(--ink); }
.pop-actions { display: flex; flex-direction: column; gap: 6px; }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 10px; background: #f6efe7; color: var(--ink); }
.btn.small:hover { background: #efe4d8; }
.btn.small.danger { background: #fbe9ee; color: var(--accent-2); }
.btn.small.danger:hover { background: #f7d9e2; }

.stage-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  background: rgba(47, 38, 34, 0.78);
  color: #fff;
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.stage-hint:empty { display: none; }

/* Doluluk göstergesi */
.fill-meter { margin: 0 18px; height: 8px; border-radius: 999px; background: #f1e8de; overflow: hidden; }
.fill-bar { height: 100%; width: 0; background: linear-gradient(90deg, #e98aa6, var(--accent)); border-radius: 999px; transition: width 0.3s; }
.fill-text { margin: 6px 18px 4px; font-size: 12.5px; }
.foot-actions { display: flex; gap: 8px; }
.foot-actions .btn { flex: 1; padding: 10px 12px; }

/* Kaynaklar penceresi */
.modal { position: fixed; inset: 0; background: rgba(40, 28, 22, 0.45); display: grid; place-items: center; z-index: 30; padding: 16px; }
.modal-card { background: var(--panel); border-radius: 18px; max-width: 640px; width: 100%; max-height: 80vh; overflow: auto; padding: 20px 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-family: var(--serif); margin: 0; font-size: 20px; }
.credits-list { display: grid; gap: 8px; margin-top: 12px; font-size: 12.5px; }
.credit { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; background: #faf5ef; }
.credit img { width: 40px; height: 40px; object-fit: contain; }
.credit a { color: var(--accent-2); word-break: break-all; }

@media (max-width: 1180px) {
  .topbar { height: auto; padding: 10px 24px; flex-wrap: wrap; }
  .layout { height: auto; }
}
@media (max-width: 760px) {
  .mode-switch { width: 100%; }
  .mode-btn { flex: 1; justify-content: center; padding: 9px 8px; font-size: 13px; }
  .chip-btn span { display: none; }
  .stage-hint { font-size: 11.5px; white-space: normal; text-align: center; border-radius: 12px; }
  .size-chip small { font-size: 10px; }
}

/* Yükleme hatası uyarısı */
.load-error {
  position: fixed; left: 50%; top: 80px; transform: translateX(-50%); z-index: 40;
  max-width: min(560px, calc(100% - 32px)); background: #fff4f6; border: 1px solid #f1c6d2; color: var(--ink);
  border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); font-size: 13px; line-height: 1.5;
}
.load-error code { display: block; margin-top: 6px; color: var(--accent-2); font-size: 12px; word-break: break-all; }

/* 3B hazır açılar: sahnenin sol altı */
.view-presets { position: absolute; left: 14px; bottom: 56px; z-index: 3; }
@media (max-width: 760px) { .view-presets { bottom: 64px; } }

#greenAmount { margin-top: 4px; }
#greenAmount.disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Paylaşım ---------- */
.chip-btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip-btn.accent:hover { background: var(--accent-2); color: #fff; border-color: var(--accent-2); }
.share-main { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.share-main svg, .chip-btn.accent svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.share-card { max-width: 720px; }
.share-body { display: grid; grid-template-columns: 240px 1fr; gap: 20px; margin-top: 14px; align-items: start; }
.share-preview {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 40%, #fffaf4, #eee3d6);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.share-preview svg, .share-preview img { width: 100%; height: 100%; display: block; object-fit: contain; }
.share-side p { margin: 0 0 14px; font-size: 13px; line-height: 1.5; }
.share-link { display: flex; gap: 8px; }
.share-link input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  background: #fff;
  color: var(--ink-2);
}
.share-link .btn { padding: 10px 16px; white-space: nowrap; }
.share-targets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.target {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  padding: 10px 12px; font-weight: 500; text-align: left;
}
.target:hover { border-color: #d9b9c2; background: #fff8fa; }
.target .dot { width: 22px; height: 22px; border-radius: 7px; flex: none; }
.dot.wa { background: #25d366; } .dot.tg { background: #2aa3df; } .dot.xx { background: #111; }
.dot.em { background: #c9a27e; } .dot.nt { background: var(--accent); }

.shared-banner {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: space-between;
  background: rgba(255, 253, 250, 0.95);
  backdrop-filter: blur(6px);
  border: 1px solid #f1dce2;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.sb-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.sb-text strong { font-size: 14px; }
.sb-text span { font-size: 12.5px; color: var(--ink-2); }
.sb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.small.ghost-sm { background: transparent; border: 1.5px solid var(--line); color: var(--ink-2); }
.btn.small.ghost-sm:hover { border-color: #d9b9c2; color: var(--accent-2); }

@media (max-width: 760px) {
  .share-body { grid-template-columns: 1fr; }
  .share-preview { max-width: 220px; margin: 0 auto; }
}

.stage.is-shared .stage-hint, .stage.is-shared .view-presets { display: none; }
