*{box-sizing:border-box}body{margin:0;background:#eae9e3;color:#332d23;font:14px/1.5 system-ui,sans-serif}button,a{touch-action:manipulation}button{font:inherit;color:inherit;border:1px solid #b9ae96;background:#fffaf0;border-radius:5px;padding:9px 15px;cursor:pointer}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible{outline:3px solid #8c672a;outline-offset:3px}a{color:#65573c;text-underline-offset:4px}.site-header{max-width:1264px;margin:auto;padding:20px 32px;display:flex;align-items:center;justify-content:space-between;gap:24px}.site-header img{width:200px;display:block}.site-header>a:last-child{font-size:12px}main{max-width:1264px;margin:auto;padding:12px 32px 35px}.study-heading{display:flex;align-items:end;justify-content:space-between;gap:24px;margin:5px 0 20px}.eyebrow{font-size:10px;letter-spacing:.12em;font-weight:750;text-transform:uppercase;margin:0 0 8px;color:#827254}h1{font:29px/1.15 Georgia,serif;margin:0}h2{font:24px/1.15 Georgia,serif;margin:0 0 16px}.view-tabs{display:flex;gap:5px;background:#ddd9cd;padding:4px;border-radius:7px}.view-tabs button{font-size:12px;border-color:transparent;background:transparent}.view-tabs button[aria-pressed=true]{background:#fffaf0;border-color:#c7bda7;box-shadow:0 1px 3px #44371e15}.game-frame{height:700px;display:grid;grid-template-rows:60px minmax(0,1fr) 60px;background:#f7f0df;border:1px solid #968263;border-radius:10px;overflow:hidden;box-shadow:0 14px 40px #352b2020}.game-header{display:grid;grid-template-columns:280px 1fr;background:#4a3a28;color:#dfd0b0;border-bottom:1px solid #352818}.game-title{padding:7px 22px;border-right:1px solid #6c5940;line-height:1.2;display:flex;justify-content:center;flex-direction:column}.game-title span{font:13px Georgia,serif;color:#d0bd94}.game-title strong{font-size:18px;letter-spacing:.025em;color:#fff3d7}.game-header nav{display:flex;align-items:stretch;justify-content:space-around;padding:0 12px;gap:5px}.game-header nav>*{font-size:11px;text-align:center;display:flex;align-items:center;justify-content:center;padding:0 12px;color:#cbb990}.game-header nav>strong{border-bottom:4px solid #d7b86d;background:#5c4830;color:#fff4d6;padding-top:4px}.game-content{display:grid;grid-template-columns:280px minmax(0,1fr);min-height:0}.journal{display:flex;flex-direction:column;min-height:0;background:#f3ebd8;border-right:1px solid #c2ad84}.journal-scroll{padding:25px 22px 12px;overflow:auto;flex:1;min-height:0}.journal h2{font-size:25px}.journal p{margin:0 0 16px}.quiet{color:#86795f;font-size:12px}.food{border-top:1px solid #d4c7a8;border-bottom:1px solid #d4c7a8;padding:13px 0;margin-top:24px;display:flex;flex-direction:column;gap:3px;font-size:12px}.food strong{color:#6d5c3e;font-size:11px;text-transform:uppercase;letter-spacing:.06em}.darwin{min-height:137px;display:flex;align-items:center;padding:0 15px 0 0;background:#e7d5ad;border-top:1px solid #d0b883}.darwin img{width:130px;height:137px;object-fit:contain;object-position:bottom;align-self:end}.darwin p{margin:0;font:italic 15px/1.45 Georgia,serif;color:#5a482d}.habitat{position:relative;min-width:0;min-height:0;background:#efe6cc;display:flex;flex-direction:column}.scene-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;height:69px;flex:none;padding:16px 22px 10px;border-bottom:1px solid #d8caab;background:#faf5e8}.scene-heading .eyebrow{margin-bottom:5px;font-size:9px}.scene-heading h2{font-size:22px;margin:0}.scene-heading>span{color:#88734a;font-size:12px;white-space:nowrap}.candidate-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:9px;padding:12px 18px 24px;flex:1;min-height:0;background-image:url(../million-years-layout/landscape.webp);background-size:cover;background-position:center}.candidate{position:relative;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:end;padding:0 4px 6px;border:1px solid #c1ad8180;background:#fffaf0b8;border-radius:7px}.candidate:hover,.candidate:focus-visible{background:#fffaf0ed;border-color:#8b6a30;box-shadow:0 2px 10px #68512615}.candidate[data-picked=true]{border:2px solid #806328;background:#fff9e7df}.candidate canvas{display:block;min-height:0;height:calc(100% - 18px);width:100%;object-fit:contain}.candidate-label{font-size:10px;line-height:18px;font-weight:650;color:#6b593b}.candidate .number{position:absolute;left:10px;top:8px;color:#9f8d67;font-size:10px}.scene-caption{position:absolute;bottom:5px;left:0;right:0;text-align:center;font-size:9px;color:#7e6b45;pointer-events:none}#population-canvas{display:block;min-height:0;flex:1;width:100%;height:calc(100% - 69px);background:#f0e6cb url(../million-years-layout/landscape.webp) center/cover}#population-canvas[hidden],#candidate-grid[hidden]{display:none}#journal-log article{border-bottom:1px solid #d6c9ab;padding:14px 0 0}#journal-log small{font-size:10px;text-transform:uppercase;color:#8a7755;font-weight:650}#journal-log p{font-size:12px;margin-top:5px}.trait-list{margin:0;padding:0;list-style:none}.trait-list li{border-bottom:1px solid #dbcfb6;padding:9px 0;font-size:13px}.trait-list strong{display:block}.game-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;background:#ebe0c7;border-top:1px solid #c6b38d;padding:8px 20px}.game-footer button{font-size:12px;padding:8px 14px}.footer-actions{display:flex;gap:8px}#continue{background:#5b6440;border-color:#5b6440;color:#fff8e6}#selection-summary{display:flex;align-items:center;gap:8px;font-size:12px;color:#746144}.pick-slot{width:29px;height:29px;border:1px dashed #b7a47b;border-radius:5px;display:inline-flex;align-items:center;justify-content:center;font-size:12px}.pick-slot.filled{background:#d8c394;border-style:solid;color:#4d391f;font-weight:bold}.study-notes{display:flex;gap:30px;justify-content:space-between;margin-top:17px;color:#7f786a;font-size:11px}.study-notes p{max-width:570px;margin:0}#status{font-size:12px;color:#847353}@media(max-width:1080px){.game-header,.game-content{grid-template-columns:250px minmax(0,1fr)}.game-header nav>*{padding:0 7px;font-size:10px}.game-title strong{font-size:16px}.scene-heading h2{font-size:20px}.journal-scroll{padding:22px 18px}.darwin img{width:110px}.darwin p{font-size:14px}}@media(max-width:800px){main{padding:10px 16px 25px}.site-header{padding:16px}.site-header img{width:160px}.study-heading{align-items:start;flex-direction:column;gap:14px}h1{font-size:25px}.game-frame{height:auto;grid-template-rows:auto auto auto}.game-header{grid-template-columns:1fr}.game-title{padding:10px 16px}.game-header nav{min-height:44px;gap:0;padding:0}.game-header nav>*{padding:0 7px;font-size:9px}.game-content{display:flex;flex-direction:column-reverse}.habitat{height:600px}.journal{border-right:0;border-top:1px solid #c2ad84;display:grid;grid-template-columns:1fr 190px;max-height:280px}.journal-scroll{padding:18px}.journal h2{font-size:22px}.darwin{border:0;background:transparent;padding-right:12px;min-height:160px;flex-direction:column;justify-content:end}.darwin img{height:115px;width:120px;align-self:center}.darwin p{font-size:13px;text-align:center;margin-bottom:12px}.food{margin-top:12px}.game-footer{flex-wrap:wrap;padding:10px 14px;min-height:70px}.study-notes{flex-direction:column;gap:8px}}@media(max-width:460px){.habitat{height:550px}.scene-heading{padding:13px 12px}.scene-heading h2{font-size:18px}.scene-heading>span{font-size:10px}.candidate-grid{padding:10px 9px 23px;gap:6px}.candidate-label{font-size:9px}.journal{grid-template-columns:1fr 140px}.darwin img{width:105px}.game-header nav>*{font-size:8px;padding:0 5px}.game-footer{gap:10px}#selection-summary{font-size:11px;gap:6px}}

.pick-slot canvas{display:block;width:25px;height:29px;object-fit:contain}.footer-actions{flex-wrap:wrap}#more-variations{border-color:#8e7950;background:#f7edcf;font-weight:650}
/* Cleaner creature-only choices and compact, complete tradeoffs. */
.candidate{justify-content:center;padding:4px}.candidate canvas{height:100%;width:100%;object-fit:contain}.candidate[data-picked=true]{box-shadow:inset 0 0 0 1px #806328}.inspecting #sidebar-title{font-size:21px;margin-bottom:8px}.trait-list li{padding:6px 0;font-size:12px;line-height:1.35}.trait-list strong{font-size:12px;margin-bottom:3px}.trait-list p{font-size:12px;line-height:1.35;margin:0}.inspecting .food{flex-direction:row;align-items:center;justify-content:space-between;gap:6px;margin-top:10px;padding:9px 0;font-size:11px}.inspecting .food strong{font-size:10px}.game-footer [hidden]{display:none}#journal-log p{white-space:pre-line}#preserver{background:#5b6440;border-color:#5b6440;color:#fff8e6}#cancel{background:transparent}.footer-actions{justify-content:end}
/* Review the selected creatures at a useful size, alongside the candidate grid. */
.selection-area{display:grid;grid-template-columns:minmax(0,1fr) 210px;flex:1;min-height:0;background:#efe6cc url(../million-years-layout/landscape.webp) center/cover}.selection-area[hidden]{display:none}.selection-area .candidate-grid{width:100%;min-height:0;max-width:520px;justify-self:center;background:none;padding:12px 12px 24px;gap:10px}.candidate{width:auto;height:100%;aspect-ratio:1;max-width:100%;justify-self:center}.candidate canvas{width:100%;height:100%;object-fit:contain}.picks-panel{padding:13px 13px 24px;background:#f6edd8e8;border-left:1px solid #c7b58d;display:flex;flex-direction:column;min-height:0}.picks-panel h3{font:20px/1.15 Georgia,serif;margin:0 0 11px}#picks-list{display:grid;grid-template-rows:repeat(3,minmax(0,1fr));gap:8px;flex:1;min-height:0}.saved-pick{position:relative;min-height:0;display:flex;align-items:center;justify-content:center;border:1px dashed #c8b991;border-radius:6px;background:#fff8e66e}.saved-pick.filled{border:1px solid #a38c53;background:#fff9ec}.saved-pick canvas{display:block;width:100%;height:100%;object-fit:contain;padding:3px 0 10px}.saved-pick>p{font:italic 13px Georgia,serif;color:#9a8a65;text-align:center;padding:10px}.saved-pick:focus-visible{outline:3px solid #8c672a;outline-offset:1px}.remove-pick{position:absolute;bottom:3px;right:5px;padding:1px 5px;font-size:9px;background:#fff9e9cc;border-color:#d9cba9;min-height:0}.picks-panel.single #picks-list{grid-template-rows:minmax(0,1fr)}.picks-panel.single .saved-pick canvas{max-height:350px}.game-footer #selection-summary{font-size:12px}.game-footer .footer-actions{gap:7px}@media(max-width:1080px){.selection-area{grid-template-columns:minmax(0,1fr) 170px}.picks-panel{padding-left:9px;padding-right:9px}.picks-panel h3{font-size:18px}}@media(max-width:800px){.selection-area{grid-template-columns:minmax(0,1fr) 170px}.selection-area .candidate-grid{gap:7px;padding:10px 9px 22px}}@media(max-width:550px){.habitat{height:760px}.selection-area{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 190px}.selection-area .candidate-grid{max-width:470px;width:100%}.picks-panel{border-left:0;border-top:1px solid #c7b58d;padding:10px 10px 13px}.picks-panel h3{font-size:17px;margin-bottom:8px}#picks-list{grid-template-rows:minmax(0,1fr);grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.picks-panel.single #picks-list{grid-template-columns:minmax(0,1fr)}.picks-panel.single .saved-pick canvas{height:130px}.saved-pick>p{font-size:11px}.scene-heading h2{font-size:17px}}
/* Permanent presenter below the habitat, alongside the full-height journal. */
.game-frame{grid-template-rows:60px minmax(0,1fr)}.game-content{grid-template-columns:280px minmax(0,1fr);grid-template-rows:minmax(0,1fr) 160px}.journal{grid-column:1;grid-row:1 / span 2}.habitat{grid-column:2;grid-row:1}.darwin-strip{grid-column:2;grid-row:2;display:grid;grid-template-columns:155px minmax(0,1fr);gap:12px;background:#e7d5ad;border-top:1px solid #bfa77c;min-width:0;min-height:0}.darwin-portrait{display:flex;align-items:end;justify-content:center;overflow:hidden}.darwin-portrait img{display:block;width:155px;height:158px;object-fit:contain;object-position:bottom}.darwin-content{min-width:0;display:flex;flex-direction:column;padding:12px 18px 0 0}.darwin-message{flex:1;display:flex;align-items:center;min-height:0}.darwin-message p{font:20px/1.35 Georgia,serif;margin:0;max-width:650px}.darwin-strip .game-footer{flex:none;min-height:48px;padding:7px 0;background:transparent;border-top:1px solid #cdb78c;gap:10px}.darwin-strip .game-footer button{padding:7px 11px;font-size:11px}.darwin-strip #selection-summary{font-size:11px}.journal-scroll{padding-bottom:24px}.inspecting #sidebar-title{font-size:23px;margin-bottom:14px}.trait-list li{padding:9px 0}.trait-list strong,.trait-list p{font-size:13px;line-height:1.4}.inspecting .food{margin-top:20px}.scene-heading{height:58px;padding:10px 20px}.scene-heading h2{font-size:21px}.scene-heading .eyebrow{font-size:8px;margin-bottom:3px}#population-canvas{height:calc(100% - 58px)}.picks-panel{padding-top:10px}.picks-panel h3{font-size:18px;margin-bottom:8px}.selection-area .candidate-grid{padding-top:10px;padding-bottom:22px;gap:8px}@media(max-width:1080px){.game-content{grid-template-columns:250px minmax(0,1fr);grid-template-rows:minmax(0,1fr) 160px}.darwin-strip{grid-template-columns:130px minmax(0,1fr);gap:8px}.darwin-portrait img{width:130px}.darwin-content{padding-right:12px}.darwin-message p{font-size:18px}.darwin-strip .footer-actions{gap:5px}.darwin-strip .game-footer button{padding:6px 8px;font-size:10px}}@media(max-width:800px){.game-frame{grid-template-rows:auto auto}.game-content{display:flex;flex-direction:column}.habitat{order:0;height:530px;flex:none}.darwin-strip{order:1;display:grid;grid-template-columns:130px minmax(0,1fr);min-height:170px;flex:none}.journal{order:2;display:block;max-height:340px;min-height:180px;overflow:auto;border-top:1px solid #c2ad84}.journal-scroll{overflow:visible}.darwin-content{padding:12px 12px 0 0}.darwin-message p{font-size:17px}.darwin-strip .game-footer{flex-wrap:wrap;justify-content:end}.darwin-strip #selection-summary{margin-right:auto}.trait-list li{padding:7px 0}}@media(max-width:550px){.habitat{height:740px}.darwin-strip{grid-template-columns:105px minmax(0,1fr);min-height:210px;gap:5px}.darwin-portrait img{width:105px;height:145px}.darwin-message p{font-size:16px}.darwin-strip .game-footer{padding-bottom:10px;gap:6px}.darwin-strip .footer-actions{justify-content:start}.scene-heading{height:64px;padding:10px}.scene-heading h2{font-size:17px}.scene-heading>span{font-size:10px}.scene-heading .eyebrow{font-size:8px}.inspecting .food{flex-direction:column;align-items:start}.game-content .journal{max-height:360px}}

/* Taller portraits in two rows of six, using the full habitat width. */
.selection-area .candidate-grid{max-width:none;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;padding:8px 10px 22px}.selection-area .candidate{width:100%;height:100%;aspect-ratio:auto;padding:2px;justify-self:stretch}.selection-area .candidate canvas{width:100%;height:100%;object-fit:contain}.selection-area{grid-template-columns:minmax(0,1fr) 185px}
@media(max-width:1080px){.selection-area{grid-template-columns:minmax(0,1fr) 150px}.selection-area .candidate-grid{gap:5px;padding-left:6px;padding-right:6px}}
@media(max-width:800px){.selection-area .candidate-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}}
@media(max-width:550px){.habitat{height:1000px}.selection-area{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 190px}.selection-area .candidate-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr))}}

