/* Almanca Alfabe oyunu (/almanca-alfabe/, js/alfabe.js). Yalnızca yerleşim; renk ve yazı tipleri css/base.css tokenları.
   Çocuk ve yetişkin modu aynı kuralları kullanır: farklar [data-profil] üzerindeki --ab-* değişkenlerindedir. */
.academy-theme .ab-app{
  --ab-radius:var(--ba-radius-small);--ab-tap:48px;--ab-letter:clamp(1.5rem,1.2rem + 1.2vw,2rem);--ab-scale:1;
  --ab-surface:var(--ba-paper);--ab-tile:var(--ba-paper-2);--ab-accent:var(--ba-accent);--ab-accent-ink:var(--ba-accent-ink);
  --ab-title:var(--ba-serif);
  margin:24px 0 0;padding:clamp(14px,3vw,28px);background:var(--ab-surface);border-radius:var(--ba-radius);
  font-size:calc(var(--ba-body) * var(--ab-scale));min-height:420px;
}
.academy-theme .ab-app[data-profil="cocuk"]{
  --ab-radius:22px;--ab-tap:64px;--ab-letter:clamp(2rem,1.5rem + 2vw,2.75rem);--ab-scale:1.12;--ab-title:var(--ba-sans);
}
.academy-theme .ab-app[data-profil="secim"]{--ab-tap:64px}
/* Children: every tile in one of the four friendly colours of the site (article colours and the lamp). */
.academy-theme .ab-app[data-profil="cocuk"] :is(.ab-tile,.ab-option):nth-of-type(4n+1),
.academy-theme .ab-app[data-profil="cocuk"] .ab-modes li:nth-child(4n+1) .ab-mode-icon,
.academy-theme .ab-app[data-profil="cocuk"] .ab-order li:nth-child(4n+1) .ab-option,
.academy-theme .ab-app[data-profil="cocuk"] .ab-options .ab-option:nth-child(4n+1){background:var(--ba-der-bg);box-shadow:inset 0 0 0 2px var(--ba-der)}
.academy-theme .ab-app[data-profil="cocuk"] :is(.ab-tile,.ab-option):nth-of-type(4n+2),
.academy-theme .ab-app[data-profil="cocuk"] .ab-modes li:nth-child(4n+2) .ab-mode-icon,
.academy-theme .ab-app[data-profil="cocuk"] .ab-order li:nth-child(4n+2) .ab-option,
.academy-theme .ab-app[data-profil="cocuk"] .ab-options .ab-option:nth-child(4n+2){background:var(--ba-die-bg);box-shadow:inset 0 0 0 2px var(--ba-die)}
.academy-theme .ab-app[data-profil="cocuk"] :is(.ab-tile,.ab-option):nth-of-type(4n+3),
.academy-theme .ab-app[data-profil="cocuk"] .ab-modes li:nth-child(4n+3) .ab-mode-icon,
.academy-theme .ab-app[data-profil="cocuk"] .ab-order li:nth-child(4n+3) .ab-option,
.academy-theme .ab-app[data-profil="cocuk"] .ab-options .ab-option:nth-child(4n+3){background:var(--ba-das-bg);box-shadow:inset 0 0 0 2px var(--ba-das)}
.academy-theme .ab-app[data-profil="cocuk"] :is(.ab-tile,.ab-option):nth-of-type(4n+4),
.academy-theme .ab-app[data-profil="cocuk"] .ab-modes li:nth-child(4n+4) .ab-mode-icon,
.academy-theme .ab-app[data-profil="cocuk"] .ab-order li:nth-child(4n+4) .ab-option,
.academy-theme .ab-app[data-profil="cocuk"] .ab-options .ab-option:nth-child(4n+4){background:color-mix(in srgb,var(--ba-lamp) 28%,var(--ba-paper));box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--ba-lamp) 70%,var(--ba-ink))}

