:root {
  --ink: #352515;
  --muted: #7c694d;
  --paper: #f7ecd2;
  --paper-2: #fff8e8;
  --paper-3: #ead6ad;
  --line: rgba(85, 57, 28, 0.22);
  --teal: #2f8f8a;
  --teal-dark: #176560;
  --gold: #b88528;
  --red: #c75539;
  --shadow: rgba(59, 38, 18, 0.20);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.9), transparent 22rem),
    radial-gradient(circle at 85% 10%, rgba(47, 143, 138, 0.14), transparent 30rem),
    linear-gradient(rgba(88, 62, 33, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 62, 33, 0.035) 1px, transparent 1px),
    #f1dfbc;
  background-size: auto, auto, 30px 30px, 30px 30px, auto;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.site-shell {
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px 12px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.lead {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

.x-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 16px 8px 9px;
  border: 1px solid rgba(53, 37, 21, 0.12);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 248, 232, 0.92);
  box-shadow: 0 12px 26px rgba(59, 38, 18, 0.16);
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.x-contact-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: #101010;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.book-badge {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 2px solid rgba(53, 37, 21, 0.18);
  border-radius: 22px;
  color: #fff8e8;
  background: linear-gradient(145deg, var(--teal), var(--teal-dark));
  font-weight: 900;
  box-shadow: 0 16px 30px var(--shadow);
  transform: rotate(4deg);
}

.control-panel {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px;
  gap: 12px;
  margin: 0 0 12px;
  padding: 14px;
  border: 2px solid rgba(53, 37, 21, 0.12);
  border-radius: 20px;
  background: rgba(255, 248, 232, 0.9);
  box-shadow: 0 12px 30px var(--shadow);
  backdrop-filter: blur(14px);
}

.search-box,
.select-box {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.search-box {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 58px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-2);
}

.search-box span {
  color: var(--teal-dark);
}

.search-box input {
  min-width: 0;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 17px;
  font-weight: 800;
}

.search-box button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  color: #fff8e8;
  background: var(--teal);
  font-size: 24px;
  font-weight: 900;
}

.select-box select {
  width: 100%;
  min-height: 58px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper-2);
  font-weight: 900;
  outline: none;
}

.fee-notice {
  margin: 0 4px 16px;
  padding: 11px 14px;
  border: 2px dashed rgba(199, 85, 57, 0.45);
  border-radius: 14px;
  color: var(--red);
  background: rgba(255, 248, 232, 0.72);
  font-weight: 900;
  line-height: 1.55;
}

.book-wrap {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.price-tabs {
  position: sticky;
  top: 106px;
  z-index: 4;
  display: grid;
  gap: 8px;
  padding: 18px 0;
}

.price-tabs button {
  min-height: 45px;
  margin-right: -18px;
  padding: 0 18px 0 12px;
  border: 1px solid rgba(53, 37, 21, 0.16);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  color: #fff8e8;
  background: linear-gradient(145deg, #8a7454, #6e5537);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(59, 38, 18, 0.16);
}

.price-tabs button:nth-child(2n) {
  background: linear-gradient(145deg, #3e9f96, #1b6e69);
}

.price-tabs button:nth-child(3n) {
  background: linear-gradient(145deg, #d49b36, #a36c1d);
}

.price-tabs button.active {
  transform: translateX(5px);
  filter: saturate(1.1);
  box-shadow: 0 10px 22px rgba(59, 38, 18, 0.22);
}

.album {
  min-width: 0;
  padding: 16px;
  border: 2px solid rgba(53, 37, 21, 0.16);
  border-radius: 24px;
  background: linear-gradient(145deg, #6d5234, #2c4e4c);
  box-shadow: 0 18px 48px var(--shadow);
}

.album-top,
.album-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff8e8;
}

.album-top {
  margin-bottom: 12px;
}

.album-bottom {
  margin-top: 12px;
}

.summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 248, 232, 0.82);
  text-align: center;
  font-weight: 800;
}

.summary strong {
  color: #fff;
  font-size: 24px;
}

.page-button,
.text-button {
  border: 1px solid rgba(255, 248, 232, 0.36);
  color: #fff8e8;
  background: rgba(255, 248, 232, 0.13);
  font-weight: 900;
}

.page-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 34px;
  line-height: 1;
}

.text-button {
  min-width: 82px;
  min-height: 42px;
  border-radius: 999px;
}

#pageStatus {
  min-width: 82px;
  text-align: center;
  font-weight: 900;
}

