/* ───────── Graphic & Brand Design 作品頁：沿用 VM 頁的樣式，這裡只放作品牆 ───────── */

/* 開場：三張作品拼成一列 */
.mosaic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.mosaic img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.mosaic > :first-child { grid-column: 1 / -1; }
.mosaic > :first-child img { aspect-ratio: 16 / 9; }

@media (min-width: 720px) {
  .mosaic { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .mosaic > :first-child { grid-column: auto; }
  .mosaic img,
  .mosaic > :first-child img { aspect-ratio: auto; height: 300px; }
}

/* 作品牆 */
.gal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
}

@media (min-width: 720px) {
  .gal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gal--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gal--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.gal--wide { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 720px) {
  .gal--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.gal figure { min-width: 0; }

.gal img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #f6f5f2;
  box-shadow: 0 8px 22px rgba(17, 17, 19, .08), 0 0 0 1px var(--line);
  cursor: zoom-in;
}

.gal figcaption {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.45;
}

.gal figcaption b {
  display: block;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 650;
}

/* 同一組作品裡，長寬比不一的圖對齊上緣 */
.gal--top { align-items: start; }

/* 每一區的小標 */
.group + .group { margin-top: 36px; }

.group__title {
  position: relative;
  margin-bottom: 14px;
  padding-left: 14px;
  font-size: 19px;
  font-weight: 700;
}

.group__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .25em;
  bottom: .25em;
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
}

.group__lead {
  max-width: 40em;
  margin: -6px 0 16px;
  color: var(--text-2);
  font-size: 15px;
}

/* LINE 貼圖：淺底單張大圖 */
.sticker img { border-radius: 16px; }

/* LINE 表情貼與貼圖：各一張節錄圖，下面接 LINE STORE 連結 */
.linesets {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

@media (min-width: 720px) {
  .linesets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.lineset img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(17, 17, 19, .08), 0 0 0 1px var(--line);
  cursor: zoom-in;
}

.lineset figcaption {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 13.5px;
}

.lineset figcaption b {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.linkout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 15px;
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s;
}

.linkout:hover { background: var(--surface-2); }
.linkout .icon:last-child { color: var(--text-3); }

/* 翻頁書：淺灰底板上放一本書，下面是翻頁按鈕與頁碼 */
.books {
  display: grid;
  gap: 40px;
}

.books + .group { margin-top: 40px; }

.book { min-width: 0; }

.book__frame {
  padding: 24px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.book__stage {
  max-width: 760px;
  margin: 0 auto;
}

.book__poster {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 520px;
  margin: 0 auto;
  box-shadow: 0 10px 26px rgba(17, 17, 19, .14);
}

.book__page { background: #fff; }

.book__page img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.book.is-ready .stf__parent { margin: 0 auto; }

.book__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}

.book__btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2);
  cursor: pointer;
  transition: background-color .15s;
}

.book__btn:hover { background: var(--surface-2); }

