@font-face {
  font-family: DM Sans;
  src: url(assets/fonts/sans.ttf) format("truetype");
  font-display: swap;
}
@font-face {
  font-family: DM Serif Text;
  src: url(assets/fonts/serif.ttf) format("truetype");
  font-display: swap;
}
@font-face {
  font-family: DM Serif Text;
  src: url(assets/fonts/serif-italic.ttf) format("truetype");
  font-style: italic;
  font-display: swap;
}
:root {
  --wine: #511f16;
  --berry: #9c2f2f;
  --orange: #b6562a;
  --gold: #dbba33;
  --brown: #633f21;
  --ink: #34271f;
  --muted: #716458;
  --paper: #faf7ef;
  --line: #d7ccbb;
  --serif: "DM Serif Text", Georgia, serif;
  font:
    100%/1.5 "DM Sans",
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a {
  color: inherit;
}
button {
  font: inherit;
  cursor: pointer;
}
button {
  background: none;
  border: 0;
  padding: 0;
}
a {
  text-decoration: none;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:disabled:hover {
  transform: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
}
svg {
  display: block;
  width: 1.15em;
  height: 1.15em;
}
span[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(1300px, calc(100% - clamp(40px, 8vw, 144px)));
  margin-inline: auto;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 36px 0 27px;
}
.overline,
.view-label,
.type,
.cut-number,
.card-tag {
  font-size: 0.715rem;
  font-weight: 700;
  letter-spacing: 0.145em;
  text-transform: uppercase;
}
.overline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--berry);
}
.short-rule {
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--orange);
}
h1 {
  font-size: clamp(3.35rem, 5.25vw, 5.25rem);
  line-height: 1.1;
  letter-spacing: -0.047em;
  color: var(--wine);
  margin: 7px 0 9px;
}
h1 em {
  color: var(--berry);
  font-weight: 400;
}
.lede {
  font-size: 1.04rem;
  color: #625348;
}
.turkey-engraving {
  width: clamp(100px, 10.8vw, 155px);
  height: auto;
  mix-blend-mode: multiply;
  filter: sepia(0.3);
  margin-right: 2vw;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(282px, 0.9fr);
  gap: 22px;
  align-items: stretch;
}
.model-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #cfc0ac;
  border-radius: 12px;
  overflow: hidden;
  background: #f3eddf;
}
.stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 1;
  min-height: 370px;
  background: radial-gradient(
    ellipse at 49% 42%,
    #f9f2e4 0%,
    #f2e8d6 47%,
    #dfd1b9 100%
  );
}
.stage:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' opacity='.35' filter='url(%23n)' d='M0 0h140v140H0z'/%3E%3C/svg%3E");
  opacity: 0.2;
  pointer-events: none;
}
.scene,
.scene canvas,
#markers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scene canvas {
  touch-action: none;
  cursor: grab;
}
.scene canvas:active {
  cursor: grabbing;
}
#markers {
  pointer-events: none;
}
.stage-ui,
.bottom-ui {
  position: absolute;
  left: 19px;
  right: 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 3;
}
.stage-ui {
  top: 17px;
}
.bottom-ui {
  bottom: 14px;
}
.stage-ui button,
.bottom-ui button {
  pointer-events: auto;
}
.view-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #5a4734;
  font-size: 0.67rem;
  letter-spacing: 0.12em;
}
.view-label svg {
  width: 18px;
  height: 18px;
}
.board-actions {
  display: flex;
  gap: 6px;
}
.board-action,
.zoom {
  border: 1px solid #bfae96;
  background: #fffcf2cf;
  border-radius: 6px;
  color: #4d3c2a;
}
.board-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.78rem;
}
.board-action:hover,
.zoom button:hover {
  background: #fffdf9;
}
.view-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.77rem;
  color: #5d5143;
}
.view-hint svg {
  width: 20px;
}
.zoom {
  display: flex;
  align-items: center;
  overflow: hidden;
}
.zoom button {
  width: 33px;
  height: 30px;
  display: grid;
  place-items: center;
}
.zoom button + button {
  border-left: 1px solid #c7b9a6;
}
.stage-message {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 9px 15px;
  border-radius: 5px;
  background: var(--paper);
  max-width: 78%;
  text-align: center;
  color: var(--brown);
  font-size: 0.86rem;
}
.board-caption {
  border-top: 1px solid #cfbfaa;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 14px;
  background: #f5f0e5;
  color: #625242;
  font-size: 0.86rem;
}
.caption-icon {
  color: var(--orange);
}
.cut-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf6;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.panel-heading {
  padding: 20px 24px 12px;
}
.panel-heading .overline {
  font-size: 0.66rem;
  gap: 7px;
}
.panel-heading .overline svg {
  width: 15px;
  height: 15px;
}
.panel-heading h2 {
  font-size: 2rem;
  line-height: 1.18;
  margin: 5px 0 0;
  letter-spacing: -0.045em;
  color: var(--wine);
}
.cut-list {
  padding: 0 22px;
}
.cut-row {
  width: 100%;
  display: grid;
  grid-template-columns: 23px 48px 1fr 16px;
  text-align: left;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid #e2d9cb;
  min-height: 55px;
}
.cut-row:hover {
  background: #f6f0e2;
}
.cut-row .cut-number {
  font-size: 0.69rem;
  letter-spacing: 0.04em;
  color: #8e7456;
}
.cut-row img {
  width: 47px;
  height: 42px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.cut-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.21rem;
  line-height: 1.12;
  color: var(--wine);
}
.cut-sub {
  display: block;
  font-size: 0.775rem;
  line-height: 1.65;
  color: var(--muted);
}
.cut-row .chev {
  color: #937c63;
}
.cut-row.carved .cut-number {
  color: #5a754c;
}
.progress-area {
  padding: 12px 22px 16px;
  background: #f7f1e5;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.735rem;
  color: #685540;
}
.progress-label span:first-child {
  font-weight: bold;
}
#progress-track {
  display: flex;
  gap: 4px;
  margin-top: 7px;
}
#progress-track i {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #e1d7c7;
}
#progress-track .done {
  background: var(--orange);
}
.marker {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
}
.leader {
  height: 1px;
  position: absolute;
  top: 0;
  left: 0;
  background: #68422a;
  transform-origin: 0 0;
  opacity: 0.78;
}
.anchor-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid #fffcf2;
  background: #6d4629;
  left: -3px;
  top: -3px;
}
.pin {
  position: absolute;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fffaf0f5;
  border: 1px solid #b7a58f;
  border-radius: 30px;
  padding: 3px 8px 3px 3px;
  white-space: nowrap;
  box-shadow: 0 2px 5px #432d1d15;
  font-size: 0.73rem;
  color: var(--wine);
  touch-action: none;
}
.pin b {
  padding: 1px 4px;
  min-width: 19px;
  border-radius: 50%;
  background: var(--wine);
  color: #fff6dd;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  line-height: 17px;
}
.pin:hover,
.pin:focus-visible {
  background: #fff;
  border-color: var(--wine);
}
.serving {
  border-top: 1px solid var(--line);
  margin: 32px 0 44px;
  padding-top: 23px;
}
.serving h2 {
  margin: 5px 0 19px;
  font-size: clamp(2rem, 3.1vw, 3rem);
  letter-spacing: -0.047em;
  line-height: 1.2;
  color: var(--wine);
}
.ideas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.idea {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  padding: 16px;
  min-height: 112px;
}
.idea:hover {
  border-color: #a48b70;
  background: #fffefa;
}
.idea img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  mix-blend-mode: multiply;
  flex-shrink: 0;
}
.card-tag {
  display: block;
  font-size: 0.62rem;
  color: var(--orange);
  letter-spacing: 0.11em;
}
.idea-title {
  display: block;
  font: 1.35rem/1.16 var(--serif);
  color: var(--wine);
  margin: 0.25em 0;
}
.idea-sub {
  display: block;
  font-size: 0.79rem;
  color: var(--muted);
}
footer {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  color: var(--muted);
}
footer .wrap {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 0.8rem;
}
#credits {
  margin-left: auto;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.detail {
  padding: 15px 22px 18px;
}
.back {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--berry);
}
.back svg {
  transform: rotate(180deg);
}
.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 11px 0 9px;
  margin-bottom: 9px;
}
.detail-head img {
  width: 66px;
  height: 58px;
  mix-blend-mode: multiply;
  object-fit: contain;
}
.type {
  color: var(--orange);
  font-size: 0.62rem;
}
.detail h2 {
  font-size: 1.95rem;
  line-height: 1.1;
  color: var(--wine);
  letter-spacing: -0.04em;
}
.detail p {
  font-size: 0.86rem;
  color: #615244;
  line-height: 1.5;
}
.detail h3 {
  font:
    700 0.7rem/1.3 "DM Sans",
    sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 12px 0 3px;
}
.restore,
.dialog-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  border: 1px solid #cdbda6;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 0.78rem;
  color: var(--wine);
  background: #f6efdf;
}
.detail .locked {
  font-size: 0.77rem;
  margin-top: 13px;
  color: var(--berry);
}
dialog {
  max-width: min(430px, calc(100% - 32px));
  border: 1px solid #bdab91;
  border-radius: 12px;
  padding: 32px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 100px #25150345;
}
dialog::backdrop {
  background: #291c14a1;
}
#close-dialog {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 6px;
}
dialog h2 {
  font-size: 2rem;
  line-height: 1.14;
  color: var(--wine);
  margin: 8px 0 12px;
  letter-spacing: -0.04em;
}
dialog p,
dialog li {
  font-size: 1rem;
  color: #655447;
}
dialog ol {
  padding-left: 20px;
}
dialog li + li {
  margin-top: 8px;
}
dialog a {
  text-decoration: underline;
}
dialog img {
  display: block;
  width: 130px;
  height: 115px;
  object-fit: contain;
  mix-blend-mode: multiply;
  margin: 0 auto 18px;
}
.dialog-action {
  background: var(--wine);
  color: var(--paper);
  font-size: 0.88rem;
  padding: 9px 14px;
}
.skip,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip:focus {
  z-index: 10;
  width: auto;
  height: auto;
  clip-path: none;
  padding: 8px;
  background: white;
}
@media (min-width: 1550px) {
  .stage {
    min-height: 420px;
  }
  .cut-row {
    min-height: 63px;
  }
}
@media (max-width: 950px) {
  .wrap {
    width: calc(100% - 48px);
  }
  .workbench {
    grid-template-columns: minmax(0, 1.65fr) minmax(258px, 1fr);
    gap: 14px;
  }
  .cut-list {
    padding: 0 15px;
  }
  .panel-heading {
    padding-left: 17px;
  }
  .cut-row {
    gap: 6px;
    grid-template-columns: 22px 38px 1fr 14px;
  }
  .cut-row img {
    width: 38px;
  }
  .idea {
    padding: 12px;
    gap: 8px;
  }
  .idea img {
    width: 58px;
    height: 58px;
  }
  .idea-title {
    font-size: 1.17rem;
  }
  .lede {
    max-width: 580px;
  }
  .intro {
    padding: 25px 0;
  }
}
@media (max-width: 730px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .intro {
    padding: 25px 0 20px;
  }
  .turkey-engraving {
    display: none;
  }
  h1 {
    font-size: clamp(2.6rem, 7.5vw, 3.7rem);
  }
  .lede {
    font-size: 0.94rem;
    max-width: 540px;
  }
  .workbench {
    grid-template-columns: 1fr;
  }
  .stage {
    min-height: 0;
    aspect-ratio: 1.48;
  }
  .cut-panel {
    border-radius: 9px;
  }
  .cut-list {
    padding: 0 18px;
  }
  .cut-row {
    grid-template-columns: 26px 51px 1fr 18px;
    min-height: 54px;
    gap: 9px;
  }
  .cut-row img {
    width: 48px;
  }
  .panel-heading h2 {
    font-size: 1.8rem;
  }
  .panel-heading {
    padding: 16px 18px 10px;
  }
  .serving {
    margin-top: 25px;
  }
  .ideas {
    grid-template-columns: 1fr 1fr;
  }
  .stage-ui,
  .bottom-ui {
    left: 12px;
    right: 12px;
  }
  .stage-ui {
    top: 12px;
  }
  .bottom-ui {
    bottom: 10px;
  }
  .board-caption {
    font-size: 0.78rem;
  }
  .detail p {
    font-size: 1rem;
  }
  .detail-head img {
    width: 84px;
    height: 68px;
  }
}
@media (max-width: 460px) {
  .view-label {
    font-size: 0.56rem;
  }
  .view-hint {
    font-size: 0.66rem;
  }
  .stage {
    aspect-ratio: 1.27;
  }
  .pin {
    font-size: 0.65rem;
  }
  .pin b {
    line-height: 14px;
    min-width: 17px;
  }
  .ideas {
    grid-template-columns: 1fr;
  }
  .idea img {
    width: 75px;
    height: 75px;
  }
  .idea {
    min-height: 90px;
  }
  .idea-title {
    font-size: 1.35rem;
  }
  .serving h2 {
    font-size: 2.2rem;
  }
  .board-action {
    font-size: 0.7rem;
  }
  .board-caption {
    justify-content: flex-start;
  }
  .zoom button {
    width: 29px;
    height: 27px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.turkey-engraving {
  filter: none;
}

.poster {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  inset: 0;
  pointer-events: none;
}
.stage-message {
  top: auto;
  bottom: 10px;
  transform: translateX(-50%);
  font-size: 0.75rem;
}
.fallback .board-caption {
  display: none;
}
