/* Dijital Kitap — kitabın kendi sayfası öne çıksın diye sade bir çerçeve.
   Düzen: üstte sayfa gezinme çubuğu, ortada sayfa, altta yapışkan araç çubuğu. */
.dk-app {
  --dk-ink: #1d2b3a;
  --dk-muted: #5b6b7b;
  --dk-bg: #eaf1f6;
  --dk-card: #ffffff;
  --dk-line: #c9d6e0;
  --dk-accent: #d8322a;
  --dk-ok: #1f9d55;
  --dk-bad: #d9480f;
  --dk-font: ui-rounded, "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: light;
  color: var(--dk-ink);
  background: var(--dk-bg);
  font-family: var(--dk-font);
  font-size: 16px;
  line-height: 1.4;
  max-width: 860px;
  margin: 0 auto;
  border-radius: 14px;
  padding-bottom: 4px;
}
.dk-app *, .dk-app *::before, .dk-app *::after { box-sizing: border-box; }
.dk-app button { font-family: inherit; }
.dk-app [hidden] { display: none !important; }

.dk-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px; position: sticky; top: 0; z-index: 30;
  background: var(--dk-bg);
}
.dk-nav {
  flex: 0 0 46px; height: 46px; border-radius: 12px; border: 1px solid var(--dk-line);
  background: var(--dk-card); color: var(--dk-ink); font-size: 28px; line-height: 1; cursor: pointer;
}
.dk-nav:disabled { opacity: .35; cursor: default; }
.dk-select {
  flex: 1 1 auto; min-width: 0; height: 46px; border-radius: 12px; border: 1px solid var(--dk-line);
  background: var(--dk-card); color: var(--dk-ink); font: inherit; font-weight: 600; padding: 0 10px;
}
.dk-info { padding: 0 16px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--dk-muted); }
.dk-info strong { color: var(--dk-ink); font-size: 15px; }

