/* Russian Word Game (/russian/game) — uses the colors from style.css
   Hover outlines are only for computers with a mouse: on iPhone a tap leaves a
   "hover" behind, which would outline the button on the next question. */
.game { max-width: 560px; margin: 0 auto; padding: 22px 18px 26px; background: var(--soft); border-radius: 18px;
  border: 1px solid var(--line); min-height: 420px; scroll-margin-top: calc(var(--header-h) + 12px);
  -webkit-tap-highlight-color: transparent; }
.game h2 { margin: .3em 0 .3em; font-size: 26px; }
.game p { margin: 8px auto; }
.game button { font-family: var(--font); }
.g-small { font-size: 15px; color: var(--muted); }

/* Home screen */
.g-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.g-chip { background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 14px; font-weight: 600; color: var(--purple); white-space: nowrap; }
.g-bar { height: 10px; max-width: 320px; margin: 14px auto 4px; background: #fff; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.g-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffc439); border-radius: 999px; }
.g-card { background: #fff; border-radius: 14px; padding: 16px 16px 20px; margin-top: 18px; box-shadow: 0 2px 10px rgba(74,31,92,.07); }
.g-daily { border: 2px solid #ffc439; }
.g-big { font-size: 19px; padding: 14px 26px; border-radius: 999px; margin-top: 6px; }
.g-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.g-topic { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; background: var(--soft);
  border: 2px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--purple); font-size: 17px; transition: border-color .15s, transform .15s; }
@media (hover: hover) { .g-topic:hover { border-color: var(--accent); transform: translateY(-2px); } }
.g-topic-icon { font-size: 34px; line-height: 1.2; }

/* Question screen */
.g-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.g-link { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 6px 8px; text-decoration: underline; }
.g-quit { text-decoration: none; font-size: 20px; }
.g-dots { display: flex; gap: 6px; }
.g-dot { width: 26px; height: 26px; border-radius: 7px; background: #fff; border: 2px solid var(--line); font-size: 15px; line-height: 22px; overflow: hidden; }
.g-dot.now { border-color: var(--accent); }
.g-dot.done { border-color: transparent; background: none; }
.g-hearts { font-size: 18px; letter-spacing: 2px; }
.g-score { font-weight: 700; color: var(--purple); min-width: 60px; text-align: right; }
.g-ask { color: var(--muted); font-size: 17px; margin-top: 18px !important; }
.g-word { font-size: clamp(32px, 9vw, 46px); font-weight: 700; color: var(--purple); line-height: 1.2; margin: 6px 0 20px; overflow-wrap: anywhere; }
.g-word.g-en { font-size: clamp(26px, 7vw, 34px); }
.g-speak { background: #fff; border: 1.5px solid var(--line); border-radius: 999px; font-size: 20px; width: 44px; height: 44px; vertical-align: middle; cursor: pointer; }
.g-feedback .g-speak { width: 36px; height: 36px; font-size: 16px; }
.g-choices { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 520px) { .g-choices { grid-template-columns: 1fr 1fr; } }
.g-choice { min-height: 58px; padding: 10px 12px; background: #fff; border: 2px solid var(--line); border-radius: 12px; font-size: 19px;
  font-weight: 600; color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
@media (hover: hover) { .g-choice:hover:not(:disabled) { border-color: var(--accent); } }
.g-choice:disabled { cursor: default; color: var(--text); opacity: 1; }
.g-choice.right, .g-slots.right .g-slot { background: #e5f6ec; border-color: #2e9e5b; }
.g-choice.wrong, .g-slots.wrong .g-slot { background: #fdeaea; border-color: #d24b4b; }

/* Build the word */
.g-slots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.g-slot { width: 44px; height: 52px; border-bottom: 3px solid var(--accent); background: #fff; border-radius: 8px 8px 4px 4px;
  font-size: 28px; font-weight: 700; color: var(--purple); line-height: 50px; border: 2px solid var(--line); border-bottom-width: 3px; }
.g-tiles { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.g-tile { width: 52px; height: 56px; background: var(--purple); color: #fff; border: 0; border-radius: 10px; font-size: 26px; font-weight: 700;
  cursor: pointer; box-shadow: 0 3px 0 var(--purple-dark); transition: opacity .2s, transform .1s; }
.g-tile:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--purple-dark); }
.g-tile:disabled { opacity: .15; cursor: default; }
.g-tile.shake { animation: g-shake .4s; }
@keyframes g-shake { 0%, 80% { background: #d24b4b; } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
@media (max-width: 400px) { .g-slot { width: 36px; height: 46px; line-height: 42px; font-size: 24px; } .g-tile { width: 44px; height: 50px; font-size: 23px; } }

/* After answering, results, facts */
.g-after { min-height: 90px; margin-top: 14px; }
.g-feedback { font-size: 19px; }
.g-feedback.right strong { color: #2e9e5b; }
.g-feedback.close strong { color: #b8860b; }
.g-feedback.wrong strong { color: #d24b4b; }
.g-marks { font-size: 34px; letter-spacing: 4px; margin: 8px 0; }
.g-final { font-size: 52px; font-weight: 800; color: var(--purple); }
.g-levelup { display: inline-block; background: #ffc439; color: var(--purple-dark); font-weight: 700; padding: 6px 16px; border-radius: 999px; }
.g-fact { background: #fff; border-left: 5px solid #ffc439; border-radius: 12px; padding: 14px 18px; margin: 30px 0 22px; text-align: left; font-size: 19px; }
.g-fact .g-ask { margin-top: 0 !important; font-weight: 700; color: var(--purple); }
.g-promo { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.g-app { display: inline-flex; align-items: center; gap: 12px; text-align: left; text-decoration: none; color: var(--text); background: #fff;
  border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 16px 10px 10px; font-size: 16px; }
.g-app img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.g-app strong { color: var(--purple); font-size: 18px; }
@media (hover: hover) { .g-app:hover { border-color: var(--accent); } }

/* Share picture pop-up (when the phone's share menu isn't available) */
.g-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(30,10,40,.7); }
.g-modal-box { background: #fff; border-radius: 18px; padding: 16px; max-width: 380px; width: 100%; text-align: center; font-size: 16px; }
.g-modal-box img { display: block; max-height: 58vh; width: auto; margin: 0 auto 6px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  -webkit-touch-callout: default; }
.g-copy { font-size: 15px; padding: 2px 6px; }

/* Russian Level Test (/russian/level-test) */
.lt-levels { display: flex; justify-content: center; gap: 6px; margin: 14px 0; }
.lt-levels span { padding: 6px 12px; border-radius: 8px; background: #fff; border: 1.5px solid var(--line); font-weight: 700; color: var(--purple); }
.lt-levels span:nth-child(n+4) { background: var(--purple); color: #fff; border-color: var(--purple); }
.lt-tag { font-size: 13px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 6px; padding: 2px 8px; }
.lt-q { font-size: clamp(22px, 6vw, 28px) !important; margin: 18px 0 20px !important; }
.g-choice.picked { border-color: var(--accent); background: var(--soft); }
.lt-result { font-size: clamp(56px, 16vw, 80px); font-weight: 800; color: var(--purple); line-height: 1.1; }
.lt-cta { background: #fff; border: 2px solid #ffc439; border-radius: 14px; padding: 16px; margin: 20px 0; }
.lt-review { text-align: left; background: #fff; border-radius: 12px; padding: 10px 16px; margin: 18px 0; font-size: 16px; }
.lt-review summary { cursor: pointer; font-weight: 700; color: var(--purple); text-align: center; }
.lt-review ol { padding-left: 22px; list-style-position: outside; }
.lt-review li { margin: 10px 0; padding-left: 4px; }
.lt-review li::before { display: none; }
.lt-review li.no { color: var(--text); }

/* Catch the Eggs (/russian/games/eggs) */
.eg-game { padding-left: 8px; padding-right: 8px; }
.eg-hud { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 40px; padding: 0 4px 6px; font-size: 17px; }
.eg-lives { letter-spacing: 1px; }
.eg-target { flex: 1; color: var(--muted); font-size: 16px; }
.eg-target strong { color: var(--purple); font-size: 22px; }
.eg-score { font-weight: 800; color: var(--purple); }
.eg-sound { background: #fff; border: 1.5px solid var(--line); border-radius: 999px; width: 38px; height: 38px; font-size: 17px; cursor: pointer; }
.eg-playing { touch-action: none; overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
.eg-canvas { display: block; margin: 0 auto; border-radius: 12px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }

/* You Can Read Russian (/russian/games/read) */
.rd-word { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.rd-l { display: flex; flex-direction: column; align-items: center; min-width: 40px; padding: 6px 4px 4px; background: #fff;
  border: 2px solid var(--line); border-radius: 10px; }
.rd-l b { font-size: clamp(28px, 8vw, 38px); line-height: 1.1; color: var(--purple); }
.rd-l i { font-style: normal; font-size: 14px; font-weight: 700; color: var(--accent); min-height: 18px; }
.rd-dash { align-self: center; font-size: 30px; color: var(--purple); }
.rd-demo { margin-bottom: 14px; }
.rd-slot { min-height: 84px; }

/* Balloon Pop (/russian/games/balloons) */
.bl-demo { display: flex; justify-content: center; gap: 14px; margin: 6px 0 14px; }
.bl-demo span { width: 58px; height: 68px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 30px; font-weight: 800; }
.bl-demo span:nth-child(2) { transform: translateY(-10px); }
.bl-learned { margin-bottom: 10px; }

/* Your Name in Russian (/russian/games/name) */
.nm-form { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 22px 0 8px; }
.nm-form .g-ask { margin: 0 !important; }
.nm-form input { width: 100%; max-width: 340px; font: inherit; font-size: 22px; text-align: center; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--purple); }
.nm-form input:focus { outline: none; border-color: var(--purple); }
.nm-big { font-size: clamp(40px, 12vw, 64px); font-weight: 800; color: var(--purple); line-height: 1.15; margin: 4px 0 10px; overflow-wrap: anywhere; }
.nm-big .g-speak { vertical-align: middle; }
.nm-gap { width: 14px; }
.nm-shake { animation: nm-shake .35s; border-color: #e74c3c !important; }
@keyframes nm-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* Memory Cards (/russian/games/memory) */
.mm-demo { display: flex; justify-content: center; gap: 10px; margin: 4px 0 14px; }
.mm-mini { width: 62px; height: 74px; display: grid; place-items: center; background: #fff; border: 2px solid var(--accent);
  border-radius: 12px; font-size: 34px; }
.mm-mini-word { font-size: 20px; font-weight: 800; color: var(--purple); }
.mm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px auto 0; max-width: 420px; }
.mm-grid.mm-16 { grid-template-columns: repeat(4, 1fr); }
.mm-card { aspect-ratio: 4 / 5; padding: 0; border: 0; background: none; cursor: pointer; perspective: 600px; font: inherit; }
.mm-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .35s; transform-style: preserve-3d; }
.mm-card.up .mm-in, .mm-card.done .mm-in { transform: rotateY(180deg); }
.mm-back, .mm-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mm-back { background: linear-gradient(135deg, #4a1f5c, #9b59b6); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(74,31,92,.25); }
.mm-back::after { content: "?"; color: #ffc439; font-size: 30px; font-weight: 800; }
.mm-face { transform: rotateY(180deg); background: #fff; border: 2px solid var(--line); padding: 4px; }
.mm-pic { font-size: clamp(34px, 11vw, 48px); }
.mm-word { font-size: clamp(13px, 3.9vw, 19px); font-weight: 800; color: var(--purple); overflow-wrap: anywhere; line-height: 1.15; }
.mm-16 .mm-pic { font-size: clamp(28px, 9vw, 40px); }
.mm-16 .mm-word { font-size: clamp(12px, 3.4vw, 17px); }
.mm-card.done .mm-face { background: #fff8e1; border-color: #ffc439; animation: mm-pop .4s; }
@keyframes mm-pop { 50% { transform: rotateY(180deg) scale(1.08); } }
.mm-said { min-height: 28px; margin: 12px 0 0; font-size: 18px; }
.mm-list { list-style: none; padding: 0; margin: 0; }
.mm-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.mm-list li::before { display: none; }
.mm-list .mm-em { font-size: 24px; }
.mm-list .g-speak { width: 34px; height: 34px; font-size: 15px; margin-left: auto; }
.mm-word { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; }
.mm-word small, .mm-mini-word small { display: block; font-size: clamp(10px, 2.9vw, 13px); font-weight: 600; color: var(--muted); line-height: 1.15; overflow-wrap: normal; }
.mm-16 .mm-word small { font-size: clamp(9px, 2.5vw, 12px); }
.mm-mini-word { display: flex; flex-direction: column; justify-content: center; }
.mm-said em, .mm-list em { font-style: normal; color: var(--muted); font-size: .85em; white-space: nowrap; }

/* Easy pronunciation in Latin letters (respell.js), used in all games */
.g-sound { color: var(--muted); font-size: 17px; font-weight: 600; margin: -6px 0 8px !important; letter-spacing: .2px; }
.g-sound-in, .eg-nums em { font-style: normal; font-weight: 600; color: var(--muted); font-size: .85em; }
.g-choice small { display: block; font-size: 13px; font-weight: 600; opacity: .7; margin-top: 2px; }
.eg-target small { display: block; font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.1; }
.mm-list .mm-em[lang="ru"] { font-weight: 800; color: var(--purple); min-width: 26px; text-align: center; }
.eg-nums { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.eg-nums li { padding: 0; line-height: 1.3; }
.eg-nums em { display: block; margin-left: 26px; white-space: nowrap; font-size: 14px; }
.eg-nums li::before { display: none; }
.eg-nums b { display: inline-block; min-width: 22px; color: var(--purple); }