.book__btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.book__count {
  min-width: 4.5em;
  color: var(--text-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.book figcaption {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 13.5px;
  text-align: center;
}

.book figcaption b {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

/* 套件載不到時：左右滑動的頁面列 */
.book__stage--strip {
  display: flex;
  gap: 8px;
  max-width: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.book__stage--strip img {
  flex: none;
  width: auto;
  height: 420px;
  scroll-snap-align: start;
}

@media (max-width: 719px) {
  .book__frame { padding: 16px 10px; }
  .book__poster { max-height: 440px; }
}

/* 兌換券示意圖：正面、背面並排（手機上下），編號對應下方說明 */
.vdiag {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

@media (min-width: 720px) {
  .vdiag { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.vdiag__side svg { display: block; width: 100%; height: auto; }

.vdiag__side figcaption {
  margin-top: 4px;
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .1em;
  text-align: center;
}

.vd-card { fill: #fff; stroke: rgba(17, 17, 19, .16); stroke-width: 2; }
.vd-photo { fill: #efe8dc; }
.vd-icon { fill: none; stroke: rgba(154, 119, 70, .85); stroke-width: 3; stroke-linejoin: round; }
.vd-band { fill: #3b332b; }
.vd-roundel { fill: #efe3c4; }
.vd-roundel-in { fill: none; stroke: #9a7746; stroke-width: 2; stroke-dasharray: 2 5; }
.vd-bar-l { fill: rgba(255, 255, 255, .55); }
.vd-bar-w { fill: rgba(255, 255, 255, .92); }
.vd-tl { fill: rgba(255, 255, 255, .7); font-size: 15px; }
.vd-frame { fill: none; stroke: #3b332b; stroke-width: 4; }
.vd-logo { fill: #f6f5f2; stroke: rgba(17, 17, 19, .2); }
.vd-line { fill: rgba(17, 17, 19, .14); }
.vd-pill { fill: none; stroke: #3b332b; stroke-width: 2; }
.vd-rule { stroke: rgba(17, 17, 19, .5); stroke-width: 1.5; }
.vd-code { fill: #fff; stroke: rgba(17, 17, 19, .45); stroke-width: 1.5; stroke-dasharray: 6 5; }
.vd-t { fill: #1b1b1e; font-size: 19px; font-weight: 700; }
.vd-ts { fill: #4a4540; font-size: 15px; font-weight: 600; }
.vd-n circle { fill: #9a7746; stroke: #fff; stroke-width: 3; }
.vd-n text { fill: #fff; font-size: 16px; font-weight: 700; }

.vdiag__notes {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  counter-reset: vd;
}

@media (min-width: 720px) {
  .vdiag__notes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
}

.vdiag__notes li {
  position: relative;
  padding-left: 32px;
  color: var(--text-2);
  font-size: 14.5px;
  counter-increment: vd;
}

.vdiag__notes li::before {
  content: counter(vd);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.vdiag__notes b { color: var(--text); font-weight: 650; }

/* 同一版型的三種用途 */
.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.topics li {
  padding: 6px 13px;
  border-radius: 999px;
  color: #2a2520;
  background: linear-gradient(165deg, #fbf9f5, #f3eee5);
  box-shadow: inset 0 0 0 1px rgba(154, 119, 70, .22);
  font-size: 14px;
}

/* 品牌類型：先說明不限類型，再列出設計過的類別 */
.facts__note {
  margin-bottom: 10px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
}

/* ───────── 翻頁書：更有質感的展示 ───────── */
.book__frame {
  position: relative;
  padding: 40px 24px 32px;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% 0%, #fbf8f2 0%, rgba(251, 248, 242, 0) 60%),
    linear-gradient(180deg, #f3ece0 0%, #e7dccb 100%);
  box-shadow: inset 0 0 0 1px rgba(154, 119, 70, .16);
}

/* 書下方的投影 */
.book.is-ready .book__frame::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 22px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(60, 42, 18, .28), transparent);
  filter: blur(4px);
  pointer-events: none;
}

.book .stf__block { filter: drop-shadow(0 14px 22px rgba(60, 42, 18, .22)); }

/* 跨頁中間的書溝陰影 */
.book[data-orientation="landscape"] .stf__block::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 20;
  width: 9%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .14) 45%, rgba(0, 0, 0, .22) 50%, rgba(255, 255, 255, .12) 53%, transparent);
  pointer-events: none;
}

.book__stage { max-width: 880px; }

.book__bar {
  width: fit-content;
  margin: 14px auto 0;
  padding: 4px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(17, 17, 19, .08), inset 0 0 0 1px var(--line);
}

.book__btn { width: 36px; height: 36px; background: var(--surface); box-shadow: none; }
.book__btn:hover { background: var(--surface-2); }

.book__count { min-width: 6em; font-weight: 600; color: var(--text); }

/* 頁面縮圖列 */
.book__thumbs {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  padding: 4px 2px 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.book__thumbs:empty { display: none; }

.book__thumb {
  flex: none;
  width: 44px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #fff;
  opacity: .55;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line);
  transition: opacity .15s, box-shadow .15s, transform .15s;
}

.book__thumb img { display: block; width: 100%; height: auto; border-radius: 4px; }
.book__thumb:hover { opacity: .9; }
.book__thumb.is-on { opacity: 1; box-shadow: 0 0 0 2px var(--accent); transform: translateY(-2px); }

@media (min-width: 720px) {
  .book__thumbs { justify-content: center; }
}

.book__hint {
  margin: -8px 0 18px;
  color: var(--text-3);
  font-size: 13px;
}

@media (max-width: 719px) {
  .book__frame { padding: 24px 10px 22px; }
}

/* 髮品產品型錄：直式長圖，放大成兩欄寬，置中排在最後一列 */
.gal .fig--wide { grid-column: 1 / -1; }

@media (min-width: 720px) {
  .gal--4 .fig--wide { grid-column: 2 / span 2; }
}
