/* ポーカー用語辞典 — Felt Ledger */
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@500;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

:root {
  --ink: #18231e;
  --muted: #5a6a61;
  --faint: #8a9a90;
  --paper: #eef2ef;
  --surface: #fbfcfb;
  --felt: #1e4a38;
  --felt-mid: #2f6b52;
  --line: #c9d4cc;
  --line-strong: #9aada1;
  --suit-red: #a61e2c;
  --warn: #8a6a20;
  --font-display: "Shippori Mincho", "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --radius: 4px;
  --max: 1120px;
  --max-article: 760px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(30, 74, 56, 0.07), transparent),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 11px,
      rgba(30, 74, 56, 0.015) 11px,
      rgba(30, 74, 56, 0.015) 12px
    );
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--felt);
  color: #fff;
}

a { color: var(--felt-mid); }
a:hover { color: var(--felt); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 4rem;
}

.container.article {
  max-width: var(--max-article);
}

/* ----- Header / Brand ----- */
header.site-header,
body > .container > header {
  text-align: left;
  margin-bottom: 2.25rem;
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--felt);
  margin-bottom: 0.85rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

h1 small,
.subtitle-en {
  display: block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 0.45rem;
}

.subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 0.75rem;
  max-width: 36em;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.back-link:hover {
  color: var(--felt);
  border-bottom-color: var(--felt);
}

/* ----- Nav ----- */
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0;
  margin-top: 1.35rem;
  align-items: center;
}

.nav-link {
  display: inline;
  padding: 0.2rem 0;
  margin-right: 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
  background: none;
  border-radius: 0;
  box-shadow: none;
}
.nav-link:hover {
  color: var(--felt);
  border-bottom-color: var(--felt);
  opacity: 1;
  transform: none;
}
.nav-link-purple,
.nav-link-teal,
.nav-link-rose,
.nav-link-amber {
  background: none !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

/* ----- Intro ----- */
.intro {
  max-width: 42rem;
  margin: 0 0 2rem;
  padding: 0 0 1.75rem;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.intro h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.7rem;
}
.intro p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.intro p:last-child { margin-bottom: 0; }
.intro strong { color: var(--ink); font-weight: 700; }
.intro a {
  color: var(--felt);
  text-decoration: none;
  border-bottom: 1px solid rgba(30, 74, 56, 0.35);
}
.intro a:hover { border-bottom-color: var(--felt); }

/* ----- Controls ----- */
.control-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.4rem;
  margin-bottom: 1.75rem;
  box-shadow: none;
}

.extra-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.icon-btn:hover {
  border-color: var(--felt);
  color: var(--felt);
  background: rgba(30, 74, 56, 0.04);
}
.icon-btn.active {
  background: var(--felt);
  border-color: var(--felt);
  color: #fff;
}

.search-container {
  position: relative;
  margin-bottom: 1rem;
}
.search-container::before {
  content: none;
}

input[type="text"] {
  width: 100%;
  background: var(--paper);
  color: var(--ink);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.98rem;
  font-family: inherit;
  font-weight: 400;
  transition: border-color 0.2s, background 0.2s;
}
input[type="text"]::placeholder { color: var(--faint); }
input[type="text"]:hover {
  border-color: var(--felt-mid);
  box-shadow: none;
  background: #fff;
  transform: none;
}
input[type="text"]:focus {
  outline: none;
  border-color: var(--felt);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 74, 56, 0.12);
  transform: none;
}

.category-tabs,
.level-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.level-tabs { margin-top: 0.75rem; }

.category-btn,
.level-btn {
  padding: 0.4rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.category-btn:hover,
.level-btn:hover {
  color: var(--ink);
  border-color: var(--line);
  transform: none;
  background: rgba(0, 0, 0, 0.02);
}
.category-btn.active,
.level-btn.active {
  color: #fff;
  background: var(--felt);
  border-color: var(--felt);
  box-shadow: none;
  font-weight: 700;
}

/* ----- Glossary grid ----- */
.glossary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .glossary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .glossary-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

.term-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.1rem;
  transition: border-color 0.25s ease;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}
.term-card::before { content: none; }
.term-card:hover {
  border-color: var(--felt-mid);
  box-shadow: none;
  transform: none;
  background: #fff;
}

.term-card.essential {
  border-color: var(--felt);
  border-left-width: 3px;
  background: var(--surface);
}
.term-card.essential::after {
  content: "重要";
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--felt);
  background: none;
  padding: 0;
  border-radius: 0;
}
.term-card.essential:hover {
  border-color: var(--felt);
  box-shadow: none;
}

.term-card:target,
.term-card.highlight-term {
  border-color: var(--felt);
  box-shadow: 0 0 0 3px rgba(30, 74, 56, 0.15);
}

.category-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--felt);
  margin-bottom: 0.55rem;
  letter-spacing: 0.06em;
  display: inline-block;
  background: none;
  padding: 0;
  border-radius: 0;
}

