/* Game room: one clear category at a time, with every available word game visible. */
/* The legacy shell reserves a fixed desktop canvas; only this responsive page opts out. */
body.gh-page { width: 100%; min-width: 0; }
body.gh-page .app-shell { width: 100%; min-width: 0; max-width: 100%; }
body.gh-page .app-body { flex: 1 1 0; width: auto; min-width: 0; }
body.gh-page .app-body > .container { width: 100%; min-width: 0; max-width: 100%; }
body.gh-page .main-tagline { min-width: 0; }

#view-game .gh-hub {
  --gh-ink: #17233c;
  --gh-muted: #65738a;
  --gh-line: #e4eaf3;
  --gh-accent: #4f72f2;
  --gh-tint: #eef2ff;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 4px 0 24px;
  color: var(--gh-ink);
  font-size: 14px;
}
#view-game .gh-hub * { box-sizing: border-box; }
#view-game .gh-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border: 1px solid #dde5fc;
  border-radius: 20px;
  background: linear-gradient(110deg, #f0f4ff, #f8faff 72%);
}
#view-game .gh-eyebrow {
  display: block;
  margin: 0 0 8px;
  color: #435ed1;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}
#view-game .gh-hero h1 {
  margin: 0;
  color: var(--gh-ink);
  font-size: 32px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -.04em;
}
#view-game .gh-hero p:not(.gh-eyebrow) {
  margin: 10px 0 0;
  color: #53637f;
  font-size: 15px;
  line-height: 1.65;
  word-break: keep-all;
}
#view-game .gh-hero-badge {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  max-width: 200px;
  padding: 13px 16px;
  border: 1px solid #d6e0ff;
  border-radius: 14px;
  color: #3856cb;
  background: #fff;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}
#view-game .gh-hero-badge svg { width: 28px; height: 28px; flex: 0 0 28px; }
#view-game .gh-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 28px;
}
#view-game .gh-category,
#view-game .gh-panel { --gh-accent: #4f72f2; --gh-deep: #3656c5; --gh-tint: #eef2ff; }
#view-game [data-gh-category="grammar"],
#view-game [data-gh-panel="grammar"] { --gh-accent: #159a68; --gh-deep: #11784f; --gh-tint: #eaf8f1; }
#view-game [data-gh-category="reading"],
#view-game [data-gh-panel="reading"] { --gh-accent: #ca791c; --gh-deep: #a55f12; --gh-tint: #fff5e6; }
#view-game [data-gh-category="logic"],
#view-game [data-gh-panel="logic"] { --gh-accent: #7560d8; --gh-deep: #614ac1; --gh-tint: #f2eeff; }
#view-game .gh-category {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
  min-height: 86px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--gh-line);
  border-radius: 14px;
  background: #fff;
  color: var(--gh-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
#view-game .gh-category[aria-selected="true"] {
  border-color: var(--gh-accent);
  background: var(--gh-tint);
  box-shadow: inset 0 0 0 1px var(--gh-accent);
}
#view-game .gh-category-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gh-tint);
  color: var(--gh-deep);
}
#view-game .gh-category[aria-selected="true"] .gh-category-icon { color: #fff; background: var(--gh-accent); }
#view-game .gh-category-icon svg { display: block; width: 26px; height: 26px; }
#view-game .gh-category-copy { display: grid; gap: 5px; min-width: 0; }
#view-game .gh-category-copy strong { color: var(--gh-ink); font-size: 17px; font-weight: 800; line-height: 1.25; word-break: keep-all; }
#view-game .gh-category-copy span { color: var(--gh-muted); font-size: 14px; line-height: 1.3; word-break: keep-all; }
#view-game .gh-category[aria-selected="true"] .gh-category-copy strong { color: var(--gh-deep); }
#view-game .gh-panel[hidden] { display: none !important; }
#view-game .gh-panel { min-width: 0; }
#view-game .gh-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 17px;
}
#view-game .gh-panel-copy { min-width: 0; }
#view-game .gh-panel-copy h2 { margin: 0; color: var(--gh-ink); font-size: 23px; font-weight: 800; line-height: 1.35; letter-spacing: -.035em; }
#view-game .gh-panel-copy p { margin: 6px 0 0; color: var(--gh-muted); font-size: 14px; line-height: 1.6; word-break: keep-all; }
#view-game .gh-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid var(--gh-line);
  border-radius: 999px;
  color: var(--gh-deep);
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}
#view-game .gh-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
#view-game .gh-panel[data-gh-panel]:not([data-gh-panel="vocab"]) .gh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#view-game .gh-card {
  --gh-card-accent: #3656c5;
  --gh-card-tint: #eef2ff;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  min-width: 0;
  min-height: 208px;
  margin: 0;
  padding: 17px 15px 13px;
  overflow: hidden;
  border: 1px solid var(--gh-line);
  border-radius: 16px;
  color: var(--gh-ink);
  background: #fff;
  box-shadow: 0 3px 0 #edf1f7;
  font: inherit;
  text-align: left;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}
