/* Matematik Atölyesi - oyun ekranı ve şablon stilleri */

/* ---- temalar ---- */
body.play-page {
  --pbg: linear-gradient(160deg, #e0f2fe, #f0f9ff 40%, #ede9fe);
  --pcard: #ffffff;
  --ptext: #1c2431;
  --pmuted: #64748b;
  --pline: #e2e8f0;
  --paccent: #2563eb;
  --paccent2: #7c3aed;
  --pok: #16a34a;
  --pbad: #dc2626;
  --pchip: #ffffff;
  --pfont: "Segoe UI", system-ui, sans-serif;
}
body.play-page[data-theme="gece"] {
  --pbg: radial-gradient(1200px 600px at 20% 0%, #1e293b, #0f172a);
  --pcard: #1e293b; --ptext: #f1f5f9; --pmuted: #94a3b8; --pline: #334155;
  --paccent: #38bdf8; --paccent2: #a78bfa; --pok: #4ade80; --pbad: #f87171; --pchip: #273449;
}
body.play-page[data-theme="seker"] {
  --pbg: linear-gradient(160deg, #fdf2f8, #fce7f3 40%, #fef3c7);
  --pcard: #fff; --ptext: #4a044e; --pmuted: #9d174d; --pline: #fbcfe8;
  --paccent: #ec4899; --paccent2: #f59e0b; --pok: #10b981; --pbad: #ef4444; --pchip: #fff;
  --pfont: "Comic Sans MS", "Segoe UI", system-ui, sans-serif;
}
body.play-page[data-theme="orman"] {
  --pbg: linear-gradient(160deg, #ecfdf5, #d1fae5 50%, #fef9c3);
  --pcard: #fff; --ptext: #052e16; --pmuted: #3f6212; --pline: #bbf7d0;
  --paccent: #16a34a; --paccent2: #ca8a04; --pok: #15803d; --pbad: #b91c1c; --pchip: #f7fee7;
}

body.play-page { background: var(--pbg); color: var(--ptext); font-family: var(--pfont); min-height: 100vh; display: block; }
.play-shell { min-height: 100vh; display: flex; flex-direction: column; }
.play-bar {
  display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--pcard); border-bottom: 1px solid var(--pline);
  position: sticky; top: 0; z-index: 10; flex-wrap: wrap;
}
.play-home { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #f7b733, #fc4a1a); color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; flex-shrink: 0; }
.play-title { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; flex: 1; }
.play-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-title .muted { font-size: .78rem; color: var(--pmuted); }
.play-hud { display: flex; gap: 8px; }
.hud { background: rgba(127,127,127,.12); padding: 5px 12px; border-radius: 99px; font-size: .9rem; white-space: nowrap; }
.hud b { font-variant-numeric: tabular-nums; }
.hud.warn { background: #fee2e2; color: #b91c1c; animation: pulse 1s infinite; }
.hud.shake { animation: shake .4s; }
.play-tools { display: flex; gap: 4px; }
.ibtn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--pline); background: var(--pcard); color: var(--ptext); cursor: pointer; font-size: 1rem; display: grid; place-items: center; text-decoration: none; }
.ibtn:hover { background: rgba(127,127,127,.12); }
.play-bar .logo-link { margin-left: 6px; }
.play-bar .logo-link img { height: 30px; }

.play-area { flex: 1; max-width: 1100px; width: 100%; margin: 0 auto; padding: 22px 16px 40px; }
.msg { background: var(--pcard); padding: 24px; border-radius: 12px; text-align: center; }
.btn-lg { padding: 13px 26px; font-size: 1.1rem; border-radius: 12px; }
.play-page .btn { border-color: var(--pline); background: var(--pcard); color: var(--ptext); }
.play-page .btn-primary { background: var(--paccent); border-color: var(--paccent); color: #fff; }
.play-page label.check { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

/* bitiş ekranı */
.play-end { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.end-card { background: var(--pcard); color: var(--ptext); border-radius: 18px; padding: 28px; width: 100%; max-width: 440px; text-align: center; box-shadow: 0 25px 60px rgba(0,0,0,.35); animation: popIn .3s; }
.end-card h2 { margin: 0 0 8px; font-size: 1.7rem; }
.end-score { font-size: 1.5rem; margin-bottom: 14px; }
.end-score b { font-size: 2.6rem; color: var(--paccent); }
.end-score .pct { display: inline-block; margin-left: 8px; background: rgba(127,127,127,.15); padding: 2px 10px; border-radius: 99px; font-size: 1rem; }
.end-score .muted { color: var(--pmuted); font-size: .9rem; }
#endNameWrap { display: flex; gap: 8px; align-items: flex-end; margin: 10px 0; }
#endNameWrap label { flex: 1; text-align: left; margin: 0; }
#endNameWrap input { padding: 10px; }
.board ol { list-style: none; padding: 0; margin: 10px 0; text-align: left; counter-reset: b; }
.board h4 { margin: 8px 0 4px; }
.board li { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 8px; counter-increment: b; }
.board li::before { content: counter(b); width: 22px; color: var(--pmuted); font-weight: 700; }
.board li span { flex: 1; }
.board li small { color: var(--pmuted); }
.board li.me { background: rgba(37, 99, 235, .12); }
.end-actions { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }

@keyframes popIn { from { transform: scale(.85); opacity: 0; } }
@keyframes pulse { 50% { opacity: .5; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes pop { from { transform: scale(.9); opacity: .3; } }

/* ---- Quiz / Kutu soru paneli ---- */
.quiz, .box-panel { background: var(--pcard); border-radius: 18px; padding: 26px; box-shadow: 0 10px 30px rgba(0,0,0,.08); max-width: 820px; margin: 0 auto; }
.quiz-q { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 700; text-align: center; margin: 6px 0 24px; animation: pop .25s; }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-opt {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px; border: 2px solid var(--pline); background: var(--pchip); color: var(--ptext);
  font: inherit; font-size: 1.25rem; font-weight: 600; cursor: pointer; text-align: left; transition: .15s;
}
.quiz-opt:hover { border-color: var(--paccent); transform: translateY(-2px); }
.quiz-opt .letter { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--paccent); color: #fff; font-size: 1rem; flex-shrink: 0; }
.quiz-opt.ok { background: var(--pok); border-color: var(--pok); color: #fff; }
.quiz-opt.ok .letter { background: #fff; color: var(--pok); }
.quiz-opt.bad { background: var(--pbad); border-color: var(--pbad); color: #fff; animation: shake .4s; }
.quiz-opt.bad .letter { background: #fff; color: var(--pbad); }

/* ---- Eşleştir ---- */
.match { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 12px; max-width: 860px; margin: 0 auto; }
.match-col { display: flex; flex-direction: column; gap: 10px; }
.match-mid { display: grid; place-items: center; color: var(--pmuted); font-size: 1.4rem; }
.match-chip {
  padding: 14px 16px; border-radius: 12px; border: 2px solid var(--pline); background: var(--pchip); color: var(--ptext);
  font: inherit; font-size: 1.15rem; font-weight: 600; cursor: pointer; transition: .15s; text-align: center;
}
.match-chip.q { border-left: 6px solid var(--paccent); }
.match-chip.a { border-right: 6px solid var(--paccent2); }
.match-chip.sel { border-color: var(--paccent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); transform: scale(1.03); }
.match-chip.done { background: var(--pok); border-color: var(--pok); color: #fff; opacity: .85; cursor: default; }
.match-chip.bad { background: var(--pbad); border-color: var(--pbad); color: #fff; animation: shake .4s; }

/* ---- Çarkıfelek ---- */
.wheel { display: grid; grid-template-columns: minmax(260px, 520px) 1fr; gap: 24px; align-items: start; max-width: 980px; margin: 0 auto; }
.wheel-stage { position: relative; width: 100%; aspect-ratio: 1; }
.wheel-canvas { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 10px 30px rgba(0,0,0,.2); cursor: pointer; background: var(--pcard); }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 34px solid #1c2431; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.wheel-side { position: sticky; top: 70px; }
.wheel-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.wheel-result { background: var(--pcard); border-radius: 16px; padding: 22px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.08); animation: popIn .3s; }
.wheel-q { font-size: clamp(1.4rem, 3.5vw, 2.2rem); font-weight: 700; margin-bottom: 12px; }
.wheel-a { font-size: 2rem; font-weight: 700; color: var(--pok); margin-top: 10px; animation: pop .25s; }
@media (max-width: 760px) { .wheel { grid-template-columns: 1fr; } }

/* ---- Rastgele kartlar / Hafıza (3D kart) ---- */
.cards { text-align: center; }
.cards-stage { position: relative; height: 300px; display: flex; justify-content: center; align-items: center; gap: 30px; perspective: 1000px; margin-bottom: 14px; }
.cards-pile { width: 180px; height: 260px; border-radius: 16px; background: repeating-linear-gradient(45deg, var(--paccent), var(--paccent) 10px, var(--paccent2) 10px, var(--paccent2) 20px); box-shadow: 4px 4px 0 rgba(0,0,0,.15), 8px 8px 0 rgba(0,0,0,.1); transition: opacity .3s; }
.card3d { width: 220px; height: 280px; position: relative; transform-style: preserve-3d; transition: transform .5s; cursor: pointer; }
.card3d.flipped { transform: rotateY(180deg); }
.card3d .face, .mem-card .face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 16px; display: grid; place-items: center; padding: 12px; font-weight: 700; word-break: break-word; }
.card3d .back, .mem-card .back { background: repeating-linear-gradient(45deg, var(--paccent), var(--paccent) 10px, var(--paccent2) 10px, var(--paccent2) 20px); color: #fff; font-size: 3rem; }
.card3d .front, .mem-card .front { background: var(--pcard); color: var(--ptext); transform: rotateY(180deg); border: 3px solid var(--paccent); font-size: 1.6rem; text-align: center; }
.cards-answer { font-size: 2rem; font-weight: 700; color: var(--pok); margin: 8px 0; animation: pop .25s; }
.cards-controls { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.cards-info { color: var(--pmuted); margin-top: 12px; }

.mem { max-width: 760px; margin: 0 auto; }
.mem-info { text-align: center; color: var(--pmuted); margin-bottom: 12px; }
.mem-grid { display: grid; gap: 10px; }
.mem-card { aspect-ratio: 4 / 3; position: relative; transform-style: preserve-3d; transition: transform .4s; cursor: pointer; perspective: 800px; }
.mem-card.flipped { transform: rotateY(180deg); }
.mem-card .back { font-size: 2rem; border-radius: 12px; }
.mem-card .front { font-size: clamp(.95rem, 2.4vw, 1.4rem); border-radius: 12px; }
.mem-card .front.a { border-color: var(--paccent2); }
.mem-card.done { opacity: .55; cursor: default; }
.mem-card.done .front { border-color: var(--pok); background: color-mix(in srgb, var(--pok) 15%, var(--pcard)); }

/* ---- Kelime avı ---- */
.ws { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; max-width: 900px; margin: 0 auto; }
.ws-grid { display: grid; gap: 3px; background: var(--pcard); padding: 8px; border-radius: 12px; user-select: none; touch-action: none; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.ws-cell { aspect-ratio: 1; display: grid; place-items: center; font-weight: 700; font-size: clamp(.8rem, calc(38vw / var(--n)), 1.4rem); border-radius: 6px; background: var(--pchip); border: 1px solid var(--pline); cursor: pointer; }
.ws-cell.sel { background: var(--paccent); color: #fff; }
.ws-cell.found { color: #fff; border-color: transparent; }
.ws-side h4 { margin: 0 0 6px; }
.ws-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.ws-list li { background: var(--pcard); padding: 7px 10px; border-radius: 8px; display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.ws-list li.found { opacity: .6; text-decoration: line-through; }
.ws-list li.found .word { color: var(--pok); text-decoration: none; }
@media (max-width: 700px) { .ws { grid-template-columns: 1fr; } .ws-list { flex-direction: row; flex-wrap: wrap; } }

/* ---- Doğru / Yanlış ---- */
.tf { max-width: 760px; margin: 0 auto; text-align: center; }
.tf-stmt { background: var(--pcard); border-radius: 18px; padding: 40px 24px; font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.08); margin-bottom: 20px; border: 4px solid transparent; }
.tf-stmt.pop { animation: pop .25s; }
.tf-stmt.ok { border-color: var(--pok); }
.tf-stmt.bad { border-color: var(--pbad); animation: shake .4s; }
.tf-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tf-btn { padding: 22px; border-radius: 16px; border: 0; color: #fff; font: inherit; font-size: 2.2rem; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: .15s; }
.tf-btn span { font-size: 1.1rem; }
.tf-btn.true { background: var(--pok); }
.tf-btn.false { background: var(--pbad); }
.tf-btn:hover { transform: translateY(-3px); filter: brightness(1.08); }
.tf-btn.ok { box-shadow: 0 0 0 5px rgba(22,163,74,.4); }
.tf-btn.bad { animation: shake .4s; opacity: .7; }

/* ---- Grup sıralama ---- */
.grp { max-width: 960px; margin: 0 auto; }
.grp-pool { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 60px; background: var(--pcard); padding: 12px; border-radius: 14px; margin-bottom: 18px; }
.grp-chip { padding: 10px 16px; border-radius: 99px; border: 2px solid var(--pline); background: var(--pchip); color: var(--ptext); font: inherit; font-size: 1.1rem; font-weight: 600; cursor: grab; transition: .15s; }
.grp-chip.sel { border-color: var(--paccent); background: var(--paccent); color: #fff; transform: scale(1.06); }
.grp-chip.bad { border-color: var(--pbad); animation: shake .4s; }
.grp-chip.done { cursor: default; border-color: var(--pok); background: color-mix(in srgb, var(--pok) 15%, var(--pcard)); font-size: .95rem; padding: 6px 12px; }
.grp-boxes { display: grid; gap: 14px; }
.grp-box { background: var(--pcard); border: 3px dashed var(--pline); border-radius: 16px; min-height: 160px; padding: 10px; transition: .15s; cursor: pointer; }
.grp-box h4 { margin: 0 0 8px; text-align: center; font-size: 1.15rem; color: var(--paccent); }
.grp-box.over, .grp-box:hover { border-color: var(--paccent); }
.grp-box.bad { border-color: var(--pbad); animation: shake .4s; }
.grp-items { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
@media (max-width: 640px) { .grp-boxes { grid-template-columns: 1fr 1fr !important; } }

/* ---- Kutuyu aç ---- */
.box { max-width: 900px; margin: 0 auto; }
.box-grid { display: grid; gap: 12px; margin: 0 auto 20px; max-width: 720px; }
.box.busy::before { content: ""; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 30; }
.box .box-panel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, 760px); max-height: 90vh; overflow: auto; z-index: 40; }
.box-item { aspect-ratio: 1; border: 0; border-radius: 14px; background: linear-gradient(160deg, var(--paccent2), var(--paccent)); color: #fff; font: inherit; font-size: clamp(1.4rem, 4vw, 2.4rem); cursor: pointer; position: relative; overflow: hidden; box-shadow: 0 6px 0 rgba(0,0,0,.2); transition: .15s; }
.box-item:hover { transform: translateY(-3px); }
.box-item .lid { position: absolute; inset: 0 0 55% 0; background: rgba(255,255,255,.18); border-bottom: 3px solid rgba(255,255,255,.4); transform-origin: top; transition: transform .4s; }
.box-item.open .lid { transform: rotateX(120deg); }
.box-item.ok { background: var(--pok); }
.box-item.bad { background: var(--pbad); }
.box-item.open { cursor: default; box-shadow: none; opacity: .9; }
.box-panel { animation: popIn .3s; }
.box-num { color: var(--pmuted); font-weight: 600; text-align: center; }

/* ---- Sıralama ---- */
.rank { max-width: 640px; margin: 0 auto; }
.rank-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.rank-item { display: flex; align-items: center; gap: 12px; background: var(--pcard); border: 2px solid var(--pline); border-radius: 12px; padding: 10px 12px; cursor: grab; font-size: 1.2rem; font-weight: 600; transition: .15s; }
.rank-item .num { width: 30px; height: 30px; border-radius: 50%; background: var(--paccent); color: #fff; display: grid; place-items: center; font-size: .95rem; flex-shrink: 0; }
.rank-item .txt { flex: 1; }
.rank-item .mv button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--pline); background: var(--pchip); color: var(--ptext); cursor: pointer; font-size: 1rem; }
.rank-item.over { border-color: var(--paccent); }
.rank-item.dragging { opacity: .5; }
.rank-item.ok { border-color: var(--pok); background: color-mix(in srgb, var(--pok) 12%, var(--pcard)); }
.rank-item.bad { border-color: var(--pbad); background: color-mix(in srgb, var(--pbad) 12%, var(--pcard)); }
.rank-actions { display: flex; gap: 10px; justify-content: center; }

@media (max-width: 600px) {
  .play-bar { gap: 8px; padding: 6px 10px; }
  .play-title .muted { display: none; }
  .play-bar .logo-link img { height: 24px; }
  .quiz-opts { grid-template-columns: 1fr; }
  .quiz, .box-panel { padding: 16px; }
  .match { grid-template-columns: 1fr 24px 1fr; gap: 8px; }
  .match-chip { padding: 10px; font-size: 1rem; }
  .tf-btn { font-size: 1.6rem; padding: 14px; }
  .cards-pile { display: none; }
}

/* ---- Ad girme ekranı ---- */
.play-gate { position: fixed; inset: 0; background: var(--pbg); display: grid; place-items: center; z-index: 60; padding: 16px; }
.gate-card { background: var(--pcard); color: var(--ptext); border-radius: 18px; padding: 30px 28px; width: 100%; max-width: 420px; text-align: center; box-shadow: 0 25px 60px rgba(0,0,0,.25); animation: popIn .3s; }
.gate-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 1.1rem; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--pline); }
.gate-card h2 { margin: 0 0 14px; font-size: 1.5rem; font-weight: 600; }
.gate-card .muted { margin: 0 0 8px; }
.gate-card input[type="text"], #gateName { display: block; width: 100%; padding: 12px 14px; font: inherit; font-size: 1.05rem; border: 1px solid var(--pline); border-radius: 8px; background: var(--pchip); color: var(--ptext); margin-bottom: 12px; text-align: center; }
#gateName:focus { outline: 2px solid rgba(37, 99, 235, .35); border-color: var(--paccent); }
.gate-card label.check { display: flex; justify-content: center; margin-bottom: 16px; font-weight: 400; }
.gate-card .btn-block { width: 100%; }

/* ---- Başlatma örtüsü ---- */
.play-start { position: fixed; inset: 0; background: rgba(10, 12, 20, .78); display: grid; place-items: center; z-index: 55; padding: 16px; color: #fff; text-align: center; }
.start-inner { animation: popIn .35s; max-width: 900px; }
.start-title { font-size: clamp(1.6rem, 5vw, 3rem); font-weight: 700; margin-bottom: 28px; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.start-btn { width: 200px; height: 200px; margin: 0 auto; border: 0; border-radius: 12px; background: #06b6d4; color: #fff; font: inherit; font-size: 1.9rem; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 12px 40px rgba(6, 182, 212, .45); transition: transform .15s, box-shadow .15s; }
.start-btn:hover { transform: scale(1.05); box-shadow: 0 16px 50px rgba(6, 182, 212, .6); }
.start-btn .tri { width: 0; height: 0; border-top: 45px solid transparent; border-bottom: 45px solid transparent; border-left: 80px solid #fff; margin-left: 14px; }
.start-desc { margin-top: 28px; font-size: clamp(1rem, 2.4vw, 1.35rem); opacity: .9; }
.end-name { font-size: 1rem; margin-bottom: 6px; }
@media (max-width: 600px) {
  .start-btn { width: 150px; height: 150px; font-size: 1.4rem; }
  .start-btn .tri { border-top-width: 32px; border-bottom-width: 32px; border-left-width: 56px; }
}
.start-instr { margin-top: 14px; font-size: 1.05rem; background: rgba(255,255,255,.12); padding: 10px 16px; border-radius: 10px; display: inline-block; max-width: 640px; }

/* içerikte biçimlendirme, görsel ve denklem */
.play-area img { max-height: 140px; max-width: 100%; vertical-align: middle; border-radius: 8px; }
.play-area .quiz-opt img, .play-area .match-chip img, .play-area .grp-chip img { max-height: 70px; }
.play-area .eq { display: inline-block; }
.play-area .eq .katex { font-size: 1.05em; }

/* ==== v1.3.2: ekranı dolduran düzen ==== */
.play-shell { min-height: 100vh; min-height: 100dvh; }
.play-area { display: flex; flex-direction: column; max-width: 1400px; padding: 14px 16px 18px; }
.play-area > * { flex: 1 1 auto; min-height: 0; }

/* Quiz */
.quiz { display: flex; flex-direction: column; max-width: 1300px; width: 100%; padding: clamp(14px, 3vmin, 30px); }
.quiz-q { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; min-height: 16vh; margin: 0 0 clamp(10px, 2.5vmin, 26px); font-size: clamp(1.7rem, 7.5vmin, 5rem); line-height: 1.25; }
.quiz-opts { flex: 1; grid-auto-rows: minmax(64px, 1fr); gap: clamp(8px, 1.8vmin, 18px); }
.quiz-opt { font-size: clamp(1.2rem, 5vmin, 3.4rem); padding: clamp(8px, 1.6vmin, 18px) clamp(12px, 2.4vmin, 26px); gap: .55em; }
.quiz-opt .letter { width: 1.55em; height: 1.55em; font-size: .72em; }
.quiz-opt > span:last-child { flex: 1; text-align: left; }
.quiz .eq .katex, .box-panel .eq .katex, .tf-stmt .eq .katex { font-size: 1.2em; }
.play-area img { max-height: 28vh; }

/* Kutuyu aç paneli (üstte açılan) */
.box .box-panel { width: min(94vw, 1100px); padding: clamp(14px, 3vmin, 30px); }
.box-panel .quiz-q { min-height: 12vh; }
.box-panel .quiz-opts { grid-auto-rows: minmax(64px, auto); }
.box-panel .quiz-opt { min-height: 12vh; }

/* Doğru / Yanlış */
.tf { display: flex; flex-direction: column; max-width: 1200px; width: 100%; }
.tf-stmt { flex: 1; display: flex; align-items: center; justify-content: center; font-size: clamp(2rem, 8vmin, 5rem); padding: 20px; min-height: 30vh; }
.tf-btns { min-height: 22vh; }
.tf-btn { font-size: clamp(1.8rem, 6vmin, 3.2rem); }
.tf-btn span { font-size: clamp(1rem, 2.6vmin, 1.5rem); }
.tf > p { flex: 0 0 auto; }

/* Eşleştir */
.match { max-width: 1200px; width: 100%; grid-template-columns: 1fr 40px 1fr; align-content: stretch; }
.match-col { justify-content: stretch; }
.match-chip { flex: 1; display: flex; align-items: center; justify-content: center; font-size: clamp(1.1rem, 3.4vmin, 2.3rem); padding: clamp(8px, 1.6vmin, 16px); min-height: 56px; }

/* Gruplara Ayırma */
.grp { display: flex; flex-direction: column; max-width: 1300px; width: 100%; }
.grp-chip { font-size: clamp(1.1rem, 3.2vmin, 2rem); padding: .4em .9em; }
.grp-boxes { flex: 1; }
.grp-box h4 { font-size: clamp(1.1rem, 3vmin, 1.8rem); }

/* Sıralama, hafıza, kelime avı */
.rank { width: 100%; max-width: 900px; display: flex; flex-direction: column; }
.rank-list { flex: 1; justify-content: center; }
.rank-item { font-size: clamp(1.1rem, 3.2vmin, 2.1rem); padding: .45em .7em; }
.mem { width: 100%; max-width: 1000px; }
.play-area > .ws { flex: 0 0 auto; width: 100%; max-width: 1200px; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(200px, 280px); }
.ws-grid { width: min(100%, calc(100vh - 150px)); width: min(100%, calc(100dvh - 150px)); margin: 0 auto; align-self: start; }
.ws-cell { font-size: clamp(.8rem, calc(70vmin / var(--n)), 1.8rem); }
.ws-list li { font-size: clamp(.95rem, 2.2vmin, 1.3rem); }
@media (max-width: 700px) { .play-area > .ws { grid-template-columns: 1fr; } .ws-grid { width: min(100%, calc(100dvh - 240px)); } }

@media (max-width: 600px) {
  .play-area { padding: 10px 10px 12px; }
  .quiz { padding: 12px; border-radius: 14px; }
  .quiz-q { min-height: 14vh; }
  .quiz-opts { grid-template-columns: 1fr; }
  .quiz-opt { min-height: 0; font-size: clamp(1.3rem, 3.8vh, 2.4rem); }
  .quiz-q { font-size: clamp(1.6rem, 5.2vh, 3.2rem); }
  .tf-stmt { font-size: clamp(1.8rem, 6vh, 4rem); }
  .tf-btn { font-size: clamp(1.6rem, 4.5vh, 2.6rem); }
  .match-chip { font-size: clamp(1.05rem, 2.8vh, 2rem); }
  .grp-chip { font-size: clamp(1.05rem, 2.6vh, 1.8rem); }
  .rank-item { font-size: clamp(1.05rem, 2.8vh, 1.8rem); }
  .tf-btns { min-height: 20vh; gap: 10px; }
  .match { grid-template-columns: 1fr 20px 1fr; }
  .match-chip { min-height: 44px; }
  .box .box-panel { width: 96vw; max-height: 92vh; }
}
@media (max-height: 500px) { .quiz-q { min-height: 0; } .tf-stmt { min-height: 0; } }

/* ==== v1.5: yeni şablonlar ==== */
/* Adam asmaca */
.hang { display: flex; flex-direction: column; max-width: 1100px; width: 100%; }
.hang-top { flex: 1; display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: 20px; align-items: center; }
.hang-fig { background: var(--pcard); border-radius: 16px; padding: 12px; text-align: center; color: var(--ptext); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.hang-fig svg { width: 100%; max-height: 32vh; }
.hang-count { font-weight: 700; color: var(--pmuted); }
.hang-main { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hang-clue { font-size: clamp(1.2rem, 3.6vmin, 2.2rem); font-weight: 600; text-align: center; }
.hang-word { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.hang-ch { width: clamp(30px, 6vmin, 56px); height: clamp(40px, 8vmin, 72px); border-bottom: 4px solid var(--ptext); display: grid; place-items: center; font-size: clamp(1.4rem, 5vmin, 3rem); font-weight: 700; }
.hang-ch.fixed { border-bottom-color: transparent; }
.hang-ch.miss { color: var(--pbad); }
.hang-gap { width: clamp(14px, 3vmin, 28px); }
.hang-msg { min-height: 1.6em; font-weight: 700; font-size: 1.15rem; }
.hang-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.hang-key { width: clamp(34px, 6.4vmin, 56px); height: clamp(38px, 7vmin, 56px); border-radius: 8px; border: 2px solid var(--pline); background: var(--pchip); color: var(--ptext); font: inherit; font-size: clamp(1rem, 2.8vmin, 1.5rem); font-weight: 700; cursor: pointer; }
.hang-key:hover:not(:disabled) { border-color: var(--paccent); }
.hang-key:disabled { opacity: .35; cursor: default; }
.hang-key.hit { background: var(--pok); border-color: var(--pok); color: #fff; opacity: 1; }
.hang-key.miss { background: var(--pbad); border-color: var(--pbad); color: #fff; opacity: .7; }
@media (max-width: 640px) { .hang-top { grid-template-columns: 1fr; } .hang-fig svg { max-height: 22vh; } }

/* Anagram */
.ana { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; max-width: 1000px; width: 100%; }
.ana-clue { font-size: clamp(1.3rem, 4vmin, 2.4rem); font-weight: 600; text-align: center; }
.ana-slots, .ana-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ana-slot, .ana-tile { width: clamp(44px, 8vmin, 76px); height: clamp(50px, 9vmin, 84px); border-radius: 12px; font: inherit; font-size: clamp(1.4rem, 5vmin, 2.8rem); font-weight: 700; cursor: pointer; }
.ana-slot { border: 3px dashed var(--pline); background: var(--pcard); color: var(--ptext); }
.ana-slot.on { border-style: solid; border-color: var(--paccent); }
.ana-slots.ok .ana-slot { background: var(--pok); border-color: var(--pok); color: #fff; }
.ana-slots.bad .ana-slot { background: var(--pbad); border-color: var(--pbad); color: #fff; animation: shake .4s; }
.ana-tile { border: 0; background: var(--paccent2); color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.2); transition: .1s; }
.ana-tile:hover { transform: translateY(-2px); }
.ana-tile.used { visibility: hidden; }

/* Cümle kur */
.unj { display: flex; flex-direction: column; max-width: 1100px; width: 100%; gap: 14px; }
.unj-answer { flex: 1; min-height: 22vh; background: var(--pcard); border: 3px dashed var(--pline); border-radius: 16px; padding: 14px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px; }
.unj-answer.ok { border-color: var(--pok); background: color-mix(in srgb, var(--pok) 12%, var(--pcard)); }
.unj-answer.bad { border-color: var(--pbad); animation: shake .4s; }
.unj-empty { color: var(--pmuted); align-self: center; width: 100%; text-align: center; }
.unj-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 60px; }
.unj-word { padding: .4em .9em; border-radius: 12px; border: 2px solid var(--pline); background: var(--pchip); color: var(--ptext); font: inherit; font-size: clamp(1.1rem, 3.6vmin, 2.2rem); font-weight: 600; cursor: pointer; }
.unj-word.src { background: var(--paccent); border-color: var(--paccent); color: #fff; }
.unj-word.src.used { visibility: hidden; }
.unj-actions { display: flex; justify-content: center; }

/* Gameshow */
.gs { display: flex; flex-direction: column; width: 100%; max-width: 1300px; }
.gs-panel { display: flex; flex-direction: column; }
.gs-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-bottom: 12px; }
.gs-time { font-size: 1.6rem; font-weight: 800; min-width: 2.2em; text-align: center; color: var(--paccent); }
.gs-bar { height: 14px; background: rgba(127,127,127,.15); border-radius: 99px; overflow: hidden; }
.gs-fill { height: 100%; background: var(--paccent); transition: width .1s linear; }
.gs-fill.low { background: var(--pbad); }
.gs-streak { font-weight: 700; min-width: 5em; text-align: right; color: #ea580c; }
.gs-jokers { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.gs-joker { border: 2px solid var(--pline); background: var(--pchip); color: var(--ptext); border-radius: 12px; padding: 8px 14px; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.gs-joker b { font-size: 1.1rem; }
.gs-joker span { font-size: .72rem; color: var(--pmuted); }
.gs-joker:hover:not(:disabled) { border-color: var(--paccent2); }
.gs-joker:disabled { opacity: .35; cursor: default; }
.gs-joker.active { border-color: var(--paccent2); background: color-mix(in srgb, var(--paccent2) 15%, var(--pcard)); }
.quiz-opt.gone { visibility: hidden; }

/* Eşleşmeyi bul */
.fm { display: flex; flex-direction: column; width: 100%; max-width: 1100px; gap: 14px; }
.fm-prompt { background: var(--paccent); color: #fff; border-radius: 16px; padding: 16px; text-align: center; font-size: clamp(1.5rem, 5.5vmin, 3.2rem); font-weight: 700; min-height: 14vh; display: flex; align-items: center; justify-content: center; }
.fm-prompt.pop { animation: pop .25s; }
.fm-prompt.bad { background: var(--pbad); animation: shake .4s; }
.fm-prompt .katex { color: #fff; }
.fm-grid { flex: 1; display: grid; gap: 12px; grid-auto-rows: minmax(70px, 1fr); }
.fm-tile { border: 2px solid var(--pline); background: var(--pcard); color: var(--ptext); border-radius: 14px; font: inherit; font-size: clamp(1.2rem, 4.5vmin, 2.8rem); font-weight: 700; cursor: pointer; transition: .15s; }
.fm-tile:hover { border-color: var(--paccent); transform: translateY(-2px); }
.fm-tile.done { visibility: hidden; }
.fm-tile.bad { background: var(--pbad); border-color: var(--pbad); color: #fff; animation: shake .4s; }
@media (max-width: 600px) { .gs-jokers { gap: 6px; } .gs-joker { padding: 6px 8px; } }
