:root {
  --bg: #070b14;
  --ink: #f3ead9;
  --dim: #9aa3b5;
  --ember: #ffa53d;
  --ember-hot: #ffd08a;
  --hp: #e5484d;
  --panel: rgba(12, 17, 30, .78);
  --line: rgba(255, 255, 255, .12);
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#xpbar { height: 6px; background: rgba(255, 255, 255, .08); }
#xpfill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ember), var(--ember-hot));
  box-shadow: 0 0 10px var(--ember); transition: width .15s; }
#top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px; padding: 10px 14px; }
#hpwrap { display: flex; align-items: center; gap: 10px; }
#hpbar { position: relative; width: min(240px, 38vw); height: 18px; border-radius: 9px; overflow: hidden;
  background: rgba(0, 0, 0, .55); border: 1px solid var(--line); }
#hpfill { display: block; height: 100%; width: 100%; background: linear-gradient(180deg, #ff6b6f, var(--hp)); transition: width .12s; }
#hptext { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 600;
  text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
#level { font-weight: 700; color: var(--ember-hot); white-space: nowrap; }
#timerwrap { text-align: center; line-height: 1.1; }
#timerwrap small { color: var(--dim); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
#timer { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 2px 8px #000; }
#right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
#kills { font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 4px; }
#right button { pointer-events: auto; width: 38px; height: 38px; border-radius: 10px; background: var(--panel);
  border: 1px solid var(--line); font-size: 14px; }
#right button.off { opacity: .4; text-decoration: line-through; }
#skills { position: absolute; left: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; gap: 6px; max-width: 70vw; }
#skills span { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 13px; }
#skills b { color: var(--ember-hot); margin-left: 4px; font-size: 11px; }
#banner { position: absolute; left: 0; right: 0; top: 26%; text-align: center; font-size: clamp(22px, 5vw, 40px); font-weight: 800;
  letter-spacing: .06em; color: #ff7a6b; text-shadow: 0 0 24px rgba(255, 60, 60, .7), 0 2px 6px #000; opacity: 0; transition: opacity .4s; }
#banner.on { opacity: 1; }

/* Dokunmatik joystick */
#stick { position: fixed; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; display: none;
  border: 2px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .05); pointer-events: none; }
#knob { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: rgba(255, 190, 110, .55); box-shadow: 0 0 16px rgba(255, 165, 61, .6); }

/* Ekranlar */
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; text-align: center; background: radial-gradient(ellipse at center, rgba(7, 11, 20, .55), rgba(7, 11, 20, .92)); }
h1 { font-size: clamp(44px, 11vw, 92px); font-weight: 800; letter-spacing: .02em; color: var(--ember-hot);
  text-shadow: 0 0 40px rgba(255, 150, 50, .65), 0 0 90px rgba(255, 110, 30, .35); }
h2 { font-size: clamp(26px, 6vw, 42px); font-weight: 800; }
.tag { font-size: clamp(15px, 3.4vw, 19px); max-width: 30em; }
.dim { color: var(--dim); font-size: 14px; line-height: 1.6; }
.help { max-width: 34em; }
.big { padding: 14px 44px; border-radius: 14px; font-size: 20px; font-weight: 700; color: #1b1206;
  background: linear-gradient(180deg, var(--ember-hot), var(--ember)); box-shadow: 0 6px 28px rgba(255, 150, 50, .45); transition: transform .1s; }
.big:hover { transform: translateY(-2px); }
.big:active { transform: translateY(1px); }

#cards { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 860px; }
.card { flex: 1 1 220px; max-width: 270px; min-height: 190px; padding: 18px 16px; border-radius: 16px; background: var(--panel);
  border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .12s, border-color .12s, box-shadow .12s; }
