/* Fonts: load Zen Maru Gothic 700/900 via <link> in the page head (not @import). */
@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }

.hw-sprite {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* ---------- c/Chip ---------- */
.hw-chip {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: var(--hw-radius-pill);
  font-size: 12px; font-weight: 700;
  background: var(--hw-cream); color: var(--hw-purple-deep);
  border: 1px solid var(--hw-gold);
}
.hw-chip--on-dark {
  background: rgb(255 255 255 / .18); border-color: var(--hw-cream); color: var(--hw-cream);
}

/* ---------- c/Ribbon (v2: length variant S/M/L — never stretch tails) ---------- */
.hw-ribbon {
  display: inline-grid;
  place-items: center;
  max-width: 100%;
  background: center / 100% 100% no-repeat;
  color: #fff;
  font-family: var(--hw-ff-display);
  font-weight: 900;
  letter-spacing: .04em;
  text-shadow: 0 1px 0 rgb(0 0 0 / .25);
  filter: drop-shadow(0 3px 0 rgb(0 0 0 / .12));
  container-type: size;
}
.hw-ribbon > span {
  /* PNG tails hang below the bar — shift to the bar's visual center (~12% of ribbon height) */
  transform: translateY(-13cqh);
  padding: 0 13%;
  text-align: center;
  line-height: 1.2;
  text-wrap: balance;
}
.hw-ribbon--purple-s {
  background-image: url("img/v2/ribbon/purple-s-pc.webp");
  aspect-ratio: 867 / 180;
  width: 300px;
  font-size: 16px;
}
.hw-ribbon--purple-m {
  background-image: url("img/v2/ribbon/purple-m-pc.webp");
  aspect-ratio: 1399 / 180;
  width: min(100%, 480px);
  font-size: 18px;
}
.hw-ribbon--purple-l {
  background-image: url("img/v2/ribbon/purple-l-pc.webp");
  aspect-ratio: 2028 / 180;
  width: min(100%, 680px);
  font-size: 18px;
}
.hw-ribbon--gold-s {
  background-image: url("img/v2/ribbon/gold-s-pc.webp");
  aspect-ratio: 867 / 180;
  width: 300px;
  font-size: 16px;
  color: var(--hw-purple-deep);
  text-shadow: none;
}
.hw-ribbon--gold-m {
  background-image: url("img/v2/ribbon/gold-m-pc.webp");
  aspect-ratio: 1374 / 180;
  width: min(100%, 480px);
  font-size: 18px;
  color: var(--hw-purple-deep);
  text-shadow: none;
}
.hw-ribbon--gold-l {
  background-image: url("img/v2/ribbon/gold-l-pc.webp");
  aspect-ratio: 2028 / 180;
  width: min(100%, 680px);
  font-size: 18px;
  color: var(--hw-purple-deep);
  text-shadow: none;
}
@media (max-width: 600px) {
  .hw-ribbon--purple-s { background-image: url("img/v2/ribbon/purple-s-sp.webp"); width: 240px; font-size: 14px; }
  .hw-ribbon--purple-m { background-image: url("img/v2/ribbon/purple-m-sp.webp"); width: 100%; font-size: 15px; }
  .hw-ribbon--purple-l { background-image: url("img/v2/ribbon/purple-l-sp.webp"); width: 100%; font-size: 12px; }
  .hw-ribbon--gold-s { background-image: url("img/v2/ribbon/gold-s-sp.webp"); width: 240px; font-size: 14px; }
  .hw-ribbon--gold-m { background-image: url("img/v2/ribbon/gold-m-sp.webp"); width: 100%; font-size: 15px; }
  .hw-ribbon--gold-l { background-image: url("img/v2/ribbon/gold-l-sp.webp"); width: 100%; font-size: 12px; }
}

/* ---------- c/CTA (v2: image face + HTML label) ---------- */
.hw-cta {
  display: inline-grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  background: center / 100% 100% no-repeat transparent;
  width: 320px;
  aspect-ratio: 640 / 128;
  color: #fff;
  font-family: var(--hw-ff-display);
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
}
.hw-cta > span { transform: translateY(-8%); }
.hw-cta--purple { background-image: url("img/v2/cta/purple-pc.webp"); }
.hw-cta--orange {
  background-image: url("img/v2/cta/orange-pc.webp");
  color: #fff; /* オレンジのボタンは白文字（親の色を継がない） */
}
.hw-cta--white {
  background-image: url("img/v2/cta/white-pc.webp");
  color: #6e2ba3;
}
.hw-cta:hover { filter: brightness(1.05); }
.hw-cta:active { transform: translateY(2px); }
.hw-cta:focus-visible {
  outline: 3px solid var(--hw-gold);
  outline-offset: 3px;
  border-radius: 999px;
}
.hw-cta--block { width: 100%; max-width: 360px; }
@media (max-width: 600px) {
  .hw-cta { width: 100%; max-width: none; aspect-ratio: 686 / 112; font-size: 17px; }
  .hw-cta--purple { background-image: url("img/v2/cta/purple-sp.webp"); }
  .hw-cta--orange { background-image: url("img/v2/cta/orange-sp.webp"); }
  .hw-cta--white { background-image: url("img/v2/cta/white-sp.webp"); }
}
@media (prefers-reduced-motion: reduce) {
  .hw-cta:hover, .hw-cta:active { filter: none; transform: none; }
}

/* legacy CSS buttons (forms etc.) */
.hw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--hw-space-1);
  min-height: 48px; padding: 8px 24px; border: 0; border-radius: var(--hw-radius-pill);
  font-family: var(--hw-ff-display); font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; color: var(--hw-white);
  background: var(--hw-purple); box-shadow: var(--hw-shadow-btn) var(--hw-purple-deep);
}
.hw-btn:hover { filter: brightness(1.08); }
.hw-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--hw-purple-deep); }
.hw-btn:focus-visible { outline: 3px solid var(--hw-gold); outline-offset: 3px; }
.hw-btn--ghost { background: var(--hw-white); color: var(--hw-purple); box-shadow: var(--hw-shadow-btn) #d9c4ea; }
.hw-btn--sm { min-height: 40px; padding: 4px 16px; font-size: 13px; }
.hw-btn--block { width: 100%; }

/* ---------- c/PumpkinTitle (v2 face-less plate) ---------- */
.hw-pumpkin {
  position: relative;
  width: min(46%, 380px);
  margin-inline: auto;
}
.hw-pumpkin__art { width: 100%; height: auto; display: block; }
.hw-pumpkin__in {
  position: absolute;
  inset: 22% 8% 10%;
  margin: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 4px;
  color: var(--hw-purple-deep);
  font-family: var(--hw-ff-display);
  font-weight: 900;
  line-height: 1.25;
}
.hw-pumpkin__kicker { font-size: max(14px, .55em); font-weight: 700; margin: 0; }
.hw-pumpkin__title {
  font-size: clamp(16px, 3.2vw, 30px);
  font-weight: 900;
  margin: 0;
  text-wrap: balance;
}

/* ---------- c/FirstView (v2: bg + title lockup) ---------- */
.hw-fv {
  position: relative;
  display: block;
  margin: 0; /* reset UA <figure> margins */
  overflow: hidden;
  border-radius: var(--hw-radius-m);
  aspect-ratio: 4 / 3;
  background: #2a1848;
}
.hw-fv > picture,
.hw-fv__bg,
.hw-fv img.hw-fv__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* title image lockup (preferred over HTML headline in FV) */
.hw-fv__lockup {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: 62%;
  z-index: 1;
  margin: 0;
}
.hw-fv__lockup img,
.hw-fv__lockup picture {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  inset: auto;
  object-fit: contain;
}
/* optional HTML stack under/around title (chips, CTA) */
.hw-fv__slot {
  position: absolute;
  inset: auto 10% 8%;
  display: grid;
  place-content: end center;
  gap: var(--hw-space-2);
  justify-items: center;
  text-align: center;
  z-index: 1;
}
@media (min-width: 960px) {
  .hw-fv { aspect-ratio: 16 / 9; }
  .hw-fv__lockup { width: 56%; top: 38%; }
}
.hw-ended {
  display: none;
  position: absolute;
  inset: 0;
  z-index: var(--hw-z-overlay);
  place-items: center;
  text-align: center;
  padding: var(--hw-space-3);
  background: rgb(255 246 232 / .88);
  font-family: var(--hw-ff-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--hw-ink);
}
html.is-ended .hw-ended { display: grid; }

/* ---------- c/Frame (9-slice · any width/height) ---------- */
.hw-frame {
  box-sizing: border-box;
  max-width: 100%;
  border-style: solid;
  border-color: transparent;
  border-image-slice: 300 fill;
  border-image-repeat: stretch;
  border-width: 112px;
  border-image-width: 112px;
  padding: 8px 16px;
  color: var(--hw-ink);
}
.hw-frame--purple { border-image-source: url("img/v2/frame/frame-purple.webp"); }
.hw-frame--orange { border-image-source: url("img/v2/frame/frame-orange.webp"); }
.hw-frame h2,
.hw-frame h3 { margin: 0 0 8px; font-family: var(--hw-ff-display); color: var(--hw-purple-deep); }
.hw-frame p { margin: 0 0 8px; line-height: 1.8; }
.hw-frame p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .hw-frame {
    border-width: 64px;
    border-image-width: 64px;
    border-image-slice: 180 fill;
    padding: 4px 0;
  }
  .hw-frame--purple { border-image-source: url("img/v2/frame/frame-purple-sp.webp"); }
  .hw-frame--orange { border-image-source: url("img/v2/frame/frame-orange-sp.webp"); }
}