.study-links{font-size:12px;text-align:right}.study-links a{white-space:nowrap}

/* Full habitat art; the preserved flat comparison retains its original background. */
.selection-area{background-image:url(../million-years-layout/habitat-volcano.webp)}#population-canvas{background-image:none;background-color:#e4c57b}

/* Playable frame: the existing journal/recap and archive screens share the new shell. */
body>header,main{max-width:1264px}body>header{padding:20px 32px}.game-header{max-width:none;width:100%;margin:0;padding:0}.game-header nav button{min-height:0;background:none;border:0;border-radius:0;font-size:11px;color:#d9c9a7;padding:0 10px}.game-header nav button[aria-current=page]{border-bottom:4px solid #d7b86d;background:#5c4830;color:#fff4d6}.game-header nav button:hover{background:#645037}.game-content{position:relative}#journey-panel{border-radius:0;box-shadow:none;border:0;border-right:1px solid #c2ad84;background:#f3ebd8}.journal-content{position:static;overflow:auto;min-height:0;flex:1}.journal-entry p{white-space:pre-line}#food-supply{background:#e8ddc2}#archive-area{grid-column:2;grid-row:1/span 2;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;background:#dfd2b4;overflow:hidden}#archive-area .stage{width:100%;max-width:787px;aspect-ratio:615/500;height:auto;flex:none;box-shadow:none}#live-habitat[hidden],#live-darwin[hidden],#archive-area[hidden],#selection-area[hidden],#population-canvas[hidden],[hidden]{display:none!important}.controls,.rules,.note,#status{margin-left:0;max-width:none}.controls{margin-top:18px}.rules{max-width:920px;margin:auto}.note{max-width:920px;margin:14px auto;font-size:12px}#ending{padding:25px 30px}#ending #final-animal{width:100%}#ending #animal-portrait{height:auto;width:100%;max-height:205px}#ending .ending-top{grid-template-columns:minmax(0,1fr) 32%}.darwin-portrait canvas{display:block;width:130px;height:158px;object-fit:contain;object-position:bottom}.darwin-message{position:relative}.darwin-message canvas{width:100%;height:100%;object-fit:contain;object-position:left center;max-height:105px}.darwin-message p{font-size:17px}.darwin-message canvas[hidden]+p{display:block}.world-announcement{position:absolute;top:70px;left:20px;max-width:calc(100% - 40px);margin:0;padding:10px 16px;background:#fff5dce8;border:1px solid #b39b63;border-radius:6px;font:18px Georgia,serif;color:#554026;box-shadow:0 4px 16px #4a321820;pointer-events:none}.scene-heading>span{white-space:normal;text-align:right;max-width:46%;font-size:11px}.darwin-strip #apply-picks,.darwin-strip #event-continue{background:#5b6440;color:#fff9e5;border-color:#5b6440}.darwin-strip .footer-actions button{min-height:32px}.saved-pick canvas{padding-bottom:15px}.game-frame{height:740px}.game-content{grid-template-rows:minmax(0,1fr) 160px}.trait-list{padding:0}.journal #trait-copy{font-size:12px;line-height:1.5}.journal #trait-heading{font:22px/1.2 Georgia,serif}.game-frame[data-view=selection] .journal-content{padding-top:22px}.game-frame[data-view=archive] #journey-panel{opacity:.92}
@media(max-width:1080px){.game-header nav button{font-size:10px;padding:0 6px}}@media(max-width:800px){.game-frame{height:auto}.game-content{display:flex;flex-direction:column}#archive-area{order:0;flex:none;height:auto;min-height:400px}#live-habitat{height:600px}#journey-panel{max-height:360px;min-height:180px}#journal-scroll{max-height:360px;overflow:auto}#live-darwin{min-height:180px}.game-header nav{flex-wrap:wrap;min-height:48px}.game-header nav button{min-height:42px}.world-announcement{font-size:15px;top:73px}}@media(max-width:550px){#live-habitat{height:1000px}#live-habitat[data-selection=false]{height:540px}#live-darwin{min-height:230px}.darwin-portrait canvas{width:105px;height:150px}.scene-heading>span{max-width:42%;font-size:10px}.game-header nav button{padding:0 7px;font-size:9px}#ending{padding:16px}.world-announcement{left:10px;max-width:calc(100% - 20px)}.darwin-message p{font-size:15px}.controls button{font-size:12px;padding:7px 10px}}
@media print{body>header,.game-header,#archive-area,#live-darwin,.scene-heading,#selection-area,#population-canvas,#world-announcement{display:none!important}.game-frame,.game-content,#live-habitat{display:block!important;height:auto!important;overflow:visible!important;border:0;box-shadow:none;background:none}.game-frame[hidden]{display:block!important}#ending:not([hidden]){position:static;overflow:visible;display:block!important;padding:0}#ending[hidden]{display:none!important}#journey-panel{display:none!important}}

/* Game title and tutorial share the new habitat and controls. */
.game-guide{position:absolute;inset:58px 0 0;z-index:3;display:flex;align-items:end;padding:28px;background:linear-gradient(transparent,#f4e9c7cc)}
.game-guide[data-step=welcome]{align-items:center;background:linear-gradient(#fff6df70,#fff0c1c9),url(../million-years-layout/habitat-volcano.webp) center/cover}
.game-guide>div{max-width:580px;padding:23px 28px;background:#fff8e9f2;border:1px solid #b8a073;border-radius:8px;box-shadow:0 5px 24px #49321e20}
.game-guide h2{font-size:29px;margin:0 0 14px}.game-guide p{font-size:16px;line-height:1.65;margin:0 0 20px}.game-guide button{background:#5b6440;color:#fff9e5;border-color:#5b6440}
@media(max-width:550px){.game-guide{padding:14px}.game-guide>div{padding:20px}.game-guide h2{font-size:24px}}

#archive-area{position:relative}#loading-world{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;margin:0;background:#f3ebd8;color:#675036;font:24px Georgia,serif}

/* Reset is outside the decision row; the forward action stays at its far right. */
.controls #new-world{margin-left:22px;background:transparent;color:#716852;border-color:#b9ae96}.darwin-strip .footer-actions{margin-left:auto;justify-content:flex-end}

#start-simulation,#setup-next{background:#5b6440;color:#fff9e5;border-color:#5b6440}

.darwin-strip #play-again{background:#5b6440;color:#fff9e5;border-color:#5b6440}

/* Placement study: the painted host appears only on the game title. */
.darwin-strip.painted-welcome{grid-template-columns:200px minmax(0,1fr);overflow:visible;position:relative;z-index:3}
.painted-welcome .darwin-portrait{position:absolute;left:0;bottom:0;width:200px;height:280px;overflow:hidden;pointer-events:none}
.painted-welcome .darwin-content{grid-column:2}
.painted-welcome #darwin-painted{position:absolute;display:block;width:420px;height:auto;max-width:none;left:-105px;top:0;object-fit:initial;filter:drop-shadow(3px 2px 5px rgba(65,44,24,.28))}
@media(max-width:1080px){.darwin-strip.painted-welcome{grid-template-columns:165px minmax(0,1fr)}.painted-welcome .darwin-portrait{width:165px;height:260px}.painted-welcome #darwin-painted{width:390px;left:-105px}}
@media(max-width:550px){.darwin-strip.painted-welcome{grid-template-columns:115px minmax(0,1fr)}.painted-welcome .darwin-portrait{width:115px;height:230px;left:0}.painted-welcome #darwin-painted{width:300px;left:-85px}}

/* Whole costume portraits: align faces independently; keep the approved regular crop. */
.painted-welcome .darwin-portrait{height:380px}
.painted-welcome #darwin-painted-layer{position:absolute;inset:0;overflow:hidden}
.painted-welcome #darwin-painted{top:100px}
.painted-welcome #darwin-painted[data-costume]:not([data-costume=regular]){width:350px;left:-92px;top:55px}
.painted-welcome #darwin-painted[data-costume=hot]{top:47px}
.painted-welcome #darwin-painted[data-costume=disease]{top:58px}
.painted-welcome #darwin-painted[data-costume=party]{top:20px}
#darwin-wardrobe{display:flex;align-items:center;gap:6px;font-size:11px;color:#554026}
#darwin-costume{max-width:120px;padding:5px 7px;background:#fff9e9;border:1px solid #bfa77c;border-radius:4px;color:#44351f}
@media(max-width:1080px){.painted-welcome .darwin-portrait{height:360px}.painted-welcome #darwin-painted[data-costume]:not([data-costume=regular]){width:325px;left:-93px;top:58px}.painted-welcome #darwin-painted[data-costume=hot]{top:50px}.painted-welcome #darwin-painted[data-costume=disease]{top:61px}.painted-welcome #darwin-painted[data-costume=party]{top:26px}}
@media(max-width:550px){.painted-welcome .darwin-portrait{height:310px}.painted-welcome #darwin-painted{top:80px}.painted-welcome #darwin-painted[data-costume]:not([data-costume=regular]){width:250px;left:-75px;top:48px}.painted-welcome #darwin-painted[data-costume=hot]{top:43px}.painted-welcome #darwin-painted[data-costume=disease]{top:51px}.painted-welcome #darwin-painted[data-costume=party]{top:24px}.darwin-strip .footer-actions{flex-wrap:wrap}}
/* A wide brim may overhang above the dialogue; the coat keeps its narrow crop. */
.painted-welcome .darwin-portrait:has(#darwin-painted[data-costume=hot]){width:240px;clip-path:polygon(0 0,100% 0,100% 180px,200px 180px,200px 100%,0 100%)}
@media(max-width:1080px){.painted-welcome .darwin-portrait:has(#darwin-painted[data-costume=hot]){width:215px;clip-path:polygon(0 0,100% 0,100% 180px,165px 180px,165px 100%,0 100%)}}
@media(max-width:550px){.painted-welcome .darwin-portrait:has(#darwin-painted[data-costume=hot]){width:165px;clip-path:polygon(0 0,100% 0,100% 140px,115px 140px,115px 100%,0 100%)}}
/* Original-inspired layout study: dark host strip, ochre talk bubble and one forward action. */
.classic-layout-demo #live-darwin{background:radial-gradient(ellipse at 45% 0,#61422c55,transparent 75%),repeating-linear-gradient(92deg,#321c13 0,#382016 3px,#301b13 7px);border-top:2px solid #684529}
.classic-layout-demo .darwin-content{padding:17px 22px 17px 0}
.classic-layout-demo .darwin-message,.classic-layout-demo .game-footer,.classic-layout-demo .controls,.classic-layout-demo .rules,.classic-layout-demo main>.note:not(#placement-notice),.classic-layout-demo #status{display:none!important}
#classic-talk{height:100%;display:grid;grid-template-columns:minmax(0,1fr) 105px;gap:20px;align-items:center;min-width:0}
.classic-bubble{position:relative;display:flex;align-items:center;min-height:120px;max-height:100%;background:linear-gradient(145deg,#e8ca93,#d7b77d);border-radius:15px;padding:15px 24px;box-shadow:inset 0 1px 0 #fff1cc80,0 3px 8px #130b0755}
.classic-bubble:before{content:'';position:absolute;width:27px;height:27px;left:-23px;top:45%;background:#e2c38b;clip-path:polygon(100% 0,100% 100%,0 48%)}
#classic-copy{font:600 17px/1.42 system-ui,sans-serif;color:#655335;margin:0;text-wrap:pretty}
#classic-proceed{background:transparent;border:0;border-radius:7px;padding:8px 0;color:white;display:flex;flex-direction:column;align-items:center;gap:8px;transition:transform .15s}
#classic-proceed img{width:100%;height:55px;object-fit:contain;filter:drop-shadow(0 2px 1px #120b07aa)}
#classic-proceed strong{font:850 14px/1 system-ui,sans-serif;letter-spacing:.035em}
#classic-proceed:hover{transform:translateX(4px)}
#classic-proceed:focus-visible{outline:3px solid #f0ce86;outline-offset:5px}
#classic-talk[data-running=true] .classic-bubble{visibility:hidden}
.classic-layout-demo .scene-heading{display:none}
.classic-layout-demo #population-canvas{height:100%}
.classic-layout-demo #live-habitat{position:relative}
.classic-preserver{position:absolute;left:18px;top:16px;z-index:5;display:flex;align-items:center;gap:10px;padding:5px 13px 5px 5px;background:#fffaf0ed;border:1px solid #9c8b6b;border-radius:10px;box-shadow:0 4px 12px #4a32182e;color:#5e5036;transition:transform .15s}
.classic-preserver:hover{transform:translateY(-2px)}
.classic-preserver img{height:60px;width:60px;filter:drop-shadow(0 2px 1px #67563b44)}
.classic-preserver span{display:flex;flex-direction:column;align-items:start;gap:3px}
.classic-preserver strong{font-size:11px;letter-spacing:.035em}
.classic-preserver small{font:14px/1.1 Georgia,serif}
#classic-year{position:absolute;right:18px;top:22px;z-index:4;display:flex;align-items:center;gap:11px;padding:8px 12px;border-radius:7px;background:#30271eea;color:#fff8df;box-shadow:0 2px 5px #3a29152e}
#classic-year span{font-size:10px;font-weight:750;letter-spacing:.08em}
#classic-year strong{font:600 22px/1 Georgia,serif;font-variant-numeric:tabular-nums}
@media(max-width:1080px){#classic-talk{grid-template-columns:minmax(0,1fr) 85px;gap:13px}#classic-copy{font-size:15px}.classic-bubble{padding:12px 18px}}
@media(max-width:550px){.classic-layout-demo .darwin-content{padding:15px 12px 15px 0}#classic-talk{grid-template-columns:minmax(0,1fr);gap:5px}.classic-bubble{padding:12px;min-height:130px}#classic-copy{font-size:13px}#classic-proceed{flex-direction:row;justify-self:end;gap:8px}#classic-proceed img{width:55px;height:30px}#classic-proceed strong{font-size:11px}.classic-preserver{left:8px;top:10px;padding-right:8px;gap:5px}.classic-preserver img{width:42px;height:42px}.classic-preserver strong{font-size:9px}.classic-preserver small{font-size:12px}#classic-year{right:8px;top:15px;padding:8px;gap:6px}#classic-year strong{font-size:17px}}
.classic-layout-demo #journal-details{display:none}
#classic-demo-log{list-style:none;padding:0;margin:24px 0 0}
#classic-demo-log li{padding:14px 0;border-top:1px solid #d6c8ac}
#classic-demo-log strong{font:600 14px Georgia,serif;color:#5d4b30}
#classic-demo-log p{font-size:13px;line-height:1.5;margin:6px 0 0;color:#77664b}

/* Original-style chapter tabs, with a clean surface and a hanging gold selection. */
.game-header{position:relative;z-index:6;background:#493323;border-bottom-color:#342519}
.game-header nav{padding:0 8px;gap:0;justify-content:stretch;overflow:visible}
.game-header nav button{position:relative;flex:1;min-width:0;min-height:60px;padding:0 12px;border:0;border-radius:0;background:transparent;color:#e3d1ac;font-family:system-ui,sans-serif;font-size:12px;font-weight:850;line-height:1.15;letter-spacing:.065em;text-transform:uppercase;transition:background-color .14s,color .14s}
.game-header nav button+button::before{content:"";position:absolute;left:0;top:19px;bottom:19px;width:1px;background:#e3c59820}
.game-header nav button:hover:not(:disabled){background:#634a31;color:#fff5dc}
.game-header nav button[aria-current=page],.game-header nav button[aria-current=page]:hover{z-index:1;margin-bottom:-6px;padding-bottom:6px;border:0;border-radius:0 0 13px 13px;background:linear-gradient(#e0c48c,#c7a466);color:#493521;box-shadow:inset 0 -1px 0 #8d683b70,0 4px 5px #39271835}
.game-header nav button[aria-current=page]::before,.game-header nav button[aria-current=page]+button::before{opacity:0}
.game-header nav button:focus-visible{z-index:2;outline:3px solid #fff1c9;outline-offset:-5px}
.game-title{border-right-color:#83623d60}
@media(max-width:1080px){.game-header nav button{font-size:10px;padding-left:7px;padding-right:7px;letter-spacing:.045em}}
@media(max-width:800px){.game-header nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:0;gap:1px}.game-header nav button{min-height:44px;font-size:10px}.game-header nav button[aria-current=page],.game-header nav button[aria-current=page]:hover{margin-bottom:0;padding-bottom:0;border-radius:0 0 8px 8px;box-shadow:inset 0 -1px 0 #8d683b70}.game-header nav button+button::before{top:12px;bottom:12px}.game-header{grid-template-columns:210px 1fr}.game-frame{grid-template-rows:88px minmax(0,1fr)}}
@media(max-width:550px){.game-header{grid-template-columns:135px 1fr}.game-title{padding:8px 10px}.game-title strong{font-size:14px}.game-title span{font-size:11px}.game-header nav button{font-size:9px;padding-left:4px;padding-right:4px;letter-spacing:.02em}}

/* One type family throughout the new frame; the badge supplies the display lettering. */
:root{--game-font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.game-frame{font-family:var(--game-font)}
.game-frame h1,.game-frame h2,.game-frame h3,.game-title span,.journal #trait-heading{font-family:var(--game-font);font-weight:750;font-style:normal}
.game-title span{font-size:11px;letter-spacing:.015em}
.journal-brand{flex:none;padding:17px 20px 0}
.journal-brand img{display:block;width:100%;height:auto;max-width:270px;margin:auto}
#journal-scroll{padding-top:18px}
#journey-panel h2,.journal #trait-heading{font:750 18px/1.25 var(--game-font);letter-spacing:-.02em;margin-bottom:13px}
#journey-panel p,#classic-demo-log p{font-family:var(--game-font);font-size:14px;line-height:1.5;color:#5d503c}
#classic-demo-log{margin-top:18px}
#classic-demo-log strong,.journal-entry h3{display:block;font:750 13px/1.4 var(--game-font);color:#554127}
#classic-demo-log p{margin-top:5px}
#food-supply{font:500 13px/1.45 var(--game-font)!important}
#journal-details summary{font:700 13px/1.4 var(--game-font)}
.journal-entry p{font:400 14px/1.5 var(--game-font)!important}
.classic-preserver small{font:500 12px/1.2 var(--game-font)}
#classic-year strong{font:750 21px/1 var(--game-font);font-variant-numeric:tabular-nums;letter-spacing:-.025em}
.darwin-message p,#guide-copy{font-family:var(--game-font)}
#loading-world{font:650 22px/1.3 var(--game-font)}
.game-frame #creation-name{font-style:italic}
.game-frame #final-animal figcaption,.game-frame #run-recap p{font-family:var(--game-font)}
dialog{font-family:var(--game-font)}dialog h1{font:750 24px/1.2 var(--game-font)}dialog input,dialog select{font:inherit}
@media(max-width:800px){.journal-brand{padding-top:14px}.journal-brand img{max-width:210px}#journey-panel{max-height:500px}#journal-scroll{min-height:140px}}
@media print{.journal-brand{display:none}.game-frame #ending #run-recap p{font-family:var(--game-font)}}

/* Let the anniversary badge crown the frame without using a full journal row. */
.game-frame{position:relative;overflow:visible}
.game-header{border-radius:9px 9px 0 0}
.game-content{overflow:hidden;border-radius:0 0 9px 9px}
.game-title{position:relative;align-self:stretch;display:block;padding:0;overflow:visible}
.game-title .journal-brand{position:absolute;z-index:7;left:50%;top:-23px;transform:translateX(-50%);width:240px;padding:0;pointer-events:none}
.game-title .journal-brand img{max-width:none;width:100%;height:auto;filter:drop-shadow(0 3px 3px #2d201b25)}
#journal-scroll{padding-top:77px}
.game-frame[data-view=selection] #journal-scroll{padding-top:77px}
@media(max-width:800px){.game-title .journal-brand{width:180px;top:-18px}#journal-scroll,.game-frame[data-view=selection] #journal-scroll{padding-top:20px}}
@media(max-width:550px){.game-title .journal-brand{width:125px;top:-12px}}
@media print{.game-content{overflow:visible}.game-frame #journal-scroll{padding-top:0}}

/* Dining portrait aligns his eyes with the existing wardrobe. */
.painted-welcome #darwin-painted[data-costume=food]{top:78px}
@media(max-width:1080px){.painted-welcome #darwin-painted[data-costume=food]{top:80px}}
@media(max-width:550px){.painted-welcome #darwin-painted[data-costume=food]{top:65px}}

/* Approved event presentation is now the live game's interface. */
.live-game #live-darwin{background:radial-gradient(ellipse at 45% 0,#61422c55,transparent 75%),repeating-linear-gradient(92deg,#321c13 0,#382016 3px,#301b13 7px);border-top:2px solid #684529}
.live-game .darwin-content{padding:17px 22px 17px 0}
.live-game .darwin-message,.live-game .game-footer,.live-game .scene-heading,.live-game .rules,.live-game main>.note,.live-game #replay,.live-game #previous,.live-game #part-replay,.live-game #new-world{display:none!important}
.live-game #population-canvas{height:100%}
.live-game #live-habitat{position:relative}
.live-game #game-guide{background:#f3e5c5 url(assets/habitat-cleared.webp) center/cover}
.live-game #game-guide>div{background:#f8efdad9;padding:20px 35px;max-width:560px}
.opening-badge{display:block;width:min(100%,390px);height:auto;margin:auto}
.live-game #game-guide h2,.live-game #guide-copy,.live-game #guide-next{display:none}
.selection-area{grid-template-rows:minmax(0,1fr) auto}
.selection-tools{grid-column:1/-1;display:flex;gap:8px;align-items:center;padding:8px 12px;border-top:1px solid #c7b58d;background:#f6edd8}
.selection-tools button{font-size:12px;padding:6px 12px;min-height:34px}
.live-game #classic-proceed strong{max-width:110px;text-align:center;line-height:1.15}
.live-game .game-frame[data-view=selection] .darwin-portrait{transform:translateY(70px)}
.live-game #ending #run-recap{padding-left:180px}
@media(max-width:1080px){.live-game #ending #run-recap{padding-left:150px}}
@media(max-width:550px){.selection-area{grid-template-rows:minmax(0,1fr) 190px auto}.selection-tools{flex-wrap:wrap}.live-game .darwin-content{padding:15px 12px 15px 0}.live-game #ending #run-recap{padding-left:95px}}
@media print{.live-game #ending #run-recap{padding-left:0}}

/* Full presenter size, with selection controls beside the flock. */
.selection-area{grid-template-rows:minmax(0,1fr)}
.selection-tools{flex:none;flex-direction:column;align-items:stretch;margin:10px -8px -16px;padding:8px;background:transparent}
.selection-tools button{width:100%}
.live-game #game-guide{inset:0;align-items:center;justify-content:center;padding:16px}
.live-game #game-guide>div{width:100%;max-width:760px;background:none;border:0;box-shadow:none;padding:0}
.live-game .opening-badge{width:min(100%,690px);max-height:450px;object-fit:contain}
.live-game .opening-badge.logo-pop{animation:opening-logo-pop 520ms cubic-bezier(.18,.8,.25,1.2) both}
@keyframes opening-logo-pop{0%{transform:scale(.08);opacity:0}65%{transform:scale(1.06);opacity:1}100%{transform:scale(1);opacity:1}}
@media(max-width:550px){.selection-area{grid-template-rows:minmax(0,1fr) 260px}.selection-tools{flex-direction:row;flex-wrap:wrap}.selection-tools button{width:auto;flex:1}.live-game .game-frame[data-view=selection] .darwin-portrait{transform:translateY(60px)}}
@media(prefers-reduced-motion:reduce){.live-game .opening-badge.logo-pop{animation:none}}

.selection-tools #more-variations{background:#70502b;color:#fff8e5;border:2px solid #c9a050;font-weight:800;box-shadow:0 3px 8px #47301735;padding:8px 6px}
.selection-tools #more-variations::before{content:'↻';font-size:21px;line-height:1;vertical-align:-2px;margin-right:6px}
.selection-tools #more-variations:hover{background:#8b632f;border-color:#e3bc6d}
.variation-help{font-size:10px;line-height:1.3;text-align:center;color:#685735;padding:0 1px 4px}
@media(max-width:550px){.variation-help{width:100%;order:3}}

/* The logo gets the stage first, then the host leads the eye to his dialogue. */
.live-game #live-darwin[data-intro-phase=logo] .darwin-portrait{visibility:hidden}
.live-game #live-darwin[data-intro-phase=logo] .darwin-content,.live-game #live-darwin[data-intro-phase=enter] .darwin-content{visibility:hidden}

/* Reserve real space below the badge, outside the scrolling journal viewport. */
#journal-scroll,.game-frame[data-view=selection] #journal-scroll{margin-top:77px;padding-top:0}
#journal-title,.journal-entry h3{text-transform:uppercase;letter-spacing:.035em}
@media(max-width:800px){#journal-scroll,.game-frame[data-view=selection] #journal-scroll{margin-top:0;padding-top:20px}}
@media print{body,.game-frame,#ending #run-recap p,#ending #creation-name,#ending h1,#ending h2,#ending-result,#final-animal figcaption{font-family:var(--game-font)!important}.game-frame #journal-scroll{margin-top:0}}

/* The result gets its original game-show moment before the recap. */
#result-splash{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;padding:22px 28px 30px 95px;background:linear-gradient(#f6eed8b8,#f6eed8ed)}
#result-sign{display:block;max-width:100%;width:650px;max-height:94%;object-fit:contain;filter:drop-shadow(0 12px 12px #38240c35)}
.result-pop{animation:result-sign-pop .65s cubic-bezier(.18,.8,.25,1.2) both}
@keyframes result-sign-pop{0%{opacity:0;transform:scale(.12) rotate(-5deg)}65%{opacity:1;transform:scale(1.035) rotate(1deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
@media(max-width:550px){#result-splash{padding:18px 12px 32px 32px}}
@media(prefers-reduced-motion:reduce){.result-pop{animation:none}}
@media print{#result-splash{display:none!important}}

/* Recap is an optional tab on the result badge; the hand always replays. */
.result-card{position:relative;display:flex;flex-direction:column;align-items:center;width:650px;max-width:100%;max-height:100%}
.result-card #result-sign{width:100%;max-height:calc(100% - 36px);min-height:0;flex:0 1 auto}
#result-recap{position:absolute;top:calc(100% - 9px);left:50%;transform:translateX(-50%);z-index:1;white-space:nowrap;margin:0;padding:10px 24px;background:#4a3423;color:#fff0c5;border:2px solid #d6b56b;border-radius:0 0 12px 12px;box-shadow:0 5px 10px #38240c30;font:750 12px/1.3 var(--game-font);letter-spacing:.065em;text-transform:uppercase}
#result-recap:hover{background:#694c2d;border-color:#f6d688}

#darwin-face-layer{position:absolute;display:block;pointer-events:none;max-width:none;object-fit:fill}

/* Shared welcome and quiet options, contained within the game frame. */
.live-game .controls{display:none!important}
.sidebar-footer{display:flex;justify-content:space-between;gap:12px;flex:none;padding:10px 16px 12px;border-top:1px solid #90774f44;background:#efe1bb;position:relative;z-index:6}
.sidebar-footer button{border:0;background:transparent;box-shadow:none;padding:5px 3px;color:#514737;font:600 12px var(--game-font);cursor:pointer}
.sidebar-footer button:hover{text-decoration:underline}
.sidebar-footer button:focus-visible{outline:2px solid #75582b;outline-offset:2px}
#sidebar-welcome h2{text-transform:uppercase;font-size:19px;line-height:1.2}
#sidebar-welcome p{font-size:16px;line-height:1.5}
#learn-selection{display:block;width:100%;margin:22px 0;padding:14px 12px;border:2px solid #7d512c;border-radius:7px;background:#f3c65d;color:#362c1d;font:700 14px/1.4 var(--game-font);text-transform:uppercase;cursor:pointer;box-shadow:0 3px 0 #896035}
#learn-selection:hover{background:#ffdc83}
#sidebar-welcome .welcome-challenge{font-size:14px;color:#65573f}

/* Reusable book: historical illustrations and generous, bounded page interiors. */
.book-section{grid-column:2;grid-row:1/span 2;min-width:0;min-height:0;background:#51412d;overflow:hidden;padding:13px 10px}
.open-book{height:100%;width:100%;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);background:url('assets/naturalists-book.webp') center/100% 100% no-repeat;filter:drop-shadow(0 8px 7px #20170e55);isolation:isolate;perspective:1600px}
.book-page{position:relative;min-width:0;min-height:0;max-width:100%;padding:62px 9% 65px 14%;transform-style:preserve-3d;transform-origin:right center;backface-visibility:hidden}
.book-page-right{padding:62px 14% 65px 9%;transform-origin:left center}
.book-page-content{height:100%;min-width:0;max-width:100%;overflow:auto;scrollbar-width:thin;scrollbar-color:#bba77c transparent}
.book-page .book-kicker{font:750 10px/1.3 var(--game-font);letter-spacing:.16em;text-transform:uppercase;color:#887044;margin:0 0 13px}
.book-page-left{padding-left:calc(12% + 20px);padding-right:calc(7% + 20px)}.book-page.book-page-left h1{max-width:none;margin-bottom:20px}
.book-page h1{font:750 29px/1.1 var(--game-font);color:#543a20;margin:0;letter-spacing:-.035em;max-width:170px}
.book-page h2{font:750 25px/1.15 var(--game-font);color:#543a20;margin:24px 0 16px;letter-spacing:-.025em}
.book-page p{font:450 15.5px/1.52 var(--game-font);color:#51442f;margin:0 0 16px}
.bio-portrait{float:left;shape-outside:ellipse(50% 50%);width:120px;height:155px;margin:0 17px 10px 0;border:1px solid #ad8956;border-radius:50%;overflow:hidden;background:#24211d;box-shadow:0 3px 5px #72592933,0 0 0 3px #d4bd852e}
.bio-portrait img{width:100%;height:100%;object-fit:cover;display:block;transform:scale(-1.8,1.8);transform-origin:50% 22%}
.bio-voyage{margin:0 auto 20px;width:100%;max-width:280px}
.bio-voyage img{display:block;width:100%;max-width:100%;height:auto;border:0;mix-blend-mode:multiply}
.bio-voyage figcaption{text-align:center;color:#887044;font:650 10px/1.5 var(--game-font);letter-spacing:.05em;margin-top:10px}
.book-page-number{position:absolute;bottom:55px;left:50%;color:#9a8054;font:600 11px var(--game-font)}
#bio-sidebar .book-kicker{font-size:10px;letter-spacing:.12em;text-transform:uppercase;font-weight:750;color:#947b4d}
#bio-sidebar h2{font-size:24px;line-height:1.15;text-transform:none;margin-top:12px;color:#503923}
.bio-chapters{display:grid;gap:0;margin:26px 0 30px;border-top:1px solid #c6b48d}
.bio-chapters span{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid #c6b48d;font:650 13px var(--game-font);color:#604e34}
.bio-chapters b{font:500 11px var(--game-font);color:#a38855}
#bio-sidebar button{display:flex;justify-content:space-between;width:100%;text-align:left;padding:11px 0;border:0;border-bottom:1px solid #c6b48d;background:transparent;border-radius:0;font-size:13px;font-weight:750;color:#664b29}
#bio-sidebar button:hover{color:#231a10;background:#eadab966}
@media(max-width:1080px) and (min-width:801px){.game-frame[data-view=book]{height:860px}.book-page{padding-top:58px;padding-bottom:65px}.book-page p{font-size:14px;line-height:1.5}.book-page h1{font-size:25px}.book-page h2{font-size:22px}.bio-portrait{flex-basis:85px;width:85px;height:110px}}
@media(max-width:800px){.game-frame[data-view=book] #journey-panel{max-height:none}.book-section{order:1;min-height:680px;width:100%;padding:10px 4px}.open-book{min-height:660px}.book-page{padding-top:54px}.book-page p{font-size:14px}.book-page h1{font-size:25px}.bio-portrait{flex-basis:85px;width:85px;height:110px}.book-page-content{height:auto;overflow:visible}.game-frame[data-view=book] .game-content{background:#51412d}}
@media(max-width:550px){.book-section{padding:15px}.open-book{display:block;background:none;filter:none}.book-page,.book-page-right{padding:30px 24px 40px;margin:0 0 12px;background:linear-gradient(90deg,#d3bd8e,#f8edce 6%,#fff3d8 90%,#e2cb9c);border:5px solid #67472a;border-radius:7px;box-shadow:0 5px 8px #20170e44}.book-page p{font-size:16px}.book-page h1{font-size:30px}.bio-portrait{flex-basis:100px;width:100px;height:129px}.book-page-number{bottom:16px}}

/* Glossary shares the approved book geometry; no extra illustration needed. */
#glossary-book dl{margin:0}
#glossary-book .glossary-entry{margin:0 0 20px;break-inside:avoid}
#glossary-book dt{font:750 19px/1.2 var(--game-font);text-transform:uppercase;letter-spacing:.015em;color:#604421;margin:0 0 7px;scroll-margin:5px}
#glossary-book dt:focus-visible{outline:2px solid #a27a35;outline-offset:4px;border-radius:2px;background:#e9cf8755}
#glossary-book dd{font:450 15.5px/1.5 var(--game-font);color:#51442f;margin:0}
#glossary-sidebar .book-kicker{font-size:10px;letter-spacing:.12em;text-transform:uppercase;font-weight:750;color:#947b4d}
#glossary-sidebar h2{font-size:24px;line-height:1.15;text-transform:none;margin-top:12px;color:#503923}
.glossary-index{display:grid;gap:0;margin:22px 0 16px;border-top:1px solid #c6b48d}
.glossary-index button,#glossary-quiz{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;text-align:left;padding:10px 0;min-height:36px;border:0;border-bottom:1px solid #c6b48d;background:transparent;border-radius:0;font:650 13px var(--game-font);color:#604e34}
.glossary-index button:hover,#glossary-quiz:hover{background:#eadab966;color:#231a10}
#glossary-quiz{font-weight:750;margin-top:18px}
@media(max-width:1080px) and (min-width:801px){#glossary-book dd{font-size:14px}#glossary-book dt{font-size:17px}#glossary-book .glossary-entry{margin-bottom:18px}}
@media(max-width:800px){#glossary-book dd{font-size:14px}#glossary-book dt{font-size:17px}}
@media(max-width:550px){#glossary-book dd{font-size:16px}#glossary-book dt{font-size:19px}}

#glossary-game{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;text-align:left;padding:10px 0;min-height:36px;border:0;border-bottom:1px solid #c6b48d;background:transparent;border-radius:0;font:750 13px var(--game-font);color:#604e34}
#glossary-game:hover{background:#eadab966;color:#231a10}

/* Shared secondary-heading treatment for informational sidebars. */
.info-sidebar .info-next-heading{font:750 18px/1.25 var(--game-font);letter-spacing:-.015em;text-transform:none;color:#503923;margin:34px 0 12px}
.info-sidebar .info-next-heading+button{margin-top:0!important}

/* Quiz uses the approved book margins, independent page content and a physical turn. */
#quiz-sidebar .book-kicker{font-size:10px;letter-spacing:.12em;text-transform:uppercase;font-weight:750;color:#947b4d}
#quiz-sidebar h2{font-size:24px;line-height:1.15;text-transform:none;margin-top:12px;color:#503923}
#quiz-sidebar button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;text-align:left;padding:11px 0;min-height:38px;border:0;border-bottom:1px solid #c6b48d;background:transparent;border-radius:0;font:650 13px var(--game-font);color:#604e34}
#quiz-sidebar button:hover{background:#eadab966;color:#231a10}
.quiz-progress-wrap{margin-top:25px}
.quiz-progress-wrap label{font:650 12px var(--game-font);color:#6d5736}
#quiz-progress{display:block;width:100%;height:9px;margin-top:10px;accent-color:#8e6432;border:0;border-radius:8px;overflow:hidden;background:#ddceab}
#quiz-progress::-webkit-progress-bar{background:#ddceab}#quiz-progress::-webkit-progress-value{background:#8e6432}#quiz-progress::-moz-progress-bar{background:#8e6432}
#quiz-spread{position:relative}
#quiz-book h1{font-size:29px;line-height:1.12;margin-bottom:20px}
#quiz-book .book-page-content{overscroll-behavior:contain}
#quiz-question-copy{font-weight:550}
.quiz-art{position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-height:160px;height:260px;margin:16px auto 0}
.quiz-art>img,.quiz-art>canvas{display:block;width:100%;height:100%;object-fit:contain}
.quiz-art[data-kind="1"]{height:270px}.quiz-art[data-kind="2"],.quiz-art[data-kind="5"],.quiz-art[data-kind="8"]{height:205px}
.quiz-art[data-kind="3"],.quiz-art[data-kind="6"]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));height:260px;gap:6px 8px;align-content:center}
.quiz-art[data-kind="6"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.quiz-art[data-kind="3"]>canvas,.quiz-art[data-kind="3"]>img,.quiz-art[data-kind="6"]>canvas,.quiz-art[data-kind="6"]>img{height:125px}
.quiz-art[data-kind="intro"]{height:430px;margin-top:20px}
.quiz-snow{position:absolute;right:8%;top:25%;font-size:48px;color:#6c9caf;text-shadow:0 1px 0 white}
#quiz-answers{display:grid;gap:10px}
.quiz-answer{display:grid;grid-template-columns:24px minmax(0,1fr);gap:4px 8px;width:100%;text-align:left;min-height:54px;padding:11px 10px;border:1px solid #bda57a;border-radius:6px;background:#f9ecca80;color:#55412c;font:650 15px/1.3 var(--game-font);transition:background .12s,border-color .12s}
.quiz-answer:not(:disabled):hover{background:#eed493;border-color:#947039}
.quiz-answer:disabled{opacity:1;cursor:default}.quiz-answer-letter{color:#8c6d3c}
.quiz-answer small{grid-column:2;font:700 10px/1.25 var(--game-font)}
.quiz-answer.is-correct{background:#d8e2b8aa;border-color:#78844c;color:#3e4b27}
.quiz-answer.is-wrong{background:#edc9b7aa;border-color:#b9765c}
#quiz-feedback{margin-top:20px;padding:12px 0 0;border-top:1px solid #bca57a}
#quiz-feedback h2{font:850 24px/1.1 var(--game-font);letter-spacing:.03em;color:#9e3d31;margin:0 0 12px}
#quiz-feedback[data-correct=true] h2{color:#586b32;transform:rotate(-4deg);transform-origin:left center;animation:quiz-stamp .22s ease-out}
#quiz-feedback p{font-size:14px;line-height:1.45;margin:0}
#quiz-turn{position:absolute;right:14%;bottom:65px;max-width:76%;display:flex;align-items:center;justify-content:flex-end;gap:9px;background:transparent;border:0;border-radius:0;box-shadow:none;padding:8px 0 8px 10px;font:750 14px/1.2 var(--game-font);color:#896631;text-align:right}
#quiz-turn::after{content:"";display:block;flex:none;width:23px;height:27px;background:linear-gradient(135deg,#fff7df 48%,#c2ad82 50%,#e1cba0 70%);clip-path:polygon(0 0,100% 0,0 100%);filter:drop-shadow(1px 1px 1px #674e2c55)}
#quiz-turn:not(:disabled):hover{color:#4d3519}#quiz-turn:disabled{cursor:wait;opacity:.55}
#quiz-result-copy .quiz-score{display:grid;gap:0;text-align:center;margin:25px 0 28px;color:#a93f2c}
.quiz-score strong{font:850 84px/1 var(--game-font);letter-spacing:-.05em}.quiz-score span{font:750 26px/1.2 var(--game-font)}
#quiz-result-art{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;margin:0}
#quiz-result-image{display:block;width:100%;height:410px;max-height:85%;object-fit:contain}
#quiz-result-name{font:750 19px/1.2 var(--game-font);text-align:center;color:#795c30;margin-top:12px}
.quiz-turn-sheet{position:absolute;z-index:10;left:50%;top:0;width:50%;height:100%;transform-origin:left center;transform-style:preserve-3d;pointer-events:none}
.quiz-turn-front,.quiz-turn-back{position:absolute;inset:0;width:100%;height:100%;transform-style:flat;-webkit-backface-visibility:hidden;backface-visibility:hidden;border-radius:0 15px 13px 0;overflow:hidden;box-shadow:-5px 4px 9px #30231055}
.quiz-turn-front{background-image:url('assets/naturalists-book.webp');background-size:200% 100%;background-position:right center}
.quiz-turn-back{transform:rotateY(180deg);background:linear-gradient(90deg,#dfcda1,#f9edcd 9%,#f7eaca 90%,#d2bb8b);border:1px solid #c7b184}
.quiz-turn-front #quiz-turn{display:none}
@keyframes quiz-stamp{from{opacity:0;transform:rotate(-8deg) scale(1.15)}to{opacity:1;transform:rotate(-4deg) scale(1)}}
@media(prefers-reduced-motion:reduce){#quiz-feedback h2{animation:none}.quiz-answer{transition:none}}
@media(max-width:1080px) and (min-width:801px){#quiz-book h1{font-size:25px}.quiz-answer{font-size:14px;padding:10px 8px}#quiz-feedback p{font-size:13px}.quiz-art{height:240px}#quiz-result-image{height:410px}}
@media(max-width:800px){#quiz-book{min-height:760px}#quiz-book .open-book{min-height:740px}#quiz-book h1{font-size:25px}.quiz-answer{font-size:14px}#quiz-result-image{height:380px}.quiz-art[data-kind="intro"]{height:380px}}
@media(max-width:550px){#quiz-book .book-page-right{padding-bottom:80px}#quiz-book h1{font-size:29px}.quiz-answer{font-size:16px}#quiz-feedback p{font-size:15px}#quiz-turn{right:24px;bottom:20px}.quiz-art[data-kind="intro"]{height:280px;margin-top:0}#quiz-result-art{height:420px}#quiz-result-image{height:360px}#quiz-book .quiz-turn-sheet{display:none}}

#quiz-book>.open-book>#quiz-right-page{padding-bottom:105px}

.quiz-map-question{position:absolute;right:13%;top:1%;font:800 68px/1 var(--game-font);color:#796848}

/* Natural Selection retains the original three-part path inside the new frame. */
#selection-lesson{grid-column:2;grid-row:1;position:relative;min-width:0;min-height:0;overflow:hidden;background:radial-gradient(ellipse at 50% 40%,#fff2d3,#e5ce9f)}
.lesson-scene{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:15px 28px}.lesson-scene>img{height:94%;width:100%;object-fit:contain}.lesson-family{width:100%;display:grid;grid-template-columns:minmax(0,1fr) 35px minmax(0,1fr) 30px minmax(0,1fr);gap:8px;align-items:center;padding-bottom:20px}.lesson-family figure{margin:0;min-width:0}.lesson-portrait{width:100%;aspect-ratio:555/645;border-radius:50%;overflow:hidden}.lesson-portrait svg{display:block;width:100%;height:100%}.lesson-family figcaption{font:700 11px var(--game-font);letter-spacing:.08em;text-transform:uppercase;text-align:center;margin-top:10px;color:#7e623e}.lesson-symbol{font:32px var(--game-font);text-align:center}.lesson-symbol button{width:36px;height:36px;padding:0;background:#745332;color:#fff5da;border:0;border-radius:50%;font:28px var(--game-font)}.lesson-symbol button:disabled{opacity:.4;cursor:wait}#lesson-breed-hint{position:absolute;bottom:40px;left:0;right:0;text-align:center;font:italic 15px Georgia,serif;color:#795c37;margin:0}#lesson-wild{position:absolute;inset:0;background:url('assets/lesson/scrub-clearing.webp') center/100% 100%}.lesson-bird{position:absolute;width:21%;height:auto;aspect-ratio:1;filter:drop-shadow(1px 3px 2px #49362044)}.lesson-bird-0{left:13%;top:34%;width:16%}.lesson-bird-1{left:34%;top:56%;width:22%}.lesson-bird-2{left:68%;top:10%;width:20%}.lesson-bird-3{left:12%;top:65%;width:16%}.lesson-bird-4{left:68%;top:64%;width:22%}.lesson-bird-5{left:48%;top:44%;width:19%}.lesson-steps{list-style:none;padding:0;margin:25px 0}.lesson-steps li{padding:13px 0;border-top:1px solid #c7b48d;color:#998463;font-size:13px}.lesson-steps [aria-current=step]{color:#50371f;font-weight:800}.lesson-tools{margin-top:25px}.lesson-tools button{font-size:12px!important}.game-frame[data-view=lesson] .darwin-portrait{z-index:4}.painted-welcome #darwin-painted[data-costume=binoculars]{width:420px;left:-105px;top:0}.game-frame[data-view=lesson] #classic-copy{font-size:17px}.game-frame[data-view=lesson] #classic-proceed strong{font-size:11px}.game-frame[data-view=lesson] .classic-bubble{padding-top:17px;padding-bottom:17px}@media(max-width:1080px){.painted-welcome #darwin-painted[data-costume=binoculars]{width:390px;left:-105px}.lesson-scene{padding:14px}.game-frame[data-view=lesson] #classic-copy{font-size:15px}}@media(max-width:800px){#selection-lesson{order:0;height:430px;flex:none;width:100%}.game-frame[data-view=lesson] #live-darwin{min-height:220px}.game-frame[data-view=lesson] #journey-panel{max-height:none}.lesson-steps{display:flex;gap:15px;margin:10px 0}.lesson-steps li{border:0;padding:5px 0}.lesson-tools{margin-top:10px}.lesson-tools button{width:auto!important;display:inline-flex!important;margin-right:20px!important}}@media(max-width:550px){#selection-lesson{height:360px}.lesson-family{gap:4px;grid-template-columns:1fr 25px 1fr 20px 1fr}.lesson-family figcaption{font-size:8px}.lesson-symbol button{width:26px;height:26px;font-size:24px}.lesson-symbol{font-size:23px}.painted-welcome #darwin-painted[data-costume=binoculars]{width:300px;left:-85px;top:80px}.game-frame[data-view=lesson] #classic-copy{font-size:13px}.game-frame[data-view=lesson] .classic-bubble{padding:12px}.game-frame[data-view=lesson] #live-darwin{min-height:270px}#lesson-breed-hint{bottom:60px;font-size:13px}}
.game-frame[data-view=lesson] .lesson-family{transform:translateY(-42px)}#lesson-sidebar .book-kicker{font-size:10px;letter-spacing:.12em;text-transform:uppercase;font-weight:750;color:#947b4d}#lesson-sidebar button{display:flex;justify-content:space-between;width:100%;text-align:left;padding:11px 0;border:0;border-bottom:1px solid #c6b48d;background:transparent;border-radius:0;font-size:13px;font-weight:750;color:#664b29}#lesson-sidebar button:hover{color:#231a10;background:#eadab966}@media(max-width:550px){.game-frame[data-view=lesson] .lesson-family{transform:translateY(-25px)}}

/* Restore teaching headlines beside the illustrations and the original guided assembly. */
#lesson-scene-heading{position:absolute;left:24px;right:24px;top:18px;z-index:3;margin:0;font:750 20px/1.35 var(--game-font);color:#50371f;pointer-events:none;text-wrap:pretty}#selection-lesson[data-part="2"] #lesson-scene-heading{font-size:18px;max-width:800px;padding:10px 14px;left:14px;top:10px;border-radius:7px;background:#fff0d5e8;box-shadow:0 1px 4px #513c1c1c}#lesson-scene-0{padding-top:65px;padding-bottom:30px}#lesson-scene-0>img{height:100%}#lesson-scene-1 .lesson-family{position:absolute;left:26px;right:26px;top:76px;bottom:50px;width:auto;padding:0;transform:none!important;align-items:center}.lesson-family .lesson-portrait{max-width:222px;margin:auto}.lesson-family figcaption{font-size:10px}#lesson-child .lesson-portrait,#lesson-child .lesson-portrait svg{overflow:visible}#lesson-child .lesson-portrait{border-radius:0}.lesson-feature-highlight{fill:#ffcf4740;stroke:#fff5a6;stroke-width:9;stroke-linejoin:round;filter:drop-shadow(0 0 7px #edab14);pointer-events:none;opacity:0}.lesson-symbol{position:relative}#lesson-breed{width:52px;height:52px;border:2px solid #986d2e;background:#efd28a;color:#4c351d;font-size:38px;box-shadow:0 3px 8px #64452233;position:relative;left:50%;transform:translateX(-50%)}#lesson-breed:not(:disabled):hover{background:#ffe5a5;box-shadow:0 0 0 4px #dbb65b55}#lesson-breed-hint{position:absolute;top:calc(100% + 12px);bottom:auto;left:50%;right:auto;transform:translateX(-50%);width:125px;min-height:60px;text-align:center;pointer-events:none;font:italic 15px/1.2 Georgia,serif;color:#654726}#lesson-breed-hint svg{position:absolute;width:72px;height:65px;right:95%;top:-38px;overflow:visible}#lesson-breed-hint span{display:block}.lesson-bird-2{top:23%;left:70%;width:19%}
/* Keep the left crop, while letting the binocular arm extend above the bubble. */
.game-frame[data-view=lesson] .darwin-portrait:has(#darwin-painted[data-costume=binoculars]){width:320px;clip-path:none}
@media(max-width:1080px){#lesson-scene-heading{font-size:18px}.game-frame[data-view=lesson] .darwin-portrait:has(#darwin-painted[data-costume=binoculars]){width:300px;clip-path:none}#lesson-breed-hint{font-size:13px;width:105px}.lesson-family .lesson-portrait{max-width:205px}}
@media(max-width:800px){#lesson-scene-heading{font-size:18px}#selection-lesson[data-part="2"] #lesson-scene-heading{font-size:15px}#lesson-scene-1 .lesson-family{top:70px;bottom:50px}.lesson-family .lesson-portrait{max-width:180px}}
@media(max-width:550px){#lesson-scene-heading{left:12px;right:12px;top:15px;font-size:15px}#selection-lesson[data-part="2"] #lesson-scene-heading{font-size:12px;padding:7px 9px;left:7px;right:7px;top:7px}#lesson-scene-1 .lesson-family{left:12px;right:12px;top:55px;bottom:45px}.lesson-family .lesson-portrait{max-width:145px}#lesson-breed{width:36px;height:36px;font-size:29px}#lesson-breed-hint{font-size:11px;width:80px;top:calc(100% + 9px)}#lesson-breed-hint svg{width:46px;height:42px;top:-24px;right:82%}.game-frame[data-view=lesson] .darwin-portrait:has(#darwin-painted[data-costume=binoculars]){width:240px;clip-path:none}}
#lesson-scene-1 .lesson-family{align-items:start}.lesson-family>.lesson-symbol{align-self:start;margin-top:104px}#lesson-breed-hint svg{left:calc(50% - 65px);right:auto;top:-28px}@media(max-width:800px){.lesson-family>.lesson-symbol{margin-top:82px}}@media(max-width:550px){.lesson-family>.lesson-symbol{margin-top:65px}#lesson-breed-hint svg{left:calc(50% - 49px);right:auto;top:-24px}}

/* Stable assembly slots; the binocular arm sits over the strip, under speech. */
.game-frame[data-view=lesson] .darwin-content{position:relative;z-index:5}
#lesson-equals{grid-column:4;grid-row:1}#lesson-child{grid-column:5;grid-row:1}
#lesson-child[data-ready=false] figcaption{visibility:hidden}
#lesson-breed-hint{animation:lesson-prompt-hover 1.35s ease-in-out infinite}
@keyframes lesson-prompt-hover{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,-5px)}}
@media(prefers-reduced-motion:reduce){#lesson-breed-hint{animation:none}}

/* A short guided start, using the real game controls. */
#tutorial-family{display:block;width:100%;height:auto;max-height:370px;object-fit:contain}
.game-frame[data-tutorial=meet] .opening-badge{display:none}
.game-frame[data-tutorial=meet] #game-guide{background:radial-gradient(ellipse at 50% 35%,#fff3d8,#e4cca0)}
.game-frame[data-tutorial=meet] #game-guide>div{max-width:790px;align-self:start;margin-top:12px}
.game-frame[data-tutorial=meet] #guide-title{display:block;text-align:center;font:750 25px/1.2 var(--game-font);color:#654a2e;margin:8px 0 12px}
.game-frame[data-tutorial=select] #more-variations,.game-frame[data-tutorial=watch] #classic-year,.game-frame[data-tutorial=preservers] #classic-preserver{outline:3px solid #f9d36f;outline-offset:5px;animation:tutorial-attention 1.8s ease-in-out infinite}
.game-frame[data-tutorial=preservers] #classic-preserver:disabled{opacity:1;cursor:default}
.game-frame[data-tutorial=watch] #journey-panel{box-shadow:inset 0 0 0 3px #d6ac57}
@keyframes tutorial-attention{50%{outline-color:#c49138;outline-offset:8px}}
@media(prefers-reduced-motion:reduce){.game-frame[data-tutorial] #more-variations,.game-frame[data-tutorial] #classic-year,.game-frame[data-tutorial] #classic-preserver{animation:none}}
@media(max-width:550px){.game-frame[data-tutorial=meet] #guide-title{font-size:19px}#tutorial-family{max-height:260px}}

/* Project history and creator credits share the game's warm journal styling. */
#section.about-project{width:min(820px,calc(100% - 28px));max-width:820px;max-height:88dvh;padding:0;overflow:hidden;background:#f7edda;color:#59452f;border:1px solid #9d7a4d;border-radius:12px;box-shadow:0 18px 65px #1c100e66;font-family:var(--game-font)}
.about-header{display:block;max-width:none;margin:0;padding:23px 32px 19px;border-bottom:1px solid #d0b98e;background:linear-gradient(130deg,#f1dcae,#e6c68e)}
.about-header .about-kicker{font-size:11px;font-weight:750;letter-spacing:.1em;text-transform:uppercase;margin:0 0 5px;color:#86663d}
#section .about-header h1{font:800 30px/1.15 var(--game-font);margin:0;color:#50351f}
#section .about-body{overflow-y:auto;max-height:calc(88dvh - 174px);padding:22px 32px 8px;overscroll-behavior:contain;scrollbar-gutter:stable}
.about-body p{font-size:15px;line-height:1.65;margin:0 0 17px}.about-body h2{font:750 21px/1.25 var(--game-font);margin:25px 0 12px;color:#6b482a}.about-body h2:first-child{margin-top:0}
.about-body a{color:#70501d;text-decoration:underline;text-underline-offset:3px}.about-body a:hover{color:#2f2314}
.about-tagline{font-weight:750;color:#73522c;padding:8px 0}
.about-download{padding:18px 20px 4px;background:#ecdfc5;border:1px solid #d1ba90;border-radius:8px;margin:20px 0 24px}
#download-game{background:#e9ca83;color:#61471f;border:1px solid #b39354;font:750 14px var(--game-font);padding:11px 16px;margin:0 0 8px;display:inline-block;text-decoration:none;border-radius:5px;cursor:pointer}#download-game:hover{background:#f4d997}
.about-body .about-small{font-size:12px;color:#7e6b51}.about-body .about-source{font-size:12px;line-height:1.55;border-top:1px solid #d6c5a4;padding-top:18px}.about-body .about-copyright{font-size:12px;font-weight:650;margin-bottom:8px}
.about-footer{padding:13px 32px;display:flex;justify-content:flex-end;background:#efe1c5;border-top:1px solid #d0b98e}#section .about-footer button{margin:0;background:#705032;border:1px solid #5e4025;color:#fff5de;font:700 13px var(--game-font);padding:9px 16px;border-radius:5px;min-height:38px}
@media(max-width:550px){.about-header{padding:18px 20px 15px}#section .about-header h1{font-size:25px}#section .about-body{padding:18px 20px 8px;max-height:calc(88dvh - 160px)}.about-body p{font-size:14px}.about-footer{padding:12px 20px}.about-download{padding:18px 14px 3px}.about-body h2{font-size:19px}}

/* Standalone Swarm game page: allow room for the projecting game logo. */
body>main{padding-top:42px}#compatibility-controls{display:none!important}
@media(max-width:550px){body>main{padding-top:28px}}
@media print{body>main{padding-top:0}}

/* Hosting details remain visible below every section; excluded from the ZIP. */
.hosting-strip{display:flex;gap:28px;align-items:center;margin:26px 0 12px;padding:22px 26px;border:1px solid #c8b68e;border-radius:10px;background:#f5edda;color:#493820;font-family:system-ui,sans-serif}.hosting-strip h2{font:700 19px/1.3 system-ui,sans-serif;margin:0 0 8px}.hosting-strip p{font:15px/1.55 system-ui,sans-serif;margin:0;max-width:770px}.hosting-links{display:flex;flex-direction:column;gap:12px;flex-shrink:0;align-items:center}.hosting-links a{display:inline-block;padding:11px 15px;border-radius:6px;background:#76572b;color:#fff5da;font-size:14px;font-weight:700;text-decoration:none}.hosting-links a:hover{background:#573e1c}.hosting-links button{border:0;background:transparent;padding:2px;color:#63471e;font:14px system-ui,sans-serif;text-decoration:underline;cursor:pointer}@media(max-width:800px){.hosting-strip{flex-direction:column;align-items:flex-start}.hosting-links{align-items:flex-start}}@media print{.hosting-strip{display:none}}

.hosting-strip{flex-wrap:wrap}.report-details{flex:1 1 100%;border-top:1px solid #d2c3a2;padding-top:14px;font:14px/1.5 system-ui,sans-serif}.report-details summary{cursor:pointer;color:#63471e;font-weight:700;text-decoration:underline}.report-details form{max-width:740px;padding-top:14px}.report-details form p{margin:0 0 12px}.report-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:12px}.report-details label{display:block;font-weight:700;margin-bottom:5px}.report-details select,.report-details input,.report-details textarea{display:block;width:100%;margin-top:5px;padding:9px;border:1px solid #b5a789;border-radius:5px;background:#fffdf6;color:#352b20;font:inherit}.report-details textarea{resize:vertical;margin-bottom:12px}.report-details button{background:#76572b;color:#fff5da;font-weight:700;border:0}.report-details button:hover{background:#573e1c}#bug-report-status:not(:empty){margin-top:10px}@media(max-width:550px){.report-fields{grid-template-columns:1fr}}@media print{.report-details{display:none}}


.download-dialog{max-width:500px;width:calc(100% - 32px);border:1px solid #b5a077;border-radius:12px;background:#fff9e9;color:#493820;padding:25px;box-shadow:0 15px 45px #2f251d66;font:15px/1.5 system-ui,sans-serif}.download-dialog::backdrop{background:#2e251c99}.download-dialog h2{font:700 22px/1.2 system-ui,sans-serif;margin:0 0 12px}.download-dialog p{margin:0 0 16px}.download-dialog label{display:block;font-weight:700}.download-dialog input{width:100%;padding:10px;margin:6px 0 12px;border:1px solid #b5a789;border-radius:5px;font:inherit}.download-dialog .download-note{font-size:13px;color:#6b5b42}.download-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.download-actions button:last-child{background:#76572b;color:#fff5da}.download-dialog #download-error{color:#9b3326}

.sidebar-footer{flex-wrap:wrap;gap:2px 8px}.sidebar-footer button:disabled{opacity:.55;cursor:not-allowed}.recap-preservers{font-weight:700;font-size:14px;color:#5b482b}.release-history{flex:1 1 100%;border-top:1px solid #d2c3a2;padding-top:14px;font:14px/1.5 system-ui,sans-serif}.release-history summary{cursor:pointer;color:#63471e;font-weight:700;text-decoration:underline}.release-history h3{font-size:15px;margin:14px 0 3px}.release-history p{font-size:14px;margin:0 0 8px}@media print{.release-history{display:none}}

.live-game #ending .recap-preservers{padding-left:180px}@media(max-width:1080px){.live-game #ending .recap-preservers{padding-left:150px}}@media(max-width:550px){.live-game #ending .recap-preservers{padding-left:95px}}@media print{.live-game #ending .recap-preservers{padding-left:0}}

.release-current{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 12px;border-top:1px solid #d2c3a2;padding-top:14px;color:#5c421c;font:14px/1.45 system-ui,sans-serif}.release-history{border-top:0;padding-top:0}.release-current strong{font-size:15px}

/* A separate mode-choice screen, before animals are selected. */
.mode-selection[hidden],#mode-sidebar[hidden],.hardcore-stamp[hidden],#life-preservers-setting[hidden],#change-mode[hidden]{display:none!important}
.mode-selection{position:absolute;inset:0;z-index:12;display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:18px;background:#f1e6cb}
.mode-card{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-width:0;min-height:0;padding:16px 14px 13px;border:2px solid #d9c9a8;border-radius:10px;background:#faf5e8;color:#3e291c;text-align:center;cursor:pointer;box-shadow:0 2px 5px #5a42201a}
.mode-card[aria-pressed=true]{border-color:#d68a22;background:#fff0cf;box-shadow:0 0 0 2px #f3d58f,0 0 14px #dea33c55}
.mode-card:hover{border-color:#bc7d28}.mode-card:focus-visible{outline:3px solid #80551c;outline-offset:2px}
.mode-card strong{font:900 clamp(19px,2.5vw,32px)/1.08 var(--game-font);letter-spacing:-.025em}.mode-subtitle{font:700 clamp(13px,1.45vw,19px)/1.25 var(--game-font);color:#68513b;margin:5px 0}
.mode-card img{display:block;width:100%;min-height:0;flex:1;object-fit:contain;max-height:65%;margin:2px 0 6px}.mode-explainer{font:700 clamp(12px,1.1vw,16px)/1.35 var(--game-font);max-width:420px}
#mode-sidebar h2{font:900 24px/1.12 var(--game-font);text-transform:uppercase;color:#3c281b}#mode-sidebar h2:after{content:'';display:block;width:70px;height:3px;background:#b69a60;margin:16px 0}#mode-sidebar p{font:600 15px/1.5 var(--game-font)}
.hardcore-stamp{position:absolute;z-index:3;right:-10px;top:12px;padding:3px 5px;border:3px solid #a72e23;border-radius:3px;color:#a72e23;background:#fff6e9;font:900 13px/1 var(--game-font);white-space:nowrap;transform:rotate(11deg);box-shadow:0 1px 2px #38201855}
.hardcore-stamp.stamp-hit{animation:stamp-hit .24s ease-out}.opening-badge-wrap{position:relative;display:inline-block}.opening-stamp{top:10%;right:-3%;font-size:clamp(16px,3vw,35px);border-width:4px;padding:5px 8px}@keyframes stamp-hit{from{opacity:0;transform:rotate(11deg) scale(1.8)}to{opacity:1;transform:rotate(11deg) scale(1)}}
#change-mode{position:absolute;left:175px;bottom:6px;z-index:11;border:0;background:transparent;color:#f6e5be;text-decoration:underline;font:600 12px var(--game-font);padding:3px 6px}
@media(max-width:800px){.mode-selection{padding:10px;gap:8px}.mode-card{padding:9px}.mode-card strong{font-size:19px}.mode-subtitle{font-size:13px}.mode-explainer{font-size:12px}.hardcore-stamp{font-size:10px}}
@media(max-width:550px){.mode-selection{overflow:auto;grid-template-columns:1fr;align-content:start}.mode-card img{max-height:150px}.mode-card{min-height:260px}#change-mode{left:100px}}
@media(prefers-reduced-motion:reduce){.hardcore-stamp.stamp-hit{animation:none}}

.game-title .hardcore-stamp{color:#a72e23;top:38%;right:-34px}

.game-frame[data-mode-choice=true] .darwin-strip.painted-welcome{z-index:15}

.game-frame[data-mode-choice=true] .darwin-portrait{transform:translateY(55px)}

/* Place the mode stamp over the beasties, keeping their faces and logo text clear. */
.game-title .hardcore-stamp,.opening-stamp,.transition-stamp{box-sizing:border-box;left:26%;right:auto;top:72%;width:48%;padding:2px 3px;border:2px solid #9d2c20;border-radius:2px;background:rgba(255,248,230,.94);color:#92271d;text-align:center;white-space:nowrap;transform:none;box-shadow:0 1px 3px #321b1455}
.game-title .hardcore-stamp{font:900 clamp(7px,.8vw,10px)/1.05 var(--game-font)}
.opening-stamp,.transition-stamp{font:900 clamp(14px,2vw,30px)/1.05 var(--game-font);border-width:3px;padding:4px}
.transition-stamp.stamp-hit{animation:chest-stamp-hit .22s ease-out}@keyframes chest-stamp-hit{from{opacity:0;transform:scale(1.8)}to{opacity:1;transform:scale(1)}}
.mode-stamp-transition[hidden]{display:none!important}.mode-stamp-transition{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;background:#f0dfb9 url(assets/habitat-cleared.webp) center/cover}.transition-logo{position:relative;width:min(78%,680px)}.transition-logo img{display:block;width:100%;height:auto}
.game-frame[data-view=ending] #classic-talk{grid-template-columns:minmax(0,1fr) auto 105px;gap:18px}#change-mode{position:static;border:1px solid #a99064;border-radius:5px;background:#4a3020;color:#fff2d1;text-decoration:none;font:700 12px/1.2 var(--game-font);padding:9px 10px;white-space:nowrap;cursor:pointer}#change-mode:hover{background:#66452e}#change-mode:focus-visible{outline:3px solid #f0ce86;outline-offset:3px}
@media(max-width:550px){.game-frame[data-view=ending] #classic-talk{grid-template-columns:1fr auto;gap:8px}.game-frame[data-view=ending] .classic-bubble{grid-column:1 / -1}#change-mode{justify-self:end}.game-title .hardcore-stamp{font-size:6px;border-width:1px}}
@media(prefers-reduced-motion:reduce){.transition-stamp.stamp-hit{animation:none}}

.opening-badge-wrap[hidden],.game-frame[data-tutorial=meet] .opening-badge-wrap{display:none!important}

/* Hosted-page contact form; not part of the portable game interface. */
.contact-honeypot{display:none!important}.contact-device{margin:8px 0 14px}.contact-device summary{font-size:13px;font-weight:600}.contact-device .report-fields{margin-top:12px}.contact-privacy{font-size:12px;color:#65573c}#bug-report[aria-busy=true] button{opacity:.65;cursor:wait}#bug-report-status[data-state=success]{color:#375025;font-weight:700}#bug-report-status[data-state=error]{color:#8a3027;font-weight:600}
