:root { color-scheme: light; }
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #ffffff;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: inherit; }
header { padding: 48px 24px 24px; text-align: center; }
header h1 { margin: 0 0 8px; font-size: 2rem; }
header p { margin: 0; color: #555; }
header h1.site-title { color: #dc2626; }
header p.site-subtitle {
  text-align: center;
  color: #2563eb;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 16px;
}
header p.browser-tip {
  margin-top: 12px;
  font-size: 0.8rem;
  color: #888;
  font-style: italic;
}
.back-link {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4338ca;
  text-decoration: none;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}
.subject-grid {
  max-width: 700px;
}
.subject-grid .card h2 { font-size: 1.4rem; }
.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.10); }
.card-body { padding: 24px 20px; text-align: center; }
.card h2 { margin: 0; font-size: 1.1rem; }
.card .count { color: #888; font-size: 0.85rem; margin-top: 8px; }
.card.winner {
  position: relative;
  overflow: visible;
  border: 2px solid #f59e0b;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}
.trophy-badge {
  position: absolute;
  top: -18px;
  right: -14px;
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25));
  transform: rotate(12deg);
}
.card.aesthetic {
  position: relative;
  overflow: visible;
  border: 2px solid #ec4899;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.25);
}
.aesthetic-badge {
  position: absolute;
  top: -18px;
  left: -14px;
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25));
  transform: rotate(-12deg);
}
.legend {
  max-width: 900px;
  margin: 0 auto 8px;
  padding: 0 24px;
  text-align: center;
  font-size: 0.8rem;
  color: #666;
}
.legend span { margin: 0 10px; white-space: nowrap; }
.gpu-badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #555;
  background: #f2f2f2;
  border-radius: 999px;
  padding: 3px 9px;
}
.model-stats {
  margin: 10px 0 0;
  font-size: 0.7rem;
  color: #888;
  line-height: 1.5;
}
.card-footer {
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4338ca;
  border-top: 1px solid #f0f0f0;
  text-align: center;
}
.applet-card .card-body { text-align: left; }
.applet-card h2 { font-size: 1.05rem; }
.description { margin: 8px 0 0; font-size: 0.85rem; color: #444; line-height: 1.4; }
.duration {
  display: inline-block;
  margin-top: 10px;
  margin-right: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4338ca;
  background: #eef2ff;
  border-radius: 999px;
  padding: 3px 9px;
}
.stage-breakdown {
  margin: 8px 0 0;
  font-size: 0.7rem;
  color: #888;
  line-height: 1.5;
}
.context-info {
  margin: 4px 0 0;
  font-size: 0.7rem;
  color: #aaa;
  line-height: 1.5;
}
.prompt-toggle {
  border-top: 1px solid #f0f0f0;
  padding: 10px 20px;
}
.prompt-toggle summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  list-style: none;
}
.prompt-toggle summary::-webkit-details-marker { display: none; }
.prompt-toggle summary::before { content: "\25B8  "; }
.prompt-toggle[open] summary::before { content: "\25BE  "; }
.prompt-text {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: #333;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 12px;
  white-space: pre-wrap;
  line-height: 1.4;
}
footer { text-align: center; color: #999; font-size: 0.8rem; padding: 24px; }
.workflow {
  max-width: 900px;
  margin: 0 auto 16px;
  padding: 0 24px;
  text-align: center;
}
.workflow h2 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #888;
  margin: 0 0 12px;
}
.workflow svg { width: 100%; height: auto; display: block; margin: 0 auto; }