.term-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
  line-height: 1.35;
}
.term-card:hover .term-name {
  color: var(--felt);
}

.term-english {
  font-size: 0.8rem;
  color: var(--faint);
  margin-bottom: 0.75rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 400;
}

.term-divider {
  width: 1.75rem;
  height: 2px;
  background: var(--line-strong);
  margin-bottom: 0.85rem;
  border-radius: 0;
}
.term-card:hover .term-divider {
  background: var(--felt);
  width: 2.5rem;
}

.term-description {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
  flex-grow: 1;
}

.level-badge {
  display: inline;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0;
  margin-left: 0.45rem;
  border-radius: 0;
  letter-spacing: 0.04em;
  background: none !important;
}
.level-shokyu { color: var(--felt-mid); }
.level-chukyu { color: var(--warn); }
.level-jokyu  { color: var(--suit-red); }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.learned-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--faint);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.28rem 0.55rem;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.learned-btn:hover { border-color: var(--felt); color: var(--felt); }
.learned-btn.learned {
  border-color: var(--felt);
  color: var(--felt);
  background: rgba(30, 74, 56, 0.06);
}
.term-card.is-learned { opacity: 0.5; }
.term-card.is-learned:hover { opacity: 0.85; }

.term-link {
  background: none;
  border: none;
  color: var(--faint);
  font-size: 0.76rem;
  cursor: pointer;
  font-family: inherit;
  padding: 0.28rem 0.4rem;
  border-radius: var(--radius);
  transition: color 0.2s;
}
.term-link:hover {
  color: var(--felt);
  background: none;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty-state p {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.empty-state small {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
}

.stats {
  color: var(--faint);
  text-align: left;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
}

footer.site-footer,
footer {
  text-align: center;
  color: var(--faint);
  font-size: 0.82rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--felt); }

/* ----- Modal / flash ----- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(24, 35, 30, 0.72);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: none;
}
.modal-overlay.open { display: flex; }

.flash-card-wrap {
  perspective: 1200px;
  width: min(420px, 92vw);
}
.flash-card {
  position: relative;
  width: 100%;
  min-height: 280px;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  cursor: pointer;
}
.flash-card.flipped { transform: rotateY(180deg); }

.flash-front,
.flash-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.flash-front {
  background: var(--surface);
  border: 1px solid var(--line-strong);
}
.flash-back {
  background: #fff;
  border: 1px solid var(--felt);
  transform: rotateY(180deg);
}
.flash-term {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.flash-en { font-size: 0.85rem; color: var(--faint); font-family: ui-monospace, monospace; }
.flash-hint { font-size: 0.8rem; color: var(--faint); margin-top: 1.25rem; }
.flash-desc { font-size: 0.95rem; color: var(--muted); line-height: 1.7; }

.flash-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.flash-nav {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
}
.flash-nav:hover { border-color: var(--felt); color: var(--felt); }
.flash-counter { color: #fff; font-size: 0.85rem; min-width: 70px; text-align: center; }
.flash-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}
.flash-close:hover { border-color: #fff; color: #fff; }

.scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: var(--felt);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 500;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: none; box-shadow: none; background: var(--felt-mid); }

/* ----- Article pages ----- */
.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.15rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.9rem;
}
.section p,
p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}
.section p:last-child,
p:last-child { margin-bottom: 0; }
strong { color: var(--ink); }

.step-list { display: flex; flex-direction: column; gap: 1rem; }
.step-item { display: grid; grid-template-columns: 2rem 1fr; gap: 0.9rem; align-items: start; }
.step-num {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  background: var(--felt);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-title { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 0.2rem; }
.step-desc { font-size: 0.88rem; color: var(--muted); }

.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.7rem;
}
.term-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.term-item-name { font-weight: 700; color: var(--ink); font-size: 0.92rem; margin-bottom: 0.2rem; }
.term-item-en { font-size: 0.72rem; color: var(--faint); font-family: ui-monospace, monospace; margin-bottom: 0.35rem; }
.term-item-desc { font-size: 0.82rem; color: var(--muted); }

.highlight {
  background: rgba(30, 74, 56, 0.06);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--felt);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1rem 0;
}
.highlight p { color: var(--ink); margin-bottom: 0; }

ul { padding-left: 1.25rem; color: var(--muted); font-size: 0.95rem; }
li { margin-bottom: 0.35rem; }
li::marker { color: var(--felt); }

.next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}
.next-link {
  display: inline;
  padding: 0;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--felt);
  border-bottom: 1px solid rgba(30, 74, 56, 0.35);
  background: none !important;
  transition: border-color 0.2s;
}
.next-link:hover {
  opacity: 1;
  transform: none;
  border-bottom-color: var(--felt);
}
.nl-purple, .nl-amber, .nl-teal { background: none !important; color: var(--felt) !important; }

/* AKQ / rule cards */
.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.rule-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}
.rule-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--felt);
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

