/* iMaker — ışık masası (gündüz) / karanlık oda (gece) */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #eceef1;          /* ışık masası */
  --panel: #ffffff;
  --panel-2: #f5f6f8;
  --ink: #16181b;
  --muted: #676d76;
  --line: #d6dae0;
  --line-strong: #b9bfc8;
  --sun: #ff5d1f;         /* sunburst turuncusu */
  --sun-2: #ffb21a;       /* güneş çekirdeği */
  --sun-ink: #2a1200;
  --danger: #c8321f;
  --ok: #1d7f52;
  --shadow: 0 1px 2px rgb(20 24 30 / 6%), 0 8px 24px -12px rgb(20 24 30 / 18%);
  --radius: 14px;
  --radius-sm: 9px;
  --display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
  --composer-h: 150px;
  --kb: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;        /* karanlık oda */
    --panel: #1a1c1f;
    --panel-2: #212328;
    --ink: #ecebe7;
    --muted: #949aa3;
    --line: #2b2e34;
    --line-strong: #3d414a;
    --sun: #ff6a2a;
    --sun-2: #ffbb33;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px -14px rgb(0 0 0 / 60%);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wordmark {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ------------------------------------------------------------------ düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--panel); font-weight: 600; font-size: 15px;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; }
.btn-sun {
  border: 0; color: var(--sun-ink);
  background: linear-gradient(180deg, var(--sun-2), color-mix(in srgb, var(--sun-2) 55%, var(--sun)));
  font-family: var(--display); font-stretch: 112%; font-weight: 700; letter-spacing: .01em;
}
.btn-sun:disabled { opacity: .55; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  border: 0; background: transparent; color: var(--ink);
}
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.icon-btn[aria-pressed="true"] { color: var(--sun); }
.icon-btn[aria-pressed="true"] svg { fill: currentColor; }
.icon-btn.small { width: 36px; height: 36px; }
.icon-btn.on-dark { color: #fff; }
.icon-btn.on-dark:hover { background: rgb(255 255 255 / 12%); }

/* ------------------------------------------------------------------ alanlar */
.field { display: grid; gap: 6px; margin: 0 0 14px; }
.field-label {
  font-family: var(--display); font-stretch: 118%; font-weight: 700;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.field input, .input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 11px 14px;
  border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--panel); font-size: 16px; outline: none;
}
.field input:focus, .input:focus { border-color: var(--sun); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 22%, transparent); }
textarea.input { min-height: 72px; resize: vertical; line-height: 1.4; }
.form-error { color: var(--danger); font-size: 14px; min-height: 1.2em; margin: 0 0 12px; }
.form-error:empty { min-height: 0; margin: 0; }
.form-hint { color: var(--muted); font-size: 13px; margin: -6px 0 12px; }

/* ------------------------------------------------------------------ giriş */
.login {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background:
    repeating-conic-gradient(from 0deg at 50% 38%, color-mix(in srgb, var(--sun-2) 10%, transparent) 0 4deg, transparent 4deg 12deg),
    var(--bg);
}
.login-card {
  width: min(100%, 380px); padding: 34px 26px 26px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  text-align: center;
}
.login-card form { text-align: left; margin-top: 26px; }
.login-mark { display: grid; place-items: center; margin: 0 auto 16px; width: 76px; height: 76px; position: relative; }
.login-mark::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(var(--sun) 0 9deg, transparent 9deg 20deg);
  mask: radial-gradient(circle, transparent 46%, #000 47%, #000 70%, transparent 71%);
  animation: spin 40s linear infinite;
}
.sun-disc { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #ffe08a, var(--sun-2) 55%, var(--sun)); }
.login .wordmark { font-size: 34px; }
.login-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------------ üst çubuk */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  padding-top: env(safe-area-inset-top, 0px);
}
.top-inner { max-width: 820px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .wordmark { font-size: 21px; }
.brand-sun {
  width: 22px; height: 22px; border-radius: 50%; position: relative;
  background: radial-gradient(circle, var(--sun-2) 0 34%, transparent 35%);
}
.brand-sun::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(var(--sun) 0 12deg, transparent 12deg 30deg);
  mask: radial-gradient(circle, transparent 44%, #000 45%);
}
body.busy .brand-sun::after { animation: spin 6s linear infinite; }
.top-actions { display: flex; gap: 2px; }
.searchbar { max-width: 820px; margin: 0 auto; display: flex; align-items: center; gap: 6px; padding: 0 10px 10px 16px; }
.searchbar input {
  flex: 1; min-height: 42px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--panel); padding: 0 14px 0 38px; font-size: 16px; outline: none;
}
.searchbar input:focus { border-color: var(--sun); }
.searchbar-icon { position: absolute; margin-left: 12px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.menu {
  position: absolute; right: 10px; top: calc(100% - 4px); z-index: 30; min-width: 220px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px;
}
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 12px;
  border: 0; background: transparent; border-radius: 10px; text-align: left; font-size: 15px;
}
.menu button:hover { background: var(--panel-2); }
.menu-foot { margin: 4px 12px 6px; font: 11px/1.4 var(--mono); color: var(--muted); }

