/* ============================================================
   Real Layers app screens — faithful recreation from screenshots
   Light gray canvas · royal-blue actions · gold "champion" · teal confirm
   ============================================================ */
.rapp {
  --rb: #2C3CC4;          /* royal blue — primary actions, links, active nav */
  --rb-soft: #ECEEFB;
  --gold1: #ECB03E;       /* champion card gradient top */
  --gold2: #DE9E2A;       /* champion card gradient bottom */
  --gold-tx: #C68A1C;     /* gold points text */
  --teal-btn: #57B2A7;    /* confirm buttons */
  --rink: #1B2330;        /* near-black ink */
  --rg2: #5C6675;         /* secondary text */
  --rg3: #98A0AE;         /* muted text */
  --rline: #E7E9F1;       /* hairline */
  --rbg: #E9EBF1;         /* app canvas */
  --rtile: #EEF0F6;       /* number tiles / steppers / chips */
  --rgreen: #4E8C6B;      /* trophy avatar circle */
  font-family: var(--l-font-sans);
  display: flex; flex-direction: column; height: 100%;
  background: var(--rbg); color: var(--rink); text-align: left;
}
.rapp * { box-sizing: border-box; }
.rapp .fl { line-height: 1; display: inline-flex; }

/* status bar */
.rapp-status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 20px 2px; font-size: 12px; font-weight: 800; color: var(--rink);
}
.rapp-status .si { display: flex; align-items: center; gap: 5px; color: var(--rink); }
.rapp-status .si svg { width: 14px; height: 14px; }
.rapp-status .batt { width: 22px; height: 11px; border: 1.5px solid var(--rink); border-radius: 3px; position: relative; display: inline-block; }
.rapp-status .batt::after { content: ""; position: absolute; right: -3px; top: 3px; width: 2px; height: 4px; background: var(--rink); border-radius: 0 1px 1px 0; }
.rapp-status .batt i { position: absolute; left: 1.5px; top: 1.5px; bottom: 1.5px; width: 35%; background: var(--gold2); border-radius: 1px; }

