/* Mahperi — gece mavisi, mor ve altın */
:root {
  --zemin: #0e0a19;
  --zemin2: #171029;
  --panel: rgba(255, 255, 255, .045);
  --panel-kenar: rgba(217, 181, 108, .18);
  --altin: #d9b56c;
  --altin2: #f1dba6;
  --yazi: #ece6f5;
  --soluk: #a99fc0;
  --mor: #8e6bd8;
  --gul: #e3a3b9;
  --hata: #ef8f8f;
  --golge: 0 18px 50px rgba(0, 0, 0, .45);
  --yaricap: 16px;
  --baslik: 'Cormorant Garamond', Georgia, serif;
  --govde: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --kart-oran: 500 / 860;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--yazi); font: 16px/1.6 var(--govde);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(142, 107, 216, .22), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(227, 163, 185, .12), transparent 60%),
    linear-gradient(180deg, var(--zemin), var(--zemin2));
  background-attachment: fixed;
}
.yildizlar {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff, transparent 60%), radial-gradient(1px 1px at 72% 12%, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 42% 64%, #f1dba6, transparent 60%), radial-gradient(1px 1px at 88% 48%, #fff, transparent 60%),
    radial-gradient(1px 1px at 22% 82%, #fff, transparent 60%), radial-gradient(1.2px 1.2px at 62% 88%, #fff, transparent 60%),
    radial-gradient(1px 1px at 8% 52%, #cdb8ff, transparent 60%), radial-gradient(1px 1px at 52% 32%, #fff, transparent 60%),
    radial-gradient(1.4px 1.4px at 92% 78%, #f1dba6, transparent 60%), radial-gradient(1px 1px at 33% 8%, #fff, transparent 60%);
  animation: parilti 7s ease-in-out infinite alternate;
}
@keyframes parilti { from { opacity: .35; } to { opacity: .7; } }
main, header { position: relative; z-index: 1; }

a { color: var(--altin2); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--baslik); font-weight: 600; letter-spacing: .01em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.soluk { color: var(--soluk); }
.kucuk { font-size: .88rem; }
.hilal { width: 1.3em; height: 1.3em; color: var(--altin); flex: none; }

/* ------------------------------------------------ üst kısım */
.ust {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1100px; margin: 0 auto; padding: 18px 20px;
}
.logo { display: flex; align-items: center; gap: 10px; font: 600 1.7rem var(--baslik); color: var(--altin2); }
.menu { display: flex; gap: 4px; flex-wrap: wrap; }
.menu a { padding: 8px 14px; border-radius: 999px; color: var(--soluk); font-size: .95rem; }
.menu a:hover { color: var(--yazi); background: var(--panel); }
.menu a.aktif { color: var(--zemin); background: var(--altin); }
.menu a.cikis { color: var(--soluk); opacity: .8; }

.icerik { max-width: 1100px; margin: 0 auto; padding: 8px 20px 60px; }

/* ------------------------------------------------ paneller, formlar */
.panel {
  background: var(--panel); border: 1px solid var(--panel-kenar); border-radius: var(--yaricap);
  padding: 24px; box-shadow: var(--golge); backdrop-filter: blur(6px);
}
.panel + .panel { margin-top: 20px; }
label { display: block; font-size: .9rem; color: var(--soluk); margin: 0 0 6px; }
input[type=text], input[type=password], input[type=number], input[type=url], textarea, select {
  width: 100%; font: inherit; color: var(--yazi); background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 12px 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { border-color: var(--altin); box-shadow: 0 0 0 3px rgba(217, 181, 108, .18); }
.alan { margin-bottom: 18px; }

.dugme {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font: 600 1rem var(--govde); color: #1b1405; border: 0; border-radius: 999px; padding: 13px 26px;
  background: linear-gradient(135deg, var(--altin2), var(--altin)); box-shadow: 0 8px 24px rgba(217, 181, 108, .25);
  transition: transform .15s, box-shadow .2s, opacity .2s;
}
.dugme:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(217, 181, 108, .35); color: #1b1405; }
.dugme:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.dugme.ikincil { background: transparent; color: var(--altin2); border: 1px solid var(--panel-kenar); box-shadow: none; }
.dugme.ikincil:hover { background: var(--panel); color: #fff; }
.dugme.kucuk { padding: 8px 16px; font-size: .9rem; }
.dugme.tehlike { background: transparent; color: var(--hata); border: 1px solid rgba(239, 143, 143, .4); box-shadow: none; }

.uyari { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: .95rem; }
.uyari.hata { background: rgba(239, 143, 143, .12); border: 1px solid rgba(239, 143, 143, .35); color: #ffd2d2; }
.uyari.basari { background: rgba(142, 216, 160, .1); border: 1px solid rgba(142, 216, 160, .35); color: #d3f5dc; }

/* ------------------------------------------------ giriş */
.giris-sayfasi .icerik { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.giris-kutu { width: min(420px, 100%); text-align: center; }
.giris-kutu .hilal { width: 64px; height: 64px; margin: 0 auto 8px; display: block; filter: drop-shadow(0 0 18px rgba(217, 181, 108, .5)); }
.giris-kutu h1 { margin-bottom: .1em; }
.giris-kutu form { text-align: left; margin-top: 24px; }
.giris-kutu .dugme { width: 100%; }

/* ------------------------------------------------ ana sayfa */
.karsilama { text-align: center; padding: 30px 0 10px; }
.karsilama p { color: var(--soluk); max-width: 560px; margin: 0 auto 1.4em; font-size: 1.05rem; }
.acilim-secimi { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.acilim-secimi input { position: absolute; opacity: 0; pointer-events: none; }
.acilim-secimi label {
  display: block; margin: 0; cursor: pointer; padding: 16px; border-radius: 14px; height: 100%;
  border: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .2); transition: all .2s;
}
.acilim-secimi label b { display: block; font: 600 1.2rem var(--baslik); color: var(--yazi); margin-bottom: 4px; }
.acilim-secimi label span { font-size: .85rem; color: var(--soluk); }
.acilim-secimi label em { font-style: normal; font-size: .78rem; color: var(--altin); }
.acilim-secimi input:checked + label { border-color: var(--altin); background: rgba(217, 181, 108, .1); box-shadow: 0 0 0 3px rgba(217, 181, 108, .12); }
.acilim-secimi input:focus-visible + label { outline: 2px solid var(--altin); }

.son-fallar { display: grid; gap: 12px; }
.fal-satiri {
  display: flex; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 14px;
  background: rgba(0, 0, 0, .2); border: 1px solid rgba(255, 255, 255, .07); color: var(--yazi); transition: all .2s;
}
.fal-satiri:hover { border-color: var(--panel-kenar); background: rgba(217, 181, 108, .06); color: var(--yazi); }
.fal-satiri .bilgi { flex: 1; min-width: 0; }
.fal-satiri .bilgi b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fal-satiri .kartlar-mini { display: flex; gap: 4px; flex: none; }
.kart-kucuk { width: 30px; aspect-ratio: var(--kart-oran); object-fit: cover; border-radius: 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.kart-kucuk.ters { transform: rotate(180deg); }

/* ------------------------------------------------ fal sayfası */
.fal-baslik { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.fal-baslik h1 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 0 0 4px; font-style: italic; color: var(--altin2); }
.fal-duzen { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .fal-duzen { grid-template-columns: 1fr; } }

.masa { min-height: 360px; display: flex; flex-direction: column; align-items: stretch; text-align: center; position: relative; overflow: hidden; overflow: clip; }
.masa::before {  /* masada hafif bir mum ışığı */
  content: ''; position: absolute; inset: -30% -10% auto; height: 70%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(241, 219, 166, .08), transparent); animation: mum 5s ease-in-out infinite alternate;
}
@keyframes mum { from { opacity: .6; transform: scale(1); } to { opacity: 1; transform: scale(1.05); } }
.sahne-baslik { font-size: .95rem; margin-bottom: 6px; min-height: 1.4em; }
.sahne-baslik b { font-family: var(--baslik); font-size: 1.25rem; font-weight: 600; }
.sahne { position: relative; min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.acilim-cip { display: inline-block; font-size: .72rem; letter-spacing: .03em; padding: 2px 9px; border-radius: 999px; background: rgba(217, 181, 108, .14); color: var(--altin2); border: 1px solid rgba(217, 181, 108, .25); vertical-align: middle; }

/* deste ve karıştırma */
.deste-alani { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 10px 0; }
.deste { position: relative; width: 118px; aspect-ratio: var(--kart-oran); margin: 26px 0 8px; }
.d-kart {
  position: absolute; inset: 0; border-radius: 9px; background: url(/assets/img/arka.svg) center/cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .25); will-change: transform;
}
.deste.parla::after {
  content: ''; position: absolute; inset: -18px; border-radius: 20px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(241, 219, 166, .55), transparent); animation: nabiz .9s ease-out both;
}
@keyframes nabiz { from { opacity: 0; transform: scale(.7); } 45% { opacity: 1; } to { opacity: 0; transform: scale(1.35); } }

/* yelpaze */
.secim-sayaci { margin: 4px 0 6px; color: var(--yazi); }
.secim-sayaci b { color: var(--altin2); }
.yelpaze { position: relative; width: 100%; max-width: 640px; margin: 0 auto; --kw: 42px; }
.y-kart {
  position: absolute; left: 50%; top: 0; width: var(--kw); aspect-ratio: var(--kart-oran); padding: 0; border: 0; cursor: pointer;
  border-radius: 5px; background: url(/assets/img/arka.svg) center/cover; box-shadow: -1px 2px 5px rgba(0, 0, 0, .55);
  --kalk: 0px; transform-origin: 50% var(--R);
  transform: translateX(-50%) rotate(var(--aci)) translateY(var(--kalk));
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .45s, box-shadow .2s, filter .2s;
}
.y-kart.toplu { transform: translateX(-50%) translateY(var(--merkez)) rotate(0deg) scale(.85); opacity: 0; transition: none; }
.y-kart:hover:not(:disabled) { --kalk: -16px; box-shadow: 0 0 0 1.5px var(--altin2), 0 0 16px rgba(241, 219, 166, .55); filter: brightness(1.15); transition-duration: .18s; }
.y-kart.alindi { opacity: .12; --kalk: -26px; cursor: default; }
.y-kart:disabled:not(.alindi) { cursor: default; filter: saturate(.7) brightness(.85); }

/* seçilenler tepsisi */
.secilenler { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; margin: 8px 0 4px; }
.yuva-kucuk { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 58px; }
.yuva-kucuk small { font-size: .66rem; color: var(--soluk); line-height: 1.15; min-height: 2.3em; }
.bos-kart {
  width: 42px; aspect-ratio: var(--kart-oran); border-radius: 5px; border: 1.5px dashed rgba(217, 181, 108, .35);
  display: grid; place-items: center; color: rgba(217, 181, 108, .5); font: 600 .9rem var(--baslik); transition: all .3s;
}
.yuva-kucuk.dolu .bos-kart {
  border: 0; background: url(/assets/img/arka.svg) center/cover; box-shadow: 0 0 0 1px rgba(241, 219, 166, .6), 0 0 14px rgba(241, 219, 166, .35);
  color: transparent; cursor: pointer; animation: yerles .35s ease-out;
}
.yuva-kucuk.dolu:last-of-type .bos-kart:hover { filter: brightness(1.2); }
@keyframes yerles { from { transform: scale(1.25); } }

/* uçan kart (seçimde ve dağıtırken) */
.ucan-kart {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; border-radius: 6px;
  background: url(/assets/img/arka.svg) center/cover; box-shadow: 0 12px 28px rgba(0, 0, 0, .55); will-change: transform;
}
.ucan-kart.parlak { box-shadow: 0 0 0 1.5px var(--altin2), 0 0 26px rgba(241, 219, 166, .7), 0 12px 28px rgba(0, 0, 0, .55); }

/* açılım yerleşimleri */
.acilim { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 14px; padding: 12px 0 6px; --kw: clamp(80px, 20vw, 150px); }
.acilim.duzen-tek { --kw: clamp(130px, 40vw, 200px); }
.acilim.duzen-ask { --kw: clamp(70px, 16vw, 118px); }
.acilim.kucuk { --kw: 64px; gap: 10px; padding: 8px 0; }
.acilim.kucuk .poz { font-size: .64rem; min-height: 0; }
.acilim.kucuk .kad { font-size: .74rem; }
.yuva { width: var(--kw); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.yuva .poz { font-size: .78rem; color: var(--soluk); text-align: center; line-height: 1.25; min-height: 2.5em; display: flex; align-items: flex-end; }
.yuva .kad { font: 600 1rem var(--baslik); color: var(--altin2); text-align: center; line-height: 1.2; opacity: 0; transform: translateY(6px); transition: opacity .6s .15s, transform .6s .15s; }
.yuva.acik .kad { opacity: 1; transform: none; }
.ters-etiket { font: 500 .66rem var(--govde); letter-spacing: .04em; text-transform: uppercase; color: var(--gul); border: 1px solid rgba(227, 163, 185, .4); border-radius: 999px; padding: 0 6px; vertical-align: 2px; }

.acilim.duzen-kelt {
  --kw: clamp(52px, 10.5vw, 96px);
  display: grid; justify-content: center; gap: 10px 10px;
  grid-template-columns: repeat(3, var(--kw)) 22px var(--kw); column-gap: 16px;
  grid-template-areas: ". k5 . . k10" "k4 k1 k6 . k9" ". k3 . . k8" ". . . . k7";
}
.duzen-kelt .yuva .poz { min-height: 0; font-size: .68rem; }
.duzen-kelt .yuva .kad { font-size: .82rem; }
.duzen-kelt .y0 { grid-area: k1; } .duzen-kelt .y1 { grid-area: k1; z-index: 2; }
.duzen-kelt .y2 { grid-area: k3; } .duzen-kelt .y3 { grid-area: k4; } .duzen-kelt .y4 { grid-area: k5; }
.duzen-kelt .y5 { grid-area: k6; } .duzen-kelt .y6 { grid-area: k7; } .duzen-kelt .y7 { grid-area: k8; }
.duzen-kelt .y8 { grid-area: k9; } .duzen-kelt .y9 { grid-area: k10; }
.duzen-kelt .y1 .kart { transform: rotate(90deg) scale(.92); }
.duzen-kelt .y1 .poz, .duzen-kelt .y1 .kad { display: none; }
@media (max-width: 620px) {
  .acilim.duzen-kelt { display: flex; --kw: clamp(70px, 26vw, 110px); }
  .acilim.duzen-kelt.kucuk { --kw: 64px; }
  .duzen-kelt .y1 .kart { transform: none; }
  .duzen-kelt .y1 .poz { display: flex; }
  .duzen-kelt .y1 .kad { display: block; }
}

/* kart: süzülme > eğim > (kelt dönüşü) > çevirme */
.suzen { width: 100%; }
.yuva.acik .suzen { animation: suzul 6s ease-in-out infinite; }
@keyframes suzul { 50% { transform: translateY(-4px); } }
.kart-kap {
  width: 100%; perspective: 900px; --rx: 0deg; --ry: 0deg; --px: 50%; --py: 50%;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s ease, opacity .3s;
}
.kart-kap.egik { transition: transform .08s linear; }
.yuva:not(.yerlesti) .kart-kap { opacity: 0; }
.kart { position: relative; width: 100%; aspect-ratio: var(--kart-oran); cursor: zoom-in; border-radius: 8px; }
.kart-ic { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.yuva.acik .kart-ic { transform: rotateY(180deg); }
.yuva.aciliyor .kart-ic { animation: cevir 1s cubic-bezier(.3, .6, .25, 1) forwards; }
@keyframes cevir {
  0%   { transform: rotateY(0) translateZ(0) scale(1); }
  35%  { transform: rotateY(40deg) translateZ(70px) scale(1.14) translateY(-14px); }
  70%  { transform: rotateY(160deg) translateZ(40px) scale(1.08) translateY(-6px); }
  100% { transform: rotateY(180deg) translateZ(0) scale(1); }
}
.kart .yuz, .kart .arka { position: absolute; inset: 0; border-radius: 8px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .55); }
.kart .arka { background: url(/assets/img/arka.svg) center/cover; }
.kart .yuz { transform: rotateY(180deg); background: #111; }
.kart .yuz img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.5, 0, .2, 1) .15s; }
.kart.ters .yuz img { transform: rotate(0deg); }
.yuva.acik .kart.ters .yuz img { transform: rotate(180deg); }           /* ters kart gözün önünde döner */
.yuva.acik .kart .yuz { box-shadow: 0 0 0 1px rgba(241, 219, 166, .5), 0 10px 28px rgba(0, 0, 0, .6), 0 0 22px rgba(217, 181, 108, .16); }
.kart .yuz::after {  /* fareyle gezinen ışık + açılırken geçen parıltı */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--px) var(--py), rgba(255, 250, 230, .28), transparent 55%);
}
.kart-kap.egik .kart .yuz::after { opacity: 1; }
.yuva.parilti .kart .yuz::before {
  content: ''; position: absolute; inset: -40%; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 246, 214, .75) 50%, transparent 62%);
  animation: isik-gecis 1.3s ease-out forwards;
}
@keyframes isik-gecis { from { transform: translateX(-70%); } to { transform: translateX(70%); } }
.yuva.parilti .kart-kap { animation: hale 1.6s ease-out; }
@keyframes hale { 0% { filter: drop-shadow(0 0 0 rgba(241, 219, 166, 0)); } 30% { filter: drop-shadow(0 0 22px rgba(241, 219, 166, .85)); } 100% { filter: drop-shadow(0 0 0 rgba(241, 219, 166, 0)); } }

.kivilcim {
  position: fixed; z-index: 70; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 30%, #f1dba6 45%, transparent 70%);
  animation: kivilcim 1s cubic-bezier(.15, .7, .3, 1) forwards;
}
@keyframes kivilcim {
  0% { transform: translate(0, 0) scale(.4); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.1); opacity: 0; }
}

/* önceki açılımlar */
.oncekiler { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.oncekiler:empty { display: none; }
.onceki { border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; background: rgba(0, 0, 0, .18); }
.onceki.yeni-eklendi { animation: belir .5s both; }
.onceki-baslik {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px;
  background: none; border: 0; color: var(--yazi); font: inherit; font-size: .88rem; cursor: pointer; text-align: left;
}
.onceki-baslik:hover { color: #fff; }
.onceki-kartlar { display: flex; gap: 3px; flex: none; }
.onceki-kartlar img { width: 20px; aspect-ratio: var(--kart-oran); object-fit: cover; border-radius: 2px; }
.onceki-kartlar img.ters { transform: rotate(180deg); }
.onceki.acik .onceki-baslik { border-bottom: 1px solid rgba(255, 255, 255, .06); }

/* aynı sohbette yeni açılım */
.yeni-acilim { margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(217, 181, 108, .2); }
.yeni-acilim form { text-align: left; animation: belir .3s both; }
.tip-secimi { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 10px; }
.tip-secimi input { position: absolute; opacity: 0; pointer-events: none; }
.tip-secimi span { display: block; padding: 9px 11px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .2); cursor: pointer; transition: all .2s; }
.tip-secimi b { display: block; font: 600 1rem var(--baslik); }
.tip-secimi small { color: var(--altin); font-size: .72rem; }
.tip-secimi input:checked + span { border-color: var(--altin); background: rgba(217, 181, 108, .1); }
.yeni-acilim-dugmeler { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ------------------------------------------------ 3B masa */
.sahne.sahne-3d { display: block; min-height: 0; }
.m3 { position: relative; width: 100%; height: clamp(400px, 66vh, 580px); border-radius: 12px; overflow: hidden; background: #0b0714; box-shadow: inset 0 0 0 1px rgba(217, 181, 108, .12), 0 10px 30px rgba(0, 0, 0, .35); }
.m3-tuval { display: block; width: 100%; height: 100%; touch-action: manipulation; }
.m3-etiketler { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.m3-etiket {
  position: absolute; left: 0; top: 0; white-space: nowrap; text-align: center; line-height: 1.2;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: .72rem; color: #c9bfdc; text-shadow: 0 1px 3px #000, 0 0 8px rgba(0, 0, 0, .8);
}
.m3-etiket.kucuk { font-size: .68rem; }
.m3-etiket.tepsi { white-space: normal; width: 76px; }
.m3-etiket.tepsi b { margin: 0; }
.m3-etiket.sagda { align-items: flex-start; text-align: left; }
.m3-etiket.capraz { background: rgba(10, 6, 18, .72); padding: 2px 7px; border-radius: 8px; }
.m3-etiket b { color: var(--altin2); margin-right: 3px; }
.m3-etiket .ad { font: 600 .92rem var(--baslik); color: var(--altin2); opacity: 0; transform: translateY(4px); transition: opacity .7s, transform .7s; }
.m3-etiket.acik .ad { opacity: 1; transform: none; }
.m3-etiket .ad em { font: 500 .58rem var(--govde); font-style: normal; letter-spacing: .05em; text-transform: uppercase; color: var(--gul); border: 1px solid rgba(227, 163, 185, .45); border-radius: 999px; padding: 0 5px; margin-left: 4px; vertical-align: 2px; }
.m3-etiket.rozetli { background: none; padding: 0; }
.m3-etiket .rozet { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font: 700 .72rem var(--govde); color: #1b1405; background: linear-gradient(135deg, var(--altin2), var(--altin)); box-shadow: 0 1px 4px rgba(0, 0, 0, .7); text-shadow: none; }
.m3-lejant { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 14px; text-align: left; font-size: .8rem; }
.m3-lejant li { display: flex; align-items: baseline; gap: 7px; padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); animation: belir .3s both; }
.m3-lejant b { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .66rem; color: #1b1405; background: var(--altin); }
.m3-lejant .poz { color: var(--soluk); }
.m3-lejant .ad { margin-left: auto; font: 600 .9rem var(--baslik); color: var(--altin2); text-align: right; }
.m3-lejant .ad.bekliyor { color: var(--soluk); font-weight: 400; }
.m3-lejant .ad em { font: 500 .56rem var(--govde); font-style: normal; text-transform: uppercase; color: var(--gul); border: 1px solid rgba(227, 163, 185, .45); border-radius: 999px; padding: 0 4px; margin-left: 3px; vertical-align: 2px; }
.m3-ust { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 88%; text-align: center; font-size: .92rem; pointer-events: none; text-shadow: 0 1px 4px #000; }
.m3-ust b { color: var(--altin2); }
.m3-ust small { display: block; margin-top: 2px; font-size: .72rem; color: var(--soluk); }
.m3-alt { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; }
.m3-alt button { pointer-events: auto; }
.m3-ses {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(217, 181, 108, .3); background: rgba(10, 6, 18, .6) center / 18px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1dba6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 9h4l5-4v14l-5-4H4z' fill='%23f1dba6'/%3E%3Cpath d='M16 9a4 4 0 0 1 0 6M18.5 6.5a8 8 0 0 1 0 11'/%3E%3C/svg%3E");
}
.m3-ses.kapali { opacity: .7; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a99fc0' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 9h4l5-4v14l-5-4H4z' fill='%23a99fc0'/%3E%3Cpath d='M17 9l5 6M22 9l-5 6'/%3E%3C/svg%3E"); }
@media (max-width: 620px) { .m3 { height: clamp(360px, 60vh, 480px); } .m3-etiket { font-size: .62rem; } .m3-etiket .ad { font-size: .78rem; } }

/* ------------------------------------------------ sohbet */
.sohbet { display: flex; flex-direction: column; height: min(78vh, 760px); padding: 0; overflow: hidden; }
@media (max-width: 900px) { .sohbet { height: auto; min-height: 60vh; } }
.sohbet-ust { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 35% 30%, #3b2a66, #1a1230); border: 1px solid var(--panel-kenar);
  box-shadow: 0 0 18px rgba(142, 107, 216, .35);
}
.avatar .hilal { width: 24px; height: 24px; }
.sohbet-ust b { font: 600 1.25rem var(--baslik); display: block; line-height: 1.1; }
.sohbet-ust .durum { font-size: .8rem; color: #9fd6a8; }
.sohbet-ust .durum.yaziyor { color: var(--altin2); }
.mesajlar { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.mesaj { max-width: 88%; padding: 12px 16px; border-radius: 16px; line-height: 1.65; animation: belir .35s both; }
.mesaj p { margin: 0 0 .7em; }
.mesaj p:last-child { margin: 0; }
.mesaj.mahperi { align-self: flex-start; background: rgba(142, 107, 216, .13); border: 1px solid rgba(142, 107, 216, .25); border-top-left-radius: 4px; }
.mesaj.kullanici { align-self: flex-end; background: rgba(217, 181, 108, .14); border: 1px solid rgba(217, 181, 108, .28); border-top-right-radius: 4px; white-space: pre-wrap; }
.mesaj.mahperi.yorum { max-width: 100%; }
.imlec { display: inline-block; width: 7px; height: 1em; background: var(--altin2); margin-left: 2px; vertical-align: -2px; animation: yanson 1s steps(1) infinite; }
@keyframes yanson { 50% { opacity: 0; } }
.noktalar { display: inline-flex; gap: 5px; padding: 4px 2px; }
.noktalar i { width: 7px; height: 7px; border-radius: 50%; background: var(--soluk); animation: nokta 1.2s infinite ease-in-out; }
.noktalar i:nth-child(2) { animation-delay: .15s; } .noktalar i:nth-child(3) { animation-delay: .3s; }
@keyframes nokta { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }
.yazma { display: flex; gap: 10px; padding: 14px; border-top: 1px solid rgba(255, 255, 255, .07); align-items: flex-end; }
.yazma textarea { min-height: 48px; max-height: 160px; resize: none; overflow-y: auto; scrollbar-width: thin; }
.yazma .dugme { padding: 12px 18px; flex: none; }

.mesaj-ust { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.konusan-ad { font: 600 .78rem var(--govde); color: #9ee0d0; letter-spacing: .02em; }
.mesaj.mahperi.nehir { background: rgba(90, 190, 170, .1); border-color: rgba(120, 210, 190, .28); }
.avatar .yildiz-ikon { display: none; width: 22px; height: 22px; color: #9ee0d0; }
.avatar.nehir { background: radial-gradient(circle at 35% 30%, #1f5a55, #102a2b); box-shadow: 0 0 18px rgba(90, 190, 170, .35); }
.avatar.nehir .hilal { display: none; }
.avatar.nehir .yildiz-ikon { display: block; }
.fal-satiri-kap { display: flex; gap: 8px; align-items: stretch; transition: opacity .35s, transform .35s; }
.fal-satiri-kap .fal-satiri { flex: 1; min-width: 0; }
.fal-satiri-kap.siliniyor { opacity: 0; transform: translateX(30px); }
.sil-dugme { flex: none; width: 44px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .07); background: rgba(0, 0, 0, .2); color: var(--soluk); cursor: pointer; display: grid; place-items: center; transition: all .2s; }
.sil-dugme svg { width: 18px; height: 18px; }
.sil-dugme:hover { color: var(--hata); border-color: rgba(239, 143, 143, .4); background: rgba(239, 143, 143, .08); }

/* ------------------------------------------------ geçmiş */
.gecmis-liste { display: grid; gap: 12px; }
.gecmis-liste .fal-satiri .kart-kucuk { width: 34px; }
.bos { text-align: center; padding: 40px 10px; color: var(--soluk); }

/* ------------------------------------------------ kart kütüphanesi */
.kart-grubu { margin-bottom: 34px; }
.kart-grubu h2 { border-bottom: 1px solid var(--panel-kenar); padding-bottom: 8px; margin-bottom: 16px; }
.kart-izgara { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 12px; }
.kart-izgara button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--yazi); font: inherit; text-align: center; }
.kart-izgara img { width: 100%; aspect-ratio: var(--kart-oran); object-fit: cover; border-radius: 7px; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); transition: transform .2s, box-shadow .2s; }
.kart-izgara button:hover img { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--altin), 0 10px 24px rgba(0, 0, 0, .6); }
.kart-izgara span { display: block; font-size: .85rem; margin-top: 6px; line-height: 1.25; }

/* ------------------------------------------------ büyük kart penceresi */
.pencere { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 20px; background: rgba(8, 5, 16, .82); backdrop-filter: blur(6px); }
.pencere.acik { display: grid; animation: belir .25s both; }
.pencere-kutu { display: flex; gap: 26px; align-items: center; max-width: 820px; width: 100%; }
.pencere-kutu img { width: min(300px, 42vw); aspect-ratio: var(--kart-oran); object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 1px rgba(241, 219, 166, .5), var(--golge); flex: none; }
.pencere-kutu img.ters { transform: rotate(180deg); }
.pencere-kutu h2 { margin-bottom: .2em; }
.pencere-kutu .anahtar { color: var(--altin); font-size: .9rem; margin-bottom: 1em; }
.pencere-kutu h3 { font-size: 1.1rem; margin: 1em 0 .3em; color: var(--altin2); }
.pencere-kapat { position: absolute; top: 16px; right: 20px; background: none; border: 0; color: var(--yazi); font-size: 2rem; cursor: pointer; line-height: 1; }
@media (max-width: 640px) { .pencere-kutu { flex-direction: column; text-align: center; } .pencere-kutu img { width: min(220px, 60vw); } }

/* ------------------------------------------------ yönetim */
.yonetim .ust { border-bottom: 1px solid rgba(255, 255, 255, .06); }
.etiket { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: rgba(217, 181, 108, .15); color: var(--altin2); vertical-align: middle; }
.etiket.gri { background: rgba(255, 255, 255, .08); color: var(--soluk); }
.etiket.yesil { background: rgba(142, 216, 160, .15); color: #bfeccb; }
.etiket.kirmizi { background: rgba(239, 143, 143, .15); color: #ffc9c9; }
table.tablo { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tablo th, .tablo td { text-align: left; padding: 10px 10px; border-bottom: 1px solid rgba(255, 255, 255, .07); vertical-align: top; }
.tablo th { color: var(--soluk); font-weight: 500; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.tablo tr:hover td { background: rgba(255, 255, 255, .02); }
.tablo-kap { overflow-x: auto; }
.izgara-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .izgara-2 { grid-template-columns: 1fr; } }
.ozet { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ozet div { padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-kenar); }
.ozet b { display: block; font: 600 2rem var(--baslik); color: var(--altin2); }
.satir-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.satir-form .alan { flex: 1; min-width: 160px; margin: 0; }
.not-listesi { display: flex; flex-direction: column; }
.not-satiri { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.not-sil { background: none; border: 0; color: var(--soluk); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.not-sil:hover { color: var(--hata); }
pre.kaynak { font-size: .75rem; color: var(--soluk); white-space: pre-wrap; margin: 4px 0 0; }
.kaynak-etiket { font-size: .7rem; color: var(--soluk); margin-top: 6px; opacity: .8; }