.academy-theme .ab-app :is(h2,h3).ab-title,.academy-theme .lp-main .ab-app h2.ab-title{font-family:var(--ab-title);font-size:clamp(1.5rem,1.2rem + 1.2vw,2.125rem);font-weight:600;letter-spacing:-.01em;line-height:1.2;margin:0 0 10px;max-width:none}
.academy-theme .ab-app[data-profil="yetiskin"] .ab-title{font-weight:400}
.academy-theme .ab-app h3{font-size:var(--ba-lead)}
.academy-theme .ab-app p{margin:0 0 12px}
.academy-theme .ab-lead{color:var(--ba-muted);max-width:52ch}
.academy-theme .ab-muted{color:var(--ba-muted)}
.academy-theme .ab-small{font-size:var(--ba-small)}
.academy-theme .ab-center{text-align:center;justify-content:center}
.academy-theme .ab-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.academy-theme .ab-note{background:var(--ba-wrong-bg);color:var(--ba-ink);border-radius:var(--ba-radius-small);padding:10px 14px;font-size:var(--ba-small)}
.academy-theme .ab-info{margin-top:20px!important;padding:12px 16px;border-left:4px solid var(--ab-accent);background:var(--ba-paper-2);border-radius:var(--ba-radius-small);font-size:var(--ba-small)}

/* Toolbar: the profile switch sits in the top right corner at all times. */
.academy-theme .ab-toolbar{position:sticky;top:0;z-index:5;display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:calc(-1 * clamp(14px,3vw,28px)) calc(-1 * clamp(14px,3vw,28px)) 16px;padding:10px clamp(14px,3vw,28px);background:var(--ab-surface);border-bottom:1px solid var(--ba-line);border-radius:var(--ba-radius) var(--ba-radius) 0 0}
.academy-theme .ab-tool-gap{flex:1}
.academy-theme .ab-tool{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:48px;min-height:48px;padding:0 12px;border:0;border-radius:var(--ab-radius);background:var(--ba-paper-2);color:var(--ba-ink);font:inherit;font-size:var(--ba-small);font-weight:600;text-decoration:none;cursor:pointer}
.academy-theme .ab-tool:hover{background:var(--ba-line)}
.academy-theme .ab-tool[aria-pressed="true"]{box-shadow:inset 0 0 0 2px var(--ab-accent)}
.academy-theme .ab-tool[data-ab-sound][aria-pressed="false"]{box-shadow:none}
.academy-theme .ab-profile{background:var(--ab-accent);color:var(--ab-accent-ink)}
.academy-theme .ab-profile:hover{background:var(--ba-accent-hover)}
.academy-theme .ab-stars,.academy-theme .ab-qstars{font-weight:600;font-size:var(--ba-lead)}
@media (max-width:560px){
  .academy-theme .ab-tool:not(.ab-profile) span:not([aria-hidden]){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .academy-theme .ab-home span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
}

/* Profile cards */
.academy-theme .ab-profiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px;margin:20px 0}
.academy-theme .ab-profile-card{display:flex;flex-direction:column;align-items:center;gap:8px;min-height:220px;padding:24px;border:0;border-radius:22px;background:var(--ba-paper-2);color:var(--ba-ink);font:inherit;text-align:center;cursor:pointer;transition:transform .15s var(--ba-ease),box-shadow .15s}
.academy-theme .ab-profile-card.is-cocuk{background:var(--ba-der-bg);box-shadow:inset 0 0 0 3px var(--ba-der)}
.academy-theme .ab-profile-card.is-yetiskin{background:var(--ba-paper-2);box-shadow:inset 0 0 0 3px var(--ba-line-strong)}
.academy-theme .ab-profile-card:hover{transform:translateY(-2px)}
.academy-theme .ab-profile-card[aria-pressed="true"]{outline:4px solid var(--ab-accent);outline-offset:3px}
.academy-theme .ab-profile-icon{font-size:4rem;line-height:1}
.academy-theme .ab-profile-name{font-family:var(--ba-serif);font-size:clamp(1.75rem,1.4rem + 1vw,2.25rem);font-weight:600}
.academy-theme .ab-profile-text{color:var(--ba-muted);font-size:var(--ba-small);max-width:28ch}

