* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #05010a;
}
@import url('https://fonts.googleapis.com/css2?family=Kaisei+Tokumin:wght@500;700;800&display=swap');

body {
  min-height: 100vh;
  margin: 0;
  color: #fff7dc;
  font-family: "Kaisei Tokumin", "Yu Mincho", "Hiragino Mincho ProN", serif;
  background:
    radial-gradient(circle at 20% 15%, rgba(137, 58, 255, 0.35), transparent 34%),
    radial-gradient(circle at 80% 5%, rgba(255, 183, 77, 0.18), transparent 26%),
    linear-gradient(145deg, #05010a 0%, #170725 48%, #07020d 100%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(760px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card,
.result-card {
  width: 100%;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid rgba(244, 201, 119, 0.38);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(21, 8, 37, 0.92), rgba(8, 3, 15, 0.96)),
    rgba(0, 0, 0, 0.75);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.eyebrow {
  margin-bottom: 12px;
  color: #f3c96c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 9vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.lead {
  margin: 18px 0 26px;
  color: #dbcdf2;
  font-size: 16px;
  line-height: 1.8;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.action-button {
  min-height: 92px;
  border: 1px solid rgba(255, 222, 139, 0.55);
  border-radius: 20px;
  color: #fff4d2;
  font-size: clamp(22px, 6vw, 34px);
  font-weight: 900;
  letter-spacing: 0.04em;
  background:
    radial-gradient(circle at 30% 0%, rgba(255, 209, 102, 0.26), transparent 38%),
    linear-gradient(145deg, #36124d, #13071f);
  box-shadow: 0 12px 0 #05010a, 0 18px 38px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.action-button:hover {
  transform: translateY(3px);
  box-shadow: 0 9px 0 #05010a, 0 14px 30px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 233, 172, 0.9);
}

.action-button:active {
  transform: translateY(8px);
  box-shadow: 0 4px 0 #05010a, 0 8px 18px rgba(0, 0, 0, 0.4);
}

.mini-note {
  margin: 20px 0 0;
  color: #9f8dbb;
  font-size: 13px;
  text-align: center;
}

.cerberus-line {
  margin: 22px 0 18px;
  padding: 16px 18px;
  border-left: 4px solid #f3c96c;
  border-radius: 14px;
  color: #f5e8ff;
  background: rgba(255, 255, 255, 0.055);
  line-height: 1.75;
}

.rarity-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 4px 0 18px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 230, 156, 0.5);
  color: #fff6dc;
  font-size: 13px;
  font-weight: 900;
  background: rgba(214, 163, 60, 0.16);
}

.rarity-4,
.rarity-5 {
  color: #ffe9fb;
  border-color: rgba(255, 119, 214, 0.58);
  background: rgba(181, 52, 148, 0.22);
}

.item-card {
  margin-top: 10px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
}

.item-image-wrap {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: #0c0614;
}

.item-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-card h2 {
  margin: 18px 0 8px;
  color: #fff4d6;
  font-size: clamp(26px, 7vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.item-note {
  margin: 0 0 18px;
  color: #d9c8ea;
  line-height: 1.7;
}

.main-button,
.sub-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  border-radius: 16px;
  font-weight: 900;
  text-decoration: none;
}

.main-button {
  color: #1b0c05;
  background: linear-gradient(135deg, #ffdb76, #ff8f3d);
  box-shadow: 0 12px 32px rgba(255, 145, 77, 0.22);
}

.sub-button {
  margin-top: 16px;
  color: #fff4d6;
  border: 1px solid rgba(255, 222, 139, 0.35);
  background: rgba(255, 255, 255, 0.07);
}

.debug-box {
  overflow: auto;
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  color: #c8facc;
  background: rgba(0, 0, 0, 0.5);
  font-size: 12px;
}

@media (max-width: 420px) {
  .page-shell {
    padding: 16px 12px;
  }

  .hero-card,
  .result-card {
    border-radius: 24px;
  }

  .action-grid {
    gap: 11px;
  }

  .action-button {
    min-height: 82px;
    border-radius: 18px;
  }
}

/* ===== AIなし版 結果ペEジ調整 ===== */
.result-card-simple {
  text-align: center;
}

.item-card-simple {
  margin-top: 22px;
  padding: 22px 16px;
  background: rgba(255, 255, 255, 0.045);
}

.item-image-wrap-large {
  width: min(70vw, 420px);
  max-width: 100%;
  margin: 0 auto 18px;
  border-radius: 24px;
  border-color: rgba(255, 222, 139, 0.36);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.rarity-stars {
  margin: 6px 0 6px;
  color: #ffdc73;
  font-size: clamp(28px, 8vw, 44px);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 14px rgba(255, 198, 85, 0.28);
}

.rarity-text {
  margin: 0 0 20px;
  color: #e7d8ff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.7;
}

.affiliate-note {
  margin: 14px 0 0;
  color: #a896bd;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 420px) {
  .item-card-simple {
    padding: 18px 12px;
  }

  .item-image-wrap-large {
    width: 72vw;
    border-radius: 20px;
  }
}

/* ===== ケルベロスガチャ TOP / 画像パーチE ===== */
.cerberus-index-body {
  min-height: 100vh;
  margin: 0;
  color: #fff7dc;
  background-color: #050403;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(147, 74, 20, 0.42), transparent 0rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.42)),
    url('/shindan/cerberus/assets/images/background.webp');
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: 100% 48rem, 100% 100%, 540px 540px;
  background-position: top center, center, top center;
  font-family: "Kaisei Tokumin", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

.cerberus-index-shell {
  position: relative;
  width: min(640px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 18px 26px;
  overflow: hidden;
}

.cerberus-index-shell::before,
.cerberus-index-shell::after {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border-radius: 4px;
  opacity: 0.82;
}

.cerberus-index-shell::after {
  inset: 14px;
  border-color: rgba(255, 220, 130, 0.18);
  opacity: 0.55;
}

.cerberus-top-nav {
  position: absolute;
  z-index: 5;
  top: 18px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.cerberus-nav-button {
  pointer-events: auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  color: #f9d889;
  text-decoration: none;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.85);
  border: 2px solid rgba(246, 190, 86, 0.88);
  border-radius: 999px;
  background: radial-gradient(circle at 50% 35%, rgba(47, 31, 16, 0.86), rgba(0, 0, 0, 0.56));
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.72),
    inset 0 0 0 5px rgba(255, 220, 132, 0.30),
    0 0 14px rgba(255, 181, 59, 0.18);
}

.cerberus-nav-icon {
  display: block;
  line-height: 1;
  font-size: 31px;
  transform: translateY(2px);
}

.cerberus-nav-label {
  display: block;
  margin-top: 5px;
  font-family: "Kaisei Tokumin", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.cerberus-nav-button-box .cerberus-nav-icon {
  font-size: 30px;
}

.cerberus-hero,
.cerberus-message,
.cerberus-action-grid,
.cerberus-random-note,
.cerberus-home-panel {
  position: relative;
  z-index: 2;
}

.cerberus-hero img,
.cerberus-message img,
.cerberus-action-card img {
  display: block;
  width: 100%;
  height: auto;
}

.cerberus-message {
  margin: 12px 0 14px;
}

.cerberus-message img {
  border-radius: 22px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
}

.cerberus-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cerberus-action-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.42);
  transform: translateY(0);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.cerberus-action-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.cerberus-action-card:active {
  transform: translateY(3px) scale(0.99);
  filter: brightness(0.96);
}

.cerberus-action-card img {
  border-radius: 18px;
}

.cerberus-random-note {
  margin: 18px 0 2px;
  color: #f5dfaa;
  font-size: clamp(13px, 3.3vw, 16px);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.85);
}

.cerberus-random-note::before,
.cerberus-random-note::after {
  content: "🐾";
  padding: 0 10px;
  color: #a56d26;
  font-size: 0.92em;
}

.cerberus-home-panel {
  margin-top: 96px;
  padding: clamp(24px, 5vw, 42px);
  text-align: center;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.cerberus-sleep-title {
  margin: 0;
  color: #f9df9f;
  font-size: clamp(28px, 8vw, 40px);
  line-height: 1.08;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.74);
}

.cerberus-sleep-lead {
  margin: 18px 0 24px;
  color: #eadbff;
  line-height: 1.8;
}

.cerberus-sleep-image {
  display: block;
  width: min(520px, 100%);
  margin: 0 auto 18px;
}

.cerberus-sleep-placeholder {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin: 20px 0;
  border-radius: 22px;
  color: #f8d98a;
  font-size: 42px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.32);
}

.cerberus-sub-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 8px;
  padding: 0 24px;
  border: 1px solid rgba(255, 222, 139, 0.38);
  border-radius: 999px;
  color: #fff4d6;
  font-weight: 900;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.07);
}

@media (max-width: 560px) {
  .cerberus-index-shell {
    padding: 10px 12px 22px;
  }

  .cerberus-top-nav {
    top: 13px;
    left: 16px;
    right: 16px;
  }

  .cerberus-nav-button {
    width: 64px;
    height: 64px;
    border-width: 1px;
    box-shadow:
      inset 0 0 0 2px rgba(0, 0, 0, 0.72),
      inset 0 0 0 4px rgba(255, 220, 132, 0.24),
      0 0 10px rgba(255, 181, 59, 0.18);
  }

  .cerberus-nav-icon {
    font-size: 24px;
  }

  .cerberus-nav-button-box .cerberus-nav-icon {
    font-size: 23px;
  }

  .cerberus-nav-label {
    margin-top: 3px;
    font-size: 14px;
  }

  .cerberus-hero {
    margin: 8px -5px 10px;
  }

  .cerberus-message {
    margin: 10px 0 12px;
  }

  .cerberus-message img {
    border-radius: 16px;
  }

  .cerberus-action-grid {
    gap: 10px;
  }

  .cerberus-action-card,
  .cerberus-action-card img {
    border-radius: 14px;
  }
}

/* ===== ケルベロスガチャ 結果ペEジ / rarity画像版 ===== */
.cerberus-result-body {
  min-height: 100vh;
  margin: 0;
  color: #fff7dc;
  background-color: #050403;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(147, 74, 20, 0.28), transparent 0rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.44)),
    url('/shindan/cerberus/assets/images/background.webp');
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: 100% 48rem, 100% 100%, 540px 540px;
  background-position: top center, center, top center;
  font-family: "Kaisei Tokumin", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

.cerberus-result-shell {
  width: min(640px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 14px 24px;
}

.cerberus-result-screen {
  width: 100%;
  text-align: center;
}

.cerberus-result-main-image {
  position: relative;
  z-index: 2;
  margin: 0 -14px -3.5%;
  padding: 5% 5% 0 5%;
  pointer-events: none;
}

.cerberus-result-main-image img {
  display: block;
  width: 100%;
  height: auto;
}

.cerberus-loot-panel {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 0 0 18px;
}

.cerberus-item-layer {
  position: relative;
  width: min(100%, 590px);
  aspect-ratio: 1 / 1;
  margin: 0 auto -1.5%;
}

.cerberus-item-back-rarity,
.cerberus-item-frame,
.cerberus-item-photo-box {
  position: absolute;
  display: block;
}

.cerberus-item-back-rarity {
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cerberus-item-photo-box {
  z-index: 2;
  left: 22%;
  top: 22%;
  width: 56%;
  height: 56%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 9px 28px rgba(0, 0, 0, 0.38);
}

.cerberus-item-photo-box img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0%;
  object-fit: contain;
}

.cerberus-item-frame {
  z-index: 3;
  left: 20.85%;
  top: 20.85%;
  width: 58.3%;
  height: 58.3%;
  pointer-events: none;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.45));
}

.cerberus-rarity-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 1.4vw, 10px);
  margin: -15% auto 3%;
  min-height: 46px;
  position: relative;
  z-index:100;
}