.card:hover, .card:focus-visible { transform: translateY(-4px); border-color: var(--ember); box-shadow: 0 8px 30px rgba(255, 150, 50, .25); outline: 0; }
.card .ic { font-size: 34px; color: var(--ember-hot); text-shadow: 0 0 18px var(--ember); line-height: 1.2; }
.card b { font-size: 18px; }
.card small { color: var(--ember); font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.card p { color: var(--dim); font-size: 14px; line-height: 1.45; }
.card kbd { margin-top: auto; font: inherit; font-size: 11px; color: var(--dim); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; }

#overStats { display: grid; grid-template-columns: auto auto; gap: 6px 22px; font-size: 17px; text-align: left; }
#overStats span { color: var(--dim); }
#overStats b { font-variant-numeric: tabular-nums; text-align: right; }

#err { position: fixed; left: 0; right: 0; bottom: 0; padding: 0 10px; color: #ff8080; font-size: 12px; white-space: pre-wrap; pointer-events: none; z-index: 9; }

@media (max-width: 560px) {
  .card { flex-basis: 100%; max-width: 100%; min-height: 0; flex-direction: row; flex-wrap: wrap; text-align: left; column-gap: 12px; padding: 12px 14px; }
  .card p { flex-basis: 100%; }
  .card kbd { display: none; }
  #timer { font-size: 22px; }
}
@media (pointer: coarse) { .card kbd { display: none; } }

/* Menü ekleri */
.ghost { padding: 9px 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.ghost:hover:not(:disabled) { border-color: var(--ember); }
.ghost:disabled { opacity: .35; cursor: default; }
.ghost.wide { min-width: 190px; }
.ghost.danger { color: #ff9d95; }
.coins { color: var(--ember-hot); font-weight: 700; font-variant-numeric: tabular-nums; }
#nightSel { display: flex; align-items: center; gap: 14px; font-size: 20px; }
#nightSel b { min-width: 5em; }
#toast { position: absolute; left: 0; right: 0; bottom: 18%; text-align: center; font-size: clamp(16px, 3.6vw, 22px); font-weight: 700;
  text-shadow: 0 0 14px currentColor, 0 2px 4px #000; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
#toast.on { opacity: 1; transform: none; }
.lootlist { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; max-width: 22em; }
.lootlist i { font-style: normal; font-weight: 600; }
.lootlist.unlock { color: var(--ember-hot); font-weight: 700; font-size: 17px; }

/* Envanter */
#inv { justify-content: flex-start; align-items: stretch; text-align: left; overflow-y: auto; background: rgba(7, 11, 20, .94); }
#invHead { display: flex; align-items: center; gap: 14px; }
#invHead h2 { flex: 1; font-size: 26px; }
#invBody { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 22px; width: 100%; max-width: 980px; margin: 0 auto; }
#inv h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 14px 0 8px; }
.slot { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.slot small { display: block; color: var(--dim); font-size: 12px; }
.tile { position: relative; width: 52px; height: 52px; flex: none; display: grid; place-items: center; font-size: 24px; border-radius: 12px;
  background: var(--panel); border: 2px solid var(--rc, var(--line)); color: var(--rc, var(--dim)); }
button.tile:hover, .tile.sel { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--rc); }
.tile.empty { border-style: dashed; opacity: .5; }
.tile i { position: absolute; right: 3px; bottom: 1px; font-size: 11px; font-style: normal; font-weight: 700; color: var(--ink); }
#bag { display: flex; flex-wrap: wrap; gap: 8px; min-height: 60px; }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; font-size: 14px; }
.stats span { color: var(--dim); }
.stats .none { grid-column: 1 / -1; }
#detail { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 8px; }
#detail .iname { font-size: 20px; }
#detail small { color: var(--dim); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
@media (max-width: 680px) { #invBody { grid-template-columns: 1fr; gap: 4px; } }

/* Dükkân, karşılaştırma, özel etkiler */
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btnrow .wide { min-width: 140px; }
.ghost.small { padding: 5px 10px; font-size: 12px; }
#shop { justify-content: flex-start; align-items: stretch; text-align: left; overflow-y: auto; background: rgba(7, 11, 20, .94); }
#shop .head { display: flex; align-items: center; gap: 14px; }
#shop .head h2 { flex: 1; font-size: 26px; }
#shop .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; width: 100%; max-width: 980px; margin: 0 auto; }
#shop h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 14px 0 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.row.cur { border-color: var(--ember); }
.row .ic { width: 30px; text-align: center; font-size: 22px; color: var(--ember-hot); flex: none; }
.row .grow { flex: 1; min-width: 0; }
.row small { color: var(--ember); font-weight: 600; margin-left: 4px; }
.row p { color: var(--dim); font-size: 13px; line-height: 1.4; }
.row .ghost { flex: none; white-space: nowrap; }
.baghead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tile u { position: absolute; left: 4px; top: 1px; font-size: 10px; text-decoration: none; color: #ffd76a; }
.stats.cmp { grid-template-columns: 1fr auto auto; }
.stats em { font-style: normal; font-weight: 700; font-size: 13px; min-width: 4.2em; text-align: right; font-variant-numeric: tabular-nums; }
.stats em.up { color: #5fd38a; }
.stats em.down { color: #ff7a6b; }
.stats em.same { color: var(--dim); }
.fxline { grid-column: 1 / -1; color: #ffd76a; font-weight: 700; font-size: 14px; line-height: 1.45; }
.fxline span { color: var(--ink); font-weight: 400; }
.fxlost { color: #ff9d95; font-size: 13px; }
@media (max-width: 680px) { #shop .cols { grid-template-columns: 1fr; gap: 4px; } }

/* Hasar sayıları */
#floaters { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
#floaters span { position: absolute; left: 0; top: 0; opacity: 0; font-weight: 800; font-size: 15px; color: #fff3d6;
  text-shadow: 0 1px 3px #000, 0 0 6px rgba(0, 0, 0, .6); will-change: transform, opacity; font-variant-numeric: tabular-nums; }
#floaters span.crit { font-size: 22px; color: #ffd23b; }

/* ============ Cila turu: yazı tipi, yükleme ekranı, geçişler, animasyonlar ============ */
@font-face { font-family: "Almendra"; font-weight: 700; font-display: swap;
  src: url("vendor/fonts/almendra-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Almendra"; font-weight: 700; font-display: swap;
  src: url("vendor/fonts/almendra-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; }
:root { --display: "Almendra", Georgia, "Times New Roman", serif; }
h1, h2, #stage b, #banner, .card b, #bossbar b { font-family: var(--display); font-weight: 700; }
h1 { letter-spacing: .01em; background: linear-gradient(180deg, #fff1cf 10%, #ffc56e 55%, #ff8a2a 100%); -webkit-background-clip: text; background-clip: text;
  color: transparent; text-shadow: none; filter: drop-shadow(0 0 22px rgba(255, 140, 40, .55)); animation: glow 3.2s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 38px rgba(255, 150, 50, .85)); } }
h2 { letter-spacing: .02em; }


/* yükleme ekranı */
#loader { position: fixed; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(ellipse at 50% 42%, #1a1410 0%, #070b14 62%); transition: opacity .7s ease; }
#loader.done { opacity: 0; pointer-events: none; }
#loader h1 { font-size: clamp(40px, 9vw, 72px); }
#loader .bar { width: min(280px, 60vw); height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; }
#loadfill { display: block; height: 100%; width: 12%; background: linear-gradient(90deg, var(--ember), var(--ember-hot)); box-shadow: 0 0 12px var(--ember); transition: width .35s ease; }
#loadtext { color: var(--dim); font-size: 13px; letter-spacing: .08em; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }
.ember { position: relative; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 50% 60%, #fff3c4 0%, #ffb347 38%, #ff6a1a 68%, transparent 72%);
  box-shadow: 0 0 40px 10px rgba(255, 130, 40, .45); animation: flicker 1.1s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: scale(1); opacity: 1; } 30% { transform: scale(.93) translateY(1px); opacity: .85; } 60% { transform: scale(1.06); opacity: 1; } 80% { transform: scale(.97); opacity: .9; } }
.ember i { position: absolute; left: 50%; bottom: 60%; width: 4px; height: 4px; border-radius: 50%; background: #ffd08a; opacity: 0; animation: spark 1.8s linear infinite; }
.ember i:nth-child(2) { animation-delay: .6s; margin-left: -14px; }
.ember i:nth-child(3) { animation-delay: 1.2s; margin-left: 12px; }
@keyframes spark { 0% { transform: translateY(0) scale(1); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(8px, -70px) scale(.2); opacity: 0; } }

/* ekran geçişleri */
#fade { position: fixed; inset: 0; z-index: 7; background: #05070d; opacity: 0; pointer-events: none; transition: opacity .36s ease; }
#fade.on { opacity: 1; pointer-events: auto; }
.screen:not(.hidden) > * { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.screen:not(.hidden) > :nth-child(2) { animation-delay: .06s; }
.screen:not(.hidden) > :nth-child(3) { animation-delay: .12s; }
.screen:not(.hidden) > :nth-child(4) { animation-delay: .18s; }
.screen:not(.hidden) > :nth-child(5) { animation-delay: .24s; }
.screen:not(.hidden) > :nth-child(n+6) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.card { animation: cardIn .45s cubic-bezier(.2, .9, .3, 1.2) both; }
.card:nth-child(2) { animation-delay: .08s; }
.card:nth-child(3) { animation-delay: .16s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.94); } }
.tile, .row, .slot { animation: rise .35s ease both; }
.big { position: relative; overflow: hidden; }
.big::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: sheen 3.4s ease-in-out infinite; }
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.ghost { transition: border-color .15s, transform .1s, background .15s; }
.ghost:hover:not(:disabled) { background: rgba(30, 40, 62, .9); transform: translateY(-1px); }
.ghost:active:not(:disabled) { transform: translateY(1px); }

/* ana menü: arkada canlı sahne; geniş ekranda içerik solda, bekçi sağda */
#menu { background: radial-gradient(ellipse at 50% 45%, rgba(7, 11, 20, .25), rgba(7, 11, 20, .82)); gap: 14px; }
#menu .tag { text-shadow: 0 2px 8px #000; }
#menu .meta { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; justify-content: center; }
#nightSel b { min-width: 11em; font-size: 19px; }
@media (min-aspect-ratio: 6/5) {
  #menu { align-items: flex-start; text-align: left; padding-left: clamp(28px, 8vw, 130px);
    background: linear-gradient(90deg, rgba(7, 11, 20, .9) 0%, rgba(7, 11, 20, .62) 38%, rgba(7, 11, 20, 0) 68%); }
  #menu .btnrow, #menu .meta { justify-content: flex-start; }
  #menu .help { max-width: 30em; }
}

/* oyun içi */
#vig { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 52%, rgba(200, 20, 20, .55) 100%); }
#vig.low { animation: lowhp 1.1s ease-in-out infinite; }
#vig.hit { animation: hitflash .35s ease-out; }
#vig.low.hit { animation: hitflash .35s ease-out, lowhp 1.1s ease-in-out .35s infinite; }
@keyframes lowhp { 0%, 100% { opacity: .35; } 50% { opacity: .75; } }
@keyframes hitflash { from { opacity: .95; } to { opacity: 0; } }
#bossbar { position: absolute; left: 50%; top: 76px; transform: translateX(-50%); width: min(520px, 82vw); text-align: center; animation: rise .5s ease both; }
#bossbar b { display: block; font-size: 19px; color: #ff9d8a; letter-spacing: .08em; text-shadow: 0 0 14px rgba(255, 60, 40, .7), 0 2px 4px #000; margin-bottom: 4px; }
#bossbar div { height: 12px; border-radius: 6px; overflow: hidden; background: rgba(0, 0, 0, .6); border: 1px solid rgba(255, 120, 100, .4); }
#bossfill { display: block; height: 100%; width: 100%; background: linear-gradient(180deg, #c26bff, #7a2bd6); box-shadow: 0 0 12px #a04bff; transition: width .15s; }
#stage { position: absolute; left: 0; right: 0; top: 30%; text-align: center; opacity: 0; pointer-events: none; }
#stage.on { animation: stagecard 3.2s ease both; }
#stage b { display: block; font-size: clamp(34px, 8vw, 68px); color: var(--ember-hot); text-shadow: 0 0 30px rgba(255, 150, 50, .6), 0 3px 8px #000; }
#stage span { display: block; margin-top: 2px; font-size: clamp(14px, 3vw, 20px); letter-spacing: .32em; text-transform: uppercase; text-shadow: 0 2px 6px #000; }
@keyframes stagecard { 0% { opacity: 0; transform: translateY(14px) scale(.96); } 14%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }
#banner { font-size: clamp(26px, 6vw, 48px); }
#skills span { animation: rise .3s ease both; }
#hpbar { box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
#over h2 { font-size: clamp(34px, 8vw, 60px); }
#err { z-index: 9; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; } }

.noanim *, .noanim *::before, .noanim *::after { animation: none !important; transition: none !important; }
@media (max-aspect-ratio: 6/5) {
  #menu { justify-content: flex-start; padding-top: max(5vh, 28px); gap: 12px;
    background: linear-gradient(180deg, rgba(7, 11, 20, .92) 0%, rgba(7, 11, 20, .78) 52%, rgba(7, 11, 20, .1) 82%); }
  #menu .help { font-size: 12.5px; }
}

/* ============ Ana menü listesi, Ayarlar, Nasıl Oynanır ============ */
.menulist { display: flex; flex-direction: column; gap: 8px; width: min(310px, 82vw); margin-top: 6px; }
.menulist .big { width: 100%; padding: 15px 20px; font-size: 22px; font-family: var(--display); letter-spacing: .04em; margin-bottom: 4px; }
.mbtn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 18px; border-radius: 12px; text-align: left; font-size: 17px; font-weight: 600;
  background: linear-gradient(90deg, rgba(18, 25, 42, .88), rgba(18, 25, 42, .5)); border: 1px solid var(--line); border-left: 3px solid transparent;
  transition: transform .12s, border-color .12s, background .12s, padding-left .12s; }
.mbtn i { width: 22px; text-align: center; font-style: normal; color: var(--ember); font-size: 17px; }
.mbtn:hover, .mbtn:focus-visible { border-left-color: var(--ember); padding-left: 24px; outline: 0;
  background: linear-gradient(90deg, rgba(44, 34, 26, .95), rgba(18, 25, 42, .55)); }
.mbtn:active { transform: translateY(1px); }
#menu .meta { gap: 6px 18px; margin-top: 4px; font-size: 14px; }
#menu .meta .dim { font-size: 13px; }
#nightInfo { min-height: 1.6em; }

.panel { justify-content: flex-start; align-items: stretch; text-align: left; overflow-y: auto; background: rgba(7, 11, 20, .94); }
.panel .head { display: flex; align-items: center; gap: 14px; }
.panel .head h2 { flex: 1; font-size: 26px; }
.narrow { width: 100%; max-width: 640px; margin: 8px auto 0; }
.row b { font-size: 15px; }
.val { width: 3.4em; text-align: right; color: var(--ember-hot); font-weight: 700; font-variant-numeric: tabular-nums; }
input[type=range] { width: min(210px, 38vw); accent-color: var(--ember); cursor: pointer; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex: none; }
.seg button { padding: 8px 13px; background: transparent; font-weight: 600; font-size: 14px; color: var(--dim); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ember); color: #1b1206; }
.tog { min-width: 84px; text-align: center; }
.tog.on { border-color: var(--ember); color: var(--ember-hot); }

/* ============ Ana menü v2: animasyonlu giriş, bölüm kartı, ikonlu düğmeler ============ */
#menu { --k: 1; overflow: hidden; }
#menu.quick { --k: .3; }
#menu > * { animation: none; }
.mcol { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(370px, 88vw); }
.mcol::before { content: ""; position: absolute; left: -22px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; transform-origin: top;
  background: linear-gradient(180deg, transparent, var(--ember) 18%, rgba(255, 165, 61, .15) 80%, transparent); animation: lineDown .9s calc(var(--k) * .5s) ease both; display: none; }
@keyframes lineDown { from { transform: scaleY(0); opacity: 0; } }

.kicker { font-size: 12px; letter-spacing: .34em; text-transform: uppercase; color: var(--ember); animation: fadeIn .7s calc(var(--k) * .05s) both; }
#title { background: none; -webkit-background-clip: border-box; background-clip: border-box; font-size: clamp(54px, 12vw, 104px); line-height: 1; margin: -2px 0 0; white-space: nowrap; }
#title span { display: inline-block; background: linear-gradient(180deg, #fff4d6 8%, #ffc56e 52%, #ff8526 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: letterIn .75s calc(var(--k) * (.15s + var(--i) * .07s)) cubic-bezier(.2, .9, .25, 1.15) both; }
@keyframes letterIn { from { opacity: 0; transform: translateY(26px) scale(1.25) rotate(-6deg); filter: blur(8px); } }
@keyframes fadeIn { from { opacity: 0; } }
.divider { display: flex; align-items: center; gap: 12px; width: 100%; color: var(--ember); animation: fadeIn .5s calc(var(--k) * .75s) both; }
.divider span { flex: 1; height: 1px; background: linear-gradient(90deg, var(--ember), transparent); transform-origin: left; animation: lineX .8s calc(var(--k) * .8s) ease both; }
.divider span:first-child { background: linear-gradient(270deg, var(--ember), transparent); transform-origin: right; }
.divider i { font-style: normal; font-size: 13px; animation: spin 9s linear infinite; }
@keyframes lineX { from { transform: scaleX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
#menu .tag { font-size: 16px; color: #d9d2c2; animation: slideIn .6s calc(var(--k) * .9s) ease both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-26px); } }

/* bölüm kartı */
#nightSel.stagecard { --tc: #5fd38a; display: flex; align-items: stretch; gap: 0; width: 100%; font-size: inherit; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, rgba(20, 28, 46, .9), rgba(12, 17, 30, .72)); border: 1px solid var(--line); border-top: 2px solid var(--tc);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: slideIn .6s calc(var(--k) * 1.02s) ease both; transition: border-color .4s; }
#nightSel[data-theme=frost] { --tc: #8fc7ff; }
#nightSel[data-theme=ash] { --tc: #ff8a5c; }
#nightSel.stagecard > button { width: 46px; background: transparent; color: var(--ink); font-size: 24px; transition: background .15s, color .15s; }
#nightSel.stagecard > button:hover:not(:disabled) { background: rgba(255, 255, 255, .07); color: var(--tc); }
#nightSel.stagecard > button:disabled { opacity: .18; cursor: default; }
.sc-mid { flex: 1; min-width: 0; padding: 10px 4px 11px; text-align: center; display: flex; flex-direction: column; gap: 1px; }
#nightSel.swap .sc-mid > * { animation: swapIn .35s ease both; }
@keyframes swapIn { from { opacity: 0; transform: translateY(6px); } }
.sc-mid small { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--tc); font-weight: 700; transition: color .4s; }
#nightSel.stagecard b { min-width: 0; font-family: var(--display); font-size: 25px; line-height: 1.15; }
#nightInfo { min-height: 0; font-size: 12px; color: var(--dim); line-height: 1.35; }

/* düğmeler */
.menulist { width: 100%; gap: 8px; margin-top: 2px; }
.mi { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; height: 52px; padding: 0 16px; border-radius: 12px; overflow: hidden; text-align: left;
  font-size: 17px; font-weight: 600; color: var(--ink); background: linear-gradient(90deg, rgba(20, 28, 46, .9), rgba(14, 20, 34, .55)); border: 1px solid var(--line);
  transition: transform .16s cubic-bezier(.2, .8, .2, 1), border-color .16s, box-shadow .16s, background .16s;
  animation: itemIn .55s cubic-bezier(.2, .85, .25, 1.1) both; }
.mi:nth-child(1) { animation-delay: calc(var(--k) * 1.14s); }
.mi:nth-child(2) { animation-delay: calc(var(--k) * 1.22s); }
.mi:nth-child(3) { animation-delay: calc(var(--k) * 1.30s); }
.mi:nth-child(4) { animation-delay: calc(var(--k) * 1.38s); }
.mi:nth-child(5) { animation-delay: calc(var(--k) * 1.46s); }
@keyframes itemIn { from { opacity: 0; transform: translateX(-46px); } }
.mi::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0; background: var(--ember); border-radius: 2px; transform: translateY(-50%); transition: height .18s; }
.mi::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 190, 110, .16) 50%, transparent 70%); transform: translateX(-110%); pointer-events: none; }
.mi svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--ember); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s, stroke .16s; }
.mi span { flex: 1; }
.mi em { font-style: normal; font-size: 22px; color: var(--ember); opacity: 0; transform: translateX(-8px); transition: opacity .16s, transform .16s; }
.mi kbd { font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(27, 18, 6, .35); opacity: .7; }
.mi:hover, .mi:focus-visible { outline: 0; transform: translateX(8px); border-color: rgba(255, 165, 61, .6); background: linear-gradient(90deg, rgba(52, 38, 26, .95), rgba(18, 25, 42, .6)); box-shadow: 0 6px 22px rgba(255, 140, 40, .16); }
.mi:hover::before, .mi:focus-visible::before { height: 62%; }
.mi:hover::after, .mi:focus-visible::after { transform: translateX(110%); transition: transform .55s ease; }
.mi:hover svg, .mi:focus-visible svg { transform: scale(1.14) rotate(-4deg); stroke: var(--ember-hot); }
.mi:hover em, .mi:focus-visible em { opacity: 1; transform: none; }
.mi:active { transform: translateX(8px) scale(.985); }
.mi.primary { height: 62px; margin-bottom: 4px; font-family: var(--display); font-size: 25px; letter-spacing: .03em; color: #1b1206; border: 0;
  background: linear-gradient(180deg, #ffd899, #ffa53d 70%, #f08a22); box-shadow: 0 8px 30px rgba(255, 150, 50, .42), inset 0 1px 0 rgba(255, 255, 255, .55);
  animation: itemIn .55s calc(var(--k) * 1.14s) cubic-bezier(.2, .85, .25, 1.1) both, pulse 2.6s 2.2s ease-in-out infinite; }
.mi.primary svg { stroke: none; color: #1b1206; width: 24px; height: 24px; }
.mi.primary::before { display: none; }
.mi.primary::after { background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%); animation: sweep 3.6s 2s ease-in-out infinite; }
.mi.primary:hover, .mi.primary:focus-visible { background: linear-gradient(180deg, #ffe4b3, #ffb24f 70%, #f6952c); box-shadow: 0 10px 40px rgba(255, 160, 60, .65), inset 0 1px 0 rgba(255, 255, 255, .6); }
.mi.primary:hover svg, .mi.primary:focus-visible svg { transform: scale(1.2) translateX(2px); }
@keyframes pulse { 50% { box-shadow: 0 8px 44px rgba(255, 160, 60, .7), inset 0 1px 0 rgba(255, 255, 255, .55); } }
@keyframes sweep { 0%, 55% { transform: translateX(-110%); } 100% { transform: translateX(110%); } }

/* alt bilgi */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; animation: fadeIn .6s calc(var(--k) * 1.7s) both; }
.chip { padding: 5px 11px; border-radius: 999px; font-size: 12.5px; color: var(--dim); background: rgba(12, 17, 30, .7); border: 1px solid var(--line); white-space: nowrap; }
.chip:empty { display: none; }
.chip.gold { color: var(--ember-hot); font-weight: 700; border-color: rgba(255, 165, 61, .35); }
.ver { position: absolute; right: 14px; bottom: 10px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .28); animation: fadeIn 1s calc(var(--k) * 2s) both !important; }

/* çıkış: öğeler sola kayarak kaybolur */
#menu.leaving .mcol > *, #menu.leaving .mi { transition: transform .3s ease-in, opacity .3s ease-in; transform: translateX(-60px); opacity: 0; }
#menu.leaving .mi:nth-child(2) { transition-delay: .03s; }
#menu.leaving .mi:nth-child(3) { transition-delay: .06s; }
#menu.leaving .mi:nth-child(4) { transition-delay: .09s; }
#menu.leaving .mi:nth-child(5) { transition-delay: .12s; }

/* havada süzülen kıvılcımlar */
.embers { position: absolute; inset: 0; pointer-events: none; }
.embers i { position: absolute; bottom: -12px; left: calc(var(--x) * 1%); width: var(--s, 4px); height: var(--s, 4px); border-radius: 50%; background: #ffc56e;
  box-shadow: 0 0 8px 2px rgba(255, 150, 50, .7); opacity: 0; animation: emberUp var(--t, 9s) var(--dl, 0s) linear infinite; }
@keyframes emberUp { 0% { transform: translate(0, 0) scale(1); opacity: 0; } 8% { opacity: .9; } 60% { opacity: .6; } 100% { transform: translate(var(--dx, 40px), -92vh) scale(.25); opacity: 0; } }
.embers i:nth-child(1) { --x: 4; --t: 11s; --dl: 0s; --dx: 60px; }
.embers i:nth-child(2) { --x: 11; --t: 8s; --dl: 2.1s; --dx: -30px; --s: 3px; }
.embers i:nth-child(3) { --x: 19; --t: 13s; --dl: 4.4s; --dx: 80px; }
.embers i:nth-child(4) { --x: 27; --t: 9s; --dl: 1.2s; --dx: 20px; --s: 5px; }
.embers i:nth-child(5) { --x: 34; --t: 12s; --dl: 6.3s; --dx: -50px; --s: 3px; }
.embers i:nth-child(6) { --x: 42; --t: 10s; --dl: 3.3s; --dx: 70px; }
.embers i:nth-child(7) { --x: 51; --t: 14s; --dl: 7.5s; --dx: -20px; --s: 3px; }
.embers i:nth-child(8) { --x: 59; --t: 9s; --dl: 5.1s; --dx: 50px; }
.embers i:nth-child(9) { --x: 66; --t: 12s; --dl: .6s; --dx: -60px; --s: 5px; }
.embers i:nth-child(10) { --x: 73; --t: 10s; --dl: 8.2s; --dx: 30px; --s: 3px; }
.embers i:nth-child(11) { --x: 80; --t: 13s; --dl: 2.8s; --dx: -40px; }
.embers i:nth-child(12) { --x: 87; --t: 8s; --dl: 6.9s; --dx: 60px; --s: 3px; }
.embers i:nth-child(13) { --x: 93; --t: 11s; --dl: 4s; --dx: -70px; }
.embers i:nth-child(14) { --x: 98; --t: 12s; --dl: 9.4s; --dx: -30px; --s: 5px; }

@media (min-aspect-ratio: 6/5) {
  .mcol { align-items: flex-start; }
  .mcol::before { display: block; }
  .sc-mid { text-align: left; padding-left: 6px; }
  .chips { justify-content: flex-start; }
  #menu { background: linear-gradient(90deg, rgba(5, 8, 15, .94) 0%, rgba(7, 11, 20, .7) 34%, rgba(7, 11, 20, .12) 62%, rgba(7, 11, 20, 0) 100%),
    radial-gradient(ellipse at 70% 110%, rgba(255, 120, 30, .14), transparent 55%); }
}
@media (pointer: coarse) { .mi kbd { display: none; } }
.noanim .mi, .noanim #title span { opacity: 1 !important; }

/* ============ Envanter ve Dükkân v2 ============ */
.mi.primary:hover, .mi.primary:focus-visible { transform: translateY(-2px); }
.mi.primary:active { transform: translateY(1px); }
.wallet { font-size: 15px; padding: 7px 14px; box-shadow: 0 0 18px rgba(255, 150, 50, .18); }
#inv, #shop { background: radial-gradient(ellipse at 50% 0%, rgba(40, 30, 22, .5), transparent 55%), rgba(6, 9, 17, .95); padding: clamp(14px, 2.4vw, 28px); gap: 14px; }
#invHead, #shop .head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
#invHead h2, #shop .head h2 { font-size: 30px; color: var(--ember-hot); }
.pane { min-width: 0; padding: 16px; border-radius: 16px; background: linear-gradient(160deg, rgba(20, 28, 46, .82), rgba(11, 16, 28, .82)); border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05); }
.pane h3:first-child, .pane .baghead:first-child h3 { margin-top: 0; }
#inv h3 { display: flex; align-items: center; gap: 10px; }
#inv h3::after, #shop h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
#shop h3 { display: flex; align-items: center; gap: 10px; }
#invBody { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(270px, 330px); gap: 16px; max-width: 1280px; align-items: start; }
.fresh .pane, .fresh .upg, .fresh .ccard { animation: paneIn .5s cubic-bezier(.2, .85, .25, 1) both; }
.fresh #paneBag { animation-delay: .07s; }
.fresh #detail { animation-delay: .14s; }
@keyframes paneIn { from { opacity: 0; transform: translateY(22px) scale(.98); } }

/* kuşanılan yuvaları */
#eqSlots { display: grid; gap: 8px; }
.eq { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 12px; text-align: left; color: var(--ink);
  background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 16%, transparent), rgba(10, 14, 24, .5)); border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent);
  transition: transform .14s, box-shadow .14s, border-color .14s; }
