/* Scoped workbench styling; other chapters retain their existing layout. */
.crown-workbench{margin:1rem 0;padding:1.1rem;background:#fffaf0;border:1px solid #d7c9a8;border-radius:18px;color:#243e49;box-shadow:0 8px 24px #243e4909}
.crown-badge{display:block;font-size:.7rem;letter-spacing:.09em;font-weight:800;color:#5b716f;margin-bottom:1rem;line-height:1.5}
.crown-tool-buttons{display:flex;flex-wrap:wrap;gap:.55rem;margin:.7rem 0}
.crown-workbench .btn{font-size:.88rem;min-height:44px;white-space:normal;text-align:left;line-height:1.35;padding:.65rem .85rem}
.crown-slider{display:block;font-weight:700;margin:1rem 0;line-height:1.6}
.crown-slider output{float:right;font-variant-numeric:tabular-nums;padding:0 .5rem;background:#e4eeea;border-radius:7px}
.crown-slider input{display:block;width:100%;height:38px;margin:.45rem 0;accent-color:#267d8c;cursor:pointer;touch-action:pan-y}
.crown-workbench p,.crown-workbench li{font-size:.93rem;line-height:1.65}
.crown-workbench [data-experiment-message]{margin:.9rem 0 0;min-height:3.2em;padding:.8rem;border-radius:10px;background:#eaf1ec;border-left:3px solid #47847e}
.crown-workbench button:focus-visible,.crown-workbench input:focus-visible{outline:3px solid #285e7d;outline-offset:3px}
.crown-workbench button:disabled,.crown-workbench input:disabled{opacity:.6;cursor:default}
.crown-observations{padding-left:1.5rem}
@media(max-width:620px){.crown-workbench{padding:.9rem}.crown-tool-buttons .btn{flex:1 1 46%}.crown-slider output{float:none;display:inline-block;margin-left:.5rem}}
@media(prefers-reduced-motion:reduce){.crown-workbench *{scroll-behavior:auto!important;transition:none!important}}

.level-dialog-page{margin:1.25rem 0;padding:0 0 1rem}
.level-dialog-card{max-width:1020px;margin:0 auto;background:linear-gradient(180deg,#fffaf2 0%,#fff6ea 100%);border:1px solid #d8c7a7;border-radius:26px;box-shadow:0 18px 38px rgba(53,45,25,.10);padding:1.15rem 1.15rem 1.4rem;color:#2b3540}
.level-dialog-card h2{margin:.25rem 0 .6rem;font-size:clamp(1.6rem,2.5vw,2.3rem);line-height:1.15;color:#55351c}
.level-dialog-subtitle{margin:0 0 1rem;font-size:1rem;line-height:1.6;color:#5f554a}
.level-dialog-figure{margin:0 0 1rem;border-radius:20px;overflow:hidden;background:#f4ecdf;border:1px solid #d7cab4}
.level-dialog-figure img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover}
.level-dialog-figure figcaption{padding:.7rem .9rem;font-size:.94rem;line-height:1.55;color:#645848;background:#fffaf1;border-top:1px solid #e7ddcd}
.level-dialogue-stack{display:grid;gap:.75rem;margin:1rem 0}
.level-dialogue-line,.level-dialogue-note{padding:.85rem 1rem;border-radius:16px;background:#fffdf8;border:1px solid #e3d8c7;box-shadow:0 4px 10px rgba(35,39,42,.04)}
.level-dialogue-line strong{display:block;margin-bottom:.2rem;color:#785128;letter-spacing:.01em}
.level-dialogue-line p,.level-dialogue-note{margin:0;line-height:1.6}
.level-dialog-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.9rem;margin-top:1.1rem}
.level-dialog-option{display:flex;flex-direction:column;gap:.6rem;align-items:flex-start;width:100%;padding:.8rem;border-radius:18px;border:1px solid #d9c6a8;background:#fffdf9;box-shadow:0 8px 18px rgba(53,45,25,.05);cursor:pointer;text-align:left;color:#29333d;font:inherit}
.level-dialog-option:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(53,45,25,.10)}
.level-dialog-option img{display:block;width:100%;height:auto;aspect-ratio:12/7;object-fit:cover;border-radius:14px;border:1px solid #e2d3ba;background:#f2ebdf}
.level-dialog-option span{font-weight:700;line-height:1.45}
.level-dialog-option:focus-visible,.level-dialog-actions .btn:focus-visible{outline:3px solid #285e7d;outline-offset:3px}
.level-dialog-actions{display:flex;flex-wrap:wrap;gap:.8rem;margin-top:1rem}
.level-dialog-page--consequence .level-dialog-card{max-width:920px}
.level-failure-card--story{max-width:860px}
.level-failure-scene{margin:1rem 0;border-radius:18px;overflow:hidden;background:#f6efe3;border:1px solid #dbcab2}
.level-failure-scene img{display:block;width:100%;height:auto}
@media (max-width:700px){
  .level-dialog-card{padding:1rem .9rem 1.2rem;border-radius:22px}
  .level-dialog-actions{flex-direction:column}
  .level-dialog-actions .btn{width:100%}
}

.level-dialog-page--hotspots .level-dialog-card{max-width:1120px;padding:.7rem;background:#17191f;border-color:#8b6f46}
.level-dialog-page--hotspots .level-dialog-figure{margin:0;border-radius:18px;border-color:#8b6f46;position:relative;overflow:hidden}
.level-dialog-page--hotspots .level-dialog-figure img{aspect-ratio:3/2;object-fit:contain;background:#17191f}
.level-dialog-hotspot{position:absolute;z-index:2;border:2px solid transparent;border-radius:15px;background:transparent;cursor:pointer;padding:0;margin:0;transition:border-color .14s ease,background-color .14s ease,box-shadow .14s ease}
.level-dialog-hotspot span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.level-dialog-hotspot:hover{border-color:#ffe17b;background:rgba(255,225,123,.09);box-shadow:0 0 0 3px rgba(255,225,123,.18),0 0 24px rgba(255,212,90,.3)}
.level-dialog-hotspot:focus-visible{outline:4px solid #fff3a6;outline-offset:-4px;border-color:#dcae39;background:rgba(255,225,123,.12)}
.level-dialog-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:700px){.level-dialog-page--hotspots .level-dialog-card{padding:.35rem;border-radius:16px}.level-dialog-page--hotspots .level-dialog-figure{border-radius:13px}.level-dialog-hotspot{border-radius:9px}}

/* Keep the original desktop illustrated hotspots; readable touch choices below. */
.level-dialog-readable{display:none}
@media(max-width:700px){
 .level-dialog-page--hotspots .level-dialog-hotspot{display:none}
 .level-dialog-readable{display:block;padding:1rem .6rem;color:#fff6df}
 .level-dialog-readable-title{font-size:1.3rem;font-weight:800;margin:0 0 .6rem}
 .level-dialog-readable p{line-height:1.55}
 .level-dialog-readable-options{display:grid;gap:.7rem}
 .level-dialog-readable-options .btn{min-height:44px;width:100%;white-space:normal;text-align:left;line-height:1.45;padding:.85rem;font-size:1rem;color:#243e49;background:#fffaf0}
}

/* A readable cost notice, including the dark illustrated decision page. */
.level-dialog-choice-notice{padding:.8rem 1rem;margin:.75rem 0;border:2px solid #955b33;border-radius:12px;background:#fff6df;color:#603516;font-weight:700;line-height:1.5}
