:root {
  --page: #f3f0e8;
  --panel: #fffdf6;
  --panel-border: #d9cda9;
  --text-main: #2d261c;
  --text-soft: #675d4d;
  --accent: #23543a;
  --accent-warm: #c89037;
  --correct: #2f6f4e;
  --present: #c89037;
  --absent: #786f62;
  --shadow-soft: 0 18px 44px rgba(47, 40, 28, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(120deg, rgba(35, 84, 58, 0.1), transparent 34%),
    radial-gradient(circle at 82% 14%, rgba(200, 144, 55, 0.14), transparent 28%),
    var(--page);
  color: var(--text-main);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}

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

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.breadcrumb {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.breadcrumb a {
  text-decoration: none;
  border-bottom: 1px solid rgba(102, 88, 69, 0.28);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy,
.hero-panel,
.game-shell,
.panel,
.faq-panel,
.related-panel,
.round-panel,
.seo-panel {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border-radius: 24px;
}

.hero-copy::after {
  content: "ORD";
  position: absolute;
  right: 28px;
  bottom: 18px;
  color: rgba(35, 84, 58, 0.12);
  font-size: 5.4rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  pointer-events: none;
}

.hero-panel,
.round-panel {
  padding: 28px;
  border-radius: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.15; }

h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  letter-spacing: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

p, ul, ol { margin-top: 0; }

.lead {
  max-width: 760px;
  color: var(--text-soft);
  font-size: 1.13rem;
}

.hero-actions,
.game-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button,
.game-button,
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #fffdf6;
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  text-decoration: none;
}

.button,
.game-button {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 1rem;
}

.button.primary,
.game-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf0;
}

.button:hover,
.button:focus-visible,
.game-button:hover,
.game-button:focus-visible,
.key:focus-visible {
  outline: 3px solid rgba(200, 144, 55, 0.28);
  outline-offset: 2px;
}

.game-shell {
  margin-bottom: 24px;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.96), rgba(248, 244, 234, 0.96)),
    var(--panel);
}

.status-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.status-item {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(246, 240, 228, 0.7);
  text-align: center;
}

.status-label {
  display: block;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status-item strong {
  display: block;
  min-height: 28px;
  font-size: 1.12rem;
}

.play-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(35, 84, 58, 0.2);
  border-radius: 8px;
  background: rgba(238, 244, 238, 0.72);
  color: var(--text-soft);
  font-size: 0.96rem;
}

.play-guide strong {
  color: var(--text-main);
}

.guide-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.guide-dot {
  display: inline-block;
  width: 16px;
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--absent);
}

.guide-dot.correct { background: var(--correct); }
.guide-dot.present { background: var(--present); }

.game-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(260px, 0.72fr);
  gap: 18px;
  align-items: stretch;
}

.board-wrap {
  display: grid;
  justify-items: center;
  min-height: 560px;
  padding: 22px;
  border: 1px solid rgba(35, 84, 58, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(35, 84, 58, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(35, 84, 58, 0.07) 1px, transparent 1px),
    #fbf6eb;
  background-size: 28px 28px;
}

.game-status {
  width: min(100%, 480px);
  min-height: 32px;
  margin: 0 0 16px;
  color: var(--text-soft);
  font-weight: 700;
  text-align: center;
}

.guess-board {
  display: grid;
  gap: 8px;
  width: min(100%, 330px);
  margin-bottom: 18px;
}

.guess-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.letter-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 2px solid rgba(35, 84, 58, 0.2);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.92);
  color: var(--text-main);
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.letter-tile.filled {
  border-color: rgba(35, 84, 58, 0.46);
  transform: scale(1.02);
}

.letter-tile.correct,
.key.correct {
  border-color: var(--correct);
  background: var(--correct);
  color: #fffaf0;
}

.letter-tile.present,
.key.present {
  border-color: var(--present);
  background: var(--present);
  color: #fffaf0;
}

.letter-tile.absent,
.key.absent {
  border-color: var(--absent);
  background: var(--absent);
  color: #fffaf0;
}

.keyboard {
  display: grid;
  gap: 7px;
  width: min(100%, 560px);
}

.key-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.key {
  min-width: 34px;
  min-height: 46px;
  padding: 0 9px;
  background: rgba(255, 253, 246, 0.94);
  font-size: 0.95rem;
}

.key.wide {
  min-width: 68px;
}

.round-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
  box-shadow: none;
}

#round-message,
.answer-note {
  color: var(--text-soft);
}

.answer-note {
  margin: 14px 0 0;
  font-weight: 700;
}

.seo-panel {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: 18px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.panel,
.faq-panel,
.related-panel {
  padding: 24px;
  border-radius: 18px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  padding: 14px 16px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.72);
}

summary {
  cursor: pointer;
  font-weight: 700;
}

details p {
  margin: 10px 0 0;
  color: var(--text-soft);
}

.related-panel { margin-top: 24px; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.related-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(246, 240, 228, 0.62);
  color: inherit;
  text-decoration: none;
}

.related-card span {
  color: var(--text-soft);
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .hero,
  .game-layout,
  .content-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy::after { opacity: 0.2; }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-panel,
  .game-shell,
  .panel,
  .faq-panel,
  .related-panel,
  .round-panel,
  .seo-panel {
    padding: 18px;
    border-radius: 14px;
  }

  .status-bar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .board-wrap {
    min-height: 0;
    padding: 14px;
  }

  .guess-board {
    gap: 6px;
  }

  .guess-row {
    gap: 6px;
  }

  .key {
    min-width: 27px;
    min-height: 42px;
    padding: 0 6px;
    font-size: 0.82rem;
  }

  .key.wide {
    min-width: 54px;
  }
}