button.eq:hover, .eq.sel { transform: translateX(3px); border-color: var(--rc); box-shadow: 0 0 0 1px var(--rc), 0 6px 20px color-mix(in srgb, var(--rc) 28%, transparent); }
.eq.empty { --rc: #56607a; border-style: dashed; background: rgba(10, 14, 24, .35); opacity: .6; }
.eqicon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--rc);
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rc) 30%, #0c111e), #0a0e18); border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); }
.eqtxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eqtxt small { color: var(--dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.eqtxt b { color: var(--rc); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq.empty .eqtxt b { color: var(--dim); font-weight: 500; }
.eq u { position: absolute; right: 9px; top: 6px; text-decoration: none; color: #ffd76a; font-size: 12px; }
#inv svg { width: 62%; height: 62%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pips { display: inline-flex; gap: 3px; margin-top: 2px; }
.pips i { width: 9px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .13); }
.pips i.on { background: var(--ember-hot); box-shadow: 0 0 6px var(--ember); }
#eqTotals { padding: 10px 12px; border-radius: 10px; background: rgba(6, 9, 17, .5); gap: 6px 16px; }
#eqTotals b { color: #8fe3a8; font-variant-numeric: tabular-nums; }
#eqFx { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fxchip { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #ffd76a; background: rgba(255, 215, 106, .1); border: 1px solid rgba(255, 215, 106, .35); cursor: help; }

/* çanta ızgarası */
.baghead { flex-wrap: wrap; margin-bottom: 12px; }
.baghead h3 { flex: 1; margin: 0 !important; white-space: nowrap; }
#bagTitle b { color: var(--ink); font-size: 14px; }
#bagFilter button { padding: 6px 10px; display: grid; place-items: center; min-width: 38px; height: 34px; }
#bagFilter svg { width: 18px; height: 18px; }
#bag { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; min-height: 0; }
#inv .tile { width: auto; height: auto; aspect-ratio: 1; border-radius: 11px; animation: none; border-width: 1.5px;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--rc) 26%, #0c111e), #0a0e18); transition: transform .12s, box-shadow .12s; }
#inv.fresh .tile { animation: pop .34s calc(var(--i, 0) * 14ms + .12s) cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
#inv button.tile:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 18px color-mix(in srgb, var(--rc) 35%, transparent); }
#inv .tile.sel { box-shadow: 0 0 0 2px #060911, 0 0 0 4px var(--rc), 0 0 22px color-mix(in srgb, var(--rc) 60%, transparent); }
#inv .tile.r2, #inv .tile.r3 { box-shadow: inset 0 0 14px color-mix(in srgb, var(--rc) 35%, transparent); }
#inv .tile.r3 { animation: legend 2.4s ease-in-out infinite; }
@keyframes legend { 50% { box-shadow: inset 0 0 20px color-mix(in srgb, var(--rc) 60%, transparent), 0 0 16px color-mix(in srgb, var(--rc) 45%, transparent); } }
#inv .tile.empty { border: 1px dashed rgba(255, 255, 255, .09); background: rgba(6, 9, 17, .4); opacity: 1; }
#bagHint { margin-top: 12px; }
#bagHint:empty, .bagnone:empty { display: none; }
.bagnone { grid-column: 1 / -1; }

/* eşya kartı */
#detail { margin-top: 0; padding: 0; display: block; overflow: hidden; position: sticky; top: 0; }
.dcard { display: grid; gap: 12px; padding: 0 16px 16px; }
.dcard.in { animation: cardIn .34s cubic-bezier(.2, .9, .3, 1.15) both; }
.dhead { display: flex; align-items: center; gap: 14px; margin: 0 -16px; padding: 16px; border-bottom: 1px solid color-mix(in srgb, var(--rc) 40%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--rc) 26%, transparent), transparent 70%); }
.dicon { width: 60px; height: 60px; flex: none; display: grid; place-items: center; border-radius: 14px; color: var(--rc);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--rc) 34%, #0c111e), #0a0e18); border: 1.5px solid var(--rc); box-shadow: 0 0 22px color-mix(in srgb, var(--rc) 35%, transparent); }
.dhead > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#detail .iname { font-family: var(--display); font-size: 23px; line-height: 1.1; color: var(--rc); }
.dhead small { color: var(--dim); font-size: 12px; }
.cmpnote { font-size: 12px; color: var(--dim); }
.dcard .stats { padding: 10px 12px; border-radius: 10px; background: rgba(6, 9, 17, .5); gap: 6px 14px; }
.dcard .fxline { padding: 10px 12px; border-radius: 10px; background: rgba(255, 215, 106, .08); border: 1px solid rgba(255, 215, 106, .3); }
.dcard .fxline span { display: block; margin-top: 2px; font-size: 13px; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.act { padding: 11px 10px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--ink); background: rgba(30, 40, 62, .8); border: 1px solid var(--line); transition: transform .1s, border-color .14s, background .14s; }
.act b { color: var(--ember-hot); margin-left: 4px; }
.act:hover:not(:disabled) { border-color: var(--ember); transform: translateY(-1px); }
.act:disabled { opacity: .4; cursor: default; }
.act.primary { grid-column: 1 / -1; color: #1b1206; border: 0; background: linear-gradient(180deg, #ffd899, #ffa53d); box-shadow: 0 6px 20px rgba(255, 150, 50, .3); }
.act.danger { color: #ff9d95; }
.dempty { display: grid; place-items: center; gap: 10px; padding: 46px 16px; text-align: center; color: var(--dim); }
.dempty span { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 16px; border: 1px dashed rgba(255, 255, 255, .16); opacity: .6; }

/* dükkân */
#shop .cols { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); max-width: 1180px; gap: 26px; align-items: start; }
.upg .grow { flex: 1; min-width: 0; }
.upg { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 9px; border-radius: 14px; animation-delay: calc(var(--i) * 50ms) !important;
  background: linear-gradient(160deg, rgba(20, 28, 46, .85), rgba(11, 16, 28, .85)); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.upg:hover { border-color: rgba(255, 165, 61, .4); transform: translateX(3px); }
.upg.maxed { border-color: rgba(143, 227, 168, .35); }
.medal { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 21px; color: var(--ember-hot);
  background: radial-gradient(circle at 50% 30%, #3a2a1c, #120d0a); border: 1.5px solid rgba(255, 165, 61, .55); box-shadow: 0 0 16px rgba(255, 150, 50, .22); }
.upg b { font-size: 16px; }
.upg p { color: var(--dim); font-size: 13px; line-height: 1.35; margin: 1px 0 7px; }
.lvbar { display: flex; gap: 3px; }
.lvbar i { flex: 1; max-width: 26px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .11); }
.lvbar i.on { background: linear-gradient(90deg, var(--ember), var(--ember-hot)); box-shadow: 0 0 6px var(--ember); }
.upg.maxed .lvbar i.on { background: #8fe3a8; box-shadow: 0 0 6px #5fd38a; }
.buy { flex: none; min-width: 92px; padding: 10px 14px; border-radius: 10px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--dim); background: rgba(30, 40, 62, .6); border: 1px solid var(--line);
  transition: transform .1s, box-shadow .15s; }
.buy.can { color: #1b1206; border: 0; background: linear-gradient(180deg, #ffd899, #ffa53d); box-shadow: 0 5px 18px rgba(255, 150, 50, .3); }
.buy.can:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(255, 160, 60, .5); }
.buy:disabled { cursor: default; }
#shopChars { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ccard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 14px 14px; border-radius: 16px; text-align: center; overflow: hidden;
  animation-delay: calc(var(--i) * 60ms + .1s) !important; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--cc) 30%, transparent), transparent 62%), linear-gradient(160deg, rgba(20, 28, 46, .9), rgba(11, 16, 28, .9));
  transition: transform .16s, border-color .16s, box-shadow .16s; }
.ccard:hover { transform: translateY(-4px); border-color: var(--cc); box-shadow: 0 12px 30px color-mix(in srgb, var(--cc) 25%, transparent); }
.ccard.cur { border-color: var(--cc); box-shadow: 0 0 0 1px var(--cc), 0 10px 30px color-mix(in srgb, var(--cc) 28%, transparent); }
.ccard .fig { width: 78px; height: 94px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); transition: transform .2s; }
.ccard:hover .fig { transform: translateY(-3px) scale(1.05); }
.ccard.locked .fig { filter: grayscale(.75) brightness(.6); }
.ccard b { font-family: var(--display); font-size: 21px; color: var(--cc); }
.ccard p { flex: 1; color: var(--dim); font-size: 12.5px; line-height: 1.4; }
.ccard .buy { width: 100%; margin-top: 6px; }
.ccard.cur .buy { color: var(--cc); border-color: var(--cc); background: transparent; }

