/* An Ordinary Company: the card shop at night. Near-black blue-purple, light text, one amber accent (the sign's
 * colour), pink and cyan used sparingly. System fonts only. */
:root {
  --night: #0c0a18;
  --night-2: #141026;
  --panel: #1a1532;
  --line: #2e2652;
  --text: #ece8f8;
  --muted: #b9b0d8;
  --amber: #ffb84d;
  --amber-2: #ffd08a;
  --pink: #ff5cbf;
  --cyan: #4fe3ff;
}

* { box-sizing: border-box; }

html { background: var(--night); color-scheme: dark; }

body {
  margin: 0;
  color: var(--text);
  background: var(--night);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 1rem; }

a { color: var(--cyan); }
a:hover { color: var(--text); }
a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.top {
  background: var(--night-2);
  border-bottom: 3px solid var(--amber);
}
.top .wrap { padding-top: 1.1rem; padding-bottom: 1rem; }
.top h1 { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: 0.02em; color: var(--amber); }
.lede { margin: 0.2rem 0 0; color: var(--muted); }

.room { margin: 1.25rem 0 0.5rem; }

.frame {
  background: #08060e;
  border: 4px solid var(--line);
  border-radius: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  line-height: 0;
}

#office {
  display: block;
  margin: 0 auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.controls { display: flex; align-items: center; gap: 0.9rem; margin-top: 0.6rem; flex-wrap: wrap; }

button {
  font: inherit;
  font-weight: 600;
  color: #1a1206;
  background: var(--amber);
  border: 2px solid var(--amber-2);
  border-radius: 4px;
  padding: 0.35rem 1.1rem;
  min-width: 5.5rem;
  cursor: pointer;
}
button:hover { background: var(--amber-2); }
button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
button:disabled { opacity: 0.6; cursor: default; }

.note { margin: 0; color: var(--muted); font-size: 0.95rem; }

.games {
  margin-top: 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.7rem 0.9rem 0.8rem;
}
.games h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.standings {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.2rem 1.2rem;
}
.standings li { display: flex; justify-content: space-between; gap: 0.6rem; border-bottom: 1px solid var(--line); }
.standings .who { font-weight: 600; }
.standings .score { color: var(--muted); font-variant-numeric: tabular-nums; }

.agents h2 {
  font-size: 1.3rem;
  margin: 1.6rem 0 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--line);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 0.9rem;
}

.card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--pink);
  border-radius: 6px;
  padding: 0.8rem 0.9rem;
}
.card:nth-child(even) { border-left-color: var(--cyan); }
.card h3 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.card p { margin: 0; }
.card .deck { margin-top: 0.45rem; color: var(--muted); font-size: 0.95rem; }
.pronouns { font-weight: 400; font-size: 0.9rem; color: var(--muted); margin-left: 0.3rem; }

.portrait {
  flex: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #0c0a18;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px;
  box-sizing: content-box;
}

.how, .owner { max-width: 52rem; margin: 1.2rem 0 0; }
.owner { margin-top: 0.8rem; }

.foot {
  margin-top: 2.2rem;
  background: var(--night-2);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.foot .wrap { padding-top: 1rem; padding-bottom: 1.2rem; }
.foot p { margin: 0.2rem 0; }
.disclaimer { color: var(--text); font-weight: 600; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 520px) {
  .top h1 { font-size: 1.35rem; }
  .cards { grid-template-columns: 1fr; }
  .standings { grid-template-columns: 1fr; }
  .frame { border-width: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
