/* ================= Niyet · "Panayır akşamı" paleti ================= */
/* Doğum günü stilinin kopyası (terfi şablonu üzerinden); renkler burada ezilir */
:root {
  --bg: #1C1433;
  --bg-deep: #0E0A1C;
  --pink: #FFC98B;        /* vurgu: fener şeftalisi */
  --pink-deep: #F2A65A;
  --mint: #A8E6D4;
  --lilac: #C9B6F2;
  --cream: #FFF4E0;
  --gold: #FFD27A;
  --text: #FFF9F4;
  --muted: rgba(255, 244, 236, .72);
}
.headline .accent { text-shadow: 0 0 28px rgba(255, 201, 139, .45), 0 0 2px rgba(255, 235, 210, .5); }
.btn.primary {
  background: linear-gradient(180deg, #FFE7C9 0%, #FFC98B 100%); color: #3A2210;
  box-shadow: 0 12px 34px -10px rgba(255, 190, 120, .7), inset 0 1px 0 rgba(255, 255, 255, .75);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 12px 34px -10px rgba(255, 190, 120, .7), 0 0 0 0 rgba(255, 210, 160, .45), inset 0 1px 0 rgba(255, 255, 255, .75); }
  50% { box-shadow: 0 12px 34px -10px rgba(255, 190, 120, .7), 0 0 0 14px rgba(255, 210, 160, 0), inset 0 1px 0 rgba(255, 255, 255, .75); }
}
.flash { background: radial-gradient(circle at 50% 50%, #FFFFFF 0%, #FFEBD6 32%, rgba(255, 225, 190, .35) 60%, rgba(255, 225, 190, 0) 80%); }
.loader { background: radial-gradient(90% 70% at 50% 45%, #2A1E4A 0%, #0E0A1C 70%); }
.preview-pill { color: #3A2210; background: rgba(255, 231, 201, .92); }
.ad-badge { background: #FFE7C9; color: #3A2210; }
/* Tam ekran gren kapalı (performans), sahnede sayfa kaymasın */
.grain { display: none; }
#scene { touch-action: none; }

/* Niyet kâğıdı */
.paper-wrap {
  position: fixed; left: 50%; top: 50%; z-index: 16; transform: translate(-50%, -46%);
  width: min(86vw, 400px); display: grid; gap: 16px; justify-items: center;
}
.paper-wrap[hidden] { display: none; }
.paper {
  --tint: #FBF3E4;
  position: relative; width: 100%; padding: 30px 28px 22px; border-radius: 10px; cursor: pointer;
  background: linear-gradient(170deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 45%), var(--tint);
  outline: 1.5px dashed rgba(138, 90, 52, .28); outline-offset: -10px;   /* niyet fişi kenarı */
  color: #3A2418; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6), 0 2px 0 rgba(255, 255, 255, .5) inset;
  transform-origin: 50% 50%; text-align: center;
}
/* Katlı hâl: iki kat izi ve ortada tavşan mührü */
.paper::before, .paper::after { content: ''; position: absolute; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.paper::before {
  inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, transparent 32.6%, rgba(120, 80, 50, .2) 33.2%, rgba(255, 255, 255, .55) 34%, transparent 35%,
    transparent 65.6%, rgba(120, 80, 50, .2) 66.2%, rgba(255, 255, 255, .55) 67%, transparent 68%);
}
.paper::after {
  content: '🐰'; left: 50%; top: 50%; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%;
  display: grid; place-items: center; font-size: 36px;
  background: radial-gradient(circle at 35% 30%, #FFB9A3 0%, #E4735C 70%, #C95A44 100%);
  box-shadow: 0 4px 10px rgba(90, 30, 20, .35), inset 0 -3px 6px rgba(0, 0, 0, .18), inset 0 2px 4px rgba(255, 255, 255, .45);
}
.paper.folded::before, .paper.folded::after { opacity: 1; }
.paper:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.paper-title { font-size: 11px; font-weight: 800; letter-spacing: .32em; color: #8A5A34; margin-bottom: 12px; }
.paper-text {
  font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(21px, 5.6vw, 26px); line-height: 1.34;
  min-height: 2.7em;
}
.paper-text .w { display: inline-block; }
.paper-sign { margin-top: 12px; font-size: 22px; }
.paper.folded .paper-title, .paper.folded .paper-text, .paper.folded .paper-sign { visibility: hidden; }
.paper-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.paper-actions .btn { min-width: 0; text-decoration: none; }
@media (min-aspect-ratio: 11/10) { .paper-wrap { top: 54%; } }

/* ---------- Niyet seviyeleri ---------- */
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spinAng { to { --ang: 360deg; } }
@keyframes shine { from { background-position: -160% 0, 0 0, 0 0; } to { background-position: 260% 0, 0 0, 0 0; } }
.paper-badge {
  display: inline-block; margin: -6px auto 10px; padding: 5px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.paper.folded .paper-badge { visibility: hidden; }
/* Nadir: altın kâğıt, altın kenar ve hafif hare, açılınca üzerinden ışık geçer */
.paper.tier-rare {
  --tint: #FFF1D2 !important;
  outline: 2px solid rgba(206, 150, 50, .75); outline-offset: -10px;
  box-shadow: 0 0 0 2px rgba(255, 214, 130, .35), 0 0 24px rgba(255, 196, 96, .3), 0 30px 60px -20px rgba(0, 0, 0, .6);
}
.paper.tier-rare .paper-badge { background: linear-gradient(180deg, #FFE7A0, #E8B64C); color: #5A3A08; }
.paper.tier-rare.folded::after { content: '✦'; color: #6B4508; font-size: 34px; background: radial-gradient(circle at 35% 30%, #FFF0B8 0%, #E8B64C 60%, #B8862A 100%); }
.paper.shine {
  background:
    linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .75) 48%, transparent 58%) -160% 0 / 60% 100% no-repeat,
    linear-gradient(170deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 45%), var(--tint);
  animation: shine 1.6s ease-out 1;
}
/* Çok nadir: inci kâğıt, dönen yanardöner kenar, yumuşak renkli hare */
.paper.tier-legendary {
  --tint: #F7F2FF !important;
  border: 3px solid transparent; outline: none;
  background:
    linear-gradient(170deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 45%) padding-box,
    linear-gradient(var(--tint), var(--tint)) padding-box,
    conic-gradient(from var(--ang), #FF9ACB, #FFE08A, #9FF0D8, #9FC4FF, #C9A8FF, #FF9ACB) border-box;
  animation: spinAng 4s linear infinite;
  box-shadow: 0 0 0 3px rgba(201, 168, 255, .25), 0 0 34px rgba(201, 168, 255, .45), 0 0 80px rgba(255, 170, 220, .18), 0 30px 60px -20px rgba(0, 0, 0, .6);
}
.paper.tier-legendary .paper-badge {
  background: conic-gradient(from var(--ang), #FFD1E6, #FFF1B8, #C9F7E8, #D8C6FF, #FFD1E6); color: #3B2560; animation: spinAng 4s linear infinite;
}
.paper.tier-legendary.folded::after { content: '✦'; color: #fff; font-size: 34px; background: conic-gradient(from var(--ang), #FF9ACB, #FFE08A, #9FF0D8, #9FC4FF, #C9A8FF, #FF9ACB); animation: spinAng 3s linear infinite; }
/* Gönderenin kendi yazdığı niyet: kalp mühür, pembe kâğıt */
.paper.tier-own { --tint: #FFEAF0 !important; }
.paper.tier-own .paper-badge { background: #FFD3E0; color: #7A1F43; text-transform: none; letter-spacing: 0; font-size: 13px; }
.paper.tier-own.folded::after { content: '❤️'; background: radial-gradient(circle at 35% 30%, #FFE3EA 0%, #F7A8C0 70%, #E07A9A 100%); }

/* Bir daha çek: seçenek kartı */
.sheet { position: fixed; inset: 0; z-index: 40; display: grid; align-items: end; justify-items: center; padding: 16px; background: rgba(10, 6, 22, .55); backdrop-filter: blur(6px); }
.sheet[hidden] { display: none; }
.sheet-card {
  width: min(100%, 420px); padding: 26px 22px 20px; border-radius: 26px; text-align: center;
  background: linear-gradient(180deg, #2B2050, #1C1433); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7); margin-bottom: max(8px, env(safe-area-inset-bottom));
}
.sheet-icon { font-size: 40px; line-height: 1; }
.sheet-title { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 26px; margin: 10px 0 8px; color: var(--pink); }
.sheet-text { color: var(--muted); margin: 0 0 18px; line-height: 1.5; }
.sheet-actions { display: grid; gap: 10px; }
.sheet-actions .btn { width: 100%; justify-content: center; text-decoration: none; }
@media (min-aspect-ratio: 11/10) { .sheet { align-items: center; } }
.paper-text.long { font-size: clamp(18px, 4.7vw, 22px); line-height: 1.4; }
.card-row { flex-wrap: wrap; }
.card-row .card-wide { flex-basis: 100%; justify-content: center; text-decoration: none; }