@media (max-width: 1040px) { #invBody { grid-template-columns: minmax(230px, 290px) minmax(0, 1fr); } #detail { grid-column: 1 / -1; position: static; } }
@media (max-width: 680px) { #invBody, #shop .cols { grid-template-columns: 1fr; gap: 12px; } #detail { order: 2; } #paneBag { order: 1; } #paneEq { order: 3; } }

/* ============ v3: ikonlar, seviye kartları, duraklatma, tur sonu, görevler, takımlar ============ */
svg.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.22em; }
.row .ic { display: grid; place-items: center; }
.row .ic svg.ico, .medal svg.ico { width: 24px; height: 24px; }

/* oyun içi */
#kills { display: inline-flex; align-items: center; gap: 5px; }
#skills span { display: inline-flex; align-items: center; gap: 2px; padding: 5px 8px; color: var(--dim); }
#skills span.wpn { color: var(--ember-hot); border-color: rgba(255, 165, 61, .35); }
#skills span.evo { color: #1b1206; background: linear-gradient(180deg, #ffe29a, #ffa53d); border-color: transparent; box-shadow: 0 0 14px rgba(255, 170, 60, .6); }
#skills span.evo b { color: #1b1206; }
#skills svg.ico { width: 17px; height: 17px; }
#banner.gold { color: #ffd76a; text-shadow: 0 0 26px rgba(255, 190, 60, .8), 0 2px 6px #000; }
#banner.curse { color: #c98bff; text-shadow: 0 0 26px rgba(160, 70, 255, .8), 0 2px 6px #000; }
#frost { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(ellipse at center, transparent 50%, rgba(120, 200, 255, .5) 100%); }
#frost.on { opacity: 1; }

/* ana menü: altıncı öğe ve bildirim rozeti */
.mi { height: 48px; }
.mi.primary { height: 60px; }
.mi:nth-child(6) { animation-delay: calc(var(--k) * 1.54s); }
#menu.leaving .mi:nth-child(6) { transition-delay: .15s; }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; color: #1b1206;
  background: var(--ember); box-shadow: 0 0 12px rgba(255, 150, 50, .6); }
