/* 全幅の土台は通常ガイドと同じ。比較中の計算機の幅を変えない。 */
main:has(.delivery-guide) {
  --delivery-guide-surface: #fffcf5;

  max-width: none;
  padding: 0;
}

main:has(.delivery-guide) #calculator::after {
  background: var(--delivery-guide-surface);
}

main:has(.delivery-guide) #calculator {
  margin-inline: 0;
}

/* 工程の意味は計算セクションと統一。配置はこの章に閉じる。 */
.delivery-guide--workshop {
  --dgw-making: color-mix(in srgb, var(--sb-world-gold) 26%, white);
  --dgw-making-ink: #735016;
  --dgw-making-line: #c49b45;
  --dgw-transit: #e1f0ee;
  --dgw-transit-line: #39857f;
  --scene-gold: var(--sb-world-gold);
  --scene-soil: var(--sb-world-field-clay);
  --scene-wood: var(--sb-world-wood-edge);
  --scene-action: var(--sb-world-action);
  --scene-paper: var(--sb-world-paper);
  --scene-sage: var(--sb-world-field-leaf);
  --scene-teal: var(--sb-world-accent);
  --scene-rust: #b87852;
  --scene-ink: var(--sb-world-ink);

  position: relative;
  padding: clamp(2.8rem, 5vw, 5rem) var(--sb-world-content-gutter) 2.5rem;
  color: var(--sb-world-ink);
  background: var(--sb-world-ground);
  scroll-margin-top: 6rem;
}

.delivery-guide--workshop * {
  box-sizing: border-box;
}

.dgw-wrap {
  max-width: var(--sb-world-content-width);
  margin-inline: auto;
}

.dgw-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  align-items: center;
  gap: 2rem;
}

.delivery-guide--workshop .dgw-eyebrow {
  margin: 0 0 .9rem;
  color: var(--sb-world-muted);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.delivery-guide--workshop h2 {
  margin: 0;
  font-family: var(--sb-world-font-heading);
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .035em;
}

.delivery-guide--workshop h2 span,
.delivery-guide--workshop h3 span {
  color: var(--sb-world-accent);
}

.delivery-guide--workshop .dgw-lead {
  margin: 1.2rem 0 0;
  font-size: 1rem;
  line-height: 1.9;
}

.dgw-guide {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  margin: 0;
}

.dgw-guide figcaption {
  padding: .75rem .65rem;
  border: 1px solid var(--sb-world-rule);
  border-radius: .8rem .8rem 0 .8rem;
  background: var(--sb-world-paper);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.7;
  white-space: nowrap;
}

.dgw-guide > div {
  position: relative;
  flex: 0 0 10rem;
  aspect-ratio: .96;
  overflow: hidden;
  border: 3px solid var(--sb-world-wood-edge);
  border-bottom: 8px solid var(--sb-world-wood);
  border-radius: 48% 48% .4rem .4rem;
  background: color-mix(in srgb, var(--sb-world-gold) 18%, transparent);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--sb-world-wood-edge) 65%, var(--sb-world-ground));
}

.dgw-guide img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
}

.delivery-guide--workshop .dgw-road {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.8rem;
  margin: 2.7rem 0 3.5rem;
  padding: 0;
  list-style: none;
}

.dgw-road::before {
  position: absolute;
  top: 10.3rem;
  right: 10%;
  left: 10%;
  height: .65rem;
  border-radius: 50%;
  background: linear-gradient(to right, var(--sb-world-wood) 0 29%, var(--dgw-making-line) 36% 63%, var(--dgw-transit-line) 70%);
  opacity: .35;
  content: "";
}

.dgw-stage {
  position: relative;
  min-width: 0;
}

.dgw-picture {
  position: relative;
  display: grid;
  place-items: end center;
  height: 12rem;
  padding-bottom: 1rem;
}

.dgw-picture .dgw-scene {
  display: block;
  width: 15rem;
  max-width: 90%;
  height: auto;
}

.dgw-stage-copy {
  padding-top: .6rem;
}

