:root {
  --ink: #211346;
  --violet: #56378e;
  --paper: #fff5d8;
  --gold: #ffcb3d;
  --orange: #f47a25;
  --green: #69a940;
  --lane-h: 20%;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  color: #fff7df;
  background: #17102f;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 1040px; height: 100%; min-height: 690px; margin: 0; overflow: hidden; }
body { background: radial-gradient(circle at 50% 15%, #5a4389, #1b1239 62%); }
button { font: inherit; }

.app { height: 100vh; display: flex; flex-direction: column; padding: 12px; gap: 10px; }
.topbar {
  height: 76px; flex: 0 0 76px; display: grid; grid-template-columns: 300px 1fr auto; align-items: center;
  border: 2px solid #9c75bb; border-radius: 20px; padding: 8px 16px;
  background: linear-gradient(180deg, rgba(72,48,119,.98), rgba(39,26,78,.98));
  box-shadow: 0 8px 24px #10092399, inset 0 1px #d9bdf877;
}
.brand { display: flex; gap: 10px; align-items: center; text-shadow: 0 3px #5a230e; }
.brand-book { display: grid; place-items: center; width: 47px; height: 48px; color: #ffdd63; background: #df6327; border: 3px solid #ffc94d; border-radius: 9px 16px 16px 9px; transform: rotate(-5deg); box-shadow: inset 5px 0 #8b341d; }
.brand strong { display: block; font-family: Georgia, serif; letter-spacing: 1px; font-size: 26px; color: #ffcf42; -webkit-text-stroke: 1px #73320f; }
.brand small { display: block; margin-top: -2px; color: #dfccff; letter-spacing: .6px; }
.mission { justify-self: center; width: min(430px, 90%); text-align: center; }
.mission span { color: #cbb8ed; font-size: 11px; font-weight: 900; letter-spacing: 1.4px; }
.mission b { display: block; font-family: Georgia, serif; font-size: 18px; margin: 2px 0 6px; }
.progress { height: 8px; padding: 2px; background: #1a1238; border-radius: 10px; box-shadow: inset 0 1px 4px #000; }
.progress i { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ff9c2e,#ffe666); transition: width .4s; box-shadow: 0 0 8px #ffc548; }
.stats { display: flex; gap: 8px; align-items: center; }
.stat, .round-btn { height: 44px; border: 1px solid #9574bc; border-radius: 13px; background: #2a1b50; color: white; box-shadow: inset 0 1px #ffffff20, 0 3px 8px #120a2a; }
.stat { min-width: 72px; display: flex; gap: 7px; align-items: center; justify-content: center; padding: 0 10px; }
.stat span { color: #ffd34e; font-size: 17px; }.stat.ink span { color: #62ddff; }.stat:nth-child(3) span { color: #ff6b7c; }
.round-btn { width: 44px; cursor: pointer; font-weight: 900; font-size: 18px; }.round-btn:hover { background: #493276; }

.play-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 178px minmax(650px,1fr) 238px; gap: 10px; }
.defender-panel, .quiz-panel { background: linear-gradient(180deg,#35225f,#201542); border: 2px solid #7c5aa5; border-radius: 20px; padding: 10px; box-shadow: 0 10px 30px #10082088, inset 0 1px #ffffff20; overflow: hidden; }
.panel-title { padding: 2px 5px 8px; }.panel-title span { display:block; font-family: Georgia,serif; font-weight: 900; font-size: 18px; }.panel-title small { color:#bfa9df; }
.defender-card { position: relative; width: 100%; height: 126px; margin-bottom: 8px; padding: 0; overflow: hidden; border: 2px solid #8667ad; border-radius: 15px; background: linear-gradient(145deg,#67413a,#3b284f); color: white; cursor: pointer; box-shadow: inset 0 0 25px #f28f3c22,0 4px 8px #140b2b; transition:.15s; }
.defender-card:hover { transform: translateY(-2px); border-color:#ffce52; }.defender-card.selected { border-color:#ffdc59; box-shadow:0 0 0 3px #ffbd2744,inset 0 0 25px #f28f3c44; }
.defender-card img { width: 92px; height: 82px; object-fit: contain; position:absolute; left: -4px; top:12px; filter: drop-shadow(0 4px 4px #0008); }
.defender-card.blue img { filter: hue-rotate(125deg) saturate(.9) drop-shadow(0 4px 4px #0008); }.defender-card.green img { filter: hue-rotate(55deg) saturate(.8) drop-shadow(0 4px 4px #0008); }
.card-cost { position:absolute; right:7px; top:7px; z-index:2; padding:3px 6px; border-radius:8px; color:#80e7ff; background:#211744; font-weight:900; font-size:12px; }
.card-copy { position:absolute; bottom:7px; right:7px; left:67px; padding:5px 3px 5px 9px; border-radius:9px; background:#24163dcc; text-align:left; }.card-copy b,.card-copy small {display:block}.card-copy b{color:#ffe070}.card-copy small{font-size:10px;color:#d4c5e5}
.defender-card.disabled { opacity:.48; filter:grayscale(.5); }
.tip { display:flex; gap:7px; align-items:center; color:#bfaedf; font-size:11px; line-height:1.3; padding:3px; }.tip span{font-size:22px}.tip p{margin:0}

.board-wrap { min-width:0; display:flex; flex-direction:column; position:relative; }
.board { position:relative; flex:1; min-height:0; overflow:hidden; border:3px solid #49306b; border-radius:21px 21px 12px 12px; background:
  radial-gradient(circle at 75% 4%, #ffd685 0 3%, transparent 3.5%),
  linear-gradient(180deg,#5b4e9b 0 20%,#8968a4 21%,#6c8d54 29%,#426a3f 100%);
  box-shadow:inset 0 0 60px #17102f88,0 10px 28px #10082088;
}
.board:before { content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,212,111,.05),transparent 30%),repeating-linear-gradient(0deg,transparent 0 calc(20% - 2px),#183b2888 calc(20% - 2px) 20%);pointer-events:none;z-index:1; }
.board:after { content:"";position:absolute;inset:28% 0 0;background:repeating-linear-gradient(90deg,transparent 0 11%,rgba(255,255,255,.06) 11% 11.4%),repeating-linear-gradient(0deg,#63814c00 0 calc(20% - 6px),#243e2acc calc(20% - 6px) 20%);pointer-events:none;z-index:1; }
.moon {position:absolute;right:11%;top:5%;width:46px;height:46px;border-radius:50%;background:#ffe39b;box-shadow:0 0 25px #ffe99d;opacity:.85}
.school-base {position:absolute;left:-7px;top:15%;bottom:0;width:72px;background:linear-gradient(90deg,#513136,#9e563c);border-right:4px solid #e2a14c;z-index:2;box-shadow:7px 0 20px #1b1328aa;text-align:center}.school-base:before{content:"";position:absolute;left:-16px;right:-8px;top:-40px;height:70px;background:#4a214a;clip-path:polygon(50% 0,100% 65%,82% 65%,82% 100%,15% 100%,15% 65%,0 65%)}.school-base .tower{position:relative;margin:28px auto 0;width:42px;height:55px;display:grid;place-items:center;border-radius:20px 20px 4px 4px;background:#ffd66c;color:#6a2d30;font:bold 24px Georgia;box-shadow:0 0 18px #ffd261}.school-base span{position:absolute;bottom:16px;left:0;right:0;transform:rotate(-90deg);font-size:10px;letter-spacing:2px;color:#ffd99c}
.spawn-sign { position:absolute;right:6px;top:42%;z-index:2;transform:rotate(5deg);padding:7px 9px;background:#74472e;border:3px solid #b77b41;border-radius:4px;color:#ffe4a6;text-align:center;font:900 11px Georgia;box-shadow:0 4px 7px #0008 }.spawn-sign small{font:9px sans-serif;color:#d4b4df}
.lane-grid { position:absolute;z-index:3;left:76px;right:48%;top:28%;bottom:0;display:grid;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(5,1fr); }
.grid-cell { margin:4px;border:2px dashed transparent;border-radius:16px;cursor:pointer;transition:.15s;background:rgba(255,255,255,.035);box-shadow:inset 0 0 12px rgba(20,52,30,.12) }.grid-cell:hover {border-color:#ffe98188;background:#fff1a012}.grid-cell.placeable {animation:cellGlow 1s infinite alternate;border-color:#ffe77a77}.grid-cell.occupied{cursor:not-allowed}
@keyframes cellGlow{to{background:#fff5a31f;box-shadow:inset 0 0 16px #ffdd67}}
.units-layer,.effects-layer{position:absolute;inset:0;z-index:5;pointer-events:none}.effects-layer{z-index:8}
.unit { position:absolute;width:88px;height:88px;transform:translate(-50%,-50%);transition:filter .2s;filter:drop-shadow(0 8px 5px #142316aa);pointer-events:auto;cursor:pointer; }
.unit img{width:100%;height:100%;object-fit:contain}.unit.rapid img{filter:hue-rotate(125deg)}.unit.sage img{filter:hue-rotate(55deg)}.unit:after{content:"";position:absolute;left:22%;right:22%;bottom:1px;height:7px;border-radius:50%;background:#0f2c1e66;z-index:-1}.unit.pop{animation:pop .3s}.unit.hit{animation:shake .22s}
.enemy { position:absolute;width:112px;height:108px;transform:translate(-50%,-50%);pointer-events:auto;cursor:crosshair;filter:drop-shadow(0 7px 5px #10102499); }
.enemy img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.enemy-word{position:absolute;left:15%;right:16%;top:4%;height:26%;display:grid;place-items:center;color:#262044;font:900 14px Georgia;letter-spacing:1px;transform:rotate(-1deg);text-transform:uppercase}.enemy.selected{filter:drop-shadow(0 0 12px #ffe75d) drop-shadow(0 7px 5px #10102499)}.enemy.selected:before{content:"";position:absolute;inset:-5px;border:3px solid #ffe75d;border-radius:50%;animation:target 1s infinite;z-index:-1}.enemy .hp{position:absolute;left:17%;right:15%;bottom:0;height:7px;padding:1px;background:#24143c;border-radius:6px}.enemy .hp i{display:block;height:100%;border-radius:5px;background:linear-gradient(90deg,#6fd74c,#d9ef62);transition:width .2s}
.projectile { position:absolute;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;color:#6a3500;background:radial-gradient(circle,#fffbd2 8%,#ffd229 42%,#ef7b14 68%);font:900 20px Georgia;box-shadow:0 0 16px #ffd739,0 0 3px 2px #fff;transform:translate(-50%,-50%); }
.impact { position:absolute;width:20px;height:20px;border-radius:50%;transform:translate(-50%,-50%);animation:impact .45s forwards;background:#fff8b5;box-shadow:0 0 35px 15px #ffbd2e; }
.floating {position:absolute;z-index:20;transform:translate(-50%,-50%);font:900 24px Georgia;color:#ffe865;text-shadow:0 2px 3px #512812;animation:floatUp 1s forwards}.floating.bad{color:#ff8d9e}.floating.good{color:#9cff7f}
.wave-banner{position:absolute;z-index:20;left:50%;top:24px;transform:translateX(-50%) scale(.7);opacity:0;padding:12px 35px;border:3px solid #ffd450;border-radius:13px;background:#442469;color:#ffe568;font:900 28px Georgia;box-shadow:0 7px 20px #1a102f;pointer-events:none}.wave-banner.show{animation:banner 1.8s}
.bottom-strip {height:35px;flex:0 0 35px;display:flex;align-items:center;justify-content:center;gap:20px;background:#231743;border:2px solid #62468c;border-top:0;border-radius:0 0 14px 14px;color:#cbbce0;font-size:10px}.bottom-strip b{color:#ffe179}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px}.dot.good{background:#79d753}.dot.gold{background:#ffd041}

.quiz-panel {display:flex;flex-direction:column;gap:10px}.streak{height:38px;flex:0 0 38px;border-radius:11px;background:#221643;border:1px solid #71549b;display:flex;align-items:center;justify-content:center;gap:8px}.streak span{font-size:11px;color:#baa7d6;letter-spacing:1px}.streak b{font-size:22px;color:#ffe369}.streak i{color:#ffcf37;font-style:normal}.quiz-card{position:relative;padding:13px 11px 15px;border:3px solid #c68a46;border-radius:14px;background:linear-gradient(#fff8dc,#eadbb2);color:#2d2042;box-shadow:0 5px 12px #10091f,inset 0 0 18px #aa724633;transform:rotate(.5deg)}.quiz-card:before{content:"";position:absolute;inset:6px;border:1px dashed #b78a60;border-radius:9px;pointer-events:none}.quiz-kicker{position:relative;text-align:center;font:900 12px Georgia;color:#8a3a26;letter-spacing:.7px}.notebook-word{position:relative;margin:13px 0 6px;padding:12px 3px;text-align:center;font:900 29px Georgia;letter-spacing:3px;background:repeating-linear-gradient(180deg,#fffdf1 0 21px,#b9d2e2 22px);border-radius:5px;box-shadow:0 2px 5px #553b2144}.quiz-card p{position:relative;min-height:44px;text-align:center;font-size:11px;line-height:1.3;color:#675974}.answer-grid{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:8px}.answer-grid button{height:50px;border:2px solid #c37c32;border-radius:12px;background:linear-gradient(#ffd65a,#f1a82c);color:#552818;font:900 26px Georgia;cursor:pointer;box-shadow:0 4px #9b5524}.answer-grid button:hover{transform:translateY(-2px);filter:brightness(1.1)}.answer-grid button:active{transform:translateY(2px);box-shadow:0 2px #9b5524}.answer-grid button.correct{background:#79d94f;border-color:#407d2a}.answer-grid button.wrong{background:#ec6b69;border-color:#943d49}.answer-grid button:disabled{cursor:not-allowed}.teacher-note{display:flex;gap:8px;align-items:center;padding:9px;border-radius:13px;background:#2a1a4d;border:1px solid #6f4d99}.owl{font-size:34px}.teacher-note p{margin:0}.teacher-note b,.teacher-note span{display:block}.teacher-note b{color:#ffdf65;font-size:12px}.teacher-note span{font-size:10px;line-height:1.25;color:#c8b8dd;margin-top:3px}.mini-goal{margin-top:auto;padding:11px;border-radius:12px;background:#1b1238;border:1px solid #614388;display:flex;justify-content:space-between;align-items:center}.mini-goal span{color:#bba7d9;font-size:11px}.mini-goal b{color:#ffe270}.mini-goal i{font-style:normal;color:#8fe468}

.overlay { position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:28px;background:#130d2bdc;backdrop-filter:blur(6px);opacity:0;visibility:hidden;transition:.25s }.overlay.visible{opacity:1;visibility:visible}.start-card{width:min(1040px,94vw);height:min(620px,88vh);display:grid;grid-template-columns:57% 43%;overflow:hidden;border:3px solid #a675c8;border-radius:28px;background:#2b1b50;box-shadow:0 28px 80px #090518, inset 0 1px #fff3}.start-art{background:linear-gradient(90deg,transparent 65%,#2b1b50 100%),linear-gradient(0deg,#2b1b5044,transparent 45%),url("assets/concept.png") center/cover}.start-content{padding:42px 42px 30px;display:flex;flex-direction:column;justify-content:center}.eyebrow{font-weight:900;letter-spacing:1.6px;font-size:11px;color:#7de1ff}.start-content h1{font:900 43px/1.03 Georgia;margin:10px 0 15px;color:#fff6dd}.start-content h1 em{font-style:normal;color:#ffd449;text-shadow:0 3px #862f21}.start-content>p{color:#d0bfe7;line-height:1.5;margin:0 0 15px}.start-content ul{list-style:none;margin:0 0 20px;padding:0;display:grid;gap:7px}.start-content li{font-size:13px}.start-content li span{display:inline-grid;place-items:center;width:23px;height:23px;margin-right:7px;border-radius:50%;background:#68479a;color:#ffe368;font-weight:900}.primary-btn{min-height:54px;border:2px solid #ffe26b;border-radius:14px;background:linear-gradient(#ffcf45,#ec8e22);color:#542514;font:900 16px Georgia;letter-spacing:.5px;cursor:pointer;box-shadow:0 6px #953f1d,0 10px 20px #12091f}.primary-btn:hover{filter:brightness(1.08);transform:translateY(-1px)}.primary-btn:active{transform:translateY(3px);box-shadow:0 3px #953f1d}.primary-btn span{margin-left:8px}.start-content>small{text-align:center;margin-top:14px;color:#967eb9;font-size:10px}.result-card{width:410px;padding:40px;text-align:center;border:3px solid #9c72c0;border-radius:25px;background:linear-gradient(#493072,#251747);box-shadow:0 25px 70px #090518}.result-stars{font-size:45px;letter-spacing:8px;color:#ffd54d;text-shadow:0 4px #8d3b22}.result-card h2{font:900 34px Georgia;margin:10px 0;color:#fff5d8}.result-card p{color:#cdbce2}.result-score{margin:20px 0;padding:13px;border-radius:13px;background:#1d1239}.result-score span,.result-score b{display:block}.result-score span{font-size:11px;color:#aa95cb}.result-score b{font-size:34px;color:#ffe15a}

@keyframes pop{0%{transform:translate(-50%,-50%) scale(.3)}80%{transform:translate(-50%,-50%) scale(1.15)}100%{transform:translate(-50%,-50%) scale(1)}}
@keyframes shake{25%{margin-left:-5px}75%{margin-left:5px}}
@keyframes target{50%{transform:scale(1.08);opacity:.45}}
@keyframes impact{to{transform:translate(-50%,-50%) scale(4);opacity:0}}
@keyframes floatUp{to{transform:translate(-50%,-130%);opacity:0}}
@keyframes banner{0%{opacity:0;transform:translateX(-50%) scale(.7)}15%,70%{opacity:1;transform:translateX(-50%) scale(1)}100%{opacity:0;transform:translateX(-50%) scale(1.2)}}
@keyframes streakPulse{50%{transform:scale(1.06)}}

/* Version 2: lesson map, saved progress and richer results. */
.start-content{padding:28px 34px 24px}
.start-content h1{font-size:39px;margin:7px 0 10px}
.start-content>p{line-height:1.35;margin-bottom:12px;font-size:13px}
.lesson-list{display:grid;gap:7px;margin-bottom:14px}
.lesson-card{min-height:61px;width:100%;display:grid;grid-template-columns:38px 1fr auto;gap:9px;align-items:center;padding:7px 10px;border:2px solid #6f50a0;border-radius:13px;background:#211540;color:#fff;text-align:left;cursor:pointer;box-shadow:inset 0 1px #ffffff15;transition:.15s}
.lesson-card:hover{transform:translateX(3px);border-color:#b995df}
.lesson-card.selected{border-color:#ffcf50;background:linear-gradient(90deg,#50306f,#2a194d);box-shadow:0 0 0 3px #f3b93422,inset 0 0 22px #ffbd3420}
.lesson-num{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#654094;color:#ffe46e;font:900 19px Georgia}
.lesson-card.selected .lesson-num{background:#d86729;color:#fff4bc}
.lesson-card b,.lesson-card small{display:block}
.lesson-card b{font-size:13px;color:#fff3d4}
.lesson-card small{margin-top:2px;font-size:10px;color:#ad99cb}
.lesson-card i{min-width:58px;color:#ffd657;font-size:13px;font-style:normal;text-align:right;letter-spacing:1px}
.start-content .primary-btn{min-height:50px}
.start-content>small{margin-top:11px;color:#a993c7;min-height:24px}
.result-card{width:430px;padding:34px 38px}
.result-card h2{margin:8px 0}
.result-card p{margin:8px 0}
.result-score{margin:17px 0 9px;padding:11px}
.result-score b{font-size:32px}
.result-details{display:flex;justify-content:space-between;margin:0 2px 18px;color:#ad99ca;font-size:11px}
.result-details b{color:#fff0b4}
.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:13px}
.result-actions button{height:38px;border:1px solid #7c5aa4;border-radius:10px;background:#21153f;color:#d6c5e9;cursor:pointer}
.result-actions button:hover{background:#3a2561;color:#fff}
.streak.hot{animation:streakPulse .55s;color:#fff;background:linear-gradient(90deg,#7a315d,#7c4a2a);box-shadow:0 0 18px #ffbd45aa}
.streak.hot b{color:#fff0a4}

@media(max-height:760px){.app{padding:7px;gap:6px}.topbar{height:64px;flex-basis:64px}.defender-card{height:103px}.defender-card img{width:75px;height:68px}.play-layout{grid-template-columns:165px minmax(620px,1fr) 220px}.quiz-card{padding:10px}.notebook-word{margin:8px 0 4px;padding:9px;font-size:24px}.answer-grid button{height:42px}.teacher-note{padding:6px}.owl{font-size:27px}}

/* Version 3: hand-painted garden and character art based on the approved reference. */
body{
  background:
    radial-gradient(circle at 50% -10%,rgba(231,139,104,.28),transparent 40%),
    linear-gradient(145deg,#211440,#120c28 70%);
}
.topbar{
  border-color:#c58a48;
  background:
    linear-gradient(180deg,rgba(105,58,41,.98),rgba(55,30,38,.98)),
    repeating-linear-gradient(90deg,transparent 0 90px,#ffffff08 91px 93px);
  box-shadow:0 8px 24px #10092399,inset 0 2px #ffd98b55,inset 0 -4px #1c0d1c66;
}
.brand{padding:3px 13px 3px 6px;border:2px solid #d9a052;border-radius:13px;background:linear-gradient(180deg,#70432f,#432737);box-shadow:inset 0 0 13px #ffb73822,0 3px 8px #180a19}
.brand strong{color:#ffd351;-webkit-text-stroke:1px #67250d}
.mission span{color:#ffd690}.mission b{color:#fff3d6;text-shadow:0 2px #331524}
.stat,.round-btn{border-color:#b67b48;background:linear-gradient(#563440,#2b1b34);box-shadow:inset 0 1px #ffdba733,0 3px 8px #120a22}

.defender-panel,.quiz-panel{
  border-color:#b77b48;
  background:
    linear-gradient(90deg,#ffffff08 1px,transparent 1px) 0 0/42px 100%,
    linear-gradient(180deg,#6d4234,#3d2635 55%,#2d1c32);
  box-shadow:0 10px 30px #10082099,inset 0 2px #ffd79344,inset 0 0 28px #1d0b1c66;
}
.panel-title span{color:#ffe6ac;text-shadow:0 2px #3a1620}.panel-title small{color:#dfb99d}
.defender-card{
  border-color:#d0a063;
  background:
    linear-gradient(90deg,rgba(129,76,44,.18),transparent 35%),
    linear-gradient(145deg,#f2d69d,#bc8655 68%,#72443c);
  box-shadow:inset 0 0 0 3px #70463277,inset 0 0 18px #fff1ae44,0 5px 9px #1a0b1e;
}
.defender-card:hover{border-color:#ffe074;box-shadow:inset 0 0 0 3px #89552f88,inset 0 0 20px #fff0a966,0 0 14px #ffbf4a55}
.defender-card.selected{border-color:#ffe36c;box-shadow:0 0 0 3px #ffbd2755,inset 0 0 0 3px #89552f88,inset 0 0 25px #fff0a966}
.defender-card img{width:112px;height:100px;left:-10px;top:4px;filter:drop-shadow(0 5px 5px #2b162088)}
.defender-card.blue img,.defender-card.green img{filter:drop-shadow(0 5px 5px #2b162088)}
.card-cost{color:#9aecff;background:linear-gradient(#3e2852,#21162f);border:1px solid #bd8e5a}
.card-copy{background:linear-gradient(90deg,#452b36dd,#2a1a32ee);border:1px solid #9a694d}.card-copy b{color:#ffe176}.card-copy small{color:#dec9ba}

.board{
  border-color:#bd8149;
  background:#48623d url("assets/board-garden-v2.png") center center/cover no-repeat;
  box-shadow:inset 0 0 42px #15102288,0 10px 28px #100820aa,0 0 0 2px #4c2a32;
}
.board:before{display:none}.board:after{display:none}
.school-base,.moon{display:none}
.spawn-sign{top:42%;right:5px;background:linear-gradient(#74452f,#412638);border-color:#d39b54;color:#ffe6a8;box-shadow:0 4px 7px #0008,0 0 12px #ffbd4933}
.lane-grid{left:5.8%;right:50%;top:29%;bottom:2.5%}
.grid-cell{margin:3px;border-radius:13px;background:rgba(255,245,179,.025);box-shadow:inset 0 0 10px rgba(22,48,25,.16)}
.grid-cell:hover{border-color:#ffe981aa;background:#fff1a01d;box-shadow:inset 0 0 16px #ffe56c33}
.bottom-strip{background:linear-gradient(#4e3038,#2b1b32);border-color:#9b6445;color:#dcc4b1;box-shadow:inset 0 1px #ffd98b33}.bottom-strip b{color:#ffe078}

.unit{width:148px;height:138px;filter:drop-shadow(0 8px 5px #142316aa)}
.unit img{filter:none}.unit.rapid{width:160px;height:134px}.unit.sage{width:150px;height:140px}
.unit.rapid img,.unit.sage img{filter:none}
.enemy{width:136px;height:128px;filter:drop-shadow(0 8px 6px #111020aa)}
.enemy-word{top:5%;font-size:15px;color:#241a38;text-shadow:0 1px #fff}
.projectile{border:2px solid #fff6b0;background:radial-gradient(circle,#fffbd2 8%,#ffd229 42%,#ed6f13 70%);box-shadow:0 0 19px #ffd739,0 0 4px 2px #fff}

.quiz-card{border-color:#d39449;background:linear-gradient(#fff8dc,#e8d2a2);box-shadow:0 5px 12px #16091f,inset 0 0 24px #aa724644,0 0 0 2px #5f382d}
.streak{border-color:#bb7d4a;background:linear-gradient(#53313d,#2c1b34)}
.teacher-note,.mini-goal{border-color:#9f6949;background:linear-gradient(#4b2e3a,#271830)}
.quiz-kicker{color:#7f321f}.answer-grid button{border-color:#d48630;background:linear-gradient(#ffdc66,#f0a12a);box-shadow:0 4px #8f4723,0 0 8px #ffcf5533}

@media(max-height:760px){
  .defender-card img{width:94px;height:82px;top:2px}
  .unit{width:124px;height:116px}.unit.rapid{width:136px;height:114px}.unit.sage{width:128px;height:118px}
  .enemy{width:118px;height:112px}
}

/* Version 4: readable labels and character animation system. */
.card-copy{
  left:62px;
  right:5px;
  bottom:6px;
  min-height:47px;
  padding:6px 4px 5px 8px;
  overflow:hidden;
}
.card-copy b{
  max-width:100%;
  font-size:12px;
  line-height:1.05;
  letter-spacing:-.35px;
  white-space:normal;
  overflow-wrap:normal;
}
.card-copy small{
  margin-top:3px;
  font-size:9px;
  line-height:1.05;
}
.defender-card img{animation:cardFloat 2.4s ease-in-out infinite;transform-origin:50% 85%}
.defender-card.blue img{animation-delay:-.7s}.defender-card.green img{animation-delay:-1.4s}

.enemy-word{
  z-index:3;
  display:flex;
  align-items:center;
  justify-content:center;
  left:21%;
  right:21%;
  top:27%;
  height:22%;
  padding:0 2px;
  overflow:hidden;
  border:0;
  border-radius:0;
  background:none;
  color:#17224b;
  font-size:17px;
  line-height:1;
  letter-spacing:.35px;
  text-shadow:0 1px 0 #fff,0 0 2px #fff,1px 0 #fff,-1px 0 #fff;
  box-shadow:none;
  transform:rotate(-1.5deg);
  clip-path:none;
  white-space:nowrap;
}
.enemy-word span,.enemy-word em{display:inline-block}
.enemy-word .missing-letter{color:#cf2d2d;font-style:normal;font-size:1.08em;margin:0 1px;text-shadow:0 1px #fff,0 0 2px #fff}
.enemy-word.compact{font-size:12.5px;letter-spacing:0}

.unit:not(.pop):not(.hit) img{animation:defenderIdle 1.8s ease-in-out infinite;transform-origin:50% 85%}
.unit.rapid:not(.pop):not(.hit) img{animation-duration:1.25s}
.unit.sage:not(.pop):not(.hit) img{animation-duration:2.1s}
.unit.hit{animation:defenderCast .28s ease-out}
.enemy.spawn{animation:enemySpawn .44s cubic-bezier(.2,.85,.3,1.25)}
.enemy:not(.spawn):not(.hit):not(.defeated):not(.escaped){animation:enemyWalk .72s ease-in-out infinite alternate;transform-origin:50% 82%}
.enemy.hit{animation:enemyHit .24s ease-out}
.enemy.defeated{animation:enemyDefeat .44s cubic-bezier(.4,0,.8,.2) forwards;pointer-events:none}
.enemy.escaped{animation:enemyEscape .26s ease-in forwards;pointer-events:none}
.enemy.selected .enemy-word{filter:drop-shadow(0 0 5px #ffe75d)}
.projectile{animation:glyphSpin .46s linear infinite}
.projectile:after{content:"";position:absolute;right:72%;top:43%;width:24px;height:5px;border-radius:50%;background:linear-gradient(90deg,transparent,#fff7a6);filter:blur(2px);opacity:.8;z-index:-1}
.impact{animation:impact .45s forwards,impactTwist .45s ease-out}
.app.paused *{animation-play-state:paused!important}

@keyframes cardFloat{
  0%,100%{transform:translateY(0) rotate(-1deg)}
  50%{transform:translateY(-4px) rotate(1deg)}
}
@keyframes defenderIdle{
  0%,100%{transform:translateY(0) rotate(-1.5deg) scale(1)}
  50%{transform:translateY(-5px) rotate(1.5deg) scale(1.025)}
}
@keyframes defenderCast{
  0%{transform:translate(-50%,-50%) scale(1) rotate(0)}
  38%{transform:translate(-50%,-50%) scale(.93,1.08) rotate(-5deg)}
  72%{transform:translate(-50%,-50%) scale(1.1,.94) rotate(4deg)}
  100%{transform:translate(-50%,-50%) scale(1) rotate(0)}
}
@keyframes enemySpawn{
  0%{transform:translate(-50%,-50%) scale(.2) rotate(18deg);opacity:0}
  75%{transform:translate(-50%,-50%) scale(1.12) rotate(-4deg);opacity:1}
  100%{transform:translate(-50%,-50%) scale(1) rotate(0)}
}
@keyframes enemyWalk{
  from{transform:translate(-50%,-50%) translateY(1px) rotate(-2.5deg) scale(1,.97)}
  to{transform:translate(-50%,-50%) translateY(-3px) rotate(2.5deg) scale(.98,1.03)}
}
@keyframes enemyHit{
  0%{transform:translate(-50%,-50%) translateX(0);filter:brightness(1)}
  30%{transform:translate(-50%,-50%) translateX(10px) rotate(7deg);filter:brightness(1.8)}
  65%{transform:translate(-50%,-50%) translateX(-7px) rotate(-5deg)}
  100%{transform:translate(-50%,-50%) translateX(0);filter:brightness(1)}
}
@keyframes enemyDefeat{
  0%{transform:translate(-50%,-50%) scale(1);opacity:1;filter:saturate(1)}
  35%{transform:translate(-50%,-50%) scale(1.18,.72) rotate(-7deg);filter:saturate(1.6) brightness(1.35)}
  100%{transform:translate(-50%,-50%) scale(.08,1.35) rotate(24deg);opacity:0;filter:saturate(2) brightness(1.8)}
}
@keyframes enemyEscape{
  to{transform:translate(-90%,-50%) scale(.7);opacity:0}
}
@keyframes glyphSpin{
  from{transform:translate(-50%,-50%) rotate(0) scale(1)}
  50%{transform:translate(-50%,-50%) rotate(180deg) scale(1.14)}
  to{transform:translate(-50%,-50%) rotate(360deg) scale(1)}
}
@keyframes impactTwist{
  to{filter:hue-rotate(50deg)}
}

@media(max-height:760px){
  .card-copy{left:56px;min-height:42px;padding-left:7px}
  .card-copy b{font-size:11px}.card-copy small{font-size:8px}
  .enemy-word{left:20%;right:20%;top:27%;height:22%;font-size:15px}.enemy-word.compact{font-size:11px}
}
@media(prefers-reduced-motion:reduce){
  .defender-card img,.unit img,.enemy,.enemy img,.projectile{animation:none!important}
}

/* Version 5: complete first lesson loop, tutorial and mistake review. */
[hidden]{display:none!important}
.topbar{grid-template-columns:280px minmax(210px,1fr) auto}
.stats{gap:6px}.stat{min-width:62px;padding:0 8px}.round-btn{width:40px}.speed-btn{font-size:14px}
.round-btn.active{border-color:#ffe16c;background:linear-gradient(#8a552d,#4d2935);color:#ffe575;box-shadow:0 0 12px #ffc94b66,inset 0 1px #fff4}

.unit-actions{margin:0 0 8px;padding:8px;border:1px solid #d6a55f;border-radius:12px;background:linear-gradient(#3b2537,#24172f);box-shadow:inset 0 1px #ffe8a833}
.unit-actions>span{display:block;margin-bottom:6px;color:#d8c2b3;font-size:9px}.unit-actions>span b{color:#ffe172;font-size:11px}
.unit-actions>div{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.unit-actions button{min-height:34px;padding:4px;border:1px solid #a9744e;border-radius:8px;background:#593443;color:#f5dfc9;font-size:8px;font-weight:900;cursor:pointer}
.unit-actions button:hover,.unit-actions button.active{border-color:#ffe06a;background:#80502e;color:#fff3bd}.unit-actions i{font-style:normal;color:#8feaff}
.unit.selected-unit{filter:drop-shadow(0 0 10px #ffe36c) drop-shadow(0 8px 5px #142316aa)}
.unit.selected-unit:before{content:"";position:absolute;inset:6%;z-index:-1;border:3px dashed #ffe368;border-radius:50%;animation:target 1s infinite}
.unit.removed{animation:unitRemove .25s ease-in forwards!important;pointer-events:none}
.grid-cell.placeable{border-style:solid;background:#fff5a326;box-shadow:inset 0 0 18px #ffdd67,0 0 8px #ffe36944}

.explanation-card{position:relative;padding:9px 10px;border:1px solid #d19b5b;border-radius:12px;background:linear-gradient(145deg,#fff3c5,#d9bc87);color:#422637;box-shadow:0 4px 9px #160a1d88}
.explanation-card>span{display:inline-block;margin-bottom:4px;padding:2px 5px;border-radius:5px;background:#7b3f2e;color:#fff0bf;font-size:8px;font-weight:900;letter-spacing:.6px}
.explanation-card>b{display:block;color:#28204b;font:900 14px Georgia}.explanation-card>p{margin:3px 0 0;color:#654e52;font-size:9px;line-height:1.25}
.explanation-card[data-tone="good"]{border-color:#76b653;background:linear-gradient(145deg,#ecf8bd,#c8d991)}
.explanation-card[data-tone="good"]>span{background:#4f8738}
.explanation-card[data-tone="bad"]{animation:explainIn .28s ease-out}

.lesson-difficulty{min-height:24px;margin:10px 0 -2px;padding:6px 9px;border:1px solid #71519b;border-radius:9px;background:#21163c;color:#cbb7dd;text-align:center;font-size:9px}
.hard-words{margin:11px 0;padding:9px;border:1px solid #76549a;border-radius:11px;background:#1d1238;text-align:left}
.hard-words>span{display:block;margin-bottom:6px;color:#bda8d8;font-size:9px;font-weight:900;letter-spacing:.7px;text-transform:uppercase}
.hard-words>p{margin:0;color:#9be07d;font-size:11px;text-align:center}
.hard-words>div{display:flex;flex-wrap:wrap;gap:5px}.hard-words b{padding:5px 7px;border-radius:7px;background:#55304e;color:#ffe6b0;font-size:10px}.hard-words i{display:inline-grid;place-items:center;width:16px;height:16px;margin-left:5px;border-radius:50%;background:#b84d48;color:white;font-style:normal;font-size:8px}
.review-btn{width:100%;min-height:38px;margin:0 0 10px;border:1px solid #80c7de;border-radius:10px;background:linear-gradient(#31536d,#25324f);color:#aeeeff;font-size:10px;font-weight:900;cursor:pointer}.review-btn:hover{filter:brightness(1.16)}
.result-card{max-height:92vh;overflow:auto;padding:27px 34px}.result-card h2{font-size:30px}.result-stars{font-size:39px}.result-score{margin:11px 0 8px}.result-details{margin-bottom:11px}

.pause-overlay{z-index:120;background:#130d2bb8}.pause-card,.tutorial-card{width:min(390px,92vw);padding:34px;text-align:center;border:3px solid #c38a4c;border-radius:24px;background:linear-gradient(#503343,#261833);box-shadow:0 24px 65px #090518,inset 0 1px #ffe5a755}
.pause-card>span{display:grid;place-items:center;width:66px;height:66px;margin:0 auto 10px;border:3px solid #ffe26d;border-radius:50%;background:#2c1c38;color:#ffe36b;font:900 28px Georgia}
.pause-card h2,.tutorial-card h2{margin:7px 0;color:#fff3d4;font:900 29px Georgia}.pause-card p,.tutorial-card p{margin:7px 0 22px;color:#ccb9d4;line-height:1.45}
.quiet-btn{width:100%;margin-top:14px;border:0;background:transparent;color:#baa5ca;font-size:10px;text-decoration:underline;cursor:pointer}

.tutorial-overlay{z-index:130;background:#130d2be8}.tutorial-card{width:min(430px,92vw);padding:30px 40px;border-color:#9f76bd;background:linear-gradient(#46306b,#281942)}
.tutorial-visual{display:grid;place-items:center;width:84px;height:84px;margin:0 auto 14px;border:3px solid #efbd4b;border-radius:24px;background:linear-gradient(145deg,#fff1b8,#d48b3f);font-size:43px;box-shadow:0 9px 0 #713a2d,0 16px 25px #100822}
.tutorial-card .eyebrow{display:block;margin-top:20px}.tutorial-card h2{font-size:27px}.tutorial-card p{min-height:62px;margin-bottom:14px}
.tutorial-dots{display:flex;justify-content:center;gap:7px;margin:0 0 18px}.tutorial-dots i{width:8px;height:8px;border-radius:50%;background:#735692}.tutorial-dots i.active{width:22px;border-radius:6px;background:#ffd45b;box-shadow:0 0 8px #ffc94a}

@keyframes unitRemove{to{transform:translate(-50%,-50%) scale(.25) rotate(-18deg);opacity:0;filter:brightness(1.8)}}
@keyframes explainIn{0%{transform:translateX(8px);opacity:0}100%{transform:translateX(0);opacity:1}}

@media(max-height:760px){
  .topbar{grid-template-columns:250px minmax(190px,1fr) auto}.stat{min-width:55px}.round-btn{width:36px;height:38px}.stats{gap:4px}
  .unit-actions{padding:5px;margin-bottom:5px}.unit-actions button{min-height:29px}.tip{font-size:9px}.tip span{font-size:17px}
  .explanation-card{padding:6px 8px}.explanation-card>p{font-size:8px}.result-card{padding:20px 32px}.hard-words{margin:7px 0}
}

/* Version 6: reference-led battlefield composition. */
.play-layout{grid-template-columns:178px minmax(720px,1fr) 158px;gap:8px}
.board-wrap{isolation:isolate}
.board-quiz{position:absolute;z-index:16;top:8px;left:50%;width:min(590px,72%);transform:translateX(-50%);pointer-events:none}
.board-quiz .quiz-card{pointer-events:auto}
.board-quiz .quiz-card{
  width:100%;padding:9px 14px 12px;border:3px solid #9b5b31;border-radius:15px;
  background:linear-gradient(#f7d89a,#c78a4d);color:#2d1730;
  box-shadow:0 7px 0 #4f2a2d,0 12px 24px #150a2299,inset 0 0 0 3px #ffe9b766;
  transform:rotate(-.3deg)
}
.board-quiz .quiz-card:before{inset:5px;border-color:#9d683f;border-radius:10px}
.board-quiz .quiz-kicker{font-size:13px;letter-spacing:1.25px;color:#552119;text-shadow:0 1px #fff0c4}
.word-comparison{position:relative;display:grid;grid-template-columns:minmax(130px,1fr) 36px minmax(130px,1fr);align-items:center;gap:7px;margin:7px 0 3px}
.word-arrow{color:#f2a51e;font:900 29px Georgia;text-align:center;text-shadow:0 2px #6b3318,0 0 5px #fff1a2}
.board-quiz .notebook-word,.corrected-preview{
  min-width:0;height:48px;margin:0;padding:8px 4px;display:grid;place-items:center;overflow:hidden;
  border:1px solid #b8977a;border-radius:3px;background:repeating-linear-gradient(180deg,#fffdf1 0 20px,#c1d7e6 21px);
  color:#17224b;font:900 25px/1 Georgia;letter-spacing:2px;white-space:nowrap;
  box-shadow:0 3px 6px #5d342f66;transform:rotate(-1deg)
}
.corrected-preview{background:linear-gradient(155deg,#f9fcff,#e7f2ff);color:#315aa6;transform:rotate(1deg);border-color:#8baad0}
.corrected-preview.revealed{animation:previewReveal .42s cubic-bezier(.2,.9,.25,1.35)}
.corrected-preview.good{color:#286cae;box-shadow:0 0 13px #7cddff,0 3px 6px #5d342f66}
.corrected-preview.bad{color:#b22e31;box-shadow:0 0 12px #ff8b7c,0 3px 6px #5d342f66}
.board-quiz .quiz-card p{min-height:14px;margin:1px 0 5px;font-size:9px;color:#65433f}
.board-quiz .answer-grid{width:224px;margin:0 auto;gap:9px}
.board-quiz .answer-grid button{height:40px;border-radius:10px;font-size:22px;box-shadow:0 3px #914b24,0 0 10px #ffd56866}

.wave-banner{top:172px}
.quiz-panel{padding:0;background:transparent;border:0;box-shadow:none;overflow:visible;gap:8px}
.quiz-panel .streak{height:62px;flex:0 0 62px;border:3px solid #b8793f;border-radius:13px;background:linear-gradient(#68412f,#392236);box-shadow:0 5px 0 #1c1024,inset 0 0 12px #ffc25f22}
.quiz-panel .streak span{font-size:9px;color:#f0d3b0}.quiz-panel .streak b{font-size:27px}.quiz-panel .streak i{font-size:17px}
.quiz-panel .teacher-note{display:block;padding:10px 8px;text-align:center;border-width:2px;border-color:#a46b42;background:linear-gradient(#583642,#2d1c34)}
.quiz-panel .owl{font-size:31px}.quiz-panel .teacher-note p{margin-top:4px}.quiz-panel .teacher-note b{font-size:10px}.quiz-panel .teacher-note span{font-size:8px;line-height:1.3}
.quiz-panel .explanation-card{padding:8px;text-align:center}.quiz-panel .explanation-card>b{font-size:11px}.quiz-panel .explanation-card>p{font-size:8px}
.quiz-panel .mini-goal{margin-top:0;padding:9px 7px;display:block;text-align:center;border-width:2px;background:linear-gradient(#50323e,#28192f)}
.quiz-panel .mini-goal span{display:block;margin-bottom:3px;font-size:8px}.quiz-panel .mini-goal b{font-size:14px}

.enemy{width:154px;height:145px;filter:drop-shadow(0 8px 6px #111020aa)}
.enemy-word{
  left:16%;right:16%;top:25%;height:25%;padding:0 1px;
  color:#14204b;font-size:19px;letter-spacing:.25px;text-shadow:0 1px #fff,0 0 2px #fff,1px 0 #fff,-1px 0 #fff
}
.enemy-word.compact{font-size:14px;letter-spacing:-.2px}.enemy-word .missing-letter{color:#d0262c;font-size:1.12em}
.enemy .hp{left:18%;right:16%;bottom:0;height:8px;border:1px solid #704a36;background:#1b1730;box-shadow:0 2px 3px #0007}
.enemy.selected{filter:drop-shadow(0 0 14px #ffe75d) drop-shadow(0 8px 6px #111020aa)}
.enemy.selected:before{inset:-2px;border-color:#ffe56b;border-style:dashed}
.enemy.selected .enemy-word{filter:drop-shadow(0 0 6px #ffe15b)}
.enemy.corrected .enemy-word{color:#2b61a5;text-shadow:0 1px #fff,0 0 5px #87e7ff}
.enemy.corrected:after{content:"✓";position:absolute;z-index:5;right:11%;top:18%;display:grid;place-items:center;width:25px;height:25px;border:2px solid #fff5b8;border-radius:50%;background:#56b844;color:white;font:900 17px Georgia;box-shadow:0 0 12px #9fff76}
.enemy.frozen{filter:hue-rotate(160deg) saturate(.7) brightness(1.35) drop-shadow(0 0 13px #a7efff)}
.enemy.frozen:after{content:"❄";position:absolute;z-index:6;right:5%;bottom:9%;color:#d9fbff;font-size:25px;text-shadow:0 0 8px #49dfff}
.enemy.wrong-answer{animation:enemyWrong .46s ease-out!important;filter:drop-shadow(0 0 13px #ff5959) brightness(1.15)}

.projectile{width:34px;height:34px;box-shadow:0 0 23px #ffd739,0 0 5px 3px #fff}
.projectile.correct{width:42px;height:42px;font-size:26px;background:radial-gradient(circle,#fff 4%,#fff06c 35%,#ff971d 67%);box-shadow:0 0 28px 8px #ffd233,0 0 8px 3px #fff}
.projectile.freeze{color:#185787;background:radial-gradient(circle,#fff 8%,#abedff 42%,#4babeb 70%);box-shadow:0 0 22px #77e5ff,0 0 5px 2px #fff}
.projectile.ink{color:#fff2b6;background:radial-gradient(circle,#b764ec 5%,#532377 48%,#241036 72%);box-shadow:0 0 23px #bc63ff,0 0 5px 2px #fff}
.ink-drop{position:absolute;z-index:22;width:9px;height:9px;border-radius:55% 45% 60% 40%;transform:translate(-50%,-50%);animation:inkScatter .6s ease-out forwards;box-shadow:0 0 5px #fff9}
.impact{width:24px;height:24px;box-shadow:0 0 38px 19px #ffbd2e}

@keyframes previewReveal{0%{transform:rotate(1deg) scale(.55);opacity:.2}75%{transform:rotate(-2deg) scale(1.12)}100%{transform:rotate(1deg) scale(1);opacity:1}}
@keyframes enemyWrong{0%,100%{transform:translate(-50%,-50%)}25%{transform:translate(-50%,-50%) translateX(11px) rotate(6deg)}55%{transform:translate(-50%,-50%) translateX(-9px) rotate(-5deg)}78%{transform:translate(-50%,-50%) translateX(5px)}}
@keyframes inkScatter{0%{transform:translate(-50%,-50%) scale(.4);opacity:1}100%{transform:translate(calc(-50% + var(--drop-x)),calc(-50% + var(--drop-y))) scale(1.45) rotate(190deg);opacity:0}}

@media(max-height:760px){
  .play-layout{grid-template-columns:165px minmax(650px,1fr) 145px}.board-quiz{top:5px;width:min(520px,70%)}
  .board-quiz .quiz-card{padding:6px 11px 9px}.word-comparison{margin:4px 0 2px}.board-quiz .notebook-word,.corrected-preview{height:40px;font-size:21px}.board-quiz .answer-grid button{height:34px}.wave-banner{top:142px}
  .enemy{width:132px;height:125px}.enemy-word{font-size:16px}.enemy-word.compact{font-size:12px}
}

/* Version 7: illustrated HUD icons and five aligned lanes. */
.stat,.round-btn{position:relative;display:flex;align-items:center;justify-content:center}
.stat{gap:6px}.round-btn{padding:0}.speed-btn{width:54px;gap:1px}.speed-btn b{font-size:10px;color:#fff0c2;text-shadow:0 1px #341528}
.hud-icon{width:25px;height:25px;overflow:visible;filter:drop-shadow(0 2px 1px #180b22)}
.round-btn .hud-icon{width:24px;height:24px}.hud-icon path{stroke-linecap:round;stroke-linejoin:round}
.ink-icon>path:first-child{fill:#322243;stroke:#e5a85c;stroke-width:2}.ink-icon .icon-liquid{fill:#34cef1;stroke:#a8f5ff;stroke-width:1.2}.hud-icon .icon-glint{fill:none;stroke:#fff6c6;stroke-width:2}
.score-icon>path:first-child{fill:#ffc934;stroke:#a84b20;stroke-width:2}.score-icon .icon-glint{stroke:#fff2a1;stroke-width:1.8}
.life-icon>path:first-child{fill:#f25b6e;stroke:#8f2840;stroke-width:2}.life-icon .icon-glint{stroke:#ffc7c9;stroke-width:2.2}
.speed-icon path{fill:none;stroke:#78e8ff;stroke-width:2.6}.speed-btn.active .speed-icon{filter:drop-shadow(0 0 5px #65dcff)}
.help-icon>path:first-child{fill:#f2d89a;stroke:#8b4d2f;stroke-width:2}.help-icon .icon-mark{fill:none;stroke:#72314a;stroke-width:2.5}
.sound-icon>path:first-child{fill:#f5b93f;stroke:#843b2b;stroke-width:2}.sound-icon .sound-wave{fill:none;stroke:#ffe795;stroke-width:2.2}.sound-icon .sound-slash{display:none;fill:none;stroke:#ff7a80;stroke-width:3}
#soundBtn.muted .sound-wave{display:none}#soundBtn.muted .sound-slash{display:block}#soundBtn.muted .sound-icon>path:first-child{fill:#76566d}
.pause-icon .pause-bars{fill:#f3d78d;stroke:#7d3d2e;stroke-width:1.7}.pause-icon .play-mark{display:none;fill:#8de3a0;stroke:#34623b;stroke-width:2}
#pauseBtn.show-play .pause-bars{display:none}#pauseBtn.show-play .play-mark{display:block}
.round-btn:hover .hud-icon{transform:translateY(-1px) scale(1.05)}

.lane-guides{position:absolute;z-index:2;left:1%;right:1%;top:26%;bottom:8%;display:grid;grid-template-rows:repeat(5,1fr);pointer-events:none}
.lane-guides i{position:relative;border-top:1px solid #f9e7a312;border-bottom:1px solid #17371d20;background:linear-gradient(90deg,transparent 0 10%,rgba(255,244,174,.025) 24% 82%,transparent)}
.lane-guides i:after{content:"";position:absolute;left:1.5%;top:50%;width:9px;height:9px;border-radius:50%;background:#ffd45d22;box-shadow:0 0 12px #ffd45d33;transform:translateY(-50%)}
.lane-grid{top:26%;bottom:8%}

@media(max-height:760px){
  .hud-icon{width:21px;height:21px}.round-btn .hud-icon{width:20px;height:20px}.speed-btn{width:47px}.speed-btn b{font-size:9px}
}

.brand-book:before{content:"";position:absolute;left:9px;top:7px;width:26px;height:30px;border-radius:3px 9px 9px 3px;background:linear-gradient(90deg,#fff1b0,#ffd260);box-shadow:inset 4px 0 #e49632,0 2px 0 #772719;transform:rotate(-3deg)}
.brand-book:after{content:"";position:absolute;left:15px;top:15px;width:14px;height:2px;background:#a94c29;box-shadow:0 5px #a94c29,0 10px #a94c29;transform:rotate(-3deg)}
.card-cost{display:flex;align-items:center;gap:2px}.card-cost b{font-size:11px;color:#b9f2ff}.cost-orb{width:16px;height:16px;filter:drop-shadow(0 0 4px #67dfff)}
.cost-orb circle{fill:#1eb6e8;stroke:#d2fbff;stroke-width:1.5}.cost-orb path{fill:none;stroke:#fff;stroke-width:1.7;stroke-linecap:round}
.tip-icon{display:grid;place-items:center;width:24px;height:28px;flex:0 0 24px}.tip-icon svg{width:26px;height:26px;overflow:visible}.tip-icon path:first-child{fill:#ffd25d;stroke:#8d4428;stroke-width:1.7}.tip-icon path:last-child{fill:none;stroke:#fff1a4;stroke-width:1.5;stroke-linecap:round}
.word-arrow{width:36px;height:30px;overflow:visible;filter:drop-shadow(0 2px #6b3318)}.word-arrow path{fill:none;stroke:#f2a51e;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}
.streak-icon{width:20px;height:20px;filter:drop-shadow(0 2px #7c351e)}.streak-icon path{fill:#ffd045;stroke:#9a4427;stroke-width:1.6;stroke-linejoin:round}
.owl{display:grid;place-items:center}.owl svg{width:42px;height:42px;filter:drop-shadow(0 3px 2px #160b20)}
.owl .owl-body{fill:#c96b2f;stroke:#57283d;stroke-width:2}.owl circle{fill:#f8e4ad;stroke:#57283d;stroke-width:1.5}.owl .owl-pupil{fill:#1d1730;stroke:none}.owl .owl-beak{fill:#ffd250;stroke:#7e3f27;stroke-width:1.2}

@media(max-height:760px){
  .card-cost{gap:1px}.cost-orb{width:14px;height:14px}.tip-icon svg{width:21px;height:21px}.owl svg{width:34px;height:34px}
}

.painted-star{width:40px;height:40px;margin:0 2px;overflow:visible;filter:drop-shadow(0 3px 0 #4b2031)}
.painted-star path:first-child{fill:#57425f;stroke:#a58a99;stroke-width:1.7;stroke-linejoin:round}
.painted-star.earned path:first-child{fill:#ffd044;stroke:#9b4527;stroke-width:2}.painted-star .star-shine{fill:none;stroke:#79636d;stroke-width:2;stroke-linecap:round}.painted-star.earned .star-shine{stroke:#fff2a8}
.painted-star.small{width:16px;height:16px;margin:0 -1px;filter:drop-shadow(0 1px 0 #431d2a)}
.lesson-stars{display:flex;justify-content:flex-end;align-items:center;min-width:54px}
.result-stars{display:flex;justify-content:center;align-items:center;gap:5px;letter-spacing:0}

.pause-emblem svg{width:54px;height:54px;overflow:visible}.pause-emblem svg path{fill:#ffe276;stroke:#7e3929;stroke-width:2}.pause-emblem svg circle{fill:none;stroke:#ffe276;stroke-width:3}
.tutorial-visual svg{width:68px;height:68px;overflow:visible;filter:drop-shadow(0 3px 0 #713a2d)}
.tutorial-visual .icon-main{fill:#ffd86a;stroke:#71334a;stroke-width:3;stroke-linejoin:round}
.tutorial-visual .icon-accent{fill:#56d0ee;stroke:#285278;stroke-width:2.5}
.tutorial-visual .icon-board{fill:#6a4775;stroke:#4a284a;stroke-width:3}.tutorial-visual .icon-grid{fill:none;stroke:#eac982;stroke-width:2;opacity:.8}
.tutorial-visual .icon-line{fill:none;stroke:#fff5bd;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}

@media(max-height:760px){
  .painted-star{width:34px;height:34px}.painted-star.small{width:14px;height:14px}.tutorial-visual svg{width:58px;height:58px}
}

/* Version 8: keep character art inside a dedicated card zone. */
.defender-card{isolation:isolate}
.defender-card:before{
  content:"";position:absolute;z-index:0;left:7px;top:17px;width:84px;height:84px;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle at 48% 45%,rgba(255,247,190,.7),rgba(255,207,91,.18) 58%,transparent 72%);
  filter:drop-shadow(0 4px 6px rgba(71,30,15,.2))
}
.defender-card img,.defender-card.blue img,.defender-card.green img{
  z-index:1;left:5px;top:12px;width:88px;height:88px;max-width:none;object-fit:contain;object-position:center;transform-origin:50% 75%
}
.defender-card.blue img{left:4px;top:13px;height:86px}
.defender-card.green img{left:3px;top:11px;width:92px;height:90px}
.card-cost{z-index:4;top:6px;right:6px}
.card-copy{z-index:3;left:70px;right:6px;bottom:7px;min-height:47px;padding:7px 5px 5px 9px}

@media(max-height:760px){
  .defender-card:before{left:5px;top:14px;width:67px;height:67px}
  .defender-card img,.defender-card.blue img,.defender-card.green img{left:3px;top:11px;width:72px;height:72px}
  .defender-card.blue img{left:2px;top:12px;height:68px}
  .defender-card.green img{left:2px;top:10px;width:75px}
  .card-copy{left:67px;right:5px;bottom:5px;min-height:42px;padding:6px 4px 5px 7px}
  .card-copy b{font-size:11px;white-space:nowrap}
}