/* ------------------------------------------------------------------ akış */
.feed {
  max-width: 820px; margin: 0 auto; padding: 14px 12px calc(var(--composer-h) + 24px);
  display: grid; gap: 14px;
}
.feed-end { height: 1px; }
.empty {
  margin: 12vh auto 0; max-width: 420px; text-align: center; padding: 0 20px; color: var(--muted);
}
.empty h2 { font-family: var(--display); font-stretch: 120%; font-size: 22px; color: var(--ink); margin: 18px 0 8px; }
.empty p { margin: 0 0 16px; }
.empty-sun { width: 120px; height: 120px; margin: 0 auto; border-radius: 50%; position: relative; }
.empty-sun::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(color-mix(in srgb, var(--sun) 55%, transparent) 0 6deg, transparent 6deg 15deg);
  mask: radial-gradient(circle, transparent 30%, #000 31%, transparent 70%);
}
.empty-sun::after { content: ""; position: absolute; inset: 38%; border-radius: 50%; background: var(--sun-2); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.example {
  border: 1px dashed var(--line-strong); background: transparent; border-radius: 999px;
  padding: 8px 14px; font-size: 14px; color: var(--ink);
}
.feed-note { text-align: center; color: var(--muted); font-size: 14px; padding: 8px; }

/* iş kartı */
.job {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  animation: rise .35s cubic-bezier(.2,.8,.2,1);
}
.job-head { display: flex; align-items: flex-start; gap: 6px; padding: 12px 6px 8px 14px; }
.job-prompt {
  flex: 1; margin: 2px 0 0; font-size: 15px; line-height: 1.42; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer;
}
.job-prompt.open { -webkit-line-clamp: unset; display: block; }
.job-refs { display: flex; gap: 6px; padding: 0 14px 10px; align-items: center; }
.job-refs img { width: 34px; height: 34px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); }
.job-refs span { font-size: 12px; color: var(--muted); margin-right: 2px; }
.job-grid { display: grid; gap: 3px; background: var(--panel-2); }
.job-grid.n1 { grid-template-columns: 1fr; }
.job-grid.n2, .job-grid.n4 { grid-template-columns: 1fr 1fr; }
.job-grid.n3 { grid-template-columns: 1fr 1fr 1fr; }
.shot {
  position: relative; display: block; width: 100%; border: 0; padding: 0; margin: 0;
  background: var(--panel-2); overflow: hidden; aspect-ratio: 1 / 1;
}
.job-grid.n1 .shot { max-height: 74vh; }
.shot img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.job-grid.n1 .shot img { object-fit: contain; }
.shot img.loaded { opacity: 1; }
.shot.checker { background-color: #fff; background-image: conic-gradient(#e8e8e8 25%, #fff 0 50%, #e8e8e8 0 75%, #fff 0); background-size: 18px 18px; }
.shot.failed { display: grid; place-items: center; padding: 18px; color: var(--danger); font-size: 13px; text-align: center; aspect-ratio: auto; min-height: 140px; cursor: default; }

/* banyo: üretilirken */
.shot.developing { cursor: default; }
.shot.developing::before {
  content: ""; position: absolute; inset: -40%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--sun-2) 26%, transparent) 0 5deg, transparent 5deg 14deg);
  animation: spin 18s linear infinite;
}
.shot.developing::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--sun-2) 70%, transparent) 0 6%, color-mix(in srgb, var(--sun) 18%, transparent) 22%, transparent 62%);
  animation: breathe 3.2s ease-in-out infinite;
}
.shot.queued::before { animation-duration: 60s; opacity: .45; }
.dev-label {
  position: absolute; left: 10px; bottom: 9px; z-index: 1;
  font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
  background: color-mix(in srgb, var(--panel) 80%, transparent); padding: 6px 8px; border-radius: 6px;
}