.delivery-guide--workshop .dgw-stage-number {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .65rem;
  font-size: .8125rem;
  font-weight: 700;
}

.dgw-stage-number > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--sb-world-paper);
  border: 1px solid var(--sb-world-wood);
  font-size: .75rem;
}

.dgw-stage--making .dgw-stage-number > span {
  background: var(--dgw-making);
  border-color: var(--dgw-making-line);
}

.dgw-stage--transit .dgw-stage-number > span {
  background: var(--dgw-transit);
  border-color: var(--dgw-transit-line);
}

.delivery-guide--workshop .dgw-stage h3 {
  margin: 0 0 .65rem;
  font-size: clamp(1.1rem, 1.65vw, 1.4rem);
  line-height: 1.5;
}

.delivery-guide--workshop .dgw-stage-copy > p:not(.dgw-duration, .dgw-stage-number) {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.85;
}

.delivery-guide--workshop .dgw-stage-copy > p.dgw-stage-note {
  margin-top: .6rem;
  color: var(--sb-world-muted);
  font-size: .8125rem;
}

.delivery-guide--workshop .dgw-duration {
  --sb-motion-marker-color: var(--sb-world-gold);
  --sb-motion-marker-height: .3em;

  display: flex;
  align-items: baseline;
  gap: .35rem;
  width: fit-content;
  margin: 0 0 .6rem;
  padding: .35rem .6rem;
  border-radius: .3rem;
  background: var(--dgw-making);
  color: var(--dgw-making-ink);
  font-weight: 700;
}

.dgw-duration strong {
  font-size: 2.65rem;
  line-height: 1.2;
}

.delivery-guide--workshop .dgw-milestone {
  position: absolute;
  z-index: 1;
  top: 8.1rem;
  right: -4.9rem;
  width: 7rem;
  margin: 0;
  padding: .5rem;
  border: 1px solid var(--sb-world-wood-edge);
  border-radius: .45rem;
  background: var(--sb-world-paper);
  box-shadow: 0 3px 0 var(--sb-world-wood);
  text-align: center;
  font-size: .75rem;
  line-height: 1.6;
}

.dgw-milestone strong {
  font-size: .875rem;
}

.dgw-milestone--dispatch > span:last-child {
  display: block;
}

.delivery-guide--workshop .dgw-milestone--dispatch {
  border-color: var(--dgw-transit-line);
  background: var(--dgw-transit);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--dgw-transit-line) 35%, white);
}

.dgw-section-heading {
  margin-bottom: 1.3rem;
}

.delivery-guide--workshop .dgw-section-heading h3,
.delivery-guide--workshop .dgw-counting h3 {
  margin: 0;
  font-family: var(--sb-world-font-heading);
  font-size: clamp(1.65rem, 2.6vw, 2.25rem);
  line-height: 1.5;
}

.dgw-section-heading h3 > span {
  display: inline-block;
}

.dgw-benches {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 1.6rem;
}

.delivery-guide--workshop .dgw-bench {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9rem;
  align-items: center;
  gap: 1.25rem .9rem;
  padding: 1.7rem;
  border: 1px solid var(--sb-world-rule);
  border-top: 4px solid var(--sb-world-action);
  background: #fffefa;
}

.delivery-guide--workshop .dgw-bench--samples {
  border-top-color: var(--sb-world-wood-edge);
}

.delivery-guide--workshop .dgw-route {
  margin: 0 0 .65rem;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--sb-world-action);
}

.delivery-guide--workshop .dgw-bench h4 {
  margin: 0 0 .8rem;
  font-family: var(--sb-world-font-heading);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.5;
}

.delivery-guide--workshop .dgw-bench-copy > p:last-child {
  margin: 0;
  font-size: .875rem;
  line-height: 1.8;
}

.dgw-bench figure {
  margin: 0;
  text-align: center;
}

.dgw-template {
  padding: .4rem;
  background: white;
  border: 1px solid var(--sb-world-rule);
  box-shadow: 4px 5px 0 var(--sb-world-field-clay);
  rotate: 3deg;
}

