/* A native top-layer lesson: focus, explanations and actions stay together on phones. */
#tutorial268-dialog{box-sizing:border-box;position:fixed;inset:0;width:min(960px,calc(100vw - 32px));max-width:960px;max-height:calc(100dvh - 24px);margin:auto;padding:0;border:1px solid #b6aa82;border-radius:22px;background:#edf0e4;color:#21362f;box-shadow:0 22px 90px #051a16a6;overflow:auto;overscroll-behavior:contain}
#tutorial268-dialog::backdrop{background:#071e1ed4;backdrop-filter:blur(5px)}
#tutorial268-dialog *{box-sizing:border-box}
#tutorial268-dialog button{font:inherit;cursor:pointer;min-height:44px;touch-action:manipulation}
#tutorial268-dialog button:focus-visible{outline:3px solid #285fbd;outline-offset:5px}
#tutorial268-dialog button:disabled{cursor:default;color:inherit;opacity:1}
.guide268-shell{padding:22px 28px 16px}
.guide268-header{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;letter-spacing:.02em}
.guide268-header button,.guide268-restart{border:0;background:transparent;color:#405b52;text-decoration:underline;text-underline-offset:4px}
.guide268-progress{display:flex;gap:5px;align-items:center;margin:14px 0 20px}
.guide268-progress span{height:5px;flex:1;border-radius:4px;background:#d0d8c9}.guide268-progress span.done{background:#658049}.guide268-progress small{margin-left:8px;white-space:nowrap}
.guide268-coach{display:flex;gap:14px;align-items:flex-start;background:#fffdf6;border:1px solid #d4c9a8;border-radius:14px;padding:17px 20px;margin-bottom:22px;box-shadow:0 4px 12px #173d3010}
.guide268-number{display:grid;place-items:center;background:#254b3f;color:#fff7d2;border:2px solid #b99b4d;border-radius:50%;width:36px;height:36px;flex:0 0 36px;font-weight:800}
#tutorial268-dialog h2{font-size:clamp(18px,3vw,23px);line-height:1.22;margin:0 0 7px;font-family:inherit;color:#203f33}
#tutorial268-dialog p{font-size:15px;line-height:1.5;margin:6px 0}
.guide268-stage{padding:5px 7px 14px;min-height:160px}
.guide268-start{display:flex;gap:24px;align-items:center;max-width:650px;margin:auto}.guide268-start>img{width:145px;height:200px;object-fit:cover;border-radius:70px 70px 14px 14px;border:2px solid #a98a4b}.guide268-start>div>strong{font-size:26px}.guide268-start ol{padding-left:20px;font-size:14px;line-height:1.9}
.guide268-band{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;max-width:720px;margin:4px auto 12px}
#tutorial268-dialog .guide268-unit{display:flex;position:relative;flex-direction:column;align-items:center;gap:7px;padding:9px 7px 12px;width:100%;border:1px solid #c0c8b8;border-radius:14px;background:#dfe5d8;color:#294236;box-shadow:0 3px 8px #24422b13;font-size:13px;text-align:center}
#tutorial268-dialog .guide268-unit>img,#tutorial268-dialog .guide268-unit>svg,#tutorial268-dialog .guide268-unit>.art{width:100%;height:130px;object-fit:cover;border-radius:9px;max-width:140px}
.guide268-slot{font-size:11px;font-weight:700;color:#45634d}.guide268-unit strong{min-height:32px;display:flex;align-items:center;line-height:1.2;overflow-wrap:anywhere}
.guide268-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;width:100%;font-size:14px}.guide268-stats span{display:flex;flex-direction:column}.guide268-stats small{font-size:9px;overflow-wrap:anywhere}
.guide268-market{max-width:600px;margin:auto;text-align:center}.guide268-currency{display:inline-block;padding:7px 18px;border:1px solid #c6b26f;background:#fff6d8;border-radius:30px;font-weight:750;margin-bottom:15px}.guide268-offer{width:185px;margin:auto}.guide268-offer>span{display:block;margin-top:12px;font-weight:700}.guide268-market>p{max-width:430px;margin:16px auto!important}
#tutorial268-dialog .guide268-highlight{border:2px solid #9c7121;background:#fff8df;box-shadow:0 0 0 4px #e9bd5273,0 5px 18px #453c1e30;animation:guide268-glow 2s ease-in-out infinite}
#tutorial268-dialog .guide268-highlight:before{content:'↓';position:absolute;top:-21px;left:calc(50% - 12px);width:24px;height:24px;border-radius:50%;display:grid;place-items:center;color:#fff;background:#8b661c;font-weight:800;font-size:18px;pointer-events:none}
.guide268-action{position:relative;border:1px solid #a3b29b;border-radius:12px;padding:13px 28px;background:#e3e8da;font-weight:750;min-width:170px;color:#243e31}
.guide268-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin:9px 0 8px}.guide268-footer{text-align:center;padding:7px 2px 0}.guide268-restart{font-size:12px!important;margin-top:4px}.guide268-pointer{color:#6e5018;font-weight:700}
.guide268-pact{max-width:600px;border:1px solid #c1b47e;background:#faf7e9;border-radius:12px;margin:12px auto;padding:13px 18px;text-align:center}.guide268-pact>strong{font-size:17px}.guide268-source{color:#184f9d}.guide268-partner{color:#76510c}#tutorial268-dialog .guide268-unit.guide268-source{border:2px solid #3174c6}#tutorial268-dialog .guide268-unit.guide268-partner{border:2px solid #b88c30}.guide268-role{font-size:11px;font-weight:800}
.guide268-combat{max-width:790px;margin:auto;overflow:hidden;border-radius:14px}.guide268-combat .combat-scene{margin:0}.guide268-result{text-align:center;background:#fffdf3;border:1px solid #cfbf8b;border-radius:12px;padding:15px;margin-top:14px}.guide268-result>strong{font-size:22px}.guide268-result h3{font-size:15px;margin:13px 0 6px}
@keyframes guide268-glow{50%{box-shadow:0 0 0 7px #e9bd5242,0 5px 18px #453c1e30}}
@media(max-width:600px){#tutorial268-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:16px}.guide268-shell{padding:13px 12px 10px}.guide268-header{font-size:12px}.guide268-header button{font-size:12px;max-width:140px}.guide268-progress{margin:5px 0 12px}.guide268-coach{padding:12px;gap:9px;margin-bottom:18px}.guide268-number{width:28px;height:28px;flex-basis:28px;font-size:13px}#tutorial268-dialog p{font-size:13px}.guide268-stage{padding:4px 4px 9px}.guide268-band{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px;max-width:390px}#tutorial268-dialog .guide268-unit{padding:6px;gap:4px}#tutorial268-dialog .guide268-unit>img,#tutorial268-dialog .guide268-unit>svg,#tutorial268-dialog .guide268-unit>.art{height:92px;max-width:100px}.guide268-unit strong{min-height:26px;font-size:12px}.guide268-stats{font-size:12px}.guide268-start{gap:14px;align-items:flex-start}.guide268-start>img{width:95px;height:145px}.guide268-start ol{line-height:1.55;font-size:12px}.guide268-start>div>strong{font-size:20px}.guide268-pact{padding:10px}.guide268-action{width:100%;font-size:14px}.guide268-footer{padding-top:2px}.guide268-combat{font-size:12px}}
@media(prefers-reduced-motion:reduce){#tutorial268-dialog .guide268-highlight{animation:none}.guide268-combat *{animation:none!important;transition:none!important}}
@media(forced-colors:active){#tutorial268-dialog .guide268-highlight{outline:4px solid Highlight}.guide268-progress span.done{background:Highlight}}
/* The shared renderer normally lives below #app. Give the isolated lesson its own board layout. */
#tutorial268-dialog .guide268-combat{color:#243e35;background:#dce5d8;border:1px solid #a7b8a4;padding:10px}
#tutorial268-dialog .combat-scene{height:auto;min-height:0;padding:0;margin:0;background:transparent}
#tutorial268-dialog .combat-action-title{display:flex;justify-content:space-between;gap:10px;font-size:14px;margin:0 0 8px}
#tutorial268-dialog .combat-action-title small{display:block;font-size:10px}
#tutorial268-dialog .board-stage{position:relative;display:block;overflow:visible;height:auto;min-height:0}
#tutorial268-dialog .combat-lineups{display:grid;grid-template-columns:1fr;gap:14px;max-width:none;margin:0;padding:0;border:0;container-type:normal}
#tutorial268-dialog .combat-lineup{display:flex;flex-direction:column;align-items:stretch;gap:4px;margin:0;padding:0}
#tutorial268-dialog .army-heading{display:flex;gap:7px;align-items:center;margin:0;min-height:28px}
#tutorial268-dialog .army-heading .general-art{width:24px;height:30px;object-fit:cover;border-radius:4px}
#tutorial268-dialog .army-heading span{display:flex;align-items:baseline;gap:8px}#tutorial268-dialog .army-heading strong{font-size:13px}#tutorial268-dialog .army-heading small{font-size:11px}
#tutorial268-dialog .formation-direction-label{font-size:10px;color:#3b5846;margin:0}
#tutorial268-dialog .combat-minis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
#tutorial268-dialog .combat-mini{position:relative;display:flex;flex-direction:column;align-items:stretch;min-width:0;gap:0;padding:4px;border:1px solid #a2b699;border-radius:8px;background:#f2f4e9;color:#213e30;overflow:hidden}
#tutorial268-dialog .combat-position{font-size:9px;line-height:1.3;text-align:center;min-height:13px}
#tutorial268-dialog .combat-portrait{position:relative;width:100%;height:70px;overflow:hidden}
#tutorial268-dialog .combat-mini .art.portrait{width:100%;height:100%;min-height:0;aspect-ratio:auto;max-width:none;border-radius:4px;margin:0}
#tutorial268-dialog .card-art-image{width:100%;height:100%;object-fit:cover;object-position:center 28%}
#tutorial268-dialog .battle-card-info{display:flex;flex-direction:column;gap:3px;min-width:0;padding:4px 0 0}
#tutorial268-dialog .battle-card-info>strong{font-size:11px;line-height:1.15;text-align:center;min-height:25px;overflow-wrap:anywhere;color:inherit}
#tutorial268-dialog .battle-card-info .rarity-label,#tutorial268-dialog .battle-card-rank{display:none}
#tutorial268-dialog .battle-vitals{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;font-size:12px;color:#284935;line-height:1.2}
#tutorial268-dialog .battle-vitals small{font-size:11px;color:#385e78}#tutorial268-dialog .battle-vitals b{color:#8a3040}
#tutorial268-dialog .battle-health{height:4px;display:block;position:relative;background:#c6d0bf;overflow:hidden;border-radius:3px}#tutorial268-dialog .battle-health i{display:block;height:100%;background:#58884b}
#tutorial268-dialog .combat-mini.actor{border:2px solid #7757b7;box-shadow:0 0 0 1px #7757b7}#tutorial268-dialog .combat-mini.target{border:2px solid #a84137;box-shadow:0 0 0 1px #a84137}
#tutorial268-dialog .combat-mini.pact-source{border:3px solid #3174c6}#tutorial268-dialog .combat-mini.pact-partner{border:3px solid #b88c30}
#tutorial268-dialog .combat-mini.fallen{opacity:.45;filter:grayscale(1)}#tutorial268-dialog .combat-fallen{font-size:10px;text-align:center}
#tutorial268-dialog .battle-role{font-size:10px;text-align:center;color:#263a52;background:#e4e3f0;line-height:1.3}
#tutorial268-dialog .combat-caption{font-size:13px;line-height:1.4;background:#fffdf3;border-radius:7px;padding:8px;margin:9px 0 0;min-height:36px;color:#203e30}
#tutorial268-dialog .pact-cue{border:1px solid #b99b4d;border-radius:7px;background:#fff4ca;padding:6px;font-size:12px;margin-bottom:8px;color:#53431c}
#tutorial268-dialog .combat-moment-label{font-size:10px;color:#42604b}
#tutorial268-dialog .guide268-coach{position:sticky;top:0;z-index:4}
@media(max-width:600px){#tutorial268-dialog .guide268-combat{padding:7px}#tutorial268-dialog .combat-minis{gap:4px}#tutorial268-dialog .combat-mini{padding:2px}#tutorial268-dialog .combat-portrait{height:52px}#tutorial268-dialog .battle-card-info>strong{font-size:9px;min-height:24px}#tutorial268-dialog .battle-vitals{gap:2px;font-size:10px}#tutorial268-dialog .battle-vitals small{font-size:9px}#tutorial268-dialog .combat-position{font-size:8px}#tutorial268-dialog .combat-action-title{font-size:12px}}
