:root{
  --bg:#f3f4f6;
  --panel:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --card:#f9fafb;
  --shadow:0 12px 30px rgba(0,0,0,.08);
  --shadow-sm:0 2px 10px rgba(0,0,0,.06);
  --radius:18px;
  --radius-sm:14px;
}

*{ box-sizing:border-box; margin:0; padding:0; }

body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:26px 16px;
}

.wrapper{
  width:100%;
  max-width:760px;
}

.panel{
  background:var(--panel);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:26px 22px 22px;
  border:1px solid rgba(229,231,235,.65);
}

.brand{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}

.brand img{
  width:150px;
  height:auto;
  max-height:54px;
  object-fit:contain;
}

.brand h1{
  font-size:20px;
  font-weight:700;
  letter-spacing:-0.02em;
  text-align:center;
}

.brand p{
  font-size:12.8px;
  line-height:1.45;
  color:var(--muted);
  text-align:center;
  max-width:520px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:14px;
  margin-top:16px;
}

.country{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:10px;
  text-decoration:none;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:14px 12px;
  box-shadow:var(--shadow-sm);
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  min-height:92px;
  position:relative;
}

.country:hover{
  transform: translateY(-2px);
  box-shadow:0 10px 24px rgba(0,0,0,.10);
  border-color:rgba(209,213,219,.95);
  background:#ffffff;
}

.flag{
  width:42px;
  height:28px;
  border-radius:7px;
  overflow:hidden;
  border:1px solid rgba(229,231,235,.95);
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
}

.flag img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.country span{
  font-size:13px;
  color:#374151;
  font-weight:600;
  text-align:center;
  line-height:1.1;
}

.country.is-suggested::after{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:calc(var(--radius-sm) + 1px);
  border:2px solid rgba(59,130,246,.35);
  pointer-events:none;
}

.footer{
  text-align:center;
  margin-top:18px;
  padding:0 10px;
  color:var(--muted);
  font-size:12px;
}

.footer-links{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  font-weight:600;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.footer-links a{
  color:var(--muted);
  text-decoration:none;
}

.footer-links a:hover{
  text-decoration:underline;
}

.footer .separator{
  opacity:.6;
}

.footer .disclaimer{
  margin:12px auto 0;
  max-width:920px;
  line-height:1.55;
  font-weight:400;
}

.footer .copyright{
  margin-top:10px;
  font-weight:500;
}

/* Legal pages */
.legal .legal-content{
  margin-top:6px;
  color:var(--text);
}

.legal .legal-content p{
  margin:0 0 12px;
  line-height:1.6;
  color:#374151;
  font-size:13.2px;
}

.legal .legal-content ul{
  margin:0 0 12px 18px;
  color:#374151;
  font-size:13.2px;
  line-height:1.6;
}

.legal .legal-back{
  margin-top:10px;
  text-align:center;
}

.legal .legal-back a{
  color:var(--muted);
  text-decoration:none;
  font-weight:600;
}

.legal .legal-back a:hover{
  text-decoration:underline;
}


/* Responsivo */
@media (max-width: 720px){
  .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .panel{ padding:22px 18px 18px; }
}

@media (max-width: 420px){
  /* Mantém 2 colunas na maioria dos celulares */
  .brand img{ width:140px; }
}

@media (max-width: 340px){
  /* Só cai para 1 coluna em telas MUITO pequenas */
  .grid{ grid-template-columns: 1fr; }
}