/* Menu */
.academy-theme .ab-modes{list-style:none;margin:16px 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:12px}
.academy-theme .ab-mode{display:flex;align-items:center;gap:14px;height:100%;min-height:var(--ab-tap);padding:14px;border-radius:var(--ab-radius);background:var(--ba-paper-2);color:var(--ba-ink);text-decoration:none;transition:background-color .15s,transform .15s var(--ba-ease)}
.academy-theme .ab-mode:hover{background:var(--ba-line)}
.academy-theme .ab-app[data-profil="cocuk"] .ab-mode:hover{transform:translateY(-2px)}
.academy-theme .ab-mode-icon{flex:0 0 auto;display:grid;place-items:center;width:calc(var(--ab-tap) + 8px);height:calc(var(--ab-tap) + 8px);border-radius:var(--ab-radius);background:var(--ab-surface);font-family:var(--ba-serif);font-size:1.25rem;font-weight:600;line-height:1}
.academy-theme .ab-app[data-profil="cocuk"] .ab-mode-icon{font-size:2.25rem}
.academy-theme .ab-mode-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.academy-theme .ab-mode-body strong{font-size:var(--ba-lead);line-height:1.25}
.academy-theme .ab-mode-body span{color:var(--ba-muted);font-size:var(--ba-small)}
.academy-theme .ab-mode-body em{font-style:normal;font-size:var(--ba-small);font-weight:600;color:var(--ba-right)}
.academy-theme .ab-progress{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:8px 0 12px;font-size:var(--ba-small)}
.academy-theme .ab-progress-bar{flex:1 1 160px;height:12px;border-radius:99px;background:var(--ba-paper-2);overflow:hidden}
.academy-theme .ab-progress-bar span{display:block;height:100%;background:var(--ab-accent);border-radius:inherit}
.academy-theme .ab-stickers{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-height:40px}
.academy-theme .ab-sticker{font-size:2rem;line-height:1;display:inline-block}
.academy-theme .ab-switch{display:flex;align-items:flex-start;gap:10px;min-height:48px;padding:12px 14px;border-radius:var(--ab-radius);background:var(--ba-paper-2);cursor:pointer}
.academy-theme .ab-switch input{width:22px;height:22px;margin:2px 0 0;accent-color:var(--ba-accent);flex:0 0 auto}
.academy-theme .ab-hard{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.academy-theme .ab-chip{display:inline-grid;place-items:center;min-width:36px;height:36px;padding:0 8px;border-radius:var(--ba-radius-small);background:var(--ba-wrong-bg);color:var(--ba-ink);font-weight:600}

/* Explore */
.academy-theme .ab-explore{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:20px;align-items:start}
@media (max-width:820px){.academy-theme .ab-explore{grid-template-columns:minmax(0,1fr)}}
.academy-theme .ab-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--ab-tap),1fr));gap:8px}
.academy-theme .ab-tile,.academy-theme .ab-option{position:relative;display:grid;place-items:center;min-width:var(--ab-tap);min-height:var(--ab-tap);padding:6px;border:0;border-radius:var(--ab-radius);background:var(--ab-tile);color:var(--ba-ink);font-family:var(--ba-serif);font-size:var(--ab-letter);font-weight:600;line-height:1;cursor:pointer;transition:transform .12s var(--ba-ease),background-color .12s}
.academy-theme .ab-tile{font-size:calc(var(--ab-letter) * .8)}
.academy-theme .ab-app[data-profil="yetiskin"] :is(.ab-tile,.ab-option){box-shadow:inset 0 0 0 1px var(--ba-line-strong)}
.academy-theme :is(.ab-tile,.ab-option):hover:not(:disabled){transform:translateY(-2px)}
.academy-theme .ab-tile.is-on{outline:3px solid var(--ab-accent);outline-offset:2px}
.academy-theme .ab-check{position:absolute;top:3px;right:6px;font-family:var(--ba-sans);font-size:.75rem;color:var(--ba-right)}
.academy-theme .ab-detail-wrap{position:sticky;top:84px}
.academy-theme .ab-detail{display:flex;gap:16px;padding:18px;border-radius:var(--ab-radius);background:var(--ba-paper-2)}
@media (max-width:420px){.academy-theme .ab-detail{flex-direction:column}}
.academy-theme .ab-detail-letter{flex:0 0 auto;font-family:var(--ba-serif);font-size:clamp(3rem,2.4rem + 2vw,4.5rem);font-weight:600;line-height:1;color:var(--ab-accent)}
.academy-theme .ab-detail-body{min-width:0}
.academy-theme .ab-detail-name{font-size:var(--ba-lead)}
.academy-theme .ab-detail-empty{padding:18px;border:2px dashed var(--ba-line);border-radius:var(--ab-radius)}
.academy-theme .ab-example{font-size:var(--ba-lead);overflow-wrap:anywhere}
.academy-theme .ab-emoji{font-size:1.6em;vertical-align:middle}
.academy-theme .ab-app mark{background:color-mix(in srgb,var(--ba-lamp) 45%,transparent);color:inherit;border-radius:4px;padding:0 2px;text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:4px}
.academy-theme .ab-art{color:var(--ba-muted);font-weight:400}
.academy-theme .ab-tip{padding:10px 12px;border-radius:var(--ba-radius-small);background:var(--ab-surface)}
.academy-theme .ab-tip-more{font-size:var(--ba-small)}
.academy-theme .ab-listen,.academy-theme .ab-actions .btn{min-height:var(--ab-tap)}
.academy-theme .ab-bonus{margin-top:24px}
.academy-theme .ab-bonus table{width:100%;border-collapse:collapse;font-size:var(--ba-small)}
.academy-theme .ab-bonus :is(th,td){padding:8px 10px;border-bottom:1px solid var(--ba-line);text-align:left;vertical-align:top}

