:root {
  --gallery-canvas: #f4eddf;
  --gallery-paper: #fffaf0;
  --gallery-paper-deep: #eee3cf;
  --gallery-ink: #2d2a43;
  --gallery-body: #4c4655;
  --gallery-muted: #837a78;
  --gallery-line: #d8cbb3;
  --gallery-gold: #b98b4b;
  --gallery-gold-deep: #8b6334;
  --gallery-blue: #4b6f9d;
  --gallery-blue-soft: #e7edf4;
  --gallery-shadow: rgba(77, 57, 34, .16);
}

.gallery-page {
  min-width: 320px;
  color: var(--gallery-body);
  background-color: var(--gallery-canvas) !important;
  background-image:
    radial-gradient(circle at 12% 12%, rgba(185, 139, 75, .08) 0 1px, transparent 1.5px),
    radial-gradient(circle at 84% 72%, rgba(75, 111, 157, .06) 0 1px, transparent 1.5px),
    linear-gradient(90deg, rgba(255, 255, 255, .25), transparent 14%, transparent 86%, rgba(107, 78, 40, .05));
  background-size: 23px 23px, 31px 31px, 100% 100%;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

.gallery-page::before,
.gallery-page::after {
  position: fixed;
  z-index: 0;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(185, 139, 75, .13);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.gallery-page::before {
  top: 180px;
  left: -230px;
}

.gallery-page::after {
  right: -235px;
  bottom: 110px;
  border-color: rgba(75, 111, 157, .11);
}

.gallery-page > * {
  position: relative;
  z-index: 1;
}

.gallery-page > header {
  border-color: var(--gallery-line) !important;
  background: rgba(255, 250, 240, .9) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8), 0 9px 24px rgba(77, 57, 34, .06);
}

.gallery-page > header .max-w-5xl {
  max-width: 1180px;
  min-height: 64px;
}

.gallery-page > header h1 {
  color: var(--gallery-ink) !important;
  font-family: Georgia, "Songti SC", serif;
  font-weight: 600 !important;
  letter-spacing: .01em;
}

.gallery-page > header p {
  color: var(--gallery-muted) !important;
}

.gallery-page > header .text-2xl {
  filter: sepia(.42) saturate(.72);
}

.gallery-page > header a[href="index.html"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 38px;
  border: 1px solid var(--gallery-gold) !important;
  border-radius: 999px !important;
  color: var(--gallery-gold-deep) !important;
  background: rgba(255, 250, 240, .88) !important;
  box-shadow: 0 4px 12px rgba(139, 99, 52, .1);
}

.gallery-page > header a[href="index.html"]:hover {
  color: var(--gallery-ink) !important;
  background: var(--gallery-paper-deep) !important;
}

.gallery-page > header button {
  color: var(--gallery-ink) !important;
}

.gallery-page > header button:hover {
  background: var(--gallery-paper-deep) !important;
}

.gallery-page > section:first-of-type {
  max-width: 1180px;
  padding-top: 28px !important;
  padding-bottom: 25px !important;
}

.gallery-page > section:first-of-type .text-center {
  position: relative;
  padding: 13px 70px 3px;
}

.gallery-page > section:first-of-type .text-center::before,
.gallery-page > section:first-of-type .text-center::after {
  position: absolute;
  top: 25px;
  width: 24%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gallery-gold));
  content: "";
}

.gallery-page > section:first-of-type .text-center::before {
  left: 0;
}

.gallery-page > section:first-of-type .text-center::after {
  right: 0;
  transform: scaleX(-1);
}

.gallery-page > section:first-of-type .inline-flex {
  position: relative;
  z-index: 1;
  padding: 0 14px;
  background: var(--gallery-canvas);
}

.gallery-page > section:first-of-type .inline-flex > span {
  border: 1px solid var(--gallery-line);
  border-radius: 999px !important;
  color: var(--gallery-ink) !important;
  background: rgba(255, 250, 240, .72) !important;
}

.gallery-page > section:first-of-type .inline-flex > span:nth-child(2) {
  color: var(--gallery-blue) !important;
  background: var(--gallery-blue-soft) !important;
}

.gallery-page > section:first-of-type p {
  color: var(--gallery-muted) !important;
}

.gallery-page > section:first-of-type p a {
  color: var(--gallery-blue) !important;
  text-decoration-color: var(--gallery-gold) !important;
}

.gallery-page > section:first-of-type p strong {
  color: var(--gallery-gold-deep);
}

.gallery-page section[aria-labelledby="quiz-title"] {
  position: relative;
  max-width: 1180px;
  padding-bottom: 30px !important;
}

.gallery-page section[aria-labelledby="quiz-title"] > div:first-child {
  border-color: var(--gallery-line) !important;
}

.gallery-page section[aria-labelledby="quiz-title"] > div:first-child::before {
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 12px;
  background: var(--gallery-gold);
  content: "";
}

.gallery-page #quiz-title {
  color: var(--gallery-ink) !important;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(1.45rem, 3vw, 2.2rem) !important;
  letter-spacing: .01em;
}

.gallery-page section[aria-labelledby="quiz-title"] .text-emerald-700,
.gallery-page section[aria-labelledby="quiz-title"] .text-emerald-400 {
  color: var(--gallery-gold-deep) !important;
}

