Files

193 lines
14 KiB
CSS

:root {
color-scheme: light;
--scene-backdrop: #33291f; --panel: #927a57; --inner: #ad9672; --paper: #d5c19c;
--ink: #17120d; --muted: #30271c; --border: #51402b; --light: #f4e7ca;
--map: #222b28; --map-cell: #3f4b44; --active: #85b7be; --danger: #712c27;
--focus: #fff5cc; --line: #e6d5ad; --shadow: 0 3px 12px #160f0b55;
--radius: 6px; --space: 8px; --small: .8125rem; --body: 1rem; --title: 1.25rem;
font: var(--body)/1.5 Verdana, sans-serif;
color: var(--ink); background: var(--scene-backdrop);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .2em; }
button, select, input { font: inherit; }
button, select { border: 1px solid var(--border); border-radius: 4px; background: var(--paper); color: var(--ink); }
button { padding: 8px 12px; min-height: 44px; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
button:hover { background: var(--light); }
button:active { background: var(--active); }
button:disabled { cursor: default; opacity: .5; }
button.primary { background: var(--map); color: var(--light); border-color: var(--map); }
button.primary:hover { background: var(--border); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; box-shadow: 0 0 0 5px var(--ink); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: Georgia, serif; }
h1, h2 { font-size: var(--title); line-height: 1.3; }
h3 { font-size: 1.0625rem; margin: 16px 0 8px; }
p + p { margin-top: 8px; }
.topbar { max-width: 1840px; margin: auto; padding: 16px 20px; color: var(--light); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: baseline; gap: 16px; }
.brand > span { font-size: var(--small); color: var(--paper); }
.topbar nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.topbar nav a { margin-right: 8px; font-size: var(--small); }
.game-layout { max-width: 1840px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: minmax(0, 27fr) minmax(0, 46fr) minmax(0, 27fr); gap: 12px; align-items: start; }
.left-column, .center-column, .right-column { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.panel > h2 { padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.identity { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.identity strong, .identity span { display: block; }
.identity span { font-size: var(--small); color: var(--muted); }
.portrait { width: 84px; height: 84px; flex: 0 0 auto; background: var(--map); border-radius: 50%; border: 2px solid var(--paper); }
.portrait img { width: 100%; height: 100%; object-fit: contain; }
.stats { margin: 0; }
.stats > div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
dd { margin: 0; text-align: right; font-weight: bold; }
.stats dt, .stats dd { font-size: var(--small); }
.fineprint { font-size: var(--small); color: var(--muted); }
.character .fineprint { margin-top: 16px; }
.location { padding: 0; overflow: hidden; }
.location-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 16px; }
.location-heading > span { font-size: var(--small); }
.scene-instructions { padding: 0 16px 12px; font-size: var(--small); }
.listen-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 0 16px 12px; font-size: var(--small); }
.listen-controls .check { margin: 0; min-height: 44px; }
.scene { position: relative; aspect-ratio: 5 / 3; background: var(--map); isolation: isolate; }
.forest { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.cell-grid [role=row] { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); }
.scene-grid { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(6, minmax(0, 1fr)); }
.cell-grid [role=gridcell] { position: relative; min-width: 0; min-height: 0; }
.cell-grid button { border-radius: 0; min-height: 0; width: 100%; height: 100%; padding: 0; font-weight: bold; }
.scene-grid button { background: #1b28192b; border: 1px solid #f4e7ca55; color: var(--light); text-shadow: 0 1px 3px var(--ink); }
.scene-grid button:hover { background: #f4e7ca33; }
.scene-grid .available button { border-color: var(--line); }
.scene-grid .opened button { background: #eee0bbbd; color: var(--ink); text-shadow: none; }
.scene-grid .marked button, .scene-grid .hazard button { background: #712c27c9; color: var(--light); }
.cell-grid .selected button { outline: 2px solid var(--active); outline-offset: -3px; }
.cell-grid .current button { box-shadow: inset 0 0 0 2px var(--light); }
.scene-grid .hint button { background: var(--danger); color: var(--light); }
.cell-grid button:focus-visible { outline: 3px solid var(--focus); outline-offset: -4px; box-shadow: inset 0 0 0 5px var(--ink); z-index: 3; position: relative; }
.cell-grid :is(.entrance, .transition) button { background: #222b28cc; color: var(--light); }
.cell-grid .wrong button { background: var(--paper); color: var(--danger); }
.cell-coord { position: absolute; left: 4px; top: 2px; font-size: 10px; font-weight: normal; color: var(--light); background: #17120dbb; padding: 0 2px; line-height: 1.4; }
.cell-value { font-size: clamp(14px, 1.5vw, 24px); }
.entrance .cell-value { font-size: clamp(.8125rem, 1.2vw, 1rem); line-height: 1.25; white-space: nowrap; }
.scene-grid .entrance .cell-value { position: absolute; right: 2px; bottom: 2px; z-index: 1; padding: 0 2px; border-radius: 2px; background: var(--map); }
.cell-rating, .rating-key { background: var(--active); color: var(--ink); padding: 0 3px; border-radius: 2px; font-weight: bold; }
.cell-rating { position: absolute; bottom: 1px; right: 1px; font-size: .6875rem; line-height: 1.15; text-shadow: none; }
.character-sprite { position: absolute; width: 10%; height: 16.6667%; left: 0; top: 83.3333%; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.character-sprite img { position: absolute; width: 115%; height: 115%; object-fit: contain; filter: drop-shadow(0 2px 2px var(--ink)); }
.character-sprite > span { border-radius: 50%; background: var(--map); color: var(--light); font-size: 10px; padding: 2px 4px; }
.character-sprite:has(img:not([hidden])) > span { visibility: hidden; }
.legend { display: flex; gap: 4px 12px; flex-wrap: wrap; padding: 12px 16px; font-size: var(--small); }
.result { margin: 0 12px 12px; padding: 12px; background: var(--paper); border: 2px solid var(--border); font-weight: bold; }
input { accent-color: var(--map); }
.cell-controls:has(#touch-actions:not([hidden])), .cell-controls:has(#status:not(:empty)) { padding: 8px 16px 0; }
#selection { font-size: var(--small); }
.action-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
#status { font-size: var(--small); }
#touch-actions:not([hidden]) + #status:not(:empty) { margin-top: 8px; }
.mobile-tools { display: none; }
.journal { list-style-position: inside; margin: 0; padding: 0; max-height: 280px; overflow: auto; font-size: var(--small); scrollbar-color: var(--border) var(--inner); }
.journal li { padding: 8px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.messages { margin-top: 12px; max-height: 210px; }
.map-panel { background: var(--map); color: var(--light); }
.map-panel .fineprint, #panel-dialog:has(#map-body) .fineprint { color: var(--paper); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.panel-heading h2 { min-width: 0; }
.phone-map-title { display: none; }
#map-toggle { color: inherit; background: none; border: 0; padding: 0 4px; text-align: left; font: inherit; }
#map-expand { padding: 4px 8px; font-size: var(--small); }
.map-grid { display: grid; gap: 2px; margin: 12px 0; }
.map-grid [role=row] { gap: 2px; }
.map-grid button { aspect-ratio: 1; min-height: 24px; background: var(--map-cell); border: 1px solid var(--inner); color: var(--light); font-size: var(--small); }
.map-grid .opened button { background: var(--paper); color: var(--ink); }
.map-grid .marked button, .map-grid .hazard button { background: var(--danger); }
.map-grid .hint button { background: var(--active); color: var(--ink); }
#map-selection { margin: 12px 0; font-size: var(--small); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#map-levels { min-width: 0; margin: 0 0 12px; padding: 8px; border: 1px solid var(--inner); }
#map-levels legend { padding: 0 4px; font-size: var(--small); }
.rating-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.rating-buttons button { padding: 4px; }
.rating-buttons button[aria-pressed="true"] { background: var(--active); }
#map-clear-level { width: 100%; margin-top: 8px; }
#map-mark { width: 100%; }
.check { display: flex; gap: 8px; align-items: center; font-size: var(--small); margin: 8px 0; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; flex-shrink: 0; }
.quiet { background: none; border-color: var(--paper); color: inherit; width: 100%; }
.quiet:hover { color: var(--ink); }
footer { max-width: 1840px; padding: 16px 20px; margin: auto; color: var(--paper); font-size: var(--small); }
dialog { padding: 24px; width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow: auto; background: var(--inner); color: var(--ink); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
dialog::backdrop { background: #17120dbf; }
dialog h2 { margin-bottom: 16px; }
dialog p { margin: 12px 0; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.settings-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 20px 0; }
.settings-fields label { display: flex; flex-direction: column; gap: 8px; }
select { min-height: 44px; padding: 8px; width: 100%; }
.help-list { padding-left: 24px; }
.help-list li { margin: 12px 0; }
#panel-dialog:has(#map-body) { background: var(--map); color: var(--light); }
#panel-dialog .map-grid button { min-height: 32px; }
#history-empty { font-size: var(--small); }
.skip-link { position: absolute; z-index: 10; left: 20px; top: -100px; background: var(--paper); padding: 12px; }
.skip-link:focus { top: 8px; }
.noscript { position: fixed; inset: 30% 12px auto; padding: 20px; background: var(--paper); color: var(--ink); z-index: 5; }
@media (min-width: 1500px) { .scene { aspect-ratio: 5 / 3.6; } .journal { max-height: 350px; } }
@media (max-width: 1100px) {
.game-layout { display: flex; flex-direction: column; }
.left-column, .center-column { display: contents; }
.panel { width: 100%; }
.character { order: 0; }
.character > h2, .character > h3, .character .portrait, .character .fineprint { display: none; }
.identity { margin-bottom: 8px; }
.identity strong { font-size: var(--small); }
.identity span { display: none; }
.character .stats { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.character .stats > div { border: 0; padding: 2px 0; }
.location { order: 1; }
.history-panel { display: none; }
.right-column { order: 3; width: 100%; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.mobile-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px; }
.mobile-tools button { flex: 1; }
.brand { display: block; }
.topbar { align-items: start; }
}
@media (max-width: 700px) {
.topbar { flex-direction: column; gap: 12px; padding: 12px; }
.topbar nav { width: 100%; }
.topbar nav > a { width: 100%; }
.topbar nav button { flex: 1; padding: 8px; }
.brand { display: flex; }
.game-layout { display: flex; flex-direction: column; padding: 0 12px; gap: 12px; }
.left-column, .center-column, .right-column { display: contents; }
.panel { width: 100%; padding: 12px; }
.character { order: 0; }
.character > h2, .character > h3, .character .portrait, .character .fineprint { display: none; }
.identity { margin-bottom: 8px; }
.identity strong { font-size: var(--small); }
.identity span { display: none; }
.character .stats { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.character .stats > div { border: 0; padding: 2px 0; }
.character .stats:first-of-type > div:last-child, .character .stats:last-of-type > div:nth-child(n+3) { display: none; }
.location { order: 1; padding: 0; }
.messages-panel, .map-panel { order: 3; }
.cell-coord { font-size: 8px; left: 1px; top: 1px; padding: 0 1px; }
.cell-value { font-size: 14px; }
.scene-grid .opened .cell-coord { display: none; }
.action-buttons button { flex: 1 1 125px; }
.legend { padding: 8px 12px; }
.settings-fields { grid-template-columns: 1fr; }
dialog { padding: 16px; }
footer { padding: 16px 12px; }
}
@media (max-width: 700px), (max-width: 1100px) and (max-height: 500px) and (pointer: coarse) {
#map-title { scroll-margin-block-start: 12px; }
.phone-map-title { display: inline; }
#map-toggle, #map-expand { display: none; }
}
@media (pointer: coarse) { .action-buttons button, .mobile-tools button, #map-mark, #map-levels button, .listen-controls button, .listen-controls .check { min-height: 48px; } }
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
@media (forced-colors: active) { .cell-grid .selected button, .cell-grid .current button { outline: 2px solid Highlight; outline-offset: -3px; } }