/* Questions */
.academy-theme .ab-qhead{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin-bottom:12px;font-size:var(--ba-small);font-weight:600}
.academy-theme .ab-qhead .ab-points{margin-left:auto}
.academy-theme .ab-qhead .ab-qstars{margin-left:auto}
.academy-theme .ab-combo{color:var(--ba-right)}
.academy-theme .ab-qbar,.academy-theme .ab-timer{flex:1 1 100%;height:8px;border-radius:99px;background:var(--ba-paper-2);overflow:hidden}
.academy-theme .ab-qbar span,.academy-theme .ab-timer span{display:block;height:100%;width:100%;background:var(--ab-accent);border-radius:inherit}
.academy-theme .ab-qbar span{transition:width .3s var(--ba-ease)}
.academy-theme .ab-timer span{background:var(--ba-lamp)}
.academy-theme .ab-ask{font-size:var(--ba-lead);font-weight:600}
.academy-theme .ab-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;margin:8px 0 16px;padding:18px;border-radius:var(--ab-radius);background:var(--ba-paper-2);text-align:center}
.academy-theme .ab-prompt p{margin:0}
.academy-theme .ab-big-emoji{font-size:clamp(3.5rem,3rem + 3vw,5.5rem);line-height:1.1}
.academy-theme .ab-word{font-family:var(--ba-serif);font-size:clamp(1.75rem,1.4rem + 1.4vw,2.5rem);font-weight:600}
.academy-theme .ab-word-small{font-family:var(--ba-serif);font-size:var(--ba-lead)}
.academy-theme .ab-play{display:inline-flex;align-items:center;gap:8px;min-height:var(--ab-tap);padding:0 22px;border:0;border-radius:var(--ab-radius);background:var(--ab-accent);color:var(--ab-accent-ink);font:inherit;font-weight:600;cursor:pointer}
.academy-theme .ab-play:hover{background:var(--ba-accent-hover)}
.academy-theme .ab-app[data-profil="cocuk"] .ab-play{font-size:1.4rem;padding:0 30px;border-radius:99px}
.academy-theme .ab-fallback{font-size:var(--ba-small);color:var(--ba-muted)}
.academy-theme .ab-linkbtn{min-height:44px;padding:0 8px;border:0;background:none;color:var(--ba-ink);font:inherit;font-size:var(--ba-small);text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.academy-theme .ab-spelled{font-weight:600}
.academy-theme .ab-scene{max-width:46ch}
.academy-theme .ab-scene-type{font-size:var(--ba-small);font-weight:600;color:var(--ba-muted);text-transform:uppercase;letter-spacing:.06em}
.academy-theme .ab-quote{font-family:var(--ba-serif);font-size:var(--ba-lead);font-style:italic}
.academy-theme .ab-options{display:grid;grid-template-columns:repeat(var(--ab-cols,4),minmax(0,1fr));gap:12px;max-width:560px;margin:0 auto}
.academy-theme .ab-app[data-profil="cocuk"] .ab-options{--ab-cols:3}
.academy-theme .ab-options .ab-option{min-height:calc(var(--ab-tap) + 24px)}
@media (max-width:380px){.academy-theme .ab-app[data-profil="yetiskin"] .ab-options{--ab-cols:2}}
.academy-theme .ab-option.is-right{background:var(--ba-right-bg)!important;box-shadow:inset 0 0 0 3px var(--ba-right)!important}
.academy-theme .ab-option.is-wrong{background:var(--ba-wrong-bg)!important;box-shadow:inset 0 0 0 3px var(--ba-wrong)!important}
.academy-theme .ab-option:disabled{cursor:default;transform:none}
.academy-theme .ab-controls .ab-option:disabled:not(.is-right):not(.is-wrong){opacity:.55}

/* Spelling */
.academy-theme .ab-built{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;min-height:var(--ab-tap);margin:0 0 14px}
.academy-theme .ab-slot{display:grid;place-items:center;min-width:calc(var(--ab-tap) * .8);height:var(--ab-tap);padding:0 6px;border-bottom:4px solid var(--ab-accent);font-family:var(--ba-serif);font-size:var(--ab-letter);font-weight:600}
.academy-theme .ab-slot.is-empty{color:var(--ba-muted);border-bottom-style:dashed}
.academy-theme .ab-letters{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:0 0 14px}
.academy-theme .ab-letters .ab-option{width:var(--ab-tap)}
.academy-theme .ab-letters .ab-option:disabled{opacity:.3}
.academy-theme .ab-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:8px 0}
.academy-theme .ab-type{display:flex;flex-direction:column;gap:10px;max-width:520px;margin:0 auto}
.academy-theme .ab-type label{font-weight:600}
.academy-theme .ab-input{width:100%;min-height:52px;padding:10px 14px;border:2px solid var(--ba-line-strong);border-radius:var(--ab-radius);background:var(--ab-surface);color:var(--ba-ink);font:inherit;font-size:var(--ba-lead)}
.academy-theme .ab-keys{display:flex;flex-wrap:wrap;gap:8px}
.academy-theme .ab-key{min-width:48px;min-height:48px;border:0;border-radius:var(--ab-radius);background:var(--ba-paper-2);color:var(--ba-ink);font:inherit;font-size:var(--ba-lead);font-weight:600;cursor:pointer;box-shadow:inset 0 0 0 1px var(--ba-line-strong)}
.academy-theme .ab-key:hover{background:var(--ba-line)}
.academy-theme .ab-type .btn{align-self:flex-start;min-height:48px}

