/* Eksik Harfleri Tamamla — standalone two-screen exercise, shared header. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Nunito:wght@600;700;800;900&display=swap');
/* Shared header palette — customize this exercise independently. */
:root {
  --game-header-bg: linear-gradient(105deg,#ffe5ed,#f8f8ff 52%,#e6f8e6);
  --game-header-border: #877bfa;
  --game-header-title: #313c71;
  --game-header-button-bg: #faf9ff;
  --game-header-button-border: #c9c5ef;
  --game-header-button-color: #4e4ab1;
  --game-header-button-hover-bg: #e8e5ff;
  --game-header-button-hover-border: #877bfa;
  --game-header-button-active-bg: #dcd7ff;
  --game-header-focus: #7377f8;
  --game-header-shadow: #0f172a1a;
  --game-header-button-hover-color: #4e4ab1;
  --game-header-button-active-color: #4e4ab1;
  --game-header-button-active-border: #877bfa;
  --game-header-logo-bg: #fff;
  --game-header-logo-border: #c9c5ef;
  --game-header-brand-hover-shadow: #7377f833;
}

:root{font-family:'DM Sans',system-ui,sans-serif;color:#2a3564}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;min-width:320px;min-height:100%;overflow-x:hidden}
body{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden;background:radial-gradient(ellipse at 4% 10%,#ffe3e8,transparent 36%),radial-gradient(ellipse at 97% 12%,#def7ff,transparent 36%),linear-gradient(145deg,#f7f7ff,#f7fcff)}
button,select,input{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.53}[hidden]{display:none!important}
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #7377f8;outline-offset:3px}
svg{display:block}
.cl-app{display:flex;flex:1;min-height:0;overflow:hidden}
.cl-main{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;width:min(100%,1120px);margin:0 auto;padding:0 clamp(7px,1.5vw,18px)}
.cl-screen{display:flex;flex:1;min-width:0;min-height:0;flex-direction:column}
.cl-panel{display:flex;flex:1;min-height:0;min-width:0;flex-direction:column;overflow:hidden;border:1px solid #e0e7fb;border-radius:26px;background:radial-gradient(circle at 5% 10%,#fff8e8 0 5px,transparent 6px) 0 0/184px 184px,linear-gradient(145deg,#fff,#fbfcff);box-shadow:0 16px 46px #2b448b25}
.cl-menu-panel{width:min(100%,945px);margin:0 auto;padding:clamp(14px,2.3vw,30px);gap:clamp(12px,2vh,20px)}
.cl-overline{display:block;color:#7780b2;font-size:11px;letter-spacing:.14em;font-weight:900}
.cl-menu-fields{display:grid;grid-template-columns:.8fr 1.6fr;gap:12px}
.cl-select{display:flex;flex-direction:column;gap:8px;min-width:0;padding:13px;border:1px solid #e4e8fa;border-radius:17px;background:#f8faff;box-shadow:0 4px 0 #f1f3fc}
.cl-select>span{font-size:11px;font-weight:900;letter-spacing:.1em;color:#868fb6}
.cl-select select{width:100%;min-width:0;min-height:49px;padding:0 12px;border-radius:12px;border:1px solid #d7ddf5;background:#fff;color:#3c467c;font-size:15px;font-weight:800;text-overflow:ellipsis}
.cl-unit-list{display:grid;flex:1;min-height:0;align-content:start;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:3px 5px 8px 3px;overflow-y:auto;scrollbar-color:#c5cdf4 transparent}
.cl-unit{display:flex;align-items:center;gap:10px;min-height:59px;min-width:0;padding:8px 12px;border:1px solid #e2e6fa;border-radius:17px;background:linear-gradient(130deg,#fff,#fafaff);text-align:left;box-shadow:0 4px 0 #eff1fb;transition:transform .15s,border-color .15s}
.cl-unit strong{flex:none;display:grid;place-items:center;width:43px;height:40px;border-radius:13px;background:#f0eaff;color:#7568d9;font:900 19px Nunito,sans-serif}
.cl-unit span{min-width:0;color:#606f9b;font-size:15px;font-weight:800;line-height:1.35;overflow-wrap:anywhere}
.cl-unit:hover{transform:translateY(-2px);border-color:#beb6f8}
.cl-unit.is-selected{border-color:#9892f7;background:linear-gradient(135deg,#efefff,#f3fff8);box-shadow:inset 0 0 0 1px #c4bfff,0 4px 0 #dfdefe}
.cl-menu-footer{display:flex;align-items:center;gap:16px;justify-content:space-between;border-top:1px solid #eef0fa;padding-top:15px}
.cl-meaning-selector{display:flex;align-items:center;gap:12px;min-width:0;color:#6776a2;font-size:14px;font-weight:900}
.cl-meaning-selector select{min-width:116px;min-height:45px;padding:0 32px 0 13px;border:1px solid #d7ddf5;border-radius:13px;background:#f8faff;color:#3c467c;font-size:15px;font-weight:900;cursor:pointer}
.cl-warning{margin:0;color:#a6652b;font-size:13px;font-weight:800}
.cl-primary,.cl-secondary{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:50px;padding:11px 23px;border-radius:15px;font-size:15px;font-weight:900;white-space:nowrap;transition:transform .14s,filter .14s}
.cl-primary{border:0;color:#fff;background:linear-gradient(120deg,#fc799e,#ed70af 47%,#8277ee);box-shadow:0 5px 0 #c764a1,0 10px 17px #9877df2e}
.cl-primary:hover:not(:disabled){transform:translateY(-2px);filter:saturate(1.1)}
.cl-secondary{color:#666e9e;background:#fff;border:1px solid #dce2f8;box-shadow:0 3px 0 #eef0fa}
.cl-secondary:hover:not(:disabled){background:#f6f7ff}
.cl-game-panel{width:100%;max-width:1000px;margin-inline:auto;padding:clamp(13px,2.5vw,28px);gap:clamp(9px,1.7vh,17px);overflow-y:auto}
.cl-topline{display:flex;flex:none;align-items:center;justify-content:space-between;gap:10px}
.cl-topline h2{margin:4px 0 0;font:900 clamp(22px,2.8vw,32px) Nunito,sans-serif;color:#334178}
.cl-score{display:inline-flex;align-items:center;gap:6px;flex:none;padding:10px 16px;border:2px solid #cbedde;background:#effcf6;border-radius:99px;color:#5f947d;font-size:13px;font-weight:900}
.cl-score strong{font-size:20px;color:#2b9b78}
.cl-progress{flex:none;height:10px;border-radius:99px;overflow:hidden;background:#edf0fa}
.cl-progress span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#fa89ba,#ffd287 38%,#76d7bc 72%,#877bfa);transition:width .3s}
.cl-word-stage{position:relative;display:flex;flex:1;min-height:185px;flex-direction:column;align-items:center;justify-content:center;gap:clamp(14px,2vh,22px);overflow-y:auto;padding:20px 12px;border:1px solid #e2e7fa;border-radius:24px;background:radial-gradient(circle at 15% 20%,#ffe5ed,transparent 30%),radial-gradient(circle at 88% 85%,#e6f8e6,transparent 35%),linear-gradient(135deg,#f8f8ff,#fff);box-shadow:inset 0 2px 0 #fff}
.cl-stage-label{z-index:1;font-size:11px;letter-spacing:.16em;font-weight:900;color:#9495bf}
.cl-stage-spark{position:absolute;color:#f6b55a;opacity:.8;pointer-events:none}
.cl-spark-one{top:18px;left:6%;font-size:33px}.cl-spark-two{bottom:12%;right:6%;font-size:29px;color:#90cef2}
.cl-letters{z-index:1;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:clamp(4px,.75vw,9px);max-width:100%}
.cl-letter{display:grid;place-items:center;width:clamp(37px,4.3vw,62px);height:clamp(51px,6vw,75px);border-radius:13px;flex:none;font:900 clamp(22px,2.8vw,34px) Nunito,sans-serif;text-align:center;text-transform:lowercase}
.cl-letter.is-given{border:2px solid #dde3fa;background:#f0f2fc;color:#555f99;box-shadow:0 4px 0 #e4e7f6}
.cl-letter.is-missing{padding:0 2px;border:2px solid #a4a3f5;background:#fff;color:#5d5ab1;box-shadow:0 5px 0 #d5d4ff;caret-color:#fb73a2;outline-offset:2px}
.cl-letter.is-missing:focus{border-color:#7971f1;outline:3px solid #e1dfff}
.cl-letter.is-missing.is-filled{background:#f0efff}
.cl-letter.is-missing.is-hinted{background:#fff0c8;border-color:#f0b95d;color:#9f6814;box-shadow:0 5px 0 #ffdf99}
.cl-letter.is-solved{background:#e8fff4;border-color:#7fd8ad;color:#148961;box-shadow:0 4px 0 #cff2e1}
.cl-letter.is-incorrect{background:#fff0f0;border-color:#e9a2a8;color:#aa5366;box-shadow:0 4px 0 #ffe0e3}
.cl-stage-help{z-index:1;margin:0;font-size:13px;font-weight:700;color:#8491b3;text-align:center}
.cl-clue{display:flex;align-items:center;gap:16px;flex:none;min-height:87px;padding:14px 20px;border-radius:19px;border:1px solid #f3e5cb;background:linear-gradient(110deg,#fff7df,#fffdf6)}
.cl-clue-icon{display:grid;place-items:center;width:48px;height:48px;flex:none;border-radius:15px;background:#ffe9a9;color:#bc8b2a;font:900 26px Nunito,sans-serif}
.cl-clue p{margin:4px 0 0;color:#5e5886;font:900 clamp(17px,2.1vw,24px)/1.2 Nunito,sans-serif;overflow-wrap:anywhere}
.cl-feedback{display:flex;align-items:center;justify-content:center;gap:12px;flex:none;min-height:70px;padding:10px 15px;border:1px solid #e1e8fa;border-radius:16px;background:#f6f8ff;color:#6375a1;font-size:15px;font-weight:800;text-align:center}
.cl-feedback-symbol{flex:none;font-size:25px;color:#ac91e7}
.cl-feedback.is-correct{border-color:#baefd6;background:#f0fff6;color:#188664}
.cl-feedback.is-wrong{border-color:#f6d6d4;background:#fff5f2;color:#b8565f}
.cl-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding-top:8px;border-top:1px solid #edf0fa}
.cl-hint{color:#9b6b15;border-color:#f1d797;background:#fff8e5;box-shadow:0 3px 0 #faedcf}
.cl-hint:hover:not(:disabled){background:#fff0c7}
.cl-dialog{position:relative;isolation:isolate;width:min(440px,calc(100vw - 30px));max-height:calc(100dvh - 34px);overflow-y:auto;border-radius:25px;border:1px solid #e1e4fa;padding:30px 24px;background:linear-gradient(150deg,#fff,#f7f7ff);box-shadow:0 35px 90px #20285860;text-align:center;color:#2b376b}
/* Celebration is contained within the existing results dialog. */
.cl-confetti{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;border-radius:inherit}
.cl-dialog > :not(.cl-confetti){position:relative;z-index:1}
.cl-confetti-piece{position:absolute;left:var(--x);top:-16px;width:9px;height:15px;border-radius:2px;background:hsl(var(--hue) 86% 60%);opacity:0;animation:cl-fall var(--duration) var(--delay) ease-in forwards}
@keyframes cl-fall{0%{opacity:0;transform:translate3d(0,-8px,0) rotate(0)}9%{opacity:1}80%{opacity:1}100%{opacity:0;transform:translate3d(var(--drift),410px,0) rotate(var(--spin))}}
.cl-dialog::backdrop{background:#151b3baa;backdrop-filter:blur(4px)}
.cl-dialog-star{display:grid;place-items:center;margin:auto;width:65px;height:65px;background:#fff0c7;color:#e0a34f;border-radius:20px;font-size:33px}
.cl-dialog h2{margin:17px 0 8px;font:900 26px Nunito,sans-serif}
.cl-dialog p{margin:8px 0 20px;font-size:14px;line-height:1.55;color:#7583a6;font-weight:700}
.cl-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.cl-results>div{display:flex;flex-direction:column;gap:5px;border-radius:14px;padding:13px 5px;background:#eff0ff}
.cl-results strong{font-size:29px;color:#6a68c8}
.cl-results span{font-size:12px;color:#7983b2;font-weight:800}
.cl-dialog-actions{display:flex;gap:12px;margin-top:23px}
.cl-dialog-actions button{flex:1;padding-inline:10px}
.cl-designer{position:fixed;right:10px;bottom:7px;z-index:9;padding:4px 10px;border-radius:99px;background:#ffffffde;border:1px solid #d8def3;color:#8a92ac;text-decoration:none;font:700 10px 'DM Sans',sans-serif}
.cl-designer:hover{color:#746ee5}
.games-header .games-header-name{font:900 clamp(14px,2.2vw,27px)/1.15 Nunito,sans-serif;letter-spacing:-.045em;}
@media(max-width:700px){
 .cl-main{padding:0 7px}.cl-panel{border-radius:18px}.cl-menu-panel,.cl-game-panel{padding:13px;gap:10px}
.cl-select{padding:10px}.cl-unit{min-height:51px;padding:6px 9px;gap:8px}.cl-unit strong{width:40px;height:37px;font-size:18px}.cl-unit span{font-size:14px}
 .cl-letter{width:clamp(33px,8vw,46px);height:clamp(43px,10vw,55px);font-size:clamp(20px,6vw,27px)}.cl-word-stage{min-height:150px;gap:12px}
 .cl-clue{min-height:75px;padding:9px 13px}.cl-clue-icon{width:40px;height:40px}.cl-feedback{min-height:62px;font-size:13px}.cl-primary,.cl-secondary{min-height:46px;font-size:13px;padding:10px 14px}
}
@media(max-width:450px){
.cl-overline{font-size:10px}
 .cl-menu-fields{grid-template-columns:1fr}.cl-select select{min-height:41px;font-size:13px}.cl-unit-list{grid-template-columns:1fr;gap:6px}.cl-menu-footer{flex-wrap:wrap}.cl-menu-footer .cl-primary{width:100%}.cl-meaning-selector{width:100%;justify-content:space-between;font-size:13px}
 .cl-topline h2{font-size:21px}.cl-score{padding:7px 10px}.cl-score strong{font-size:16px}.cl-stage-label{font-size:10px}.cl-stage-help{font-size:11px}.cl-clue p{font-size:18px}
 .cl-dialog-actions{gap:8px}.cl-dialog-actions button{font-size:13px}
}
@media(max-height:650px){.cl-word-stage{min-height:128px}.cl-menu-panel{gap:9px}}
@media(prefers-reduced-motion:reduce){.cl-primary,.cl-secondary,.cl-unit,.cl-progress span{transition:none}.cl-confetti-piece{animation:none;display:none}}


/* Mobile accessibility: keep controls and content reachable. */
@media (max-width: 800px), (max-height: 570px) {
  body { min-height: 0; height: var(--exercise-visible-height, 100dvh); }
  .cl-menu-panel { overflow-y: auto; }
  .cl-menu-panel > :not(.cl-unit-list) { flex-shrink: 0; }
  .cl-unit-list { min-height: 96px; }
  .cl-select select { font-size: 16px; min-height: 44px; }
  .cl-game-panel { justify-content: flex-start; scroll-padding-block: 12px; }
  .cl-game-panel > * { flex-shrink: 0; }
  .cl-game-panel { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}
@media (max-height: 570px), (max-width: 480px) {
  .cl-menu-panel { gap: 8px; }
}


/* Mobile accessibility: keep controls and content reachable. */
@media (max-width: 800px), (max-height: 570px) {
  .cl-word-stage { flex: 1 0 auto; min-height: 130px; overflow: visible; padding: 12px 8px; }
  .cl-actions { flex-wrap: wrap; gap: 7px; }
  .cl-actions button { flex: 1 1 auto; min-height: 44px; }
  .cl-meaning-selector select { font-size: 16px; }
}
