:root {
  --sand: #e5a85f;
  --clay: #9d5030;
  --ink: #482b25;
  --cream: #fff3d1;
  --sky: #72c8d2;
}
html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #713e2a;
}
body.archworks-day {
  color: var(--ink);
  background: linear-gradient(#69c2d0 0 46%, #d88d48 46%);
  touch-action: manipulation;
}
.archworks-day .game-shell {
  height: 100dvh;
  min-height: 0;
  padding: max(7px, env(safe-area-inset-top))
    max(9px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom))
    max(9px, env(safe-area-inset-left));
  display: grid;
  grid-template-rows: 50px auto minmax(190px, 1fr) auto;
  gap: 6px;
  max-width: 760px;
  background: transparent;
}
.archworks-day header {
  padding: 0;
  min-height: 50px;
}
.archworks-day .brand {
  color: #fff;
}
.archworks-day .brand small {
  color: #ffe6a1;
}
.archworks-day .round-button {
  width: 46px;
  height: 46px;
  min-height: 46px;
  background: #fff1cf;
  color: #5e3427;
  border-color: #fff;
}
.archworks-day .mission-card {
  margin: 0;
  padding: 7px 12px;
  min-height: 72px;
  background: #fff3d1f7;
  border: 2px solid #b95e33;
  color: var(--ink);
}
.archworks-day .mission-card > div {
  display: flex;
  justify-content: space-between;
}
.archworks-day .mission-card p {
  margin: 2px 0;
  font-size: 14px;
  line-height: 1.2;
}
.archworks-day .progress-track {
  height: 7px;
  margin: 5px 0 0;
}
.archworks-day .progress-track i {
  background: linear-gradient(90deg, #d45d35, #f2bd4c);
}
#stage {
  position: relative;
  min-height: 0;
  height: auto;
  border: 2px solid #fff0c9;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(#80d0d7 0 61%, #d79550 61%);
  isolation: isolate;
  box-shadow: 0 8px 18px #57321f66;
}
#stage canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
}
.scene-caption {
  position: absolute;
  z-index: 3;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 999px;
  background: #633622dd;
  color: #fff1c3;
  white-space: nowrap;
  font-size: 9px;
  letter-spacing: 0.12em;
}
#targets {
  display: contents;
}
.socket {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border: 3px dashed #fff4c7;
  border-radius: 14px;
  background: #7c4529aa;
  color: #fff;
  font:
    900 20px/1 Nunito,
    sans-serif;
  pointer-events: auto;
  box-shadow: 0 0 0 3px #e9a94f55;
  touch-action: manipulation;
}
.socket.ready {
  background: #d9853be6;
  border-style: solid;
  animation: socketGlow 0.75s ease-in-out infinite alternate;
}
.socket.filled {
  background: #6d3b27;
  border-color: #f8ca70;
  color: #ffd989;
}
.socket.hinted {
  outline: 4px solid #fff;
  outline-offset: 2px;
}
.socket:disabled {
  opacity: 0.48;
}
.socket:active {
  transform: translate(-50%, -50%) scale(0.96);
}
@keyframes socketGlow {
  to {
    filter: brightness(1.22);
    box-shadow: 0 0 13px #fff3ae;
  }
}
#loading {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  background: #713e2a;
  color: #fff1cf;
  font-weight: 900;
}
.dock {
  margin: 0;
  padding: 7px 9px;
  background: #fff3d1f7;
  border: 2px solid #b95e33;
  border-radius: 17px;
  color: var(--ink);
  display: grid;
  gap: 7px;
}
#pieces {
  display: flex;
  gap: 6px;
  justify-content: center;
  min-height: 48px;
}
.piece {
  min-width: 58px;
  min-height: 48px;
  padding: 4px 7px;
  border: 2px solid #9b4f31;
  border-radius: 13px;
  background: linear-gradient(#efbc73, #d88243);
  color: #44281f;
  font:
    900 10px/1 Nunito,
    sans-serif;
  box-shadow: 0 3px 0 #873f28;
}
.piece .shape {
  display: block;
  font-size: 19px;
  line-height: 20px;
}
.piece.selected {
  outline: 4px solid #42a19b;
  outline-offset: 1px;
  background: #ffe39a;
}
.piece:disabled {
  opacity: 0.42;
  box-shadow: none;
}
.dock-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.archworks-day #hint,
.archworks-day #undo,
.archworks-day #restart {
  min-width: 82px;
  min-height: 44px;
  padding: 6px 8px;
}
.archworks-day .intro-card {
  border-color: #c76b37;
  background: #fff8e5;
}
.archworks-day .primary {
  background: linear-gradient(135deg, #d86439, #a9472c);
}
.archworks-day .eyebrow {
  color: #9d5030;
}
.archworks-day #announcement {
  z-index: 20;
}
.archworks-day button:focus-visible,
.archworks-day a:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 2px;
}
body.stage-complete #stage {
  box-shadow:
    0 0 0 4px #ffe29a,
    0 0 30px #fff0a7;
}
@media (prefers-reduced-motion: reduce) {
  .socket {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 360px) {
  .archworks-day .brand small {
    display: none;
  }
  .archworks-day .mission-card {
    min-height: 64px;
  }
  .archworks-day .mission-card p {
    font-size: 12px;
  }
  .piece {
    min-width: 48px;
    padding: 3px;
    font-size: 9px;
  }
  .archworks-day #hint,
  .archworks-day #undo,
  .archworks-day #restart {
    min-width: 72px;
    font-size: 11px;
  }
}
@media (max-height: 620px) and (orientation: portrait) {
  .archworks-day .game-shell {
    grid-template-rows: 46px 64px minmax(170px, 1fr) 104px;
    gap: 4px;
  }
  .archworks-day header {
    min-height: 46px;
  }
  .archworks-day .round-button {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
  .archworks-day .mission-card {
    min-height: 0;
    padding: 5px 10px;
  }
  .archworks-day .mission-card p {
    font-size: 11px;
  }
  .dock {
    padding: 4px 7px;
    gap: 4px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .archworks-day .game-shell {
    max-width: 920px;
    grid-template-columns: 160px minmax(0, 1fr) 250px;
    grid-template-rows: 48px minmax(240px, 1fr);
    gap: 6px;
  }
  .archworks-day header {
    grid-column: 1/4;
  }
  .archworks-day .mission-card {
    grid-column: 1;
    grid-row: 2;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: auto;
  }
  .archworks-day .mission-card > div {
    display: block;
  }
  .archworks-day .mission-card p {
    font-size: 13px;
    margin: 8px 0;
  }
  .archworks-day #stage {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    width: auto;
  }
  .archworks-day .dock {
    grid-column: 3;
    grid-row: 2;
    width: auto;
    align-content: center;
  }
  .archworks-day #pieces {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .piece {
    min-width: 0;
  }
  .dock-actions {
    display: flex;
  }
  .archworks-day #hint,
  .archworks-day #undo,
  .archworks-day #restart {
    width: auto;
    min-width: 0;
    flex: 1;
  }
}