/* film kenarı: gerçek ayarlar */
.job-edge {
  display: flex; flex-wrap: wrap; gap: 2px 0; align-items: center;
  padding: 9px 14px 0; font: 500 10.5px/1.6 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.job-edge span + span::before { content: "·"; margin: 0 .55em; color: var(--line-strong); }
.job-edge .st-run { color: var(--sun); }
.job-edge .st-fail { color: var(--danger); }
.job-error { margin: 8px 14px 0; font-size: 13px; color: var(--danger); }
.job-actions { display: flex; gap: 2px; padding: 4px 6px 6px; flex-wrap: wrap; }
.act {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px;
  border: 0; background: transparent; border-radius: 10px; font-size: 13.5px; color: var(--ink);
}
.act:hover { background: var(--panel-2); }
.act svg { width: 18px; height: 18px; }
.act.fav[aria-pressed="true"] { color: var(--sun); }
.act.fav[aria-pressed="true"] svg { fill: currentColor; }
.act.spacer { margin-left: auto; }

/* ------------------------------------------------------------------ yazma alanı */
.composer {
  position: fixed; left: 0; right: 0; bottom: var(--kb); z-index: 25;
  padding: 0 10px calc(10px + var(--safe-b));
  pointer-events: none;
}
.composer-inner {
  pointer-events: auto;
  max-width: 820px; margin: 0 auto;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 -2px 30px -12px rgb(0 0 0 / 25%), var(--shadow);
  padding: 8px;
}
.compose-row { display: flex; align-items: flex-end; gap: 6px; }
.add-ref { color: var(--muted); flex: none; }
#prompt {
  flex: 1; min-height: 44px; max-height: 38vh; padding: 11px 4px; resize: none;
  border: 0; outline: none; background: transparent; font-size: 16px; line-height: 1.4;
}
#prompt::placeholder { color: var(--muted); }

/* imza: güneş düğmesi */
.sun-btn {
  position: relative; flex: none; width: 52px; height: 52px; border: 0; padding: 0; border-radius: 50%;
  background: transparent; display: grid; place-items: center;
}
.sun-rays {
  position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(var(--sun) 0 10deg, transparent 10deg 22.5deg);
  mask: radial-gradient(circle, transparent 50%, #000 51%, #000 69%, transparent 70%);
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.sun-core {
  position: relative; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #ffe49a, var(--sun-2) 52%, var(--sun));
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--sun-2) 60%, transparent);
  transition: transform .15s ease;
}
.sun-btn:hover .sun-rays { transform: rotate(22.5deg) scale(1.04); }
.sun-btn:active .sun-core { transform: scale(.9); }
.sun-btn:disabled { opacity: .5; cursor: progress; }
body.busy .sun-rays { animation: spin 7s linear infinite; }
.sun-count {
  position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--ink); color: var(--panel);
  font: 700 11px/20px var(--mono); text-align: center;
}
.sun-count:empty { display: none; }

