/* THE TIGER — room styles. Every rule scoped under #screen-tiger. */

#screen-tiger .tg-room {
  max-width: 34rem;
  margin: 0 auto;
  padding: 0.4rem 0.4rem 5.5rem;   /* room for the fixed turn bar */
  position: relative;
}

/* ---------- head / the painting / the dealer ---------- */
#screen-tiger .tg-head { margin-bottom: 0.2rem; }
#screen-tiger .tg-head .label { font-size: 0.8rem; letter-spacing: 0.34em; }
#screen-tiger .tg-painting {
  position: relative;
  width: 124px;
  height: 56px;
  margin: 0.35rem auto 0.1rem;
}
#screen-tiger .tg-frame {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 60%, #1c1208 0%, #0c0804 75%);
  border: 3px solid #4a3413;
  border-radius: 2px;
  box-shadow:
    inset 0 0 14px rgba(0, 0, 0, 0.9),
    0 4px 14px rgba(0, 0, 0, 0.7),
    0 0 0 1px #241804;
  overflow: hidden;
}
#screen-tiger .tg-eye {
  position: absolute;
  top: 44%;
  width: 11px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #e8a93c 0%, #7a4a10 70%, transparent 100%);
  box-shadow: 0 0 7px rgba(232, 169, 60, 0.55);
  transition: transform 0.5s cubic-bezier(0.6, 0, 0.4, 1), opacity 0.6s, background 0.5s;
}
#screen-tiger .tg-eye.left { left: 34%; }
#screen-tiger .tg-eye.right { right: 34%; }
#screen-tiger .tg-painting.eyes-moved .tg-eye {
  transform: translateX(9px) scaleY(1.5);
  background: radial-gradient(circle at 50% 50%, #ffc257 0%, #b35c0a 70%, transparent 100%);
  box-shadow: 0 0 14px rgba(255, 150, 40, 0.9);
}
#screen-tiger .tg-painting.empty .tg-eye { opacity: 0; }
#screen-tiger .tg-stripeshadow {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 9px, rgba(190, 95, 12, 0.10) 9px 15px);
  opacity: 0.7;
}
#screen-tiger .tg-painting.empty .tg-frame { background: #050302; }
#screen-tiger .tg-lamp {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 30px;
  height: 5px;
  margin-left: -15px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(216, 180, 90, 0.5), transparent 70%);
}
#screen-tiger .tg-dealer {
  min-height: 2.1rem;
  margin: 0.25rem auto 0;
  max-width: 26rem;
  font-size: 0.86rem;
  color: var(--bone, #cfc9b8);
  transition: opacity 0.3s ease;
}

/* ---------- HUD ---------- */
#screen-tiger .tg-hud {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  padding: 0.3rem 0 0.45rem;
  border-bottom: 1px dashed rgba(216, 180, 90, 0.18);
  margin-bottom: 0.45rem;
}
#screen-tiger .tg-coins { font-size: 1.2rem; }
#screen-tiger .tg-flag { color: var(--gold-dim); }
#screen-tiger .tg-stripedots { display: inline-flex; gap: 0.32rem; }
#screen-tiger .tg-sdot {
  width: 0.7rem;
  height: 0.42rem;
  border-radius: 50%;
  border: 1px solid #4a3413;
  background: #100a04;
  transition: background 0.4s, box-shadow 0.4s;
}
#screen-tiger .tg-sdot.lit {
  background: radial-gradient(circle at 50% 50%, #ff9d33, #8a4708 75%);
  box-shadow: 0 0 8px rgba(255, 140, 30, 0.7);
}

/* ---------- coach / drift ---------- */
#screen-tiger .tg-coach {
  margin: 0.1rem auto 0.4rem;
  max-width: 26rem;
  font-size: 0.8rem;
  font-style: italic;
  color: #a89b6f;
  border: 1px dashed rgba(216, 180, 90, 0.25);
  border-radius: 3px;
  padding: 0.35rem 0.6rem;
}
#screen-tiger .tg-driftrow {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  min-height: 1.1rem;
  margin-bottom: 0.4rem;
}
#screen-tiger .tg-humword { color: #9b8d5e; }
#screen-tiger .tg-cuffword { color: #8c8775; }

