/* Minted — Aarambha daily money word game
   Built from Figma "game 4 - minted" (JfjM5SagfLVhs6gyGKJ5Pt · 28422:19702) */

:root {
  --yellow: #ffee59;
  --purple-tile: #7538bc;
  --purple-tile-shadow: #4a007d;
  --gold-tile: #e2c000;
  --grey-tile: rgba(61, 61, 61, 0.6);
  --key: #e5e7eb;
  --key-ink: #28273d;
  --key-hit: #5b42f3;
  --key-miss: #838499;
  --white: #fff;
  --cta-grad: linear-gradient(to left, #ffee59, #fff);
  /* Background plate: approximated from the Figma raster (see notes) */
  --bg:
    radial-gradient(120% 60% at 0% 100%, rgba(52, 0, 170, 0.75) 0%, rgba(52, 0, 170, 0) 70%),
    radial-gradient(90% 45% at 100% 0%, rgba(70, 8, 120, 0.55) 0%, rgba(70, 8, 120, 0) 70%),
    linear-gradient(180deg, #22072f 0%, #210450 50%, #1c005e 100%);
  --font: "Bricolage Grotesque", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  font-variation-settings: "opsz" 14, "wdth" 100;
  color: var(--white);
  background: #120022;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; }

/* ---------- App shell (full-bleed on phones, device frame on desktop) ---------- */
.app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}
.statusbar { display: none; }
.home-indicator { display: none; }

@media (min-width: 600px) {
  /* Desktop preview: an iPhone 14 Pro sized frame (393 x 852 pt) */
  body {
    display: grid; place-items: center;
    background: radial-gradient(circle at 50% 30%, #2a0d4a, #0c0016 70%);
  }
  .app {
    width: 393px;
    height: min(852px, calc(100dvh - 48px));
    border-radius: 55px;
    box-shadow: 0 0 0 10px #0b0612, 0 0 0 11px #2d2440, 0 30px 80px rgba(0, 0, 0, 0.6);
  }
  .statusbar {
    display: flex; align-items: center; justify-content: space-between;
    position: absolute; z-index: 20; top: 0; left: 0; right: 0;
    height: 59px; padding: 16px 28px 0 50px; pointer-events: none;
    font-family: -apple-system, "SF Pro Text", system-ui, sans-serif;
    font-weight: 600; font-size: 17px; letter-spacing: -0.43px;
  }
  .statusbar img { width: 79px; height: auto; }
  .home-indicator {
    display: block; width: 128px; height: 4px; border-radius: 9999px;
    background: #cbd5e1; margin: 16px auto 0;
  }
  .app > .screen { padding-top: 59px; }
  .app > .screen .keyboard, .app > .screen.share .tray { padding-bottom: 34px; }
}

/* ---------- Screens ---------- */
.screen {
  position: absolute; inset: 0;
  display: none; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.is-active { display: flex; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wordmark { font-weight: 800; letter-spacing: -0.6px; }
.y { color: var(--yellow); }
.w { color: var(--white); }

/* Primary / secondary pill CTAs */
.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 20px; border-radius: 60px;
  background: var(--cta-grad); color: #000;
  font-weight: 700; font-size: 24px; line-height: 28px;
  font-variation-settings: "opsz" 26, "wdth" 86;
  white-space: nowrap;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.cta--white { background: #fff; }
.cta:active { transform: scale(0.98); filter: brightness(0.95); }
.cta img { width: 20px; height: 20px; }
.cta-stack { display: flex; flex-direction: column; gap: 9px; }

.icon-btn { display: grid; place-items: center; }
.icon-btn:focus-visible, .cta:focus-visible, .key:focus-visible, .share-btn:focus-visible, .link:focus-visible {
  outline: 2px solid var(--yellow); outline-offset: 2px;
}

/* Header used on result / streak / stats screens */
.appbar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 28px; padding: 8px 0 4px; min-height: 52px; flex: none;
}
.appbar__title { font-size: 24px; line-height: 32px; font-weight: 800; letter-spacing: -0.6px; }
.appbar .icon-btn { width: 40px; height: 40px; }
.appbar .icon-btn.back { width: 32px; margin-left: -4px; justify-content: start; }
.appbar .spacer { width: 40px; }

/* ---------- Hub (Play page) ---------- */
.hub { align-items: center; padding: 0 24px 40px; }
.tabs {
  position: relative; margin-top: 50px; width: 100%; max-width: 344px; height: 48px; flex: none;
  display: flex; align-items: center; justify-content: space-around; padding: 0 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.51); border-radius: 55px;
  background: linear-gradient(179.75deg, rgba(124, 58, 237, 0.4) 7.87%, rgba(78, 46, 178, 0.35) 50%, rgba(16, 29, 99, 0.3) 92.13%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.tabs button { font-weight: 600; font-size: 15px; line-height: 22.5px; color: rgba(255, 255, 255, 0.7); }
.tabs button[aria-selected="true"] { color: #fff; }

.game-card {
  position: relative; width: 100%; max-width: 329px; height: 237px; flex: none;
  margin-top: 28px; border-radius: 28px; overflow: hidden;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.game-card + .game-card { margin-top: 25px; }
.game-card__inner { position: absolute; inset: 0; padding: 0 24px; }
.game-card__desc { position: absolute; left: 24px; font-size: 14px; line-height: 21px; color: rgba(255, 255, 255, 0.72); }
.game-card__rule {
  position: absolute; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08) 50%, rgba(0, 0, 0, 0));
}
.play-btn {
  position: absolute; left: 32px; bottom: 26px;
  display: flex; align-items: center; gap: 2px; width: 112px; height: 41px; padding-left: 16px;
  border-radius: 60px; background: var(--cta-grad); color: #000;
  font-weight: 700; font-size: 18px; line-height: 28px;
}
.play-btn svg { width: 24px; height: 24px; }
.share-chip {
  position: absolute; right: 24px; bottom: 29px;
  display: flex; align-items: center; gap: 6px;
  font-weight: 500; font-size: 13px; line-height: 19.5px; color: rgba(255, 255, 255, 0.6);
}
.share-chip img { width: 16px; height: 16px; }

.card-rush { background: linear-gradient(to bottom, #a8a5e2, #2f16f7); border: 1px solid rgba(255, 255, 255, 0.05); }
.card-rush::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(34.5deg, rgba(0, 0, 0, 0.075) 3.5%, rgba(0, 0, 0, 0) 50%, rgba(255, 255, 255, 0.015) 96.5%);
}
.card-rush h3 {
  position: absolute; left: 24px; top: 25px;
  font-weight: 700; font-size: 32px; line-height: 44px; font-variation-settings: "opsz" 14, "wdth" 84;
}
.card-rush .swords { position: absolute; left: 242px; top: 25px; width: 46px; height: 47px; }
.card-rush .game-card__desc { top: 81px; width: 267px; font-weight: 500; font-size: 15px; line-height: 20.6px; color: rgba(255, 255, 255, 0.9); }
.card-rush .game-card__rule { top: 142px; }

.card-whn {
  background:
    linear-gradient(38.5deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 50%, rgba(255, 255, 255, 0.05) 100%),
    linear-gradient(to bottom, rgba(124, 58, 237, 0.6), rgba(99, 102, 241, 0.6));
  box-shadow: 0 10px 36px rgba(42, 14, 89, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.card-whn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 0.82px solid rgba(255, 255, 255, 0.12); pointer-events: none; }
.card-whn .logo { position: absolute; left: 14px; top: 8px; width: 130px; height: 74px; }
.card-whn .q { position: absolute; left: 249px; top: 21px; width: 32px; height: 48px; }
.card-whn .game-card__desc { top: 88px; width: 267px; }
.card-whn .game-card__rule { top: 138px; }

.card-signals {
  border-radius: 20px; overflow: visible;
  background: linear-gradient(154.6deg, rgba(153, 37, 255, 0.73) 7.96%, rgba(47, 2, 159, 0.58) 54.2%, #060f2e 92.04%);
}
.card-signals .radar { position: absolute; left: 159px; top: -17px; width: 170px; height: 170px; pointer-events: none; }
.card-signals h3 {
  position: absolute; left: 24px; top: 26px;
  font-weight: 800; font-size: 26.4px; line-height: 27.72px; letter-spacing: -0.6px;
  font-variation-settings: "opsz" 96, "wdth" 100;
}
.card-signals .game-card__desc { top: 94px; width: 178px; }
.card-signals .game-card__rule { top: 153px; }

.card-minted {
  border-radius: 20px;
  background: linear-gradient(236.87deg, rgba(90, 58, 127, 0.264) 8.07%, rgba(117, 56, 188, 0.48) 14.1%, rgba(61, 61, 61, 0.18) 35.9%, rgba(184, 110, 112, 0.392) 73.8%, rgba(254, 166, 33, 0.3) 92.4%);
}
.card-minted h3 {
  position: absolute; left: 24px; top: 30px;
  font-weight: 800; font-size: 40px; line-height: 40px; letter-spacing: -0.6px;
  font-variation-settings: "opsz" 96, "wdth" 100;
}
.card-minted .mascot { position: absolute; left: 199px; top: 30px; width: 116px; height: 97px; object-fit: cover; }
.card-minted .game-card__desc { top: 82px; width: 183px; font-family: Inter, system-ui, sans-serif; font-weight: 500; line-height: 20.3px; color: rgba(255, 255, 255, 0.79); }
.card-minted .game-card__rule { top: 153px; }
.card-signals .play-btn, .card-minted .play-btn { left: 32px; bottom: 24px; }

/* ---------- Splash ---------- */
.splash { align-items: center; text-align: center; padding: 0 24px 28px; }
.splash__title {
  margin-top: 99px; font-size: 64px; line-height: 64px; font-weight: 800; letter-spacing: -0.6px;
  font-variation-settings: "opsz" 96, "wdth" 100;
}
.splash__sub { margin-top: 18px; font-size: 22px; line-height: 27.5px; font-weight: 800; letter-spacing: -0.55px; color: var(--yellow); }
.splash__desc {
  margin-top: 16px; font-family: Inter, system-ui, sans-serif; font-weight: 500;
  font-size: 14px; line-height: 20.3px; color: rgba(255, 255, 255, 0.79); max-width: 232px;
}
.splash__mascot { width: 323px; max-width: 100%; height: auto; margin-top: 25px; }
.splash__actions { margin-top: auto; padding-top: 24px; width: 100%; max-width: 329px; display: flex; flex-direction: column; align-items: center; }
.link-muted {
  margin-top: 20px; padding: 4px; font-weight: 700; font-size: 14px; line-height: 21px;
  letter-spacing: -0.35px; color: rgba(255, 255, 255, 0.57);
}

/* ---------- How it works ---------- */
.how { padding: 0 38px 28px 38px; }
.how__header { position: relative; display: flex; justify-content: center; align-items: center; height: 40px; margin-top: 24px; }
.how__header .back { position: absolute; left: -16px; width: 36px; height: 36px; }
.how__header h1 { font-size: 21.65px; line-height: 32.5px; font-weight: 800; letter-spacing: -0.54px; }
.steps { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 28px; }
.step { display: grid; grid-template-columns: 24px 1fr; column-gap: 20px; }
.step__num {
  width: 24px; height: 24px; border-radius: 50%; background: #eeeaff; color: #5844ed;
  display: grid; place-items: center; font-weight: 700; font-size: 13.9px; line-height: 1; margin-top: -2px;
}
.step h2 { font-size: 18px; line-height: 17px; font-weight: 700; }
.step p { margin-top: 8px; font-size: 14.43px; line-height: 20.75px; font-weight: 500; color: rgba(255, 255, 255, 0.55); }
.mini-row { display: flex; gap: 2.86px; margin-top: 14px; }
.mini-row span {
  width: 28.57px; height: 34.28px; border-radius: 5.71px; display: grid; place-items: center;
  font-weight: 800; font-size: 15px; background: var(--grey-tile); box-shadow: 0 1.43px 2.86px rgba(0, 0, 0, 0.05);
}
.legend { display: flex; gap: 32px; margin-top: 16px; }
.legend figure { display: flex; flex-direction: column; align-items: flex-start; width: 64px; }
.legend .chip {
  width: 38.8px; height: 38.8px; border-radius: 11px; display: grid; place-items: center;
  font-weight: 800; font-size: 16.6px; background: var(--grey-tile); margin-left: 6px;
}
.legend figcaption { margin-top: 10px; font-weight: 700; font-size: 9.9px; line-height: 12.4px; white-space: nowrap; }
.legend small { display: block; margin-top: 3.6px; font-weight: 500; font-size: 8.57px; line-height: 10.7px; color: rgba(255, 255, 255, 0.8); }
.bg-correct { background: var(--purple-tile) !important; }
.bg-present { background: var(--gold-tile) !important; }
.how__rule { height: 3.6px; background: rgba(255, 255, 255, 0.1); opacity: 0.85; margin: 34px 0 16px; }
.how__note { font-size: 12.63px; line-height: 18.5px; color: rgba(255, 255, 255, 0.66); }
.how__note a { color: var(--yellow); }
.how .cta { margin: auto auto 0; max-width: 297px; font-size: 21.65px; line-height: 25.3px; padding: 10.8px 20px; }
.how__actions { margin-top: auto; padding-top: 32px; }

/* ---------- Game ---------- */
.game { padding-bottom: 0; }
.game__header { position: relative; display: flex; align-items: center; justify-content: center; height: 56px; padding: 12px 20px 8px; flex: none; margin-top: 4px; }
.game__header .back { position: absolute; left: 20px; width: 36px; height: 36px; }
.game__header h1 { font-size: 24px; line-height: 28px; font-weight: 800; letter-spacing: -0.6px; }
.tries { display: flex; align-items: center; justify-content: space-between; padding: 8px 24px 12px; flex: none; }
.badge { padding: 4px 12px; border-radius: 9999px; background: rgba(239, 234, 255, 0.13); color: var(--yellow); font-weight: 700; font-size: 13px; line-height: 19.5px; }
.dots { display: flex; gap: 8px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: #f7f5fe; border: 2px solid #d8d2fa; }
.dots i.on { background: var(--yellow); border-color: var(--yellow); }

.board-wrap {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  min-height: 0; padding: 4px 15px 0; position: relative; container-type: size;
}
/* Board is square-ish: size it to whichever of width / height runs out first, leaving room for the toast */
.board {
  width: min(363px, 100cqw, calc(100cqh - 58px)); display: grid; grid-template-rows: repeat(6, 1fr); gap: 10px;
}
.row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.row.shake { animation: shake 0.45s ease; }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
.tile {
  aspect-ratio: 1; border-radius: 16px; display: grid; place-items: center;
  font-weight: 800; font-size: 20px; line-height: 32px; text-transform: uppercase;
  background: #fff; border: 2px solid #e3e3ec; color: var(--key-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.1s ease;
}
.tile.filled { border-color: var(--purple-tile); transform: scale(1.04); }
.tile.absent, .tile.present, .tile.correct { border: 0; color: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.04); }
.tile.absent { background: var(--grey-tile); }
.tile.present { background: var(--gold-tile); }
.tile.correct { background: var(--purple-tile); }
.tile.reveal { animation: flip 0.5s ease both; }
@keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }

.toast {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  height: 44px; padding: 0 20px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; font-size: 17px; color: #000; text-transform: capitalize; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast--warn { background: var(--yellow); }
.toast--win { background: #e6adff; }

.keyboard { flex: none; padding: 24px 10px 28px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.kb-row { display: flex; gap: 4px; justify-content: center; width: 100%; max-width: 380px; }
.kb-row--mid { padding: 0 8px; }
.key {
  flex: 1 1 0; min-width: 0; height: 44px; border-radius: 8px; background: var(--key); color: var(--key-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; line-height: 20px;
  transition: background 0.2s ease, transform 0.08s ease;
}
.key:active { transform: scale(0.94); }
.key--wide { flex: 0 0 40px; }
.key img { width: 16px; height: 16px; }
.key--wide img[src*="backspace"] { width: 20px; height: 20px; }
.key.correct { background: var(--key-hit); color: #fff; }
.key.present { background: var(--gold-tile); color: #fff; }
.key.absent { background: var(--key-miss); color: #fff; }

/* ---------- Result (win / almost) ---------- */
.result { padding-bottom: 24px; }
.result__body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0 24px; }
.result__mascot--win { width: 285px; height: 143px; margin-top: 8px; }
.result__mascot--almost { width: 141px; height: 135px; margin-top: 13px; }
.result h2 { margin-top: 10px; font-size: 32px; line-height: 30px; font-weight: 800; letter-spacing: -0.6px; text-align: center; }
.result__sub { margin-top: 12px; font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: -0.35px; color: var(--yellow); text-align: center; }
.result__was { margin-top: 15px; font-weight: 600; font-size: 13px; line-height: 19.5px; letter-spacing: -0.33px; color: var(--yellow); }
.answer { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: 100%; max-width: 340px; margin-top: 25px; }
.result__was + .answer { margin-top: 8px; }
.answer span {
  aspect-ratio: 1; border-radius: 10px; background: var(--purple-tile); box-shadow: 0 4px 0 var(--purple-tile-shadow);
  display: grid; place-items: center; font-weight: 800; font-size: 18px; line-height: 27px;
}
.concepts { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 32px; }
.concept {
  display: flex; gap: 14px; padding: 15px 17px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(88, 68, 237, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.concept img { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.concept h3 { font-weight: 700; font-size: 15px; line-height: 18.75px; }
.concept p { margin-top: 4px; font-weight: 500; font-size: 13px; line-height: 18.85px; color: rgba(255, 255, 255, 0.59); }
.learn-link {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 12px;
  font-weight: 500; font-size: 16px; line-height: 28px; color: rgba(255, 255, 255, 0.8);
  text-decoration: underline; text-underline-position: from-font;
}
.learn-link img { width: 14px; height: 14px; }
.result__actions { margin-top: auto; padding: 32px 26px 0; }
.footnote { margin-top: 4px; text-align: center; font-weight: 600; font-size: 13px; line-height: 19.5px; letter-spacing: -0.33px; color: rgba(255, 255, 255, 0.43); }

/* ---------- Share ---------- */
.share { padding-bottom: 0; }
.share__head { position: relative; display: flex; align-items: center; justify-content: center; height: 64px; flex: none; margin-top: 8px; }
.share__head h1 { font-size: 24px; line-height: 32px; font-weight: 800; letter-spacing: -0.6px; }
.share__head .close { position: absolute; right: 19px; width: 32px; height: 32px; }
.share__head .close img { width: 20px; height: 20px; }
.share-card {
  margin: 20px 21px 0 29px; padding: 38px 0 28px; border-radius: 28px; flex: none;
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(180deg, rgba(246, 242, 255, 0.1), rgba(255, 255, 255, 0.1) 50%, rgba(241, 234, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 36px -6px rgba(110, 50, 230, 0.12);
}
.share-card .wordmark { font-size: 24px; line-height: 26.4px; }
.share-card__sub { margin-top: 14px; font-weight: 600; font-size: 12px; line-height: 16.2px; letter-spacing: -0.3px; text-align: center; }
.mini-grid { display: grid; grid-template-columns: repeat(6, 32px); gap: 6px; margin-top: 24px; }
.mini-grid i { width: 32px; height: 32px; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.mini-grid i.correct { background: var(--purple-tile); }
.mini-grid i.present { background: var(--gold-tile); }
.mini-grid i.absent { background: rgba(61, 61, 61, 0.8); }
.share-card__score { margin-top: 32px; font-weight: 700; font-size: 14px; line-height: 24px; letter-spacing: -0.35px; }
.tray {
  margin-top: auto; padding: 13px 16px 24px; border-radius: 34px 34px 0 0; flex: none;
  background: rgba(27, 18, 46, 0.95); border-top: 1px solid rgba(168, 85, 247, 0.2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.tray__handle { width: 40px; height: 4px; border-radius: 9999px; background: rgba(255, 255, 255, 0.2); }
.share-row { display: flex; justify-content: space-between; width: 100%; max-width: 360px; }
.share-btn { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 500; font-size: 11.5px; line-height: 17.25px; color: #cbd5e1; }
.share-btn span {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
.share-btn img { width: 28px; height: 28px; }
.share-btn .ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.share-btn .wa { background: #25d366; }
.share-btn .xx { background: #000; border: 1px solid rgba(255, 255, 255, 0.2); }
.share-btn .xx img { width: 20px; height: 20px; }
.share-btn .sms { background: #34c759; }
.share-btn .sms img, .share-btn .cp img { width: 24px; height: 24px; }
.share-btn .cp { background: #fff; }

/* ---------- Streak promo ---------- */
.streak { padding-bottom: 30px; }
.streak__mascot { width: 298px; max-width: 80%; height: auto; margin: 4px auto 0; }
.streak h2 { margin-top: -3px; text-align: center; font-size: 22px; line-height: 27.5px; font-weight: 800; letter-spacing: -0.55px; }
.features { list-style: none; margin: 42px auto 0; width: 100%; max-width: 320px; padding: 0 4px; display: flex; flex-direction: column; gap: 16px; }
.features li { display: flex; align-items: center; gap: 26px; font-weight: 600; font-size: 17px; line-height: 21.75px; letter-spacing: -0.36px; }
.features .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--purple-tile); display: grid; place-items: center; flex: none; }
.features img { width: 24px; height: 24px; }
.streak__actions { margin-top: auto; padding: 32px 26px 0 22px; }

/* ---------- Stats ---------- */
.stats { padding-bottom: 32px; align-items: center; }
.stats .appbar { align-self: stretch; }
.stats__mascot { width: 258px; height: auto; margin-top: 4px; }
.stats h2 { margin-top: 10px; font-size: 32px; line-height: 27.5px; font-weight: 800; letter-spacing: -0.55px; text-align: center; }
.stat-row { display: flex; gap: 4px; margin-top: 46px; }
.stat-row div { width: 72.8px; height: 47.2px; border-right: 0.655px solid rgba(116, 77, 157, 0.38); display: flex; flex-direction: column; align-items: center; }
.stat-row b { font-weight: 700; font-size: 27.2px; line-height: 28.56px; letter-spacing: 0.31px; }
.stat-row span { font-size: 12px; line-height: 12.6px; letter-spacing: -0.19px; text-align: center; }
.save-card {
  position: relative; margin-top: 56px; width: calc(100% - 68px); max-width: 322px; min-height: 136px;
  border: 2px solid var(--yellow); border-radius: 13.6px; padding: 14px 18px 14px 83px;
  background: linear-gradient(157.1deg, rgba(200, 80, 200, 0.13) 0%, rgba(200, 80, 200, 0.02) 100%);
}
.save-card__icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 61.2px; height: 61.2px; border-radius: 17.1px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #ffee59 6.17%, #ffd544 93.83%);
  filter: drop-shadow(0 8.1px 9px rgba(27, 7, 34, 0.35));
}
.save-card__icon img { width: 36px; height: 36px; }
.save-card b { display: block; font-weight: 500; font-size: 16.2px; line-height: 24.3px; letter-spacing: -0.4px; color: var(--yellow); max-width: 202px; }
.save-card p { font-size: 13.5px; line-height: 18.2px; letter-spacing: -0.21px; color: #baa4d0; max-width: 221px; }
.stats__actions { margin-top: auto; padding-top: 32px; width: 100%; max-width: 382px; padding-left: 24px; padding-right: 24px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 359px) {
  .cta { font-size: 20px; }
  .splash__title { font-size: 54px; }
}

/* Practice link on the result screen */
.practice-link {
  margin-top: 6px; align-self: center; padding: 6px 10px; font-weight: 600; font-size: 14px;
  color: var(--yellow); text-decoration: underline; text-underline-position: from-font;
}

/* iPhone 14 Pro in Safari leaves ~660-760pt of usable height: tighten the taller screens */
@media (max-height: 780px) {
  .splash__title { margin-top: 56px; }
  .splash__mascot { width: 280px; margin-top: 16px; }
  .how__header { margin-top: 12px; }
  .steps { gap: 22px; }
  .how__rule { margin: 24px 0 12px; }
  .game__header { margin-top: 0; height: 50px; padding-top: 8px; }
  .tries { padding: 4px 24px 8px; }
  .keyboard { padding-top: 12px; padding-bottom: 12px; }
  .key { height: 42px; }
  .result__mascot--win { width: 240px; height: auto; margin-top: 0; }
  .result__mascot--almost { width: 110px; height: auto; margin-top: 0; }
  .answer { margin-top: 18px; }
  .concepts { margin-top: 22px; }
  .result__actions, .streak__actions, .stats__actions { padding-top: 20px; }
  .streak__mascot { width: 240px; }
  .features { margin-top: 26px; gap: 12px; }
  .stats__mascot { width: 210px; }
  .stat-row { margin-top: 32px; }
  .save-card { margin-top: 32px; }
  .share-card { margin-top: 8px; padding: 26px 0 22px; }
  .share-card__score { margin-top: 20px; }
}

/* =====================================================================
   V1.1 refresh: darker tiles & keys, depth, Enter key, hints
   ===================================================================== */

/* Ambient glow behind the board so the game screen isn't one flat colour */
.game {
  background:
    radial-gradient(70% 38% at 50% 34%, rgba(140, 70, 230, 0.32) 0%, rgba(140, 70, 230, 0) 72%),
    radial-gradient(60% 30% at 50% 100%, rgba(255, 238, 89, 0.07) 0%, rgba(255, 238, 89, 0) 70%);
}

/* Tries row: hint pill on the left, dots on the right */
.hint-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 9px; border-radius: 9999px;
  background: rgba(255, 238, 89, 0.1); border: 1px solid rgba(255, 238, 89, 0.35);
  color: var(--yellow); font-weight: 700; font-size: 13px; line-height: 19.5px;
}
.hint-btn img { width: 16px; height: 16px; }
.hint-btn__new {
  margin-left: 2px; padding: 1px 6px; border-radius: 9999px; background: #e6adff; color: #1b0b33;
  font-size: 10px; line-height: 15px; font-weight: 800; animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.12); } }
.dots i { background: transparent; border: 2px solid rgba(255, 255, 255, 0.28); }
.dots i.on { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 8px rgba(255, 238, 89, 0.55); }

/* Tiles: dark glass instead of white, with a 3D bottom edge once scored */
.tile {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  color: #fff;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22);
}
.row.active .tile { background: rgba(255, 255, 255, 0.1); border-color: rgba(214, 173, 255, 0.45); }
.tile.filled {
  background: rgba(117, 56, 188, 0.38); border-color: #c79bff; color: #fff;
  animation: pop 0.12s ease-out; transform: none;
}
@keyframes pop { 0% { transform: scale(0.9); } 70% { transform: scale(1.06); } 100% { transform: scale(1); } }
.tile.correct { box-shadow: 0 4px 0 #4a007d; }
.tile.present { box-shadow: 0 4px 0 #8f7600; }
.tile.absent  { background: rgba(20, 12, 38, 0.75); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); color: rgba(255, 255, 255, 0.85); }

/* Keyboard: sits on its own tray; keys are raised and press down */
.keyboard {
  margin: 0 6px; border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, rgba(48, 18, 92, 0.72), rgba(24, 6, 52, 0.85));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
  padding-top: 14px;
}
.key {
  background: rgba(255, 255, 255, 0.15); color: #fff;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}
.key:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.key img { filter: brightness(0) invert(1); }
.key.correct { background: var(--key-hit); box-shadow: 0 3px 0 #2f1ca8; }
.key.present { background: var(--gold-tile); box-shadow: 0 3px 0 #8f7600; }
.key.absent  { background: rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.32); box-shadow: none; }
.key--enter {
  flex: 0 0 62px; background: var(--cta-grad); color: #000; font-weight: 800; font-size: 13px;
  box-shadow: 0 3px 0 #9c8a12;
}
.key--wide { flex: 0 0 44px; }

/* Hint panel overlays the top of the board */
.hint-panel {
  position: absolute; z-index: 10; top: 2px; left: 15px; right: 15px;
  padding: 14px 16px 16px; border-radius: 18px;
  background: rgba(30, 10, 60, 0.97); border: 1px solid rgba(255, 238, 89, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  animation: fade 0.18s ease;
}
.hint-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hint-panel__head b { font-size: 17px; font-weight: 800; color: var(--yellow); }
.hint-panel__close { width: 28px; height: 28px; display: grid; place-items: center; }
.hint-panel__close img { width: 18px; height: 18px; }
.hint-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hint { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.hint__n {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: #eeeaff; color: #5844ed; font-weight: 800; font-size: 13px;
}
.hint p { font-size: 14px; line-height: 20px; font-weight: 500; color: #fff; padding-top: 2px; }
.hint.is-locked .hint__n { background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.5); }
.hint.is-locked p { color: rgba(255, 255, 255, 0.5); display: flex; align-items: center; gap: 6px; }
.hint.is-locked p img { width: 14px; height: 14px; }
.hint__reveal {
  justify-self: start; padding: 5px 14px; border-radius: 9999px; background: var(--cta-grad);
  color: #000; font-weight: 800; font-size: 13px; line-height: 18px;
}
.toast--hint { background: #ffee59; }

/* Splash: tell people hints exist */
.splash__hints {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 9999px; background: rgba(255, 238, 89, 0.1); border: 1px solid rgba(255, 238, 89, 0.3);
  color: var(--yellow); font-weight: 600; font-size: 13px; line-height: 18px;
}
.splash__hints img { width: 16px; height: 16px; }

/* Share card: unused rows no longer bright white */
.mini-grid i { background: rgba(255, 255, 255, 0.12); box-shadow: none; }

/* =====================================================================
   V1.2: brighter "correct" purple, calmer "wrong place" yellow,
   round share grid, no underline on link buttons
   ===================================================================== */
:root {
  --purple-tile: #9a4dff;          /* was #7538bc: now clearly lighter than the background */
  --purple-tile-shadow: #5b1fc2;
  --gold-tile: #b9962c;            /* was #e2c000: muted mustard, less glare */
  --key-hit: #9a4dff;
}
.tile.correct {
  background: var(--purple-tile);
  box-shadow: 0 4px 0 var(--purple-tile-shadow), 0 0 16px rgba(154, 77, 255, 0.55);
  border: 0;
}
.tile.present { box-shadow: 0 4px 0 #7a6217; }
.key.correct { box-shadow: 0 3px 0 var(--purple-tile-shadow), 0 0 10px rgba(154, 77, 255, 0.45); }
.key.present { box-shadow: 0 3px 0 #7a6217; }
.answer span { box-shadow: 0 4px 0 var(--purple-tile-shadow), 0 0 14px rgba(154, 77, 255, 0.45); }
.mini-grid i { border-radius: 50%; }
.mini-grid i.correct { box-shadow: 0 0 8px rgba(154, 77, 255, 0.6); }
a.cta { text-decoration: none; }

/* =====================================================================
   V1.3: round board tiles, keyboard that scales to any phone height
   ===================================================================== */
.tile { border-radius: 50%; }
.row { gap: clamp(6px, 2.4cqw, 10px); }
.board { gap: clamp(6px, 2.4cqw, 10px); }

/* Keys size from the space actually available (works inside embeds too) */
.keyboard {
  padding: clamp(8px, 1.6dvh, 14px) 6px clamp(10px, 2.2dvh, 22px);
  gap: clamp(5px, 0.9dvh, 8px);
}
.app > .screen .keyboard { padding-bottom: 30px; }
.kb-row { gap: clamp(3px, 1.1vw, 5px); }
.kb-row--mid { padding: 0 clamp(4px, 2vw, 14px); }
.key { height: clamp(38px, 6dvh, 50px); font-size: clamp(13px, 3.8vw, 16px); border-radius: 8px; }
.key--enter { flex: 0 0 clamp(52px, 16vw, 66px); font-size: clamp(12px, 3.3vw, 14px); }
.key--wide { flex: 0 0 clamp(38px, 11.5vw, 48px); }
.home-indicator { margin-top: 10px; }

/* Short screens: tighten the header area so the board keeps its size */
@media (max-height: 640px) {
  .game__header { height: 44px; padding-top: 4px; padding-bottom: 4px; }
  .tries { padding: 2px 20px 6px; }
  .board-wrap { padding-top: 2px; }
}
/* Centre the board in whatever space is left above the keyboard */
.board-wrap { justify-content: center; padding-bottom: 56px; }
.board { width: min(380px, 100cqw, calc(100cqh - 8px)); }
