/* Closest Number, Would You Rather, Deep Questions.
   Kept out of cards.css because scripts/make-cards.swift rewrites that file.
   Card art uses the 3D illustrations until painted card art is added to public/cards/. */
.game[data-game="guess"] { --card-art: url("art3d/guess.svg"); --card-bg: linear-gradient(180deg, hsl(165 55% 42%) 0%, hsl(160 60% 68%) 62%, hsl(172 80% 34%) 100%); }
.game[data-game="wyr"] { --card-art: url("art3d/wyr.svg"); --card-bg: linear-gradient(180deg, hsl(345 78% 58%) 0%, hsl(12 85% 74%) 62%, hsl(210 85% 55%) 100%); }
.game[data-game="deep"] { --card-art: url("art3d/deep.svg"); --card-bg: linear-gradient(180deg, hsl(258 62% 48%) 0%, hsl(268 70% 72%) 62%, hsl(282 80% 40%) 100%); }

html body #home :is(#games, #favouriteGames) .game-card .game:is([data-game="guess"], [data-game="wyr"], [data-game="deep"]) {
  background: var(--card-bg);
  box-shadow: inset 0 0 0 2px #ffffff40, inset 0 -60px 50px -40px #0a0a3a66, 0 14px 24px -14px #1b0f3a88;
}
html body #home :is(#games, #favouriteGames) .game-card .game:is([data-game="guess"], [data-game="wyr"], [data-game="deep"])::after {
  inset: 4% 8% 24% 8%;
  background: var(--card-art) center / contain no-repeat;
}

/* Closest Number */
.guess-answer { display: grid; justify-items: center; gap: 2px; max-width: 320px; margin: 14px auto; padding: 12px 16px; border: 2px solid var(--ink); border-radius: 16px; background: #c8f2e4; color: #252046; box-shadow: 3px 3px 0 var(--ink); }
.guess-answer small { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; opacity: .7; }
.guess-answer b { font-size: 36px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.guess-list { display: grid; gap: 8px; max-width: 460px; margin: 0 auto 12px; }
.guess-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; margin: 0; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--ui-panel, #fffdf7); color: var(--ui-text, #252046); }
.guess-row span { font-weight: 700; overflow-wrap: anywhere; }
.guess-row b { font-size: 18px; font-variant-numeric: tabular-nums; }
.guess-row small { min-width: 56px; text-align: right; font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.guess-win { background: #ffe680; color: #252046; box-shadow: 3px 3px 0 var(--ink); }
.guess-win span::before { content: "★ "; }
#guessInput { font-size: 22px; font-variant-numeric: tabular-nums; }

/* Would You Rather */
.wyr-step { margin: 16px 0 8px; font-weight: 800; }
.wyr-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 10px; }
.wyr-pair > em { align-self: center; font-style: normal; font-weight: 800; font-size: 13px; opacity: .7; }
.wyr-option { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 110px; padding: 14px 12px; border: 2px solid var(--ink); border-radius: 18px; background: var(--ui-panel, #fffdf7); color: var(--ui-text, #252046); box-shadow: 3px 3px 0 var(--ink); text-align: center; }
.wyr-option b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #ff8fb0; color: #252046; font-size: 17px; }
.wyr-option[data-v="b"] b { background: #8ccaff; }
.wyr-option span { font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.wyr-option[aria-pressed="true"] { background: #fff1a8; color: #252046; transform: translate(-1px, -2px); box-shadow: 0 0 0 3px #ff9a3d, 4px 5px 0 var(--ink); }
.wyr-predict { display: flex; justify-content: center; gap: 10px; }
.wyr-predict button { min-width: 72px; font-size: 18px; font-weight: 800; }
.wyr-predict button[aria-pressed="true"] { background: #fff1a8; color: #252046; box-shadow: 0 0 0 3px #ff9a3d; }
.wyr-result { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.wyr-side { position: relative; overflow: hidden; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 14px 12px; border: 2px solid var(--ink); border-radius: 18px; background: #fffdf7; color: #252046; text-align: center; isolation: isolate; }
.wyr-side::before { content: ""; position: absolute; inset: auto 0 0 0; height: var(--pct, 0%); background: #ffd2df; z-index: -1; transition: height .6s ease; }
.wyr-side:nth-child(2)::before { background: #cfe8ff; }
.wyr-side b { font-size: 18px; }
.wyr-side span { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.wyr-side strong { font-size: 30px; line-height: 1; }
.wyr-side small { font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.wyr-win { box-shadow: 0 0 0 3px #ff9a3d, 3px 3px 0 var(--ink); }
.wyr-win :is(span, strong, small, b) { color: #252046; }
.wyr-note { text-align: center; font-weight: 700; }
@media (max-width: 520px) {
  .wyr-pair { grid-template-columns: 1fr; }
  .wyr-option { min-height: 80px; }
}

/* Deep Questions */
.deep-level { margin: 8px 0 0; font-weight: 800; font-size: 15px; }
.deep-note { font-size: 13px; opacity: .75; }
