:root {
  --paper: #FBF0E6;
  --paper-2: #FDF6EF;
  --ink: #1D1B19;
  --muted: #847C74;
  --line: #DDD1C4;
  --danger: #8E3B2E;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
main {
  max-width: 34rem;
  margin: 0 auto;
  min-height: 100svh;
  padding: calc(1.25rem + env(safe-area-inset-top)) 1.5rem calc(3rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
p { margin: 0 0 1rem; }
h1, h2 { font-weight: 500; margin: 0; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.grow { flex: 1; }
.stack > * + * { margin-top: 1rem; }
.spacer { flex: 1; min-height: 1.5rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Üst çubuk */
.top { display: flex; justify-content: space-between; align-items: center; min-height: 2.5rem; margin-bottom: 1rem; position: relative; z-index: 6; }
.link {
  background: none; border: 0; padding: 0.4rem 0; font: inherit; color: var(--muted);
  cursor: pointer; text-decoration: none;
}
.link:hover { color: var(--ink); }

/* Düğmeler: az ve bağlamsal */
.btn {
  display: inline-block; font: inherit; font-size: 1.0625rem; color: var(--ink);
  background: transparent; border: 1px solid var(--ink); border-radius: 999px;
  padding: 0.8rem 1.9rem; cursor: pointer; text-decoration: none; text-align: center;
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn:disabled { opacity: 0.3; cursor: default; }
.btn.wide { width: 100%; }
.actions { display: flex; gap: 1rem; align-items: center; justify-content: space-between; margin-top: 1.5rem; flex-wrap: wrap; }
.actions.end { justify-content: flex-end; }
.actions.col { flex-direction: column; align-items: stretch; }

/* Karşılama */
.welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.welcome .symbol { width: 56px; height: auto; margin-bottom: 2.25rem; }
.welcome h1 { font-size: 2.4rem; line-height: 1.1; }
.welcome .second { font-size: 1.15rem; color: var(--muted); margin: 0.35rem 0 2rem; }
.welcome .slogan { font-size: 1.2rem; margin-bottom: 0.5rem; }
.welcome .philo { font-size: 0.85rem; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 3rem; }

/* Sorular */
.context { font-size: 0.9rem; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 0.75rem; overflow-wrap: anywhere; }
.question { font-size: 1.65rem; line-height: 1.25; margin-bottom: 0.6rem; }
.hint { color: var(--muted); margin-bottom: 1.75rem; }
textarea, input[type=text] {
  width: 100%; font: inherit; font-size: 1.25rem; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 0.5rem 0; border-radius: 0; resize: none; outline: none;
}
textarea { min-height: 7.5rem; line-height: 1.45; }
textarea:focus, input[type=text]:focus { border-bottom-color: var(--ink); }
.count { text-align: right; font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; }

/* Hâl seçimi */
.states { list-style: none; padding: 0; margin: 1.75rem 0 0; flex: 1; touch-action: pan-y; }
.states li + li { margin-top: 0.35rem; }
.state {
  font: inherit; font-size: 1.6rem; line-height: 1.3; color: var(--ink);
  background: none; border: 0; padding: 0.45rem 0; cursor: pointer; text-align: left; width: 100%;
}
.state:hover { color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 1.25rem 0 1.5rem; }
.arrow { font: inherit; font-size: 1.6rem; background: none; border: 0; padding: 0.25rem 0.75rem; cursor: pointer; color: var(--ink); }
.arrow:disabled { opacity: 0.2; cursor: default; }
.dots { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.1em; }
.free { border-top: 1px solid var(--line); padding-top: 1rem; }
.free button { display: block; font: inherit; color: var(--muted); background: none; border: 0; padding: 0.45rem 0; cursor: pointer; text-align: left; }
.free button:hover { color: var(--ink); }

/* Tanışma */
.field { margin-bottom: 1.75rem; }
.field label, .field .label { display: block; font-size: 0.95rem; color: var(--muted); margin-bottom: 0.25rem; }
.choices { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.4rem; }
.choice {
  font: inherit; background: none; color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.5rem 1.2rem; cursor: pointer;
}
.choice[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.error { color: var(--danger); font-size: 0.95rem; margin-top: 0.5rem; }
.consent { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.9rem; color: var(--ink); line-height: 1.45; }
.consent input { width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; flex: none; accent-color: var(--ink); }
.legal { font-size: 0.8rem; color: var(--muted); margin-top: 1rem; }

/* Kartlar */
.card {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 1.4rem 1.4rem 1.25rem;
  display: flex; flex-direction: column;
}
.card .head { font-size: 0.8rem; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 1.25rem; overflow-wrap: anywhere; }
.card .head b { color: var(--ink); font-weight: 500; letter-spacing: 0.04em; }
.expr { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 0.9rem; }
.expr.one { font-size: 1.45rem; line-height: 1.3; }
.expr.two { font-size: 1.1rem; line-height: 1.4; color: #3c3833; }
.card .foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-top: auto; padding-top: 1rem; }
.who { font-size: 0.95rem; line-height: 1.35; overflow-wrap: anywhere; }
.who .dec { color: var(--muted); font-size: 0.85rem; }
.fig { width: 50%; max-width: 13rem; aspect-ratio: 4 / 5; object-fit: cover; display: block; flex: none; }

/* Ortak kart */
.joint .side { margin-bottom: 0.25rem; }
.joint .side.right { text-align: right; }
.joint .figs { display: flex; gap: 0.6rem; justify-content: center; margin: 1rem 0 1.25rem; }
.joint .figs img { width: 40%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.joint .figs .empty { width: 40%; aspect-ratio: 4 / 5; }

.after { text-align: center; margin-top: 1.75rem; }
.after p { color: var(--ink); }

/* Keşifler */
.section { margin-top: 2rem; }
.section h2 { font-size: 0.85rem; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.5rem; }
.item {
  display: block; width: 100%; text-align: left; font: inherit; color: var(--ink);
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: 0.9rem 0; cursor: pointer;
}
.item .t { font-size: 1.3rem; display: block; overflow-wrap: anywhere; }
.item .s { font-size: 0.9rem; color: var(--muted); display: block; margin-top: 0.15rem; overflow-wrap: anywhere; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.85rem; margin-top: 2.5rem; }
.footer-links a, .footer-links button { color: var(--muted); }

.inviter { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; justify-content: center; }
.inviter img { width: 55%; max-width: 13rem; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: 1.75rem; }
.inviter .msg { font-size: 1.45rem; line-height: 1.3; margin-bottom: 0.75rem; }

.note { font-size: 0.9rem; color: var(--muted); }
.toast { font-size: 0.9rem; color: var(--muted); text-align: center; margin-top: 0.75rem; min-height: 1.3rem; }
.test-badge { position: fixed; bottom: calc(0.35rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); font-size: 0.65rem; color: var(--muted); letter-spacing: 0.08em; pointer-events: none; background: var(--paper); padding: 0.1rem 0.6rem; border-radius: 999px; }

@media (min-width: 640px) {
  .question { font-size: 1.85rem; }
  .state { font-size: 1.75rem; }
}

/* Hâl çemberi */
.wheel-wrap { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; margin: 1rem 0 2.5rem; min-height: 22rem; }
.wheel { position: relative; width: min(100%, 22rem); aspect-ratio: 1; transition: opacity 0.25s ease; }
.wheel.dim { opacity: 0; }
.orb {
  position: absolute; transform: translate(-50%, -50%);
  width: 25%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper-2);
  font: inherit; font-size: 0.95rem; color: var(--ink); padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease;
}
.orb:hover, .orb:focus-visible { box-shadow: 0 0 0 1px var(--ink); }
/* Saat yönünde, en üstten başlayarak sırayla hafifçe ışıyan çemberler (sıra konuma göre, anlama göre değil) */
.orb:not(.core) { animation: orbGlow 9.6s ease-in-out infinite; animation-delay: calc(var(--i) * 1.2s); }
@keyframes orbGlow {
  0%, 16%, 100% { background: var(--paper-2); border-color: var(--line); }
  6%, 10% { background: #F2DDD3; border-color: #CDAA9B; }
}
.orb.core { width: 29%; background: transparent; border-color: rgba(29, 27, 25, 0.35); font-size: 1.05rem; }
.catcher { position: fixed; inset: 0; z-index: 4; }
.bloom-layer { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.bloom, .bloom-close { pointer-events: auto; }
.bloom {
  width: min(100%, 21rem); aspect-ratio: 1; border-radius: 50%;
  border: 1px solid var(--ink); background: var(--paper-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem 1.5rem; text-align: center;
  animation: bloom 0.28s ease-out;
}
@keyframes bloom { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.bloom-word { font-size: 0.8rem; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 0.5rem; }
.bloom-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.1rem 0.25rem; }
.bstate { font: inherit; font-size: 1.12rem; line-height: 1.35; background: none; border: 0; color: var(--ink); padding: 0.3rem 0.45rem; cursor: pointer; }
.bstate:hover { color: var(--muted); }
.center-open { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; width: min(100%, 21rem); pointer-events: auto; animation: bloom 0.28s ease-out; }
.core-open {
  width: 6.4rem; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(29, 27, 25, 0.35); background: transparent;
  font: inherit; font-size: 1.05rem; color: var(--ink); cursor: pointer;
}
.free-orbs { display: flex; gap: 0.8rem; justify-content: center; width: 100%; }
.again { margin-top: 0.4rem; font-size: 1rem; }
.mini {
  width: 44%; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); background: var(--paper-2);
  font-size: 0.95rem; line-height: 1.3; padding: 0.9rem; display: flex; align-items: center; justify-content: center;
  animation: miniGlow 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * 1.2s);
}
@keyframes miniGlow {
  0%, 45%, 100% { background: var(--paper-2); border-color: var(--line); }
  15%, 30% { background: #F2DDD3; border-color: #CDAA9B; }
}
.mini:hover, .mini:focus-visible { color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
@media (prefers-reduced-motion: reduce) { .bloom, .center-open, .orb:not(.core), .mini { animation: none; } .wheel { transition: none; } }

/* Serbest seçenekler: çizgi + iki metin, açık çemberin üstünde de tıklanabilir */
.free-under { position: relative; z-index: 6; margin-top: 0.5rem; }
.orb.core { cursor: default; flex-direction: column; gap: 0.2rem; }
.core-logo { height: 30%; width: auto; }
/* Soru ekranında seçilen çember */
.chosen-orb {
  width: 7.5rem; aspect-ratio: 1; border-radius: 50%; margin: 0.5rem auto 1.75rem;
  border: 1px solid #CDAA9B; background: #F2DDD3; color: var(--ink);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 0.95rem; line-height: 1.3; padding: 0.8rem; overflow-wrap: anywhere;
}

/* Karşılama: metin üstte, harflerin şehri altta kalan alanı doldurur (üst üste binmez) */
.welcome.with-art { justify-content: flex-start; padding-top: 2vh; }
.welcome.with-art .symbol { width: auto; height: clamp(48px, 8vh, 80px); margin-bottom: 2vh; }
.welcome.with-art h1 { font-size: clamp(1.9rem, 4.6vh, 2.6rem); }
.welcome.with-art .second { margin: 0.3rem 0 2vh; }
.welcome.with-art .slogan { margin-bottom: 0.4rem; }
.welcome.with-art .philo { margin-bottom: 1vh; }
.city {
  position: relative; flex: 1 1 auto; min-height: 15rem; align-self: stretch;
  margin: 0 -1.5rem calc(-3rem - env(safe-area-inset-bottom));
  background: url(/assets/karsilama-sehir.webp) no-repeat center bottom / contain;
}
.city .start {
  position: absolute; left: 50%; bottom: calc(2.2rem + env(safe-area-inset-bottom)); transform: translateX(-50%);
  box-shadow: 0 0 0 6px rgba(251, 240, 230, 0.55);
}
@media (max-height: 700px) {
  .welcome.with-art .symbol { height: 42px; margin-bottom: 1vh; }
  .welcome.with-art .second { margin-bottom: 1vh; }
}

/* Yazı alanı kapalı çerçeve almaz: odakta yalnızca alt çizgi koyulaşır */
textarea:focus-visible, input[type=text]:focus-visible { outline: none; }
.grow.center .question { margin-bottom: 1.5rem; }
