.hex-study { --hex-paper-colour:#f3ecd8; --hex-paper-grain-opacity:.28; --hex-ink: #43483d; --hex-muted: #72776b; --hex-border: #dce0d6; --hex-accent: #576b45; }
.hex-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:26px; }
.hex-heading h1 { margin:0; }.hex-intro { margin:9px 0 0; color:var(--hex-muted); font-size:15px; }
.hex-stage { flex-shrink:0; border:1px solid var(--hex-border); border-radius:999px; padding:7px 12px; font-size:12px; color:var(--hex-accent); background:#f5f7f1; }
.hex-workspace { display:grid; grid-template-columns:minmax(0,1fr) 248px; gap:24px; align-items:start; }
.hex-map-column { min-width:0; border:1px solid var(--hex-border); border-radius:12px; overflow:hidden; background:#fafaf6; }
.hex-map-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 18px; border-bottom:1px solid var(--hex-border); background:#fff; }
.hex-study h2 { font-size:16px; line-height:1.35; font-weight:700; margin:0; color:var(--hex-ink); }
.hex-map-toolbar span { font-size:12px; color:var(--hex-muted); }.hex-map-options { display:flex; align-items:center; gap:14px; }.hex-map-options label { display:flex; align-items:center; gap:7px; font-size:13px; min-height:44px; }.hex-map-options input { width:16px; height:16px; accent-color:var(--hex-accent); }
.hex-study .button { min-height:44px; font-size:13px; display:inline-flex; align-items:center; justify-content:center; padding:8px 13px; background:#fff; color:var(--hex-ink); border:1px solid var(--hex-border); cursor:pointer; }
.hex-map-viewport { width:100%; aspect-ratio:1.5; position:relative; overflow:hidden; background:#f7f7f1; }
#hex-map { display:block; width:100%; height:100%; touch-action:none; user-select:none; cursor:grab; }#hex-map:active { cursor:grabbing; }
.hex-floors,.hex-underpaint { pointer-events:none; }.hex-grid { fill:none; pointer-events:none; }.hex-grid path { vector-effect:non-scaling-stroke; }.hex-grid[hidden] { display:none; }
.hex-cell { fill:transparent; stroke:transparent; stroke-width:2.5; cursor:pointer; outline:none; vector-effect:non-scaling-stroke; }.hex-cell:hover { fill:#fff; fill-opacity:.15; stroke:#596c47; stroke-width:1.5; }.hex-cell[aria-pressed="true"] { fill:#fff; fill-opacity:.12; stroke:#3e5934; }.hex-cell:focus-visible { stroke:#152d80; stroke-width:3; }
.hex-map-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 16px; border-top:1px solid var(--hex-border); background:#fff; }.hex-map-footer p { color:var(--hex-muted); font-size:12px; margin:0; max-width:36em; }.hex-zoom { display:flex; align-items:center; gap:5px; flex-shrink:0; }.hex-zoom .button { width:44px; font-size:22px; padding:0; }.hex-zoom output { text-align:center; min-width:48px; font-size:12px; font-variant-numeric:tabular-nums; }
.hex-inspector { min-width:0; }.hex-muted { font-size:13px; line-height:1.55; color:var(--hex-muted); margin:7px 0 12px; }.hex-palette { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }.hex-floor-card { border:1px solid transparent; background:transparent; padding:8px 2px; border-radius:8px; display:flex; align-items:center; flex-direction:column; gap:6px; cursor:pointer; color:var(--hex-ink); font:inherit; min-height:44px; }.hex-floor-card img { width:58px; height:67px; display:block; }.hex-floor-card span { font-size:11px; }.hex-floor-card:hover { background:#f5f6f1; }.hex-floor-card[aria-pressed="true"] { background:#f4f6ee; border-color:#b9c6aa; }.hex-study button:focus-visible,.hex-study a:focus-visible,.hex-study summary:focus-visible { outline:2px solid #29458b; outline-offset:3px; }
.hex-selection { border-top:1px solid var(--hex-border); margin-top:18px; padding-top:18px; text-align:center; }.hex-selection h3 { margin:0 0 12px; font-size:14px; color:var(--hex-ink); }.hex-selection img { margin:auto; display:block; width:104px; height:120px; }.hex-colour { font-size:11px; font-family:monospace; color:var(--hex-muted); margin:10px 0; }.hex-selection .hex-muted { min-height:40px; }
.hex-grid-settings { border-top:1px solid var(--hex-border); margin-top:14px; padding-top:6px; }
.hex-grid-settings summary { min-height:44px; display:flex; align-items:center; font-size:13px; cursor:pointer; gap:7px; }.hex-grid-settings summary:before { content:"+"; font-size:17px; }.hex-grid-settings[open] summary:before { content:"−"; }
.hex-grid-settings label { display:flex; justify-content:space-between; align-items:center; font-size:12px; min-height:36px; gap:12px; }.hex-grid-settings output { color:var(--hex-muted); font-variant-numeric:tabular-nums; }.hex-grid-settings input[type=range] { width:100%; min-height:44px; accent-color:var(--hex-accent); margin:0 0 4px; }.hex-grid-settings input[type=color] { width:48px; height:44px; padding:3px; border:1px solid var(--hex-border); background:#fff; border-radius:5px; }.hex-grid-settings .button { margin:10px 0; }
.hex-layer-details { border-top:1px solid var(--hex-border); padding-top:8px; }.hex-layer-details summary { font-size:12px; cursor:pointer; min-height:44px; display:flex; align-items:center; gap:7px; }.hex-layer-details summary:before { content:"+"; font-size:17px; }.hex-layer-details[open] summary:before { content:"−"; }.hex-layer-details dl { font-size:12px; margin:0 0 16px; overflow-wrap:anywhere; }.hex-layer-details dt { font-weight:700; margin-top:9px; }.hex-layer-details dd { margin:3px 0 0; color:var(--hex-muted); line-height:1.5; }.hex-download { width:100%; margin-top:12px; text-decoration:none; }
@media(min-width:1600px) { .hex-map-viewport { aspect-ratio:1.65; } }
@media(max-width:1000px) { .hex-workspace { grid-template-columns:minmax(0,1fr) 218px; gap:18px; }.hex-palette { gap:3px; }.hex-floor-card img { width:52px; height:60px; } }
@media(max-width:760px) { .hex-heading { align-items:flex-start; flex-direction:column; gap:12px; margin-bottom:20px; }.hex-workspace { grid-template-columns:minmax(0,1fr); gap:22px; }.hex-map-viewport { aspect-ratio:1.08; }.hex-map-toolbar { padding:12px; }.hex-map-toolbar span { font-size:11px; }.hex-map-options { gap:8px; }.hex-map-options .button { padding:8px 10px; }.hex-map-footer { padding:8px 10px; }.hex-map-footer p { font-size:11px; }.hex-zoom { gap:0; }.hex-zoom output { min-width:38px; }.hex-palette { grid-template-columns:repeat(6,minmax(0,1fr)); gap:4px; }.hex-floor-card { padding:8px 0; }.hex-floor-card img { width:44px; height:51px; }.hex-floor-card span { font-size:10px; }.hex-selection { margin-top:14px; }.hex-selection .hex-muted { min-height:0; }.hex-layer-details { margin-top:16px; } }
@media(max-width:380px) { .hex-palette { grid-template-columns:repeat(3,minmax(0,1fr)); }.hex-map-toolbar { flex-wrap:wrap; }.hex-map-options { width:100%; justify-content:space-between; }.hex-map-footer { align-items:flex-start; }.hex-map-footer p { max-width:14em; } }
@media(prefers-reduced-motion:reduce) { .hex-study * { scroll-behavior:auto; } }

.hex-visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.hex-render-controls { margin:0; padding:7px 16px; border:0; border-bottom:1px solid var(--hex-border); display:flex; align-items:center; flex-wrap:wrap; gap:0 18px; background:#fff; }
.hex-render-controls label { display:flex; gap:6px; align-items:center; min-height:44px; font-size:12px; color:var(--hex-ink); white-space:nowrap; }.hex-render-controls input[type=checkbox] { width:16px; height:16px; accent-color:var(--hex-accent); }
.hex-render-controls .hex-texture-strength { gap:8px; }.hex-texture-strength input { width:95px; min-height:44px; accent-color:var(--hex-accent); }.hex-texture-strength output { min-width:31px; font-size:11px; font-variant-numeric:tabular-nums; }
.hex-terrain-art,.hex-ground-texture { pointer-events:none; }.hex-terrain-art[hidden],.hex-selection [hidden] { display:none; }
.hex-study.hide-textures .hex-ground-texture,.hex-study.hide-forest .hex-art-forest,.hex-study.hide-mountains .hex-art-mountains { display:none; }
.hex-palette-tile { display:block; width:75px; height:81px; }.hex-selection-tile { display:block; width:210px; height:227px; margin:auto; }
.hex-study.is-monochrome { --hex-paper-colour:#fff; --hex-paper-grain-opacity:0; }.hex-study.is-monochrome .hex-pencil-ink { stroke:#000; }.hex-study.is-monochrome .hex-map-viewport { background:#fff; }
.hex-colour-help { display:none; font-size:11px; color:var(--hex-muted); margin:6px 0; }.hex-study.is-monochrome .hex-colour-help { display:block; }
@media(max-width:1000px) { .hex-palette-tile { width:67px; height:72px; }.hex-render-controls { gap:0 14px; } }
@media(max-width:760px) { .hex-palette-tile { width:56px; height:60px; }.hex-render-controls { padding:5px 12px; gap:0 14px; }.hex-render-controls label { font-size:11px; }.hex-render-controls .hex-texture-strength { width:100%; justify-content:space-between; }.hex-texture-strength input { flex:1; width:100px; max-width:160px; } }


.hex-study .hex-floors,.hex-study .hex-underpaint,.hex-study .hex-floor-base { display:none; }
.hex-map-viewport { background:#f3ecd8; }.hex-paper-base,.hex-paper-noise { pointer-events:none; }
.hex-paper-base { fill:var(--hex-paper-colour); }.hex-paper-noise { opacity:var(--hex-paper-grain-opacity); }
.hex-study.hide-symbols .hex-symbol-shading,.hex-study.hide-lines .hex-ink-lines { display:none; }
.hex-symbol-shading { pointer-events:none; }.hex-map-options { flex-wrap:wrap; }
@media(max-width:760px) { .hex-map-toolbar { flex-wrap:wrap; }.hex-map-options { width:100%; justify-content:space-between; gap:6px; } }

#hex-material-seed { display:block; font-variant-numeric:tabular-nums; }

.hex-grid-strength { flex-wrap:wrap; gap:6px; }.hex-map-options .hex-grid-strength input { width:90px; min-height:44px; accent-color:var(--hex-accent); }.hex-grid-strength output { min-width:32px; font-size:11px; }
.hex-map-toolbar { flex-wrap:wrap; }.hex-map-options { justify-content:flex-end; }.hex-foregrounds { pointer-events:none; }
.hex-study.hide-symbols.hide-lines .hex-symbol-paper { display:none; }
@media(max-width:760px) { .hex-map-options { justify-content:space-between; }.hex-map-options .hex-grid-strength { width:100%; justify-content:space-between; }.hex-map-options .hex-grid-strength input { flex:1; max-width:160px; } }

.hex-study.hide-water .hex-art-water,.hex-study.hide-plains .hex-art-plains,.hex-study.hide-hills .hex-art-hills,.hex-study.hide-marsh .hex-art-marsh { display:none; }

.hex-feature-settings { background:#fff; border-bottom:1px solid var(--hex-border); }.hex-feature-settings summary { min-height:44px; padding:0 16px; display:flex; align-items:center; gap:7px; cursor:pointer; color:var(--hex-ink); font-size:12px; }.hex-feature-settings summary:before { content:"+"; font-size:17px; }.hex-feature-settings[open] summary:before { content:"−"; }.hex-feature-settings .hex-render-controls { border-bottom:0; padding-top:0; }

/* The paper undercoat never inherits pencil pressure or layer strength. */
.hex-symbol-paper,.hex-symbol-paper path { fill:var(--hex-paper-colour); fill-opacity:1; opacity:1; }

.hex-floor-style select { min-height:44px; min-width:108px; border:1px solid var(--hex-border); border-radius:6px; background:#fff; color:var(--hex-ink); font:inherit; padding:7px 26px 7px 9px; }
.hex-floor-fills,.hex-floor-fill-preview { display:none; pointer-events:none; }
.hex-study.is-filled .hex-floor-fills,.hex-study.is-filled .hex-floor-fill-preview { display:inline; }
.hex-study.is-filled .hex-ground-texture,
.hex-study:not(.is-filled) [data-floor-control="filled"],
.hex-study.is-filled [data-floor-control="pencil"],
.hex-study.hide-textures .hex-floor-fills,.hex-study.hide-textures .hex-floor-fill-preview { display:none; }
.hex-study.is-monochrome .hex-floor-fills path,.hex-study.is-monochrome .hex-floor-fill-preview { fill:#000; stroke:#000; }
.hex-floor-style select:focus-visible { outline:2px solid #29458b; outline-offset:3px; }
@media(max-width:760px) { .hex-render-controls .hex-floor-style { width:100%; justify-content:space-between; } }

.hex-study .hex-floor-fill-preview[hidden] { display:none; }

#hex-material-problem { margin:0 0 16px; padding:12px 16px; border:1px solid #b07a55; border-radius:8px; }
#hex-material-error { margin:0 0 8px; }
.hex-download[aria-disabled="true"] { opacity:.6; pointer-events:none; }

.hex-ground-details { opacity:.86; pointer-events:none; }
.hex-study.hide-ground-details .hex-ground-details,.hex-ground-details[hidden] { display:none; }

.hex-beach-shading,.hex-beach-preview { pointer-events:none; }
.hex-study.hide-beaches .hex-beach-shading,.hex-study.hide-beaches .hex-beach-preview,.hex-beach-preview[hidden] { display:none; }

.hex-bleed-ground,.hex-bleed-fills { isolation:isolate; pointer-events:none; }
.hex-study.is-monochrome .hex-biome-colour { fill:#000; stroke:#000; }
.hex-study:not(.is-bleeding) .hex-bleed-ground,
.hex-study:not(.is-bleeding) .hex-bleed-fills,
.hex-study:not(.is-bleeding) .hex-preview-bleed-fill,
.hex-study:not(.is-bleeding) .hex-preview-bleed-pencil,
.hex-study.is-bleeding .hex-ground-regions,
.hex-study.is-bleeding #hex-hard-fills,
.hex-study.is-bleeding [data-hard-ground] { display:none; }
.hex-study.is-monochrome .hex-bleed-fills rect,.hex-study.is-monochrome .hex-preview-bleed-fill rect { fill:#000; }

.hex-study.is-bleeding .hex-beach-shading,.hex-study.is-bleeding .hex-beach-preview { display:none; }
.hex-study.hide-beaches .hex-bleed-beach-colour,.hex-bleed-beach-colour[hidden] { display:none; }
.hex-study:not(.hide-beaches) .hex-coast-biome-bleed { display:none; }

.hex-ink-lines,.hex-ground-details { opacity:var(--hex-ink-opacity,1); }

.hex-render-controls .hex-reset-settings { margin-left:auto; }
@media(max-width:760px) { .hex-render-controls .hex-reset-settings { width:100%; margin:4px 0; } }

.hex-render-status { position:absolute; top:10px; right:12px; z-index:1; margin:0; padding:6px 10px; border-radius:5px; background:#fffdf4; color:var(--hex-muted); font-size:12px; pointer-events:none; }
.hex-render-status[hidden] { display:none; }
#hex-render-image { pointer-events:none; }

.hex-selection-tile[aria-busy="true"] { opacity:.45; }

.hex-landmark-heading { margin:20px 0 10px; font-size:14px; color:var(--hex-ink); }
.hex-marker-palette { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.hex-study .hex-marker-card { padding:7px 4px; font-size:12px; }
.hex-study .hex-marker-card[aria-pressed="true"] { background:#edf2e4; border-color:#98a88b; }

.hex-feature-settings .hex-feature-seed-controls { gap:8px 14px; }
.hex-feature-seed-controls .hex-muted { flex-basis:100%; margin:0 0 4px; }
.hex-feature-seed-controls input { width:150px; max-width:100%; font-variant-numeric:tabular-nums; }
