:root {
  --page: #f3f0e8;
  --panel: #fffdf6;
  --panel-soft: #f7ecd9;
  --panel-border: #d9cda9;
  --text-main: #2d261c;
  --text-soft: #675d4d;
  --accent: #23543a;
  --accent-warm: #c89037;
  --red: #a33b35;
  --black: #24201a;
  --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.09), transparent 34%),
    radial-gradient(circle at 82% 14%, rgba(200, 144, 55, 0.16), 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(1180px, 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,
.table-center,
.player-area,
.opponent-card {
  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: "";
  position: absolute;
  right: 32px;
  bottom: 24px;
  width: 170px;
  height: 128px;
  border: 1px solid rgba(35, 84, 58, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(135deg, transparent 44%, rgba(35, 84, 58, 0.18) 45% 47%, transparent 48%),
    linear-gradient(45deg, transparent 44%, rgba(200, 144, 55, 0.22) 45% 47%, transparent 48%),
    rgba(255, 253, 246, 0.82);
  transform: rotate(-7deg);
  opacity: 0.72;
  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 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #fffdf6;
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.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,
.card-button:focus-visible {
  outline: 3px solid rgba(200, 144, 55, 0.28);
  outline-offset: 2px;
}

.game-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.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.15rem;
}

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

.table-area {
  display: grid;
  gap: 14px;
}

.opponents {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.opponent-card {
  padding: 14px;
  border-radius: 14px;
  box-shadow: none;
}

.opponent-card.active,
.player-area.active {
  border-color: var(--accent-warm);
  box-shadow: 0 0 0 3px rgba(200, 144, 55, 0.18);
}

.opponent-name,
.player-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.opponent-card h3,
.player-head h2 {
  margin: 0;
}

.opponent-meta {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.role-pill,
.hand-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eadfc7;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.role-pill.done {
  background: rgba(35, 84, 58, 0.14);
  color: var(--accent);
}

.table-center {
  min-height: 230px;
  padding: 22px;
  border-radius: 18px;
  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: 30px 30px;
  text-align: center;
}

.table-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-height: 82px;
  margin: 12px 0;
}

.game-message {
  min-height: 30px;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-weight: 700;
}

.table-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.table-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.72);
}

.player-area {
  padding: 18px;
  border-radius: 18px;
  box-shadow: none;
}

.hand {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 104px;
  margin: 14px 0;
}

.card-button,
.mini-card {
  display: grid;
  place-items: center;
  width: 58px;
  height: 82px;
  border: 1px solid #cfc3a7;
  border-radius: 9px;
  background: #fffdf8;
  color: var(--black);
  box-shadow: 0 7px 14px rgba(47, 40, 28, 0.12);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
}

.card-button {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.card-button:hover:not(:disabled) {
  transform: translateY(-3px);
}

.card-button.selected {
  transform: translateY(-10px);
  border-color: var(--accent);
  background: #edf5ec;
}

.card-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.card-button.red,
.mini-card.red {
  color: var(--red);
}

.card-face {
  display: grid;
  gap: 3px;
  text-align: center;
}

.card-suit {
  font-size: 1.18rem;
}

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

#round-message {
  color: var(--text-soft);
}

.finish-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 1.25rem;
}

.finish-list li {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(246, 240, 228, 0.62);
}

.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: 920px) {
  .hero,
  .game-layout,
  .content-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .opponents {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero-copy,
  .hero-panel,
  .game-shell,
  .panel,
  .faq-panel,
  .related-panel,
  .round-panel,
  .table-center,
  .player-area {
    padding: 18px;
  }

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

  .card-button,
  .mini-card {
    width: 48px;
    height: 70px;
    font-size: 0.98rem;
  }

  .game-toolbar .game-button {
    flex: 1 1 100%;
  }
}
