:root {
  color-scheme: light;
  --ink: #1d1914;
  --muted: #5e564c;
  --paper: #f3efe6;
  --card: #fffdf8;
  --line: #e3d9cb;
  --accent: #6d3d2c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  line-height: 1.5;
}

a { color: var(--accent); }

a:hover { text-decoration-thickness: 2px; }

.wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.top {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.brand {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  min-width: 0;
}

.brand img {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: contain;
  flex: none;
  background: transparent;
}

.eyebrow {
  margin: 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}

.brand h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand p {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

nav {
  display: flex;
  gap: 0.9rem;
  margin: 1.25rem 0 1.5rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.1rem;
}

nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.icon-setting {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.45rem 0.7rem 0.55rem;
  background: var(--card);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
}

.icon-setting legend {
  padding: 0 0.25rem;
  color: var(--muted);
}

.icon-setting label {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin: 0.15rem 0;
}

.lede, .note {
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1.1rem 1.15rem 1.2rem;
}

.card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  line-height: 1.25;
}

.meta {
  margin: 0.2rem 0;
}

.meta span, .when {
  color: var(--muted);
}

.empty {
  margin: 0.2rem 0;
  font-size: 1.2rem;
}

.embed {
  margin-top: 1rem;
}

.embed.youtube {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.embed.youtube iframe,
.embed.apple iframe {
  width: 100%;
  border: 0;
  border-radius: 0.6rem;
  background: #111;
}

.embed.youtube iframe {
  position: absolute;
  inset: 0;
  height: 100%;
}

.embed.apple iframe {
  height: 175px;
}

.rules { padding-left: 1.2rem; }

.rules li { margin: 0.85rem 0; }

.rule-id {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
}

pre.status {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem 1.05rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
}

footer {
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

footer p { margin: 0.4rem 0; }

@media (max-width: 640px) {
  .top { flex-direction: column; }
  .brand img { width: 4.5rem; height: 4.5rem; }
  .brand h1 { font-size: 1.7rem; }
}
