/* r30 ancient-material art pass. Visual-only layer; gameplay behavior is unchanged. */
:root {
  --vv-r30-ink: #3a2718;
  --vv-r30-papyrus: #ead098;
  --vv-r30-papyrus-light: #fff0c2;
  --vv-r30-papyrus-deep: #aa6f35;
  --vv-r30-indigo: #102b49;
  --vv-r30-indigo-deep: #071a2d;
  --vv-r30-ochre: #d69a3e;
  --vv-token-halo: rgba(255, 224, 145, .9);
}

/* Organic ground texture: layered fibers, worn pigment, and softened vignette. */
body::before {
  background:
    linear-gradient(91deg, rgba(7, 20, 39, .96), rgba(18, 43, 70, .88) 58%, rgba(13, 34, 58, .76)),
    repeating-linear-gradient(7deg, rgba(255, 235, 184, .045) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(97deg, rgba(2, 9, 20, .075) 0 1px, transparent 1px 11px),
    url("assets/verse-vibe-gathering-r22.png") 75% center / cover no-repeat;
}

body::after {
  background:
    radial-gradient(ellipse at 16% 10%, rgba(255, 211, 118, .15), transparent 31%),
    radial-gradient(ellipse at 82% 84%, rgba(1, 8, 20, .42), transparent 43%),
    repeating-linear-gradient(2deg, rgba(255, 247, 218, .026) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(89deg, rgba(0, 0, 0, .025) 0 1px, transparent 1px 9px);
}

/* Remove the industrial corner hardware and striped dividers introduced earlier. */
.play-panel .action-card::before,
.play-panel .spinner-card::before,
.board-panel::before { content: none; }

.play-panel .action-card,
.play-panel .spinner-card,
.setup-card fieldset,
.settings-card,
.review-card,
.result-row,
.handoff-card {
  background:
    repeating-linear-gradient(3deg, rgba(91, 54, 22, .045) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(93deg, rgba(255, 250, 220, .06) 0 1px, transparent 1px 12px),
    radial-gradient(ellipse at 30% 15%, rgba(255, 247, 207, .62), transparent 48%),
    linear-gradient(145deg, var(--vv-r30-papyrus-light), var(--vv-r30-papyrus) 69%, #d7aa69);
  border: 1px solid #85572d;
  border-radius: 12px 15px 11px 14px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 247, 211, .45),
    inset 0 -9px 16px rgba(95, 52, 20, .09),
    0 5px 0 #3b2112,
    0 13px 24px rgba(2, 10, 22, .25);
}

.play-panel,
.setup-card,
.board-panel,
.section-heading,
.review-rail,
.progress-player,
.play-panel .current-player-card {
  background:
    repeating-linear-gradient(4deg, rgba(255, 248, 218, .035) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(94deg, rgba(0, 0, 0, .045) 0 1px, transparent 1px 12px),
    radial-gradient(ellipse at 18% 12%, rgba(86, 126, 158, .2), transparent 45%),
    linear-gradient(145deg, #173b61, var(--vv-r30-indigo) 62%, var(--vv-r30-indigo-deep));
  border-color: #98703b;
  box-shadow:
    inset 0 0 0 2px rgba(247, 214, 145, .07),
    inset 0 -12px 24px rgba(0, 0, 0, .13),
    0 6px 0 #061525,
    0 17px 34px rgba(2, 10, 22, .32);
}

.board-panel {
  border-radius: 15px 13px 16px 12px;
}

.board-scroll {
  background:
    repeating-linear-gradient(5deg, rgba(255, 244, 205, .025) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(95deg, rgba(0, 0, 0, .05) 0 1px, transparent 1px 13px),
    rgba(2, 13, 26, .55);
  border-color: rgba(211, 160, 77, .38);
  border-radius: 8px 11px 9px 12px;
}

.section-heading::after,
.play-panel .current-player-card::after {
  border-color: rgba(242, 204, 128, .12);
  border-radius: 9px 11px 8px 10px;
}

.segmented,
.mode-choice span,
.difficulty-row span,
.player-row,
.review-toolbar,
.review-card-header,
.review-question,
.review-actions,
.settings-card .toggle,
.limit-controls label {
  background:
    repeating-linear-gradient(3deg, rgba(83, 48, 19, .035) 0 1px, transparent 1px 7px),
    rgba(255, 244, 210, .72);
  border-color: #8f673a;
  border-radius: 7px 9px 6px 10px;
}

.segmented {
  background:
    repeating-linear-gradient(4deg, rgba(255,255,255,.025) 0 1px, transparent 1px 8px),
    rgba(4, 18, 34, .68);
}

.segmented button[aria-pressed="true"],
.queue-button.current {
  background:
    repeating-linear-gradient(4deg, rgba(98, 52, 16, .07) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #ffda84, #dda03d);
}

/* Buttons read as carved and painted game pieces, without metallic fittings. */
.play-panel .primary-button,
.handoff-card .primary-button,
.setup-card .primary-button,
.settings-card .primary-button,
.results-screen .primary-button,
.review-screen .primary-button,
.review-screen .approve-button {
  background:
    repeating-linear-gradient(5deg, rgba(91, 47, 16, .105) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(95deg, rgba(255, 241, 188, .08) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, #ffdc88 0, #e9aa43 60%, #bd7324 100%);
  border-color: #6b3d18;
  border-radius: 7px 9px 7px 10px;
}

.setup-card .secondary-button,
.results-screen .secondary-button,
.review-screen .secondary-button,
.settings-card .secondary-button,
.map-follow {
  background:
    repeating-linear-gradient(4deg, rgba(255, 247, 211, .04) 0 1px, transparent 1px 7px),
    linear-gradient(145deg, #315c84, var(--vv-r30-indigo));
  border-radius: 7px 9px 6px 10px;
}

/* Scripture uses the generated papyrus scroll instead of a modern content card. */
.play-panel .scripture-card,
.scripture-card {
  position: relative;
  overflow: visible;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 310px;
  margin: 1.35rem 0 1.55rem;
  padding: clamp(4.8rem, 9vw, 5.7rem) clamp(3.1rem, 10vw, 4.6rem) clamp(5.15rem, 10vw, 6rem);
  color: #6b4328;
  background: url("assets/scripture-papyrus-r30.png") center / 100% 100% no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 9px 8px rgba(44, 24, 10, .26));
}

.scripture-card .scripture-text {
  color: #6b4328;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  line-height: 1.62;
  letter-spacing: .006em;
  white-space: pre-line;
  text-wrap: pretty;
  text-shadow: 0 1px rgba(255, 242, 194, .48);
}

.scripture-card footer {
  margin-top: .9rem;
  color: #815737;
  font-size: .94rem;
  line-height: 1.45;
}

.scripture-card a {
  color: #7a4c2b;
  text-decoration-color: rgba(122, 76, 43, .48);
  text-decoration-thickness: 1px;
  text-underline-offset: .14em;
}

/* A warm rim light keeps tokens distinct against bright and dark biome art. */
.token-crop img,
.player-token {
  filter:
    drop-shadow(0 0 2px rgba(255, 248, 205, .96))
    drop-shadow(0 0 5px var(--vv-token-halo))
    drop-shadow(0 3px 2px rgba(11, 17, 19, .72));
}

.player-stack .token-crop img,
.player-stack .player-token {
  filter:
    drop-shadow(0 0 2px rgba(255, 252, 220, 1))
    drop-shadow(0 0 6px var(--vv-token-halo))
    drop-shadow(0 3px 2px rgba(7, 12, 14, .82));
}

/* Visual hooks reserved for Dev-owned placement and flow work. */
.biome-info-float,
.biome-spinner-float,
.post-map-continue,
.player-icon-picker {
  color: #fff0cc;
  background:
    repeating-linear-gradient(4deg, rgba(255, 247, 211, .04) 0 1px, transparent 1px 7px),
    linear-gradient(145deg, #244d73, var(--vv-r30-indigo));
  border: 1px solid #bd8a3d;
  border-radius: 8px 11px 7px 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 231, 170, .1), 0 4px 0 #061525, 0 9px 16px rgba(0, 0, 0, .24);
}

.biome-info-float {
  padding: .55rem .7rem;
  color: #3a2718;
  background:
    repeating-linear-gradient(3deg, rgba(83, 48, 19, .04) 0 1px, transparent 1px 7px),
    rgba(255, 241, 202, .94);
  border-color: #80542b;
}

.token-cluster { --token-cluster-gap: 2px; gap: var(--token-cluster-gap); }
[data-token-theme="cool"] { --vv-token-halo: rgba(169, 224, 255, .92); }
[data-token-theme="warm"] { --vv-token-halo: rgba(255, 207, 109, .94); }
[data-token-theme="green"] { --vv-token-halo: rgba(195, 238, 151, .9); }

@media (max-width: 720px) {
  .play-panel .scripture-card,
  .scripture-card {
    min-height: 360px;
    padding: 4.75rem clamp(2.55rem, 12vw, 3.15rem) 5rem;
    background-size: 100% 100%;
  }

  .scripture-card .scripture-text {
    font-size: 1rem;
    line-height: 1.58;
  }

  .scripture-card footer { font-size: .9rem; }
}

@media (max-width: 350px) {
  .play-panel .scripture-card,
  .scripture-card {
    padding-right: 2.35rem;
    padding-left: 2.35rem;
  }
}

body.high-contrast .token-crop img,
body.high-contrast .player-token {
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 7px #ffd572) drop-shadow(0 3px 2px #000);
}
