/* Pockle bilgisayar arayüzü. Uygulamadaki iki katman: sayfa (ground/sand, üstünde text*) ve yüzey (surface, üstünde ink*). */
@font-face{font-family:'Dela Gothic One';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/dela-latin-ext.woff2?v=2) format('woff2');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}
@font-face{font-family:'Dela Gothic One';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/dela-latin.woff2?v=2) format('woff2');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:'Golos Text';font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/golos-latin-ext.woff2?v=2) format('woff2');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}
@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/golos-latin.woff2?v=2) format('woff2');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}

:root {
  color-scheme: light dark;
  /* sayfa katmanı */
  --ground: #FBF4EA;
  --sand: #F6EDDF;
  --text: #1D1A16;
  --text-soft: #4F473F;
  --text-muted: #6B6259;
  --line-on-ground: #EAE3D8;
  --accent-on-ground: #BE400C;
  --danger-on-ground: #B91C1C;
  /* yüzey katmanı (iki temada aynı mürekkep) */
  --surface: #FFFFFF;
  --ink: #1D1A16;
  --soft: #4F473F;
  --muted: #6B6259;
  --line: #EAE3D8;
  --accent: #C2410C;
  --accent-soft: #FFEDD5;
  --danger: #B91C1C;
  --on-ink: #FBF4EA;
  /* çerçeve ve gölge */
  --border: #1D1A16;
  --shadow: #1D1A16;
  --scrim: rgba(29, 26, 22, 0.38);
  /* temadan bağımsız */
  --orange: #EA580C;
  --yellow: #FACC15;
  --sky: #38BDF8;
  --radius: 16px;
  --edge: 2px;
  --display: 'Dela Gothic One', 'Golos Text', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1D1A16;
    --sand: #24201B;
    --text: #F4EBDD;
    --text-soft: #D9CEBF;
    --text-muted: #B3A797;
    --line-on-ground: #3D362D;
    --accent-on-ground: #FB923C;
    --danger-on-ground: #F87171;
    --surface: #F6EDDF;
    --accent: #B13C0A;
    --border: #FFF8EE;
    --shadow: #4A4038;
    --scrim: rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

html, body { margin: 0; min-height: 100%; }
body {
  background: var(--ground);
  color: var(--text);
  font: 400 15px/1.5 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.noscript, .boot-error { padding: 24px; }

/* ---------- ortak öğeler ---------- */

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 400 22px/1 var(--display); letter-spacing: -0.01em; }
.brand img { display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  background: var(--surface); color: var(--ink);
  border: var(--edge) solid var(--border); border-radius: var(--radius);
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.btn.primary { background: var(--orange); color: var(--ink); box-shadow: 3px 3px 0 var(--shadow); font-size: 16px; }
.btn.primary:active { transform: translate(2px, 2px); box-shadow: none; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 12px; }
.btn:disabled { opacity: 0.5; cursor: default; }
/* Krem yüzeyin içindeki düğmeler: mürekkep çerçeve (koyu temada beyaz kenar krem üstünde kaybolur). */
.pair-card .btn, .detail .btn, .banner .btn { border-color: var(--ink); }

.lang-btn {
  min-width: 44px; min-height: 36px; padding: 0 10px;
  background: transparent; color: var(--text);
  border: var(--edge) solid var(--line-on-ground); border-radius: 12px;
  font-weight: 700; font-size: 13px; letter-spacing: 0.06em;
}
.lang-btn:hover { border-color: var(--text); }

.badge {
  display: inline-block; align-self: flex-start;
  padding: 2px 7px; border: var(--edge) solid var(--ink); border-radius: 7px;
  background: var(--surface); color: var(--ink);
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; line-height: 1.4;
}

.notice { margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); border: var(--edge) solid var(--ink); }

.readonly { margin: 0; color: var(--text-muted); font-size: 13px; }

/* ---------- eşleştirme ---------- */

.pair-page { min-height: 100vh; display: flex; flex-direction: column; max-width: 860px; margin: 0 auto; padding: 20px 16px 28px; gap: 20px; }
.pair-top { display: flex; align-items: center; justify-content: space-between; }
.pair-main { flex: 1; display: flex; align-items: center; justify-content: center; }
.pair-page > .readonly { text-align: center; }

.pair-card {
  width: 100%; max-width: 620px;
  padding: clamp(20px, 4vw, 36px);
  background: var(--surface); color: var(--ink);
  border: var(--edge) solid var(--border); border-radius: 20px;
  box-shadow: 6px 6px 0 var(--orange);
  text-align: center;
}
.pair-title { margin: 0 0 14px; font: 400 clamp(26px, 4vw, 36px)/1.1 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.pair-title:focus { outline: none; }
.lead { margin: 0 auto 24px; max-width: 46ch; color: var(--soft); font-size: 17px; }

.pair-grid { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 8px 0 20px; text-align: left; flex-wrap: wrap; }
.qr { display: block; width: 246px; height: 246px; border: var(--edge) solid var(--ink); border-radius: 14px; background: #fff; image-rendering: pixelated; }
.steps { margin: 0; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; max-width: 260px; }
.steps li { counter-increment: s; display: flex; gap: 10px; align-items: baseline; color: var(--ink); font-weight: 600; }
.steps li::before {
  content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--yellow); color: var(--ink); border: var(--edge) solid var(--ink); font-size: 13px; font-weight: 700;
}

.code-label { margin: 0 0 8px; color: var(--soft); font-size: 14px; }
.code { display: inline-flex; gap: clamp(3px, 1vw, 6px); margin: 0 0 18px; }
.code span {
  width: 1ch; padding: 6px clamp(5px, 1.5vw, 9px); box-sizing: content-box; text-align: center;
  font: 700 clamp(20px, 5vw, 28px)/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border: var(--edge) solid var(--ink); border-radius: 9px; color: var(--ink); background: var(--surface);
}
.code span:nth-child(4) { margin-right: clamp(4px, 2vw, 10px); }

.waiting { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 18px; color: var(--soft); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

.fp { margin: 6px 0 14px; font: 700 clamp(32px, 7vw, 48px)/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.06em; color: var(--ink); }
.hint { margin: 0 auto 22px; max-width: 44ch; color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- ana ekran ---------- */

.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  background: var(--ground); border-bottom: var(--edge) solid var(--line-on-ground);
}
.search-wrap { flex: 1; display: flex; justify-content: center; min-width: 0; }
.search {
  width: 100%; max-width: 520px; min-height: 44px; padding: 0 16px;
  background: var(--surface); color: var(--ink);
  border: var(--edge) solid var(--border); border-radius: 14px;
}
.search::placeholder { color: var(--muted); }

.layout { flex: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.side { background: var(--sand); border-right: var(--edge) solid var(--line-on-ground); padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; }
.side .readonly { padding: 0 10px; }
.install { display: grid; gap: 10px; padding: 0 10px; }
.install-tip { display: grid; gap: 8px; justify-items: start; padding: 10px 12px; background: var(--ground); border: var(--edge) solid var(--line-on-ground); border-radius: 12px; }
.install-tip p { margin: 0; color: var(--text-soft); font-size: 13px; line-height: 1.45; }
.install-download { color: var(--text-soft); font-size: 13px; text-decoration: underline; justify-self: start; }
/* Çok klasör ekrana sığmazsa menü kendi içinde kayar. İç boşluk: seçili satırın gölgesi ve odak çerçevesi kesilmesin. */
.sidebar {
  position: sticky; top: 84px;
  max-height: calc(100vh - 84px - 18px); overflow-y: auto; overscroll-behavior: contain;
  margin: -5px; padding: 5px;
}
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-head { padding: 14px 10px 6px; color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.nav-item {
  width: 100%; min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: transparent; border: var(--edge) solid transparent; border-radius: 12px;
  color: var(--text); font-weight: 600; text-align: left;
}
.nav-item:hover { border-color: var(--line-on-ground); }
.nav-item[aria-current] { background: var(--surface); color: var(--ink); border-color: var(--border); box-shadow: 3px 3px 0 var(--orange); }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.nav-item[aria-current] .nav-count { color: var(--muted); }

.content { padding: 18px 20px 40px; min-width: 0; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.count { margin: 0; color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.count:empty { display: none; }
.chip.chip-tag { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); max-width: 100%; }
.chip.chip-tag span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.refresh-btn { flex: none; width: 36px; padding: 0; font-size: 18px; line-height: 1; }
.refresh-btn[aria-busy="true"] span { display: inline-block; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .refresh-btn[aria-busy="true"] span { animation: none; opacity: 0.5; } }
/* Listenin üstündeki tek satırlık bilgiler (bu tarayıcı hatırlamayacak; yeni Windows sürümü). */
.notes { display: grid; gap: 8px; margin-bottom: 16px; }
.note {
  display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px;
  background: var(--sand); color: var(--text);
  border: var(--edge) solid var(--line-on-ground); border-radius: 12px; font-size: 14px;
}
.note p { margin: 0; flex: 1; min-width: 0; }
.note a { color: var(--accent-on-ground); font-weight: 700; }
.note .toast-close { color: var(--text); border-color: var(--line-on-ground); }
.chip {
  min-height: 36px; padding: 0 14px;
  background: var(--surface); color: var(--ink);
  border: var(--edge) solid var(--border); border-radius: 999px; font-weight: 600; font-size: 14px;
}
.chip[aria-pressed="true"] { background: var(--orange); color: var(--ink); box-shadow: 2px 2px 0 var(--shadow); }

.banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 12px 14px;
  background: var(--accent-soft); color: var(--ink);
  border: var(--edge) solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--orange);
}
.banner p { margin: 0; flex: 1; min-width: 200px; font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; align-items: start; }
/* Süzgeç değişti, yenisi yükleniyor: eski kartlar soluk durur (boş ekran yanıp sönmez). */
.grid.stale { opacity: 0.5; pointer-events: none; }
.status { margin: 24px 0; color: var(--text-muted); text-align: center; }
.more { display: flex; margin: 24px auto 0; }

/* Kart: krem/beyaz yüzey, kalın çerçeve, sert gölge (görselli kartta renkli). */
.card {
  position: relative; display: flex; flex-direction: column; width: 100%; padding: 0;
  background: var(--surface); color: var(--ink);
  border: var(--edge) solid var(--border); border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--shadow);
  overflow: hidden; text-align: left;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.card:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); }
.card.sh-orange { box-shadow: 4px 4px 0 var(--orange); }
.card.sh-yellow { box-shadow: 4px 4px 0 var(--yellow); }
.card.sh-sky { box-shadow: 4px 4px 0 var(--sky); }
.card.card-note { background: var(--yellow); }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }

.media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--line); border-bottom: var(--edge) solid var(--ink); }
.media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media img:not([src]) { visibility: hidden; }
.media .badge { position: absolute; top: 8px; left: 8px; }
.media .badge-count { top: auto; left: auto; bottom: 8px; right: 8px; }