.refs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 8px; scrollbar-width: none; }
.refs:empty { display: none; }
.refs::-webkit-scrollbar { display: none; }
.ref {
  position: relative; flex: none; width: 58px; height: 58px; border-radius: 11px; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel-2);
}
.ref img { width: 100%; height: 100%; object-fit: cover; }
.ref .x {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: rgb(0 0 0 / 62%); color: #fff; display: grid; place-items: center; padding: 0;
}
.ref .x svg { width: 13px; height: 13px; stroke-width: 2.4; }
.ref.uploading::after {
  content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--panel) 55%, transparent);
  animation: breathe 1.2s ease-in-out infinite;
}
.ref .pinned {
  position: absolute; left: 3px; bottom: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--sun-2); color: var(--sun-ink); display: grid; place-items: center;
}
.ref .pinned svg { width: 12px; height: 12px; stroke-width: 2.2; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  min-height: 32px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2);
  font: 600 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
}
.chip svg { width: 15px; height: 15px; }
.chip .pin-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sun); }
.chip.settings { background: var(--ink); color: var(--panel); border-color: var(--ink); }

/* ------------------------------------------------------------------ alt sayfa (ayarlar) */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgb(10 12 15 / 38%); animation: fade .2s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--panel); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgb(0 0 0 / 25%);
  padding-bottom: var(--safe-b);
  animation: sheet-up .28s cubic-bezier(.2,.8,.2,1);
}
.sheet-small { max-height: 70dvh; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 2px 20px; flex: none; }
.sheet-head h2 { margin: 0; font-family: var(--display); font-stretch: 120%; font-weight: 800; font-size: 20px; }
.sheet-note { margin: 0 20px 6px; color: var(--muted); font-size: 13px; flex: none; }
.inline-pin { width: 15px; height: 15px; vertical-align: -3px; color: var(--sun); }
.sheet-body { overflow-y: auto; padding: 6px 20px 16px; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 8px; justify-content: space-between; padding: 10px 16px 12px; border-top: 1px solid var(--line); flex: none; }
.sheet-foot .btn { min-height: 40px; font-size: 14px; padding: 0 14px; }