.gallery-page #quiz-progress-text {
  color: var(--gallery-blue) !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}

.gallery-page section[aria-labelledby="quiz-title"] [role="progressbar"] {
  height: 7px !important;
  border: 1px solid rgba(185, 139, 75, .22);
  border-radius: 999px !important;
  background: rgba(216, 203, 179, .65) !important;
}

.gallery-page #quiz-progress-bar {
  background: var(--gallery-blue) !important;
}

.gallery-page #quiz-content {
  margin-top: 22px !important;
}

.gallery-page .quiz-question {
  position: relative;
  overflow: hidden;
  padding: 29px 34px 33px;
  border: 1px solid var(--gallery-line);
  border-radius: 4px;
  background: var(--gallery-paper);
  box-shadow: 0 12px 28px var(--gallery-shadow), inset 0 0 0 5px rgba(255, 255, 255, .42);
}

.gallery-page .quiz-question::before,
.gallery-page .quiz-question::after {
  position: absolute;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(185, 139, 75, .34);
  content: "";
  pointer-events: none;
}

.gallery-page .quiz-question::before {
  top: 15px;
  left: 15px;
  border-right: 0;
  border-bottom: 0;
}

.gallery-page .quiz-question::after {
  right: 15px;
  bottom: 15px;
  border-top: 0;
  border-left: 0;
}

.gallery-page .quiz-question > .flex {
  position: relative;
  z-index: 1;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(216, 203, 179, .72);
}

.gallery-page .quiz-question > .flex p {
  color: var(--gallery-gold-deep) !important;
  font-family: Georgia, "Songti SC", serif;
  font-size: .8rem !important;
  letter-spacing: .04em;
}

.gallery-page .quiz-question > .flex span {
  color: var(--gallery-muted) !important;
}

.gallery-page .quiz-question h3 {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin-top: 26px !important;
  color: var(--gallery-ink) !important;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem) !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
}

.gallery-page .quiz-question fieldset {
  position: relative;
  z-index: 1;
  margin-top: 27px !important;
}

.gallery-page .quiz-option {
  position: relative;
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr);
  min-height: 58px;
  align-items: center;
  padding: 11px 18px 11px 16px;
  border: 1px solid rgba(216, 203, 179, .95);
  border-radius: 8px;
  color: var(--gallery-body);
  background: rgba(255, 253, 246, .92);
  box-shadow: 0 5px 12px rgba(77, 57, 34, .08);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.gallery-page .quiz-option + .quiz-option {
  margin-top: 10px;
}

.gallery-page .quiz-option:hover {
  border-color: rgba(75, 111, 157, .58);
  transform: translateY(-1px);
  box-shadow: 0 8px 17px rgba(77, 57, 34, .12);
}

.gallery-page .quiz-option:has(input:checked) {
  border-color: var(--gallery-gold);
  background: #f7edd9 !important;
  box-shadow: 0 8px 18px rgba(185, 139, 75, .18);
}

.gallery-page .quiz-option:focus-within {
  outline: 3px solid rgba(75, 111, 157, .24);
  outline-offset: 3px;
}

.gallery-page .quiz-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.gallery-page .quiz-option-key {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--gallery-blue);
  border: 1px solid rgba(75, 111, 157, .35);
  border-radius: 50%;
  background: rgba(231, 237, 244, .76);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .9rem;
  font-weight: 700;
}

.gallery-page .quiz-option:has(input:checked) .quiz-option-key {
  color: #fffaf0;
  border-color: var(--gallery-gold);
  background: var(--gallery-gold);
}

.gallery-page #quiz-message {
  color: var(--gallery-gold-deep) !important;
}

.gallery-page #quiz-prev,
.gallery-page #quiz-next {
  min-height: 44px;
  border: 1px solid var(--gallery-line);
  border-radius: 999px !important;
  color: var(--gallery-ink) !important;
  background: rgba(255, 250, 240, .8) !important;
  box-shadow: 0 4px 12px rgba(77, 57, 34, .06);
}

.gallery-page #quiz-next {
  border-color: var(--gallery-blue) !important;
  color: #fffaf0 !important;
  background: var(--gallery-blue) !important;
  box-shadow: 0 7px 15px rgba(75, 111, 157, .22);
}

.gallery-page #quiz-prev:not(:disabled):hover,
.gallery-page #quiz-next:not(:disabled):hover {
  transform: translateY(-1px);
}

.gallery-page #quiz-result {
  border-color: var(--gallery-line) !important;
}

.gallery-page #quiz-result > div {
  padding: 24px;
  border: 1px solid var(--gallery-line);
  border-radius: 4px;
  background: var(--gallery-paper);
  box-shadow: 0 12px 28px var(--gallery-shadow);
}

.gallery-page #quiz-result .text-emerald-700,
.gallery-page #quiz-result .text-emerald-400 {
  color: var(--gallery-gold-deep) !important;
}

.gallery-page #quiz-result .bg-emerald-700 {
  background: var(--gallery-blue) !important;
}

.gallery-page #quiz-result .dimension-chip {
  border: 1px solid var(--gallery-line);
  color: var(--gallery-ink);
  background: var(--gallery-paper-deep) !important;
}