.card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px; min-width: 0; }
.card .title { font-weight: 600; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card .host { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-note .meta { color: var(--soft); }
.bubble {
  align-self: flex-start; max-width: 100%;
  padding: 6px 10px; background: var(--surface); color: var(--ink);
  border: var(--edge) solid var(--ink); border-radius: 12px 12px 12px 3px;
  font-weight: 700; font-size: 14px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; white-space: pre-line;
}
.star {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--yellow); color: var(--ink); border: var(--edge) solid var(--ink); font-size: 14px; line-height: 1;
}

/* ---------- ayrıntı paneli ---------- */

.scrim { position: fixed; inset: 0; z-index: 20; background: var(--scrim); }
.detail {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 21;
  width: min(560px, 100%); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--ink);
  border-left: var(--edge) solid var(--border);
}
.detail:focus { outline: none; }
.detail-inner { padding: 18px 22px 40px; display: flex; flex-direction: column; gap: 16px; }
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-nav { display: flex; align-items: center; gap: 8px; }
.detail-nav .step { width: 44px; min-height: 44px; padding: 0; font-size: 18px; border-radius: 14px; }
.detail-error { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; }
.detail-error p { margin: 0; flex: 1; min-width: 180px; }
.close {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--surface); color: var(--ink); border: var(--edge) solid var(--ink);
  font-size: 24px; line-height: 1;
}
.detail-media {
  display: flex; align-items: center; justify-content: center;
  min-height: 220px; background: var(--line); border: var(--edge) solid var(--ink); border-radius: 14px; overflow: hidden;
}
.detail-img { display: block; max-width: 100%; max-height: 70vh; object-fit: contain; }
.detail-img-btn { display: flex; max-width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.media-msg { margin: 0; padding: 20px; text-align: center; color: var(--soft); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.media-msg p { margin: 0; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; }
.pager .btn { min-width: 44px; font-size: 20px; }
.pager-label { font-weight: 700; font-variant-numeric: tabular-nums; }
.detail-title { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.detail-link { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-link .host { color: var(--muted); font-size: 14px; }
.plain-url { margin: 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.detail-sec h3 { margin: 0 0 6px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.prose { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
/* Görseldeki yazı: yumuşak zemin, ~70 karakter okuma genişliği, ilk 6 satır */
.ocr-body { max-width: 70ch; padding: 12px 14px; background: var(--line); border: var(--edge) solid var(--ink); border-radius: 12px; color: var(--ink); font-size: 15px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.ocr-body p { margin: 0; }
.ocr-body p + p { margin-top: 1.6em; } /* paragraf arası bir boş satır: 6 satır sınırı düz sayılır */
.ocr-body.collapsed { max-height: calc(6 * 1.6em + 24px + 2 * var(--edge)); overflow: hidden; }
.ocr-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.ocr-actions [hidden] { display: none; }
.ocr-done { color: var(--soft); font-size: 14px; font-weight: 600; }

/* ---------- tam ekran büyütme ---------- */

.zoom { position: fixed; inset: 0; z-index: 30; background: var(--ink); color: var(--on-ink); }
.zoom-stage { position: absolute; inset: 0; overflow: hidden; touch-action: pinch-zoom; user-select: none; }
.zoom-stage.pannable { cursor: grab; }
.zoom-stage.pannable:active { cursor: grabbing; }
.zoom-img { position: absolute; left: 50%; top: 50%; max-width: none; max-height: none; transform-origin: center; visibility: hidden; -webkit-user-drag: none; }
.zoom-img.ready { visibility: visible; }
.zoom-msg { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: var(--on-ink); }
.zoom-msg[hidden] { display: none; }
.zoom-btn {
  position: absolute; z-index: 1; width: 48px; height: 48px; border-radius: 14px;
  background: var(--ink); color: var(--on-ink); border: var(--edge) solid var(--on-ink);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.zoom-btn:disabled { opacity: 0.4; cursor: default; }
.zoom-close { top: 16px; right: 16px; }
.zoom-prev, .zoom-next { top: 50%; margin-top: -24px; }
.zoom-prev { left: 16px; }
.zoom-next { right: 16px; }
.zoom-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; justify-content: center; align-items: center; gap: 16px; padding: 10px 16px; pointer-events: none; font-size: 13px; }
.zoom-hint, .zoom-label { padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--on-ink); border: var(--edge) solid var(--on-ink); }
.zoom-label { font-weight: 700; font-variant-numeric: tabular-nums; }
.zoom-label:empty { display: none; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { min-height: 32px; padding: 3px 12px; border: var(--edge) solid var(--ink); border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 13px; font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.tag:hover { background: var(--yellow); }
.detail-meta { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.detail-meta dt { color: var(--muted); }
.detail-meta dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- ekleme ve favori ---------- */

.add-btn { gap: 6px; box-shadow: 2px 2px 0 var(--shadow); }
.add-btn span { font-size: 18px; line-height: 1; }

.add-dialog {
  width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; overflow: auto;
  background: var(--surface); color: var(--ink);
  border: var(--edge) solid var(--border); border-radius: 20px; box-shadow: 6px 6px 0 var(--orange);
}
.add-dialog::backdrop { background: var(--scrim); }
.add-inner { display: flex; flex-direction: column; gap: 16px; padding: 18px 22px 22px; }
.add-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.add-head h2 { margin: 0; font: 400 24px/1.15 var(--display); }
.add-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.add-tab {
  min-height: 40px; padding: 0 16px;
  background: var(--surface); color: var(--ink);
  border: var(--edge) solid var(--ink); border-radius: 999px; font-weight: 700; font-size: 14px;
}
.add-tab[aria-selected="true"] { background: var(--orange); box-shadow: 2px 2px 0 var(--ink); }
.add-panel { display: flex; flex-direction: column; gap: 14px; }
.add-field { display: flex; flex-direction: column; gap: 6px; }
.add-field label { font-weight: 700; font-size: 14px; }
.add-field input, .add-field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--surface); color: var(--ink);
  border: var(--edge) solid var(--ink); border-radius: 12px; resize: vertical;
}
.add-field input::placeholder { color: var(--muted); }
.add-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: 180px; padding: 16px; text-align: center;
  background: var(--line); border: var(--edge) dashed var(--ink); border-radius: 14px;
}
.add-drop-text { margin: 0; color: var(--soft); max-width: 36ch; }
.add-preview { display: block; max-width: 100%; max-height: 300px; object-fit: contain; border: var(--edge) solid var(--ink); border-radius: 10px; background: #fff; }
.add-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); border: var(--edge) solid var(--ink); font-weight: 600; }
.add-notice { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--line); color: var(--ink); border: var(--edge) dashed var(--ink); font-weight: 600; }
.add-ask { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); border: var(--edge) solid var(--ink); }
.add-ask[hidden] { display: none; }
.add-ask p { margin: 0; font-weight: 600; }
.add-ask-row { display: flex; flex-wrap: wrap; gap: 10px; }
.add-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.add-clear { margin-right: auto; }
.add-dialog .btn { border-color: var(--ink); }
.confirm-dialog { width: min(440px, calc(100% - 32px)); }
.confirm-text { margin: 0; font-size: 17px; font-weight: 600; }
.verify-progress { margin: 18px 0 0; }

.detail-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fav-btn.on { background: var(--yellow); }
.fav-btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
.fav-star { font-size: 16px; line-height: 1; }
.fav-error { margin: 0; flex-basis: 100%; color: var(--danger); font-weight: 600; font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 40; transform: translateX(-50%);
  width: max-content; max-width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px;
  background: var(--surface); color: var(--ink);
  border: var(--edge) solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--orange);
}
.toast p { margin: 0; font-weight: 600; }

/* Pencereye sürüklerken: tıklamaları engellemeyen tam ekran ipucu (iki temada açık kutu, koyu yazı). */
.drop-hint {
  position: fixed; inset: 0; z-index: 45; pointer-events: none;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: var(--scrim);
}
.drop-hint p {
  margin: 0; padding: 28px 36px; max-width: 100%; text-align: center;
  font-family: var(--display); font-size: 22px;
  background: var(--surface); color: var(--ink);
  border: var(--edge) dashed var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--orange);
}
.toast-alert { background: var(--accent-soft); }
.toast-close { flex: none; width: 36px; height: 36px; border-radius: 10px; background: transparent; color: var(--ink); border: var(--edge) solid var(--ink); font-size: 20px; line-height: 1; }

/* ---------- dar ekran ---------- */

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .search-wrap { order: 3; flex-basis: 100%; }
  .brand { margin-right: auto; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { border-right: 0; border-bottom: var(--edge) solid var(--line-on-ground); padding: 10px 16px; gap: 8px; }
  .sidebar { position: static; max-height: none; overflow: visible; margin: 0; padding: 0; }
  .nav-list { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .nav-list li { flex: none; }
  .nav-head { display: none; }
  .nav-item { width: auto; }
  .side .readonly { padding: 0; }
  .install { padding: 0; }
  .content { padding: 16px 16px 32px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .pair-grid { flex-direction: column; text-align: center; }
  .add-inner { padding: 16px; }
  .steps { text-align: left; }
}