/* header */
.rapp-header { padding: 8px 16px 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; }
.rapp-tr { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: var(--rgreen); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.rapp-tr img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rapp-htxt b { display: block; font-size: 14px; font-weight: 800; color: var(--rink); line-height: 1.12; letter-spacing: -0.01em; }
.rapp-htxt span { font-size: 12px; color: var(--rg3); font-weight: 600; }
.rapp-htxt a { color: var(--rb); font-weight: 800; }
.rapp-me { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--rb); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #2a3457; flex-shrink: 0; }

/* body + nav */
.rapp-body { flex: 1; overflow: hidden; padding: 4px 16px 12px; }
.rapp-nav { height: 60px; background: #fff; border-top: 1px solid var(--rline); display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; padding: 0 6px; }
.rapp-nav .it { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; font-weight: 700; color: var(--rg3); height: 46px; border-radius: 12px; }
.rapp-nav .it svg { width: 21px; height: 21px; }
.rapp-nav .it.on { color: var(--rb); }
.rapp-nav .it.on.bg { background: var(--rtile); }

/* generic cards */
.r-card { background: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.r-ol { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--rg3); }

/* ---- Início: countdown ---- */
.r-count-h { font-size: 18px; font-weight: 800; color: var(--rink); margin: 0 0 2px; }
.r-count-sub { font-size: 12px; color: var(--rg3); margin: 0 0 13px; font-weight: 600; }
.r-count-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.r-count-cell { background: var(--rtile); border-radius: 12px; padding: 11px 4px; text-align: center; }
.r-count-cell b { font-size: 24px; font-weight: 800; color: var(--rink); letter-spacing: -0.02em; }
.r-count-cell span { display: block; font-size: 9px; font-weight: 800; letter-spacing: .06em; color: var(--rg3); text-transform: uppercase; margin-top: 3px; }

/* ---- Início: champion card ---- */
.r-champ { background: linear-gradient(165deg, var(--gold1), var(--gold2)); border-radius: 18px; padding: 17px; margin-top: 14px; }
.r-champ h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; font-size: 17px; font-weight: 800; color: #2c2208; }
.r-champ p { margin: 0 0 9px; font-size: 13px; line-height: 1.4; color: #463713; font-weight: 600; }
.r-champ p b { font-weight: 800; color: #2c2208; }
.r-champ .closes { display: block; font-size: 12px; font-weight: 700; color: #5a4718; margin-bottom: 13px; }
.r-champ-btn { height: 46px; border-radius: 13px; background: #241B06; color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ---- Início: próximos jogos ---- */
.r-games-ol { margin: 17px 0 0; }
.r-gdate { font-size: 12px; color: var(--rg3); font-weight: 600; margin: 12px 0 5px; }
.r-game { background: #fff; border: 1px solid var(--rline); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 8px; }
.r-game .fl { font-size: 22px; }
.r-game b { font-size: 15px; font-weight: 800; color: var(--rink); }
.r-game .x { color: var(--rg3); font-weight: 700; margin: 0 3px; }
.r-game .go { margin-left: auto; color: var(--rb); font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 3px; }
.r-game .go svg { width: 15px; height: 15px; }

/* ---- Palpites ---- */
.r-pg-head { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 8px; }
.r-pg-head h3 { font-size: 27px; font-weight: 800; color: var(--rink); margin: 0; letter-spacing: -0.02em; }
.r-pg-head .frac { font-size: 18px; font-weight: 800; color: var(--rb); }
.r-pg-head .frac s { color: var(--rg3); text-decoration: none; }
.r-prog { height: 7px; background: #DBDEE8; border-radius: 4px; overflow: hidden; }
.r-prog i { display: block; height: 100%; background: var(--rb); border-radius: 4px; }
.r-aprov { font-size: 12px; color: var(--rg3); margin: 7px 0 14px; font-weight: 600; }
.r-tabs { display: flex; gap: 7px; margin-bottom: 12px; }
.r-tab { font-size: 13px; font-weight: 700; padding: 8px 13px; border-radius: 10px; background: #E1E4ED; color: var(--rg2); white-space: nowrap; }
.r-tab.on { background: #1B2330; color: #fff; }
.r-filters { display: flex; gap: 8px; margin-bottom: 16px; }
.r-fchip { font-size: 13px; font-weight: 700; color: var(--rg2); background: #E1E4ED; border-radius: 10px; padding: 8px 13px; display: flex; align-items: center; gap: 6px; }
.r-fchip svg { width: 14px; height: 14px; }
.r-sp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.r-sp-head .frac { font-size: 14px; font-weight: 800; color: var(--rink); }
.r-sp-head .frac s { color: var(--rg3); text-decoration: none; }
.r-sp-sub { font-size: 11px; color: var(--rg3); margin: 0 0 11px; display: flex; align-items: center; gap: 5px; font-weight: 600; }
.r-sp-sub svg { width: 13px; height: 13px; }
.r-sp { background: #fff; border: 1px solid var(--rline); border-radius: 14px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.r-sp .lbl b { font-size: 15px; font-weight: 800; color: var(--rink); display: block; }
.r-sp .lbl small { font-size: 13px; color: var(--rg3); font-style: italic; }
.r-sp .lbl .chosen { font-style: normal; color: var(--rg2); display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.r-sp .pts { font-size: 17px; font-weight: 800; color: var(--gold-tx); }
.r-mdate { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--rg3); margin: 16px 0 8px; }
.r-match { background: #fff; border: 1px solid var(--rline); border-radius: 14px; padding: 13px 14px; }
.r-match-top { display: flex; justify-content: space-between; align-items: flex-start; }
.r-match-top .dt b { font-size: 14px; font-weight: 800; color: var(--rink); }
.r-match-top .dt span { display: block; font-size: 12px; color: var(--rg3); margin-top: 2px; }
.r-match-top .st { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--rg3); }
.r-match-row { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; border-top: 1px dashed var(--rline); padding-top: 12px; }
.r-match-row .tm { display: flex; align-items: center; gap: 9px; }
.r-match-row .fl { font-size: 24px; }
.r-match-row .tm b { font-size: 15px; font-weight: 800; color: var(--rink); display: block; }
.r-match-row .tm span { font-size: 12px; color: var(--rg3); }
.r-step { display: flex; align-items: center; gap: 4px; background: var(--rtile); border-radius: 12px; padding: 4px; }
.r-step b { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: #fff; font-size: 18px; font-weight: 800; color: var(--rink); }
.r-step .ph { color: var(--rg3); font-weight: 800; }
.r-step .pm { width: 30px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: var(--rg2); }

/* ---- Ranking ---- */
.r-rk-h3 { font-size: 27px; font-weight: 800; color: var(--rink); margin: 6px 0 2px; letter-spacing: -0.02em; }
.r-rk-sub { font-size: 13px; color: var(--rg3); margin: 0 0 6px; font-weight: 600; }
.r-podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end; margin: 16px 0 14px; }
.r-pod-av { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; color: #fff; }
.r-pod-bar { border-radius: 14px 14px 0 0; padding: 12px 6px 14px; text-align: center; color: #fff; }
.r-pod-bar .rk { font-size: 18px; font-weight: 800; }
.r-pod-bar .nm { font-size: 12px; font-weight: 800; margin-top: 2px; }
.r-pod-bar .pt { font-size: 11px; font-weight: 700; opacity: .92; }
.r-pod.first .r-pod-bar { background: linear-gradient(160deg,#EFC04C,#DD9E27); height: 118px; }
.r-pod.first .r-pod-av { background: #DD9E27; }
.r-pod.second .r-pod-bar { background: linear-gradient(160deg,#CDD3DC,#A7B0BC); height: 96px; }
.r-pod.second .r-pod-av { background: #A7B0BC; }
.r-pod.third .r-pod-bar { background: linear-gradient(160deg,#D9A876,#BC7F45); height: 80px; }
.r-pod.third .r-pod-av { background: #BC7F45; }
.r-lhead { display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; color: var(--rg3); text-transform: uppercase; letter-spacing: .06em; padding: 4px 6px 8px; }
.r-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--rline); border-radius: 14px; padding: 11px 13px; margin-bottom: 8px; }
.r-row .av { width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px var(--rline); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--rg2); flex-shrink: 0; }
.r-row .nm { flex: 1; min-width: 0; }
.r-row .nm b { font-size: 14px; font-weight: 800; color: var(--rink); display: block; line-height: 1.2; }
.r-row .nm span { font-size: 12px; color: var(--rg3); }
.r-row .pts { text-align: right; }
.r-row .pts b { font-size: 18px; font-weight: 800; color: var(--rink); }
.r-row .pts span { display: block; font-size: 10px; color: var(--rg3); }
.r-row.me { background: var(--rb-soft); border-color: #C9CEF4; }

/* ---- Regras (sheet) ---- */
.r-sheet { background: #fff; height: 100%; display: flex; flex-direction: column; padding: 12px 18px 14px; }
.r-grab { width: 42px; height: 5px; border-radius: 3px; background: #D7DCE5; margin: 4px auto 12px; }
.r-sheet-h { text-align: center; }
.r-sheet-h b { font-size: 19px; font-weight: 800; color: var(--rink); }
.r-sheet-h span { display: block; font-size: 13px; color: var(--rg3); margin-top: 3px; font-weight: 600; }
.r-mini { border: 1px solid var(--rline); border-radius: 14px; padding: 11px; display: flex; gap: 11px; align-items: center; margin: 13px 0 14px; }
.r-mini .rapp-tr { width: 38px; height: 38px; font-size: 18px; }
.r-mini b { font-size: 14px; font-weight: 800; color: var(--rink); display: block; }
.r-mini span { font-size: 12px; color: var(--rg3); }
.r-steptitle { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 800; color: var(--rink); margin: 0 0 11px; }
.r-steptitle i { width: 24px; height: 24px; border-radius: 7px; background: var(--rb); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; font-style: normal; }
.r-score { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 9px; }
.r-score .n { font-size: 30px; font-weight: 800; color: var(--rink); width: 40px; line-height: 1; flex-shrink: 0; text-align: left; }
.r-score.zero .n { color: var(--rg3); }
.r-score .tx b { font-size: 15px; font-weight: 800; color: var(--rink); display: block; }
.r-score .tx span { font-size: 12px; color: var(--rg3); }
.r-teal-btn { margin-top: 12px; height: 48px; flex-shrink: 0; border-radius: 13px; background: var(--teal-btn); color: #fff; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; }

/* emoji flag sizes inside app */
.rapp .fl img.emoji { height: 1em; width: auto; border-radius: 2px; }
