/* Art-direction pass (after the design critique). Loaded after app.css; these rules refine it. */

/* ---------- in-game: header and turn banner ---------- */
.turn-msg { text-align: center; font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 1; margin-top: 10px; text-shadow: 0 2px 0 rgba(0,0,0,.3); min-height: 19px; transition: color .25s; }
.table { justify-content: center; gap: 10px; }
.game-bottom { margin-top: 10px; }

/* ---------- in-game: player cards ---------- */
.pcard { gap: 6px; }
.pcard .ring { width: 50px; height: 50px; }
.pcard .avatar { width: 41px; height: 41px; }
.pcard .ring.low { animation: shake .4s linear infinite; }
@keyframes shake { 25% { transform: translateX(-2px) rotate(-3deg); } 75% { transform: translateX(2px) rotate(3deg); } }
.pcard .name { font-size: 15px; }
.pcard .homes { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-family: var(--display); font-weight: 800; font-size: 15px; line-height: 1; color: #fff; }
.pcard.right .homes { justify-content: flex-end; }
.pcard .homes img { width: 13px; height: 19px; }
/* Only the player whose turn it is shows a dice; idle cards use the room for the name. */
.pcard:not(.active) .dice-well { display: none; }
.dice-well { width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.28), rgba(8,2,50,.55) 75%); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), inset 0 3px 6px rgba(0,0,0,.4); }
.pcard.myturn .dice-well { background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.5), rgba(255,200,61,.35) 75%); }
.dice { width: 34px; height: 34px; }
.face { border-radius: 8px; padding: 5px; }
.face i { width: 6.5px; height: 6.5px; }
.face.one i { width: 10px; height: 10px; }
.f1 { transform: translateZ(17px); } .f6 { transform: rotateY(180deg) translateZ(17px); }
.f2 { transform: rotateY(90deg) translateZ(17px); } .f5 { transform: rotateY(-90deg) translateZ(17px); }
.f3 { transform: rotateX(90deg) translateZ(17px); } .f4 { transform: rotateX(-90deg) translateZ(17px); }
@keyframes tumble { 0% { transform: rotateX(0) rotateY(0) scale(1); } 30% { transform: rotateX(420deg) rotateY(300deg) scale(1.18); } 70% { transform: rotateX(800deg) rotateY(640deg) scale(1.04); } 100% { transform: rotateX(var(--rx)) rotateY(var(--ry)); } }

