@font-face {
  font-family: Fell;
  src: url("/fell-english.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: PixelOperator;
  src: url("/PixelOperator.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  background: #0c0c0d;
  color: #eee3d0;
  font-family: system-ui, sans-serif;
  --gold: #edc78e;
  --muted: #bdb1a0;
  --rule: #534233;
  --green: #b9ce98;
  --display: Fell, Georgia, serif;
  --ledger: PixelOperator, "Courier New", monospace;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
button, summary { cursor: pointer; }

.masthead {
  position: relative;
  background: #111010;
  border-bottom: 1px solid #60452d;
}

.masthead-inner, .hero-inner, .hall {
  width: min(calc(100% - 5rem), 72rem);
  margin-inline: auto;
}

.masthead-inner {
  min-height: 3.65rem;
  display: flex;
  align-items: center;
  gap: clamp(1.35rem, 4vw, 3.4rem);
}

.realm {
  display: flex;
  gap: .7rem;
  align-items: center;
  color: #f4d1a1;
  text-decoration: none;
  font: 1.42rem var(--display);
  white-space: nowrap;
}

.sigil {
  position: relative;
  width: .92rem;
  height: .92rem;
  transform: rotate(45deg) skew(-9deg, -9deg);
  border: 1px solid #cf9b57;
  background: linear-gradient(135deg, #6f2f23, #1b1210);
  box-shadow: inset 0 0 0 2px #17100a, 0 0 9px #912e1e24;
}

nav { display: flex; gap: 1.55rem; }
nav a {
  font: 1.16rem var(--ledger);
  color: var(--muted);
  text-decoration: none;
}

nav a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: .22em; }

.realm-status, output {
  display: inline-flex;
  gap: .52rem;
  align-items: center;
  color: var(--muted);
  font: 1.12rem/1.2 var(--ledger);
}

.realm-status { margin-left: auto; white-space: nowrap; }
.realm-status::before, output::before {
  content: "";
  width: .52rem;
  height: .52rem;
  flex: none;
  background: #99918c;
  transform: rotate(45deg);
}

[data-phase="waiting"]::before { background: var(--green); box-shadow: 0 0 10px #b9ce9840; }
[data-phase="loading"]::before, [data-phase="playing"]::before { background: #f3bc7a; }

.hero {
  position: relative;
  min-height: clamp(20rem, 43vw, 29rem);
  display: grid;
  align-items: center;
  background:
    linear-gradient(0deg, #0c0c0d 0%, #0c0c0d19 25%, transparent 74%),
    linear-gradient(90deg, #0d1015c4 0%, #0d101585 36%, #0d101510 68%),
    #202125 url("/skyhole-gate.webp") center 57% / cover no-repeat;
}

.hero-inner { padding-block: 2.6rem 4.2rem; }
.hero p {
  margin: 0 0 .92rem;
  color: #f2cc96;
  text-transform: uppercase;
  font: 1.15rem var(--ledger);
  letter-spacing: .15em;
}

h1, h2, p, dl, dd, ol { margin: 0; }
h1, h2 { font-weight: 400; font-family: var(--display); }

h1 {
  font-size: clamp(3.8rem, 8vw, 6.8rem);
  line-height: .85;
  letter-spacing: -.026em;
  color: #f9e4bc;
  filter: drop-shadow(0 2px 2px #030303) drop-shadow(0 4px 18px #13110d);
}

h1 em { color: #dfad70; font-style: normal; }

.bronze-button {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  min-height: 2.75rem;
  padding: .46rem .9rem;
  border: 1px solid #b18253;
  color: #fff0cf;
  background: linear-gradient(#75482e55, #26170e88), #6b442c url("/bnet-stone.jpg") center / 220px;
  box-shadow: inset 0 0 0 2px #1e130ed9, inset 0 2px #d1a472;
  font: 1.19rem/1.1 var(--ledger);
  text-decoration: none;
  text-shadow: 0 1px 2px #1b100b;
}

.bronze-button:hover { filter: brightness(1.2); }
.bronze-button[hidden] { display: none; }
.hero .bronze-button { margin-top: 1.65rem; }

.hall {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.3rem;
  margin-top: -2rem;
  padding-bottom: 3rem;
}

.stone-panel {
  border: 10px solid #4d4639;
  border-image: url("/bnet-frame.png") 40 / 10px / 0 repeat;
  background: #151212;
  padding: 1.05rem 1.18rem 1.2rem;
  scroll-margin-top: 1rem;
}

h2 {
  color: #f3c994;
  font-size: clamp(1.65rem, 2.5vw, 2rem);
  letter-spacing: -.015em;
  line-height: 1.05;
}

.room {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.25fr) minmax(5.1rem, .65fr);
  margin-top: 1.2rem;
}

.room > div { min-width: 0; }
.room dt {
  color: #c0aa90;
  font: 1.02rem var(--ledger);
  padding: .44rem .63rem;
  border-bottom: 1px solid var(--rule);
}

.room dd {
  min-height: 4.4rem;
  padding: .69rem .62rem;
  background: #201914;
  border-bottom: 1px solid #412f25;
}

.room-name strong { font: 1.3rem/1.05 var(--display); }
.room-name small {
  display: block;
  color: var(--muted);
  font: 1.02rem var(--ledger);
  margin-top: .38rem;
}

.room-seats { text-align: right; }
.room-seats dd { color: var(--gold); font: 1.34rem var(--ledger); white-space: nowrap; }
.room-status output { color: #e0d4c4; }

.activity {
  margin: 1.1rem .65rem 0;
  padding: .75rem 0;
  border-top: 1px solid #4c382c;
}

.activity h2 { font-size: 1.4rem; }
.activity ol {
  margin-top: .54rem;
  padding: 0;
  list-style: none;
}

.activity li {
  display: flex;
  gap: .75rem;
  padding: .35rem 0;
  color: var(--muted);
  font: 1.12rem/1.2 var(--ledger);
}

.activity time { color: #e3b480; white-space: nowrap; }

.join > p { margin: .6rem 0; }
.join p {
  color: var(--muted);
  font-size: .89rem;
  line-height: 1.5;
}

code {
  display: block;
  border: 1px solid #3f342b;
  background: #0c0b0a;
  padding: .48rem .62rem;
  color: #ebd9b8;
  font: .78rem/1.5 ui-monospace, Consolas, monospace;
  overflow-wrap: anywhere;
}

.join button { margin-block: .62rem .15rem; }
.join details { margin-top: .78rem; border-top: 1px solid var(--rule); padding-top: .62rem; }
.join summary { color: #e4b883; font: 1.12rem var(--ledger); }
.join details code { margin-top: .56rem; }
.join .copy-result { color: var(--green); margin-bottom: 0; }
.copy-result:empty { display: none; }

@media (max-width: 49rem) {
  .masthead-inner, .hero-inner, .hall { width: min(calc(100% - 2rem), 36rem); }
  .hall { grid-template-columns: minmax(0, 1fr); margin-top: -1.45rem; }
  .masthead-inner { gap: 1.05rem; }
  nav { gap: .9rem; }
  .hero { background-position: center, center, 60% 54%; }
}

@media (max-width: 30rem) {
  .masthead-inner { justify-content: space-between; }
  .realm-status { display: none; }
  .realm { font-size: 1.18rem; gap: .48rem; }
  nav a { font-size: 1.02rem; }
  .hero { min-height: 18.3rem; }
  .hero-inner { padding-block: 2.5rem 3rem; }
  h1 { max-width: 11rem; }
  .stone-panel { padding: .8rem .75rem .9rem; }
  .room { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.2fr) minmax(3.5rem, .7fr); }
  .room :is(dt, dd) { padding-inline: .37rem; }
  .room-name strong { font-size: 1.14rem; }
  .room-name small, .room-status output { font-size: 1rem; }
  .room-status output { gap: .33rem; }
}
