/* A neighbourhood map and a manipulable tabletop share the first screen. */
.workshop {
  --ws-ink: #173c37;
  --ws-muted: #465e53;
  --ws-green: #17614f;
  display: grid;
  grid-template-columns: minmax(310px, .86fr) minmax(0, 1.35fr);
  align-items: start;
  gap: .85rem 1rem;
  margin: 0 0 1.3rem;
  color: var(--ws-ink);
}
.ws-intro { grid-column: 1 / -1; }
.ws-intro .ws-kicker {
  margin: 0 0 .22rem; color: #596f4c;
  font-size: .8rem; font-weight: 750; letter-spacing: .055em;
}
.ws-intro h2 { font: 700 clamp(1.75rem,3.6vw,2.8rem)/1.1 Georgia,serif; letter-spacing: -.04em; }
.ws-intro p:last-child { margin-top: .3rem; max-width: 67ch; color: var(--ws-muted); }
#life-map {
  display: block; min-width: 0; width: 100%; min-height: 0;
  padding: 0; margin: 0; position: relative; color: var(--ws-ink);
}
.wm-drawer {
  background: #f1f4df; border: 1px solid #a6bba0;
  border-radius: 16px; box-shadow: 0 3px 0 #dce3d1; overflow: clip;
}
.wm-summary {
  position: relative; display: flex; gap: .5rem; align-items: center; justify-content: space-between;
  min-height: 47px; padding: .55rem 1rem .55rem 2rem; color: var(--ws-ink); background: #f9f9ed;
}
.wm-summary::-webkit-details-marker { display: none; }
.wm-summary::before {
  content: ''; position: absolute; left: .9rem; top: 50%;
  width: .42rem; height: .42rem; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-50%) rotate(-45deg);
}
.wm-drawer[open] .wm-summary { border-bottom: 1px solid #bcc9aa; }
.wm-drawer[open] .wm-summary::before { transform: translateY(-70%) rotate(45deg); }
.wm-summary:focus-visible { outline-offset: -4px; }
#life-map .wm-progress { color: #466149; font-size: .78rem; white-space: nowrap; font-weight: 650; }
.wm-board {
  position: relative; isolation: isolate; overflow: hidden;
  background: #edf0cf; background-image: linear-gradient(23deg,#e3edc6,#f2f1d4 78%,#e8ecd0);
}
.wm-land { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.wm-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 8px; align-items: start; padding: 16px 9px 20px; }
#life-map .wm-stop {
  position: relative; justify-self: center; min-height: 44px; min-width: 0; max-width: 100%; width: 100%;
  display: grid; justify-items: center; align-content: start; padding: 0 .12rem .18rem;
  text-decoration: none; text-align: center; color: #223e32; line-height: 1.18;
  border-radius: 12px; -webkit-tap-highlight-color: #c6dfbc;
}
#life-map .wm-pin {
  display: grid; place-items: center; position: relative; width: 2.55rem; height: 2.55rem;
  border: 2px solid #7d9674; border-radius: 43% 48% 37% 42%;
  background: #fffcef; box-shadow: 0 3px 0 #8fa47f; color: #2f5441;
  font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
  font-size: 1.48rem; line-height: 1;
}
#life-map .wm-place {
  margin-top: .34rem; max-width: 100%; padding: .13rem .43rem .07rem;
  border-radius: .42rem; background: #f9fae9f2;
  font-size: clamp(.85rem,1.6vw,.99rem);
}
#life-map .wm-skill {
  max-width: 100%; padding: .12rem .36rem .17rem; border-radius: 5px;
  background: #f9fae9ed; color: #455a42; font-size: .77rem; line-height: 1.2;
}
#life-map .wm-stop:hover .wm-place { text-decoration: underline; }
#life-map .wm-stop:hover .wm-pin { border-color: #476a4e; background: #fff7cc; }
#life-map .wm-stop[aria-current] .wm-pin {
  border-color: #155c48; background: #ffe2a0; box-shadow: 0 0 0 3px #fffced,0 0 0 5px #226746;
}
#life-map .wm-stop[aria-current] .wm-place { background: #205d48; color: #fff; }
#life-map .wm-badge { display: none; }
#life-map .wm-stop[data-complete="true"] .wm-badge {
  display: grid; place-items: center; position: absolute; left: calc(50% + .52rem); top: -.3rem;
  width: 1.2rem; height: 1.2rem; font-size: .75rem; font-weight: 800; color: white;
  background: #296d4d; border: 2px solid #f7fbe5; border-radius: 50%;
}
#workshop-play {
  min-width: 0; color: var(--ws-ink); background: #fffefb; border: 1px solid #becdc2;
  border-radius: 16px; box-shadow: 0 4px 0 #dfe6df; padding: clamp(14px,2.2vw,27px);
}
#workshop-play h3, #workshop-play .ws-title {
  margin: .3rem 0 .5rem; overflow-wrap: anywhere;
  font: 700 clamp(1.4rem,2.8vw,2.1rem)/1.15 Georgia,serif; letter-spacing: -.03em;
  scroll-margin-top: .65rem;
}
.ws-step { color: #576958; font-size: .88rem; font-weight: 670; }
.ws-prompt { max-width: 58ch; font-size: clamp(1.03rem,1.7vw,1.2rem); line-height: 1.48; }
.ws-stock {
  margin: .9rem 0 .7rem; padding: .7rem .8rem; min-width: 0;
  border: 1px solid #e2c996; border-radius: 11px; background: #fff4d8;
}
.ws-caption, .ws-name { display: block; margin: 0; color: #314e42; font-size: 1rem; font-weight: 720; line-height: 1.3; }
.ws-tokens { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; min-height: 1.9rem; margin: .35rem 0; }
.ws-token {
  display: inline-grid; place-items: center;
  min-width: 1.65rem; min-height: 1.7rem;
  font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
  font-size: clamp(1.3rem,2.3vw,1.7rem); line-height: 1.1;
}
.ws-targets {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,8.25rem),1fr));
  align-items: stretch; gap: .5rem; margin: .65rem 0;
}
.ws-target {
  display: flex; flex-direction: column; justify-content: start; gap: .2rem; min-width: 0;
  background: #f3f7eb; border: 1px solid #bed0b8; border-bottom: 4px solid #adc2a5;
  border-radius: 10px; padding: .55rem .55rem .5rem; overflow-wrap: anywhere;
}
.ws-target .ws-tokens {
  min-height: 2rem; border-bottom: 1px dashed #bdcbb6; padding: 0 0 .25rem; margin: .1rem 0;
}
.ws-target .ws-place, .ws-target .ws-return {
  min-height: 44px; width: 100%; padding: .28rem .36rem;
  border-radius: 7px; white-space: normal; line-height: 1.2;
}
.ws-target .ws-place { margin-top: auto; border-color: #7a9c88; color: #234d3b; background: #fffefa; }
.ws-target .ws-return { color: #435649; border-color: transparent; background: transparent; font-size: .86rem; }
.ws-target .ws-return:enabled:hover, .ws-target .ws-place:enabled:hover { background: #e0eddb; }
.ws-actions, .ws-options { display: flex; flex-wrap: wrap; align-items: center; gap: .48rem; margin-top: .7rem; }
#workshop-play button, #workshop-play a { overflow-wrap: anywhere; }
#workshop-play button:disabled { opacity: .6; cursor: default; }
#workshop-play .primary, #workshop-play .ws-primary {
  color: #fff; background: var(--ws-green); border-color: var(--ws-green);
}
#workshop-play .ws-option {
  border: 1.5px solid #86a995; font-variant-numeric: tabular-nums;
  background: #f4f8ed; color: #244c3b; font-weight: 720;
}
#workshop-play .ws-option:enabled:hover { background: #e6f0d9; }
.ws-hint, .ws-feedback:not(:empty), .ws-summary {
  padding: .6rem .78rem; margin: .65rem 0; background: #fff3cd; color: #59441f;
  border-left: 4px solid #c7953d; border-radius: 2px 7px 7px 2px;
}
.ws-summary { background: #eff6e8; border-color: #68a079; color: #2b513b; }
.ws-feedback:empty { margin: 0; }
.ws-equation { font-size: clamp(1.5rem,4vw,2.2rem); font-weight: 740; line-height: 1.4; font-variant-numeric: tabular-nums; }
.workshop [hidden] { display: none !important; }
@media (max-width: 900px) and (min-width: 761px) {
  .workshop { grid-template-columns: minmax(250px,.82fr) minmax(0,1.3fr); gap: .7rem; }
  .wm-grid { padding-left: 4px; padding-right: 4px; gap: 13px 3px; }
}
@media (max-width: 760px) {
  .workshop { grid-template-columns: minmax(0,1fr); gap: .6rem; }
  .ws-intro h2 { font-size: 1.8rem; }
  .ws-intro p:last-child { font-size: .96rem; }
  .wm-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .ws-targets { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ws-target:only-child { grid-column: 1 / -1; }
}
@media (forced-colors: active) {
  .wm-land { opacity: .15; }
  #life-map .wm-stop[aria-current] { outline: 2px solid Highlight; }
  .ws-token,.wm-pin { forced-color-adjust: none; }
}
.ws-instruction { margin: .5rem 0; color: #405f52; font-size: .95rem; }
.ws-target .ws-place {
  display: flex; flex: 1; flex-direction: column; align-items: stretch;
  padding: .52rem; text-align: left; position: relative; margin-top: 0;
}
.ws-target .ws-place .ws-name { padding-right: .95rem; }
.ws-target .ws-place::after {
  content: '+'; position: absolute; right: .35rem; top: .38rem;
  color: #407353; font-size: 1.1rem; font-weight: 700; line-height: 1;
}
.ws-target .ws-place:disabled { opacity: 1; border-color: #aebcad; background: #f7f9f2; }
.ws-target .ws-place:disabled::after { content: ''; }
.ws-answer {
  display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; margin: .8rem 0;
}
.ws-question { display: grid; gap: .35rem; width: 100%; font-weight: 680; }
.ws-input {
  width: 6rem; min-height: 44px; border: 1.5px solid #79968a; border-radius: 7px;
  padding: .3rem .5rem; font: 700 1.3rem/1.2 system-ui,sans-serif; color: #1e3832;
}
.ws-input[aria-invalid="true"] { border: 2px solid #935322; }
.ws-summary {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,7rem),1fr));
  gap: .55rem; margin: .8rem 0;
}
.ws-snapshot { border-radius: 6px; background: #fffef5; border: 1px solid #cad8bd; padding: .4rem; }
.ws-meaning { font-weight: 600; margin: .55rem 0; }
.ws-results { margin: .7rem 0; }
.ws-result { display: grid; gap: .25rem; padding: .65rem 0; border-top: 1px solid #dbe3d5; }
.ws-next { margin-top: .6rem; }

.wm-preview { display: none; }
@media (max-width: 760px) {
  .wm-summary { gap: .4rem; padding: .4rem .7rem .4rem 1.65rem; }
  .wm-summary::before { left: .65rem; }
  #life-map .wm-preview {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    min-width: 2.6rem; height: 1.9rem; padding: 0 .18rem; border: 1px solid #b5c6a7;
    border-radius: 6px; font-size: .94rem; line-height: 1;
    font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
    background: linear-gradient(115deg,#dceac4 42%,#fff0c5 43% 50%,#c1ded4 51% 70%,#e9efc7 71%);
  }
  .wm-summary strong { margin-right: auto; }
}
/* Keep the child's first move within reach on a short screen. */
body:has(#workshop:not([hidden])) .intro { padding: 1.25rem 0 .7rem; }
body:has(#workshop:not([hidden])) .intro h1 { font-size: clamp(1.25rem,2.5vw,1.9rem); letter-spacing: -.035em; }
body:has(#workshop:not([hidden])) .intro p { font-size: .95rem; margin-top: .18rem; }
#life-map .wm-pin { font-size: 1.7rem; }
#life-map .wm-skill { font-size: .88rem; }
@media (max-width: 500px) {
  body:has(#workshop:not([hidden])) header nav {
    display: grid; grid-template-columns: auto minmax(0,1fr) auto;
    gap: .5rem; min-height: 52px; padding-top: .2rem; padding-bottom: .2rem;
  }
  body:has(#workshop:not([hidden])) header nav > span { display: none; }
  body:has(#workshop:not([hidden])) header nav a { line-height: 1.22; font-size: .86rem; }
  body:has(#workshop:not([hidden])) header nav .brand { font-size: 1.02rem; }
  body:has(#workshop:not([hidden])) .intro { padding: .85rem 0 .55rem; }
  .ws-intro h2 { font-size: 1.65rem; }
}
@media (max-width: 360px) {
  body:has(#workshop:not([hidden])) .intro { padding: .55rem 0 .35rem; }
  body:has(#workshop:not([hidden])) .intro h1 { font-size: 1.04rem; }
  body:has(#workshop:not([hidden])) .intro p { font-size: .87rem; line-height: 1.3; }
  .ws-intro p:last-child { font-size: .94rem; line-height: 1.32; }
  .wm-summary { gap: .3rem; padding-right: .47rem; }
  #life-map .wm-preview { min-width: 1.7rem; width: 1.7rem; overflow: hidden; justify-content: start; }
  .wm-summary strong { white-space: nowrap; }
}
.wm-skills { border-top: 1px solid #b9c7a8; background: #f8f9ec; }
.wm-skills > summary { min-height: 44px; padding: .65rem .85rem; }
.wm-skills > summary:focus-visible { outline-offset: -4px; }
.wm-skill-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .15rem .45rem;
  align-items: baseline; padding: .3rem .85rem .45rem; font-size: .9rem;
}
.wm-skill-row:last-child { padding-bottom: .8rem; }
#life-map .wm-skill-count { font-size: .82rem; color: #405944; white-space: nowrap; }
.wm-skill-meter { grid-column: 1 / -1; width: 100%; height: .52rem; accent-color: #387854; }
