/* All rules are scoped: the existing six learning worlds keep their layout. */
.wf-portal{width:100%;min-height:236px;position:relative;isolation:isolate;overflow:hidden;border:1px solid #c4a8ff;border-radius:26px;padding:30px 38px;margin:22px 0;color:#fff;text-align:left;background:linear-gradient(100deg,#141532 4%,#24234ccf 52%,#5d3c8233),url('/rpg/scenes/celestial-arena.webp') center/cover;box-shadow:0 7px 0 #171b47,0 16px 35px #19103644;cursor:pointer;display:flex;align-items:center;justify-content:space-between}.wf-portal:hover{border-color:#ffe3a3;transform:translateY(-2px)}.wf-portal-copy{display:grid;gap:9px;position:relative;z-index:2}.wf-portal-copy>small{font-size:10px;letter-spacing:2px;color:#b9deff}.wf-portal-copy>strong{font-size:clamp(28px,3vw,44px);color:#ffe2a0;line-height:1.2}.wf-portal-copy>span{font-size:14px;color:#e1e6ff}.wf-portal-copy>b{width:max-content;padding:10px 20px;background:linear-gradient(#ffe9b0,#edb14e);color:#3c2850;border-radius:10px;box-shadow:0 3px 0 #9c683b}.wf-portal-copy>b i{margin-left:25px}.wf-portal-copy .wf-portal-rewards{font-size:12px;color:#cfcae8}.wf-portal-art{width:40%;height:230px;display:flex;align-items:center;justify-content:center;position:absolute;right:20px;bottom:-5px;pointer-events:none}.wf-portal-art .wf-sprite{width:55%;height:100%;filter:drop-shadow(0 0 17px #88d7ff77)}.wf-portal-art .wf-sprite+.wf-sprite{margin-left:-8%}.wf-login-entry{display:block;padding:10px;text-align:center;color:#594499;font-weight:bold}
#wordforgeDialog{--wf-ink:#f2f1ff;--wf-muted:#b6bfdc;--wf-gold:#fbd68c;--wf-panel:#14182c;box-sizing:border-box;width:100vw!important;max-width:100vw!important;height:100dvh;max-height:100dvh!important;padding:0!important;margin:0!important;inset:0;border:0!important;border-radius:0!important;background:#0b1020;color:var(--wf-ink);font-family:var(--quest-body,'Trebuchet MS',system-ui,sans-serif);overflow:hidden}#wordforgeDialog:not([open]){display:none!important}#wordforgeDialog::backdrop{background:#090d1a}#wordforgeDialog *{box-sizing:border-box}#wordforgeDialog [hidden]{display:none!important}#wordforgeDialog button,#wordforgeDialog input,#wordforgeDialog select{font:inherit}#wordforgeDialog button{cursor:pointer;touch-action:manipulation}#wordforgeDialog button:disabled{cursor:default;opacity:.42}#wordforgeDialog :focus-visible{outline:3px solid #90f4ff;outline-offset:3px}#wordforgeDialog h1,#wordforgeDialog h2,#wordforgeDialog h3,#wordforgeDialog p{margin:0}#wordforgeDialog p{line-height:1.55}#wordforgeDialog h1{font-size:clamp(34px,4.6vw,66px);line-height:1.06;letter-spacing:-1.8px}#wordforgeDialog h2{font-size:clamp(20px,2vw,28px);line-height:1.25;letter-spacing:-.5px}#wordforgeDialog h3{font-size:19px;line-height:1.25}#wordforgeDialog .wf-sprite{display:block;width:100%;height:100%;overflow:hidden}.wf-shell{height:100%;display:flex;flex-direction:column}.wf-top{flex:none;display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:70px;padding:10px 24px;background:linear-gradient(100deg,#111a31,#17152d);border-bottom:1px solid #56638155;z-index:6}.wf-brand{display:flex;align-items:center;gap:12px}.wf-brand>span{font-size:36px;color:#fed898;text-shadow:0 0 16px #ffc260}.wf-brand small{display:block;font-size:8px;letter-spacing:2.8px;color:#b0c7e6}.wf-brand strong{display:block;font-size:20px;letter-spacing:1px;line-height:1.3}.wf-brand em{font-style:normal;color:#f4cd85}.wf-top nav{display:flex;gap:6px}.wf-top button{min-height:40px;color:#e4e9ff!important;background:#27314a!important;border:1px solid #7e96bd55!important;border-radius:10px;padding:7px 12px;font-size:12px}.wf-top button[aria-pressed=false]{color:#8f9cb3!important}.wf-back{font-weight:800}.wf-status{flex:none;z-index:7;background:#422f24;color:#ffe2af;font-size:13px;text-align:center;line-height:1.5}.wf-status:empty{display:none}.wf-status:not(:empty){padding:8px}.wf-status button{margin-left:12px}.wf-main{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:24px clamp(16px,2.2vw,42px) 40px;background:radial-gradient(ellipse at 88% 3%,#352a6755,transparent 50%),radial-gradient(ellipse at 0% 70%,#113e5055,transparent 50%),#0b1020;scrollbar-color:#536486 #12192b}.wf-kicker{font-size:10px!important;font-weight:900;letter-spacing:2.4px;color:#c5b0ec}.wf-btn{min-height:44px;padding:10px 17px;border:1px solid #64708e66;border-radius:11px;background:linear-gradient(#2a3550,#1c2740);color:#edf2ff;font-weight:800;font-size:13px;line-height:1.3;box-shadow:0 3px 0 #050913;transition:background .15s,transform .15s}.wf-btn:hover:not(:disabled){background:#354568;transform:translateY(-1px)}#wordforgeDialog .wf-gold{background:linear-gradient(120deg,#ffe7aa,#edb054);color:#382641;border-color:#ffdc99;box-shadow:0 4px 0 #9f6532,0 6px 20px #dca74622;font-weight:900}.wf-lobby-hero{display:grid;grid-template-columns:1fr 1fr;min-height:340px;padding:36px 5%;position:relative;overflow:hidden;border-radius:24px;border:1px solid #73639777;background:linear-gradient(90deg,#121931f5 5%,#111a32c9 44%,#1d174932 90%),url('/rpg/scenes/celestial-arena.webp') center/cover}.wf-lobby-hero>div:first-child{position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center;gap:18px;max-width:600px}.wf-lobby-hero h1 em{font-style:normal;background:linear-gradient(110deg,#fff4c3,#f4c36e 65%,#f0a1d5);color:transparent;background-clip:text}.wf-lobby-hero p:not(.wf-kicker){max-width:510px;color:#d5dff0;font-size:15px}.wf-hero-display{position:relative;display:flex;align-items:center;justify-content:center;min-width:0}.wf-hero-display .wf-sprite{width:58%!important;max-height:360px;filter:drop-shadow(0 12px 15px #0008);animation:wf-breathe 4s ease-in-out infinite}.wf-hero-display .wf-sprite+.wf-sprite{margin-left:-10%;animation-delay:-2s}.wf-badges{display:flex;gap:7px;flex-wrap:wrap}.wf-badges span{padding:6px 10px;border:1px solid #a3b9e644;border-radius:7px;background:#14233cb3;font-size:10px;color:#d6e9fd}.wf-section{margin-top:30px}.wf-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.wf-heading h2{margin-top:7px!important}.wf-heading>span{color:#b4c4de;font-size:13px}.wf-boss-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.wf-boss-card{min-width:0;position:relative;overflow:hidden;text-align:left;color:#edf0ff;border:1px solid #7181ab44;border-radius:18px;background:linear-gradient(160deg,#242c49,#11182c);padding:14px;display:flex;flex-direction:column;gap:8px;transition:transform .2s,border-color .2s;box-shadow:0 5px 0 #060a14}.wf-boss-card.selected{border-color:var(--boss-colour);box-shadow:0 0 0 2px color-mix(in srgb,var(--boss-colour) 25%,transparent),0 7px 0 #070c17}.wf-boss-card:hover{transform:translateY(-4px);border-color:var(--boss-colour)}.wf-boss-card-art{display:block;height:clamp(130px,15vw,260px);position:relative;background:radial-gradient(ellipse at 50% 65%,color-mix(in srgb,var(--boss-colour) 19%,transparent),transparent 68%)}.wf-boss-card-art .wf-sprite{filter:drop-shadow(0 5px 9px #0007)}.wf-difficulty{font-size:9px;font-weight:900;letter-spacing:1.7px;color:var(--boss-colour)}.wf-boss-card>small{font-size:10px;color:#acbad7}.wf-boss-card h3{color:var(--boss-colour)}.wf-boss-card p{font-size:12px;color:#bfc9df;flex:1;min-height:60px}.wf-pick{display:block;margin-top:7px;padding-top:12px;border-top:1px solid #66779944;color:#e1defb;font-size:11px;font-weight:800}.wf-stars{display:flex;gap:4px;color:#485471;font-size:20px}.wf-stars i{font-style:normal}.wf-stars .on{color:#ffd57e;filter:drop-shadow(0 0 5px #ffd57e44)}.wf-resume{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:20px;padding:17px 22px;background:linear-gradient(100deg,#223853,#30234c);border:1px solid #92d1e577;border-radius:14px}.wf-resume div{display:grid;gap:4px}.wf-resume span{font-size:13px;color:#c3d6e8}.wf-loadout{display:grid;grid-template-columns:1.2fr 1fr;gap:20px;margin:28px 0}.wf-party-select,.wf-companion-select,.wf-ledger>div{padding:24px;border:1px solid #758bb144;border-radius:18px;background:linear-gradient(140deg,#1b2540,#11182b)}.wf-party-select>h2{margin:8px 0 16px!important}.wf-heroes{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.wf-heroes button{display:flex;flex-direction:column;align-items:center;min-width:0;color:#c8d3e9;border:1px solid transparent;background:#0c142699;border-radius:12px;padding:8px}.wf-heroes button.selected{border-color:#e7c37d;background:#493f4844;color:#ffe4aa}.wf-heroes .wf-sprite{height:120px!important}.wf-heroes b{font-size:12px}.wf-heroes small{font-size:10px;line-height:1.8}.wf-skill-description{margin-top:14px!important;font-size:12px;color:#bfd3e8}.wf-companion-select{display:grid;grid-template-columns:140px 1fr;gap:18px;align-items:center}.wf-small-pet{width:140px;height:160px}.wf-small-pet svg{width:100%;height:100%}.wf-companion-select label{display:block;font-size:11px;margin:12px 0 6px;color:#bfcbe4}.wf-companion-select select{width:100%;color:#edf2ff;border:1px solid #63789d;border-radius:8px;background:#18243b;padding:10px}.wf-companion-select strong{display:block;font-size:13px;color:#ffd99e;margin-top:15px}.wf-companion-select strong span{font-weight:400;color:#b6cbe0;font-size:11px}.wf-companion-select p{font-size:12px;margin-top:7px!important;color:#bac7dd}.wf-launch{display:flex;align-items:center;justify-content:space-between;gap:20px;border:1px solid #b8975866;background:linear-gradient(100deg,#39303d,#1b263d);padding:22px 28px;border-radius:16px}.wf-launch>div{display:grid;gap:4px}.wf-launch small{font-size:9px;letter-spacing:2px;color:#e6c084}.wf-launch b{font-size:23px}.wf-launch span{font-size:12px;color:#bdcadf}.wf-start{font-size:17px;padding:17px 34px;min-width:220px}.wf-ledger{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:25px}.wf-ledger h3{margin-bottom:14px!important}.wf-ledger p{font-size:12px;color:#bbc9df;margin:10px 0!important}.wf-ledger button{margin-right:8px}.wf-rewards{display:flex;gap:10px;flex-wrap:wrap}.wf-rewards>span{padding:9px 14px;border:1px solid #74629b55;background:#31294366;color:#ddc6ff;border-radius:9px;font-weight:900}.wf-rewards>span:nth-child(2){color:#ffdd8e;background:#49382655;border-color:#b68d4555}.wf-rewards>span:nth-child(3){color:#a3ecf5;background:#21475655;border-color:#4578b655}.wf-rewards small{font-size:11px;font-weight:500}
/* Battle scene and tactile rune board. */
.wf-battle-toolbar{display:flex;align-items:center;gap:15px;justify-content:space-between;margin-bottom:15px}.wf-battle-toolbar b{font-size:16px}.wf-battle-toolbar small{font-size:11px;color:#b0c5dc;font-weight:500}.wf-battle-toolbar>span{color:#d5c7ef;font-size:12px}.wf-battle-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(355px,.9fr);gap:24px;align-items:start}.wf-battle-left{min-width:0}.wf-stage{height:clamp(255px,32vw,420px);position:relative;isolation:isolate;overflow:hidden;border-radius:20px;border:1px solid #7faddb77;background:#172d46 url('/rpg/scenes/celestial-arena.webp') center/cover;box-shadow:0 7px 0 #050a15}.wf-scene-shade{position:absolute;inset:0;z-index:0;background:linear-gradient(#0a163288,transparent 40%,#19284211 70%,#102035cc)}.wf-biome-frost{background-position:20% center}.wf-biome-storm .wf-scene-shade{background:linear-gradient(#201337ad,#47277b55,#11163799)}.wf-biome-eclipse .wf-scene-shade{background:linear-gradient(#150b31c9,#52337944,#161a3599)}.wf-stage-hud{position:absolute;top:16px;left:18px;right:18px;display:flex;justify-content:space-between;gap:45px;z-index:4}.wf-health{width:45%;padding:7px 10px;border:1px solid #a4bce755;border-radius:8px;background:#111a34c9;backdrop-filter:blur(6px)}.wf-health>span{display:flex;align-items:center;justify-content:space-between;gap:4px;font-size:10px;margin-bottom:5px;color:#e8f5ff}.wf-health strong{font-size:10px;color:#d3def8}.wf-health>div{height:8px;border-radius:5px;background:#0b1123;overflow:hidden}.wf-health i{display:block;height:100%;background:linear-gradient(90deg,#3398b9,#77f4d2);border-radius:inherit;transition:width .45s ease}.wf-enemy-health i{background:linear-gradient(90deg,#e269ae,#ffd797)}.wf-actor{position:absolute;z-index:2;will-change:transform;filter:drop-shadow(0 10px 8px #090c2855)}.wf-student{left:3%;bottom:10%;width:30%;height:66%;animation:wf-breathe 4s infinite ease-in-out}.wf-pet{left:26%;bottom:8%;width:25%;height:58%;animation:wf-float 4s infinite ease-in-out}.wf-pet>svg{width:100%;height:100%;filter:drop-shadow(0 0 7px #8ee6ff77)}.wf-enemy{right:1%;bottom:7%;width:45%;height:78%;animation:wf-breathe 3.4s infinite ease-in-out}.wf-enemy.shielded::after{content:'';position:absolute;inset:12% 6% 2%;border:2px solid #b8ecff88;border-radius:50%;background:radial-gradient(ellipse,transparent 60%,#71cfff66);box-shadow:inset 0 0 20px #81d6ff66,0 0 15px #89d8ff44}.wf-shield-count{position:absolute;right:5%;bottom:7%;padding:5px 9px;background:#164661dd;border:1px solid #b9f1ff;color:#e7faff;border-radius:8px;font-weight:900;font-size:13px;z-index:3}.wf-magic-circle{position:absolute;width:29%;height:16%;bottom:6%;border:2px solid #e5dc9ec4;border-radius:50%;box-shadow:inset 0 0 20px #ffe39444,0 0 15px #79d5ff55;z-index:1;animation:wf-rune 5s infinite ease-in-out}.wf-magic-circle::after{content:'✧     ✦     ✧';position:absolute;inset:0;text-align:center;color:#fff7c3;transform:scaleY(.65);font-size:24px}.wf-circle-ally{left:21%}.wf-circle-boss{right:8%;border-color:#e0b6ed}.wf-stage-caption{position:absolute;bottom:0;left:0;right:0;padding:7px 14px;display:flex;justify-content:space-between;background:#101831d9;color:#cfe6f7;font-size:10px;z-index:4;letter-spacing:.6px}.wf-stage-caption b{color:#ffe2a9}.wf-constellation{position:absolute;inset:25% 20% 15%;z-index:1;color:#e4faff77;animation:wf-float 6s infinite}.wf-constellation i{position:absolute;right:0;top:0;font-style:normal}.wf-constellation b{position:absolute;right:30%;bottom:0}.wf-fx{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:5}.wf-casting .wf-pet{animation:wf-attack .75s ease-in-out}.wf-casting .wf-student{animation:wf-hero-cast .8s ease-in-out}.wf-impact .wf-enemy{animation:wf-hit .4s ease-out}.wf-ultimate .wf-pet{animation:wf-ultimate-cast 1.05s ease-out}.wf-ultimate .wf-scene-shade{background:#080c24c9}.wf-ultimate .wf-student{filter:drop-shadow(0 0 15px #ffda5c);animation:wf-hero-cast .8s}.wf-damage{position:absolute;right:10%;top:25%;display:grid;text-align:center;z-index:6;color:#fff5bf;text-shadow:0 2px 0 #7b305b,0 0 15px #efb543;animation:wf-number .7s ease-out both}.wf-damage small{font-size:12px;font-weight:1000;letter-spacing:1px}.wf-damage strong{font-size:46px;line-height:1.1;font-weight:1000}.wf-taken{position:absolute;left:18%;top:36%;z-index:6;color:#ffb4a4;text-shadow:0 2px 0 #52293d;font-size:25px;font-weight:900;animation:wf-number .7s ease-out}.wf-threat{display:flex;align-items:center;gap:12px;padding:13px 16px;border:1px solid #ab8a494f;border-radius:12px;background:#302a2888;margin-top:18px}.wf-threat>span{font-size:23px;color:#edc47c}.wf-threat>div{display:grid;gap:3px;flex:1}.wf-threat b{font-size:14px;color:#ffdb97}.wf-threat small{color:#ccbdd4;font-size:11px}.wf-threat>strong{font-size:11px;color:#e7a799}.wf-threat.imminent{background:#6b293447;border-color:#e56c7866}.wf-clue{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:20px;background:linear-gradient(120deg,#213354,#1c2541);border:1px solid #6e95c04d;border-radius:14px;margin-top:15px}.wf-clue h2{font-size:18px!important;margin:6px 0!important}.wf-clue p:last-child{font-size:clamp(15px,1.5vw,20px);color:#e8f1fc;font-weight:650}.wf-clue button{flex:none}.wf-clue .wf-kicker{font-size:9px!important;color:#aed7f4}.wf-revealed{display:flex;align-items:center;gap:12px;margin:12px 0;padding:12px 16px;border:1px solid #b19be16e;border-radius:12px;background:#3b2d5466}.wf-revealed b{font-size:22px;letter-spacing:2px;color:#e1c1ff}.wf-revealed span{font-size:12px}.wf-skills{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:15px}.wf-skills>button{position:relative;overflow:hidden;display:grid;grid-template-columns:38px 1fr;gap:3px 10px;text-align:left;padding:13px;border:1px solid #b499e455;border-radius:12px;color:#dfd5fc;background:linear-gradient(110deg,#44325b,#282240);min-height:75px}.wf-skills>button>span{grid-row:span 2;font-size:29px;color:#ffe0a2;align-self:center;text-align:center}.wf-skills b{font-size:13px}.wf-skills small{font-size:11px;color:#c5c9e4}.wf-skills i{height:3px;background:linear-gradient(90deg,#b17afb,#ffd987);position:absolute;bottom:0;left:0}.wf-skills button.armed{border-color:#ffd38c;box-shadow:0 0 18px #ffd77644}.wf-support{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.wf-support button{font-size:11px;padding:8px 13px}.wf-last-event{padding:12px 2px;color:#afc2db;font-size:12px}.wf-forge-panel{border:1px solid #667a9c77;border-radius:20px;background:linear-gradient(145deg,#202e49,#101a2e);padding:20px;box-shadow:0 6px 0 #060a15;min-width:0}.wf-forge-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.wf-forge-heading small{font-size:8px;letter-spacing:2px;color:#bcd4e6}.wf-forge-heading h2{font-size:21px!important;margin-top:4px!important}.wf-forge-heading>b{color:#e8c593;font-size:12px}.wf-board{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;padding:9px;border:1px solid #6784a277;border-radius:12px;background:#080f20;aspect-ratio:1;width:100%;max-width:530px;margin:auto;box-shadow:inset 0 2px 12px #0009}.wf-cell{min-width:0;min-height:0;position:relative;padding:0;border:1px solid #7896b32e;border-radius:7px;background:linear-gradient(#22314d,#18253d);color:#92a8c5;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 0 #02060f;font-size:clamp(17px,2.1vw,28px);line-height:1}.wf-cell small{font-size:18px;color:#526987;font-weight:600}.wf-cell.occupied{color:#413046;background:linear-gradient(140deg,#fff6d2,#e9c58c);border-color:#e8c58a}.wf-cell.ghost{background:linear-gradient(140deg,#75ecf4,#3eaaa9);color:#10283e;border-color:#b2ffff;box-shadow:0 0 11px #46d2e755,0 3px 0 #0d4c65}.wf-cell.route-start{outline:2px solid #a0f7fd;outline-offset:-3px}.wf-cell.occupied.ghost{background:linear-gradient(140deg,#fff5c2,#d5edb2);color:#193838}.wf-cell.rune-fire small{color:#eea487}.wf-cell.rune-fire{background:#412837}.wf-cell.rune-shield small{color:#85cffa}.wf-cell.rune-shield{background:#16364f}.wf-cell.rune-heal small{color:#8ee7b4}.wf-cell.rune-heal{background:#1b3b35}.wf-cell.rune-star small{color:#d5b1fc}.wf-cell.rune-star{background:#332748}.wf-cell.frozen{background:#2a5571;box-shadow:inset 0 0 12px #9edaff44;color:#c6eeff}.wf-cell.frozen small{color:#a9e3ff}.wf-cell i{font-style:normal;position:absolute;right:3px;bottom:2px;font-size:10px;opacity:.85}.wf-board-key{display:flex;justify-content:center;gap:12px;color:#a5bbd5;font-size:9px;flex-wrap:wrap;margin:11px 0}.wf-rack{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin:15px 0 10px}.wf-rack button{position:relative;min-width:0;min-height:48px;aspect-ratio:1.12;border:1px solid #ffe2a0;border-radius:8px;background:linear-gradient(145deg,#fff5d3,#deb675);color:#382c3d;box-shadow:0 4px 0 #8f633a;font-size:25px;font-weight:950}.wf-rack button:hover{transform:translateY(-3px)}.wf-rack small{position:absolute;right:5px;bottom:4px;font-size:8px;font-weight:600;color:#806340}.wf-anchor-row{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin:10px 0 13px}.wf-anchor-row>small{font-size:8px;letter-spacing:1px;color:#97adc9;margin-right:5px}.wf-anchor-row button{min-height:28px;min-width:28px;padding:4px 6px;font-size:11px;box-shadow:none}.wf-input-row{display:flex;gap:8px;align-items:end}.wf-word-field{flex:1;min-width:0}.wf-word-field span{display:block;font-size:10px;color:#a6bdd5;margin-bottom:5px}.wf-word-field input{width:100%;height:48px;border:1px solid #718bb6;border-radius:9px;background:#0f1a2f;color:#eaffff;padding:8px 13px;font-size:22px!important;letter-spacing:4px;text-transform:uppercase;font-weight:900}.wf-input-row button{min-height:48px;padding:8px 12px}.wf-draft-note{font-size:11px;min-height:36px;color:#b7bbd4;padding:10px 0}.wf-draft-note.valid{color:#9aefcf;font-weight:800}.wf-cast-actions{display:grid;grid-template-columns:.9fr 1.3fr;gap:10px}.wf-cast-actions button{min-height:48px}.wf-cast-actions .wf-gold{font-size:16px}
/* Results, word guide and accessible overlays. */
.wf-results{max-width:1150px;margin:0 auto;text-align:center}.wf-results-art{height:170px;width:170px;margin:0 auto;filter:drop-shadow(0 0 18px #ffc37355);animation:wf-float 4s infinite ease-in-out}.wf-results h1{margin:12px 0!important;font-size:clamp(30px,4vw,48px)!important}.wf-results>p{color:#c3cde2}.wf-results>.wf-stars{justify-content:center;font-size:30px;margin:12px 0}.wf-result-numbers{display:flex;gap:30px;justify-content:center;margin:23px 0}.wf-result-numbers>span{display:grid;gap:4px;color:#a9bed6;font-size:11px}.wf-result-numbers b{font-size:26px;color:#f5e4bd}.wf-results>.wf-rewards{justify-content:center}.wf-reward-note{font-size:12px;margin:14px 0!important}.wf-result-buttons{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-bottom:32px}.wf-review{border-top:1px solid #677da34d;padding-top:25px;text-align:left}.wf-review>div>p{font-size:13px;color:#a2bbd5;margin-top:5px!important}.wf-review-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:18px}.wf-review-grid button{display:flex;align-items:center;gap:12px;background:#1a2740;border:1px solid #6b84a844;border-radius:12px;padding:14px;text-align:left;color:#d9e6f9}.wf-review-grid button>span{font-size:22px;color:#f2ce83}.wf-review-grid button>div{flex:1;display:grid;gap:4px}.wf-review-grid small{font-size:12px;color:#bac9dd}.wf-review-grid em{font-size:10px;color:#94dbe0;font-style:normal}.wf-overlay{position:absolute;inset:70px 0 0;z-index:8;padding:30px;display:flex;align-items:center;justify-content:center;background:#050a18d9;backdrop-filter:blur(9px)}.wf-modal{max-width:700px;width:100%;max-height:100%;overflow-y:auto;overscroll-behavior:contain;padding:30px;border:1px solid #c0a5f388;border-radius:22px;background:linear-gradient(145deg,#263047,#141c32);box-shadow:0 25px 100px #0008}.wf-modal h2{margin:10px 0 20px!important}.wf-modal ol{padding-left:22px;color:#c2d2e8;font-size:14px;line-height:1.6}.wf-modal li{padding:6px 0}.wf-modal li b{color:#f6e0a6}.wf-tip{margin:18px 0;padding:16px;background:#65518122;border:1px solid #9781b944;border-radius:12px}.wf-tip>b{color:#e9c986}.wf-tip p{font-size:12px;color:#c9d1e5;margin-top:8px!important}.wf-modal>.wf-gold{width:100%;margin-top:5px}.wf-guide{max-width:1050px}.wf-guide>.wf-heading{margin-bottom:12px}.wf-guide h2{margin:4px 0 0!important}.wf-guide>p{font-size:13px;color:#c3cde3}.wf-guide input{width:100%;margin:16px 0;background:#0e1a2f;color:white;border:1px solid #6b80ab;border-radius:10px;padding:12px}.wf-word-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.wf-word-list button{display:grid;gap:7px;text-align:left;padding:14px;border:1px solid #7f99c14f;border-radius:10px;color:#e8edfa;background:#1b2b46}.wf-word-list b{color:#f1d193;display:flex;justify-content:space-between}.wf-word-list small{font-size:12px;color:#c0cee2;line-height:1.4}.wf-word-list em{font-size:9px;color:#9ad1d4;font-style:normal}.wf-pause{max-width:400px;text-align:center}.wf-pause>button{display:block;width:100%;margin-top:14px}.wf-pause p{font-size:14px;color:#c5d0e4}.wf-pause-note{font-size:11px!important;margin-top:20px!important}.wf-loading,.wf-empty{text-align:center;padding:15vh 20px}.wf-loading>span{display:block;font-size:65px;color:#f9d398;animation:wf-float 2s infinite}.wf-loading h2,.wf-empty h2{margin:20px 0!important}.wf-empty button{margin-top:25px}
@keyframes wf-breathe{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-5px) rotate(1deg)}}@keyframes wf-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}@keyframes wf-rune{50%{opacity:.55;transform:scale(1.07)}}@keyframes wf-attack{0%,100%{transform:translateX(0) scale(1)}20%{transform:translateX(-8%) scale(.93)}50%{transform:translateX(30%) scale(1.07)}}@keyframes wf-hero-cast{0%,100%{transform:rotate(0)}30%{transform:rotate(-6deg) translateY(-8px)}60%{transform:rotate(5deg)}}@keyframes wf-hit{10%,40%{transform:translateX(5%) rotate(5deg);filter:brightness(1.6)}25%,65%{transform:translateX(-2%) rotate(-2deg)}}@keyframes wf-ultimate-cast{20%{transform:translateY(-20px) scale(1.25);filter:drop-shadow(0 0 25px #ffcf59)}55%{transform:translateX(60%) scale(1.1)}100%{transform:translateX(0)}}@keyframes wf-number{0%{opacity:0;transform:translateY(15px) scale(.7)}20%{opacity:1;transform:translateY(0) scale(1.1)}70%{opacity:1}100%{opacity:0;transform:translateY(-35px) scale(1)}}
#wordforgeDialog.wf-reduced *,#wordforgeDialog.wf-reduced *::before,#wordforgeDialog.wf-reduced *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(min-width:1600px){.wf-battle-grid{grid-template-columns:minmax(0,1.4fr) minmax(450px,.85fr)}.wf-stage{height:480px}.wf-forge-panel{padding:22px 30px}.wf-board{max-width:480px}.wf-rack{max-width:530px;margin-left:auto;margin-right:auto}}
@media(max-width:1100px){.wf-boss-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.wf-boss-card-art{height:180px}.wf-boss-grid .wf-boss-card:last-child{grid-column:auto}.wf-loadout{grid-template-columns:1fr}.wf-battle-grid{gap:15px;grid-template-columns:minmax(0,1fr) minmax(340px,1fr)}.wf-clue{padding:15px;display:block}.wf-clue button{margin-top:10px}.wf-top{padding:10px 16px}.wf-brand strong{font-size:16px}.wf-top nav button{padding:6px 9px}.wf-companion-select{grid-template-columns:170px 1fr}.wf-small-pet{width:160px}.wf-skills{gap:8px}.wf-skills>button{grid-template-columns:25px 1fr;padding:10px}.wf-skills b{font-size:11px}.wf-skills small{font-size:10px}.wf-forge-panel{padding:15px}.wf-main{padding:18px}.wf-stage{height:270px}.wf-stage-hud{gap:12px;left:8px;right:8px;top:10px}.wf-health{width:48%;padding:6px}.wf-health b,.wf-health strong{font-size:9px}}
@media(max-width:760px){.wf-portal{padding:24px;min-height:240px}.wf-portal-art{right:-40px;width:60%;opacity:.6}.wf-portal-copy{max-width:85%}.wf-portal-copy>span{max-width:90%;font-size:12px}.wf-top{gap:6px;padding:8px 10px;min-height:62px}.wf-top nav{gap:4px}.wf-top nav button{font-size:10px;min-width:30px;min-height:36px;padding:5px 7px}.wf-brand>span{display:none}.wf-brand small{font-size:6px;letter-spacing:1.3px}.wf-brand strong{font-size:12px;letter-spacing:.3px}.wf-brand em{display:block}.wf-back span{display:none}.wf-back{min-width:38px;font-size:18px!important}.wf-main{padding:12px 12px 30px}.wf-lobby-hero{min-height:390px;grid-template-columns:1fr;padding:24px}.wf-lobby-hero>div:first-child{max-width:85%;gap:13px}.wf-lobby-hero h1{font-size:43px!important}.wf-lobby-hero p:not(.wf-kicker){max-width:280px;font-size:12px}.wf-hero-display{position:absolute;right:-2%;bottom:0;width:55%;height:180px;opacity:.9}.wf-hero-display .wf-sprite{height:180px!important}.wf-badges{max-width:65%;margin-top:10px}.wf-badges span{font-size:8px}.wf-section{margin-top:23px}.wf-heading>span{font-size:10px;white-space:nowrap}.wf-kicker{font-size:8px!important;letter-spacing:1.7px}.wf-heading h2{font-size:20px!important;max-width:240px}.wf-boss-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.wf-boss-card{padding:12px;gap:6px}.wf-boss-card-art{height:155px}.wf-boss-card h3{font-size:17px!important}.wf-boss-card p{font-size:11px;min-height:75px}.wf-boss-card:last-child{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;align-items:center}.wf-boss-card:last-child .wf-boss-card-art{grid-column:1;grid-row:2/7;height:210px}.wf-boss-card:last-child p{min-height:0}.wf-boss-card:last-child .wf-difficulty{grid-column:1/-1}.wf-party-select,.wf-companion-select{padding:17px}.wf-heroes{gap:5px}.wf-heroes button{padding:5px 2px}.wf-heroes .wf-sprite{height:90px!important}.wf-heroes b{font-size:10px}.wf-heroes small{font-size:8px}.wf-companion-select{grid-template-columns:105px 1fr;gap:12px}.wf-small-pet{width:105px;height:130px}.wf-companion-select select{font-size:12px!important}.wf-launch{padding:18px;flex-direction:column;align-items:stretch}.wf-launch span{font-size:11px}.wf-launch b{font-size:21px}.wf-start{width:100%;font-size:17px}.wf-ledger{grid-template-columns:1fr}.wf-ledger>div{padding:18px}.wf-resume{padding:14px}.wf-resume b{font-size:13px}.wf-resume span{font-size:11px}.wf-resume .wf-btn{font-size:11px;padding:9px 12px}.wf-battle-toolbar{gap:8px;margin-bottom:10px}.wf-battle-toolbar>b{font-size:12px}.wf-battle-toolbar small{display:block;font-size:9px}.wf-battle-toolbar>span{font-size:10px;white-space:nowrap}.wf-battle-toolbar .wf-btn{font-size:10px;padding:7px 10px;min-height:36px}.wf-battle-grid{display:flex;flex-direction:column;gap:15px}.wf-battle-left{width:100%;display:contents}.wf-stage{width:100%;height:225px;order:0;border-radius:14px}.wf-threat{order:1;margin-top:0;width:100%;padding:9px 12px}.wf-threat b{font-size:12px}.wf-threat small{font-size:10px}.wf-threat>strong{display:none}.wf-clue{order:2;width:100%;margin-top:0;padding:13px;display:flex;align-items:center}.wf-clue h2{font-size:14px!important;margin:4px 0!important}.wf-clue p:last-child{font-size:15px}.wf-clue .wf-btn{font-size:10px;padding:7px 10px;margin-top:0;max-width:74px}.wf-forge-panel{order:3;width:100%;padding:14px}.wf-revealed{order:4;width:100%;margin:0}.wf-revealed span{font-size:10px}.wf-skills{order:5;width:100%;margin-top:0}.wf-support{order:6;margin-top:0}.wf-last-event{order:7}.wf-board{max-width:430px;gap:5px;padding:7px}.wf-cell{font-size:23px;min-height:0}.wf-cell small{font-size:17px}.wf-rack{gap:6px}.wf-rack button{font-size:23px;min-height:42px}.wf-forge-heading{margin-bottom:12px}.wf-forge-heading h2{font-size:19px!important}.wf-forge-heading small{font-size:8px}.wf-input-row .wf-btn{font-size:11px}.wf-cast-actions .wf-gold{font-size:16px}.wf-overlay{inset:62px 0 0;padding:12px}.wf-modal{padding:22px;max-height:100%}.wf-modal ol{font-size:12px;padding-left:17px}.wf-word-list{grid-template-columns:repeat(2,minmax(0,1fr))}.wf-word-list button{padding:11px}.wf-word-list small{font-size:11px}.wf-results-art{height:135px;width:135px}.wf-results>p{font-size:13px}.wf-result-numbers{gap:18px}.wf-result-numbers b{font-size:24px}.wf-result-numbers>span{font-size:9px}.wf-results>.wf-rewards{gap:6px}.wf-rewards>span{padding:8px 11px;font-size:13px}.wf-review-grid{grid-template-columns:1fr}.wf-result-buttons{gap:9px}.wf-result-buttons button{font-size:12px}.wf-damage strong{font-size:35px}}
@media(prefers-reduced-motion:reduce){.wf-portal:hover{transform:none}}
/* Direction-aware compact chrome: its space scrolls away with the content. */
#wordforgeDialog .wf-shell{position:relative}
#wordforgeDialog .wf-top{position:absolute;left:0;right:0;top:0;transition:transform .2s ease;box-shadow:0 5px 24px #050b1b77}
#wordforgeDialog .wf-top.wf-top-hidden{transform:translateY(-105%);pointer-events:none}
#wordforgeDialog .wf-main{padding-top:94px}
#wordforgeDialog .wf-status{position:absolute;left:0;right:0;top:70px}
.wf-skill-callout{position:absolute;left:15%;right:15%;top:23%;text-align:center;z-index:6;font-weight:1000;font-size:clamp(13px,2vw,22px);letter-spacing:3px;color:#fff0c4;text-shadow:0 2px 0 #2a1848,0 0 15px #ffdc7b;animation:wf-number 1s both}
@media(max-width:760px){#wordforgeDialog .wf-main{padding-top:74px}#wordforgeDialog .wf-status{top:62px}}
.wf-phase-two .wf-enemy{filter:drop-shadow(0 0 14px #c8a5ff) drop-shadow(0 7px 8px #14132e66)}
.wf-phase-two .wf-circle-boss{border-color:#ffcf8e;box-shadow:0 0 25px #c76afd99,inset 0 0 20px #ffbc7244}
.wf-phase-title{position:absolute;top:30%;left:15%;right:15%;padding:13px 6px;background:linear-gradient(90deg,transparent,#261337e6,transparent);color:#ffe7a6;text-align:center;letter-spacing:3px;font-weight:1000;z-index:5;pointer-events:none;animation:wf-phase-banner 2s both}
@keyframes wf-phase-banner{0%{opacity:0;transform:scale(.8)}15%,70%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.08)}}
#wordforgeDialog .wf-cell.ghost:not(.occupied){background:linear-gradient(140deg,#75ecf4,#3eaaa9);color:#10283e}

/* Skills and counters have separate beats, so the outcome is readable. */
.wf-skill-active .wf-student{animation:wf-hero-cast .85s ease-in-out}
.wf-skill-active .wf-pet{filter:drop-shadow(0 0 20px #a9ebff)}
.wf-skill-sigil{position:absolute;left:20%;top:42%;z-index:5;font-size:70px;line-height:1;color:#fff0b5;text-shadow:0 0 22px #f7c770;animation:wf-number .9s both;pointer-events:none}
.wf-skill-guardian .wf-skill-sigil{color:#c0f9ff;text-shadow:0 0 25px #64caff}
.wf-skill-scout .wf-skill-sigil{color:#c9ffda;text-shadow:0 0 25px #66ffb0}
.wf-skill-keeper .wf-skill-sigil{color:#e9ceff;text-shadow:0 0 25px #c18aff}
.wf-counter .wf-enemy{animation:wf-counter-dive .7s ease-in-out}
.wf-team-hit .wf-pet,.wf-team-hit .wf-student{animation:wf-team-flinch .4s ease-out}
.wf-team-block .wf-circle-ally{box-shadow:0 0 40px #82edff,inset 0 0 25px #a2f4ff}
.wf-team-block .wf-taken{color:#b3f8ff;text-shadow:0 2px 0 #184855}
@keyframes wf-counter-dive{0%,100%{transform:translateX(0)}25%{transform:translateX(5%) rotate(4deg)}60%{transform:translateX(-22%) rotate(-5deg)}}
@keyframes wf-team-flinch{15%,50%{transform:translateX(-8%) rotate(-4deg);filter:brightness(1.35)}30%,70%{transform:translateX(2%) rotate(2deg)}}

/* Keep the actual battle visible while a phone user works on the word board. */
@media(max-width:760px){.wf-battle-grid>.wf-battle-left>.wf-stage{position:sticky;top:0;z-index:4;height:clamp(165px,26dvh,210px);flex-shrink:0}.wf-stage-hud .wf-health b,.wf-stage-hud .wf-health strong{font-size:10px}}

/* Free-word casting: no rack, route, clue or year-level word gate. */
.wf-sprite{object-fit:contain;object-position:center;max-width:100%;max-height:100%;user-select:none}
.wf-boss-card-art{padding:6px;isolation:isolate}.wf-boss-card-art .wf-sprite{width:100%;height:100%}
.wf-hero-display .wf-sprite{width:49%!important;flex-shrink:0}.wf-hero-display .wf-sprite+.wf-sprite{margin-left:0}
.wf-portal-art .wf-sprite{width:50%;flex-shrink:0}.wf-portal-art .wf-sprite+.wf-sprite{margin-left:0}
.wf-spell-preview{position:relative;overflow:hidden;min-height:160px;padding:22px 14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;margin-bottom:20px;border:1px solid #7397c455;border-radius:15px;background:radial-gradient(ellipse at 50% 100%,#593f8066,transparent 75%),#0e182c;text-align:center}
.wf-preview-star{color:#8caacb;font-size:27px;line-height:1}.wf-spell-preview.ready .wf-preview-star{color:#ffe09d;text-shadow:0 0 20px #ffd363}
.wf-word-tiles{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;max-width:100%;min-height:36px;align-items:center}.wf-word-tiles>b{display:grid;place-items:center;min-width:30px;height:39px;padding:3px 7px;border-radius:7px;background:linear-gradient(140deg,#fef0c1,#eabd78);box-shadow:0 3px 0 #8b6747;color:#332b43;font-size:23px;line-height:1}.wf-word-tiles>span{font-size:14px;color:#c6c4e0}.wf-spell-preview small{color:#a3bbd7;font-size:10px;letter-spacing:1px}.wf-spell-preview.ready small{color:#a6f5d8}.wf-spell-preview.ready{border-color:#83d4cb77;box-shadow:inset 0 0 30px #65d8bb11}
.wf-keyboard{display:grid;gap:7px;margin:6px 0 21px}.wf-keyboard>div{display:flex;justify-content:center;gap:5px}.wf-keyboard button{flex:0 1 9.1%;min-width:0;height:44px;padding:0;border:1px solid #bacced88;border-radius:7px;background:linear-gradient(#edf2ff,#bdc9ed);box-shadow:0 3px 0 #6978a2;color:#1b294a;font-size:17px;font-weight:900}.wf-keyboard button:active{transform:translateY(2px);box-shadow:0 1px 0 #6978a2}.wf-keyboard button:hover{background:#fff0c8}
.wf-spell-powers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0 20px}.wf-spell-powers button{padding:10px 3px;display:grid;gap:3px;justify-items:center;min-width:0;border:1px solid #7a86b65e;border-radius:10px;background:#19233a;color:#bac7e1}.wf-spell-powers button>span{font-size:22px;color:#c9b0ea}.wf-spell-powers b{font-size:12px}.wf-spell-powers small{font-size:9px;color:#b8c4df}.wf-spell-powers button.selected{border-color:#f4d58e;background:linear-gradient(145deg,#4b3b4c,#2c2b42);color:#ffe6b3;box-shadow:0 0 0 1px #f4d58e55}.wf-spell-powers button.selected>span{color:#ffe6b3}
.wf-cast-actions{grid-template-columns:1fr}.wf-cast-actions button{min-height:56px;font-size:18px!important}.wf-freedom-note{font-size:11px;text-align:center;color:#abbad5;margin-top:13px!important}.wf-word-field input{font-size:19px!important;letter-spacing:1px}.wf-word-field input::placeholder{font-size:12px;letter-spacing:0;text-transform:none;font-weight:500}.wf-word-list button b{overflow-wrap:anywhere}
@media(max-width:760px){.wf-spell-preview{min-height:114px;gap:9px;padding:14px 10px;margin-bottom:14px}.wf-word-tiles>b{min-width:25px;height:33px;padding:3px 5px;font-size:19px}.wf-keyboard button{font-size:15px;height:42px}.wf-keyboard>div{gap:4px}.wf-spell-powers{gap:6px}.wf-spell-powers small{font-size:8px}.wf-draft-note{font-size:11px}.wf-hero-display .wf-sprite{height:180px!important}.wf-portal-art{right:0;width:40%;opacity:.8}.wf-portal-copy{max-width:68%}.wf-lobby-hero>div:first-child{max-width:100%}.wf-hero-display{right:0;bottom:8px;width:48%;height:170px}.wf-badges{max-width:50%}}
/* v5.33: a shared story scene and an authentic connected-word board. */
.wf-portal,.wf-lobby-hero{display:grid;grid-template-columns:minmax(300px,.34fr) minmax(0,.66fr);padding:0;min-height:0;gap:0;align-items:stretch;background:linear-gradient(125deg,#191a3c,#182948 48%,#314062);border-color:#b099dc88}
.wf-portal-copy,.wf-lobby-hero>div:first-child{padding:clamp(22px,2.8vw,48px);max-width:none;gap:13px;align-self:center}
.wf-portal-copy>strong{font-size:clamp(28px,2.8vw,48px)}.wf-portal-copy>span{max-width:none}.wf-lobby-hero h1{font-size:clamp(32px,3.5vw,59px)!important}.wf-lobby-hero p:not(.wf-kicker){font-size:14px}.wf-lobby-hero .wf-badges{max-width:none;margin:0}
.wf-cover-scene{position:relative;display:block;min-width:0;overflow:hidden;align-self:stretch;min-height:285px}.wf-cover-scene img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}.wf-cover-scene::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#1b254600,transparent 70%,#302a4a11);box-shadow:inset 15px 0 28px #1b254633}
.wf-cover-steps{display:flex;gap:8px;flex-wrap:wrap}.wf-cover-steps i{font-style:normal;border:1px solid #a99fe266;border-radius:20px;background:#a299d81c;color:#e8d8ff;font-size:11px;padding:5px 9px}.wf-cover-steps i:nth-child(2){color:#a8f3e1}.wf-cover-steps i:nth-child(3){color:#ffdc97}
.wf-companion-power{border-color:color-mix(in srgb,var(--pet-colour) 42%,transparent);background:radial-gradient(circle at 7% 30%,color-mix(in srgb,var(--pet-colour) 17%,transparent),transparent 48%),#182239;grid-template-columns:145px 1fr;gap:20px}.wf-partner-portrait{align-self:start;display:grid;justify-items:center;gap:10px;padding-top:26px}.wf-partner-portrait>svg{width:145px;height:170px}.wf-partner-portrait>span{border:1px solid var(--pet-colour);border-radius:20px;padding:6px 13px;color:var(--pet-colour);font-size:12px;background:#10233bb3;font-weight:900}.wf-pet-skill-description{display:grid;gap:7px;padding:13px 15px;border:1px solid color-mix(in srgb,var(--pet-colour) 28%,transparent);border-radius:12px;background:#0e1837a6;margin-top:13px}.wf-pet-skill-description b{color:var(--pet-colour);font-size:17px}.wf-pet-skill-description span{color:#d2daeb;font-size:12px;line-height:1.5}.wf-matchup{color:#bccbe1!important;font-size:11px!important}.wf-matchup.strong{color:#f6d791!important;font-weight:900}.wf-bond-line{display:flex;justify-content:space-between;gap:8px;margin-top:15px;color:#ffe4ac;font-size:12px}.wf-bond-line span{color:#c5d3e6;font-size:10px}.wf-bond-meter{height:7px;overflow:hidden;border-radius:7px;background:#0b142b;margin-top:7px}.wf-bond-meter i{display:block;height:100%;background:linear-gradient(90deg,var(--pet-colour),#ffe1a5);border-radius:inherit}
.wf-pet-link{display:flex;align-items:center;gap:11px;padding:13px 15px;margin-top:17px;border:1px solid color-mix(in srgb,var(--pet-colour) 40%,transparent);border-radius:13px;background:linear-gradient(105deg,#163647,#252243);flex-wrap:wrap}.wf-element-orb{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;border:1px solid var(--pet-colour);color:var(--pet-colour);background:#0e1934;font-size:25px;box-shadow:0 0 16px color-mix(in srgb,var(--pet-colour) 20%,transparent)}.wf-pet-link>div:not(.wf-charge-pips){flex:1;display:grid;gap:4px;min-width:145px}.wf-pet-link b{font-size:13px;color:#e4f4ff}.wf-pet-link span:not(.wf-element-orb){color:var(--pet-colour);font-size:11px}.wf-charge-pips{display:flex;gap:4px;color:#607187}.wf-charge-pips i{font-style:normal;font-size:20px}.wf-charge-pips .lit{color:var(--pet-colour);text-shadow:0 0 12px var(--pet-colour)}.wf-pet-link>small{width:100%;padding-left:51px;color:#ecdba8;font-size:10px}
.wf-battle-grid{grid-template-columns:minmax(0,.85fr) minmax(510px,1.15fr);gap:22px}.wf-battle-left{position:sticky;top:0}.wf-stage{height:clamp(270px,30vw,440px)}.wf-forge-panel{padding:19px;max-width:1050px;width:100%;justify-self:center}
.wf-rack-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0;color:#e9dcbd}.wf-rack-heading b{font-size:13px}.wf-rack-heading small{font-size:10px;color:#b0c6de}.wf-letter-rack{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;padding:9px 12px 13px;border-radius:12px;background:linear-gradient(#1c2f51,#0a152d);border:1px solid #7a9ac877;box-shadow:inset 0 -5px 0 #091021}.wf-letter-rack button{position:relative;aspect-ratio:1.18;max-height:69px;min-height:43px;min-width:0;border:1px solid #ffe7ae;border-radius:7px;background:linear-gradient(140deg,#fff9e1,#e1bd7c);color:#322a44;box-shadow:0 4px 0 #8d633e;padding:0;touch-action:manipulation}.wf-letter-rack button b{font-size:clamp(20px,2vw,30px)}.wf-letter-rack button small{position:absolute;right:6px;bottom:4px;font-size:10px;color:#665238}.wf-letter-rack button.selected{outline:3px solid #84efff;outline-offset:2px;transform:translateY(-4px);box-shadow:0 0 18px #6cf5ec55,0 5px 0 #75542f}.wf-letter-rack button:disabled{opacity:.22!important;box-shadow:none}.wf-rack-tools{display:flex;gap:8px;justify-content:flex-end;margin:12px 0}.wf-rack-tools button{font-size:11px;min-height:36px;padding:6px 10px}.wf-blank-picker{display:grid;grid-template-columns:repeat(9,1fr);gap:6px;padding:12px;background:#29354b;border:1px solid #e4c18d;border-radius:12px;margin-top:10px}.wf-blank-picker button{min-width:0;padding:4px;min-height:38px}
.wf-board-controls{display:flex;justify-content:space-between;align-items:center;margin:10px 0;gap:8px;color:#bed3e9;font-size:11px}.wf-board-controls button{min-height:34px;padding:5px 10px;font-size:10px}.wf-board-viewport{overflow:auto;overscroll-behavior:contain;border:2px solid #8174ae;border-radius:12px;max-height:660px;background:#10172d;scrollbar-color:#9f8bc6 #152038;padding:8px;scroll-behavior:smooth}.wf-crossword{display:grid;grid-template-columns:repeat(15,minmax(0,1fr));gap:3px;width:810px;aspect-ratio:1}.wf-board-viewport.fit .wf-crossword{width:100%;min-width:0}.wf-square{position:relative;display:grid;place-items:center;min-width:0!important;min-height:0!important;padding:0!important;border:1px solid #8199c343;border-radius:4px;background:linear-gradient(135deg,#2a3653,#26304b);color:#b6c9e1;line-height:1;box-shadow:0 2px 0 #080d1a;aspect-ratio:1}.wf-square>span{font-size:clamp(5px,.64vw,10px);letter-spacing:0;font-weight:900}.wf-square>small{position:absolute;bottom:2px;right:2px;font-size:clamp(5px,.65vw,10px);font-weight:700}.wf-square>b{font-size:clamp(11px,1.35vw,23px)}.wf-square.premium-DL{background:#26556c;color:#b3f1ff}.wf-square.premium-TL{background:#304285;color:#b4c9ff}.wf-square.premium-DW{background:#695173;color:#fdd8ec}.wf-square.premium-TW{background:#803f55;color:#ffdbcc}.wf-square.fixed{background:linear-gradient(145deg,#fff6d8,#d9bb83);color:#302c42;border-color:#e4c78f}.wf-square.draft{background:linear-gradient(135deg,#e9d5ff,#b597dd);color:#282944;border-color:#dcc0ff;box-shadow:0 0 0 1px #d3afff,0 2px 0 #553c73}.wf-square.draft.valid{background:linear-gradient(135deg,#bdfcee,#73d6cc);color:#143e41;border-color:#bdfbec}.wf-square.cursor{outline:2px solid #e1caff;outline-offset:-2px}.wf-square:focus-visible{outline:3px solid #fff6b5!important;outline-offset:0!important}.wf-premium-key{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 12px;padding:11px 0;color:#b5c7df;font-size:9px}.wf-premium-key span{display:flex;align-items:center;gap:4px}.wf-premium-key i{width:9px;height:9px;border-radius:2px;background:#56a6c1}.wf-premium-key .tl{background:#6d8bf0}.wf-premium-key .dw{background:#bd83b7}.wf-premium-key .tw{background:#ea839b}
.wf-move-preview{display:grid;gap:5px;padding:13px 15px;border-radius:12px;background:#13213c;border:1px solid #7187b455;min-height:70px}.wf-move-preview b{font-size:18px;letter-spacing:.5px;color:#f8e3b6;overflow-wrap:anywhere}.wf-move-preview span{font-size:11px;color:#b5c8e2;line-height:1.5}.wf-move-preview.valid{border-color:#80ddc588}.wf-move-preview.valid span{color:#a5efd6}.wf-forge-panel .wf-spell-powers{margin:12px 0;gap:8px}.wf-forge-panel .wf-spell-powers button{grid-template-columns:20px 1fr;grid-template-rows:auto auto;column-gap:4px;padding:8px 4px}.wf-forge-panel .wf-spell-powers button>span{grid-row:span 2;align-self:center}.wf-forge-panel .wf-spell-powers button>b,.wf-forge-panel .wf-spell-powers button>small{justify-self:start}.wf-assist-callout{position:absolute;left:6%;bottom:18%;z-index:6;padding:9px 14px;border:1px solid #b4f7e9;border-radius:12px;background:#132d47ec;box-shadow:0 0 20px #6af3d355;font-weight:1000;color:#b4fbea;font-size:clamp(12px,1.3vw,20px);animation:wf-number 1s both}.wf-pet-assisting .wf-pet{filter:drop-shadow(0 0 20px #b6fff0);animation:wf-ultimate-cast .9s ease-out}
@media(min-width:1600px){.wf-battle-grid{grid-template-columns:minmax(0,.85fr) minmax(630px,1.15fr)}.wf-forge-panel{padding:22px}.wf-board-viewport{max-height:760px}}
@media(max-width:1100px){.wf-portal,.wf-lobby-hero{grid-template-columns:minmax(250px,.36fr) minmax(0,.64fr)}.wf-cover-scene{min-height:295px}.wf-portal-copy,.wf-lobby-hero>div:first-child{padding:23px}.wf-lobby-hero h1{font-size:36px!important}.wf-battle-grid{display:flex;flex-direction:column}.wf-battle-left{position:static;display:contents}.wf-stage{order:0;width:100%;height:280px}.wf-pet-link{order:1;width:100%;margin-top:0}.wf-threat{order:2;margin-top:0;width:100%}.wf-forge-panel{order:3;max-width:820px;align-self:center}.wf-skills{order:4;width:100%;margin-top:0}.wf-support{order:5}.wf-last-event{order:6}.wf-square>b{font-size:clamp(15px,2.4vw,24px)}.wf-square>span{font-size:8px}.wf-square>small{font-size:8px}}
@media(max-width:700px){.wf-portal,.wf-lobby-hero{display:flex;flex-direction:column;gap:0;min-height:0}.wf-portal-copy,.wf-lobby-hero>div:first-child{width:100%;max-width:none;padding:22px;gap:10px}.wf-portal-copy>span,.wf-lobby-hero p:not(.wf-kicker){max-width:none}.wf-portal-copy>b{margin-top:3px}.wf-portal .wf-cover-scene,.wf-lobby-hero .wf-cover-scene{width:100%;min-height:0;aspect-ratio:3;position:relative}.wf-cover-scene img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.wf-cover-scene::after{box-shadow:none}.wf-lobby-hero h1{font-size:36px!important}.wf-lobby-hero .wf-badges{max-width:none}.wf-companion-power{grid-template-columns:90px 1fr;padding:15px;gap:13px}.wf-partner-portrait>svg{width:90px;height:110px}.wf-partner-portrait>span{font-size:10px;padding:5px 8px}.wf-companion-power .wf-kicker{font-size:7px!important}.wf-pet-skill-description{padding:11px}.wf-pet-skill-description b{font-size:15px}.wf-bond-line{flex-wrap:wrap;gap:3px}.wf-battle-grid{gap:12px}.wf-battle-left>.wf-stage{position:sticky;top:0;z-index:4;height:clamp(160px,25dvh,205px)}.wf-pet-link{padding:10px;gap:8px}.wf-pet-link b{font-size:11px}.wf-pet-link span:not(.wf-element-orb){font-size:10px}.wf-element-orb{width:32px;height:32px;font-size:22px}.wf-charge-pips i{font-size:17px}.wf-pet-link>small{padding-left:40px}.wf-forge-panel{padding:12px}.wf-rack-heading{align-items:start}.wf-rack-heading small{font-size:9px;max-width:160px;text-align:right}.wf-letter-rack{gap:6px;padding:8px}.wf-letter-rack button{min-height:42px}.wf-letter-rack button b{font-size:22px}.wf-letter-rack button small{font-size:8px;right:4px;bottom:4px}.wf-rack-tools{justify-content:space-between;gap:6px}.wf-rack-tools button{font-size:10px;padding:6px 9px}.wf-board-viewport{padding:5px;max-height:54dvh}.wf-crossword{gap:2px;width:660px}.wf-square>b{font-size:19px}.wf-square>span{font-size:9px}.wf-square>small{font-size:8px}.wf-board-viewport.fit .wf-square>b{font-size:clamp(10px,3vw,17px)}.wf-board-viewport.fit .wf-square>span{font-size:clamp(5px,1.5vw,8px)}.wf-board-viewport.fit .wf-square>small{font-size:clamp(4px,1.4vw,7px);bottom:1px;right:1px}.wf-premium-key{font-size:8px;gap:8px}.wf-blank-picker{grid-template-columns:repeat(7,1fr)}.wf-forge-panel .wf-spell-powers{gap:5px}.wf-forge-panel .wf-spell-powers button{display:flex;flex-direction:column;align-items:center;gap:2px}.wf-spell-powers b{font-size:11px}.wf-move-preview b{font-size:16px}.wf-move-preview span{font-size:10px}}
/* Keep the party together at tablet widths and keep rack + battle visible while placing tiles. */
#wfDraftArea{position:sticky;top:0;z-index:3;background:linear-gradient(145deg,#202e49,#17223a);padding:2px 0 1px;border-radius:10px}
@media(max-width:1100px){
 .wf-portal,.wf-lobby-hero{display:flex;flex-direction:column;gap:0;min-height:0}
 .wf-portal-copy,.wf-lobby-hero>div:first-child{width:100%;max-width:none;padding:22px;gap:10px}
 .wf-portal-copy>span,.wf-lobby-hero p:not(.wf-kicker){max-width:none}
 .wf-portal .wf-cover-scene,.wf-lobby-hero .wf-cover-scene{width:100%;min-height:0;aspect-ratio:3;position:relative}
 .wf-cover-scene img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
 .wf-cover-scene::after{box-shadow:none}
 .wf-battle-left>.wf-stage{position:sticky;top:0;z-index:4;height:clamp(160px,25dvh,220px);flex-shrink:0}
 #wfDraftArea{top:calc(clamp(160px,25dvh,220px) + 12px)}
}
@media(max-width:700px){.wf-battle-left>.wf-stage{height:clamp(150px,24dvh,195px)}#wfDraftArea{top:calc(clamp(150px,24dvh,195px) + 12px)}}
/* v5.34: real alternating word duel, compact fit board, larger character selection. */
.wf-loadout{grid-template-columns:minmax(0,1.5fr) minmax(330px,.75fr);align-items:start}
.wf-heroes{gap:12px}.wf-heroes button{padding:12px 8px 17px;background:radial-gradient(ellipse at 50% 43%,#6562b54d,transparent 67%),linear-gradient(155deg,#273351,#151e37);border:1px solid #7e80ba5c;border-radius:20px;overflow:hidden}
.wf-heroes button.selected{background:radial-gradient(ellipse at 50% 43%,#c795604d,transparent 70%),linear-gradient(145deg,#313350,#29223d);border-color:#ffd476;box-shadow:0 0 22px #ffc66029,inset 0 -4px #d1974940}
.wf-heroes .wf-sprite{width:100%;height:clamp(210px,20vw,300px)!important;object-fit:contain;transform:scale(1.06);filter:drop-shadow(0 8px 10px #080c3180)}
.wf-heroes b{font-size:19px!important}.wf-heroes small{font-size:12px!important;color:#f9dda2}.wf-skill-description{font-size:14px;line-height:1.5;margin-bottom:0}
.wf-partner-portrait .world-sprite{width:170px;height:195px;background:none!important;border:0!important;box-shadow:none!important}.wf-partner-portrait .world-sprite svg{width:100%;height:100%;background:none!important}
.wf-companion-power{grid-template-columns:170px 1fr;gap:16px}.wf-companion-power .wf-partner-portrait{padding-top:12px}
.wf-ai-style{color:#eedaa5!important;font-size:11px!important;letter-spacing:0!important;line-height:1.4}
.wf-battle-grid{grid-template-columns:minmax(340px,.9fr) minmax(440px,1.1fr);gap:20px}.wf-stage{height:clamp(220px,25vw,330px)}.wf-forge-panel{max-width:740px;padding:14px}.wf-forge-heading{margin-bottom:8px}.wf-forge-heading h2{font-size:24px!important}.wf-forge-heading>b{font-size:11px}
.wf-duel-score{display:grid;grid-template-columns:1fr 32px 1fr;align-items:center;gap:6px;padding:9px 12px;background:#0b142c;border:1px solid #7a8ec859;border-radius:13px}.wf-duel-score>span{color:#e5c778;text-align:center;font-family:var(--quest-display);font-size:17px}.wf-duel-score>div{display:grid;gap:0}.wf-duel-score .rival{text-align:right}.wf-duel-score small{font-size:10px;font-weight:900;letter-spacing:1px;color:#97ebde}.wf-duel-score .rival small{color:#d4b5ff}.wf-duel-score b{font-size:25px;line-height:1.1;color:#fff5d1}.wf-duel-score em{font-style:normal;font-size:10px;color:#b8c8e0;font-weight:600}
.wf-turn-note{display:flex;justify-content:space-between;gap:6px;align-items:center;padding:7px 2px;color:#9cdcca;font-size:10px}.wf-turn-note>span{color:#e3c892;font-size:10px}
.wf-letter-rack{padding:6px 10px 10px;gap:7px}.wf-letter-rack button{min-height:38px;max-height:48px;aspect-ratio:1.3}.wf-letter-rack button b{font-size:25px}.wf-rack-heading{margin:5px 0}.wf-rack-tools{margin:8px 0;gap:7px}.wf-rack-tools button{min-height:30px;font-size:10px;padding:4px 8px}.wf-board-controls{margin:6px 0}.wf-board-controls button{min-height:29px}
.wf-board-viewport.fit{width:min(100%,max(245px,calc(100vh - 355px)),520px);width:min(100%,max(245px,calc(100svh - 355px)),520px);max-height:none!important;overflow:visible;margin-inline:auto;padding:5px;border-radius:10px}
.wf-board-viewport.fit .wf-crossword{width:100%;max-width:none;gap:2px;aspect-ratio:1}
.wf-board-viewport.fit .wf-square>b{font-size:clamp(11px,1.5vw,20px)}.wf-board-viewport.fit .wf-square>span{font-size:clamp(5px,.7vw,9px)}.wf-board-viewport.fit .wf-square>small{font-size:clamp(5px,.6vw,8px);right:1px;bottom:1px}
.wf-square.crown-cell{background:radial-gradient(circle,#876326,#563e39);border-color:#ffd779;color:#ffe89c}.wf-square.crown-cell>span{font-size:20px!important;text-shadow:0 0 9px #ffcd50}
.wf-square.boss-owned{background:linear-gradient(145deg,#f3dbff,#b8a1df);border-color:#dfbcff;color:#32254f}.wf-square.boss-latest{outline:2px solid #c995ff;outline-offset:-2px}.wf-square.boss-arrival{animation:wf-new-tile .7s both}
@keyframes wf-new-tile{0%{transform:scale(.65);filter:brightness(1.7)}65%{transform:scale(1.08)}100%{transform:scale(1)}}
.wf-premium-key{padding:7px 0;font-size:9px;gap:6px 10px}.wf-move-preview{min-height:53px;padding:9px 12px;gap:3px}.wf-move-preview b{font-size:16px}.wf-move-preview span{font-size:10px}.wf-forge-panel .wf-spell-powers{margin:8px 0}.wf-forge-panel .wf-spell-powers button{min-height:43px}.wf-cast-actions .wf-gold{min-height:43px;padding:9px 16px;font-size:17px}
.wf-duel-log{margin-top:12px;border:1px solid #9c8ccc55;background:#141f36;border-radius:13px;padding:11px 13px}.wf-duel-log summary{cursor:pointer;color:#efd9a8;font-weight:900;font-size:14px}.wf-duel-log summary small{font-size:10px;color:#a8b8d8;margin-left:10px;font-weight:600}.wf-duel-log ol{list-style:none;padding:0;margin:8px 0 0;display:grid;gap:5px}.wf-duel-log li{display:flex;align-items:center;gap:9px;padding:5px 8px;background:#1c2c44;border-radius:7px;font-size:11px}.wf-duel-log li>span{min-width:60px;color:#96e4da}.wf-duel-log li.boss>span{color:#d8b8ff}.wf-duel-log li>button{border:0;background:transparent;padding:3px;color:#f4e9d2;font-size:13px;font-weight:900;min-height:27px}.wf-duel-log li>b{margin-left:auto;color:#ffe1a0}.wf-duel-log li>em{font-style:normal;color:#b9c8df}
.wf-rival-callout{position:absolute;right:4%;bottom:19%;z-index:7;padding:10px 13px;border:1px solid #e8c5ff;border-radius:12px;background:#342652ed;color:#fff0ff;font-size:clamp(12px,1.2vw,19px);font-weight:900;box-shadow:0 0 25px #ce8fff55;animation:wf-number .7s both}.wf-final-score{display:flex;justify-content:center;gap:12px;align-items:center;flex-wrap:wrap;margin:15px 0;color:#c8d9f2;font-size:13px}.wf-final-score b{font-size:28px;color:#ffe3a4}
@media(min-width:1500px){.wf-forge-panel{max-width:780px}.wf-battle-grid{grid-template-columns:minmax(440px,.9fr) minmax(500px,1.1fr)}}
@media(max-width:1100px){.wf-loadout{grid-template-columns:1fr}.wf-battle-grid{display:grid;grid-template-columns:minmax(255px,.75fr) minmax(340px,1fr);gap:13px}.wf-battle-left{position:sticky;display:block;top:0}.wf-battle-left>.wf-stage{height:230px;position:relative}.wf-forge-panel{max-width:none;padding:10px}.wf-pet-link{margin-top:12px}.wf-skills{margin-top:12px}.wf-letter-rack button b{font-size:22px}#wfDraftArea{top:0}.wf-companion-power{grid-template-columns:190px 1fr}.wf-partner-portrait .world-sprite{width:185px;height:210px}.wf-forge-panel .wf-spell-powers button{display:flex;flex-direction:column;align-items:center;gap:1px;padding:6px 3px}.wf-spell-powers b{font-size:11px}}
@media(max-width:760px){.wf-heroes{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.wf-heroes .wf-sprite{height:210px!important}.wf-heroes b{font-size:18px!important}.wf-battle-grid{display:flex;flex-direction:column;gap:10px}.wf-battle-left{display:contents;position:static}.wf-battle-left>.wf-stage{position:relative;top:auto;height:175px;order:0}.wf-pet-link{order:1;margin-top:0}.wf-forge-panel{order:2;max-width:600px}.wf-threat{order:3}.wf-skills{order:4;margin-top:0}.wf-duel-log{order:5;width:100%;margin-top:0}.wf-support{order:6}.wf-last-event{order:7}.wf-board-viewport.fit{width:min(100%,max(245px,calc(100svh - 355px)),430px)}.wf-board-viewport.fit .wf-square>b{font-size:clamp(10px,3.7vw,18px)}.wf-board-viewport.fit .wf-square>span{font-size:7px}.wf-board-viewport.fit .wf-square>small{font-size:6px}.wf-companion-power{grid-template-columns:115px 1fr;padding:14px}.wf-partner-portrait .world-sprite{width:115px;height:145px}.wf-pet-link{padding:9px}.wf-pet-link>small{display:none}.wf-rack-tools button{font-size:10px}.wf-rack-heading small{font-size:9px}.wf-square.crown-cell>span{font-size:16px!important}#wfDraftArea{position:static}}

.wf-reduced .wf-square.boss-latest{animation:none}

.wf-crossword{grid-template-rows:repeat(15,minmax(0,1fr))}
@media(min-width:761px) and (max-width:1599px){.wf-heroes{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Cast beside the board on wide screens; below it on phones. */
.wf-battle-cast{margin-top:12px}.wf-battle-cast .wf-spell-powers{margin:8px 0;gap:7px}.wf-battle-cast .wf-spell-powers button{min-height:47px;padding:6px}.wf-battle-cast .wf-move-preview{min-height:52px}
.wf-board-viewport.fit{width:min(100%,max(245px,calc(100vh - 410px)),520px);width:min(100%,max(245px,calc(100svh - 410px)),520px)}
.wf-forge-panel .wf-letter-rack button{min-height:36px;max-height:44px}.wf-forge-panel .wf-rack-tools{margin:6px 0}.wf-forge-panel .wf-rack-tools button{min-height:27px}.wf-forge-panel .wf-duel-score{padding:6px 10px}.wf-forge-panel .wf-rack-heading{margin:4px 0}
@media(max-width:760px){.wf-battle-cast{order:3;width:100%;margin-top:0}.wf-threat{order:4}.wf-skills{order:5}.wf-duel-log{order:6}.wf-support{order:7}.wf-last-event{order:8}.wf-battle-cast .wf-spell-powers button{display:flex;flex-direction:column;align-items:center}.wf-board-viewport.fit{width:min(100%,max(245px,calc(100svh - 365px)),430px)}}