.dk-stage { padding: 0 8px; }
.dk-page {
  position: relative; background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(29,43,58,.12), 0 8px 24px rgba(29,43,58,.10);
  line-height: 0;
}
.dk-img { display: block; width: 100%; height: auto; max-width: 100%; user-select: none; -webkit-user-drag: none; }
.dk-ink, .dk-lines, .dk-layer { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.dk-ink { mix-blend-mode: multiply; pointer-events: none; z-index: 1; }
.dk-lines { z-index: 2; pointer-events: none; overflow: visible; }
.dk-layer { z-index: 3; pointer-events: none; }
.dk-layer > * { position: absolute; pointer-events: auto; }
.dk-drawing .dk-layer > *:not(.dk-link) { pointer-events: none; }
.dk-drawing .dk-ink { cursor: crosshair; }

/* işaretleme */
.dk-mark, .dk-sym, .dk-color, .dk-dot, .dk-spin {
  -webkit-appearance: none; appearance: none; background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.dk-mark { border-radius: 50%; outline: 2px dashed rgba(216,50,42,0); outline-offset: 2px; }
.dk-mark.dk-box { border-radius: 18%; }
.dk-mark:hover, .dk-mark:focus-visible { outline-color: rgba(216,50,42,.55); }
.dk-mark.dk-s-tick.dk-on { background: radial-gradient(circle, var(--dk-accent) 0 52%, transparent 56%); }
.dk-mark.dk-box.dk-s-tick.dk-on { background: var(--dk-accent); box-shadow: inset 0 0 0 3px #fff; }
.dk-mark.dk-s-fill.dk-on { background: rgba(246,201,21,.55); mix-blend-mode: multiply; box-shadow: 0 0 0 3px var(--dk-accent); }
.dk-mark.dk-ok, .dk-sym.dk-ok, .dk-color.dk-ok { box-shadow: 0 0 0 4px var(--dk-ok) !important; }
.dk-mark.dk-bad, .dk-sym.dk-bad, .dk-color.dk-bad { box-shadow: 0 0 0 4px var(--dk-bad) !important; }

.dk-sym {
  border-radius: 50%; color: #1d2b3a; line-height: 1; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", sans-serif;
  outline: 2px dashed rgba(216,50,42,0); outline-offset: 2px;
}
.dk-sym:hover, .dk-sym:focus-visible { outline-color: rgba(216,50,42,.55); }
.dk-color { border-radius: 14%; outline: 2px dashed rgba(216,50,42,0); outline-offset: 2px; }
.dk-color:hover, .dk-color:focus-visible { outline-color: rgba(216,50,42,.55); }
.dk-color.dk-on { box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }

.dk-text {
  border: 0; border-bottom: 2px solid transparent; background: rgba(255,255,255,.55); color: #12304f;
  font: 600 clamp(11px, 2.6vw, 20px)/1.2 var(--dk-font); padding: 0 4px; border-radius: 4px; resize: none;
}
.dk-text:focus { outline: 2px solid var(--dk-accent); background: #fff; }
.dk-text.dk-ok { border-bottom-color: var(--dk-ok); }
.dk-text.dk-bad { border-bottom-color: var(--dk-bad); }

/* eşleştirme */
.dk-dot { width: 9%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; }
.dk-dot::after {
  content: ""; position: absolute; inset: max(2px, calc(50% - 7px)); border-radius: 50%;
  border: 2px solid rgba(216,50,42,.0); background: rgba(216,50,42,0);
}
.dk-dot:hover::after, .dk-dot:focus-visible::after { border-color: rgba(216,50,42,.7); }
.dk-dot.dk-used::after { background: var(--dk-ink); }
.dk-dot.dk-on::after { background: var(--dk-accent); box-shadow: 0 0 0 6px rgba(216,50,42,.25); }
.dk-line { stroke: var(--dk-ink); stroke-width: 4px; stroke-linecap: round; pointer-events: stroke; cursor: pointer; }
.dk-line.dk-ok { stroke: var(--dk-ok); }
.dk-line.dk-bad { stroke: var(--dk-bad); }

/* çark */
.dk-spin { aspect-ratio: 1; transform: translateY(-50%); border-radius: 50%; }
.dk-needle {
  position: absolute; left: 50%; top: 50%; width: 5%; height: 44%; margin-left: -2.5%;
  transform-origin: 50% 0%; transition: transform 2.6s cubic-bezier(.12,.7,.1,1);
  background: linear-gradient(#cfd6dc, #8d99a5); border: 2px solid #4a5560; border-radius: 40% 40% 50% 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.dk-spin-tip {
  position: absolute; left: 50%; top: 104%; transform: translateX(-50%); white-space: nowrap;
  font: 600 13px/1 var(--dk-font); color: #fff; background: var(--dk-ink); padding: 6px 10px; border-radius: 999px;
}
.dk-spun .dk-spin-tip { display: none; }

/* karekod */
.dk-link { border-radius: 10px; outline: 2px solid rgba(216,50,42,.0); display: block; }
.dk-link-tag {
  position: absolute; right: -4px; bottom: -6px; font: 700 11px/1 var(--dk-font); color: #fff;
  background: var(--dk-accent); padding: 4px 7px; border-radius: 999px; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.dk-link:hover, .dk-link:focus-visible { outline-color: var(--dk-accent); }

/* araç çubuğu */
.dk-tools {
  position: sticky; bottom: 0; z-index: 30; margin: 10px 8px 0; padding: 10px;
  background: var(--dk-card); border: 1px solid var(--dk-line); border-radius: 14px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: 0 -4px 16px rgba(29,43,58,.08);
}
.dk-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dk-btn {
  min-height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--dk-line);
  background: #f6f9fb; color: var(--dk-ink); font-size: 15px; font-weight: 600; cursor: pointer;
}
.dk-btn.dk-primary { background: var(--dk-accent); border-color: var(--dk-accent); color: #fff; }
.dk-btn.dk-tool.dk-on { background: var(--dk-ink); border-color: var(--dk-ink); color: #fff; }
.dk-btn.dk-ask { background: #fff4e5; border-color: var(--dk-bad); color: var(--dk-bad); }
.dk-btn:focus-visible, .dk-nav:focus-visible, .dk-select:focus-visible, .dk-sw:focus-visible, .dk-size:focus-visible { outline: 3px solid rgba(216,50,42,.5); outline-offset: 2px; }
.dk-result { font-weight: 700; flex: 1 1 auto; }
.dk-result.dk-all { color: var(--dk-ok); }
.dk-result.dk-some { color: var(--dk-bad); }
.dk-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.dk-sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(29,43,58,.25); cursor: pointer; padding: 0; }
.dk-sw.dk-on { box-shadow: 0 0 0 3px var(--dk-card), 0 0 0 6px var(--dk-ink); }
.dk-sizes { display: flex; gap: 6px; }
.dk-size {
  width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--dk-line); background: #f6f9fb;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.dk-size span { display: block; border-radius: 50%; background: var(--dk-ink); }
.dk-size.dk-on { border-color: var(--dk-ink); box-shadow: inset 0 0 0 2px var(--dk-ink); }
@media (prefers-reduced-motion: reduce) { .dk-needle { transition: none; } }

.dk-mark.dk-s-ring.dk-on { box-shadow: 0 0 0 3px var(--dk-accent), inset 0 0 0 3px var(--dk-accent); }
.dk-mark.dk-s-ring { border-radius: 50%; }
.dk-mark.dk-box.dk-s-ring { border-radius: 14%; }
.dk-mark.dk-s-red.dk-on { background: rgba(224,49,43,.85); mix-blend-mode: multiply; }
.dk-text.dk-center { text-align: center; }
.dk-text.dk-up { text-transform: uppercase; }
.dk-text.dk-cell { padding: 0; background: rgba(255,255,255,.35); font-weight: 700; }
.dk-photo { display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 10px; overflow: hidden; outline: 2px dashed rgba(216,50,42,.45); outline-offset: -6px; }
.dk-photo-img { width: 100%; height: 100%; object-fit: contain; }
.dk-photo-img[hidden] { display: none; }
.dk-photo-tag { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font: 700 14px/1 var(--dk-font); color: #fff; background: var(--dk-accent); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.dk-photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dk-text::placeholder { color: #6b7c8c; opacity: 1; font-weight: 600; }
.dk-text:focus::placeholder { opacity: .45; }
.dk-text[placeholder] { background: rgba(255,255,255,.96); }
