/* Games are scoped to prevent collisions with the host application. */
.zen-game {
  --zen-game-bg: #0d0d0d;
  --zen-game-text: #ebebeb;
  --zen-game-muted: #b1b1b1;
  --zen-game-accent: #d7d7d7;
  --zen-game-line: #414141;
  box-sizing: border-box;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid var(--zen-game-line);
  border-radius: 26px;
  color: var(--zen-game-text);
  background: var(--zen-game-bg);
  font-family: inherit;
  line-height: 1.55;
  color-scheme: dark;
}
.zen-game *, .zen-game *::before, .zen-game *::after { box-sizing: border-box; }
.zen-game [hidden] { display: none !important; }
.zen-game p, .zen-game h2, .zen-game h3 { margin: 0; }
.zen-game button { font: inherit; cursor: pointer; touch-action: manipulation; }
.zen-game button:disabled { cursor: default; }
.zen-game button:focus-visible, .zen-game [tabindex="-1"]:focus-visible {
  outline: 3px solid var(--zen-game-accent);
  outline-offset: 5px;
}
.zen-game__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.zen-game__heading-group { min-width: 0; }
.zen-game .zen-game__eyebrow {
  margin-bottom: 8px;
  color: var(--zen-game-accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 650;
}
.zen-game .zen-game__title { font-size: clamp(24px, 5vw, 34px); line-height: 1.16; letter-spacing: -.045em; font-weight: 500; }
.zen-game .zen-game__intro { margin: 20px 0 24px; max-width: 54ch; font-size: 14px; color: var(--zen-game-muted); }
.zen-game__close {
  flex-shrink: 0;
  min-width: 58px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--zen-game-line);
  border-radius: 999px;
  background: transparent;
  color: var(--zen-game-text);
  font-size: 12px !important;
}
.zen-game__close:hover { border-color: var(--zen-game-accent); }
.zen-game .zen-game__progress { margin-bottom: 16px; color: var(--zen-game-muted); font-size: 12px; letter-spacing: .02em; }
.zen-game .zen-game__status { min-height: 44px; margin-top: 22px; font-size: 13px; color: var(--zen-game-accent); }
.zen-game__footer { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--zen-game-line); }
.zen-game .zen-game__note { color: var(--zen-game-muted); font-size: 11px; }
.zen-game__memory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 2vw, 13px); }
.zen-game__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 104px;
  aspect-ratio: 1 / 1.08;
  padding: 12px 4px;
  color: var(--zen-game-muted);
  background: #1b1b1b;
  border: 1px solid var(--zen-game-line);
  border-radius: 16px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.zen-game__card:hover { border-color: #7f7f7f; }
.zen-game__card-symbol { font-size: clamp(26px, 6vw, 44px); line-height: 1; }
.zen-game__card-caption { font-size: 10px; }
.zen-game__card--open { background: #333333; color: var(--zen-game-accent); border-color: #909090; }
.zen-game__card--matched { background: var(--zen-game-accent); color: #1d1d1d; border-color: var(--zen-game-accent); }
.zen-game__card--matched .zen-game__card-caption::after { content: ' ✓'; }
.zen-game__complete { margin-top: 24px; padding: 22px; background: #202020; border: 1px solid #5b5b5b; border-radius: 18px; }
.zen-game .zen-game__complete-label { color: var(--zen-game-accent); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.zen-game .zen-game__complete-message { margin: 10px 0 18px; color: var(--zen-game-text); font-size: 16px; }
.zen-game__button {
  min-height: 46px;
  padding: 12px 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}
.zen-game__button--primary { color: #1e1e1e; background: var(--zen-game-accent); }
.zen-game__button--primary:hover { background: #e8e8e8; }
.zen-game__button--quiet { color: var(--zen-game-muted); background: transparent; border-color: var(--zen-game-line); }
.zen-game__button--quiet:hover { color: var(--zen-game-text); border-color: #7f7f7f; }
.zen-game__focus-stage { text-align: center; }
.zen-game__color-word { padding: 27px 0 23px; font-size: clamp(38px, 10vw, 68px); letter-spacing: -.04em; font-weight: 700; line-height: 1.2; }
.zen-game__ink--sage { color: #d7d7d7; }
.zen-game__ink--blue { color: #c9c9c9; }
.zen-game__ink--pink { color: #bdbdbd; }
.zen-game__ink--gold { color: #cbcbcb; }
.zen-game .zen-game__focus-instruction { margin-bottom: 22px; min-height: 22px; font-size: 13px; color: var(--zen-game-muted); }
.zen-game__choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 auto 20px; max-width: 420px; }
.zen-game__choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 53px;
  padding: 12px;
  border: 1px solid var(--zen-game-line);
  border-radius: 12px;
  background: #1b1b1b;
  color: var(--zen-game-text);
  font-size: 14px !important;
}
.zen-game__choice:hover:not(:disabled) { border-color: #9d9d9d; background: #2b2b2b; }
.zen-game__choice:disabled { opacity: .65; }
.zen-game__choice--selected, .zen-game__choice--selected:disabled { border-color: var(--zen-game-accent); background: #333333; opacity: 1; }
.zen-game__dot { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.zen-game__sensory-progress { display: flex; justify-content: center; gap: 12px; list-style: none; margin: 0 0 24px; padding: 0; }
.zen-game__sensory-progress li {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid var(--zen-game-line);
  border-radius: 50%;
  color: var(--zen-game-muted);
  font-size: 12px;
}
.zen-game__sensory-progress .zen-game__step--current { border-color: var(--zen-game-accent); background: var(--zen-game-accent); color: #1e1e1e; }
.zen-game__sensory-progress .zen-game__step--past { border-color: #7c7c7c; color: var(--zen-game-accent); background: #2d2d2d; }
.zen-game__sensory-panel { text-align: center; padding: 18px 8px 8px; }
.zen-game__sensory-number { display: block; margin-bottom: 12px; color: var(--zen-game-accent); font-size: clamp(64px, 15vw, 92px); font-weight: 300; line-height: 1; }
.zen-game .zen-game__sensory-title { font-size: 23px; font-weight: 500; letter-spacing: -.025em; }
.zen-game .zen-game__sensory-prompt { margin: 16px auto 12px; max-width: 43ch; font-size: 15px; }
.zen-game .zen-game__sensory-alternative { margin: 0 auto 24px; max-width: 48ch; font-size: 12px; color: var(--zen-game-muted); }
.zen-game__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
@media (max-width: 420px) {
  .zen-game { padding: 22px 16px; border-radius: 20px; }
  .zen-game__card { min-height: 83px; border-radius: 12px; }
  .zen-game__card-caption { font-size: 9px; }
  .zen-game__sensory-progress { gap: 10px; }
  .zen-game__complete { padding: 18px; }
  .zen-game__actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .zen-game *, .zen-game *::before, .zen-game *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Match the editorial shell. */
.zen-game{border-radius:0;background:#0d0d0d;border-color:#444;--zen-game-text:#eee;--zen-game-accent:#eee;--zen-game-muted:#aaa;--zen-game-line:#444}.zen-game .zen-game__title{font-family:Georgia,serif;font-size:36px;font-weight:400}.zen-game button{border-radius:0!important}.zen-game__eyebrow,.zen-game__progress,.zen-game__status{font-family:ui-monospace,Menlo,monospace}.zen-game__memory-grid button{filter:grayscale(1)}
