:root {
  --bg: #111015;
  --panel: #1c1a22;
  --line: #312d3b;
  --ink: #f5f1e8;
  --muted: #a8a1b4;
  --pink: #ff6fb5;
  --pink-light: #ffc9e2;
  --blue: #4aa8ff;
  --purple: #9b6bff;
  --dark: #111015;
  --paper: #f7f3ea;
  --head: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --hand: "Caveat", cursive;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.5;
  transition: background-color .6s ease, color .6s ease;
}
body.locked { overflow: hidden; height: 100dvh; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
ol { list-style: none; }
.hidden { display: none !important; }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 14px;
  font-weight: 700; font-size: 17px; text-decoration: none;
  background: var(--pink); color: var(--dark);
  border: 2px solid var(--dark); box-shadow: 4px 4px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--blue { background: var(--blue); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn--ghost:active { transform: scale(.97); box-shadow: none; }
.btn:disabled { background: var(--panel); color: var(--muted); border-color: var(--line); box-shadow: none; cursor: default; transform: none; }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* ---------------- Intro ---------------- */
.intro {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px;
  padding: 24px; text-align: center;
  transition: opacity .6s ease, visibility .6s;
}
.intro.gone { opacity: 0; visibility: hidden; }
.intro__top { font-family: var(--head); font-weight: 800; font-size: clamp(28px, 8vw, 36px); line-height: 1.1; }
.intro__hint { color: var(--muted); font-weight: 600; letter-spacing: .05em; animation: pulse 1.6s infinite; }

.gift { position: relative; width: 190px; height: 190px; animation: wiggle 2.2s infinite; }
.gift__box, .gift__lid { position: absolute; border: 3px solid var(--dark); }
.gift__box { left: 15px; right: 15px; bottom: 0; height: 120px; border-radius: 10px; background: var(--purple); box-shadow: 6px 6px 0 var(--ink); }
.gift__lid { left: 5px; right: 5px; top: 40px; height: 42px; border-radius: 10px; z-index: 2; background: var(--pink); transition: transform .7s cubic-bezier(.3,1.6,.5,1), opacity .7s; }
.gift__box::before, .gift__lid::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 26px; margin-left: -13px; background: var(--blue); }
.gift__bow { position: absolute; left: 50%; top: -32px; transform: translateX(-50%); width: 72px; height: 34px; }
.gift__bow::before, .gift__bow::after {
  content: ""; position: absolute; top: 0; width: 36px; height: 30px; border: 9px solid var(--blue); border-radius: 50% 50% 10% 50%;
}
.gift__bow::before { left: 0; transform: rotate(-20deg); }
.gift__bow::after { right: 0; transform: rotate(20deg) scaleX(-1); }
.gift__cat {
  position: absolute; left: 50%; bottom: 60px; width: 120px; transform: translate(-50%, 40px) scale(.6);
  opacity: 0; transition: transform .8s cubic-bezier(.3,1.7,.5,1) .15s, opacity .3s .15s; z-index: 1;
}
.gift.open { animation: none; }
.gift.open .gift__lid { transform: translate(60px, -140px) rotate(35deg); opacity: 0; }
.gift.open .gift__cat { transform: translate(-50%, -30px) scale(1); opacity: 1; }

/* ---------------- Top bar ---------------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding-top: var(--safe-t); background: var(--bg); border-bottom: 2px solid var(--line);
}
.bar[hidden] { display: none; }
.bar__in { max-width: 480px; margin: 0 auto; height: 58px; padding: 0 14px; display: flex; align-items: center; gap: 12px; }
.bar__back { width: 42px; height: 42px; flex: none; border-radius: 12px; border: 2px solid var(--line); font-size: 20px; font-weight: 700; }
.bar__back:active { background: var(--panel); }
.bar__dots { flex: 1; display: flex; gap: 5px; }
.bar__dots button { flex: 1; height: 24px; display: flex; align-items: center; }
.bar__dots button::before { content: ""; width: 100%; height: 6px; border-radius: 3px; background: var(--line); }
.bar__dots button.done::before { background: var(--pink); }
.bar__dots button.now::before { background: var(--ink); }
.bar__dots button:disabled { cursor: default; }
.bar__count { font-family: var(--head); font-weight: 800; font-size: 15px; min-width: 38px; text-align: right; }

/* ---------------- Steps ---------------- */
.step {
  display: none; flex-direction: column;
  min-height: 100dvh; max-width: 480px; margin: 0 auto;
  padding: calc(84px + var(--safe-t)) 16px calc(24px + var(--safe-b));
  text-align: center;
}
.step.active { display: flex; animation: step-in .4s ease; }
.step.cover { padding-top: calc(40px + var(--safe-t)); }
.step__body { flex: 1; }
.step__foot { padding-top: 28px; }
.step__hint { color: var(--muted); font-size: 14px; margin-bottom: 10px; min-height: 1.4em; }
.step__foot .btn { width: 100%; }

.kicker { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.title { font-family: var(--head); font-weight: 800; font-size: clamp(30px, 9vw, 36px); line-height: 1.02; letter-spacing: -.01em; margin-bottom: 10px; }
.subtitle { font-family: var(--head); font-weight: 800; font-size: 24px; margin: 30px 0 4px; }
.lead { color: var(--muted); font-size: 16px; margin-bottom: 22px; }
.lead small { display: inline-block; margin-top: 6px; font-size: 13px; }
.lead b { color: var(--ink); }

/* ---------------- Cover ---------------- */
.cover .step__body { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cover__name {
  font-family: var(--head); font-weight: 800; font-size: clamp(100px, 33vw, 150px); line-height: .85; letter-spacing: -.03em;
  color: var(--pink); text-shadow: 6px 6px 0 var(--blue); text-transform: uppercase; margin-top: 4px;
}
.cover__cat { width: 150px; margin: 22px 0 4px; animation: bounce 1.2s ease-in-out infinite; }
.cover__wish { font-family: var(--head); font-weight: 800; font-size: 28px; line-height: 1.1; }
.cover__invite { font-family: var(--hand); font-size: 30px; line-height: 1.2; color: var(--pink-light); margin-top: 18px; }

/* ---------------- Cat SVG ---------------- */
.cat-svg { width: 100%; height: auto; display: block; overflow: visible; }
.cat-svg .tail { transform-origin: 150px 165px; animation: tail 1.4s ease-in-out infinite; }
.cat-svg .eye-blink { transform-origin: center; transform-box: fill-box; animation: blink 4s infinite; }

/* ---------------- Cake ---------------- */
.cake { position: relative; width: 280px; max-width: 100%; margin: 90px auto 0; }
.candles { position: absolute; left: 0; right: 0; top: 0; height: 0; z-index: 2; }
.candle {
  position: absolute; width: 12px; height: 42px; margin-left: -6px; border-radius: 3px;
  background: repeating-linear-gradient(45deg, var(--paper) 0 5px, var(--pink) 5px 10px);
  border: 1.5px solid var(--dark);
}
.candle::after { content: ""; position: absolute; left: -10px; right: -10px; top: -28px; bottom: -4px; }
.flame {
  position: absolute; left: 50%; bottom: 100%; width: 12px; height: 19px; margin-left: -6px; margin-bottom: 2px;
  background: #ffc93c; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: inset 0 -5px 0 #ff8a1f;
  transform-origin: 50% 100%; animation: flicker .25s infinite alternate;
  transition: opacity .3s, transform .3s;
}
.candle.out .flame { opacity: 0; transform: scale(.2); }
.candle.out::before {
  content: ""; position: absolute; left: 50%; bottom: 100%; width: 3px; height: 18px; margin-left: -1.5px;
  background: var(--muted); border-radius: 3px; animation: smoke 1.2s forwards;
}
.cake__top { height: 34px; border-radius: 50% / 100% 100% 0 0; background: var(--pink-light); position: relative; z-index: 1; border: 3px solid var(--dark); border-bottom: 0; }
.cake__body {
  height: 110px; border-radius: 0 0 16px 16px; background: var(--purple); border: 3px solid var(--dark);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.cake__body::before { /* krema şeridi */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 16px;
  background: var(--pink-light); border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.cake__text { font-family: var(--hand); font-size: 44px; color: var(--ink); margin-top: 18px; }
.cake__plate { height: 14px; margin: -4px -18px 0; border-radius: 50%; background: var(--ink); }
.cake__status { margin-top: 20px; font-weight: 700; min-height: 1.5em; }

/* ---------------- Game ---------------- */
.game { position: relative; max-width: 360px; margin: 0 auto; }
.game__bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-family: var(--head); font-weight: 800; font-size: 20px; }
.game__bar span { white-space: nowrap; min-width: 62px; text-align: left; }
.game__progress { flex: 1; height: 12px; border-radius: 6px; background: var(--panel); border: 2px solid var(--line); overflow: hidden; }
.game__progress div { height: 100%; width: 0; background: var(--pink); transition: width .3s; }
.game__board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; user-select: none; -webkit-user-select: none; }
.hole {
  position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; touch-action: manipulation;
  background: var(--panel); border: 2px solid var(--line);
}
.hole::after { /* çukur */
  content: ""; position: absolute; left: 12%; right: 12%; bottom: 8%; height: 18%; border-radius: 50%; background: #000;
}
.hole__pop {
  position: absolute; left: 8%; right: 8%; bottom: -100%; z-index: 1; transition: bottom .18s ease-out;
  display: flex; align-items: flex-end; justify-content: center; font-size: 50px; line-height: 1; pointer-events: none;
}
.hole.up .hole__pop { bottom: 12%; }
.hole.hit .hole__pop { animation: hit .3s forwards; }
.hole__fx { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 800; font-size: 24px; pointer-events: none; opacity: 0; }
.hole__fx.show { animation: float-up .6s forwards; }
.game__overlay {
  position: absolute; inset: 46px 0 0; z-index: 3; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(17, 16, 21, .88);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}
.game__overlay p { font-family: var(--head); font-weight: 800; font-size: 22px; line-height: 1.2; padding: 0 16px; }

/* ---------------- Letter ---------------- */
.envelope {
  position: relative; display: block; width: 270px; max-width: 100%; height: 176px; margin: 16px auto 0;
  background: var(--pink); border: 3px solid var(--dark); border-radius: 10px; box-shadow: 6px 6px 0 var(--ink);
  animation: wiggle 2.6s infinite;
}
.envelope::before { /* kapak */
  content: ""; position: absolute; inset: 0; background: var(--pink-light);
  clip-path: polygon(0 0, 100% 0, 50% 60%); border-radius: 8px 8px 0 0;
}
.envelope__seal {
  position: absolute; left: 50%; top: 60%; transform: translate(-50%, -50%);
  width: 50px; height: 50px; border-radius: 50%; background: var(--blue); border: 3px solid var(--dark);
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--dark);
}
.envelope__to { position: absolute; left: 0; right: 0; bottom: 10px; font-family: var(--hand); font-size: 24px; color: var(--dark); }
.envelope:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }
.letter {
  background-color: var(--paper); color: #2b2238; border-radius: 6px; padding: 26px 22px; text-align: left;
  background-image: repeating-linear-gradient(transparent 0 31px, #e3d9ec 31px 32px);
  box-shadow: 6px 6px 0 var(--pink); animation: unfold .7s ease;
  font-family: var(--hand); font-size: 24px; line-height: 32px;
}
.letter__text p { margin-bottom: 32px; }
.letter__empty { color: #8f7aa8; text-align: center; }
.letter__sign { text-align: right; margin-top: 8px; }

/* ---------------- Quiz ---------------- */
.quiz { text-align: left; }
.quiz__step { font-size: 13px; color: var(--blue); font-weight: 700; margin-bottom: 6px; letter-spacing: .05em; }
.quiz__q { font-family: var(--head); font-weight: 800; font-size: 24px; line-height: 1.15; margin-bottom: 16px; }
.quiz__opts { display: grid; gap: 10px; }
.quiz__opt {
  text-align: left; min-height: 54px; padding: 12px 16px; border-radius: 14px;
  background: var(--panel); border: 2px solid var(--line); font-weight: 600; font-size: 16px;
}
.quiz__opt:active { transform: scale(.98); }
.quiz__opt.picked { background: var(--pink); border-color: var(--dark); color: var(--dark); }
.quiz__result { text-align: center; animation: unfold .6s ease; }
.quiz__badge {
  width: 112px; height: 112px; margin: 6px auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--head); font-weight: 800; font-size: 58px; color: var(--dark);
  background: var(--pink); border: 3px solid var(--dark); box-shadow: 5px 5px 0 var(--ink);
}
.quiz__result h3 { font-family: var(--head); font-weight: 800; font-size: 30px; line-height: 1.05; color: var(--pink); margin: 4px 0 10px; }
.quiz__result p { color: var(--muted); margin-bottom: 16px; }

/* ---------------- Album ---------------- */
/* yüksekliği JS veriyor: ne kadar uzun, o kadar kaydırma. clip: dönen sayfa yana taşmasın (sticky'yi bozmaz) */
.album { position: relative; margin: 0 -16px; overflow-x: clip; }
.album__sticky {
  position: sticky; top: calc(60px + var(--safe-t));
  height: calc(100dvh - 60px - var(--safe-t));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.book {
  --h: min(calc(min(78vw, 330px) * 1.36), calc(100dvh - 190px));
  position: relative; height: var(--h); width: calc(var(--h) * .735);
  perspective: 1800px;
}
.book::before { /* alttaki sayfa yığını */
  content: ""; position: absolute; inset: 0; border-radius: 4px 12px 12px 4px; background: var(--paper);
  box-shadow: 3px 3px 0 #d9d2c4, 6px 6px 0 #bfb7a8, 9px 9px 0 var(--pink);
}
.leaf { position: absolute; inset: 0; transform-origin: left center; transform-style: preserve-3d; will-change: transform; }
.page--back { transform: rotateY(180deg); border-radius: 12px 4px 4px 12px; box-shadow: inset -12px 0 0 rgba(0, 0, 0, .05); }
.page--cover-back { background: var(--pink-light); }
.page {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--paper); color: var(--dark); border-radius: 4px 12px 12px 4px;
  padding: 18px 16px 34px; display: flex; flex-direction: column; text-align: center; overflow: hidden;
  box-shadow: inset 12px 0 0 rgba(0, 0, 0, .05);
}
.page__shade { position: absolute; inset: 0; border-radius: inherit; background: #000; opacity: 0; pointer-events: none; }
.page__label { font-family: var(--head); font-weight: 800; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--purple); }
.page__photo {
  position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 14px 4px 0; padding: 8px 8px 4px; background: #fff;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .18); transform: rotate(var(--r, 0deg)); cursor: pointer;
}
.page__photo::before { /* bant */
  content: ""; position: absolute; top: -10px; left: 50%; width: 64px; height: 20px; margin-left: -32px; z-index: 1;
  background: var(--pink-light); opacity: .9; transform: rotate(calc(var(--r, 0deg) * -2));
}
.page__img { position: relative; flex: 1; min-height: 0; background: #ebe6ef; display: flex; align-items: center; justify-content: center; overflow: hidden; }
/* fotoğraf kendi boyutuyla sayfayı büyütmesin: çerçeveyi doldursun */
.page__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.page__empty { color: #9a8fa8; font-size: 13px; font-weight: 600; }
/* kutlama sayfası: fotoğraf yeri boş, kesik çizgili; bant ve el yazısı not */
.page__photo--bos .page__img { background: transparent; border: 2px dashed #cdbfd8; }
.page__photo--bos .page__empty { font-family: var(--hand); font-size: 25px; font-weight: 600; line-height: 1.2; color: #8a74a3; text-align: center; padding: 0 10px; }
/* not fotoğrafın altında; uzunsa iki satıra iner ve fotoğraf biraz küçülerek yer açar */
.page__note {
  flex: none; min-height: 34px; padding: 6px 4px 2px; font-family: var(--hand); font-size: 23px; line-height: 1.1; color: #2b2238;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.page__num { position: absolute; right: 16px; bottom: 10px; font-size: 12px; font-weight: 700; color: #a59bb2; }
.page--cover { background: var(--pink); border: 3px solid var(--dark); justify-content: center; align-items: center; gap: 6px; box-shadow: none; }
.page--cover .page__label { color: var(--dark); }
.page__title { font-family: var(--head); font-weight: 800; font-size: 44px; line-height: .95; color: var(--dark); }
.page__cat { width: 120px; margin: 14px 0 6px; }
.page__sub { font-family: var(--hand); font-size: 26px; color: var(--dark); }
.page--end { justify-content: center; align-items: center; }
.page--end .page__sub { font-size: 30px; line-height: 1.15; }
.album__hint { font-size: 30px; font-weight: 700; color: var(--pink); animation: bounce 1.4s infinite; transition: opacity .3s; }
.album__hint.gone { opacity: 0; }

.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(10, 9, 13, .94); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 90dvh; border-radius: 6px; }

/* ---------------- 14 flips ---------------- */
.flips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flip { perspective: 800px; min-height: 112px; }
.flip__inner { position: relative; width: 100%; height: 100%; min-height: 112px; transition: transform .55s; transform-style: preserve-3d; }
.flip.open .flip__inner { transform: rotateY(180deg); }
.flip__face {
  position: absolute; inset: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center; padding: 10px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 2px solid var(--line);
}
.flip__front { background: var(--panel); font-family: var(--head); font-weight: 800; font-size: 40px; }
.flip:nth-child(3n+1) .flip__front { color: var(--pink); }
.flip:nth-child(3n+2) .flip__front { color: var(--purple); }
.flip:nth-child(3n) .flip__front { color: var(--blue); }
.flip__back { transform: rotateY(180deg); color: var(--dark); font-weight: 700; font-size: 14px; line-height: 1.3; border-color: var(--dark); }
.flip:nth-child(3n+1) .flip__back { background: var(--pink); }
.flip:nth-child(3n+2) .flip__back { background: var(--purple); }
.flip:nth-child(3n) .flip__back { background: var(--blue); }

/* ---------------- Final ---------------- */
.music__line { color: var(--muted); margin-bottom: 18px; font-size: 17px; }
.music__line b { color: var(--ink); }
.video {
  position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000;
  border: 2px solid var(--dark); box-shadow: 5px 5px 0 var(--pink);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.spotify-link { display: inline-block; margin-top: 20px; color: var(--muted); font-weight: 600; font-size: 14px; text-underline-offset: 3px; }
.final__cat { width: 130px; margin: 30px auto 10px; }
.final__wish { font-family: var(--head); font-weight: 800; font-size: 26px; line-height: 1.15; }
.final__small { color: var(--muted); font-size: 13px; margin: 6px 0 22px; }

/* ---------------- Japonya: mühür defteri ---------------- */
:root { --jp-ink: #d7263d; --jp: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif; }
.stampbook {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; padding: 20px 16px;
  background: var(--paper); border-radius: 6px; box-shadow: 6px 6px 0 var(--pink);
  /* defter sayfası çizgileri */
  background-image: linear-gradient(90deg, transparent calc(50% - 1px), #e2d8c8 calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}
.slot { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #2b2238; }
.slot__ring {
  position: relative; width: 112px; height: 112px; border-radius: 50%;
  border: 2px dashed #c9bfae; display: flex; align-items: center; justify-content: center;
}
.slot__ring::before { content: "dokun"; font-size: 12px; color: #a99f8e; font-weight: 600; }
.slot.stamped .slot__ring { border-color: transparent; }
.slot.stamped .slot__ring::before { content: none; }
.slot__name { font-family: var(--head); font-weight: 800; font-size: 15px; }
.stamp {
  position: absolute; inset: 4px; border-radius: 50%; color: var(--jp-ink);
  border: 4px solid var(--jp-ink); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--jp-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transform: rotate(var(--r, -8deg)); opacity: .88; animation: stamp .35s cubic-bezier(.3, 1.6, .5, 1);
}
.stamp__kanji { font-family: var(--jp); font-weight: 700; font-size: 30px; line-height: 1; }
.stamp__name { font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.stamp__star { font-size: 10px; line-height: 1; }
.memory {
  margin-top: 22px; padding: 12px 12px 16px; background: #fff; color: #2b2238; border-radius: 4px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .5); transform: rotate(-1.5deg); animation: unfold .5s ease;
}
.memory__photo { aspect-ratio: 4 / 3; background: #ebe6ef; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.memory__img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #9a8fa8; font-size: 13px; font-weight: 600; }
.memory__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.memory__city { font-family: var(--hand); font-size: 30px; line-height: 1.1; margin-top: 10px; }
.memory__note { font-family: var(--hand); font-size: 22px; line-height: 1.25; color: #4a3b5c; }

/* ---------------- Japonya: omikuji ---------------- */
.kuji { position: relative; display: block; width: 120px; height: 210px; margin: 30px auto 10px; }
.kuji__box {
  position: absolute; left: 0; right: 0; bottom: 0; height: 170px; border-radius: 10px;
  background: #b9773f; border: 3px solid var(--dark); box-shadow: 5px 5px 0 var(--jp-ink);
  display: flex; align-items: center; justify-content: center; z-index: 1;
}
.kuji__box::before, .kuji__box::after { /* ahşap çizgileri */
  content: ""; position: absolute; left: 0; right: 0; height: 3px; background: #8a5426;
}
.kuji__box::before { top: 26px; }
.kuji__box::after { bottom: 26px; }
.kuji__label {
  writing-mode: vertical-rl; font-family: var(--jp); font-weight: 700; font-size: 22px; letter-spacing: .1em;
  background: var(--paper); color: var(--jp-ink); padding: 10px 6px; border: 2px solid var(--jp-ink);
}
.kuji__stick {
  position: absolute; left: 50%; bottom: 120px; width: 16px; height: 90px; margin-left: -8px;
  background: #e8c99a; border: 2px solid var(--dark); border-radius: 3px; z-index: 0;
  transform: translateY(70px); transition: transform .5s cubic-bezier(.3, 1.5, .5, 1);
  display: flex; justify-content: center;
}
.kuji__num { writing-mode: vertical-rl; font-family: var(--jp); font-weight: 700; font-size: 12px; color: var(--jp-ink); padding-top: 4px; }
.kuji.out .kuji__stick { transform: translateY(0); }
.kuji.shaking { animation: shake .5s ease-in-out; }
.fortune {
  position: relative; margin: 26px auto 0; max-width: 300px; padding: 22px 20px 20px;
  background: var(--paper); color: #2b2238; border: 3px solid var(--jp-ink); outline: 2px solid var(--jp-ink); outline-offset: 4px;
  animation: unroll .6s ease; transform-origin: top center;
}
.fortune__rank { font-family: var(--jp); font-weight: 700; font-size: 64px; line-height: 1; color: var(--jp-ink); }
.fortune__reading { font-weight: 700; font-size: 14px; letter-spacing: .08em; color: #7a6a8c; margin: 6px 0 14px; }
.fortune__msg { font-family: var(--hand); font-size: 26px; line-height: 1.2; }
.fortune__extra { margin-top: 14px; padding-top: 10px; border-top: 1px dashed #c9bfae; font-size: 13px; font-weight: 600; color: #7a6a8c; }

/* ---------------- Attack on Titan: Keşif Birliği ---------------- */
:root { --olive: #4a5a3c; --olive-dark: #2f3a26; --cream: #efe6cf; --leather: #7a4f2e; }
.oath { padding-top: 10px; }
.salute {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 210px; height: 210px; margin: 26px auto 14px; border-radius: 50%;
  background: var(--olive); color: var(--cream); border: 4px solid var(--dark); box-shadow: 6px 6px 0 var(--cream);
}
.salute:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--cream); }
.salute__jp { font-family: var(--jp); font-weight: 700; font-size: 23px; letter-spacing: .04em; }
.salute__tr { font-family: var(--head); font-weight: 800; font-size: 17px; }
.salute.done { animation: salute .6s ease; }
.oath__hint { color: var(--muted); font-size: 14px; }
.flash { position: fixed; inset: 0; z-index: 90; background: var(--cream); pointer-events: none; animation: flash .7s ease forwards; }
.idcard {
  margin: 10px auto 0; max-width: 340px; text-align: left; color: var(--dark);
  background: var(--cream); border: 3px solid var(--dark); border-radius: 12px; overflow: hidden;
  box-shadow: 6px 6px 0 var(--olive); animation: unfold .6s ease;
}
.idcard__head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--olive); color: var(--cream); }
.wings { width: 54px; flex: none; }
.wings svg, .wings img { width: 100%; height: auto; display: block; }
.idcard__org { font-family: var(--head); font-weight: 800; font-size: 19px; letter-spacing: .08em; line-height: 1.1; }
.idcard__sub { font-size: 12px; opacity: .85; }
.idcard__body { display: flex; gap: 14px; padding: 14px; }
.idcard__photo {
  width: 92px; height: 112px; flex: none; border: 2px solid var(--dark); background: #d8cdb0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 800; font-size: 44px; color: var(--olive-dark);
}
.idcard__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idcard__info { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 14px; align-content: start; }
.idcard__info dt { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--olive); padding-top: 3px; }
.idcard__info dd { font-weight: 700; line-height: 1.25; }
.idcard__foot { padding: 8px 14px; border-top: 2px dashed rgba(17, 16, 21, .25); font-family: var(--jp); font-weight: 700; font-size: 14px; color: var(--olive-dark); text-align: right; }
.badge { margin-top: 34px; }
.badge__art { width: 170px; margin: 0 auto; animation: badge-drop .9s cubic-bezier(.3, 1.5, .5, 1); }
.badge__art svg { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(5px 5px 0 rgba(0, 0, 0, .45)); }
.badge__shine { animation: badge-shine 1.6s ease-in-out .7s 2 both; }
.badge__title { font-family: "Pirata One", serif; font-weight: 400; font-size: 22px; letter-spacing: .04em; color: var(--muted); margin-top: 14px; text-transform: uppercase; }
.badge__note { font-family: var(--hand); font-size: 28px; line-height: 1.2; margin-top: 8px; }

/* ---------------- Sayfa temaları (body[data-theme] = aktif durağın adı) ---------------- */
body[data-theme="pasta"]  { --bg: #2a0f24; --panel: #3a1733; --line: #57264c; }
body[data-theme="oyun"]   { --bg: #0e1a33; --panel: #18264a; --line: #2a3c6b; }
body[data-theme="test"]   { --bg: #1e1236; --panel: #2b1b4a; --line: #45306e; }
body[data-theme="mektup"] { --bg: #24160f; --panel: #33221a; --line: #4d3427; --muted: #c4ad9c; }
body[data-theme="album"]  { --bg: #160f24; --panel: #211836; --line: #2e2445; }

/* Japonya: washi kâğıdı ve torii kırmızısı, serif yazı */
:root { --jp-latin: "Noto Serif", "Noto Serif JP", Georgia, serif; }
body[data-theme="muhur"]   { --bg: #f2e8d5; --panel: #e8dcc3; --line: #d4c4a3; --ink: #2a2018; --muted: #7a6a55; }
body[data-theme="omikuji"] { --bg: #a3262a; --panel: #8c1f23; --line: #c2463f; --ink: #fff4e6; --muted: #f6cdbd; }
body[data-theme="muhur"] .title, body[data-theme="omikuji"] .title { font-family: var(--jp-latin); font-weight: 700; letter-spacing: .01em; }
body[data-theme="muhur"] .lead, body[data-theme="omikuji"] .lead { font-family: var(--jp-latin); font-style: italic; }
body[data-theme="muhur"] .title::before { /* kırmızı güneş */
  content: ""; display: block; width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%; background: var(--jp-ink);
}
body[data-theme="muhur"] .btn:not(:disabled) { background: var(--jp-ink); color: #fff4e6; }
body[data-theme="muhur"] .stampbook { box-shadow: 6px 6px 0 var(--ink); background-color: #fbf6ec; }
body[data-theme="omikuji"] .btn:not(:disabled) { background: #fff4e6; color: var(--dark); box-shadow: 4px 4px 0 var(--dark); }
body[data-theme="omikuji"] .kuji__box { box-shadow: 5px 5px 0 var(--dark); }
body[data-theme="omikuji"] .fortune { box-shadow: 6px 6px 0 var(--dark); }

/* Attack on Titan: askerî yeşil, gotik (Pirata One) başlıklar */
body[data-theme="kesif"] { --bg: #1b2116; --panel: #252d1e; --line: #3a4630; --ink: #efe6cf; --muted: #b9b49a; }
body[data-theme="kesif"] .title { font-family: "Pirata One", serif; font-weight: 400; font-size: 46px; letter-spacing: .04em; text-transform: uppercase; }
body[data-theme="kesif"] .oath .lead { font-family: "Pirata One", serif; font-weight: 400; font-size: 24px; color: var(--ink); }
body[data-theme="kesif"] .idcard__org { font-family: "Pirata One", serif; font-weight: 400; font-size: 24px; letter-spacing: .05em; }
body[data-theme="kesif"] .salute__tr { font-family: "Pirata One", serif; font-weight: 400; font-size: 23px; letter-spacing: .02em; }
body[data-theme="kesif"] .btn:not(:disabled) { background: var(--cream); color: var(--dark); box-shadow: 4px 4px 0 var(--olive); }

/* ---------------- Animations ---------------- */
@keyframes stamp { 0% { transform: scale(1.8) rotate(var(--r, -8deg)); opacity: 0; } 60% { opacity: .95; } 100% { transform: scale(1) rotate(var(--r, -8deg)); } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(6deg); } }
@keyframes unroll { from { transform: scaleY(.05); opacity: 0; } }
@keyframes salute { 30% { transform: scale(.9); } 60% { transform: scale(1.06); } }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
@keyframes badge-drop { from { transform: translateY(-60px) scale(.5) rotate(-14deg); opacity: 0; } 60% { opacity: 1; } }
@keyframes badge-shine { from { transform: translateX(-120px) rotate(20deg); } to { transform: translateX(260px) rotate(20deg); } }
@keyframes step-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-5deg); } 88% { transform: rotate(5deg); } 92% { transform: rotate(-3deg); } 96% { transform: rotate(2deg); } }
@keyframes pulse { 50% { opacity: .4; } }
@keyframes bounce { 50% { transform: translateY(-8px); } }
@keyframes tail { 50% { transform: rotate(18deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes flicker { to { transform: scale(.9, 1.08) rotate(3deg); } }
@keyframes smoke { from { opacity: .8; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); } }
@keyframes hit { 30% { transform: scale(1.15, .8); } 100% { transform: translateY(110%); } }
@keyframes float-up { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-30px); } }
@keyframes unfold { from { opacity: 0; transform: translateY(16px); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
