:root {
  color-scheme: light;
  --ink: #142038;
  --muted: #647089;
  --surface: #ffffff;
  --soft: #f2f5fb;
  --line: #dfe5ef;
  --accent: #6658e8;
  --accent-dark: #493bbd;
  --accent-soft: #eceafe;
  --shadow: 0 18px 50px rgba(31, 40, 72, 0.09);
  font-family: Inter, "Yu Gothic UI", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #f8f9fc; line-height: 1.7; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  height: 72px; padding: 0 max(24px, calc((100vw - 1120px) / 2)); display: flex;
  align-items: center; gap: 14px; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: white; background: var(--accent); font-size: .78rem; letter-spacing: .03em; }
.beta-label { padding: 3px 9px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 99px; font-size: .75rem; font-weight: 700; }

main { min-height: 70vh; }
.hero { padding: 80px max(24px, calc((100vw - 900px) / 2)) 68px; text-align: center; background: radial-gradient(circle at 50% 0%, #efedff 0, #f8f9fc 55%); }
.eyebrow { margin: 0 0 7px; color: var(--accent-dark); font-size: .77rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.25rem, 7vw, 4.4rem); line-height: 1.15; letter-spacing: -.055em; }
.hero-copy { max-width: 610px; margin: 20px auto 36px; color: var(--muted); }
.search-wrap { max-width: 720px; margin: 0 auto; text-align: left; position: relative; }
.search-wrap > label { display: block; margin-bottom: 8px; font-weight: 750; }
.search-control { display: flex; gap: 10px; }
.search-control input { min-width: 0; flex: 1; padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); outline: none; }
.search-control input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.field-help { margin: 8px 2px 0; color: var(--muted); font-size: .82rem; }
.secondary-button, .primary-button, .text-button { border: 0; border-radius: 11px; cursor: pointer; font-weight: 750; }
.secondary-button { padding: 0 18px; color: var(--ink); background: var(--soft); }
.primary-button { padding: 10px 16px; color: white; background: var(--accent); }
.primary-button:hover { background: var(--accent-dark); }
.text-button { padding: 8px 0; color: var(--accent-dark); background: transparent; }
.search-results { position: absolute; z-index: 5; width: 100%; margin-top: 8px; border-radius: 14px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.search-result { width: 100%; display: flex; justify-content: space-between; gap: 16px; padding: 13px 17px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: white; text-align: left; cursor: pointer; }
.search-result:hover, .search-result:focus { background: var(--accent-soft); }
.search-result span { color: var(--muted); white-space: nowrap; }
.empty-message { margin: 0; padding: 14px 17px; color: var(--muted); }

.content-section { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 72px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.3rem); letter-spacing: -.035em; }
.section-heading > p { margin: 0; color: var(--muted); }
.game-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.game-card { min-height: 128px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--surface); text-align: left; cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.game-card:hover { transform: translateY(-3px); border-color: #bdb6ff; box-shadow: var(--shadow); }
.game-card span { color: var(--muted); font-size: .8rem; }
.status-message { margin-bottom: 18px; color: var(--muted); }
.news-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.news-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 8px 26px rgba(31,40,72,.05); }
.news-card h3 { margin: 5px 0 17px; line-height: 1.45; }
.article-meta { margin: 0; color: var(--muted); font-size: .82rem; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 7px; }
.keyword-badge { padding: 3px 9px; border-radius: 99px; color: var(--accent-dark); background: var(--accent-soft); font-size: .73rem; font-weight: 750; }
.card-actions { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.card-actions a, .primary-link { color: var(--accent-dark); font-weight: 750; text-decoration: none; }
.article-section article { padding: clamp(24px, 6vw, 58px); border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.article-section h2 { margin: 8px 0 16px; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.35; }
.article-body { margin: 28px 0 34px; padding-top: 30px; border-top: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.translation-panel { margin: 18px 0 28px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fbfcff; }
.translation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.translation-status { color: var(--muted); font-size: .86rem; }
.translation-result { margin-top: 18px; padding: 18px; border-radius: 14px; background: var(--accent-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.translation-result--notice { border: 1px solid #ffd6a3; color: #65410f; background: #fff7e8; }
.primary-link { display: inline-block; padding: 12px 16px; border-radius: 10px; background: var(--accent-soft); }
.is-hidden { display: none; }

footer { padding: 42px max(24px, calc((100vw - 1120px) / 2)); color: var(--muted); background: #ecf0f7; font-size: .78rem; }
footer p { margin: 4px 0; }
.site-version { margin-top: 14px; opacity: .72; font-size: .72rem; }

@media (max-width: 860px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .news-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero { padding-top: 55px; }
  .content-section { width: min(100% - 30px, 1120px); padding: 52px 0; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 7px; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card { min-height: 100px; }
  .search-control { display: grid; grid-template-columns: 1fr auto; }
  .translation-actions { display: grid; align-items: stretch; }
  .translation-actions .primary-button { width: 100%; }
}
