/* GDD hub — index cards + detail pages */
:root {
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --paper: #f7f4ef;
  --rule: #d4cfc4;
  --accent: #8b3a2a;
  --card: #fffefb;
  --max: 44rem;
  --max-wide: 72rem;
  --font-body: "Noto Sans TC", "Segoe UI", system-ui, sans-serif;
  --font-ui: "Noto Sans TC", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #efe8dc 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #e7ebe4 0%, transparent 50%),
    var(--paper);
  font-family: var(--font-body);
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.site-header {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 0;
}

.index-header h1 {
  font-size: 1.85rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.lede {
  color: var(--muted);
  margin: 0;
  font-size: 1.02rem;
}

.back-link {
  font-size: 0.9rem;
  font-weight: 500;
}

.index {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  border-radius: 2px;
}

.tab:hover { border-color: var(--ink); }

.tab.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.card:hover { border-color: var(--ink); }

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link:hover { text-decoration: none; }

.card-art {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e8e4dc;
}

.card-art.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8e4dc 0%, #d4cfc4 100%);
  color: var(--muted);
  font-size: 0.95rem;
  padding: 1rem;
  text-align: center;
}

.card-body { padding: 0.85rem 1rem 1rem; }

.card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.badge {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.status-draft { background: #eceae6; color: var(--muted); }
.status-prototype { background: #e3ecf4; color: #2a4a6b; }
.status-playtest { background: #e8f2ea; color: var(--ok, #2f5d3a); }
.status-paused { background: #f5eed8; color: #6b5a2a; }
.status-archived { background: #eceae6; color: var(--muted); }

.genre-tag {
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--rule);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  line-height: 1.25;
}

.card-en {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.card-pitch {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.card-play {
  font-weight: 500;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  color: var(--accent);
}

.card-play:hover {
  background: var(--accent);
  color: var(--paper);
  text-decoration: none;
}

/* Detail page */
.detail {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem 4rem;
}

.detail-hero {
  margin-bottom: 1.25rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--rule);
}

.detail-hero img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.detail-hero.placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8e4dc 0%, #d4cfc4 100%);
  color: var(--muted);
}

.detail-head h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
}

.title-en {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-play {
  display: inline-block;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  background: var(--accent);
  color: var(--paper);
  border-radius: 2px;
  text-decoration: none;
}

.btn-play:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.dates { font-size: 0.8rem; color: var(--muted); }

.prose h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.75rem;
  font-weight: 600;
}

.prose h3 { font-size: 1rem; margin: 1.5rem 0 0.5rem; }

.prose p { margin: 0 0 1rem; }

.prose ul, .prose ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.prose li { margin-bottom: 0.35rem; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1rem 0;
}

.prose th, .prose td {
  border: 1px solid var(--rule);
  padding: 0.4rem 0.5rem;
  text-align: left;
}

.prose img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 2px;
  margin: 0.75rem 0;
}

.prose blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

@media print {
  body { background: white; }
  .tabs, .btn-play, .card-play { display: none; }
}