/* Order */
.academy-theme .ab-order{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;list-style:none;margin:8px 0 14px;padding:0}
.academy-theme .ab-ordertile{width:calc(var(--ab-tap) + 8px);height:calc(var(--ab-tap) + 8px);touch-action:none;user-select:none;-webkit-user-select:none}
.academy-theme .ab-ordertile.is-picked{outline:4px solid var(--ab-accent);outline-offset:3px;transform:translateY(-4px)}
.academy-theme .ab-ordertile.is-drag{z-index:3;transition:none;cursor:grabbing;opacity:.9}
.academy-theme .ab-ordertile.is-over{outline:3px dashed var(--ab-accent);outline-offset:3px}

/* Feedback and result */
.academy-theme .ab-feedback:empty{display:none}
.academy-theme .ab-feedback{margin-top:16px;padding:16px 18px;border-radius:var(--ab-radius)}
.academy-theme .ab-feedback.is-right{background:var(--ba-right-bg)}
.academy-theme .ab-feedback.is-wrong{background:var(--ba-paper-2);box-shadow:inset 4px 0 0 var(--ba-lamp)}
.academy-theme .ab-fb-title{font-size:var(--ba-lead);font-weight:600}
.academy-theme .ab-feedback.is-right .ab-fb-title{color:var(--ba-right)}
.academy-theme .ab-gain{font-size:var(--ba-small);color:var(--ba-right)}
.academy-theme .ab-answer{font-family:var(--ba-serif);font-size:1.3em}
.academy-theme .ab-next{min-height:var(--ab-tap)}
.academy-theme .ab-result{text-align:center}
.academy-theme .ab-result-stars{font-size:3rem;letter-spacing:.1em;line-height:1.2}
.academy-theme .ab-star{color:var(--ba-line-strong);opacity:.35;display:inline-block}
.academy-theme .ab-star.is-on{color:var(--ba-lamp);opacity:1}
.academy-theme .ab-result-score{font-size:var(--ba-lead)}
.academy-theme .ab-result .ab-hard{justify-content:center}
.academy-theme .ab-newsticker{font-weight:600}

