/* Wobira — görünüm.
   Fikir: pasaport sayfası + havalimanı kalkış panosu. Tek sütun, önce telefon.
   Dış yazı tipi yok (sayfa dış adrese bağlanmaz); sistem yazı tipleri kullanılır. */

:root {
  --paper: #eef2ef;      /* pasaport kâğıdı, hafif yeşil-gri */
  --card: #f8faf8;
  --ink: #18322f;        /* koyu petrol mürekkebi */
  --muted: #566b66;
  --line: #c6d1cc;
  --stamp: #4a3aa0;      /* damga mürekkebi (mor) */
  --board: #14181a;      /* kalkış panosu */
  --board-fg: #f2c230;
  --ok: #2c7046;
  --warn: #9a4c17;
  --danger: #a3302a;
  --font-display: "Avenir Next Condensed", "DIN Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1615; --card: #172120; --ink: #e2ebe8; --muted: #93a6a1; --line: #2b3a37;
    --stamp: #a598f0; --board: #050707; --board-fg: #f2c230; --ok: #6cc28c; --warn: #e39a5f; --danger: #ef7d76;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1615; --card: #172120; --ink: #e2ebe8; --muted: #93a6a1; --line: #2b3a37;
  --stamp: #a598f0; --board: #050707; --board-fg: #f2c230; --ok: #6cc28c; --warn: #e39a5f; --danger: #ef7d76;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.5 var(--font-body);
  -webkit-text-size-adjust: 100%;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--ink);
}
a { color: inherit; }
[hidden] { display: none !important; }