/* ---------- the board: thirteen enamel cells ---------- */
#screen-tiger .tg-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
  margin: 0 auto 0.6rem;
}
#screen-tiger .tg-cell {
  position: relative;
  min-height: 76px;
  padding: 0.4rem 0.2rem 0.5rem;
  font-family: Georgia, serif;
  background:
    radial-gradient(ellipse at 50% 30%, #15211a 0%, #0b1410 80%);
  color: #cfc9b8;
  border: 1px solid #2c3a26;
  border-radius: 5px;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.5),
    inset 0 0 18px rgba(0, 0, 0, 0.55),
    0 3px 8px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: box-shadow 0.3s, border-color 0.3s, background 0.3s, transform 0.12s;
}
#screen-tiger .tg-cell:active { transform: scale(0.97); }
#screen-tiger .tg-cell[data-third="0"] { border-bottom-color: #3a4a30; }
#screen-tiger .tg-cell[data-third="1"] { border-bottom-color: #4a4430; }
#screen-tiger .tg-cell[data-third="2"] { border-bottom-color: #4a3030; }
#screen-tiger .tg-sigil {
  display: block;
  font-size: 1.45rem;
  line-height: 1.4rem;
  color: #d6d0bc;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}
#screen-tiger .tg-signame { font-size: 0.6rem; letter-spacing: 0.06em; }
#screen-tiger .tg-cell.glow {
  border-color: rgba(216, 180, 90, 0.55);
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(216, 160, 60, 0.16),
    0 0 12px rgba(216, 160, 60, 0.22);
}
#screen-tiger .tg-cell.staked { border-color: rgba(216, 180, 90, 0.4); }
#screen-tiger .tg-cell.lose {
  border-color: #7a2a1c;
  box-shadow: inset 0 0 22px rgba(160, 40, 20, 0.5), 0 0 10px rgba(160, 40, 20, 0.4);
}
#screen-tiger .tg-cell.win {
  border-color: var(--gold);
  box-shadow: inset 0 0 22px rgba(216, 180, 90, 0.35), 0 0 14px rgba(216, 180, 90, 0.45);
}
#screen-tiger .tg-cell.eaten {
  border-color: #b35c0a;
  box-shadow: inset 0 0 26px rgba(200, 100, 15, 0.55);
}
#screen-tiger .tg-stack {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 1px;
  pointer-events: none;
}
#screen-tiger .tg-chip {
  width: 13px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #d8b45a, #8a6a28);
  border: 1px solid #5b481c;
  margin-left: -7px;
}
#screen-tiger .tg-chip:first-child { margin-left: 0; }
#screen-tiger .tg-stakeamt {
  font-size: 0.68rem;
  color: var(--gold);
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
#screen-tiger .tg-coppertok {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #3a3a3c, #0a0a0c 75%);
  border: 1px solid #000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
}
#screen-tiger .tg-cell.coppered .tg-coppertok { opacity: 1; transform: scale(1); }
#screen-tiger .tg-cell.coppered { border-style: dashed; }

/* ---------- chips & modes ---------- */
#screen-tiger .tg-modes { margin-bottom: 0.55rem; }
#screen-tiger .tg-chiprow, #screen-tiger .tg-moderow {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}
#screen-tiger .tg-chipbtn {
  min-width: 58px;
  min-height: 44px;
  font-family: Georgia, serif;
  font-size: 1rem;
  color: #cfc9b8;
  background: #120d06;
  border: 1px solid #4a3d22;
  border-radius: 22px;
  cursor: pointer;
}
#screen-tiger .tg-chipbtn .tg-chipface { color: var(--gold-dim); margin-right: 0.25rem; }
#screen-tiger .tg-chipbtn.picked {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 10px rgba(216, 180, 90, 0.3);
}
#screen-tiger .tg-mode {
  min-height: 44px;
  padding: 0 0.8rem;
  font-family: Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: #8c8775;
  background: #0d0a05;
  border: 1px solid #3a3424;
  border-radius: 3px;
  cursor: pointer;
}
#screen-tiger .tg-mode.picked { border-color: var(--gold-dim); color: var(--gold); }
#screen-tiger .tg-mode[data-mode="copper"].picked {
  border-color: #555;
  color: #d6d0bc;
  background: #16161a;
}

