/* Wall of Eternity — cool grey marble with engraved metal and enamel plaques. */
:root {
  --marble: #e8e9eb;
  --slate: #1e2428;
  --slate-soft: #4d565d;
  --line: rgba(30, 36, 40, 0.18);
  --gold: #c9a24a;
  --gold-hi: #f3d78a;
  --card: rgba(255, 255, 255, 0.72);
  --inscr: 'Forum', 'Trajan Pro', Georgia, serif;
  --sans: 'Commissioner', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pay-paper: #ffffff;
  --pay-ink: #1e2428;
  --pay-muted: #4d565d;
  --pay-line: rgba(30, 36, 40, 0.14);
  --pay-accent: #1e2428;
  --pay-accent-ink: #f3d78a;
  --pay-font: var(--sans);
  --pay-display: var(--inscr);
  --pay-radius: 14px;
  --pay-btn-radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--marble);
  color: var(--slate);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.55;
}
#marble {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

/* ── top ── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
  padding: 18px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--slate);
  text-decoration: none;
  font-family: var(--inscr);
  font-size: 23px;
}
.brand > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-mark {
  flex: none;
  width: 34px;
  height: 34px;
}
.brand-mark rect {
  fill: var(--gold);
}
.brand-mark circle {
  fill: #7a5c1c;
}
.brand-mark path {
  stroke: #5a3f0c;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.top-tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-tools select {
  appearance: none;
  min-height: 40px;
  padding: 6px 30px 6px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231e2428' stroke-width='2'/%3E%3C/svg%3E")
    no-repeat right 11px center;
  color: var(--slate);
  font: 500 15px/1 var(--sans);
  cursor: pointer;
}
.sound {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--slate);
  cursor: pointer;
}
.sound svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sound svg path:first-child {
  fill: currentColor;
}
.sound .mute {
  display: none;
}
.sound[aria-pressed='false'] .wave {
  display: none;
}
.sound[aria-pressed='false'] .mute {
  display: block;
}

/* ── hero ── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  gap: 48px;
  align-items: start;
  padding-top: 24px;
}
h1 {
  margin: 0 0 14px;
  font-family: var(--inscr);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: 0.01em;
}
.lead {
  margin: 0;
  max-width: 26em;
  color: var(--slate-soft);
  font-size: 19px;
}
.count {
  display: inline-block;
  margin: 24px 0 0;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--slate);
  color: var(--gold-hi);
  font-weight: 600;
  font-size: 15px;
}

.form-card {
  padding: 24px;
  border-radius: 14px;
  background: var(--card);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 20px 50px rgba(30, 36, 40, 0.16);
}
.form-card label,
.form-card legend {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  font-weight: 600;
  font-size: 14px;
}
.form-card textarea,
.form-card input {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--slate);
  font: 400 19px/1.35 var(--inscr);
  resize: vertical;
}
.form-card textarea {
  min-height: 86px;
}
.form-card textarea:focus,
.form-card input:focus {
  outline: none;
  border-color: var(--slate);
}
.row {
  margin-top: 14px;
}
fieldset {
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}
.materials {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.mat {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--slate-soft);
  font: 500 11.5px/1.2 var(--sans);
  overflow-wrap: anywhere;
  cursor: pointer;
}
.mat i {
  display: block;
  width: 100%;
  aspect-ratio: 1.4;
  border-radius: 6px;
  background: var(--m-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 5px rgba(30, 36, 40, 0.25);
}
.mat[aria-pressed='true'] {
  color: var(--slate);
  font-weight: 700;
}
.mat[aria-pressed='true'] i {
  outline: 2.5px solid var(--slate);
  outline-offset: 2px;
}
.preview-label {
  margin: 16px 0 6px;
  font-weight: 600;
  font-size: 14px;
}
.rules {
  margin: 12px 0 0;
  color: var(--slate-soft);
  font-size: 13px;
}
.form-error {
  margin: 10px 0 0;
  color: #9c1a2c;
  font-weight: 600;
}
.guard {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1.5px solid var(--line);
}
.guard p {
  margin: 0;
}
.guard a {
  color: var(--slate);
  font-weight: 700;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 12px;
  width: 100%;
  min-height: 60px;
  margin-top: 16px;
  padding: 12px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--slate);
  color: var(--gold-hi);
  font: 400 23px/1.1 var(--inscr);
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: inset 0 0 0 1.5px rgba(243, 215, 138, 0.5), 0 10px 24px rgba(30, 36, 40, 0.25);
}
.cta:hover {
  filter: brightness(1.15);
}
.cta-price {
  font: 500 14px/1.2 var(--sans);
  opacity: 0.85;
}

.result-card h2 {
  margin: 0 0 6px;
  font-family: var(--inscr);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
}
.result-card p {
  margin: 0 0 16px;
}
.shared-banner p {
  font-weight: 600;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  font: 600 15px/1.1 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.btn-slate {
  background: var(--slate);
  color: var(--gold-hi);
}
.btn-line {
  background: rgba(255, 255, 255, 0.75);
  color: var(--slate);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-line:hover {
  box-shadow: inset 0 0 0 1.5px var(--slate);
}

/* ── plaques ── */
.plaque {
  --m-bg: linear-gradient(135deg, #f1dc9c, #c99a45 45%, #e9cd84 62%, #a77a2c);
  --m-ink: #3b2a0e;
  --m-glow: rgba(255, 255, 255, 0.5);
  position: relative;
  display: block;
  margin: 0;
  padding: 26px 26px 18px;
  border-radius: 5px;
  background: var(--m-bg);
  color: var(--m-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(0, 0, 0, 0.12),
    0 6px 14px rgba(30, 36, 40, 0.28);
  break-inside: avoid;
}
.plaque::before,
.plaque::after {
  content: '';
  position: absolute;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 44%, rgba(0, 0, 0, 0.45) 45% 58%, transparent 59%),
    radial-gradient(circle at 35% 35%, #fff, #9aa0a6 60%, #5e6469);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}
.plaque::before {
  left: 10px;
}
.plaque::after {
  right: 10px;
}
.plaque .p-no {
  display: block;
  margin: 0 0 6px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0.75;
  text-align: center;
}
.plaque .p-msg {
  margin: 0;
  font-family: var(--inscr);
  font-size: 23px;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 1px 0 var(--m-glow);
  overflow-wrap: anywhere;
}
.plaque .p-sign {
  margin: 10px 0 0;
  font-family: var(--inscr);
  font-size: 18px;
  text-align: center;
  text-shadow: 0 1px 0 var(--m-glow);
}
.plaque .p-date {
  margin: 6px 0 0;
  font-family: var(--sans);
  font-size: 11.5px;
  text-align: center;
  opacity: 0.7;
}
.silver {
  --m-bg: linear-gradient(135deg, #f6f8f9, #b8c0c8 45%, #e8ecef 62%, #8d97a1);
  --m-ink: #283037;
}
.copper {
  --m-bg: linear-gradient(135deg, #f3b894, #b8673c 45%, #e8a27c 62%, #8c4724);
  --m-ink: #3a1a0c;
}
.plaque.enamel,
.plaque.jade,
.plaque.ruby {
  --m-ink: #f3d78a;
  --m-glow: rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 0 0 3px #c9a24a,
    inset 0 0 0 4px #7a5c1c,
    0 6px 14px rgba(30, 36, 40, 0.28);
}
.enamel {
  --m-bg: radial-gradient(120% 120% at 30% 20%, #3460b0, #1a3366);
}
.jade {
  --m-bg: radial-gradient(120% 120% at 30% 20%, #45b38f, #1d6650);
}
.ruby {
  --m-bg: radial-gradient(120% 120% at 30% 20%, #b83a55, #6a1226);
}
.brass {
  --m-bg: linear-gradient(135deg, #f1dc9c, #c99a45 45%, #e9cd84 62%, #a77a2c);
}
.plaque.is-new {
  outline: 3px solid var(--gold);
  outline-offset: 6px;
}
.plaque .hide-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font: 600 12px/1 var(--sans);
  cursor: pointer;
}
.preview .plaque {
  margin: 0;
}

/* ── the wall ── */
.wall-sec {
  margin-top: 64px;
  padding: 36px 0 20px;
  border-top: 1px solid var(--line);
}
.wall-title {
  margin: 0 0 20px;
  font-family: var(--inscr);
  font-weight: 400;
  font-size: 38px;
}
.admin-badge {
  display: inline-block;
  margin: -8px 0 18px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #9c1a2c;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.wall {
  columns: 3 300px;
  column-gap: 22px;
}
.wall .plaque {
  margin: 0 0 22px;
}
.wall-note {
  margin: 0;
  color: var(--slate-soft);
  column-span: all;
}
.empty-plaque {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 20px;
  border: 2px dashed rgba(30, 36, 40, 0.3);
  border-radius: 6px;
  color: var(--slate-soft);
  text-align: center;
  font-family: var(--inscr);
  font-size: 22px;
  column-span: all;
  max-width: 520px;
}
.more-wrap {
  text-align: center;
}

/* ── footer ── */
.foot {
  margin-top: 40px;
  padding: 20px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--slate-soft);
  font-size: 14px;
}
.foot p {
  margin: 0 0 8px;
}
.more {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.more a {
  color: var(--slate);
  font-weight: 600;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  h1 {
    font-size: 54px;
  }
  .lead {
    font-size: 17px;
  }
}
@media (max-width: 480px) {
  .form-card {
    padding: 18px;
  }
  .materials {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .plaque {
    padding: 24px 20px 16px;
  }
  .plaque .p-msg {
    font-size: 21px;
  }
  .actions .btn {
    flex: 1 1 auto;
  }
}
