:root {
  --ink: #121212;
  --rule: #4484c1;
  --accent: #d90000;
  --page-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #fff;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(68, 132, 193, 0.05) 50%, transparent 50.1%),
    #fff;
  background-size: 48px 48px;
  font-family: "Frank Ruhl Libre", Georgia, serif;
  font-size: clamp(16px, 1.2vw, 19px);
}

.page-shell {
  width: min(100%, var(--page-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 88px) clamp(20px, 5vw, 72px) clamp(56px, 8vw, 112px);
  background: rgba(255, 255, 255, 0.94);
}

.site-nav {
  display: flex;
  width: fit-content;
  margin: 0 0 28px auto;
  gap: 8px;
  font-size: 0.9rem;
}

.site-nav a {
  padding: 8px 12px;
  border: 1px solid transparent;
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  border-color: var(--rule);
  color: var(--accent);
  outline: none;
}

.hero {
  width: min(100%, 430px);
  height: clamp(115px, 15vw, 180px);
  margin: 0 auto clamp(18px, 2.5vw, 30px);
  overflow: hidden;
}

.logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ticker {
  display: grid;
  width: min(100%, 1060px);
  min-height: clamp(72px, 9vw, 104px);
  margin: 0 auto;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
  place-items: center;
  text-align: center;
}

.ticker p {
  max-width: 90%;
  margin: 0;
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  line-height: 1.25;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(40px, 8vw, 150px);
  width: min(100%, 1060px);
  margin: clamp(44px, 7vw, 92px) auto 0;
  align-items: start;
}

.intro-copy p,
.info-card p {
  margin: 0 0 1.1em;
  line-height: 1.48;
}

.intro-copy p:last-child,
.info-card p:last-child {
  margin-bottom: 0;
}

.marketplace {
  margin-top: 0;
  text-align: center;
}

.marketplace-link {
  display: inline-grid;
  justify-items: center;
  gap: 0;
  color: inherit;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1;
  text-decoration: none;
}

.bag-icon {
  position: relative;
  display: block;
  width: 23px;
  height: 21px;
  margin-bottom: 5px;
  border-radius: 2px 2px 3px 3px;
  background: #050505;
}

.bag-icon::before {
  position: absolute;
  top: -7px;
  left: 6px;
  width: 8px;
  height: 9px;
  border: 3px solid #050505;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  content: "";
}

.marketplace-link:hover,
.marketplace-link:focus-visible {
  color: #c92620;
  outline: none;
}

.marketplace-link:focus-visible .bag-icon {
  outline: 2px solid #c92620;
  outline-offset: 4px;
}

.games-photo {
  display: block;
  width: min(100%, 320px);
  aspect-ratio: 4 / 5;
  height: auto;
  margin: 24px auto 0;
  border: 1px solid #555;
  object-fit: cover;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 8vw, 150px);
  width: min(100%, 1060px);
  margin: clamp(40px, 5vw, 72px) auto 0;
}

.card-title {
  display: flex;
  height: clamp(50px, 5vw, 64px);
  margin-bottom: clamp(18px, 2.5vw, 28px);
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
  align-items: center;
}

.info-card:first-child .card-title {
  justify-content: flex-start;
}

.reviews .card-title {
  justify-content: flex-start;
}

.info-card p {
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  line-height: 1.45;
}

.reviews p {
  margin-bottom: 14px;
}

.ticker-bottom {
  margin-top: clamp(70px, 10vw, 150px);
}

.marketplace-link.is-clicked {
  animation: nudge 300ms ease-out;
}

.inventory-page {
  max-width: 1200px;
}

.inventory-header {
  display: flex;
  margin-bottom: clamp(40px, 6vw, 82px);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.inventory-header .site-nav {
  margin: 0;
}

.inventory-logo {
  display: block;
  width: min(190px, 42vw);
  height: 58px;
  overflow: hidden;
}

.inventory-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.inventory-hero {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.eyebrow,
.platform-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.inventory-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 500;
  line-height: 1;
}

.inventory-hero > p:last-child {
  max-width: 620px;
  margin: 22px 0 0;
  line-height: 1.5;
}

.inventory-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.35fr);
  gap: 18px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px dashed var(--rule);
}