.cerberus-rarity-stars img {
  display: block;
  width: clamp(38px, 9.4vw, 62px);
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.72));
}

.cerberus-rarity-message {
  margin: 16px auto 14px;
  color: #f0cbff;
  font-size: clamp(14px, 3.4vw, 18px);
  font-weight: 900;
  line-height: 1.55;
  letter-spacing: 0.06em;
  text-shadow:
    0 0 8px rgba(208, 92, 255, 0.72),
    0 2px 6px rgba(0, 0, 0, 0.92);
  position: relative;
  z-index:100;
}

.cerberus-item-link-button {
  display: block;
  width: min(94%, 590px);
  margin: 2em auto 0 auto;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.cerberus-item-link-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.cerberus-item-link-button:active {
  transform: translateY(2px) scale(0.99);
  filter: brightness(0.95);
}

.cerberus-item-link-button img {
  display: block;
  width: 100%;
  height: auto;
}

.cerberus-result-affiliate-note {
  margin: 0px 0 1em 0;
  color: rgba(235, 218, 255, 0.62);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.cerberus-retry-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70%;
  min-height: 44px;
  margin: 12px auto 0;
  padding: 0 18px;
}

.cerberus-retry-link img{
  width: 100%;
  height: auto;
}

.cerberus-result-empty {
  margin: 96px auto 0;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(244, 201, 119, 0.38);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(21, 8, 37, 0.92), rgba(8, 3, 15, 0.96));
  text-align: center;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.cerberus-result-empty h1 {
  margin: 0;
  color: #f9df9f;
  font-size: clamp(34px, 8vw, 56px);
  line-height: 1.12;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.74);
}

