:root {
  --dt-gold: #c99b42;
  --dt-gold-bright: #efcd77;
  --dt-gold-soft: #f5e4b2;
  --dt-cream: #fff3d0;
  --dt-brown: rgba(106, 60, 23, .92);
  --dt-brown-mid: rgba(73, 36, 12, .94);
  --dt-brown-dark: rgba(38, 19, 8, .95);
  --dt-black: #030201;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
}

body {
  color: var(--dt-cream);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

.datentou-page {
  width: 100%;
  background: #030201;
}

.datentou-stage {
  position: relative;
  width: 100%;
  height: clamp(760px, 86vw, 1120px);
  min-height: 760px;
  overflow: hidden;
  background: var(--dt-black);
  border-bottom: 1px solid rgba(201, 155, 66, .32);
}

.datentou-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
}

.datentou-back {
  z-index: 1;
}

.datentou-shopkeeper {
  position: absolute;
  left: 10px;
  bottom: 210px;
  z-index: 2;
  width: auto;
  height: clamp(340px, 48vw, 640px);
  object-fit: contain;
  object-position: left bottom;
  user-select: none;
  pointer-events: none;
  transition: filter .25s ease, transform .25s ease;
}

.datentou-shopkeeper.is-talking {
  filter: brightness(1.04);
}

.datentou-front {
  z-index: 4;
  transform: translateY(58px);
}

.datentou-ui {
  position: absolute;
  left: 50%;
  top: 24px;
  z-index: 6;
  width: min(900px, calc(100% - 48px));
  transform: translateX(-50%);
}

.datentou-talk {
  width: 100%;
}

.datentou-talk__name {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(220px, 42vw);
  height: 52px;
  margin: 0 0 -1px 0;
  padding: 0 16px;
  color: #fff2d2;
  background: linear-gradient(180deg, rgba(128, 78, 33, .98), rgba(61, 30, 9, .98));
  border: 3px solid var(--dt-gold);
  border-bottom: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .92), 0 -4px 14px rgba(0, 0, 0, .3) inset;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9);
}

.datentou-talk__line {
  display: block;
  width: 100%;
  min-height: 172px;
  margin: 0;
  padding: 20px 22px;
  color: #fff7e7;
  white-space: pre-line;
  text-align: left;
  letter-spacing: .02em;
  line-height: 1.5;
  font-size: clamp(20px, 2.25vw, 24px);
  background:
    linear-gradient(180deg, rgba(128, 72, 28, .86), rgba(55, 27, 9, .90)),
    linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,0));
  border: 4px solid var(--dt-gold);
  border-radius: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .88), 0 14px 24px rgba(0, 0, 0, .28), 0 0 18px rgba(240, 188, 83, .1) inset;
  cursor: pointer;
}

.datentou-talk__line:focus-visible,
.datentou-stage-nav__link:focus-visible {
  outline: 2px solid var(--dt-gold-bright);
  outline-offset: 4px;
}

.datentou-stage-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  width: 100%;
}

.datentou-stage-nav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 10px 18px;
  color: #f9e7bd;
  text-decoration: none;
  text-align: center;
  letter-spacing: .08em;
  font-size: clamp(18px, 2vw, 22px);
  background:
    linear-gradient(180deg, rgba(126, 74, 30, .95), rgba(53, 25, 7, .97));
  border: 3px solid var(--dt-gold);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .88), 0 10px 20px rgba(0, 0, 0, .28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .95);
  transition: transform .2s ease, filter .2s ease;
}

.datentou-stage-nav__link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.datentou-about {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.datentou-about__eyebrow {
  margin: 0 0 10px;
  color: var(--dt-gold);
  letter-spacing: .22em;
  font-size: 12px;
}

.datentou-about__title {
  margin: 0 0 18px;
  color: #fff8dd;
  letter-spacing: .13em;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 600;
}

.datentou-about__lead {
  margin: 0 0 28px;
  color: rgba(255, 241, 197, .9);
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.9;
}

.datentou-about__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.datentou-card {
  min-height: 172px;
  padding: 22px 20px;
  background: linear-gradient(180deg, rgba(55, 28, 12, .88), rgba(14, 8, 4, .9));
  border: 1px solid rgba(238, 192, 78, .54);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
}

.datentou-card h2 {
  margin: 0 0 12px;
  color: var(--dt-gold-soft);
  letter-spacing: .12em;
  font-size: 18px;
}

.datentou-card p {
  margin: 0;
  color: rgba(255, 241, 197, .82);
  line-height: 1.75;
  font-size: 14px;
}

.datentou-card code {
  color: #fff8dd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 768px) {
  .datentou-stage {
    height: clamp(860px, 214vw, 1180px);
    min-height: 860px;
  }

  .datentou-back {
    content: url("https://datendou-shop-assets.pages.dev/datentou_cloudflare_package_v2/assets/datentou-back-mobile.png");
    object-position: center top;
  }

  .datentou-front {
    transform: translateY(30px);
  }

  .datentou-shopkeeper {
    left: -8px;
    bottom: 330px;
    height: clamp(250px, 62vw, 390px);
  }

  .datentou-ui {
    top: 24px;
    width: calc(100% - 24px);
    transform: translateX(-50%);
  }

  .datentou-talk__name {
    width: 46vw;
    height: 46px;
    font-size: clamp(14px, 5vw, 20px);
  }

  .datentou-talk__line {
    min-height: 168px;
    padding: 16px 14px;
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: clamp(14px, 5vw, 18px);
    line-height: 1.52;
    border-width: 3px;
  }

  .datentou-stage-nav {
    gap: 10px;
    margin-top: 10px;
  }

  .datentou-stage-nav__link {
    min-height: 46px;
    padding: 9px 10px;
    font-size: clamp(15px, 5vw, 18px);
    border-width: 2px;
  }

  .datentou-about {
    width: min(100% - 28px, 640px);
    padding: 38px 0 54px;
  }

  .datentou-about__grid {
    grid-template-columns: 1fr;
  }
}