#view-game .gh-card::before,
#view-game .gh-card::after { content: none; display: none; }
#view-game .gh-card[data-gh-group="context"] { --gh-card-accent: #11784f; --gh-card-tint: #eaf8f1; }
#view-game .gh-card[data-gh-group="relations"] { --gh-card-accent: #614ac1; --gh-card-tint: #f2eeff; }
#view-game .gh-card[data-gh-group="speed"] { --gh-card-accent: #a55f12; --gh-card-tint: #fff5e6; }
#view-game .gh-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin: 0 0 15px; }
#view-game .gh-game-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; color: var(--gh-card-accent); background: var(--gh-card-tint); }
#view-game .gh-game-icon svg { display: block; width: 25px; height: 25px; }
#view-game .gh-number { color: #8995a9; font-size: 14px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
#view-game .gh-card-title { display: block; margin: 0; color: var(--gh-ink); font-size: 17px; font-weight: 800; line-height: 1.45; letter-spacing: -.035em; word-break: keep-all; overflow-wrap: anywhere; }
#view-game .gh-card-title strong { font: inherit; color: inherit; }
#view-game .gh-card-desc { display: block; margin: 6px 0 16px; color: var(--gh-muted); font-size: 14px; font-weight: 400; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; }
#view-game .gh-card-desc span { font: inherit; color: inherit; }
#view-game .gh-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; margin-top: auto; padding-top: 11px; border-top: 1px solid #edf1f7; }
#view-game .gh-kind { color: var(--gh-card-accent); font-size: 14px; font-weight: 750; line-height: 1.4; }
#view-game .gh-arrow { display: inline-grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 50%; color: var(--gh-card-accent); background: var(--gh-card-tint); }
#view-game .gh-arrow svg,
#view-game svg.gh-arrow { width: 20px; height: 20px; }
#view-game .gh-card-upcoming { --gh-card-accent: var(--gh-deep); --gh-card-tint: var(--gh-tint); background: #fcfdff; box-shadow: 0 3px 0 #f0f3f8; }
#view-game .gh-status { display: inline-block; color: var(--gh-card-accent); font-size: 14px; font-weight: 750; line-height: 1.4; }
#view-game .gh-planned-note { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; padding: 12px 15px; border: 1px solid var(--gh-line); border-radius: 12px; color: var(--gh-deep); background: var(--gh-tint); font-size: 14px; line-height: 1.6; word-break: keep-all; }
#view-game .gh-planned-note svg { flex: 0 0 20px; width: 20px; height: 20px; }
#view-game .gh-note { display: flex; align-items: flex-start; gap: 10px; margin: 22px 0 0; padding: 15px 17px; border-radius: 12px; background: #f5f7fc; color: #5b6a82; font-size: 14px; font-weight: 400; line-height: 1.65; word-break: keep-all; }
#view-game .gh-note svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; color: #657bd0; }
#view-game .gh-note p { margin: 0; }
#view-game .gh-note strong { color: #344966; font-weight: 750; }
#view-game .gh-category:active { transform: translateY(2px); }
#view-game .gh-card:active { transform: translateY(3px); box-shadow: none; background: var(--gh-card-tint); }
#view-game .gh-category:focus-visible,
#view-game .gh-card:focus-visible { outline: 3px solid #8ba5fb; outline-offset: 3px; }
#view-game .gh-panel:focus-visible { outline: 3px solid #8ba5fb; outline-offset: 6px; border-radius: 12px; }
@media (hover: hover) {
  #view-game .gh-category:hover { border-color: var(--gh-accent); background: var(--gh-tint); }
  #view-game .gh-card:hover { border-color: var(--gh-card-accent); background: #fff; box-shadow: 0 7px 16px rgba(23, 35, 60, .09); transform: translateY(-2px); }
  #view-game .gh-card:hover .gh-arrow { color: #fff; background: var(--gh-card-accent); }
  #view-game .gh-card:active { transform: translateY(2px); box-shadow: none; background: var(--gh-card-tint); }
}