@media (prefers-reduced-motion:no-preference){
  .academy-theme .ab-feedback.is-anim.is-right .ab-fb-title{animation:ab-pop .45s var(--ba-ease)}
  .academy-theme .ab-feedback.is-anim{animation:ab-in .25s var(--ba-ease)}
  .academy-theme .ab-app[data-profil="cocuk"] .ab-feedback.is-anim.is-right .ab-fb-title span[aria-hidden]{display:inline-block;animation:ab-spin .6s var(--ba-ease)}
  .academy-theme .ab-star.is-on{animation:ab-pop .5s var(--ba-ease) both}
  .academy-theme .ab-star.is-on:nth-child(2){animation-delay:.15s}
  .academy-theme .ab-star.is-on:nth-child(3){animation-delay:.3s}
}
@keyframes ab-pop{0%{transform:scale(.6)}60%{transform:scale(1.15)}100%{transform:scale(1)}}
@keyframes ab-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes ab-spin{from{transform:rotate(-30deg) scale(.6)}to{transform:none}}
@media (prefers-reduced-motion:reduce){
  .academy-theme .ab-app *{transition:none!important;animation:none!important}
}
/* landing.css underlines links inside list items; the mode cards are whole-card links. */
.academy-theme .lp-main .ab-app li a.ab-mode{font-weight:400;text-decoration:none}
.academy-theme .lp-main .ab-app li a.ab-mode:hover{color:var(--ba-ink)}
.academy-theme .lp-main .ab-app li a.ab-mode:hover strong{text-decoration:underline;text-underline-offset:4px}

/* Sound credit under the game (almanca-alfabe/index.html) */
.academy-theme .ab-credit{margin:10px 0 0;color:var(--ba-muted);font-size:var(--ba-small)}