.book {
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(45, 32, 19, 0.28);
  border-radius: 20px;
  background: #765635;
  box-shadow: inset 0 0 0 4px rgba(255, 248, 232, 0.14);
}

.album-track {
  display: flex;
  transition: transform 280ms ease;
}

.spread {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  flex: 0 0 100%;
  min-width: 100%;
}

.spread::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 28px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle, rgba(96, 67, 39, 0.78) 0 4px, transparent 5px) center 13% / 18px 72px repeat-y,
    linear-gradient(90deg, rgba(53, 37, 21, 0.16), rgba(255, 255, 255, 0.2), rgba(53, 37, 21, 0.16));
  pointer-events: none;
}

.book-page {
  min-height: 650px;
  padding: 26px 30px 20px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.62), transparent 16rem),
    linear-gradient(rgba(94, 63, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 63, 31, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 24px 24px, 24px 24px, auto;
}

.book-page.left {
  border-right: 1px solid rgba(80, 54, 27, 0.18);
  box-shadow: inset -18px 0 26px rgba(92, 63, 35, 0.12);
}

.book-page.right {
  box-shadow: inset 18px 0 26px rgba(92, 63, 35, 0.12);
}

.page-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 900;
}

.page-head {
  margin-bottom: 18px;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.sticker-card {
  position: relative;
  display: grid;
  gap: 7px;
  justify-items: center;
  min-width: 0;
  min-height: 180px;
  padding: 18px 10px 12px;
  border: 1px solid rgba(88, 60, 31, 0.18);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 248, 232, 0.86);
  box-shadow: 0 9px 18px rgba(96, 64, 31, 0.13);
}

.sticker-card:active {
  transform: translateY(1px);
}

.tape {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 42px;
  height: 18px;
  border-radius: 3px;
  background: rgba(197, 159, 93, 0.45);
  transform: translateX(-50%) rotate(-4deg);
}

.skin-images.card {
  position: relative;
  width: min(92px, 78%);
  height: 86px;
}

.skin-images.card img,
.skin-placeholder {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  border: 3px solid #fff8e8;
  border-radius: 50%;
  object-fit: contain;
  background: #e6d1a8;
  box-shadow: 0 8px 14px rgba(59, 38, 18, 0.22);
}

.skin-images.card[data-count="1"] img,
.skin-placeholder {
  transform: translate(-50%, -50%);
}

.skin-images.card[data-count="2"] img:nth-child(1) {
  transform: translate(-72%, -50%) rotate(-7deg);
}

.skin-images.card[data-count="2"] img:nth-child(2) {
  transform: translate(-28%, -50%) rotate(7deg);
}

.skin-images.card[data-count="3"] img:nth-child(1),
.skin-images.card[data-count="4"] img:nth-child(1) {
  transform: translate(-84%, -50%) rotate(-9deg);
}

.skin-images.card[data-count="3"] img:nth-child(2),
.skin-images.card[data-count="4"] img:nth-child(2) {
  transform: translate(-50%, -58%);
}

.skin-images.card[data-count="3"] img:nth-child(3),
.skin-images.card[data-count="4"] img:nth-child(3) {
  transform: translate(-16%, -50%) rotate(9deg);
}

.skin-images.card[data-count="4"] img:nth-child(4) {
  transform: translate(-50%, -22%) scale(0.72);
}

.skin-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  color: #fff8e8;
  background: linear-gradient(145deg, var(--teal), #7a61a8);
  font-size: 28px;
  font-weight: 900;
}

