/* Palette sampled from img/cards/*.webp (median over all 22 cards) — see report.
   ink    #1E210D  side medallion dark (ink-green)
   band   #5A350A  title band / frame dark brown
   brown  #4D2B05  body text on parchment
   parch  #FEEECD  parchment text panel
   goldhi #FDCF59  gilded border highlight
   gold   #DBAB46  gilded border mid
   goldlo #876728  gilded border shadow
   Derived (mixes of the above only): ink-2, parch-2, parch-soft. */
:root {
  --ink: #1E210D;
  --ink-2: #2B2A10;          /* ink 80% + band 20% */
  --band: #5A350A;
  --brown: #4D2B05;
  --brown-soft: #6B4A1E;     /* brown 75% + goldlo 25% */
  --parch: #FEEECD;
  --parch-2: #F6E2B4;        /* parch 80% + gold 20% */
  --parch-soft: #E9D7AE;     /* parch on ink, for secondary text */
  --gold-hi: #FDCF59;
  --gold: #DBAB46;
  --gold-lo: #876728;
  --shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%;
  min-height: 100%;
  background: var(--ink);
  color: var(--parch);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}
body {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px 20px calc(28px + var(--safe-bottom));
  background:
    radial-gradient(ellipse 360px 260px at 50% -40px, rgba(253, 207, 89, 0.16) 0%, transparent 70%),
    radial-gradient(ellipse 320px 300px at 100% 100%, rgba(90, 53, 10, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 300px 260px at 0% 60%, rgba(90, 53, 10, 0.35) 0%, transparent 70%),
    var(--ink);
  position: relative;
}
/* gilded inner frame around every screen, like the card border */
.screen::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(219, 171, 70, 0.45);
  outline: 1px solid rgba(135, 103, 40, 0.5);
  outline-offset: 3px;
  border-radius: 14px;
  pointer-events: none;
}
.screen > * { position: relative; }
.screen.active { display: flex; }