.inventory-controls label {
  display: grid;
  gap: 7px;
  font-size: 0.88rem;
}

.inventory-controls input,
.inventory-controls select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aeb9c4;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.inventory-controls input:focus,
.inventory-controls select:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(217, 0, 0, 0.18);
  outline-offset: 1px;
}

.inventory-count {
  min-height: 1.4em;
  margin: 20px 0;
  color: #4a5866;
  font-size: 0.9rem;
}

.inventory-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.inventory-card,
.empty-inventory,
.no-results {
  border: 1px solid #d8e0e7;
  background: rgba(255, 255, 255, 0.88);
}

.inventory-card {
  display: flex;
  min-height: 260px;
  padding: 24px;
  flex-direction: column;
}

.inventory-card h2,
.empty-inventory h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.2;
}

.inventory-card dl {
  display: grid;
  gap: 11px;
  margin: 26px 0 18px;
}

.inventory-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.inventory-card dt {
  color: #576573;
}

.inventory-card dd {
  margin: 0;
  text-align: right;
}

.stock-status {
  margin: auto 0 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.in-stock { color: #247238; }
.out-of-stock { color: #9d2620; }

.empty-inventory,
.no-results {
  grid-column: 1 / -1;
  padding: clamp(28px, 6vw, 72px);
  text-align: center;
}

.empty-inventory p {
  max-width: 510px;
  margin: 14px auto 24px;
  line-height: 1.45;
}

.empty-inventory a {
  display: inline-block;
  padding: 11px 17px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.empty-inventory a:hover,
.empty-inventory a:focus-visible {
  color: #fff;
  background: var(--accent);
  outline: none;
}

.inventory-image {
  width: calc(100% + 48px);
  height: auto;
  margin: -24px -24px 20px;
  object-fit: contain;
}

.listing-link {
  display: inline-block;
  width: fit-content;
  margin-top: 16px;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 0.86rem;
  text-decoration: none;
}

.listing-link:hover,
.listing-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.admin-page {
  max-width: 960px;
}

.admin-login {
  width: min(100%, 480px);
  margin: clamp(30px, 8vw, 100px) auto;
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid #d8e0e7;
  background: rgba(255, 255, 255, 0.9);
}

.admin-login h1,
.admin-heading h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 500;
}

.admin-login > p:not(.eyebrow) {
  margin: 16px 0 28px;
  line-height: 1.45;
}

.admin-login form,
.game-form {
  display: grid;
  gap: 18px;
}

.admin-login label,
.game-form label {
  display: grid;
  gap: 7px;
  font-size: 0.9rem;
}

.admin-login input,
.game-form input:not([type="checkbox"]) {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aeb9c4;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.admin-login input:focus,
.game-form input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(217, 0, 0, 0.18);
  outline-offset: 1px;
}

.admin-login button,
.game-form > button {
  width: fit-content;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
}

.admin-login button:hover,
.game-form > button:hover {
  background: #ad0000;
}

.form-feedback {
  min-height: 1.4em;
  margin: 0;
  color: #247238;
  font-size: 0.9rem;
}

.form-feedback.is-error {
  color: #9d2620;
}

.admin-heading {
  display: flex;
  margin-bottom: 30px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.button-secondary {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #9eabb7;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.game-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: clamp(20px, 4vw, 40px);
  border: 1px dashed var(--rule);
  background: rgba(255, 255, 255, 0.88);
}

.wide-field {
  grid-column: 1 / -1;
}

.checkbox-field {
  display: flex !important;
  grid-column: 1 / -1;
  align-items: center;
  gap: 9px !important;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.admin-inventory {
  margin-top: clamp(48px, 8vw, 84px);
}

.admin-inventory h2 {
  margin: 0 0 20px;
  font-size: 1.5rem;
  font-weight: 500;
}

.admin-inventory-list {
  display: grid;
  gap: 12px;
}

.admin-game-row {
  display: flex;
  padding: 18px;
  border: 1px solid #d8e0e7;
  background: rgba(255, 255, 255, 0.88);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-game-row h3,
.admin-game-row p {
  margin: 0;
}

.admin-game-row h3 {
  font-size: 1rem;
  font-weight: 500;
}

.admin-game-row p {
  margin-top: 5px;
  color: #576573;
  font-size: 0.86rem;
}

.agenda-page {
  max-width: 960px;
}

.agenda-hero {
  max-width: 700px;
  margin-bottom: clamp(34px, 5vw, 66px);
}

.agenda-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 500;
  line-height: 1;
}

.agenda-hero > p:last-child {
  max-width: 620px;
  margin: 22px 0 0;
  line-height: 1.5;
}

.agenda-list {
  display: grid;
  gap: 16px;
}

.agenda-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 42px);
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid #d8e0e7;
  background: rgba(255, 255, 255, 0.88);
}

.agenda-date {
  display: grid;
  width: 92px;
  height: 92px;
  border: 1px solid var(--accent);
  color: var(--accent);
  place-content: center;
  text-align: center;
  text-transform: uppercase;
}

.agenda-date strong {
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 0.9;
}

.agenda-date span {
  margin-top: 6px;
  font-size: 0.84rem;
}

.agenda-card h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 500;
}

.agenda-city,
.agenda-meta,
.agenda-notes {
  margin: 0;
}

.agenda-city {
  margin-top: 8px;
  color: var(--accent);
}

.agenda-meta {
  margin-top: 7px;
  color: #576573;
  font-size: 0.92rem;
}

.agenda-notes {
  margin-top: 17px;
  line-height: 1.45;
}

.admin-events {
  margin-top: clamp(48px, 8vw, 84px);
}

.admin-events h2 {
  margin: 0 0 20px;
  font-size: 1.5rem;
  font-weight: 500;
}

.admin-events-title {
  margin-top: 46px !important;
}

.event-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: clamp(20px, 4vw, 40px);
  border: 1px dashed var(--rule);
  background: rgba(255, 255, 255, 0.88);
}

.event-form label {
  display: grid;
  gap: 7px;
  font-size: 0.9rem;
}

.event-form input,
.event-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aeb9c4;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.event-form textarea {
  min-height: 110px;
  resize: vertical;
}

.event-form input:focus,
.event-form textarea:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(217, 0, 0, 0.18);
  outline-offset: 1px;
}