@media (max-width: 900px) {
  #view-game .gh-hub { padding-top: 0; }
  #view-game .gh-hero { padding: 22px; }
  #view-game .gh-hero h1 { font-size: 29px; }
  #view-game .gh-category { gap: 9px; padding: 12px; }
  #view-game .gh-category-icon { flex-basis: 38px; width: 38px; height: 38px; border-radius: 10px; }
  #view-game .gh-category-icon svg { width: 24px; height: 24px; }
  #view-game .gh-category-copy strong { font-size: 16px; }
  #view-game .gh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  #view-game .gh-hub { padding-bottom: 16px; }
  #view-game .gh-hero { display: block; padding: 14px 17px; border-radius: 16px; }
  #view-game .gh-eyebrow,
  #view-game .gh-hero-badge { display: none; }
  #view-game .gh-hero h1 { font-size: 26px; }
  #view-game .gh-hero p:not(.gh-eyebrow) { margin-top: 6px; font-size: 14px; line-height: 1.5; }
  #view-game .gh-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px; }
  #view-game .gh-category { gap: 10px; min-height: 64px; padding: 9px 11px; border-radius: 12px; }
  #view-game .gh-category-copy { gap: 3px; }
  #view-game .gh-category-copy strong { font-size: 16px; }
  #view-game .gh-category-copy span { font-size: 14px; }
  #view-game .gh-panel-head { align-items: flex-start; gap: 10px; margin-bottom: 12px; }
  #view-game .gh-panel-copy h2 { font-size: 22px; }
  #view-game .gh-panel-copy p { margin-top: 5px; }
  #view-game .gh-count { min-height: 31px; padding: 4px 9px; }
  #view-game .gh-grid,
  #view-game .gh-panel[data-gh-panel]:not([data-gh-panel="vocab"]) .gh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #view-game .gh-card { min-height: 180px; padding: 12px; border-radius: 14px; }
  #view-game .gh-card-top { margin-bottom: 9px; }
  #view-game .gh-game-icon { flex-basis: 34px; width: 34px; height: 34px; border-radius: 10px; }
  #view-game .gh-game-icon svg { width: 23px; height: 23px; }
  #view-game .gh-card-title { font-size: 16px; }
  #view-game .gh-card-desc { margin-bottom: 10px; font-size: 14px; line-height: 1.45; }
  #view-game .gh-card-foot { padding-top: 8px; }
  #view-game .gh-kind,
  #view-game .gh-status { font-size: 14px; }
  #view-game .gh-planned-note { padding: 11px 12px; align-items: flex-start; }
  #view-game .gh-planned-note svg { margin-top: 2px; }
  #view-game .gh-note { gap: 8px; margin-top: 18px; padding: 13px; }
}
@media (max-width: 360px) {
  #view-game .gh-hero { padding: 13px 15px; }
  #view-game .gh-category { gap: 7px; padding: 9px 8px; }
  #view-game .gh-category-icon { flex-basis: 32px; width: 32px; height: 36px; }
  #view-game .gh-category-copy strong { font-size: 15px; }
  #view-game .gh-grid { gap: 8px; }
  #view-game .gh-card { padding: 12px 10px 11px; }
  #view-game .gh-card-top { gap: 6px; }
  #view-game .gh-game-icon { flex-basis: 34px; width: 34px; height: 34px; }
  #view-game .gh-kind,
  #view-game .gh-status { word-break: keep-all; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  #view-game .gh-category,
  #view-game .gh-card { transition: none; }
  #view-game .gh-category:active,
  #view-game .gh-card:hover,
  #view-game .gh-card:active { transform: none; }
}