.dgw-template img {
  display: block;
  width: 100%;
  height: 12rem;
  object-fit: contain;
}

.dgw-samples img {
  display: block;
  width: auto;
  height: 12rem;
  max-width: 100%;
  margin-inline: auto;
  filter: drop-shadow(4px 6px 2px rgb(23 62 80 / 12%));
  rotate: -4deg;
}

.dgw-bench figcaption {
  margin-top: .4rem;
  color: var(--sb-world-muted);
  font-size: .75rem;
}

.dgw-bench-actions {
  display: grid;
  grid-column: 1 / -1;
  gap: .8rem;
  align-self: end;
}

.dgw-bench-actions .sb-button {
  justify-content: space-between;
  width: 100%;
  min-height: 3.3rem;
  text-align: start;
}

.dgw-bench-actions .sb-button > span {
  min-width: 0;
}

.dgw-button-phrase {
  display: inline-block;
}

.delivery-guide--workshop .dgw-text-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: .5rem;
  min-height: 2.75rem;
  font-size: .875rem;
}

.dgw-text-link svg {
  width: 1.1rem;
  height: 1.1rem;
}

.delivery-guide--workshop .dgw-bench-actions p {
  margin: 0;
  font-size: .8125rem;
  line-height: 1.75;
  color: var(--sb-world-muted);
}

.delivery-guide--workshop .dgw-prep-note {
  margin: 1.1rem 0 0;
  font-size: .875rem;
  line-height: 1.8;
}

.dgw-counting {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.7fr);
  gap: 2rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--sb-world-rule);
}

.delivery-guide--workshop .dgw-counting header > p:not(.dgw-eyebrow) {
  margin: .9rem 0 0;
  font-size: .875rem;
  line-height: 1.85;
}

.dgw-week-paper {
  position: relative;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--sb-world-rule);
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 3px 0 var(--sb-world-wood), 0 .7rem 1.5rem rgb(43 73 62 / 7%);
}

.dgw-week-paper::before {
  position: absolute;
  top: -.5rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 1rem;
  border: 1px solid var(--sb-world-wood-edge);
  border-radius: .2rem;
  background: var(--sb-world-paper);
  content: "";
}

.dgw-week-heading {
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--sb-world-rule);
}

.delivery-guide--workshop .dgw-week-heading h4 {
  margin: 0 0 .35rem;
  font-size: 1.15rem;
  line-height: 1.5;
}

.delivery-guide--workshop .dgw-week-heading p {
  margin: 0;
  color: var(--sb-world-muted);
  font-size: .8125rem;
  line-height: 1.7;
}

.delivery-guide--workshop .dgw-week {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) 1.1fr 1.1fr;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dgw-week li {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  gap: .5rem;
  min-height: 10rem;
  padding: .7rem .15rem;
  border: 1px solid color-mix(in srgb, var(--dgw-making-line) 45%, white);
  border-bottom: 3px solid var(--dgw-making-line);
  border-radius: .4rem;
  background: var(--dgw-making);
  text-align: center;
}

.dgw-week .dgw-weekday {
  font-size: .8125rem;
  white-space: nowrap;
}