/* ---------- the shoe & the two-beat cards ---------- */
#screen-tiger .tg-shoe {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 0.4rem;
  min-height: 86px;
}
#screen-tiger .tg-shoebrass {
  width: 64px;
  height: 46px;
  border-radius: 6px 14px 4px 4px;
  background: linear-gradient(150deg, #8a6a28 0%, #4a3413 45%, #6b521e 70%, #2c1f0a 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 230, 160, 0.3),
    inset 0 -4px 8px rgba(0, 0, 0, 0.6),
    0 4px 10px rgba(0, 0, 0, 0.6);
  position: relative;
}
#screen-tiger .tg-shoebrass::after {
  content: '';
  position: absolute;
  right: 7px;
  top: 12px;
  width: 13px;
  height: 22px;
  background: #0a0703;
  border-radius: 2px;
  box-shadow: inset 0 0 6px #000;
}
#screen-tiger .tg-cardslots { display: flex; gap: 0.9rem; }
#screen-tiger .tg-card {
  width: 58px;
  text-align: center;
}
#screen-tiger .tg-card .tg-cardface {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 78px;
  margin: 0 auto 0.2rem;
  font-size: 1.7rem;
  color: #1c1208;
  background: linear-gradient(165deg, #e8e2cc 0%, #cfc6a8 100%);
  border: 1px solid #8a8266;
  border-radius: 4px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
  opacity: 0;
}
#screen-tiger .tg-card.killer .tg-cardface {
  opacity: 1;
  color: #6e1d10;
  border-color: #7a2a1c;
  animation: tg-snap 0.09s steps(2, end);
}
#screen-tiger .tg-card.payer .tg-cardface {
  opacity: 1;
  color: #4a3a10;
  border-color: var(--gold-dim);
  animation: tg-fall 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
#screen-tiger .tg-card.striped .tg-cardface {
  opacity: 1;
  background:
    repeating-linear-gradient(115deg, #d97a14 0 7px, #281405 7px 14px);
  border-color: #b35c0a;
  box-shadow: 0 0 22px rgba(217, 122, 20, 0.7);
  animation: tg-snap 0.09s steps(2, end);
}
#screen-tiger .tg-card .tg-cardword { font-size: 0.62rem; }
@keyframes tg-snap {
  0% { transform: translateY(-30px) scale(1.06); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
@keyframes tg-fall {
  0% { transform: translateY(-22px) rotate(-4deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}

/* the stripe washes the room tiger-orange for a breath */
#screen-tiger .tg-room.stripe-flash::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(217, 122, 20, 0.16) 0%, rgba(120, 60, 8, 0.07) 60%, transparent 100%);
  animation: tg-stripewash 1.6s ease-out forwards;
}
@keyframes tg-stripewash {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- actions: the fat fixed turn bar ---------- */
#screen-tiger .tg-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(6, 9, 6, 0) 0%, rgba(6, 9, 6, 0.92) 30%, #060906 100%);
}
#screen-tiger .tg-turnbtn {
  min-width: 11rem;
  min-height: 52px;
  font-size: 1.05rem;
  letter-spacing: 0.3em;
  font-family: Georgia, serif;
  background: #0d0a05;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(216, 180, 90, 0.18), 0 -4px 18px rgba(0, 0, 0, 0.4);
}
#screen-tiger .tg-turnbtn:disabled { opacity: 0.35; cursor: default; }
#screen-tiger .tg-bankbtn {
  min-height: 52px;
  padding: 0 0.9rem;
  font-family: Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: #cfc9b8;
  background: #0d0a05;
  border: 1px solid #4a3d22;
  border-radius: 4px;
  cursor: pointer;
}
#screen-tiger .tg-bankbtn:disabled { opacity: 0.35; cursor: default; }

/* ---------- footer ---------- */
#screen-tiger .tg-footer {
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  margin-top: 0.4rem;
}

