/* This reference gallery is a page-only viewing preference. */
body[data-character="female3"] .portrait-button-copy {
  display: grid;
  gap: 4px;
  text-align: left;
}
body[data-character="female3"] .portrait-mood {
  max-width: 164px;
  color: #c4dbee;
  font-size: 11px;
  line-height: 1.65;
  letter-spacing: .02em;
}
.design-gallery-button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  margin-top: 10px;
  padding: 9px 15px;
  border: 1px solid #a9c5d773;
  border-radius: 8px;
  color: #e5f2fa;
  background: linear-gradient(135deg, #4b70845c, #294a635c);
  font: inherit;
  font-size: 12px;
  letter-spacing: .05em;
  cursor: pointer;
  touch-action: manipulation;
}
.design-gallery-button[hidden], .design-gallery-dialog [hidden], .portrait-mood[hidden] { display: none !important; }
.design-gallery-button:hover:not(:disabled) { border-color: #cee6f3; background: #638da355; }
.design-gallery-button:disabled { opacity: .5; cursor: default; }
.design-gallery-dialog {
  box-sizing: border-box;
  width: min(960px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #b4cad8;
  border-radius: 16px;
  color: #304c61;
  background: #edf3f6;
  box-shadow: 0 22px 90px #03111db3;
}
.design-gallery-dialog::backdrop { background: #061421b8; backdrop-filter: blur(7px); }
.design-gallery-heading {
  position: relative;
  padding: 22px 68px 17px 24px;
  border-bottom: 1px solid #a9c1d15c;
  background: linear-gradient(115deg, #f8fbfd, #e4edf4);
}
.design-gallery-heading .eyebrow { color: #647e91; font-size: 10px; }
.design-gallery-heading h2 { margin: 5px 0 7px; color: #304b60; font-size: 23px; letter-spacing: .06em; }
.design-gallery-heading p { margin: 0; color: #5b7180; font-size: 12px; line-height: 1.75; }
.design-gallery-close {
  position: absolute;
  top: 19px;
  right: 19px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #b1c5d1;
  border-radius: 50%;
  color: #466075;
  background: #ffffff9e;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.design-gallery-close:hover { background: #fff; border-color: #668fa9; }
.design-gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 12px 16px;
}
.design-gallery-tabs button {
  min-width: 90px;
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #597084;
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.design-gallery-tabs button[aria-selected="true"] {
  border-color: #95b1c3;
  color: #264d67;
  background: #dce9f1;
  box-shadow: inset 0 1px 0 #ffffffb8;
}
.design-gallery-tabs button:hover { background: #e0eaf1; }
.design-gallery-panel {
  height: clamp(240px, 57dvh, 650px);
  margin: 0 18px;
  overflow: auto;
  border: 1px solid #b4c8d477;
  border-radius: 10px;
  background: #f9fbfd;
}
.design-gallery-panel figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 10px 10px 0;
}
.design-gallery-panel img {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  max-height: calc(100% - 38px);
  object-fit: contain;
}
.design-gallery-panel figcaption {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100%;
  padding: 9px 0;
  color: #60778b;
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
}
.design-gallery-zoomed .design-gallery-panel figure { display: block; width: max-content; height: auto; padding: 10px; }
.design-gallery-zoomed .design-gallery-panel img { width: auto; height: auto; max-width: none; max-height: none; }
.design-gallery-zoomed .design-gallery-panel figcaption { text-align: left; }
.design-gallery-status { margin: 12px 24px 0; color: #597084; font-size: 12px; line-height: 1.7; }
.design-gallery-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 14px;
  padding: 14px 22px 17px;
  color: #617b8d;
  font-size: 11px;
  line-height: 1.7;
}
.design-gallery-footer > span { flex: 1 1 320px; }
.design-gallery-footer a, .design-gallery-footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid #a6bfce;
  border-radius: 7px;
  color: #3c647f;
  background: #f9fcfe;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.design-gallery-footer button:disabled { opacity: .45; cursor: default; }
.design-gallery-button:focus-visible, .design-gallery-dialog :focus-visible { outline: 3px solid #609cc0; outline-offset: 3px; }
@media (max-width: 600px) {
  .design-gallery-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .design-gallery-heading { padding: 17px 60px 13px 17px; }
  .design-gallery-heading h2 { font-size: 20px; }
  .design-gallery-close { top: 14px; right: 12px; }
  .design-gallery-tabs { gap: 4px; padding: 10px; }
  .design-gallery-tabs button { flex: 1 1 0; min-width: 0; padding: 8px; }
  .design-gallery-panel { height: clamp(220px, 52dvh, 540px); margin: 0 10px; }
  .design-gallery-panel figure { padding: 6px 6px 0; }
  .design-gallery-panel figcaption { font-size: 10px; }
  .design-gallery-footer { padding: 10px 16px 14px; }
}

/* v25：多張圖的分頁（全身四套、八方向、半身近景、近景）排成格子 */
.design-gallery-panel.design-gallery-grid { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; padding: 10px; }
.design-gallery-panel.design-gallery-grid figure { flex: 1 1 150px; max-width: 230px; height: auto; padding: 0; }
.design-gallery-panel.design-gallery-grid img { width: 100%; max-height: 300px; aspect-ratio: 2 / 3; background: #e4edf4; border-radius: 8px; }
.design-gallery-panel.design-gallery-grid figcaption { padding: 4px 0 6px; }
.design-gallery-gridcaption { flex-basis: 100%; margin: 2px 0 0; color: #60778b; font-size: 11px; line-height: 1.7; text-align: center; }
.design-gallery-zoomed .design-gallery-panel.design-gallery-grid { display: block; }
.design-gallery-zoomed .design-gallery-panel.design-gallery-grid figure { max-width: none; width: max-content; }
.design-gallery-zoomed .design-gallery-panel.design-gallery-grid img { width: auto; max-height: none; aspect-ratio: auto; }

/* v40：分頁多（雪鈴 15 個）時換行——原本不換行又置中，最前面的「臉部」「全身六套」會被推出對話框外點不到 */
.design-gallery-tabs { flex-wrap: wrap; row-gap: 4px; }
.design-gallery-tabs button { min-width: 72px; min-height: 36px; padding: 6px 12px; }
@media (max-width: 600px) {
  .design-gallery-tabs button { flex: 1 1 auto; min-width: 64px; padding: 6px 8px; }
}