.badge:empty { display: none; }

/* seviye atlama */
#levelup { background: radial-gradient(ellipse at 50% 40%, rgba(40, 26, 10, .72), rgba(5, 8, 15, .95)); overflow: hidden; }
.rays { position: absolute; left: 50%; top: 40%; width: 150vmax; height: 150vmax; margin: -75vmax 0 0 -75vmax; pointer-events: none; opacity: .55;
  background: repeating-conic-gradient(from 0deg, rgba(255, 170, 60, .1) 0deg 7deg, transparent 7deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 52%); mask-image: radial-gradient(circle, #000 0%, transparent 52%); animation: spin 70s linear infinite !important; }
#levelup > :not(.rays) { position: relative; }
#levelup .kicker { margin-bottom: -12px; }
#levelup h2 { font-size: clamp(30px, 6vw, 48px); color: var(--ember-hot); text-shadow: 0 0 30px rgba(255, 150, 50, .5); }
#cards { gap: 16px; max-width: 920px; align-items: stretch; }
.card { position: relative; padding: 0 16px 14px; min-height: 262px; border-radius: 18px; gap: 7px; overflow: hidden; color: var(--ink);
  background: linear-gradient(170deg, rgba(26, 34, 56, .96), rgba(11, 16, 28, .96)); box-shadow: 0 16px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06); }
.card .tagline { align-self: stretch; margin: 0 -16px 8px; padding: 7px 0; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--dim);
  background: rgba(255, 255, 255, .04); border-bottom: 1px solid var(--line); }
