/* Authentication, profile and Trophy UI: same room / paper / brass identity as the rest of the app. */
.auth-ticket { max-width: 480px; }
.auth-ticket .btn { width: 100%; justify-content: center; margin-top: 8px; min-height: 52px; }
.auth-ticket .ticket-title.sm { text-align: center; margin-bottom: 6px; }
.auth-notice { margin: 4px 0 10px; padding: 10px 14px; border-radius: 10px; background: rgba(184,30,45,.1); border: 1.5px solid rgba(184,30,45,.4); color: #7a1320; font: 600 13.5px/1.4 var(--f-ui); text-align: center; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--paper-dim); font: 700 11px var(--f-ui); letter-spacing: .3em; text-transform: uppercase; }
.auth-or i { flex: 1; height: 1.5px; background: rgba(28,20,16,.25); }
.auth-switch { margin: 14px 0 0; text-align: center; font-size: 14px; color: #4b3d31; }
.auth-guest { margin: 10px 0 0; text-align: center; font-size: 13px; }
.linkish { background: none; border: 0; padding: 4px 2px; color: var(--felt); font: 700 14px var(--f-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.linkish:hover { color: var(--felt-2); }
.linkish:focus-visible, .field input:focus-visible, .ap:focus-visible, .field-eye:focus-visible { outline: 3px solid var(--brass-2); outline-offset: 2px; }
.auth-done { text-align: center; } .auth-done .ticket-sub { margin-bottom: 14px; }

.field { margin-top: 14px; }
.field label { display: block; margin-bottom: 6px; font: 700 11.5px var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--paper-dim); }
.field-box { position: relative; display: flex; }
.field input { width: 100%; height: 52px; padding: 0 16px; box-sizing: border-box; border-radius: 10px; border: 1.5px solid var(--paper-ink); background: rgba(255,255,255,.7); color: var(--paper-ink); font: 500 17px var(--f-body); }
.field input::placeholder { color: rgba(28,20,16,.35); }
.field input:disabled { opacity: .6; }
.field.bad input { border-color: var(--felt); background: rgba(255,240,240,.85); box-shadow: 0 0 0 3px rgba(184,30,45,.18); }
.field-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); height: 44px; min-width: 52px; padding: 0 10px; border: 0; background: none; color: var(--paper-dim); font: 700 12px var(--f-ui); cursor: pointer; }
.field-err, .form-err { margin: 6px 0 0; color: #a3121f; font: 600 13px/1.4 var(--f-ui); }
.form-err { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; background: rgba(184,30,45,.08); border: 1.5px solid rgba(184,30,45,.35); text-align: center; }
.form-ok { margin: 10px 0 0; color: #146b3a; font: 700 13px var(--f-ui); }
.field-hint { margin: 6px 0 0; color: var(--paper-dim); font-size: 12.5px; line-height: 1.4; }
.spin { display: inline-block; width: 16px; height: 16px; margin-right: 6px; border: 2.5px solid rgba(0,0,0,.25); border-top-color: currentColor; border-radius: 50%; animation: authSpin .7s linear infinite; vertical-align: -3px; }
.provider .spin { margin: 0; }
@keyframes authSpin { to { transform: rotate(360deg); } }
.provider:disabled { cursor: not-allowed; }
.auth code { font: 600 12px ui-monospace, monospace; background: rgba(28,20,16,.08); padding: 1px 5px; border-radius: 4px; }

/* navigation: avatar + name + trophies */
.player-tag .pt-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: hsl(var(--hue, 40) 60% 82%); border: 2px solid var(--paper); flex: none; }
.trophy-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 99px; background: rgba(227,183,90,.14); border: 1px solid rgba(227,183,90,.5); color: var(--brass-3); font: 800 13px var(--f-ui); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.trophy-chip .tc-cup { font-size: 14px; line-height: 1; }
.trophy-chip.up { animation: tcUp 1.4s ease-out; } .trophy-chip.down { animation: tcDown 1.4s ease-out; }
@keyframes tcUp { 0%, 100% { box-shadow: 0 0 0 0 rgba(227,183,90,0); } 30% { box-shadow: 0 0 0 6px rgba(227,183,90,.35), 0 0 22px rgba(255,214,110,.9); transform: scale(1.12); } }
@keyframes tcDown { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-3px); background: rgba(184,30,45,.28); } 40%, 80% { transform: translateX(3px); } }
.player-tag .trophy-chip { margin-left: 2px; }
@media (max-width: 560px) { .player-tag .pt-name { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .player-tag { padding-right: 8px; gap: 6px; } }

/* post-game Trophy result */
.trophy-result { position: relative; margin: 14px auto 4px; max-width: 320px; padding: 14px 18px 12px; border-radius: 14px; text-align: center; overflow: hidden; border: 2px solid var(--brass-2);
  background: radial-gradient(90% 120% at 50% 0%, #fff1bd, #f3d98a 60%, #e0b85a); color: var(--brass-ink); animation: trIn .6s cubic-bezier(.2,.9,.3,1.25) both; }
.trophy-result.sheet { border-color: #7a4a1c; background: radial-gradient(90% 120% at 50% 0%, #e2b57a, #a9773a 60%, #6b4520); color: #fff3dd; animation: trIn .6s cubic-bezier(.2,.9,.3,1.25) both, trShake .6s .5s 2; }
.trophy-result.mid { border-color: rgba(28,20,16,.4); background: rgba(255,255,255,.55); color: var(--paper-ink); }
.tr-label { font: 800 11px var(--f-ui); letter-spacing: .3em; text-transform: uppercase; opacity: .85; }
.tr-delta { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 2px; font: 400 clamp(38px, 9vw, 52px)/1 var(--f-display); }
.tr-delta span { font-size: .8em; }
.tr-bal { font: 700 14px var(--f-ui); opacity: .9; font-variant-numeric: tabular-nums; } .tr-bal i { font-style: normal; opacity: .7; margin: 0 4px; }
.tr-note { margin-top: 6px; font: 600 12px var(--f-ui); opacity: .85; }
.tr-poop { position: absolute; right: 12px; top: 6px; font-size: 30px; transform: rotate(14deg); animation: trDrop .7s .2s cubic-bezier(.3,.1,.4,1) both; }
.tr-spark i { position: absolute; width: 9px; height: 9px; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: twinkle 1.6s ease-in-out infinite; }
.tr-spark i:nth-child(1) { left: 8%; top: 20%; animation-delay: .3s; } .tr-spark i:nth-child(2) { left: 88%; top: 14%; animation-delay: .6s; } .tr-spark i:nth-child(3) { left: 20%; top: 74%; animation-delay: .9s; }
.tr-spark i:nth-child(4) { left: 80%; top: 70%; animation-delay: 1.2s; } .tr-spark i:nth-child(5) { left: 50%; top: 6%; animation-delay: 1.5s; } .tr-spark i:nth-child(6) { left: 6%; top: 50%; animation-delay: 1.8s; }
@keyframes trIn { from { opacity: 0; transform: translateY(14px) scale(.85); } }
@keyframes trShake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px) rotate(-1deg); } 75% { transform: translateX(5px) rotate(1deg); } }
@keyframes trDrop { from { opacity: 0; transform: translateY(-40px) rotate(-30deg) scale(1.6); } }
.trophy-result.rm, .trophy-result.rm .tr-poop, .trophy-result.rm .tr-spark i { animation: none; } .trophy-result.rm .tr-spark { display: none; }
.practice-note { margin: 10px auto 0; text-align: center; font: 600 12.5px var(--f-ui); color: var(--paper-dim); }

/* profile */
.id-avatar.big { background: hsl(var(--hue, 40) 60% 84%); font-size: clamp(46px, 9vw, 78px); }
.id-user { margin-top: 4px; font: 700 14px var(--f-ui); letter-spacing: .06em; color: var(--paper-dim); } .id-trophies { margin-top: 10px; display: flex; justify-content: center; }
.id-trophies .trophy-chip { background: #2a1c05; color: var(--brass-3); font-size: 16px; padding: 5px 13px 5px 10px; }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.ap { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(28,20,16,.3); background: hsl(var(--hue) 60% 86%); font-size: 24px; cursor: pointer; display: grid; place-items: center; }
.ap.on { border-color: var(--felt); box-shadow: 0 0 0 3px var(--brass); transform: scale(1.06); }
.profile-form .btn { width: 100%; margin-top: 10px; }
.boot-msg { margin-top: 16px; text-align: center; color: rgba(243,234,216,.7); font: 600 13px var(--f-ui); letter-spacing: .1em; }
@media (prefers-reduced-motion: reduce) { .trophy-result, .trophy-result *, .trophy-chip { animation: none !important; } }

/* narrow phones: the signed-in navigation (brand + Rules + Settings + avatar + Trophies) must fit; the wordmark is repeated in the hero */
@media (max-width: 480px) { .nav { gap: 6px; } .nav-brand .lg-word { display: none; } .nav-links { gap: 2px; } }
.back-float { min-height: 44px; min-width: 44px; justify-content: center; }

/* home cards: the hover lift used to move a card out from under a pointer resting near its bottom edge, so it flickered forever.
   An invisible extension below the card (larger than the lift) keeps the hover stable. */
.fcard::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 9%; }

/* ---------- legal footer (landing + auth) ---------- */
.legal-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; margin: 18px auto 0; font: 600 12.5px/1 var(--f-ui); }
.legal-links a { color: rgba(243,234,216,.62); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(243,234,216,.28); padding: 12px 2px; min-height: 20px; }
.legal-links a:hover { color: var(--brass-3); text-decoration-color: var(--brass-3); }
.legal-links a:focus-visible { outline: 3px solid var(--brass-2); outline-offset: 2px; border-radius: 3px; }
.legal-links i { width: 3px; height: 3px; background: var(--brass); transform: rotate(45deg); flex: none; }
.auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; }
.auth > .legal-links { width: 100%; max-width: 480px; }
.legal-links.on-paper { margin: 6px 0 0; justify-content: center; }
.legal-links.on-paper a { color: var(--paper-ink); text-decoration-color: rgba(28,20,16,.4); font-weight: 700; }
.legal-links.on-paper a:hover { color: var(--felt); text-decoration-color: var(--felt); }
.legal-links.on-paper { column-gap: 20px; }
.legal-links.on-paper i { display: none; }
.ticket > .legal-links.on-paper { justify-content: center; margin-top: 14px; }