/* ---------- c/Divider (full-bleed repeat-x) ---------- */
.hw-div {
  height: 128px;
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: auto 100%;
  pointer-events: none;
}
.hw-div--wave { background-image: url("img/v2/divider/wave-purple-pc.webp"); }
.hw-div--clouds { background-image: url("img/v2/divider/clouds-pc.webp"); }
.hw-div--pumpkins { background-image: url("img/v2/divider/pumpkins-pc.webp"); }
.hw-div--garland {
  background-image: url("img/v2/divider/garland-pc.webp");
  background-position: center top;
  height: 84px;
  position: relative;
  margin-bottom: -84px;
  z-index: 2;
}
@media (max-width: 600px) {
  .hw-div { height: 77px; }
  .hw-div--wave { background-image: url("img/v2/divider/wave-purple-sp.webp"); }
  .hw-div--clouds { background-image: url("img/v2/divider/clouds-sp.webp"); }
  .hw-div--pumpkins { background-image: url("img/v2/divider/pumpkins-sp.webp"); }
  .hw-div--garland {
    background-image: url("img/v2/divider/garland-sp.webp");
    height: 50px;
    margin-bottom: -50px;
  }
}

/* ---------- c/Picture ---------- */
.hw-pict {
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--hw-cream);
}
.hw-pict img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-pict--16x9 { aspect-ratio: 16 / 9; }
.hw-pict--4x3 { aspect-ratio: 4 / 3; }
.hw-pict--1x1 { aspect-ratio: 1 / 1; }
.hw-pict--4x5 { aspect-ratio: 4 / 5; }
.hw-pict--round { border-radius: 50%; }
.hw-pict--r { border-radius: var(--hw-radius-m); }