.set { padding: 14px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 10px; }
.set:last-child { border-bottom: 0; }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.set-head h3 {
  margin: 0; font-family: var(--display); font-stretch: 118%; font-weight: 700;
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.set-value { font: 600 12px var(--mono); color: var(--ink); margin-left: auto; text-transform: uppercase; letter-spacing: .04em; }
.pin {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px 0 8px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 12.5px; font-weight: 600;
}
.pin svg { width: 16px; height: 16px; }
.pin[aria-pressed="true"] { color: var(--sun-ink); background: var(--sun-2); border-color: var(--sun-2); }
.pin[aria-pressed="true"] svg { fill: currentColor; }
.set-hint { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.set-hint.warn { color: var(--danger); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--panel); font-size: 14px; font-weight: 600;
}
.seg button[aria-checked="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.ratio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; }
.ratio-grid button {
  display: grid; justify-items: center; align-content: end; gap: 6px; height: 74px; padding: 8px 4px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel); font: 600 12px var(--mono);
}
.ratio-grid button[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: var(--panel); }
.ratio-box { border: 1.6px solid currentColor; border-radius: 3px; }
.ratio-box.auto { border-style: dashed; }
.custom-size { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.custom-size input { width: 100%; min-height: 44px; text-align: center; font: 600 16px var(--mono); }
.custom-size span { color: var(--muted); }
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.preset-row button { min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px dashed var(--line-strong); background: transparent; font-size: 12.5px; }
.range-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.range-row input[type=range] { flex: 1; accent-color: var(--sun); }
.range-row output { font: 600 13px var(--mono); min-width: 3ch; text-align: right; }
.sub-label { font-family: var(--display); font-stretch: 118%; font-weight: 700; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 20px 0 10px; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.recent-grid button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 0; background: var(--panel-2); }
.recent-grid img { width: 100%; height: 100%; object-fit: cover; }
.recent-grid p { grid-column: 1 / -1; color: var(--muted); font-size: 14px; margin: 0; }
.ref-pin-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ref-pin-row img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* ------------------------------------------------------------------ görüntüleyici */
.viewer { position: fixed; inset: 0; z-index: 60; background: #0b0b0c; color: #fff; display: grid; grid-template-rows: auto 1fr auto; animation: fade .18s ease; }
.viewer-top { display: flex; align-items: center; gap: 10px; padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 6px; }
.viewer-count { font: 600 12px var(--mono); letter-spacing: .08em; }
.viewer-meta { margin-left: auto; padding-right: 10px; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #a6a9ae; }
.viewer-stage { position: relative; overflow: auto; display: grid; place-items: center; touch-action: pan-x pan-y pinch-zoom; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.viewer-stage.zoom { place-items: start; }
.viewer-stage.zoom img { max-width: none; max-height: none; }
.viewer-stage.checker img { background-color: #fff; background-image: conic-gradient(#e8e8e8 25%, #fff 0 50%, #e8e8e8 0 75%, #fff 0); background-size: 18px 18px; }
.viewer-nav {
  position: fixed; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: rgb(255 255 255 / 12%); color: #fff; display: none; place-items: center;
}
.viewer-nav.prev { left: 12px; }
.viewer-nav.next { right: 12px; }
@media (hover: hover) and (min-width: 700px) { .viewer-nav:not([hidden]) { display: grid; } }
.viewer-bar { display: flex; justify-content: center; gap: 4px; padding: 8px 8px calc(10px + var(--safe-b)); }
.vbtn {
  display: grid; justify-items: center; gap: 4px; min-width: 72px; padding: 8px 6px; border: 0; border-radius: 12px;
  background: transparent; color: #fff; font-size: 12px; text-decoration: none;
}
.vbtn:hover { background: rgb(255 255 255 / 10%); }

/* ------------------------------------------------------------------ iletişim kutusu */
.dialog {
  width: min(92vw, 400px); border: 1px solid var(--line); border-radius: 20px; padding: 22px 20px 18px;
  background: var(--panel); color: var(--ink); box-shadow: var(--shadow);
}
.dialog::backdrop { background: rgb(10 12 15 / 45%); }
.dialog h2 { margin: 0 0 16px; font-family: var(--display); font-stretch: 118%; font-size: 20px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ------------------------------------------------------------------ bildirim */
.toast-wrap {
  position: fixed; left: 0; right: 0; z-index: 70; bottom: calc(var(--composer-h) + var(--kb) + 18px);
  display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px;
}
.toast {
  pointer-events: auto; max-width: 520px; padding: 11px 16px; border-radius: 12px;
  background: var(--ink); color: var(--panel); font-size: 14px; box-shadow: var(--shadow);
  animation: rise .25s ease;
}
.toast.err { background: var(--danger); color: #fff; }
.drop-hint {
  position: fixed; inset: 10px; z-index: 80; border: 2px dashed var(--sun); border-radius: 22px;
  background: color-mix(in srgb, var(--bg) 80%, transparent); display: grid; place-items: center;
  font-family: var(--display); font-stretch: 118%; font-weight: 700; font-size: 18px; pointer-events: none;
}

/* ------------------------------------------------------------------ geniş ekran */
@media (min-width: 960px) {
  .sheet:not(.sheet-small) {
    left: auto; top: 0; width: 420px; max-height: none; border-radius: 0;
    border-left: 1px solid var(--line); animation: sheet-in .26s cubic-bezier(.2,.8,.2,1);
  }
  .sheet:not(.sheet-small) .sheet-grip { display: none; }
  .sheet:not(.sheet-small) .sheet-head { padding-top: 18px; }
  .sheet-small { left: 50%; right: auto; bottom: auto; top: 50%; translate: -50% -50%; width: 520px; border-radius: 20px; animation: fade .2s ease; }
  .sheet-small .sheet-grip { display: none; }
  .feed { padding-top: 22px; gap: 18px; }
}

/* ------------------------------------------------------------------ hareket */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-in { from { transform: translateX(100%); } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 30%, 70% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }
.shake { animation: shake .35s ease; }

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