/* ============================================================
   Your First Craps Table — focused rehearsal UI
   Tokens (felt/rail/gold, fonts) come from shared/styles.css.
   The dark canvas base lives in shared `.game-screen` (var(--bg) base layer),
   so this page's long scrolling Learn section stays dark.
   ============================================================ */

.ft-top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 480px; margin: 0 auto; padding: 16px 18px;
}
.ft-home { font-family: var(--font-display); font-size: 20px; color: var(--gold); text-decoration: none; }
.ft-learn-link { font-size: 13px; color: var(--text-muted); text-decoration: none; }
.ft-learn-link:hover { color: var(--text); }

.ft-app {
  max-width: 480px; margin: 0 auto; padding: 6px 16px 40px;
  min-height: 70vh; display: flex; flex-direction: column;
}

/* ---- shared screen scaffold ---- */
.ft-screen { display: flex; flex-direction: column; gap: 18px; animation: ftIn .35s ease; }
@keyframes ftIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ft-progress { display: flex; align-items: center; justify-content: space-between; }
.ft-progress .label { font-size: 12px; color: var(--text-muted); font-weight: 600; letter-spacing: .04em; }
.ft-dots { display: flex; gap: 4px; }
.ft-dots i { width: 14px; height: 3px; border-radius: 2px; background: var(--surface-3); transition: background .2s; }
.ft-dots i.on { background: var(--gold); }
.ft-dots i.now { background: var(--gold-bright); box-shadow: 0 0 6px rgba(240, 204, 94, .55); }

