/* Phone layout for the shared live card (lib/card.css from src/card.css): a full-width card that
   slides up from the bottom like a sheet, big tap targets, no keyboard hints, no hover-only states. */

/* Light mode: plain white and black instead of the desktop card's warm greys. */
@media (prefers-color-scheme: light) {
  :root[data-lc-theme="system"] {
    --surface-1: #FFFFFF; --surface-2: #FFFFFF; --border: #E4E4E7; --border-strong: #D4D4D8; --border-accent: #09090B;
    --text-primary: #09090B; --text-secondary: #3F3F46; --text-muted: #71717A; --text-accent: #09090B;
    --text-success: #15803D; --fill-accent: #09090B; --hover: transparent;
  }
}

.sheet {
  position: fixed; left: 0; right: 0; z-index: 8; pointer-events: none;
  bottom: calc(var(--tab-h) + var(--safe-b));
  padding: 0 calc(var(--safe-r) + 10px) 10px calc(var(--safe-l) + 10px);
  max-width: 480px; margin: 0 auto;
}
.sheet .lc-stack { position: relative; top: auto; right: auto; bottom: auto; left: auto; display: flex; flex-direction: column; gap: 8px; }

.sheet .lc-card, .sheet .lc-stack > .lc-card {
  pointer-events: auto; position: relative; top: auto; right: auto; left: auto; width: 100%;
  border-radius: 20px; padding: 10px 16px 14px; font-size: 16px; border-width: 1px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
  max-height: calc(100dvh - var(--tab-h) - var(--safe-b) - var(--safe-t) - 120px); overflow-y: auto;
}
/* A small grab handle, so it reads as a bottom sheet. */
.sheet .lc-card::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; margin: 0 auto 10px; background: var(--border-strong); }

/* Motion: slide up from the bottom (instead of from the right) and leave the same way. */
.sheet .lc-card.lc-animated { transform: translateY(56px); opacity: 0; }
.sheet .lc-card.lc-animated.lc-in { transform: translateY(0); opacity: 1; }
.sheet .lc-stack > .lc-card.lc-animated:not(.lc-in) { position: absolute; bottom: 0; }

.sheet .lc-kbd { display: none; }
.sheet .lc-match-label { font-size: 13px; }
.sheet .lc-question { font-size: 19px; font-weight: 600; margin-bottom: 12px; line-height: 1.3; }
.sheet .lc-options { gap: 10px; }
.sheet .lc-card .lc-option {
  min-height: 76px; padding: 10px 6px; border-radius: 14px; border-width: 1px; gap: 2px; touch-action: manipulation;
}
.sheet .lc-card .lc-option:active { background: var(--surface-1); }
.sheet .lc-option-name { font-size: 16px; }
.sheet .lc-win { font-size: 22px; font-weight: 600; }
.sheet .lc-card.lc-three .lc-options { gap: 8px; }
.sheet .lc-card.lc-three .lc-option { padding: 10px 4px; }
.sheet .lc-card.lc-three .lc-option-name { font-size: 14px; }
.sheet .lc-card.lc-three .lc-win { font-size: 19px; }
.sheet .lc-footer { margin-top: 6px; font-size: 14px; }
.sheet .lc-card .lc-more { min-height: 44px; padding: 0 4px 0 16px; font-size: 15px; font-weight: 600; touch-action: manipulation; }
.sheet .lc-extra { margin-top: 4px; padding-top: 12px; }
.sheet .lc-label { font-size: 14px; }
.sheet .lc-stake { font-size: 30px; }
.sheet .lc-card input[type=range] { height: 44px; margin: 4px 0; touch-action: pan-x; }
.sheet .lc-range-ends { font-size: 13px; }
.sheet .lc-returns, .sheet .lc-ai-line { font-size: 14px; }
.sheet .lc-today { font-size: 14px; }
.sheet .lc-status { font-size: 15px; margin-top: 8px; }
.sheet .lc-status:not(:empty) { min-height: 22px; }
.sheet .lc-result { padding: 10px 0 6px; text-align: center; }
.sheet .lc-result-num { font-size: 30px; }
.sheet .lc-result-text { font-size: 16px; }

/* Phones have no hover: never leave a grey "hovered" button after a tap. */
@media (hover: none) {
  .sheet .lc-card button:hover { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet .lc-card.lc-animated { transform: none; }
}

/* First-card hint (js/live.js): sits just above the player's first card until they pick or tap Got it. */
.sheet .card-hint {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 14px;
  background: var(--surface-1); color: var(--text-primary); border: 1px solid var(--border-strong); font-size: 15px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}
.sheet .card-hint p { margin: 0; flex: 1; }
.sheet .card-hint-ok {
  font: inherit; font-weight: 600; min-height: 44px; padding: 0 14px; border-radius: 12px; flex: none; cursor: pointer;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text-primary); touch-action: manipulation;
}
/* The time line hangs from the straight part of the top edge, clear of the rounded corners (it stuck out past them). */
.sheet .lc-timer { left: 20px; right: 20px; height: 3px; border-radius: 0 0 3px 3px; }

/* Sunset on plum for the phone's card (Waj, 8 Nov). Only the phone app: the shared card.css stays as it is
   for the Mac app and Chrome extension. The glow marks the timer and a picked side; gold means a win. */
:root[data-lc-theme="dark"] {
  --surface-1: #24102A; --surface-2: #2A1231;
  --border: #46224D; --border-strong: #5A2E62; --border-accent: #FF7A2E;
  --text-primary: #F4E9F2; --text-secondary: #D9C6D6; --text-muted: #B79AB5;
  --text-accent: #F4E9F2; --text-success: #FFD23D; --text-info: #FF2E7E;
  --fill-accent: #FF7A2E; --hover: rgba(255, 122, 46, 0.08);
}
.sheet .lc-card { box-shadow: 0 -12px 40px rgba(255, 46, 126, 0.14); }
.sheet .lc-timer-fill { background: linear-gradient(90deg, #FF2E7E, #FF7A2E, #FFD23D); }
.sheet .lc-card .lc-option { transition: border-color .2s, background .2s, transform .12s; }
.sheet .lc-card .lc-option:active { transform: scale(0.97); }
.sheet .lc-card .lc-option[aria-pressed="true"], .sheet .lc-card .lc-option.lc-picked { border-color: #FF7A2E; background: rgba(255, 122, 46, 0.12); }
.sheet .lc-result-num.lc-won { animation: win-pop .5s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes win-pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet .lc-result-num.lc-won { animation: none; } }