/* ---------- calling the turn ---------- */
#screen-tiger .tg-callpanel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  width: min(92vw, 26rem);
  padding: 1rem 0.9rem 1.1rem;
  background: #0b0e0a;
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.9);
  text-align: center;
}
#screen-tiger .tg-call-head { font-size: 0.85rem; letter-spacing: 0.3em; }
#screen-tiger .tg-call-sub { margin: 0.3rem 0 0.7rem; }
#screen-tiger .tg-call-cards {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}
#screen-tiger .tg-callcard {
  width: 72px;
  min-height: 96px;
  padding-top: 0.5rem;
  font-family: Georgia, serif;
  background:
    repeating-linear-gradient(115deg, #1d2418 0 8px, #131a10 8px 16px);
  color: #cfc9b8;
  border: 1px solid #3a4a30;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.3s;
}
#screen-tiger .tg-callsigil { display: block; font-size: 1.4rem; }
#screen-tiger .tg-callcard.picked { border-color: var(--gold); box-shadow: 0 0 10px rgba(216, 180, 90, 0.3); }
#screen-tiger .tg-callcard.revealed {
  background: linear-gradient(165deg, #e8e2cc 0%, #cfc6a8 100%);
  color: #1c1208;
}
#screen-tiger .tg-callcard.revealed.right { border-color: var(--gold); box-shadow: 0 0 14px rgba(216, 180, 90, 0.5); }
#screen-tiger .tg-callcard.revealed:not(.right) { border-color: #7a2a1c; }
#screen-tiger .tg-callorder {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  font-size: 0.68rem;
  color: var(--gold);
}
#screen-tiger .tg-call-stakes { display: flex; justify-content: center; gap: 0.45rem; margin-bottom: 0.7rem; }
#screen-tiger .tg-call-actions { display: flex; justify-content: center; gap: 0.7rem; align-items: center; }

