.gx-root { position: relative; }
.gx-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-radius: 14px; margin-bottom: 16px;
  background: #fff3d6; border: 2px solid #d69e2e; color: #241914; font-weight: 700; font-size: 14px;
}
.gx-banner[hidden], [hidden] { display: none !important; }
.gx-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.gx-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gx-pill { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #fff3d6; color: #5c3d04; border: 1px solid #d69e2e; }
.gx-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.gx-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  padding: 18px; border-radius: 16px; background: #fff; border: 2px solid #e6d9c6;
  text-align: left; cursor: pointer; font-family: inherit; color: #241914;
  box-shadow: 0 4px 12px rgba(36, 25, 20, .06); transition: transform .15s ease, border-color .15s ease;
}
.gx-card:hover { transform: translateY(-2px); border-color: #c8323e; }
.gx-card[aria-pressed="true"] { border-color: #c8323e; background: #fff8f8; }
.gx-card-ico { font-size: 28px; line-height: 1; }
.gx-card-title { display: block; font-family: var(--font-display, Georgia, serif); font-size: 19px; font-weight: 700; margin: 0 0 4px; color: #241914; }
.gx-card p { font-size: 13px; color: #6e5c52; margin: 0; }
.gx-best { font-size: 12px; font-weight: 700; color: #1d6f52; }

.gx-arena {
  background: radial-gradient(circle at 20% 10%, #4e1d2f 0%, #2a131c 56%, #182923 100%);
  border-radius: 20px; padding: 20px; color: #fffdf7;
  box-shadow: 0 14px 36px rgba(28, 16, 14, .2);
}
.gx-hud { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.gx-hud-title { font-family: var(--font-display, Georgia, serif); font-size: 22px; font-weight: 700; margin: 0; color: #fff; }
.gx-hud-stat { padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.15); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gx-stage {
  position: relative; background: #141c2f; border-radius: 16px; border: 2px solid rgba(255,232,163,.35);
  overflow: hidden; min-height: 360px; display: flex; align-items: center; justify-content: center;
}
.gx-canvas { width: 100%; height: 380px; display: block; touch-action: none; cursor: crosshair; }

.gx-match-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 440px; padding: 20px; }
.gx-tile {
  aspect-ratio: 1; min-height: 68px; border-radius: 12px; border: 2px solid #d69e2e;
  background: #c8323e; color: #fff; font-size: 28px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: transform .15s ease, background .15s ease;
}
.gx-tile[data-open="1"] { background: #fbf5ea; color: #241914; }
.gx-tile[data-done="1"] { background: #1d6f52; border-color: #8fd1b5; color: #fff; }

.gx-words-box { width: 100%; max-width: 520px; padding: 24px; text-align: center; }
.gx-scram { font-family: ui-monospace, monospace; font-size: 32px; font-weight: 700; letter-spacing: .16em; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.1); margin: 12px 0 16px; }
.gx-word-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.gx-word-in { flex: 1; max-width: 280px; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 2px solid #d69e2e; background: #fff; color: #241914; font-size: 18px; font-weight: 700; text-transform: uppercase; }

.gx-end { margin-top: 16px; padding: 18px; border-radius: 16px; background: #fbf5ea; color: #241914; border: 2px solid #d69e2e; text-align: center; }
.gx-end-title { display: block; font-family: var(--font-display, Georgia, serif); font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.gx-end-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.gx-chal-grid { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e6d9c6; }
.gx-btn {
  min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid #d9c8b0;
  background: #fff; color: #241914; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.gx-btn-primary { background: #c8323e; border-color: #c8323e; color: #fff; }
.gx-btn-green { background: #1d6f52; border-color: #1d6f52; color: #fff; }
.gx-btn-sm { min-height: 40px; padding: 6px 12px; font-size: 13px; }

@media (max-width: 900px) { .gx-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .gx-cards { grid-template-columns: 1fr; }
  .gx-canvas { height: 340px; }
  .gx-end-actions button, .gx-end-actions a { width: 100%; }
}