/* ---------- c/MediaCard ---------- */
.hw-media {
  display: grid;
  gap: var(--hw-space-2);
  color: var(--hw-ink);
  min-width: 0;
}
.hw-media__fig {
  margin: 0;
  border-radius: var(--hw-radius-m);
  overflow: hidden;
  border: 3px solid var(--hw-white);
  box-shadow: 0 8px 0 rgb(0 0 0 / .12);
  background: var(--hw-cream);
}
.hw-media__ttl {
  margin: 0;
  font-family: var(--hw-ff-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--hw-purple-deep);
}
.hw-media__txt { margin: 0; font-size: 14px; line-height: 1.6; }
.hw-media--round { text-align: center; justify-items: center; }
.hw-media--round .hw-media__fig {
  width: min(100%, 200px);
  margin-inline: auto;
  border-radius: 50%;
  border-width: 6px;
  aspect-ratio: 1;
}

/* ---------- c/Deco (v2 assets) ---------- */
.hw-deco-host { position: relative; }
.hw-deco {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  line-height: 0;
}
.hw-deco img { width: 100%; height: auto; display: block; }
.hw-deco--s { width: 48px; }
.hw-deco--m { width: 72px; }
.hw-deco--l { width: 112px; }
.hw-deco--tl { top: 8px; left: 8px; }
.hw-deco--tr { top: 8px; right: 8px; }
.hw-deco--bl { bottom: 8px; left: 8px; }
.hw-deco--br { bottom: 8px; right: 8px; }
@media (max-width: 519px) {
  .hw-deco--l { width: 72px; }
  .hw-deco--m { width: 56px; }
  .hw-deco--hide-sp { display: none; }
}
.hw-deco-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: end;
}
.hw-deco-row img {
  height: 110px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.hw-deco-row img.hw-deco-row__wide { height: 70px; }

.hw-skyline {
  width: 100%;
  height: auto;
  display: block;
  margin-top: var(--hw-space-2);
}

/* ---------- bands ---------- */
.hw-argyle {
  background-color: var(--hw-purple) !important;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 28px, rgb(255 255 255 / .06) 28px 56px),
    repeating-linear-gradient(-45deg, transparent 0 28px, rgb(0 0 0 / .08) 28px 56px) !important;
  background-repeat: repeat !important;
  color: var(--hw-cream);
}
.hw-panel {
  background: var(--hw-white);
  color: var(--hw-ink);
  border-radius: var(--hw-radius-m);
  padding: var(--hw-space-3) var(--hw-space-2);
}

.hw-round {
  width: min(100%, 280px);
  max-width: 100%;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--hw-space-1);
  color: var(--hw-ink);
}
.hw-round .hw-ribbon { margin-top: -14px; z-index: 1; }

.hw-step {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--hw-space-2);
  align-items: start;
  background: var(--hw-white);
  color: var(--hw-ink);
  border-radius: var(--hw-radius-m);
  padding: var(--hw-space-2);
}
.hw-step__n {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--hw-pumpkin);
  display: grid;
  place-items: center;
  font-family: var(--hw-ff-display);
  font-weight: 900;
  font-size: 32px;
  line-height: 1;
  color: var(--hw-purple-deep);
}

.hw-warn {
  background: rgb(58 24 72 / .08);
  border: 2px dashed var(--hw-purple-deep);
  border-radius: var(--hw-radius-m);
  padding: var(--hw-space-2);
  color: var(--hw-ink);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