.event-form > button {
  width: fit-content;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
}

@keyframes nudge {
  50% { transform: translateY(-4px) scale(1.04); }
}

@media (max-width: 760px) {
  .page-shell {
    min-height: 0;
    padding: 28px 20px 56px;
  }

  .hero,
  .ticker,
  .intro-grid,
  .info-grid {
    width: 100%;
  }

  .site-nav {
    margin-bottom: 18px;
  }

  .hero {
    width: min(100%, 340px);
    height: clamp(105px, 31vw, 150px);
    margin-bottom: 18px;
  }

  .ticker {
    min-height: 68px;
  }

  .intro-grid,
  .info-grid {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .intro-grid {
    margin-top: 48px;
  }

  .marketplace {
    margin-top: 0;
  }

  .games-photo {
    width: min(100%, 330px);
  }

  .info-grid {
    margin-top: 54px;
  }

  .ticker-bottom {
    margin-top: 72px;
  }

  .inventory-header {
    margin-bottom: 40px;
    align-items: flex-start;
    flex-direction: column;
  }

  .inventory-header .site-nav {
    margin: 0;
  }

  .inventory-controls,
  .inventory-list {
    grid-template-columns: 1fr;
  }

  .game-form {
    grid-template-columns: 1fr;
  }

  .event-form {
    grid-template-columns: 1fr;
  }

  .wide-field,
  .checkbox-field {
    grid-column: auto;
  }

  .admin-heading,
  .admin-game-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .agenda-card {
    grid-template-columns: 1fr;
  }
}