.dgw-week li > strong {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.dgw-week small {
  display: block;
  margin-top: .35rem;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
}

.dgw-week .dgw-day-event,
.dgw-week .dgw-day-space {
  min-height: 1.6rem;
}

.dgw-week .dgw-day-event {
  display: grid;
  place-items: center;
  padding: .1rem .4rem;
  border-radius: .25rem;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}

.dgw-week .dgw-day-start {
  border-color: var(--sb-world-ink);
}

.dgw-day-start .dgw-day-event {
  background: var(--sb-world-ink);
  color: white;
}

.dgw-week .dgw-day-ship {
  border-color: var(--dgw-making-ink);
  background: color-mix(in srgb, var(--sb-world-gold) 55%, white);
}

.dgw-day-ship .dgw-day-event {
  color: white;
  background: var(--dgw-making-ink);
}

.dgw-week .dgw-week-rest {
  border-color: #aaa99f;
  background: repeating-linear-gradient(135deg, #f1f1ed 0 4px, white 4px 7px);
  color: var(--sb-world-muted);
}

.dgw-week .dgw-week-rest > strong {
  font-size: .875rem;
}

.delivery-guide--workshop .dgw-shipping-caption {
  margin: .9rem 0 0;
  font-size: .9375rem;
  text-align: right;
  line-height: 1.8;
}

.dgw-shipping-caption > span {
  color: var(--dgw-making-ink);
  margin-right: .25rem;
}

.dgw-shipping-caption strong {
  box-shadow: inset 0 -.35em color-mix(in srgb, var(--sb-world-gold) 65%, transparent);
}

.dgw-dispatch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin: 1rem 0 0;
}

.dgw-dispatch > div {
  padding: .85rem;
  border: 1px solid var(--sb-world-rule);
  border-radius: .4rem;
  background: #fff;
}

.dgw-dispatch dt {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .5rem;
  align-items: baseline;
  font-size: .875rem;
  font-weight: 700;
}

.dgw-dispatch dt > span {
  font-size: .75rem;
  font-weight: 400;
}

.dgw-dispatch dd {
  display: grid;
  gap: .1rem;
  margin: .4rem 0 0;
  font-size: .875rem;
  line-height: 1.6;
}

.dgw-dispatch dd strong {
  font-size: 1rem;
}

.dgw-dispatch .dgw-dispatch-days {
  justify-self: start;
  margin: .15rem 0 .35rem;
  padding: .15rem .55rem;
  border-radius: 1rem;
  color: var(--dgw-making-ink);
  background: var(--dgw-making);
  font-size: .875rem;
  font-weight: 700;
}

.delivery-guide--workshop .dgw-footnote {
  margin: .75rem 0 0;
  font-size: .75rem;
  color: var(--sb-world-muted);
  line-height: 1.8;
}

.delivery-guide--workshop .dgw-flow {
  margin: 1.2rem 0 0;
  text-align: right;
}

@media (max-width: 1100px) {
  .dgw-benches {
    gap: 1rem;
  }

  .delivery-guide--workshop .dgw-bench {
    grid-template-columns: minmax(0, 1fr) 6.5rem;
    padding: 1.25rem;
  }

  .dgw-counting {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 760px) {
  .delivery-guide--workshop {
    padding: 2rem 1rem;
  }

  .dgw-heading {
    grid-template-columns: minmax(0, 1fr) 5rem;
    gap: .9rem .5rem;
  }

  .dgw-heading > div {
    display: contents;
  }

  .dgw-heading .dgw-eyebrow {
    grid-column: 1 / -1;
  }

  .dgw-heading h2 {
    grid-column: 1;
    grid-row: 2;
  }

  .delivery-guide--workshop h2 {
    font-size: clamp(1.65rem, 7vw, 2rem);
    letter-spacing: 0;
  }

  .delivery-guide--workshop .dgw-lead {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0;
    font-size: .9375rem;
  }

  .dgw-pc-break {
    display: none;
  }

  .dgw-guide {
    grid-column: 2;
    grid-row: 2;
    flex-direction: column;
    gap: .35rem;
  }

  .dgw-guide figcaption {
    padding: .25rem;
    font-size: .75rem;
  }

  .dgw-guide > div {
    flex: auto;
    width: 4.5rem;
    border-width: 2px;
    border-bottom-width: 6px;
  }

  .delivery-guide--workshop .dgw-road {
    grid-template-columns: 1fr;
    gap: 1.1rem;
    margin-block: 1.5rem 2.5rem;
  }

  .dgw-road::before {
    top: 2rem;
    bottom: 3rem;
    left: 2rem;
    width: .6rem;
    height: auto;
    background: linear-gradient(to bottom, var(--sb-world-wood) 0 29%, var(--dgw-making-line) 36% 63%, var(--dgw-transit-line) 70%);
  }

  .dgw-stage {
    display: grid;
    grid-template-columns: 4.4rem minmax(0, 1fr);
    gap: .6rem .75rem;
  }

  .dgw-picture {
    height: auto;
    align-self: start;
    padding: 1rem 0 0;
  }

  .dgw-picture .dgw-scene {
    max-width: 100%;
    width: 100%;
  }

  .dgw-stage-copy {
    padding: 0;
  }

  .delivery-guide--workshop .dgw-stage h3 {
    font-size: 1.125rem;
  }

  .delivery-guide--workshop .dgw-stage-copy > p:not(.dgw-duration, .dgw-stage-number) {
    font-size: .875rem;
  }

  .dgw-stage-copy br {
    display: none;
  }

  .dgw-stage-number > span {
    width: 1.6rem;
    height: 1.6rem;
  }

  .delivery-guide--workshop .dgw-milestone {
    position: static;
    grid-column: 2;
    width: fit-content;
    min-width: 8rem;
    margin-bottom: .65rem;
    padding: .35rem .6rem;
    text-align: start;
  }

  .dgw-milestone br {
    display: none;
  }

  .dgw-milestone strong {
    margin-left: .3rem;
  }

  .dgw-milestone--dispatch > span:last-child {
    display: inline;
    margin-left: .3rem;
  }

  .dgw-duration strong {
    font-size: 2.2rem;
  }

  .dgw-duration > span {
    font-size: .875rem;
  }

  .dgw-benches {
    grid-template-columns: 1fr;
    gap: 1.3rem;
  }

  .delivery-guide--workshop .dgw-bench {
    grid-template-columns: minmax(0, 1fr) 5.5rem;
    padding: 1.15rem;
    gap: 1rem .65rem;
  }

  .dgw-template img,
  .dgw-samples img {
    height: 8rem;
  }

  .dgw-bench-copy {
    display: contents;
  }

  .dgw-bench-copy .dgw-route,
  .dgw-bench-copy h4 {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .dgw-bench-copy h4 {
    grid-row: 2;
  }

  .dgw-bench-copy > p:last-child {
    grid-column: 1;
    grid-row: 4;
  }

  .dgw-bench figure {
    grid-column: 2;
    grid-row: 4;
  }

  .dgw-bench-actions {
    grid-row: 3;
  }

  .dgw-bench figcaption {
    font-size: .75rem;
  }

  .delivery-guide--workshop .dgw-bench h4 {
    font-size: 1.4rem;
  }

  .dgw-bench-copy p br {
    display: none;
  }

  .dgw-bench-actions .sb-button {
    font-size: .875rem;
    padding-inline: 1rem;
  }

  .dgw-counting {
    margin-top: 2.4rem;
    padding-top: 2rem;
  }

  .delivery-guide--workshop .dgw-week {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .3rem;
  }

  .dgw-week-paper {
    padding: 1.1rem .75rem;
  }

  .dgw-week li {
    min-height: 9rem;
    padding-inline: .1rem;
    gap: .4rem;
  }

  .dgw-week .dgw-week-rest {
    grid-column: 1 / 4;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    justify-content: center;
    align-items: center;
    min-height: 6.3rem;
    margin-top: .25rem;
    gap: .6rem;
    padding-inline: .65rem;
    align-self: center;
  }

  .dgw-week-rest > small {
    grid-column: 1 / -1;
    margin: 0;
  }

  .dgw-week .dgw-week-next {
    grid-column: 4 / 6;
    min-height: 9rem;
    margin-top: .25rem;
  }

  .dgw-week li > strong {
    font-size: 2rem;
  }

  .dgw-week .dgw-day-event {
    padding-inline: .25rem;
  }

  .dgw-dispatch {
    grid-template-columns: 1fr;
    gap: .6rem;
  }

  .dgw-dispatch > div {
    display: grid;
    grid-template-columns: 5.6rem minmax(0, 1fr);
    align-items: center;
    gap: .5rem;
  }

  .dgw-dispatch dd {
    margin: 0;
  }
}

@media (max-width: 360px) {
  .dgw-milestone[data-guide-confirmed] br {
    display: revert;
  }

  .dgw-milestone[data-guide-confirmed] strong {
    margin-left: 0;
  }
}
