/* ============ Yazı tipleri (yerel, OFL) ============ */
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/eb-garamond-latin-ext-400-normal.woff2") 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/eb-garamond-latin-400-normal.woff2") 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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../vendor/fonts/eb-garamond-latin-ext-400-italic.woff2") 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../vendor/fonts/eb-garamond-latin-400-italic.woff2") 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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../vendor/fonts/eb-garamond-latin-ext-600-normal.woff2") 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../vendor/fonts/eb-garamond-latin-600-normal.woff2") 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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 500; font-display: swap; src: url("../vendor/fonts/cinzel-latin-ext-500-normal.woff2") 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 500; font-display: swap; src: url("../vendor/fonts/cinzel-latin-500-normal.woff2") 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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 700; font-display: swap; src: url("../vendor/fonts/cinzel-latin-ext-700-normal.woff2") 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 700; font-display: swap; src: url("../vendor/fonts/cinzel-latin-700-normal.woff2") 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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ============ Renkler ============ */
:root {
  --parch: #efdfb8;
  --parch-light: #f6ebcd;
  --parch-mid: #e4cf9c;
  --parch-dark: #cdb074;
  --edge: #8a6a36;
  --ink: #3a2a1a;
  --ink-soft: #6b5237;
  --wax: #8c1c13;
  --wax-dark: #5e0f09;
  --wax-light: #b03226;
  --gold: #b8860b;
  --gold-light: #e0b84a;
  --green: #3f6d3a;
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --display: "Cinzel", "Trajan Pro", "Palatino Linotype", Georgia, serif;
  --shadow: 0 10px 30px rgba(58, 34, 10, 0.35), 0 2px 6px rgba(58, 34, 10, 0.3);
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--parch);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; color: inherit; }
b { font-weight: 600; }

/* ============ Kağıt arka plan ============ */
.paper-bg {
  position: fixed; inset: 0; z-index: -2;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .36  0 0 0 0 .24  0 0 0 0 .1  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='900' height='900'><filter id='b'><feTurbulence type='fractalNoise' baseFrequency='.006 .009' numOctaves='4' seed='7'/><feColorMatrix values='0 0 0 0 .55  0 0 0 0 .36  0 0 0 0 .13  0 0 0 .5 -.12'/></filter><rect width='100%' height='100%' filter='url(%23b)'/></svg>"),
    radial-gradient(ellipse at 50% 35%, var(--parch-light) 0%, var(--parch) 55%, var(--parch-mid) 100%);
  background-size: 320px 320px, 900px 900px, cover;
}
.vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  box-shadow: inset 0 0 120px 30px rgba(90, 55, 15, 0.55), inset 0 0 18px 4px rgba(60, 30, 5, 0.6);
}

/* ============ Genel ============ */
#app { height: 100%; position: relative; }
.screen {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  overflow: auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
.screen.is-active { display: flex; animation: screen-in 0.6s var(--ease) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.noscript { padding: 2rem; text-align: center; }

.toolbar {
  position: fixed; top: max(10px, env(safe-area-inset-top)); right: 12px; z-index: 50;
  display: flex; gap: 8px;
}
.icon-btn {
  min-width: 40px; height: 40px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--edge); border-radius: 999px;
  background: linear-gradient(var(--parch-light), var(--parch-mid));
  color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(58, 34, 10, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.15s var(--ease), background 0.2s, box-shadow 0.2s;
}
.icon-btn:hover { transform: translateY(-1px); background: linear-gradient(#fbf2d8, var(--parch)); }
.icon-btn:active { transform: translateY(1px) scale(0.97); }
.icon-btn--text { font-size: 13px; letter-spacing: 0.05em; padding: 0 14px; }
#btn-sound[aria-pressed="true"] .snd-mute { display: none; }
#btn-sound[aria-pressed="false"] .snd-wave { display: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ============ Buton ============ */
.btn {
  position: relative;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; padding: 10px 28px;
  border: 2px solid var(--ink); border-radius: 10px;
  background: linear-gradient(var(--parch-light), var(--parch-mid));
  color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink), 0 8px 14px rgba(58, 34, 10, 0.35);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), filter 0.2s;
}
.btn small { font-family: var(--serif); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 400; opacity: 0.8; }
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink), 0 12px 18px rgba(58, 34, 10, 0.35); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink), 0 3px 6px rgba(58, 34, 10, 0.35); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.5); }
.btn--primary {
  background: linear-gradient(var(--wax-light), var(--wax) 60%, var(--wax-dark));
  color: #f9e9c0; border-color: var(--wax-dark);
  box-shadow: 0 4px 0 var(--wax-dark), 0 8px 14px rgba(58, 34, 10, 0.4);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}