/* ---------- in-game: reactions and chat bubbles stay off the board ---------- */
.emote-fly { left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; font-size: 0; animation: emote 1.8s cubic-bezier(.2,.8,.3,1) forwards; filter: drop-shadow(0 4px 6px rgba(0,0,0,.45)); }
.pcard.right .emote-fly { left: 50%; right: auto; }
.bubble { max-width: 160px; font-size: 14px; top: auto; bottom: calc(100% + 8px); left: 8px; animation-duration: 2.6s; z-index: 30; }
.pcard.right .bubble { left: auto; right: 8px; }
.pcard.bottom .bubble { bottom: auto; top: calc(100% + 8px); }
.bubble::after { content: ''; position: absolute; left: 18px; top: 100%; border: 7px solid transparent; border-top-color: #fff; border-bottom: 0; }
.pcard.right .bubble::after { left: auto; right: 18px; }
.pcard.bottom .bubble::after { top: auto; bottom: 100%; border: 7px solid transparent; border-bottom-color: #fff; border-top: 0; }
.emotes button { width: 44px; display: grid; place-items: center; }
.emotes img { width: 36px; height: 36px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }

/* ---------- board ---------- */
.yard-glow { position: absolute; aspect-ratio: 1; border-radius: 17%; pointer-events: none; opacity: 0; transition: opacity .3s; box-shadow: 0 0 0 3px var(--c), 0 0 16px 4px var(--c), inset 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); z-index: 1; }
.yard-glow.on { opacity: 1; animation: yard 1.1s ease-in-out infinite; }
@keyframes yard { 50% { box-shadow: 0 0 0 5px var(--c), 0 0 26px 8px var(--c), inset 0 0 22px color-mix(in srgb, var(--c) 60%, transparent); } }
.token .cnt { position: absolute; right: -32%; top: -6%; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #1B0D66; box-shadow: 0 0 0 1.5px #fff; color: #fff; font-family: var(--display); font-weight: 800; font-size: 13px; line-height: 16px; text-align: center; display: none; }
.token.can::after { inset: -30% -25% -15%; }

/* ---------- result popup ---------- */
#fx { z-index: 45; }                      /* confetti falls behind popups, never over the buttons */
.rank .pos { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; line-height: 1; color: #2A1A00; background: rgba(255,255,255,.18); box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.rank .pos.p1 { background: #FFF2B8; box-shadow: inset 0 -2px 0 #E0A000, 0 0 0 2px #B56A00; }
.rank .pos.p2 { background: #D9DFEF; box-shadow: inset 0 -2px 0 #9AA3BF; }
.rank .pos.p3 { background: #E5A069; box-shadow: inset 0 -2px 0 #A8622F; }
.rank .pos.p4 { color: #fff; }
.rank .amt { font-size: 16px; }
.reward { display: flex; align-items: center; justify-content: center; gap: 8px; width: max-content; min-width: 170px; height: 56px; margin: 16px auto 0; padding: 0 22px 0 12px; border-radius: 28px; background: rgba(15,6,70,.6); box-shadow: inset 0 0 0 3px var(--gold), 0 0 22px rgba(255,200,61,.45); }
.reward img { width: 36px; height: 36px; }
.reward b { font-size: 30px; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.btn.ghost { min-height: 58px; }
.btn-row { align-items: start; }
.btn.wa { margin-top: 14px; background: linear-gradient(180deg, #4BE283, #25D366 60%); box-shadow: 0 6px 0 #128C4A, 0 10px 18px rgba(0,0,0,.3), inset 0 2px 0 rgba(255,255,255,.45); font-size: 18px; }
.btn.wa:active { box-shadow: 0 2px 0 #128C4A, inset 0 2px 0 rgba(255,255,255,.45); }

/* ---------- chat sheet ---------- */
.chat-sheet { height: auto; max-height: 78%; }
.chat-log { min-height: 96px; max-height: 190px; }
.msg.me p { background: var(--c); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; overflow: visible; padding: 12px 0; }
.quick button { min-height: 46px; padding: 0 10px; border-radius: 14px; font-family: var(--display); font-weight: 700; font-size: 16px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 rgba(10,3,60,.6); }
.chat-input .btn { min-height: 44px; margin-bottom: 6px; }

/* ---------- sheets: more separation from the background ---------- */
.sheet .close { width: 44px; height: 44px; top: 12px; right: 12px; }
.seg button, .stake, .day, .stat, .toggle-row, .rules div { background: rgba(255,255,255,.09); box-shadow: inset 0 2px 0 rgba(255,255,255,.1), inset 0 0 0 2px rgba(255,255,255,.1); }
.stake small b, .stake .win { color: var(--gold); }
.stake.on .win { color: #7A4B00; }
.stake.locked { opacity: 1; }
.stake.locked img, .stake.locked b { opacity: .45; }
.stake .lock { display: flex; align-items: center; gap: 4px; color: #FFB3BD; font-size: 13px; font-weight: 800; }
.stake .lock svg { width: 13px; height: 13px; flex: none; }
.sheet-balance { position: absolute; top: 14px; left: 14px; height: 36px; padding: 0 12px 0 4px; font-size: 16px; }
.sheet-balance img { width: 28px; height: 28px; }
.rules b svg { width: 20px; height: 20px; }
.version { margin-top: 16px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 700; }

/* ---------- daily bonus ---------- */
.day { position: relative; }
.day.done { opacity: 1; }
.day.done > * { opacity: .35; }
.day.done::after { content: ''; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 20px no-repeat; box-shadow: 0 3px 0 var(--green-d); }
.day.future img { filter: saturate(.6) brightness(.85); }
.day.big { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; box-shadow: inset 0 0 0 2px rgba(255,200,61,.7), 0 0 18px rgba(255,200,61,.25); }
.day.big img { width: 62px; height: 62px; margin: 0; filter: drop-shadow(0 0 10px rgba(255,200,61,.7)); }
.day.big b { font-size: 22px; }

/* ---------- home ---------- */
.dot-live { background: #3DFF7A; box-shadow: 0 0 0 0 rgba(61,255,122,.8); width: 10px; height: 10px; border: 2px solid #0F7F38; box-sizing: content-box; }
@keyframes live { to { box-shadow: 0 0 0 9px rgba(61,255,122,0); } }
.play-online .go { width: 40px; height: 40px; background: rgba(0,80,30,.3); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.play-online .go svg { width: 20px; height: 20px; margin-left: 2px; }
.dock { grid-template-columns: repeat(3, 1fr); padding: 0 8px 6px; background: linear-gradient(180deg, #33199F, #24108A); box-shadow: 0 5px 0 #14085A, inset 0 2px 0 rgba(255,255,255,.2); margin-top: 26px; }
.dock button { margin-top: -12px; font-family: var(--display); font-weight: 700; font-size: 15px; color: #fff; gap: 0; }
.dock img { width: 54px; height: 54px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.35)); }
.badge { right: 22%; }

@media (max-height: 700px) {
  .dock img { width: 44px; height: 44px; } .dock { margin-top: 20px; }
  .turn-msg { margin-top: 6px; font-size: 17px; } .table { padding-top: 6px; gap: 6px; }
  .board-wrap { width: min(100%, calc(100dvh - 318px)); }
}

/* ---- account: save progress with Google or Facebook ---- */
.acct { margin: 14px 0 10px; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 2px rgba(255,255,255,.12); text-align: left; }
.acct b { display: block; font-family: var(--display); font-weight: 800; font-size: 18px; }
.acct span { display: block; font-size: 14px; line-height: 1.35; color: var(--muted); margin-top: 3px; }
.acct.on { background: rgba(34,197,94,.16); box-shadow: inset 0 0 0 2px rgba(74,222,128,.55); }
.acct.on span { color: #fff; } .acct .tick { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: #22c55e; color: #fff; font-style: normal; font-size: 12px; font-weight: 800; }
.sign { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; margin-top: 10px; border: 0; border-radius: 26px; font-family: var(--display); font-weight: 800; font-size: 17px; }
.sign.g { background: #fff; color: #1f1f1f; box-shadow: 0 4px 0 #c9ccd6, 0 8px 14px rgba(0,0,0,.28); }
.sign.f { background: #1877F2; color: #fff; box-shadow: 0 4px 0 #0c4fb0, 0 8px 14px rgba(0,0,0,.28); }
.sign:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.3); } .sign:disabled { opacity: .6; }
.gbox { display: flex; justify-content: center; min-height: 50px; margin-top: 10px; } .gbox .sign { margin-top: 0; } .gbox > div { margin: 3px auto; }
