@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/pt-serif-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/pt-serif-700.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/pt-serif-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215;
}
@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/pt-serif-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215;
}
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/pt-sans-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/pt-sans-700.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/pt-sans-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215;
}
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/pt-sans-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215;
}

:root {
  --paper: #f3eee4;
  --ink: #111111;
  --blue: #1f4bff;
  --sand: #d9c7a3;
  --fire: #ff5a1f;
  --serif: "PT Serif", "Times New Roman", serif;
  --sans: "PT Sans", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

.mast {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0;
}

.mast-place {
  flex-wrap: wrap;
}

.mast-place .back {
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.mast-meta,
.back {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.back:hover,
.logo:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.plaza {
  padding: 2.2rem 1.25rem 1.25rem;
  display: grid;
  gap: 1.8rem;
}

.lede {
  max-width: 22rem;
}

.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3.4rem, 12vw, 7.5rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.deck {
  margin: 1rem 0 0;
  max-width: 28rem;
  font-size: 1.05rem;
}

.quarters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(12rem, 32vh) minmax(12rem, 32vh);
  gap: 0.55rem;
  min-height: 24rem;
}

.quarter {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem 1.05rem 1rem;
  overflow: hidden;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.quarter:focus-visible {
  outline-color: var(--ink);
}

.q-idx {
  position: absolute;
  top: 0.85rem;
  left: 1.05rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.q-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.1rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.q-hint {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  opacity: 0.78;
}

.q-efir { background: var(--ink); color: #f3eee4; }
.q-bureau { background: var(--sand); color: var(--ink); }
.q-market { background: var(--fire); color: #140800; }
.q-yard { background: var(--blue); color: #f3eee4; }

.quarter:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 0 var(--ink);
}

.base {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 1.25rem 1.1rem;
  font-size: 0.8rem;
}

.base p { margin: 0; }

.is-place {
  display: flex;
  flex-direction: column;
}

.place {
  flex: 1;
  padding: 8vh 1.25rem 3rem;
  max-width: 40rem;
}

.inventory {
  margin: 2.2rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.inventory li {
  padding: 0.45rem 0.7rem;
  border: 1px solid currentColor;
  font-size: 0.88rem;
}

.t-efir { background: #111; color: #f3eee4; }
.t-bureau { background: var(--sand); color: #111; }
.t-market { background: var(--fire); color: #140800; }
.t-yard { background: var(--blue); color: #f3eee4; }
.t-lost { background: var(--paper); color: #111; }

#yard-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.t-yard .mast,
.t-yard .place {
  position: relative;
  z-index: 1;
}

@media (max-width: 520px) {
  .quarters {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .quarter {
    min-height: 8.5rem;
  }

  .quarter:hover {
    transform: none;
    box-shadow: none;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.6rem);
  }

  .base {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quarter:hover {
    transform: none;
  }
}