.cerberus-result-empty p {
  margin: 18px 0 8px;
  color: #eadbff;
  line-height: 1.8;
}

@media (max-width: 560px) {
  .cerberus-result-shell {
    padding: 0 8px 20px;
  }

  .cerberus-result-main-image {
    margin: 0 -8px -7.5%;
  }

  .cerberus-item-layer {
    width: min(100%, 460px);
  }

  .cerberus-rarity-message {
    margin-top: 4px;
    margin-bottom: 10px;
  }

  .cerberus-item-link-button {
    width: 96%;
  }
}


/* EƑgbvփ{^ */
.mkz-bottom-nav {
  width: 100%;
  text-align: center;
  margin: 60px auto 24px;
}

.mkz-top-link {
  display: inline-block;
  line-height: 0;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.mkz-top-link img {
  width: 220px !important;
  max-width: 40vw !important;
  height: auto;
  display: block;
}

.mkz-top-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.mkz-top-link:active {
  transform: translateY(1px) scale(0.98);
}

/* X}z */
@media (max-width: 640px) {
  .mkz-bottom-nav {
    margin: 40px auto 20px;
  }

  .mkz-top-link img {
    width: 40vw;
    min-width: 140px;
    max-width: 190px;
  }
}

/* ==============================
   PxXʁFi\
   S[h
   ============================== */

.cerberus-item-layer {
  position: relative;
}

.item-display-name {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 8.5%;
  transform: translateX(-50%);
  width: 86%;
  box-sizing: border-box;
  pointer-events: none;

  text-align: center;
  font-size: clamp(16px, 4.2vw, 31px);
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0.04em;

  /* ۂOf[V */
  color: #dfaf37;
  background: linear-gradient(
  180deg,
  #fff0b0 0%,
  #f2c45a 16%,
  #c8841f 34%,
  #7a3d08 48%,
  #e1a33a 58%,
  #9a570e 76%,
  #4a2105 100%
);
  -webkit-background-clip: text;
  background-clip: text;
  /* -webkit-text-fill-color: transparent; */

  /* ӂ */
  -webkit-text-stroke: 6px #2f0844;
  paint-order: stroke fill;

  /* ̊Ewi΍ */
text-shadow:
  0 1px 0 rgba(255, 232, 160, 0.75),
  0 -1px 0 rgba(40, 15, 2, 0.95),
  1px 1px 0 rgba(35, 12, 2, 0.95),
  -1px 1px 0 rgba(35, 12, 2, 0.95),
  0 3px 5px rgba(0, 0, 0, 0.95),
  0 0 7px rgba(210, 120, 20, 0.50),
  0 0 12px rgba(120, 45, 180, 0.22);
}

.item-display-name::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 52%;
  width: 112%;
  height: 145%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background:
    radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0.28) 48%,
      rgba(0, 0, 0, 0) 78%
    );
  filter: blur(7px);
}

@media (max-width: 480px) {
  .item-display-name {
    top: 10%;
    width: 88%;
    font-size: clamp(15px, 4.4vw, 23px);
    -webkit-text-stroke: 1.25px #3a1b08;
  }
}