/* Shared MineQuest materials. Keep decorative textures beneath live HTML. */
:root {
  --mq-rock: #142027;
  --mq-rock-deep: #0b151b;
  --mq-slate: #203039;
  --mq-ivory: #fff3d8;
  --mq-mint: #97f4d6;
  --mq-gold: #d7b981;
  --mq-edge: #56716d;
  --mq-focus: #ffdb8f;
  --mq-focus-ring: #16736a;
  --mq-stone-texture: url("../../crystal-refresh/slate.webp");
  --mq-crystal-texture: url("../../crystal-refresh/jade.webp");
  --mq-brass-texture: url("../../crystal-refresh/brass.webp");
  --mq-cavern: image-set(url("../../crystal-refresh/cavern-small.webp") 1x, url("../../crystal-refresh/cavern.webp") 2x);
  --mq-material-shadow: 0 14px 32px #030c1273, inset 0 1px 0 #eefdeb26;
}

body[data-surface] :where(.mine-landing,.mq-landing,.sidebar,.mining-dock,.command-entry-dialog) {
  --mq-focus-ring: #97f4d6;
}

body[data-surface] :where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--mq-focus-ring);
  outline-offset: 2px;
}

body[data-surface] :is(button.yellow, a.yellow, .landing-primary, .entry-cta) {
  --mq-material: var(--mq-crystal-texture);
  --mq-button-border: #80bdb0;
  --mq-button-light: #8bf1d769;
  color: #f5fff8;
  background: linear-gradient(120deg,#244f4bdd,#153435e8), var(--mq-material) center / cover, #244f4b;
  border: 1px solid var(--mq-button-border);
  border-radius: 9px 15px 9px 15px;
  box-shadow: inset 0 1px 0 #dbfff84d, inset 0 -2px 0 #101d24, 0 3px 8px #09192055;
  min-block-size: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: box-shadow .2s ease, border-color .2s ease, filter .2s ease;
}

body[data-surface] :is(button.ghost, .landing-nav nav button, .landing-actions > a:not(.landing-primary)) {
  --mq-button-light: #e8c88a58;
  color: var(--mq-ivory);
  background: linear-gradient(115deg,#2b3840df,#152026e8), var(--mq-stone-texture) center / cover, var(--mq-slate);
  border: 1px solid #879287;
  border-radius: 8px 13px 8px 13px;
  min-block-size: 44px;
  overflow-wrap: anywhere;
  transition: box-shadow .2s ease, border-color .2s ease, filter .2s ease;
}

@media (hover: hover) {
  body[data-surface] :is(button.yellow, a.yellow, .landing-primary, .entry-cta, button.ghost, .landing-nav nav button):not(:disabled, [aria-disabled="true"]):hover {
    border-color: var(--mq-focus);
    box-shadow: inset 0 1px 0 #ffffee77, 0 0 19px var(--mq-button-light, #8bf1d769);
    filter: brightness(1.13);
  }
}

body[data-surface] :is(button.yellow, a.yellow, .landing-primary, .entry-cta, button.ghost):not(:disabled, [aria-disabled="true"]):active {
  box-shadow: inset 0 2px 5px #091920bf;
  filter: brightness(1.24);
}

body[data-surface] :is(button.yellow, button.ghost, .entry-cta):disabled {
  filter: saturate(.45);
  opacity: .72;
}

body[data-surface] .mq-landing .landing-nav {
  border-color: #d7b98168;
  background: linear-gradient(110deg,#101d23f5,#23333cf5);
}

.mq-landing .landing-hero {
  isolation: isolate;
}

.mq-landing .landing-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 2rem 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 35% 48%, #080e13ed, #0a131980 52%, transparent 80%),
    var(--mq-cavern) center / cover;
  border-radius: 24px 80px 28px 18px;
  mask-image: radial-gradient(ellipse at 44% 50%, #000 39%, transparent 80%);
  opacity: .88;
}

.mq-landing .landing-hero h1 {
  color: var(--mq-ivory);
  text-wrap: balance;
  text-shadow: 0 2px 26px #081116;
}

.mq-landing .landing-hero h1 em,
.mq-landing .landing-section-title h2 em {
  color: var(--mq-mint);
}

.mq-landing :is(.landing-triptych article, .landing-adventures article, .landing-feature > div) {
  background: linear-gradient(115deg,#142027f3,#23333af5), var(--mq-stone-texture) center / cover, var(--mq-rock);
  color: var(--mq-ivory);
  border: 1px solid #d7b98160;
  border-radius: 12px 24px 12px 24px;
  box-shadow: var(--mq-material-shadow);
}

.mq-landing :is(.landing-triptych article, .landing-adventures article, .landing-feature > div) :is(h3,p) {
  color: inherit;
}

.mq-landing .entry-pass.gateway-panel {
  border-color: var(--mq-gold);
  border-radius: 17px 33px 17px 33px;
  box-shadow: var(--mq-material-shadow);
}

.mq-landing .gateway-paths button[aria-pressed="true"] {
  outline: 2px solid var(--mq-mint);
  outline-offset: -3px;
}

body[data-surface] :is(.task-help summary, .library-filters button[aria-pressed="true"], .entry-level-buttons button[aria-pressed="true"]) {
  color: var(--mq-ivory);
  background: linear-gradient(112deg,#143932eb,#172d36ed), var(--mq-crystal-texture) center / cover, #143932;
  border-color: #83b3a0;
}

body[data-surface] :is(.knowledge-library, .book-reader-content, .practice-dialog) {
  --mq-reader-ink: #18312f;
}

body[data-surface] .book-reader-content {
  color: var(--mq-reader-ink);
}

body[data-surface] #toast:not(:empty) {
  color: var(--mq-ivory);
  background: linear-gradient(105deg,#1c3938f5,#101e28fa), var(--mq-crystal-texture) center / cover, var(--mq-rock-deep);
  border: 1px solid #8dd8c4;
  border-inline-start: 4px solid var(--mq-mint);
  border-radius: 11px 21px 11px 11px;
  box-shadow: var(--mq-material-shadow);
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .mq-landing .landing-hero::after {
    inset: 1rem -1rem;
    border-radius: 0;
    background-position: 58% center;
    mask-image: radial-gradient(ellipse, #000 34%, transparent 80%);
  }

  body[data-surface] .landing-actions > a {
    justify-content: center;
    min-block-size: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-surface] :is(button.yellow, a.yellow, .landing-primary, .entry-cta, button.ghost, .landing-nav nav button) {
    transition: none;
  }
}

body[data-surface] .landing-actions > a:not(.landing-primary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  text-align: center;
}