/* Hands ranking */
.hand-list { display: flex; flex-direction: column; gap: 0.75rem; }
.hand-card {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.9rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  transition: border-color 0.2s;
}
.hand-card:hover {
  transform: none;
  border-color: var(--felt-mid);
}
.rank-num {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}
.rank-1 { background: var(--felt); color: #fff; border-color: var(--felt); }
.rank-2, .rank-3 { background: var(--surface); color: var(--felt); border-color: var(--felt-mid); }

.hand-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
}
.hand-en { font-size: 0.78rem; color: var(--faint); margin-bottom: 0.45rem; }
.hand-desc { font-size: 0.88rem; color: var(--muted); }
.hand-example { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.45rem 0 0.55rem; }
.card-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.2rem 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: ui-monospace, monospace;
}
.card-chip.red { color: var(--suit-red); }
.card-chip.black { color: var(--ink); }

/* Position table */
.table-wrap { margin-bottom: 1.5rem; }
.poker-table {
  position: relative;
  width: 100%;
  aspect-ratio: 1.6 / 1;
  max-height: 360px;
  margin: 0 auto;
}
.table-felt {
  position: absolute;
  inset: 12% 8%;
  background: var(--felt);
  border-radius: 50%;
  border: 8px solid #2a3d34;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.table-label {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  line-height: 1.5;
}
.seat {
  position: absolute;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  z-index: 2;
}
.seat-btn { left: 88%; top: 50%; border-color: var(--felt); color: var(--felt); }
.seat-sb  { left: 72%; top: 82%; }
.seat-bb  { left: 28%; top: 82%; }
.seat-utg { left: 12%; top: 50%; }
.seat-hj  { left: 28%; top: 18%; }
.seat-co  { left: 72%; top: 18%; }

.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.7rem;
}
.pos-card {
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  background: var(--paper);
}
.pos-card-head { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.4rem; }
.pos-dot { width: 8px; height: 8px; border-radius: 1px; flex-shrink: 0; background: var(--felt); }
.pos-card-name { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.pos-card-desc { font-size: 0.84rem; color: var(--muted); }

.advantage-bar {
  height: 4px;
  border-radius: 0;
  background: var(--line);
  overflow: hidden;
  margin-top: 0.55rem;
}
.advantage-fill {
  height: 100%;
  border-radius: 0;
  background: var(--felt);
}

@media (max-width: 640px) {
  .container { padding: 1.5rem 1rem 3rem; }
  header.site-header,
  body > .container > header { text-align: left; }
  .nav-link { margin-right: 0.85rem; font-size: 0.84rem; }
}

/* Position seats — detailed chips */
.seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 0.55rem;
  min-width: 4.5rem;
}
.seat-chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--felt);
}
.seat-label {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted);
}
.seat-btn {
  background: var(--felt);
  border-color: var(--felt);
}
.seat-btn .seat-chip,
.seat-btn .seat-label { color: #fff; }

@media (max-width: 560px) {
  .poker-table { aspect-ratio: 1.15 / 1; max-height: none; }
  .seat { min-width: 3.2rem; padding: 0.3rem 0.35rem; }
  .seat-label { display: none; }
}

/* Tables (AKQ etc.) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
th, td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}
th {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line-strong);
}
td strong { color: var(--ink); }


/* Site nav + related */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  padding: 0.65rem 0 0.9rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--felt);
  border-bottom-color: var(--felt);
}
.related-nav {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.related-nav-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin-bottom: 0.55rem;
}
.related-nav .next-links { margin-top: 0; }
.site-nav a:focus-visible,
.nav-link:focus-visible,
.icon-btn:focus-visible,
.category-btn:focus-visible,
.level-btn:focus-visible,
.learned-btn:focus-visible,
.term-link:focus-visible,
input[type="text"]:focus-visible,
.flash-nav:focus-visible,
.flash-close:focus-visible {
  outline: 2px solid var(--felt);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .flash-card { transition: none; }
}

.storage-note {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--faint);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.84rem;
  color: var(--faint);
  margin-bottom: 1.25rem;
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.breadcrumbs a:hover {
  color: var(--felt);
  border-bottom-color: var(--felt);
}
.review-note {
  background: rgba(138, 106, 32, 0.08);
  border: 1px solid rgba(138, 106, 32, 0.35);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  color: var(--ink);
  font-size: 0.9rem;
}
.related-list { padding-left: 1.2rem; }
.related-list a { color: var(--felt); }
.muted { color: var(--muted); font-size: 0.9rem; }
.card-footer-links {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}
a.term-link {
  text-decoration: none;
  color: var(--felt);
  font-size: 0.76rem;
  padding: 0.28rem 0.4rem;
}
a.term-link:hover { text-decoration: underline; }
.footer-links { margin-top: 0.5rem; font-size: 0.8rem; }
.footer-links a { color: var(--muted); margin: 0 0.15rem; }
.icon-btn, .category-btn, .level-btn, .learned-btn, .flash-nav, .flash-close { min-height: 44px; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--paper);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  border: 1px solid var(--line);
}