/* ---------- home ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ink-2);
  border: 1px solid var(--gold);
  color: var(--gold-hi);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
  box-shadow: inset 0 0 0 2px var(--ink-2), inset 0 0 0 3px rgba(135, 103, 40, 0.8);
}
.s1-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 12px;
}
.hero-illu {
  width: 164px;
  height: 164px;
  margin-bottom: 20px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
}
.title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  color: var(--parch);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}
.title em {
  font-style: normal;
  color: var(--gold-hi);
}
.hook {
  font-size: 16px;
  line-height: 1.7;
  color: var(--parch);
  max-width: 330px;
  margin-bottom: 8px;
}
.meta {
  font-size: 15px;
  color: var(--parch-soft);
  margin-top: 10px;
  max-width: 320px;
  line-height: 1.6;
}
.s1-bottom { padding-bottom: 8px; }

/* ---------- buttons ---------- */
.btn-primary {
  display: block;
  width: 100%;
  border: 1px solid var(--gold-lo);
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 100%);
  color: var(--brown);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 15px 20px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 2px rgba(254, 238, 205, 0.55), 0 6px 0 var(--gold-lo), 0 12px 22px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active {
  transform: translateY(4px);
  box-shadow: inset 0 0 0 2px rgba(254, 238, 205, 0.55), 0 2px 0 var(--gold-lo), 0 6px 12px rgba(0, 0, 0, 0.45);
}
.btn-secondary {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 1.5px solid var(--gold);
  background: var(--ink-2);
  color: var(--parch);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 13px 16px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 3px var(--ink-2), inset 0 0 0 4px rgba(135, 103, 40, 0.7);
  cursor: pointer;
  transition: background 0.12s ease, transform 0.08s ease;
}
.btn-secondary:hover { background: #34321A; }
.btn-secondary:active { background: var(--band); transform: translateY(2px); }
.btn-ghost {
  display: block;
  width: auto;
  margin: 12px auto 0;
  border: none;
  border-bottom: 1px solid var(--gold-lo);
  background: transparent;
  color: var(--gold-hi);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 10px 4px;
  cursor: pointer;
}
.btn-ghost::before { content: "◆ "; font-size: 15px; color: var(--gold); }
.btn-ghost::after { content: " ◆"; font-size: 15px; color: var(--gold); }
.btn-ghost:active { color: var(--parch); }
.btn-primary:disabled, .btn-secondary:disabled, .btn-ghost:disabled, .back-btn:disabled, .opt:disabled {
  filter: grayscale(0.7);
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-ghost:focus-visible, .back-btn:focus-visible, .opt:focus-visible, .close-ov:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.btn-row .btn-secondary { margin-top: 0; flex: 1; }

/* ---------- question ---------- */
.top-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.back-btn {
  background: var(--ink-2);
  border: 1px solid var(--gold);
  color: var(--parch);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}
.back-btn:active { background: var(--band); }
.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.progress-track {
  flex: 1;
  height: 10px;
  background: var(--ink-2);
  border: 1px solid var(--gold-lo);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}
.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  border-radius: 999px;
  transition: width 0.25s ease;
}
.progress-num {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-hi);
  min-width: 44px;
  text-align: right;
}
.q-text {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.45;
  margin-bottom: 22px;
  color: var(--parch);
}
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--parch);
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  padding: 13px 14px;
  box-shadow: inset 0 0 0 3px var(--parch), inset 0 0 0 4px rgba(135, 103, 40, 0.35), 0 6px 14px rgba(0, 0, 0, 0.35);
  text-align: left;
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  color: var(--brown);
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.08s ease, background 0.12s ease;
}
.opt:hover { background: #FFF4DC; }
.opt:active { transform: scale(0.985); }
.opt.selected {
  border-color: var(--gold-hi);
  background: var(--parch-2);
  box-shadow: inset 0 0 0 3px var(--parch-2), inset 0 0 0 4px var(--gold), 0 0 0 2px var(--gold-hi), 0 8px 18px rgba(0, 0, 0, 0.4);
}
.opt-key {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  border: 1.5px solid var(--gold);
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px var(--gold-lo);
  color: var(--gold-hi);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.opt.selected .opt-key {
  background: var(--gold-hi);
  color: var(--brown);
  box-shadow: inset 0 0 0 2px var(--gold-hi), inset 0 0 0 3px var(--gold-lo);
}
.opt-text {
  font-size: 16px;
  line-height: 1.5;
  padding-top: 3px;
  color: var(--brown);
  text-align: left;
}

/* ---------- bridge ---------- */
.bridge-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 8px;
}
.bridge-emblem {
  width: 96px;
  height: 96px;
  margin-bottom: 20px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}
.bridge-text {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: 28px;
  color: var(--gold-hi);
}

/* ---------- result ---------- */
.result-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-bottom: 8px;
}
/* Slot reserves composite aspect (1080×1608) so tips stay below the fold */
.card-slot {
  position: relative;
  width: 100%;
  aspect-ratio: 1080 / 1608;
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--parch);
  box-shadow: 0 0 0 1px var(--gold-lo), 0 14px 30px rgba(0, 0, 0, 0.55);
  border: 1.5px solid var(--gold);
}
.card-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(253, 207, 89, 0.18), transparent 42%),
    var(--parch);
  box-shadow: inset 0 0 0 4px var(--parch), inset 0 0 0 5px rgba(135, 103, 40, 0.45);
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.card-placeholder.is-hidden {
  opacity: 0;
  visibility: hidden;
}
.card-ph-bolt {
  font-size: 36px;
  line-height: 1;
  color: var(--gold-hi);
  text-shadow: 0 0 12px rgba(253, 207, 89, 0.55);
}
.card-ph-text {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--brown);
}
.card-preview {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
  opacity: 0;
  z-index: 2;
  box-shadow: none;
}
.card-preview.is-ready {
  opacity: 1;
}
.card-preview:not(.is-ready) {
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .card-placeholder { transition: none; }
}
.result-card {
  background: var(--parch);
  color: var(--brown);
  border-radius: 14px;
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 4px var(--parch), inset 0 0 0 5px rgba(135, 103, 40, 0.45), var(--shadow);
  padding: 16px 16px 14px;
  position: relative;
  overflow: hidden;
}
.result-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi), var(--gold-lo));
}
.result-card.theme-gold { border-color: var(--gold-hi); }
.result-card.theme-blackgold {
  background: var(--ink-2);
  color: var(--parch);
  border-color: var(--gold-hi);
  box-shadow: inset 0 0 0 4px var(--ink-2), inset 0 0 0 5px var(--gold-lo), var(--shadow);
}
.skills-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 900;
  color: var(--band);
  letter-spacing: 0.08em;
  margin: 4px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skills-title::before { content: "✦"; color: var(--gold-lo); }
