:root {
  color-scheme: dark;
  --gold: #dfc086;
  --ivory: #f6efdc;
  --blue: #123753;
  --edge: #bc9b5b88;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #0a2236 url("../assets/marble.webp") center/cover fixed;
  color: var(--ivory);
  font:
    15px/1.5 system-ui,
    sans-serif;
  overflow-x: hidden;
}
a {
  color: var(--gold);
}
header,
main,
footer {
  width: min(1060px, 100%);
  margin: auto;
  padding: 14px 22px;
}
header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--edge);
  font-size: 12px;
  letter-spacing: 0.1em;
}
header a {
  text-decoration: none;
}
header span {
  font-size: 10px;
  color: #c7d0d2;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.heading p {
  margin: 4px 0 14px;
  color: #d0d9dc;
}
.heading .eyebrow {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-top: 14px;
}
h1,
h2,
h3 {
  font-family: Georgia, serif;
  font-weight: 500;
  color: var(--gold);
  line-height: 1.15;
}
h1 {
  font-size: clamp(27px, 5vw, 42px);
  margin: 6px 0;
}
h2 {
  font-size: 29px;
}
.dev {
  border: 1px dashed #b9a473;
  font-size: 11px;
  padding: 7px 12px;
  color: #e2d5b6;
  background: #101b2444;
}
.toolbar,
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
}
.controls {
  border-bottom: 1px solid var(--edge);
  margin-bottom: 10px;
}
button,
select {
  font: inherit;
  color: var(--ivory);
  background: #0e2d45d9;
  border: 1px solid var(--edge);
  border-radius: 7px;
  min-height: 44px;
  padding: 9px 13px;
  touch-action: manipulation;
  max-width: 100%;
}
button {
  cursor: pointer;
}
button:hover {
  background: #25465b;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary {
  background: linear-gradient(#edcf8a, #bd9550);
  color: #172f40;
  font-weight: 700;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 3px solid #ffe1a0;
  outline-offset: 2px;
}
label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--gold);
  min-width: 0;
}
.check {
  display: flex;
  align-items: center;
  margin: 16px 0;
  gap: 8px;
}
input[type="range"] {
  width: clamp(110px, 22vw, 200px);
  accent-color: var(--gold);
  min-height: 32px;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
}
#hud {
  font-weight: 650;
  margin: 4px 0 8px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  min-height: 22px;
}
.stage {
  position: relative;
  border: 2px solid var(--edge);
  border-radius: 10px;
  overflow: hidden;
  background: #e7e7db;
}
canvas {
  display: block;
  width: 100%;
  aspect-ratio: 3/2;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#overlay {
  position: absolute;
  inset: 0;
  background: #102b3ad9;
  display: grid;
  place-items: center;
  color: #f5deb0;
  font: 32px Georgia;
  pointer-events: none;
}
#overlay[hidden] {
  display: none;
}
#feedback {
  min-height: 26px;
  margin: 8px 0;
  color: #f3d494;
  font-size: 14px;
}
details {
  border: 1px solid var(--edge);
  padding: 10px 14px;
  border-radius: 8px;
  background: #071a2866;
  font-size: 13px;
}
summary {
  cursor: pointer;
  color: var(--gold);
}
.muted,
footer {
  font-size: 11px;
  color: #c4cfd2;
}
#error {
  color: #ffc3a7;
}
dialog {
  background: #102b40;
  color: var(--ivory);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 24px;
  width: min(94vw, 600px);
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #020a14c9;
}
#choices {
  display: grid;
  gap: 12px;
}
.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.level-grid button {
  text-align: left;
  font-size: 13px;
}
.selected {
  border-color: #ffe0a0;
  box-shadow: inset 0 0 0 1px #ffe0a0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 28px 0;
}
.card {
  border: 1px solid var(--edge);
  background: #10263d66;
  border-radius: 12px;
  padding: 22px;
}
.card h2 {
  font-size: 26px;
}
.card p {
  font-size: 14px;
}
.card a {
  display: inline-block;
  padding: 10px 0;
}
.symbol {
  font: 40px Georgia;
  color: var(--gold);
}
main:fullscreen {
  background: #0a2236;
  overflow: auto;
  width: 100%;
  max-width: none;
}
main:fullscreen .stage {
  max-width: 1100px;
  margin: auto;
}
@media (max-width: 650px) {
  header,
  main,
  footer {
    padding: 10px 12px;
  }
  header span {
    display: none;
  }
  .heading p {
    font-size: 12px;
  }
  .toolbar {
    gap: 6px;
  }
  .toolbar button {
    font-size: 12px;
    padding: 8px 10px;
  }
  .controls {
    gap: 8px;
  }
  .controls button,
  .controls select {
    font-size: 13px;
  }
  #hud {
    font-size: 12px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 18px;
  }
  .dev {
    font-size: 10px;
  }
  .stage {
    border-radius: 6px;
  }
  #feedback {
    font-size: 12px;
  }
  dialog {
    padding: 18px;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .heading p,
  .dev,
  header {
    display: none;
  }
  .heading .eyebrow {
    display: none;
  }
  h1 {
    font-size: 24px;
  }
  .toolbar {
    padding: 5px 0;
  }
  main {
    padding-top: 0;
  }
  .stage {
    width: min(100%, 650px);
    margin: auto;
  }
}

[hidden] {
  display: none !important;
}

.workshop-return{padding:12px 22px;text-align:center}