.btn--primary:hover:not(:disabled) { box-shadow: 0 6px 0 var(--wax-dark), 0 12px 18px rgba(58, 34, 10, 0.4); }
.btn--primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--wax-dark), 0 3px 6px rgba(58, 34, 10, 0.4); }
.btn--ghost { background: transparent; box-shadow: none; border-style: dashed; border-color: var(--ink-soft); min-height: 44px; }
.btn--ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.25); box-shadow: none; transform: none; }
.btn--seal { flex-direction: row; gap: 12px; padding-left: 18px; }
.seal-dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #d8473a, var(--wax) 55%, #3a0a06);
  box-shadow: inset 0 0 0 2px rgba(255, 210, 160, 0.35), 0 1px 3px rgba(0, 0, 0, 0.5);
}
.btn--primary .seal-dot { background: radial-gradient(circle at 35% 30%, #f0c96a, var(--gold) 55%, #6f4d05); box-shadow: inset 0 0 0 2px rgba(255, 240, 200, 0.4), 0 1px 3px rgba(0, 0, 0, 0.5); }

/* ============ Parşömen rulo ============ */
.scroll {
  width: min(680px, 100%);
  margin: auto;
  display: flex; flex-direction: column; align-items: stretch;
  filter: drop-shadow(0 18px 24px rgba(50, 28, 6, 0.45));
}
.scroll--wide { width: min(820px, 100%); }
.scroll-rod {
  height: 26px; margin: 0 -12px; border-radius: 13px;
  background:
    linear-gradient(90deg, #3a1f0a 0, #7a4a1f 6%, #b0783a 14%, #7a4a1f 30%, #4a2a10 60%, #7a4a1f 88%, #2e1707 100%);
  box-shadow: inset 0 3px 3px rgba(255, 220, 160, 0.4), inset 0 -4px 5px rgba(0, 0, 0, 0.5);
  position: relative; z-index: 2;
}
.scroll-rod::before, .scroll-rod::after {
  content: ""; position: absolute; top: -3px; bottom: -3px; width: 18px; border-radius: 9px;
  background: radial-gradient(circle at 40% 35%, #e8c36b, #8a5d16 70%, #4d3008);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.scroll-rod::before { left: -8px; } .scroll-rod::after { right: -8px; }
.scroll-body {
  position: relative; z-index: 1;
  margin: -4px 0;
  padding: 34px clamp(20px, 6vw, 60px) 40px;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(90, 55, 15, 0.35), transparent 7%, transparent 93%, rgba(90, 55, 15, 0.35)),
    linear-gradient(var(--parch-light), var(--parch));
  border-left: 1px solid rgba(90, 55, 15, 0.4); border-right: 1px solid rgba(90, 55, 15, 0.4);
  transform-origin: top center;
}
.screen.is-active .scroll-body { animation: unroll 1s var(--ease) both; }
@keyframes unroll { from { clip-path: inset(0 0 100% 0); opacity: 0.4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }

.compass { width: 92px; height: 92px; color: var(--ink); opacity: 0.9; }
.compass-needle { transform-origin: 60px 60px; animation: sway 6s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(18deg); } }

h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.15; }
h1 {
  font-size: clamp(32px, 7vw, 56px); font-weight: 700; letter-spacing: 0.04em; margin-top: 4px;
  color: var(--ink);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4), 0 2px 6px rgba(90, 55, 15, 0.3);
  animation: ink-in 1.3s var(--ease) 0.3s both;
}
@keyframes ink-in { from { opacity: 0; filter: blur(8px); letter-spacing: 0.2em; } to { opacity: 1; filter: blur(0); } }
.flourish { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px auto 6px; color: var(--wax); max-width: 320px; }
.flourish span { flex: 1; height: 1.5px; background: linear-gradient(90deg, transparent, var(--ink-soft), transparent); }
.tagline { font-style: italic; font-size: 20px; margin: 6px auto 24px; max-width: 440px; color: var(--ink-soft); }
.menu { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.menu .btn { width: min(340px, 100%); }
.stats { display: flex; justify-content: center; gap: clamp(14px, 4vw, 40px); margin: 32px 0 0; padding-top: 18px; border-top: 1px dashed var(--ink-soft); }
.stats div { text-align: center; }
.stats dt { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.stats dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: 26px; }
.credit { max-width: 640px; text-align: center; font-size: 13px; color: var(--ink-soft); margin: 18px auto 4px; }
.credit a { color: var(--wax); }

/* ============ HUD ============ */
#screen-game { padding: 0; align-items: stretch; overflow-x: hidden; overflow-y: auto; }
.hud {
  display: flex; align-items: center; gap: 14px;
  padding: max(10px, env(safe-area-inset-top)) 170px 8px 14px;
  flex: none;
}
.hud-round, .hud-score { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.hud-round b, .hud-score b { font-size: 22px; color: var(--wax); letter-spacing: 0; }
.hud-of { opacity: 0.5; }
.hud-dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
.hud-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink-soft); background: transparent; transition: background 0.4s, transform 0.4s var(--ease); }
.hud-dots i.done { background: var(--ink); }
.hud-dots i.now { background: var(--gold); border-color: var(--ink); transform: scale(1.3); }
.hud-score { margin-left: auto; }

.game-layout { flex: 1 0 auto; display: flex; flex-direction: column; gap: 12px; padding: 0 14px max(14px, env(safe-area-inset-bottom)); width: min(1240px, 100%); margin: 0 auto; }

/* ============ Olay kartı ============ */
.event-card {
  position: relative; flex: none;
  width: min(820px, 100%); margin: 0 auto;
  padding: 14px 26px 16px; text-align: center;
  background: linear-gradient(var(--parch-light), var(--parch));
  border: 2px solid var(--edge); border-radius: 6px;
  box-shadow: var(--shadow), inset 0 0 40px rgba(150, 100, 30, 0.22);
  transform-origin: top center;
}
.event-card::before, .event-card::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(90, 55, 15, 0.45); border-radius: 3px; pointer-events: none; }
.event-card::after { inset: 8px; border-style: dotted; opacity: 0.5; }
.event-card.enter { animation: unfurl 0.9s var(--ease) both; }
@keyframes unfurl { 0% { transform: scaleY(0.04) translateY(-30px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.card-cat { font-family: var(--display); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--wax); display: inline-flex; gap: 8px; align-items: center; }
.event-card h2 { font-size: clamp(22px, 3.6vw, 34px); font-weight: 700; margin: 4px 0 2px; }
.event.enter h2, .event-card.enter h2 { animation: ink-in 0.9s var(--ease) 0.25s both; }
.event-card p { margin: 0; font-style: italic; color: var(--ink-soft); font-size: 18px; min-height: 1.4em; }
.card-guess { margin-top: 6px; display: inline-block; padding: 2px 14px; border: 1.5px solid var(--wax); color: var(--wax); border-radius: 4px; transform: rotate(-1.5deg); font-family: var(--display); font-size: 14px; letter-spacing: 0.06em; animation: stamp 0.5s var(--ease) both; }
.card-guess b { font-size: 18px; }
@keyframes stamp { from { transform: rotate(-1.5deg) scale(2.2); opacity: 0; } to { transform: rotate(-1.5deg) scale(1); opacity: 1; } }

/* ============ Sahne ============ */
.stage { flex: 1 0 auto; position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 360px; }
.panel { width: 100%; }
.panel--date {
  width: min(1040px, 100%); margin: 0 auto; padding: 18px 18px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: linear-gradient(var(--parch-light), var(--parch));
  border: 2px solid var(--edge); border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 50px rgba(150, 100, 30, 0.2);
  animation: rise 0.7s var(--ease) 0.25s both;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.panel--date.leave { animation: leave 0.45s ease-in both; }
@keyframes leave { to { opacity: 0; transform: translateY(-20px) scale(0.98); } }
.panel-head { text-align: center; }
.panel-head h3 { font-size: clamp(18px, 2.6vw, 24px); }
.hint { margin: 4px 0 0; font-size: 15px; font-style: italic; color: var(--ink-soft); }

/* ============ Cetvel ============ */
.timeline {
  position: relative; width: 100%; height: 138px; margin-top: 44px; outline-offset: 6px;
  background: linear-gradient(#f9efd2, #ecd9a8);
  border: 2px solid var(--ink); border-radius: 8px;
  box-shadow: inset 0 4px 10px rgba(90, 55, 15, 0.3), 0 3px 0 rgba(90, 55, 15, 0.35);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.timeline.is-dragging { cursor: grabbing; }
.timeline.is-locked { cursor: default; filter: saturate(0.8); }
.timeline-inner { position: absolute; inset: 0; overflow: hidden; border-radius: 6px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.timeline canvas { display: block; width: 100%; height: 100%; }
.needle { position: absolute; left: 50%; top: -6px; bottom: -6px; width: 0; pointer-events: none; z-index: 3; }
.needle-line { position: absolute; left: -1.5px; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--wax-light), var(--wax-dark)); box-shadow: 0 0 0 1px rgba(255, 230, 190, 0.5), 0 0 8px rgba(140, 28, 19, 0.6); border-radius: 2px; }
.needle-line::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg); background: var(--wax-dark); }
.needle-flag {
  position: absolute; left: 0; top: -40px; transform: translateX(-50%);
  min-width: 104px; padding: 4px 16px 5px; text-align: center; white-space: nowrap;
  font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: 0.05em; color: #f9e9c0;
  background: linear-gradient(var(--wax-light), var(--wax-dark));
  border: 2px solid var(--wax-dark); border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 220, 190, 0.35);
}
.needle-flag::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg); background: var(--wax-dark); border-right: 2px solid var(--wax-dark); border-bottom: 2px solid var(--wax-dark); }
.timeline.is-dragging .needle-flag { transform: translateX(-50%) translateY(-3px); }
.needle-flag { transition: transform 0.2s var(--ease); }
.tl-controls { display: flex; gap: 10px; align-items: center; justify-content: center; }
.tl-input {
  width: 130px; height: 40px; text-align: center; padding: 0 10px;
  background: var(--parch-light); border: 1.5px solid var(--edge); border-radius: 8px;
  font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.04em;
  box-shadow: inset 0 2px 5px rgba(90, 55, 15, 0.25);
}
.tl-input.bad { border-color: var(--wax); animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.era-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 900px; }
.chip {
  padding: 3px 11px; border-radius: 999px; font-size: 13px; cursor: pointer;
  border: 1.5px solid var(--chip, var(--edge)); color: var(--chip, var(--ink)); background: rgba(255, 255, 255, 0.3);
  font-family: var(--display); font-weight: 500; letter-spacing: 0.03em; transition: background 0.2s, color 0.2s, transform 0.15s;
}
.chip:hover { background: var(--chip, var(--ink)); color: #fbf0d4; transform: translateY(-1px); }

/* ============ Harita paneli ============ */
.panel--map {
  position: relative; flex: 1 0 auto; min-height: 360px;
  border: 3px solid var(--ink); border-radius: var(--radius);
  outline: 2px solid var(--edge); outline-offset: 3px;
  box-shadow: var(--shadow);
  overflow: hidden; background: #d7c08d;
}
.panel--map.unroll { animation: map-unroll 1s var(--ease) both; }
@keyframes map-unroll { from { clip-path: inset(0 50% 0 50% round 14px); opacity: 0.5; } to { clip-path: inset(0 0 0 0 round 14px); opacity: 1; } }
.map { position: absolute; inset: 0; background: #c6cdb0; font-family: var(--serif); z-index: 0; }
.map.is-picking { cursor: crosshair; }
.map.is-picking .leaflet-interactive { cursor: crosshair; }
.map::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 450; box-shadow: inset 0 0 70px rgba(110, 70, 20, 0.55); }
.leaflet-container { background: #c6cdb0; font-family: var(--serif); }
.leaflet-control-zoom { border: 2px solid var(--ink) !important; border-radius: 10px !important; overflow: hidden; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); margin-top: 64px !important; }
.leaflet-control-zoom a { background: var(--parch-light) !important; color: var(--ink) !important; border-bottom: 1px solid var(--edge) !important; font-family: var(--display); width: 36px !important; height: 36px !important; line-height: 34px !important; }
.leaflet-control-zoom a:hover { background: var(--parch-mid) !important; }
.leaflet-control-attribution { background: rgba(246, 235, 205, 0.85) !important; color: var(--ink-soft); font-size: 11px; }
.leaflet-control-attribution a { color: var(--wax); }

.map-top { position: absolute; z-index: 500; top: 10px; left: 10px; right: 10px; display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; pointer-events: none; }
.map-hint { pointer-events: auto; margin: 0; padding: 6px 14px; background: rgba(246, 235, 205, 0.94); border: 1.5px solid var(--ink); border-radius: 8px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3); font-size: 16px; animation: rise 0.6s var(--ease) 0.4s both; }
.map-hint b { font-family: var(--display); font-size: 14px; letter-spacing: 0.04em; display: block; }
.map-tools { display: flex; gap: 8px; margin-right: 130px; align-items: flex-start; }
.seg { pointer-events: auto; display: inline-flex; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3); }
.seg-btn--solo { pointer-events: auto; border: 1.5px solid var(--ink); border-radius: 8px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3); }
.seg-btn { padding: 6px 12px; background: rgba(246, 235, 205, 0.94); border: 0; cursor: pointer; font-family: var(--display); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; }
.seg-btn + .seg-btn { border-left: 1.5px solid var(--ink); }
.seg-btn.is-on { background: var(--ink); color: var(--parch-light); }
.map-warn { position: absolute; z-index: 500; left: 50%; top: 60px; transform: translateX(-50%); margin: 0; padding: 6px 14px; background: #f3d2bf; border: 1.5px solid var(--wax); border-radius: 8px; font-size: 15px; max-width: 90%; text-align: center; }
.map-actions { position: absolute; z-index: 500; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; pointer-events: none; }
.map-actions .btn { pointer-events: auto; }
.map-actions.leave { animation: leave 0.35s ease-in both; }

/* Pinler */
.ww-pin-wrap { background: none; border: 0; }
.ww-pin { position: relative; width: 34px; height: 34px; margin-top: 2px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2.5px solid var(--ink); box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4); }
.ww-pin span { position: absolute; inset: 0; display: grid; place-items: center; transform: rotate(45deg); font-size: 16px; color: #fbeec9; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5); }
.ww-pin--guess { background: radial-gradient(circle at 35% 30%, var(--wax-light), var(--wax)); }
.ww-pin--guess span::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #f6e6bd; box-shadow: inset 0 0 0 2px rgba(58, 10, 6, 0.55); }
.ww-pin--truth { background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold)); }
.ww-pin--truth span { color: #3a2a05; text-shadow: none; }
.ww-pin.drop { animation: pin-drop 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes pin-drop { 0% { transform: translateY(-90px) rotate(-45deg); opacity: 0; } 55% { opacity: 1; } 100% { transform: translateY(0) rotate(-45deg); opacity: 1; } }
.ww-ring { stroke: var(--gold); fill: var(--gold); fill-opacity: 0.2; stroke-dasharray: 6 6; }
.ww-line { stroke: var(--wax); stroke-opacity: 0.9; animation: march 0.9s linear infinite; }
@keyframes march { to { stroke-dashoffset: -22; } }
.ww-dist-wrap { background: none; border: 0; }
.ww-dist { position: absolute; left: 0; top: 0; translate: -50% -50%; white-space: nowrap; padding: 3px 12px; background: var(--parch-light); border: 1.5px solid var(--wax); color: var(--wax); border-radius: 999px; font-family: var(--display); font-weight: 700; font-size: 13px; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35); animation: pop 0.5s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }

/* Harita etiketleri */
.ww-label-wrap { background: none; border: 0; }
.lbl { position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none; color: #4a3520; text-shadow: 0 0 3px rgba(240, 226, 187, 0.95), 0 0 6px rgba(240, 226, 187, 0.9), 0 0 2px rgba(240, 226, 187, 1); }
.lbl-country { translate: -50% -50%; font-family: var(--display); font-weight: 500; font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.map[data-zoom="3"] .lbl-country { font-size: 11px; } .map[data-zoom="4"] .lbl-country { font-size: 13px; letter-spacing: 0.16em; }
.map[data-zoom="5"] .lbl-country, .map[data-zoom="6"] .lbl-country, .map[data-zoom="7"] .lbl-country, .map[data-zoom="8"] .lbl-country, .map[data-zoom="9"] .lbl-country { font-size: 16px; letter-spacing: 0.22em; opacity: 0.6; }
.lbl-city { translate: 7px -55%; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 13px; }
.lbl-city i { position: absolute; left: -11px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #4a3520; box-shadow: 0 0 0 1.5px rgba(240, 226, 187, 0.9); }
.lbl-city.is-cap i { width: 7px; height: 7px; margin-top: -3.5px; left: -12px; background: var(--wax); border: 1.5px solid #4a3520; box-sizing: border-box; border-radius: 1px; transform: rotate(45deg); }

/* ============ Sonuç kartı ============ */
.result {
  position: absolute; z-index: 600; right: 12px; top: 12px; bottom: 12px; width: 340px;
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px 16px; overflow: hidden;
  background: linear-gradient(var(--parch-light), var(--parch));
  border: 2px solid var(--ink); border-radius: 10px;
  box-shadow: -4px 8px 26px rgba(40, 20, 0, 0.5);
  animation: slide-in 0.7s var(--ease) 0.2s both;
}
@keyframes slide-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.result h3 { font-size: 19px; text-align: center; padding-right: 0; }
.res-stamp {
  align-self: center; transform: rotate(-3deg);
  font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.14em; color: var(--green);
  border: 2.5px solid var(--green); border-radius: 6px; padding: 2px 12px; opacity: 0; pointer-events: none;
}
.res-stamp:empty { display: none; }
.res-stamp.show { animation: stamp-big 0.6s var(--ease) 1.4s both; }
.res-stamp.bad { color: var(--wax); border-color: var(--wax); }
@keyframes stamp-big { from { transform: rotate(-3deg) scale(3); opacity: 0; } to { transform: rotate(-3deg) scale(1); opacity: 0.9; } }
.res-block { padding: 8px 10px 10px; border: 1px dashed var(--ink-soft); border-radius: 8px; background: rgba(255, 255, 255, 0.22); }
.res-label { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.res-label b { font-size: 24px; color: var(--wax); letter-spacing: 0; }
.res-detail { margin: 6px 0 0; font-size: 16px; }
.strip { position: relative; height: 54px; margin: 6px 6px 0; }
.strip::before { content: ""; position: absolute; left: 0; right: 0; top: 30px; height: 2px; background: var(--ink); }
.strip-mark { position: absolute; top: 0; transform: translateX(-50%); text-align: center; font-size: 13px; line-height: 1.1; white-space: nowrap; }
.strip-mark i { display: block; width: 14px; height: 14px; margin: 3px auto 0; border-radius: 50%; border: 2px solid var(--ink); }
.strip-mark.guess i { background: var(--wax); } .strip-mark.truth i { background: var(--gold-light); }
.strip-mark b { display: block; font-family: var(--display); font-size: 13px; }
.strip-mark.truth { top: auto; bottom: -4px; }
.strip-mark.truth i { position: absolute; left: 50%; transform: translateX(-50%); top: -12px; margin: 0; }
.strip-mark.truth b, .strip-mark.truth span { position: relative; top: 4px; }
.strip-mark { transition: left 1s var(--ease); }
.bar { height: 10px; margin-top: 8px; border-radius: 6px; background: rgba(90, 55, 15, 0.25); border: 1px solid var(--ink-soft); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--wax), var(--gold), var(--green)); transition: width 1.2s var(--ease) 0.5s; }
.res-total { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 4px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 14px; }
.res-total b { font-size: 34px; color: var(--wax); letter-spacing: 0; }
.res-extract { margin: 0; font-size: 16px; color: var(--ink-soft); line-height: 1.4; }
.res-link { font-size: 15px; color: var(--wax); align-self: flex-start; }
.result-body { display: flex; flex-direction: column; gap: 10px; overflow: auto; flex: 1; min-height: 0; padding-right: 2px; }
.result .btn { width: 100%; flex: none; }

/* ============ Sonuç ekranı ============ */
.final-rank { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 4vw, 32px); color: var(--wax); margin: 8px 0 0; animation: stamp 0.7s var(--ease) 0.6s both; }
.final-score { margin: 4px 0 6px; font-size: 20px; }
.final-score b { font-family: var(--display); font-size: clamp(46px, 10vw, 76px); line-height: 1; }
.final-best { margin: 0 0 6px; display: inline-block; padding: 2px 14px; border: 2px solid var(--green); color: var(--green); font-family: var(--display); font-weight: 700; transform: rotate(-3deg); letter-spacing: 0.1em; text-transform: uppercase; animation: stamp 0.6s var(--ease) 1.2s both; }
.table-wrap { overflow-x: auto; margin: 12px 0 6px; text-align: left; }
.rounds { width: 100%; border-collapse: collapse; font-size: 16px; }
.rounds th { font-family: var(--display); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 8px; border-bottom: 2px solid var(--ink); text-align: left; }
.rounds td { padding: 6px 8px; border-bottom: 1px dotted var(--ink-soft); vertical-align: top; }
.rounds td:nth-child(1) { width: 28px; color: var(--ink-soft); }
.rounds td:last-child, .rounds th:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
.rounds .sub { display: block; font-size: 13px; color: var(--ink-soft); }
.final-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 22px; }

/* ============ Mühür animasyonu ============ */
.seal-fx { position: fixed; inset: 0; z-index: 900; display: none; place-items: center; pointer-events: none; }
.seal-fx.go { display: grid; }
.seal-stamp {
  width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 70px; color: rgba(255, 210, 170, 0.85);
  background: radial-gradient(circle at 35% 30%, #e0523f, var(--wax) 50%, #350805);
  box-shadow: inset 0 0 0 7px rgba(0, 0, 0, 0.18), inset 0 0 0 10px rgba(255, 200, 160, 0.25), 0 14px 30px rgba(0, 0, 0, 0.55);
  text-shadow: 0 -2px 2px rgba(0, 0, 0, 0.5), 0 2px 1px rgba(255, 200, 160, 0.3);
}
.seal-fx.go .seal-stamp { animation: seal 1s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes seal { 0% { transform: scale(3.2) rotate(-25deg); opacity: 0; } 25% { transform: scale(1) rotate(-6deg); opacity: 1; } 32% { transform: scale(0.92) rotate(-6deg); } 40% { transform: scale(1) rotate(-6deg); } 80% { opacity: 1; } 100% { transform: scale(1) rotate(-6deg); opacity: 0; } }

/* ============ Diyalog ============ */
.dialog { border: 0; padding: 0; background: transparent; max-width: min(620px, 94vw); width: 100%; color: var(--ink); }
.dialog::backdrop { background: rgba(40, 22, 6, 0.65); backdrop-filter: blur(3px); }
.dialog[open] { animation: rise 0.45s var(--ease) both; }
.dialog-paper { padding: 26px clamp(18px, 5vw, 38px) 26px; background: linear-gradient(var(--parch-light), var(--parch)); border: 3px double var(--ink); border-radius: 8px; box-shadow: var(--shadow); max-height: 88vh; overflow: auto; }
.dialog h2 { text-align: center; font-size: 26px; margin-bottom: 14px; }
.howto { margin: 0 0 20px; padding-left: 26px; }
.howto li { margin-bottom: 8px; padding-left: 4px; }
.howto li::marker { font-family: var(--display); font-weight: 700; color: var(--wax); }
.dialog .btn { display: flex; margin: 0 auto; }
.dialog--small { max-width: min(440px, 92vw); }
.quit-msg { margin: 0 0 18px; text-align: center; font-size: 19px; }
.dialog-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.dialog-actions .btn { margin: 0; }

.fatal { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); z-index: 1000; padding: 18px 26px; background: var(--parch-light); border: 3px solid var(--wax); border-radius: 10px; box-shadow: var(--shadow); text-align: center; max-width: 90vw; }

/* ============ Duyarlı ============ */
@media (max-width: 900px) {
  .result { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 52%; animation-name: slide-up; padding: 12px; }
  .result-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
  .result h3, .res-stamp, .res-total, .res-extract, .res-link { grid-column: 1 / -1; justify-self: center; }
  .res-extract, .res-total { justify-self: stretch; }
  .res-link { justify-self: start; }
  .res-block { padding: 6px 8px 8px; }
  .res-label { font-size: 12px; }
  .res-label b { font-size: 20px; }
  .strip { height: 50px; margin: 4px 2px 0; }
  .res-total b { font-size: 26px; }
  .result h3 { font-size: 17px; }
  .panel--map.is-result .map-top, .panel--map.is-result .leaflet-control-zoom { display: none; }
  @keyframes slide-up { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .hud { padding-right: 14px; padding-top: 58px; flex-wrap: wrap; gap: 8px 12px; }
  .hud-dots { order: 3; flex: 1 0 100%; }
  .hud-score { margin-left: auto; }
  .game-layout { padding: 0 8px max(8px, env(safe-area-inset-bottom)); gap: 8px; }
  .event-card { padding: 10px 14px 12px; }
  .event-card p { font-size: 16px; }
  .panel--date { padding: 12px 10px 16px; gap: 10px; }
  .timeline { height: 124px; margin-top: 40px; }
  .needle-flag { font-size: 19px; min-width: 92px; }
  .hint { display: none; }
  .map-tools { margin-right: 0; }
  .map-top { top: 8px; left: 8px; right: 8px; flex-direction: column; }
  .leaflet-control-zoom { margin-top: 118px !important; }
  .scroll-body { padding: 26px 18px 30px; }
  .stats { gap: 10px; }
  .stats dd { font-size: 22px; }
}
@media (max-height: 640px) and (min-width: 641px) {
  .hud { padding-top: 8px; }
  .event-card { padding: 8px 20px 10px; }
  .event-card h2 { font-size: 22px; margin: 2px 0; }
  .panel--date { gap: 8px; padding-block: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