.theme-blackgold .skills-title { color: var(--gold-hi); }
.theme-blackgold .skills-title::before { color: var(--gold); }
.skills-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.skill {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #FFF7E4;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(219, 171, 70, 0.6);
}
.theme-blackgold .skill {
  background: rgba(254, 238, 205, 0.05);
  border-color: rgba(219, 171, 70, 0.45);
}
.skill-n {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  border: 1.5px solid var(--gold);
  color: var(--gold-hi);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.theme-blackgold .skill-n { background: var(--gold-hi); color: var(--brown); border-color: var(--gold-lo); }
.skill-body .sk-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
  color: var(--brown);
}
.theme-blackgold .skill-body .sk-title { color: var(--parch); }
.skill-body .sk-desc {
  font-size: 15px;
  color: var(--brown-soft);
  margin-top: 3px;
  line-height: 1.5;
}
.theme-blackgold .skill-body .sk-desc { color: var(--parch-soft); }
.egg-box {
  margin-top: 6px;
  padding: 12px;
  border-radius: 10px;
  background: var(--parch-2);
  border: 1px dashed var(--gold-lo);
  font-size: 15px;
  line-height: 1.6;
  color: var(--brown);
}
.theme-blackgold .egg-box {
  background: rgba(253, 207, 89, 0.08);
  border-color: var(--gold);
  color: var(--parch);
}
.result-actions { margin-top: 14px; }
.footnote {
  text-align: center;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--gold);
  margin-top: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

/* ---------- save overlay ---------- */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 17, 6, 0.95);
  align-items: center;
  justify-content: center;
  padding: 24px;
  flex-direction: column;
}
.overlay.active { display: flex; }
.overlay img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--gold), 0 12px 40px rgba(0, 0, 0, 0.6);
}
.overlay .hint {
  color: var(--parch);
  margin-top: 14px;
  font-size: 15px;
  text-align: center;
}
.overlay .close-ov {
  margin-top: 14px;
  border: 1px solid var(--gold-lo);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: var(--brown);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 11px 32px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--gold-lo);
}
.overlay .close-ov:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-lo); }

/* ---------- gallery ---------- */
.gal-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--gold-hi);
  letter-spacing: 0.06em;
}
.gal-sub {
  font-size: 15px;
  color: var(--parch-soft);
  margin-bottom: 16px;
  line-height: 1.6;
}
.gal-section {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 900;
  color: var(--gold-hi);
  margin: 16px 0 10px;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gal-section::before { content: "◆"; font-size: 15px; color: var(--gold); }
.gal-section::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.gal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gal-item {
  background: var(--parch);
  color: var(--brown);
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 3px var(--parch), inset 0 0 0 4px rgba(135, 103, 40, 0.35), 0 6px 14px rgba(0, 0, 0, 0.35);
}
.gal-item .gi-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 900;
  color: var(--brown);
}
.gal-item .gi-meta {
  font-size: 15px;
  color: var(--brown-soft);
  margin-top: 2px;
}
.gal-item .gi-line {
  font-size: 15px;
  color: var(--brown-soft);
  margin-top: 6px;
  line-height: 1.5;
}
.hidden-note {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--ink-2);
  color: var(--gold-hi);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 3px var(--ink-2), inset 0 0 0 4px var(--gold-lo);
  text-align: center;
}