.wrap {
  max-width: 34rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px;
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.center { text-align: center; }

h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.01em; text-wrap: balance; margin: 0; }
h2 { font-size: 1.9rem; line-height: 1.1; text-transform: uppercase; }
p { margin: 0; }
.eyebrow { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.small, small { font-size: 0.85rem; color: var(--muted); }
.big { font-size: 1.2rem; font-weight: 600; }
em { font-style: normal; color: var(--warn); }

/* üst çubuk */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--ink); color: var(--paper); }
.bar-in {
  max-width: 34rem; margin: 0 auto; display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 10px;
}
.brand { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-right: auto; }
.chip { font-size: 0.75rem; padding: 2px 7px; overflow: hidden; text-overflow: ellipsis; min-width: 0; border: 1px solid color-mix(in srgb, var(--paper) 35%, transparent); border-radius: 999px; font-variant-numeric: tabular-nums; }
.chip.money { background: var(--board-fg); color: #14181a; border-color: transparent; font-weight: 700; }
.bar .link { color: var(--paper); font-size: 0.9rem; }
@media (max-width: 380px) { .brand { font-size: 0.85rem; } }

/* giriş */
.hero { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.title { font-size: clamp(3.4rem, 18vw, 5.5rem); line-height: 0.9; text-transform: uppercase; letter-spacing: 0.02em; }
.lede { font-size: 1.15rem; max-width: 30ch; }

/* düğmeler */
.btn {
  appearance: none; border: 2px solid var(--ink); background: var(--ink); color: var(--paper);
  font: 600 1rem/1.2 var(--font-body); padding: 13px 18px; border-radius: var(--r); cursor: pointer; text-align: center;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: 0.45; cursor: default; filter: none; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.mic { background: var(--stamp); border-color: var(--stamp); font-size: 1.1rem; padding: 18px; }
.link { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:disabled { opacity: 0.4; cursor: default; }
:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; }

/* kartlar */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.check input { width: 22px; height: 22px; }

.opts { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.opts legend { font-weight: 600; margin-bottom: 6px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; }
.opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt span { display: flex; flex-direction: column; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
select, input[type="text"], #typedIn, textarea {
  font: 1rem var(--font-body); color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 12px; width: 100%;
}
#typed { flex-wrap: nowrap; }
#typed input { flex: 1; min-width: 0; }
.mono { font-family: var(--font-mono); font-size: 0.75rem; }

/* konuşma */
.talk { border-left: 4px solid var(--ink); padding: 4px 0 4px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 1.2rem; }
.who { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.local { font-style: italic; }
.ask { font-size: 1.15rem; font-weight: 600; }
.say { align-items: center; text-align: center; border-style: dashed; border-width: 2px; }
.target { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; line-height: 1.1; }
.words { font-weight: 600; letter-spacing: 0.02em; }
.reply { font-size: 1.15rem; color: var(--warn); }
.pic { width: 104px; height: 80px; color: var(--muted); }

/* kalkış panosu */
.board { background: var(--board); color: var(--board-fg); border-radius: var(--r); padding: 14px 16px; font-family: var(--font-mono); overflow-x: auto; }
.board-title { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; color: #c9cfd1; border-bottom: 1px solid #333b3e; padding-bottom: 8px; margin-bottom: 4px; }
.board ul, .ledger, .plain { list-style: none; padding: 0; margin: 0; }
.board li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #333b3e; text-transform: uppercase; font-size: 0.9rem; }
.board li:last-child { border-bottom: 0; }
.board b { font-variant-numeric: tabular-nums; white-space: nowrap; }

.ledger li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ledger .total { font-weight: 700; border-bottom: 0; }
.plain li { padding: 4px 0; }

/* damga */
.page-passport {
  background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--line) 45%, transparent) 14px 15px), var(--card);
  border: 1px solid var(--line); border-radius: var(--r); padding: 28px 16px; display: grid; place-items: center;
}
.stamp {
  width: 190px; height: 190px; border-radius: 50%; border: 5px double var(--stamp); color: var(--stamp);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; transform: rotate(-12deg);
  animation: thump 0.45s cubic-bezier(.2,1.6,.4,1) both;
}
.stamp b { font-size: 2rem; border-top: 2px solid var(--stamp); border-bottom: 2px solid var(--stamp); padding: 0 10px; }
.stamp span { font-size: 0.8rem; font-weight: 700; }
.stamps { display: flex; flex-wrap: wrap; gap: 8px; }
.small-stamp { width: 96px; height: 96px; border-width: 3px; animation: none; transform: rotate(-8deg); }
.small-stamp b { font-size: 1rem; }
.small-stamp span { font-size: 0.55rem; }
@keyframes thump { from { transform: rotate(-12deg) scale(1.8); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: 1; } }

.flight { display: grid; place-items: center; padding: 30px 0; }
.flight .pic { width: 160px; height: 120px; color: var(--ink); animation: fly 2.4s ease-in-out infinite alternate; }
@keyframes fly { from { transform: translate(-20px, 6px); } to { transform: translate(20px, -6px); } }

/* harita */
.map { width: 100%; max-width: 100%; height: auto; display: block; background: color-mix(in srgb, var(--card) 70%, transparent); border-radius: var(--r); }
.dot-passive { fill: var(--muted); opacity: 0.35; }
.dot-seen { fill: none; stroke: var(--ink); stroke-width: 0.8; opacity: 0.7; }
.dot-open { fill: var(--ink); }
.dot-home { fill: var(--ok); }
.dot-visited { fill: var(--stamp); }
.dot-here { fill: var(--board-fg); stroke: var(--ink); stroke-width: 0.8; }

/* alt bilgi */
.foot { border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; padding-bottom: 40px; }
.data, .note { font-size: 0.75rem; color: var(--muted); }
.data a { text-underline-offset: 2px; }
.file { position: relative; overflow: hidden; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* bildirim */
.toast {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: min(30rem, calc(100% - 32px)); background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: var(--r);
  font-size: 0.95rem; z-index: 20; box-shadow: 0 6px 24px rgb(0 0 0 / 0.25);
}
.toast.ok { border-left: 6px solid var(--ok); }
.toast.warn { border-left: 6px solid var(--board-fg); }

@media (prefers-reduced-motion: reduce) {
  .stamp, .flight .pic { animation: none; }
}
