* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at 50% 0%, #4a0d14 0%, #1c0408 55%, #0a0203 100%);
  color: #f5f5f5; display: flex; justify-content: center; align-items: stretch;
  overflow: hidden; touch-action: manipulation;
}
#app { width: 100%; max-width: 480px; height: 100%; display: flex; flex-direction: column;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); position: relative; }
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.hidden { display: none !important; }
#muteBtn { position: absolute; top: 10px; right: 12px; z-index: 30; background: rgba(255,255,255,.12);
  border: none; color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; cursor: pointer; }
#start { justify-content: center; align-items: center; text-align: center; gap: 4px; }
.flag { font-size: 42px; }
#start h1 { font-size: 30px; font-weight: 800; letter-spacing: 1px; line-height: 1.05; }
#start .accent { color: #ffd24a; display: block; font-size: 34px; }
#start p.tag { color: #e7c0c4; font-size: 15px; margin-top: 10px; line-height: 1.5; max-width: 320px; }
.rules { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  padding: 14px 16px; margin: 16px 0; text-align: left; font-size: 13.5px; color: #f0dcdd; line-height: 1.55; max-width: 340px; }
.rules b { color: #ffd24a; }
.btn { background: #ffd24a; color: #2a0a0d; border: none; border-radius: 999px; font-size: 17px; font-weight: 800;
  padding: 15px 30px; cursor: pointer; box-shadow: 0 6px 0 #c79410; transition: transform .05s, box-shadow .05s; letter-spacing: .3px; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #c79410; }
.btn.ghost { background: transparent; color: #ffd24a; border: 2px solid #ffd24a; box-shadow: none; }
.btn.sm { font-size: 14px; padding: 10px 18px; box-shadow: 0 4px 0 #c79410; }
.credit { color: #a37a7e; font-size: 11.5px; margin-top: 14px; }
.linklike { color: #ffd24a; font-size: 13px; background: none; border: none; cursor: pointer; text-decoration: underline; margin-top: 12px; }
#authBox { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  padding: 14px; margin-top: 12px; width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 8px; }
#authBox input { padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.25); color: #fff; font-size: 14px; }
.authrow { display: flex; gap: 8px; }
.authrow .btn { flex: 1; }
#authMsg { font-size: 12px; color: #ff9d9d; min-height: 14px; }
#userTag { font-size: 13px; color: #6fe09a; margin-top: 10px; }
#stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; margin-bottom: 2px; }
.stat .top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; margin-bottom: 3px; }
.stat .name { color: #e9d6d8; font-weight: 600; }
.stat .delta { font-weight: 800; font-size: 11.5px; opacity: 0; transition: opacity .2s; }
.stat .delta.show { opacity: 1; } .stat .delta.up { color: #6fe09a; } .stat .delta.down { color: #ff8a8a; }
.bar { height: 8px; background: rgba(255,255,255,.13); border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 50%; border-radius: 6px; transition: width .45s cubic-bezier(.4,1.3,.5,1); }
.s-pueblo i { background: #ff5252; } .s-congreso i { background: #ffc23d; }
.s-economia i { background: #34d17a; } .s-prensa i { background: #4ea3ff; }
#hud { display: flex; justify-content: space-between; align-items: center; margin: 9px 2px 6px; font-size: 12px; color: #d9b9bc; }
#hud b { color: #fff; font-weight: 800; }
#cardWrap { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
#card { background: linear-gradient(180deg, #fffdf7, #fdeede); color: #2a1410; border-radius: 20px;
  box-shadow: 0 14px 36px rgba(0,0,0,.45); position: relative; overflow: hidden; cursor: grab; }
#card.dragging { cursor: grabbing; }
#cardScene { width: 100%; height: 116px; display: block; }
#cardScene img { width: 100%; height: 116px; object-fit: cover; display: block; image-rendering: pixelated; }
#cardBody { padding: 16px 18px 18px; }
#card .who { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: #b23a1e; margin-bottom: 8px; }
#card .sit { font-size: 17px; line-height: 1.4; font-weight: 600; min-height: 76px; }
#choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.choice { position: relative; background: #fff; border: 2px solid #e7cfa0; color: #2a1410; border-radius: 13px;
  padding: 10px 11px; font-weight: 600; cursor: pointer; line-height: 1.25; min-height: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center;
  transition: background .12s, transform .06s, border-color .12s; }
.choice:active { transform: scale(.98); }
#choiceA:hover, #choiceA.active { border-color: #d9342b; background: #ffe9e2; }
#choiceB:hover, #choiceB.active { border-color: #2f9e63; background: #e7f6ed; }
.choice .ab { font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; display: flex; align-items: center; gap: 5px; }
#choiceA .ab { color: #c0331f; } #choiceB .ab { color: #1f8049; }
.choice .ab .arw { font-size: 17px; line-height: 1; }
.choice .ctxt { font-size: 14px; }
.hint { position: absolute; top: 14px; font-size: 30px; font-weight: 900; padding: 6px 14px; border-radius: 12px;
  opacity: 0; pointer-events: none; z-index: 5; color: #fff; }
.hint.left { left: 14px; background: #d9342b; transform: rotate(-12deg); }
.hint.right { right: 14px; background: #2f9e63; transform: rotate(12deg); }
.fly-left { transform: translateX(-130%) rotate(-14deg) !important; opacity: 0; transition: transform .3s, opacity .3s; }
.fly-right { transform: translateX(130%) rotate(14deg) !important; opacity: 0; transition: transform .3s, opacity .3s; }
.pop-in { animation: popIn .32s ease; }
@keyframes popIn { from { transform: scale(.93); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.swipetip { text-align: center; font-size: 12.5px; color: #e7c0c4; margin-top: 10px; }
.swipetip b { color: #ffd24a; }
#end { justify-content: center; align-items: center; text-align: center; gap: 7px; }
#end .emoji { font-size: 50px; }
#end h2 { font-size: 23px; font-weight: 800; line-height: 1.15; }
#end .reason { color: #f0c9cc; font-size: 14.5px; line-height: 1.5; max-width: 330px; }
#end .score { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 14px 22px; margin: 10px 0 2px; }
#end .score .big { font-size: 40px; font-weight: 800; color: #ffd24a; line-height: 1; }
#end .score .lbl { font-size: 12px; color: #d9b9bc; margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }
#end .rank { font-size: 14.5px; color: #fff; font-weight: 700; max-width: 330px; line-height: 1.4; }
#end .rec { font-size: 12px; color: #a37a7e; }
#aliasRow { display: flex; gap: 8px; margin-top: 10px; width: 100%; max-width: 320px; }
#aliasInput { flex: 1; padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.25); color: #fff; font-size: 14px; }
.leaderboard { width: 100%; max-width: 320px; margin-top: 8px; }
.leaderboard h3 { font-size: 13px; color: #ffd24a; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.lbrow { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; font-size: 13px; background: rgba(255,255,255,.05); margin-bottom: 4px; }
.lbrow .pos { width: 20px; font-weight: 800; color: #ffd24a; }
.lbrow .nm { flex: 1; text-align: left; color: #f0dcdd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbrow .dd { font-weight: 800; color: #fff; }
.lbrow.me { background: rgba(255,210,74,.16); }
#end .actions { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; justify-content: center; }
#end .btn { font-size: 15px; padding: 13px 22px; }
.toast { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); background: #222; color: #fff;
  padding: 10px 16px; border-radius: 999px; font-size: 13px; opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 40; max-width: 90%; text-align: center; }
.toast.show { opacity: .96; }