/* ---------- card long-press save ---------- */
/* Surrounding copy must NOT be selectable — iOS otherwise shows copy/paste
   instead of「存储图像」, especially when the img src was a data: URL. */
#screen-result,
#screen-result *:not(img),
#overlay-save,
#overlay-save *:not(img) {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.card-preview,
#save-preview {
  -webkit-touch-callout: default;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-drag: none;
  user-drag: none;
}
#card-preview {
  /* fills .card-slot; keep above placeholder when ready */
  z-index: 2;
}
#save-preview {
  position: static;
  z-index: auto;
  width: auto;
  height: auto;
  opacity: 1;
}

/* ---------- share / save hints ---------- */
.share-invite {
  text-align: center;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-hi);
  letter-spacing: 0.04em;
  margin: 0 0 10px;
  line-height: 1.5;
}
#btn-share { margin-bottom: 10px; }
#btn-save { margin-top: 0; }
.save-hint {
  text-align: center;
  font-size: 15px;
  color: var(--parch-soft);
  margin: 8px 0 4px;
  line-height: 1.5;
}

/* ---------- calculating ---------- */
.calc-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 8px;
}
.calc-emblem {
  width: 96px;
  height: 96px;
  margin-bottom: 22px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  animation: calc-spin 1.8s linear infinite;
}
.calc-text {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.55;
  color: var(--gold-hi);
  max-width: 300px;
  min-height: 3.2em;
  transition: opacity 0.25s ease;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: pretty;
}
@keyframes calc-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .calc-emblem { animation: none; }
  .calc-text { transition: none; }
  .progress-fill { transition: none; }
  .btn-primary, .btn-secondary, .opt { transition: none; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  transform: translateX(-50%) translateY(20px);
  z-index: 80;
  max-width: calc(100% - 40px);
  background: var(--parch);
  color: var(--brown);
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  padding: 12px 18px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 3px var(--parch), inset 0 0 0 4px rgba(135, 103, 40, 0.35), 0 10px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}

/* ---------- gallery collection ---------- */
.gal-count {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 900;
  color: var(--gold-hi);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.gal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.gal-card {
  background: var(--parch);
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 3px var(--parch), inset 0 0 0 4px rgba(135, 103, 40, 0.35), 0 6px 14px rgba(0, 0, 0, 0.35);
  position: relative;
}
.gal-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--ink-2);
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
  pointer-events: auto;
}
.gal-card .gc-cap {
  padding: 8px 10px 10px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--brown);
  line-height: 1.35;
  text-align: center;
}
.gal-card .gc-tier,
.gal-card .gc-style {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: normal;
}
.gal-card .gc-style {
  margin-top: 2px;
  color: var(--brown-soft);
}
.gal-card.locked {
  background: var(--ink-2);
  border-color: var(--gold-lo);
  box-shadow: inset 0 0 0 3px var(--ink-2), inset 0 0 0 4px rgba(135, 103, 40, 0.55), 0 6px 14px rgba(0, 0, 0, 0.35);
}
.gal-card.locked .gc-art {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(90, 53, 10, 0.55), transparent 70%),
    var(--ink);
  color: var(--gold-lo);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 900;
}
.gal-card.locked .gc-cap {
  color: var(--parch-soft);
}
.gal-card.locked .gc-cap .gc-tier {
  user-select: none;
  letter-spacing: 0.12em;
  color: var(--gold);
}

/* ---------- site credit (non-question screens) ---------- */
/* Lighter/smaller than the canvas card credit; do not steal focus from CTAs. */
.site-credit {
  text-align: center;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: rgba(233, 215, 174, 0.38);
  margin: 10px 0 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
#screen-home .site-credit,
#screen-bridge .site-credit,
#screen-calculating .site-credit,
#screen-gallery .site-credit {
  margin-top: 14px;
  padding-bottom: 2px;
}
.site-credit--inline {
  margin: 8px 0 0;
  font-size: 10px;
  color: rgba(233, 215, 174, 0.34);
}
#screen-result .site-credit--inline {
  margin-top: 6px;
  margin-bottom: 2px;
}