/* ---------- blackout: the lamp dies ---------- */
#screen-tiger .tg-blackout {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tg-lampdie 0.7s ease-in;
}
#screen-tiger .tg-darkline {
  max-width: 22rem;
  font-style: italic;
  color: #5e564a;
  font-size: 0.95rem;
  animation: tg-darkline 2.4s ease-in;
}
@keyframes tg-lampdie { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes tg-darkline { 0% { opacity: 0; } 45% { opacity: 0; } 100% { opacity: 1; } }

/* ---------- explainer / end overlays ---------- */
#screen-tiger .tg-explainer, #screen-tiger .tg-end {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 6, 4, 0.95);
  padding: 1.4rem 0.8rem 2.4rem;
  overflow-y: auto;
  text-align: center;
}
#screen-tiger .tg-dismiss { min-height: 48px; letter-spacing: 0.2em; }
#screen-tiger .tg-end-leave { min-height: 48px; letter-spacing: 0.2em; margin-top: 0.4rem; }
#screen-tiger .tg-howto { text-align: left; padding-left: 1.1rem; margin: 0.2rem 0 0; }
#screen-tiger .tg-howto li { font-size: 0.8rem; line-height: 1.45; margin-bottom: 0.45rem; color: #b5ae98; }
#screen-tiger .tg-howto b { color: var(--gold); font-weight: 600; }
#screen-tiger .tg-explainer-house, #screen-tiger .tg-end-house {
  font-style: italic;
  color: #a89b6f;
  max-width: 24rem;
  margin: 0.9rem auto;
}
#screen-tiger .tg-demo { height: 54px; display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
#screen-tiger .tg-demo-card {
  width: 26px;
  height: 38px;
  border-radius: 3px;
  background: linear-gradient(165deg, #e8e2cc, #cfc6a8);
  border: 1px solid #8a8266;
}
#screen-tiger .tg-demo-card.k { border-color: #7a2a1c; animation: tg-demo-k 2.4s infinite; }
#screen-tiger .tg-demo-card.p { border-color: var(--gold-dim); animation: tg-demo-p 2.4s infinite; }
@keyframes tg-demo-k { 0%, 12% { transform: translateY(-8px); opacity: 0; } 18%, 100% { transform: none; opacity: 1; } }
@keyframes tg-demo-p { 0%, 48% { transform: translateY(-8px); opacity: 0; } 62%, 100% { transform: none; opacity: 1; } }
#screen-tiger .tg-demo-stripecard {
  width: 30px;
  height: 42px;
  border-radius: 3px;
  background: repeating-linear-gradient(115deg, #d97a14 0 6px, #281405 6px 12px);
  border: 1px solid #b35c0a;
  box-shadow: 0 0 12px rgba(217, 122, 20, 0.55);
  animation: tg-demo-stripe 2.6s infinite;
}
@keyframes tg-demo-stripe { 0%, 100% { box-shadow: 0 0 6px rgba(217, 122, 20, 0.3); } 50% { box-shadow: 0 0 18px rgba(217, 122, 20, 0.8); } }
#screen-tiger .tg-demo-callcard {
  width: 24px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--gold-dim);
  border-radius: 3px;
  background: repeating-linear-gradient(115deg, #1d2418 0 6px, #131a10 6px 12px);
  border: 1px solid #3a4a30;
}
#screen-tiger .tg-end-scroll { max-width: 26rem; margin: 0 auto; }
#screen-tiger .tg-end h3 { color: var(--gold); letter-spacing: 0.22em; margin: 1.2rem 0 0.4rem; }
#screen-tiger .tg-end h3.tg-down { color: #9b5a4a; }
#screen-tiger .tg-end-detail { font-size: 0.9rem; color: #cfc9b8; }
#screen-tiger .tg-ledger {
  margin: 0.9rem auto;
  padding: 0.6rem 0.6rem 0.7rem;
  border: 1px solid rgba(216, 180, 90, 0.22);
  border-radius: 4px;
  background: rgba(10, 12, 9, 0.7);
}
#screen-tiger .tg-ledlabel { font-size: 0.7rem; letter-spacing: 0.3em; }
#screen-tiger .tg-ledsub { margin: 0.25rem 0 0.5rem; }
#screen-tiger .tg-ledrow {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.13rem 0;
  border-bottom: 1px dotted rgba(216, 180, 90, 0.1);
  font-size: 0.82rem;
}
#screen-tiger .tg-ledno { min-width: 1.4rem; text-align: right; font-variant-numeric: tabular-nums; }
#screen-tiger .tg-ledkill { color: #b06a55; }
#screen-tiger .tg-ledpay { color: var(--gold); }
#screen-tiger .tg-ledrow.striped .tg-ledstripe {
  color: #d97a14;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
}

/* ---------- mobile ≤600px: thumb-fair ---------- */
@media (max-width: 600px) {
  #screen-tiger .tg-board { grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
  #screen-tiger .tg-cell { min-height: 72px; min-width: 48px; }
  #screen-tiger .tg-sigil { font-size: 1.3rem; }
  #screen-tiger .tg-signame { font-size: 0.55rem; }
  #screen-tiger .tg-hud { gap: 0.7rem; }
  #screen-tiger .tg-shoe { gap: 0.7rem; min-height: 76px; }
  #screen-tiger .tg-card .tg-cardface { width: 50px; height: 68px; font-size: 1.5rem; }
  #screen-tiger .tg-card { width: 50px; }
  #screen-tiger .tg-turnbtn { min-width: 9rem; flex: 1; max-width: 14rem; }
  #screen-tiger .tg-callcard { width: 64px; min-height: 90px; }
  #screen-tiger .tg-room { padding-bottom: 6rem; }
}