.sticker-card strong {
  width: 100%;
  min-height: 32px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.sticker-price {
  padding: 5px 11px;
  border-radius: 999px;
  color: #fff8e8;
  background: linear-gradient(145deg, #bd8c36, #92611e);
  font-size: 13px;
  font-weight: 900;
}

.empty-page {
  grid-column: 1 / -1;
  display: grid;
  min-height: 360px;
  place-items: center;
  border: 2px dashed rgba(80, 54, 27, 0.2);
  border-radius: 16px;
  color: var(--muted);
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(42, 27, 14, 0.56);
  backdrop-filter: blur(8px);
}

.detail-card {
  position: relative;
  width: min(420px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  padding: 26px;
  border: 3px solid rgba(66, 45, 24, 0.32);
  border-radius: 22px;
  color: var(--ink);
  background:
    linear-gradient(rgba(94, 63, 31, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 63, 31, 0.04) 1px, transparent 1px),
    var(--paper-2);
  background-size: 22px 22px, 22px 22px, auto;
  box-shadow: 0 22px 60px rgba(39, 25, 13, 0.34);
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(53, 37, 21, 0.08);
  font-size: 28px;
  font-weight: 900;
}

.detail-kicker {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff8e8;
  background: var(--teal);
  font-weight: 900;
}

.detail-images {
  display: grid;
  place-items: center;
  min-height: 140px;
  margin: 0 0 16px;
}

.skin-images.detail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.skin-images.detail img {
  width: 108px;
  height: 108px;
  border: 4px solid #fff8e8;
  border-radius: 50%;
  object-fit: contain;
  background: #e6d1a8;
  box-shadow: 0 8px 18px rgba(59, 38, 18, 0.22);
}

.detail-card h2 {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.detail-price {
  width: fit-content;
  margin-bottom: 20px;
  padding: 9px 18px;
  border: 2px solid rgba(199, 85, 57, 0.28);
  border-radius: 14px;
  color: var(--red);
  background: rgba(199, 85, 57, 0.08);
  font-size: 28px;
  font-weight: 900;
}

.detail-card h3 {
  margin: 18px 0 10px;
  color: var(--teal-dark);
  font-size: 15px;
}

.skin-name-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 24px;
  font-weight: 900;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid rgba(47, 143, 138, 0.22);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(47, 143, 138, 0.08);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.note,
.muted {
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 920px) {
  .book-wrap {
    grid-template-columns: 1fr;
  }

  .price-tabs {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 2px 12px;
  }

  .price-tabs button {
    flex: 0 0 auto;
    min-width: 82px;
    margin-right: 0;
    padding: 0 13px;
    border: 1px solid rgba(53, 37, 21, 0.16);
    border-radius: 999px;
  }

  .price-tabs button.active {
    transform: translateY(-2px);
  }
}

@media (max-width: 720px) {
  .site-shell {
    padding: 10px;
  }

  .site-header {
    align-items: flex-start;
    padding: 12px 4px;
  }

  .header-actions {
    gap: 8px;
  }

  .x-contact {
    min-height: 44px;
    padding: 6px 10px 6px 7px;
    font-size: 13px;
  }

  .x-contact-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 20px;
  }

  .book-badge {
    display: none;
  }

  .control-panel {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px;
    border-radius: 16px;
  }

  .search-box,
  .select-box select {
    min-height: 50px;
  }

  .fee-notice {
    margin-inline: 0;
    font-size: 14px;
  }

  .album {
    padding: 9px;
    border-radius: 18px;
  }

  .album-top {
    gap: 8px;
  }

  .page-button {
    width: 40px;
    height: 40px;
  }

  .spread {
    grid-template-columns: 1fr;
  }

  .spread::after {
    display: none;
  }

  .book-page {
    min-height: 560px;
    padding: 20px 16px 16px;
  }

  .sticker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }

  .sticker-card {
    min-height: 158px;
    padding: 16px 8px 10px;
  }

  .skin-images.card {
    width: min(84px, 82%);
    height: 78px;
  }

  .skin-images.card img,
  .skin-placeholder {
    width: 68px;
    height: 68px;
  }

  .sticker-card strong {
    font-size: 12px;
  }

  .detail-card {
    padding: 22px 18px;
  }
}

@media (min-width: 1200px) {
  .book-page {
    min-height: 700px;
  }

  .sticker-card {
    min-height: 194px;
  }
}
