.quest{--q-red:#ae3928;--q-yellow:#f1cb61;--q-paper:#fffef9;--q-chart:#faf5e9;--q-ink:#25271f;--q-line:#b8b5a7;box-sizing:border-box;width:100%;height:100%;color:var(--q-ink);background:var(--q-paper);font-family:Arial,Helvetica,sans-serif;text-align:left;display:flex;flex-direction:column;container-type:inline-size;overflow:hidden}
.quest *{box-sizing:border-box}.quest p,.quest h2,.quest h3,.quest ol{margin:0}.quest b{font-weight:400}.q-header{height:5.5cqw;min-height:5.5cqw;border-bottom:.2cqw solid var(--q-ink);display:flex;align-items:center;justify-content:space-between;padding:0 2.1cqw;gap:1cqw}.q-brand{font:700 2.6cqw Georgia,serif;letter-spacing:-.09cqw;color:var(--q-red)}.q-header-meta{font:700 1.07cqw monospace;letter-spacing:.04cqw}.q-header-meta b,.q-footer b{padding:0 .4cqw}.q-body{display:grid;grid-template-columns:1fr 1fr;flex:1;min-height:0}.q-left,.q-right{min-width:0;overflow:hidden;padding:1.5cqw 2cqw}.q-left{border-right:.14cqw solid var(--q-ink);display:flex;flex-direction:column}.q-section{display:flex;align-items:center;justify-content:space-between;gap:1cqw;font:1.05cqw/1.4 monospace;letter-spacing:.04cqw}.q-section strong{font-size:1.1cqw;letter-spacing:.07cqw;white-space:nowrap}.q-section>span{text-align:right}.q-chart-head{display:flex;align-items:center;justify-content:space-between;gap:1cqw;margin-bottom:1cqw}.q-kicker{display:block;font:1.02cqw/1.2 monospace;text-transform:uppercase;letter-spacing:.08cqw;color:var(--q-red);margin-bottom:.35cqw}.q-chart-head h3{font:700 2.05cqw/1.12 Georgia,serif}.q-map-auto{font:700 .9cqw monospace;white-space:nowrap;border:.1cqw solid var(--q-line);padding:.4cqw}.q-atlas{height:22.7cqw;min-height:22.7cqw;position:relative;overflow:hidden;border:.12cqw solid var(--q-line);background:var(--q-chart)}.q-map-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}.q-map{position:relative;display:block;width:100%;height:100%;overflow:hidden}.q-atlas-dungeon{background:radial-gradient(ellipse at center,var(--q-paper),var(--q-chart))}.q-map-roads{fill:none;stroke:var(--q-ink);stroke-width:1.1;stroke-dasharray:3 3;stroke-linecap:round;opacity:.45}.q-map-trail{fill:none;stroke:var(--q-red);stroke-width:2.3;stroke-dasharray:4 3;stroke-linecap:round;stroke-linejoin:round}.q-waypoint.c0{display:none}.q-room-node,.q-world-node{fill:var(--q-paper);stroke:var(--q-ink);stroke-width:1.05}.q-waypoint.c1 .q-room-node{stroke-dasharray:2 2}.q-waypoint.c3 .q-room-node,.q-waypoint.c3 .q-world-node{fill:var(--q-yellow);stroke-width:1.8}.q-waypoint.c2 .q-world-node{fill:var(--q-red)}.q-node-glyph{font:8px Georgia,serif;text-anchor:middle;fill:var(--q-ink)}.q-atlas-world .q-node-glyph{font:700 7px monospace}.q-atlas-world .q-waypoint.c2 .q-node-glyph{fill:var(--q-paper)}.q-map-label{font:italic 9px Georgia,serif;text-anchor:middle;fill:var(--q-ink);paint-order:stroke;stroke:var(--q-chart);stroke-width:3.5px;stroke-linejoin:round}.q-legend{display:flex;justify-content:space-between;align-items:center;gap:.6cqw;min-height:2.6cqw;font:1cqw/1.3 monospace;white-space:nowrap;border-bottom:.1cqw solid var(--q-line)}.q-legend>span:last-child{font-size:.93cqw}.q-goal{padding:1cqw 0 .9cqw;border-bottom:.1cqw solid var(--q-line)}.q-goal p{font:italic 1.6cqw/1.3 Georgia,serif;margin-top:.45cqw}.q-story{padding-top:1cqw;flex:1;min-height:0}.q-story ol{list-style:none;padding:0;font:1.55cqw/1.35 Arial,sans-serif}.q-story li{padding-left:1.15cqw;position:relative;margin-top:.65cqw;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.q-story li:before{content:'›';position:absolute;left:0;font-weight:bold;color:var(--q-red)}.q-party{display:grid;grid-template-columns:repeat(4,1fr);gap:.6cqw;border-top:.13cqw solid var(--q-ink);padding-top:.8cqw;margin-top:.85cqw;flex-shrink:0}.q-hero{display:flex;align-items:center;position:relative;gap:.2cqw;padding-bottom:.6cqw;min-width:0}.q-hero svg{width:3.6cqw;flex-shrink:0}.q-hero strong{display:block;font:700 1.2cqw Arial,sans-serif}.q-hero span{display:block;font:1cqw/1.5 monospace;white-space:nowrap}.q-hp{position:absolute;bottom:0;left:0;right:0;height:.25cqw;background:var(--q-line)}.q-hp:after{content:'';display:block;height:100%;width:var(--hp);background:var(--q-ink)}.q-art{height:19.8cqw;margin:.85cqw 0 1cqw;border:.1cqw solid var(--q-ink);overflow:hidden;background:#e5dbbd}.q-scene-image{height:100%;width:100%;object-fit:cover;display:block}.quest h2{font:700 2.65cqw/1.12 Georgia,serif;margin:.7cqw 0 .65cqw}.q-narrative{font:1.64cqw/1.38 Arial,sans-serif;min-height:6.7cqw}.q-roll{font:1.02cqw/1.3 monospace;border-block:.1cqw solid var(--q-line);margin:.8cqw 0;padding:.55cqw 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.q-next{margin-bottom:.7cqw}.q-choice{appearance:none;border:0;border-top:.1cqw solid var(--q-line);background:var(--q-paper);color:var(--q-ink);display:flex;align-items:center;gap:.7cqw;width:100%;min-height:3.5cqw;text-align:left;padding:.4cqw .6cqw;font:1.55cqw/1.25 Arial,sans-serif;cursor:pointer}.q-choice:disabled{opacity:1;cursor:default}.q-choice.q-auto{background:var(--q-yellow);border:.13cqw solid var(--q-ink)}.q-number{font:1.12cqw monospace;border:.1cqw solid var(--q-ink);height:1.8cqw;width:1.8cqw;display:flex;align-items:center;justify-content:center;flex-shrink:0}.q-choice-text{flex:1}.q-choice-meta{font:700 1cqw monospace;white-space:nowrap}.q-choice:focus-visible{outline:.3cqw solid var(--q-red);outline-offset:-.3cqw}.q-scene-location{font:italic 1.15cqw/1.3 Georgia,serif;margin-top:.8cqw!important;color:var(--q-ink)}.q-footer{display:flex;justify-content:space-between;align-items:center;padding:0 2.1cqw;height:3cqw;min-height:3cqw;border-top:.14cqw solid var(--q-ink);font:1.03cqw/1.3 monospace}.q-mono .quest,.screen--1bit .quest,.screen--2bit .quest,.screen--4bit .quest{--q-red:#000;--q-yellow:#fff;--q-ink:#000;--q-line:#999;--q-paper:#fff;--q-chart:#fff}.q-mono .q-scene-image,.q-mono .q-map-art{filter:grayscale(1) contrast(1.1)}
/* Compact formats preserve the map, scene and highlighted decision. */
.q-half_horizontal .q-header{height:5cqw;min-height:5cqw}.q-half_horizontal .q-brand{font-size:2.1cqw}.q-half_horizontal .q-left,.q-half_horizontal .q-right{padding:1cqw 1.6cqw}.q-half_horizontal .q-chart-head{margin-bottom:.5cqw}.q-half_horizontal .q-chart-head h3{font-size:1.65cqw}.q-half_horizontal .q-kicker{font-size:.85cqw}.q-half_horizontal .q-atlas{height:16cqw;min-height:16cqw}.q-half_horizontal .q-legend{min-height:2cqw}.q-half_horizontal .q-goal,.q-half_horizontal .q-story,.q-half_horizontal .q-party,.q-half_horizontal .q-art,.q-half_horizontal .q-roll,.q-half_horizontal .q-scene-location,.q-half_horizontal .q-footer{display:none}.q-half_horizontal h2{font-size:2.2cqw}.q-half_horizontal .q-narrative{min-height:0;font-size:1.5cqw;margin-bottom:.6cqw}.q-half_horizontal .q-choice{min-height:2.7cqw;font-size:1.25cqw;padding:.25cqw .5cqw}.q-half_horizontal .q-next{margin-bottom:.3cqw}
.q-half_vertical .q-header,.q-quadrant .q-header{height:10cqw;min-height:10cqw}.q-half_vertical .q-brand,.q-quadrant .q-brand{font-size:4.4cqw}.q-half_vertical .q-header-meta,.q-quadrant .q-header-meta{font-size:1.9cqw;max-width:25%;text-align:right}.q-half_vertical .q-body{display:flex;flex-direction:column}.q-half_vertical .q-left{padding:2cqw 4cqw;border-right:0;border-bottom:.1cqw solid var(--q-ink);flex-shrink:0}.q-half_vertical .q-chart-head h3{font-size:3.5cqw}.q-half_vertical .q-kicker,.q-half_vertical .q-map-auto{font-size:1.6cqw}.q-half_vertical .q-atlas{height:28cqw;min-height:28cqw}.q-half_vertical .q-legend{min-height:4cqw;font-size:1.7cqw}.q-half_vertical .q-legend>span:last-child{font-size:1.6cqw}.q-half_vertical .q-goal,.q-half_vertical .q-story,.q-half_vertical .q-party,.q-half_vertical .q-art,.q-half_vertical .q-scene-location{display:none}.q-half_vertical .q-right{padding:2cqw 4cqw}.q-half_vertical .q-section,.q-half_vertical .q-section strong{font-size:1.9cqw}.q-half_vertical h2{font-size:4.7cqw;margin:1cqw 0}.q-half_vertical .q-narrative{font-size:2.9cqw;min-height:0}.q-half_vertical .q-roll{font-size:1.85cqw;margin:1.5cqw 0;padding:1.1cqw 0}.q-half_vertical .q-choice{font-size:2.6cqw;min-height:6.3cqw;gap:1.2cqw;padding:.5cqw 1cqw}.q-half_vertical .q-choice-meta{font-size:1.7cqw}.q-half_vertical .q-number{font-size:2cqw;width:3.2cqw;height:3.2cqw}.q-half_vertical .q-next{margin-bottom:1cqw}.q-half_vertical .q-footer,.q-quadrant .q-footer{font-size:1.8cqw;height:5.5cqw;min-height:5.5cqw}
.q-quadrant .q-left,.q-quadrant .q-right{padding:2cqw}.q-quadrant .q-chart-head h3{font-size:3.2cqw}.q-quadrant .q-kicker{font-size:1.6cqw}.q-quadrant .q-map-auto,.q-quadrant .q-goal,.q-quadrant .q-story,.q-quadrant .q-party,.q-quadrant .q-legend,.q-quadrant .q-art,.q-quadrant .q-roll,.q-quadrant .q-next,.q-quadrant .q-scene-location,.q-quadrant .q-choice:not(.q-auto){display:none}.q-quadrant .q-atlas{height:33cqw;min-height:33cqw}.q-quadrant .q-section,.q-quadrant .q-section strong{font-size:1.8cqw}.q-quadrant .q-section>span{display:none}.q-quadrant h2{font-size:4cqw;margin:1cqw 0}.q-quadrant .q-narrative{font-size:2.7cqw;line-height:1.3;min-height:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;margin-bottom:2cqw}.q-quadrant .q-choice{min-height:7cqw;font-size:2.5cqw;padding:1cqw;line-height:1.3}.q-quadrant .q-choice-meta,.q-quadrant .q-number{display:none}.q-quadrant .q-choice-text:before{content:'AUTO → ';font-weight:bold;font-size:1.9cqw}

.q-full .q-atlas{height:19.8cqw;min-height:19.8cqw}.q-full .q-art{height:17.4cqw}.q-full .q-scene-location{display:none}.q-full .q-goal{padding:.7cqw 0}.q-story{overflow:hidden}.screen--1bit .q-scene-image,.screen--2bit .q-scene-image,.screen--4bit .q-scene-image,.screen--1bit .q-map-art,.screen--2bit .q-map-art,.screen--4bit .q-map-art{filter:grayscale(1) contrast(1.1)}

/* Keep the full browser game readable and tappable on a phone. Native templates are separate. */
@media(max-width:600px){
 .device.full .screen{aspect-ratio:auto}
 .q-full.quest{height:auto;min-height:0}
 .q-full .q-header{min-height:44px;height:auto;padding:10px 12px;gap:10px}
 .q-full .q-brand{font-size:16px}.q-full .q-header-meta{font-size:8px;max-width:100px;text-align:right}
 .q-full .q-body{grid-template-columns:1fr}
 .q-full .q-left,.q-full .q-right{padding:14px 12px;overflow:visible}
 .q-full .q-left{border-right:0;border-bottom:1px solid var(--q-ink)}
 .q-full .q-chart-head{gap:8px;margin-bottom:9px}.q-full .q-chart-head h3{font-size:20px}
 .q-full .q-kicker{font-size:10px;margin-bottom:4px}.q-full .q-map-auto{font-size:8px;padding:4px}
 .q-full .q-atlas{height:185px;min-height:185px}
 .q-full .q-legend{min-height:32px;font-size:9px;gap:4px;white-space:normal}.q-full .q-legend>span:last-child{font-size:9px;text-align:right}
 .q-full .q-section,.q-full .q-section strong{font-size:10px;letter-spacing:0;gap:8px}
 .q-full .q-goal{padding:10px 0}.q-full .q-goal p{font-size:15px;margin-top:5px}
 .q-full .q-story{padding-top:10px}.q-full .q-story ol{font-size:13px;line-height:1.5}.q-full .q-story li{padding-left:12px;margin-top:7px}
 .q-full .q-party{gap:5px;padding-top:8px;margin-top:12px}.q-full .q-hero{gap:3px;padding-bottom:6px}.q-full .q-hero svg{width:23px}.q-full .q-hero strong{font-size:10px}.q-full .q-hero span{font-size:9px}.q-full .q-hp{height:2px}
 .q-full .q-art{height:165px;margin:10px 0;border-width:1px}
 .q-full h2{font-size:24px;margin:10px 0 8px}.q-full .q-narrative{font-size:15px;line-height:1.5;min-height:0}
 .q-full .q-roll{font-size:10px;line-height:1.5;white-space:normal;margin:12px 0;padding:8px 0}
 .q-full .q-next{margin-bottom:8px}.q-full .q-choice{min-height:44px;padding:8px;gap:8px;font-size:14px;border-width:1px}.q-full .q-choice.q-auto{border-width:1px}
 .q-full .q-number{font-size:11px;width:20px;height:20px}.q-full .q-choice-meta{font-size:9px}
 .q-full .q-footer{font-size:9px;height:auto;min-height:40px;gap:8px;padding:8px 12px}.q-full .q-footer>span:last-child{text-align:right}
 .palette button{min-height:36px}.secondary-controls{flex-wrap:wrap}.secondary-controls .text-btn{min-height:36px;display:flex;align-items:center}
}