.card.wpn .tagline { color: var(--ember); background: rgba(255, 165, 61, .08); border-bottom-color: rgba(255, 165, 61, .25); }
.cic { width: 68px; height: 68px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #c9d3e6; background: radial-gradient(circle at 50% 30%, #2a3550, #0d1220);
  border: 1.5px solid rgba(255, 255, 255, .2); transition: transform .2s; }
.cic svg.ico { width: 34px; height: 34px; }
.card.wpn .cic { color: var(--ember-hot); background: radial-gradient(circle at 50% 30%, #4a321c, #140e0a); border-color: rgba(255, 165, 61, .6); box-shadow: 0 0 22px rgba(255, 150, 50, .3); }
.card:hover .cic, .card:focus-visible .cic { transform: scale(1.1) rotate(-5deg); }
.card b { font-size: 20px; line-height: 1.15; margin-top: 2px; }
.card p { font-size: 13.5px; }
.card em { font-style: normal; font-size: 11.5px; color: #ffd76a; opacity: .85; line-height: 1.35; }
.card .pips i { width: 14px; }
.card.evo { border-color: #ffd76a; background: linear-gradient(170deg, rgba(70, 48, 16, .97), rgba(22, 14, 6, .97)); box-shadow: 0 0 0 1px #ffd76a, 0 0 44px rgba(255, 190, 60, .45);
  animation: cardIn .45s cubic-bezier(.2, .9, .3, 1.2) both, evoGlow 1.8s ease-in-out .5s infinite; }
.card.evo .tagline { color: #1b1206; background: linear-gradient(90deg, #ffe29a, #ffa53d); border: 0; }
.card.evo .cic { color: #1b1206; background: radial-gradient(circle at 50% 30%, #fff0c0, #ffa53d); border-color: #fff0c0; box-shadow: 0 0 30px rgba(255, 190, 60, .7); }
.card.evo b { color: #ffe29a; font-size: 22px; }
@keyframes evoGlow { 50% { box-shadow: 0 0 0 1px #ffd76a, 0 0 70px rgba(255, 190, 60, .75); } }
@media (max-width: 560px) {
  #levelup { justify-content: flex-start; overflow-y: auto; }
  .card { flex-direction: row; flex-wrap: wrap; align-items: center; min-height: 0; padding: 0 14px 12px; text-align: left; column-gap: 12px; }
  .card .tagline { flex-basis: calc(100% + 28px); margin: 0 -14px 4px; text-align: center; padding: 5px 0; }
  .cic { width: 48px; height: 48px; }
  .cic svg.ico { width: 26px; height: 26px; }
  .card b { flex: 1; font-size: 17px; }
  .card p, .card em { flex-basis: 100%; }
}

/* duraklatma ve tur sonu: ortada kart */
.sheet { width: min(460px, 100%); max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 24px 22px; border-radius: 20px;
  background: linear-gradient(170deg, rgba(22, 30, 50, .95), rgba(9, 13, 24, .97)); border: 1px solid var(--line); border-top: 2px solid var(--ember);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05); }
.sheet .kicker { margin-bottom: -8px; }
.sheet h2 { font-size: clamp(30px, 6vw, 44px); color: var(--ember-hot); }
.sheet .big { width: 100%; margin-top: 6px; }
.sheet .btnrow { width: 100%; flex-wrap: nowrap; }
.sheet .btnrow .wide { flex: 1; min-width: 0; }
.sheet > .ghost.wide { width: 100%; }
.pinfo { display: flex; gap: 8px; width: 100%; }
.pinfo span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 6px; border-radius: 10px; background: rgba(6, 9, 17, .55); border: 1px solid var(--line); color: var(--ember); }
.pinfo b { color: var(--ink); font-variant-numeric: tabular-nums; }
#pauseBuild { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.brow { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 9px; background: rgba(6, 9, 17, .45); border: 1px solid var(--line); font-size: 13px; text-align: left; min-width: 0; }
.brow b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.bic { color: var(--ember-hot); display: grid; }
.brow .pips { margin: 0; }
.brow .pips i { width: 6px; }
.brow.evo { border-color: rgba(255, 215, 106, .6); background: rgba(255, 200, 80, .1); }
.brow .star { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffd76a; }
@media (max-width: 420px) { #pauseBuild { grid-template-columns: 1fr; } }

#over .sheet { border-top-color: #ff7a6b; }
#over.win .sheet { border-top-color: var(--ember-hot); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 90px rgba(255, 170, 60, .2); }
#over #overTitle { color: #ff8a7a; font-size: clamp(34px, 8vw, 54px); line-height: 1.05; }
#over.win #overTitle { color: var(--ember-hot); text-shadow: 0 0 34px rgba(255, 160, 60, .6); }
#overSub { margin-top: -6px; }
#overStats { grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; font-size: inherit; text-align: center; }
.otile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 11px 4px 9px; border-radius: 12px; background: rgba(6, 9, 17, .55); border: 1px solid var(--line); color: var(--ember); }
.otile svg.ico { width: 20px; height: 20px; }
#overStats .otile b { font-size: 21px; color: var(--ink); text-align: center; }
#overStats .otile span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
#overStats .otile:last-child b { color: var(--ember-hot); }
#overBuild { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
#overBuild:empty, #overLoot:empty, #overNotes:empty { display: none; }
#overBuild span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--ember-hot); background: rgba(255, 165, 61, .08); border: 1px solid rgba(255, 165, 61, .3); }
#overBuild span.evo { color: #1b1206; background: linear-gradient(180deg, #ffe29a, #ffa53d); border-color: transparent; box-shadow: 0 0 14px rgba(255, 170, 60, .5); }
#overLoot { width: 100%; }
#overLoot small { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
#overLoot div { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ltile { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: var(--rc); border: 1.5px solid var(--rc);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--rc) 28%, #0c111e), #0a0e18); }
.ltile svg { width: 60%; height: 60%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ltile.r3 { box-shadow: 0 0 16px color-mix(in srgb, var(--rc) 55%, transparent); }
#overNotes { font-size: 13px; color: var(--dim); line-height: 1.6; }
#overNotes .gold { color: var(--ember-hot); font-weight: 700; font-size: 15px; }
.ghost.gold { color: #ffd76a; border-color: rgba(255, 215, 106, .45); width: 100%; }

/* görevler */
#quests { justify-content: flex-start; align-items: stretch; text-align: left; overflow-y: auto; padding: clamp(14px, 2.4vw, 28px); gap: 14px;
  background: radial-gradient(ellipse at 50% 0%, rgba(40, 30, 22, .5), transparent 55%), rgba(6, 9, 17, .95); }
#quests .head { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
#quests .head h2 { flex: 1; font-size: 30px; color: var(--ember-hot); }
#quests .cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr); gap: 22px; width: 100%; max-width: 1180px; margin: 0 auto; align-items: start; }
#quests h3 { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 18px 0 8px; }
#quests h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
#quests h3 b { color: var(--ink); font-size: 14px; }
#statPane h3 { margin-top: 0; }
#statList { gap: 10px 16px; }
#statList b { font-variant-numeric: tabular-nums; text-align: right; }
#dailyCard { border-top: 2px solid var(--ember); display: grid; gap: 12px; }
.dtop { display: flex; align-items: center; gap: 14px; }
.dtop .grow { flex: 1; min-width: 0; }
.dtop small { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ember); }
.dtop b { font-family: var(--display); font-size: 26px; line-height: 1.15; }
.reward { padding: 6px 12px; border-radius: 999px; font-weight: 700; color: var(--ember-hot); border: 1px solid rgba(255, 165, 61, .45); white-space: nowrap; }
.reward.done { color: #8fe3a8; border-color: rgba(143, 227, 168, .45); }
.muts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.muts span { padding: 9px 12px; border-radius: 10px; background: rgba(6, 9, 17, .5); border: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.muts b { display: block; color: var(--ink); font-size: 14px; }
.dbot { display: flex; align-items: center; gap: 14px; }
.dbot p { flex: 1; font-size: 13px; color: var(--dim); line-height: 1.45; }
.dbot p b { color: var(--ink); }
.ach p { margin-bottom: 6px; }
.ach .prog { display: block; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.ach .prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember), var(--ember-hot)); }
.ach.ready { border-color: rgba(255, 165, 61, .6); box-shadow: 0 0 22px rgba(255, 150, 50, .15); }
.ach.got { opacity: .55; }
.ach.got .prog i { background: #8fe3a8; }
.ach span.buy { text-align: center; font-size: 13px; }
@media (max-width: 760px) { #quests .cols { grid-template-columns: 1fr; } .muts { grid-template-columns: 1fr; } }

/* eşya takımları */
.setbox { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; background: color-mix(in srgb, var(--sc) 8%, transparent); border: 1px solid color-mix(in srgb, var(--sc) 40%, transparent); }
#eqFx .setbox { flex-basis: 100%; }
.setbox > b { color: var(--sc); font-size: 13.5px; }
.setbox > b i { font-style: normal; color: var(--dim); font-weight: 600; margin-left: 4px; }
.setbox span { display: flex; align-items: center; gap: 8px; color: var(--dim); opacity: .6; }
.setbox span.on { color: var(--ink); opacity: 1; }
.setbox span i { width: 17px; height: 17px; flex: none; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 10px; font-weight: 800; border: 1px solid currentColor; }
.setbox span.on i { background: var(--sc); color: #0a0e18; border-color: var(--sc); }
.tile s { position: absolute; left: 5px; bottom: 5px; width: 7px; height: 7px; border-radius: 50%; }
/* ============ Telefon düzeltmeleri: dar dikey ekran ve basık yatay ekran ============ */
#top { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
@media (max-width: 480px) {
  #top { gap: 6px; padding: 8px; }
  #hpwrap { gap: 6px; }
  #hpbar { width: 26vw; }
  #hptext { font-size: 10px; }
  #level { font-size: 14px; }
  #timer { font-size: 22px; }
  #right { gap: 5px; }
  #kills { margin-right: 0; font-size: 13px; }
  #right button { width: 34px; height: 34px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  #menu { overflow-y: auto; gap: 6px; }
  .mcol { gap: 6px; width: min(400px, 60vw); }
  #menu .kicker, #menu .tag, #menu .divider { display: none; }
  #title { font-size: 40px; }
  .sc-mid { padding: 5px 4px 6px; }
  #nightSel.stagecard b { font-size: 19px; }
  #nightInfo { font-size: 11px; }
  .menulist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 0; }
  .mi { height: 40px; font-size: 15px; gap: 10px; padding: 0 12px; }
  .mi.primary { grid-column: 1 / -1; height: 46px; font-size: 21px; margin-bottom: 0; }
  .chips { margin-top: 2px; }
  #stage { top: 24%; }
  #stage b { font-size: 38px; }
  #stage span { font-size: 13px; }
  #banner { top: 20%; font-size: 24px; }
  #bossbar { top: 58px; }
  #bossbar b { font-size: 15px; margin-bottom: 2px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  #menu { scrollbar-width: none; }
  #levelup { justify-content: flex-start; overflow-y: auto; gap: 8px; padding-top: 10px; }
  #levelup h2 { font-size: 30px; }
  #levelup .kicker { margin-bottom: -6px; }
  #cards { gap: 10px; }
  .card { min-height: 0; padding-bottom: 10px; gap: 4px; }
  .cic { width: 46px; height: 46px; }
  .cic svg.ico { width: 24px; height: 24px; }
}
/* dikey ama kısa ekran (tarayıcı çubukları yüzünden yükseklik azalınca): menü kademeli olarak sıkışır */
#menu { overflow-y: auto; scrollbar-width: none; justify-content: safe center; }
@media (max-height: 780px) and (orientation: portrait) {
  #menu { gap: 8px; padding-top: 14px; padding-bottom: 14px; }
  .mcol { gap: 8px; }
  #menu .tag, #menu .divider { display: none; }
  #title { font-size: clamp(44px, 12vw, 60px); }
  .sc-mid { padding: 7px 4px 8px; }
  #nightSel.stagecard b { font-size: 21px; }
  .menulist { gap: 6px; margin-top: 0; }
  .mi { height: 44px; font-size: 16px; }
  .mi.primary { height: 52px; font-size: 22px; margin-bottom: 0; }
  .chips { margin-top: 2px; }
}
@media (max-height: 600px) and (orientation: portrait) {
  #menu .kicker { display: none; }
  #title { font-size: 40px; }
  .menulist { display: grid; grid-template-columns: 1fr 1fr; }
  .mi { gap: 8px; padding: 0 10px; font-size: 14.5px; }
  .mi.primary { grid-column: 1 / -1; }
}