/* ---- living felt fragment ---- */
.ft-felt {
  position: relative; height: 184px; border-radius: 8px 8px 0 0; overflow: hidden;
  background: radial-gradient(90% 120% at 50% 0%, var(--felt-spot), var(--felt) 55%, var(--felt-dark) 100%);
  border-bottom: 9px solid var(--rail);
  box-shadow: inset 0 -1px 0 var(--rail-lo), inset 0 9px 22px rgba(0, 0, 0, .32);
}
.ft-felt::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 9px;
  background: linear-gradient(var(--rail-hi), var(--rail) 45%, var(--rail-lo));
}
.ft-puck {
  position: absolute; top: 16px; right: 22px; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-body); font-weight: 800; font-size: 10px; line-height: 1.05;
  border: 3px solid #c9c0a8; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: all .35s ease;
}
.ft-puck.off { background: #2a2320; color: #b9ad93; border-color: #5a5142; }
.ft-puck.on { background: #e8e2d2; color: #1a1a1a; }
.ft-felt-print {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--felt-print); pointer-events: none;
}
.ft-chips { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.ft-chip {
  width: 26px; height: 26px; border-radius: 50%;
  background: repeating-conic-gradient(#b8302f 0 18deg, #9c2625 18deg 36deg);
  border: 2px solid #e8e2d2; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); animation: ftIn .3s ease;
}
.ft-chip.odds { background: repeating-conic-gradient(#2f6db8 0 18deg, #25569c 18deg 36deg); }
.ft-dice { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; }
.ft-die {
  width: 34px; height: 34px; border-radius: 7px; background: #f4efe6; color: #1a1a1a;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .45); font-family: var(--font-body); animation: ftIn .3s ease;
}
.ft-felt.payout { box-shadow: inset 0 -1px 0 var(--rail-lo), inset 0 0 40px rgba(229, 184, 74, .25); }

/* ---- cadence (the dealer's voice) ---- */
.ft-cadence {
  font-size: 21px; line-height: 1.5; color: rgba(245, 240, 225, .92); font-weight: 500;
  min-height: 2.6em; display: flex; flex-wrap: wrap; gap: 0 .35em; align-items: baseline;
}
.ft-cadence .speaker {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim); font-weight: 700; width: 100%; margin-bottom: 2px;
}
.ft-cadence .speaker .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  animation: ftPulse 1.1s ease-in-out infinite;
}
@keyframes ftPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.ft-cadence .beat { font-style: italic; opacity: 0; animation: ftBeat .25s ease forwards; }
@keyframes ftBeat { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ---- prompt + choices ---- */
.ft-prompt { font-family: var(--font-display); font-size: 24px; color: var(--gold); line-height: 1.22; }
.ft-choices { display: flex; flex-direction: column; gap: 11px; }
.ft-choice {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  padding: 15px 16px; min-height: 56px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); color: var(--text); font-size: 15.5px; font-weight: 600;
  font-family: var(--font-body); cursor: pointer; transition: border-color .15s, background .15s;
}
.ft-choice:hover:not(:disabled) { border-color: var(--text-dim); }
.ft-choice .k { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--text-dim); flex: none; transition: all .15s; }
.ft-choice .tick { margin-left: auto; font-weight: 800; }
.ft-choice.right { border-color: var(--gold); background: linear-gradient(var(--surface-2), #20271c); box-shadow: 0 0 0 1px var(--gold) inset; }
.ft-choice.right .k { border-color: var(--gold); background: radial-gradient(var(--gold-bright), var(--gold)); box-shadow: 0 0 8px rgba(240, 204, 94, .5); }
.ft-choice.right .tick { color: var(--gold-bright); }
.ft-choice.wrong { border-color: #7a3b3b; background: #221416; opacity: .9; }
.ft-choice.wrong .tick { color: #d97a7a; }
.ft-choice:disabled { cursor: default; }
.ft-hint { font-size: 12.5px; color: var(--text-dim); text-align: center; margin-top: 2px; }
.ft-end { align-self: center; background: none; border: none; color: var(--text-dim); font-size: 12.5px; font-family: var(--font-body); cursor: pointer; text-decoration: underline; padding: 4px; }
.ft-end:hover { color: var(--text-muted); }

/* ---- corrective (inset tag treatment — NO colored left-border slop) ---- */
.ft-correct {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; display: flex; flex-direction: column; gap: 9px; animation: ftIn .3s ease;
}
.ft-correct .tag {
  align-self: flex-start; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800;
  color: #2a1f04; background: linear-gradient(var(--gold-bright), var(--gold)); padding: 4px 10px; border-radius: 999px;
}
.ft-correct .what { font-size: 15px; line-height: 1.5; color: var(--text); }
.ft-correct .why { font-size: 13.5px; line-height: 1.55; color: var(--text-muted); padding-top: 4px; border-top: 1px solid var(--border); }

/* ---- primary buttons ---- */
.ft-btn {
  width: 100%; padding: 15px; border: none; border-radius: var(--radius-lg); cursor: pointer;
  font-family: var(--font-body); font-weight: 800; font-size: 15px;
  background: linear-gradient(var(--gold-bright), var(--gold)); color: #2a1f04;
}
.ft-btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); font-weight: 700; }
.ft-btn:hover { filter: brightness(1.04); }

/* ---- bookends ---- */
.ft-book { text-align: center; gap: 20px; padding-top: 28px; align-items: center; }
.ft-book .ft-felt { width: 100%; }
.ft-book h2 { font-family: var(--font-display); font-size: 30px; color: var(--text); line-height: 1.18; }
.ft-book .lede { font-size: 15.5px; line-height: 1.6; color: var(--text-muted); max-width: 30em; }
.ft-book .ft-btn { max-width: 320px; }

/* ---- the card ---- */
.ft-cardwrap { display: flex; flex-direction: column; gap: 16px; padding-top: 10px; }
.ft-cardcanvas { width: 100%; max-width: 360px; aspect-ratio: 1; align-self: center; border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
.ft-cardacts { display: flex; gap: 10px; max-width: 360px; align-self: center; width: 100%; }
.ft-cardacts .ft-btn { flex: 1; }

/* ---- Learn content (crawlable SEO section under the app) ---- */
.ft-learn {
  max-width: 680px; margin: 8px auto 0; padding: 28px 20px 48px;
  border-top: 1px solid var(--border);
}
.ft-learn h1 { font-family: var(--font-display); font-size: 30px; font-weight: 400; color: var(--gold); line-height: 1.2; margin-bottom: 12px; }
.ft-learn h2 { font-family: var(--font-display); font-size: 22px; font-weight: 400; color: var(--text); line-height: 1.25; margin: 28px 0 10px; }
.ft-learn p { font-size: 15px; line-height: 1.65; color: var(--text-muted); margin-bottom: 14px; }
.ft-learn strong { color: var(--text); font-weight: 700; }
.ft-learn ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 4px 0 14px; }
.ft-learn li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.55; color: var(--text-muted); }
.ft-learn li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.ft-learn a { color: var(--green-bright); }
.ft-learn-cta { margin-top: 22px; font-size: 14px; font-weight: 600; }

/* ---- responsive (360px smallest) ---- */
@media (max-width: 380px) {
  .ft-app { padding: 6px 12px 36px; }
  .ft-prompt { font-size: 22px; }
  .ft-cadence { font-size: 19px; }
  .ft-choice { font-size: 14.5px; padding: 14px; }
  .ft-book h2 { font-size: 26px; }
}

/* ---- reduced motion: no reveal, no pulse, all visible at once ---- */
@media (prefers-reduced-motion: reduce) {
  .ft-screen, .ft-chip, .ft-die, .ft-correct, .ft-cadence .beat { animation: none !important; opacity: 1 !important; transform: none !important; }
  .ft-cadence .speaker .dot { animation: none; opacity: 1; }
  .ft-puck { transition: none; }
}
