/* Labirinto Genético: tema "livro de histórias" (papel, tinta e aguarela, a condizer com os retratos). */
:root {
  --bg: #ebe1cc; --card: #fbf7ee; --ink: #33271f; --muted: #7a6a5c; --line: #dccfb6;
  --wall: #3f3127; --floor: #f6efe0; --accent: #c98a2c; --accent-hi: #d99a3a; --accent-ink: #2b1d10;
  --err: #a83a2a; --good: #4f8a4a; --purple: #7b5fc4; --hl: #f5e2ae; --hl-ink: #5a4000;
  --shadow: 0 1px 0 rgba(70, 45, 20, .05), 0 10px 24px -16px rgba(70, 45, 20, .45);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #19140f; --card: #241d17; --ink: #efe4d2; --muted: #a8968a; --line: #3a2f27;
    --wall: #0c0907; --floor: #3b3128; --accent: #dca04a; --accent-hi: #e8b05c; --accent-ink: #20150a;
    --err: #e0705c; --good: #7cbf72; --purple: #a68cf0; --hl: #4a3a18; --hl-ink: #f4dca0;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 26px -16px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); line-height: 1.4;
  background-color: var(--bg);
  /* papel: manchas de aguarela muito suaves */
  background-image:
    radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    radial-gradient(900px 500px at 110% 20%, color-mix(in srgb, var(--good) 9%, transparent), transparent 70%),
    radial-gradient(800px 600px at 50% 120%, color-mix(in srgb, var(--purple) 7%, transparent), transparent 70%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: inherit; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2 { font-family: var(--serif); letter-spacing: .005em; }
h1 { font-size: 22px; margin: 0; line-height: 1.1; }
h2 { font-size: 19px; margin: 0 0 8px; font-weight: 700; }
h2 small { color: var(--muted); font-weight: normal; font-family: system-ui, sans-serif; font-size: 13px; }
h3 { font-size: 11px; margin: 16px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.hidden { display: none !important; }

/* ---------- Barra de topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 22px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: 50% 8%;
  background: var(--floor); border: 2px solid var(--accent); box-shadow: var(--shadow); }
.brand p { margin: 2px 0 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }

/* ---------- Entrada ---------- */
#login { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; max-width: 980px; margin: 48px auto; padding: 0 20px; }
.loginArt { position: relative; height: 380px; }
.loginArt img { position: absolute; bottom: 0; width: 44%; filter: drop-shadow(0 10px 12px rgba(60, 40, 20, .25)); transition: transform .3s; }
.loginArt img:nth-child(1) { left: 0; transform: rotate(-6deg); width: 36%; bottom: 10px; }
.loginArt img:nth-child(2) { left: 16%; transform: rotate(-2deg); width: 40%; bottom: 30px; }
.loginArt img:nth-child(3) { left: 30%; width: 48%; z-index: 2; }
.loginArt img:nth-child(4) { left: 50%; transform: rotate(3deg); width: 40%; bottom: 26px; }
.loginArt img:nth-child(5) { left: 66%; transform: rotate(7deg); width: 36%; bottom: 8px; }
.loginArt img:hover { transform: translateY(-8px) rotate(0); z-index: 3; }
.loginCard { padding: 24px; }
.loginCard h2 { font-size: 28px; margin-bottom: 6px; }
.loginCard p { margin: 0 0 10px; }
.loginCard form { margin-top: 14px; }
@media (max-width: 760px) {
  #login { grid-template-columns: 1fr; margin: 20px auto; gap: 8px; }
  .loginArt { height: 230px; }
}

/* ---------- Disposição do jogo ---------- */
/* Separadores: cada um mostra duas colunas (os cartões são arrumados pelo app.js) */
.tabbar { display: flex; gap: 6px; justify-content: center; padding: 10px 16px 0; max-width: 1400px; margin: 0 auto; flex-wrap: wrap; }
.tabbar button { background: var(--card); color: var(--muted); border: 1px solid var(--line); padding: 9px 18px; border-radius: 999px; font-size: 15px; box-shadow: var(--shadow); }
.tabbar button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tabbar button .badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--err); color: #fff; font-size: 11px; line-height: 18px; }
main {
  display: grid; gap: 18px; padding: 14px 22px 40px; max-width: 1400px; margin: 0 auto; align-items: start;
  grid-template-columns: 360px minmax(0, 1fr);
}
main.wideL { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } /* Liga: duas colunas iguais */
.colL, .colR { display: grid; gap: 18px; min-width: 0; align-content: start; }
@media (max-width: 880px) {
  main, main.wideL { grid-template-columns: 1fr; padding: 10px 12px 32px; gap: 14px; }
  .topbar { padding: 8px 12px; position: static; }
  .tabbar { position: sticky; top: 0; z-index: 6; background: var(--bg); padding: 8px 10px; gap: 4px; }
  .tabbar button { padding: 7px 10px; font-size: 13px; flex: 1; }
  .stageHead h2 { font-size: 18px; }
  /* No telemóvel o botão de treinar fica sempre à mão, no fundo do ecrã */
  .stage .controls { position: sticky; bottom: 0; z-index: 5; background: var(--card); margin: 8px -16px -16px; padding: 10px 16px; border-top: 1px solid var(--line); }
}

/* ---------- Cartões ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; box-shadow: var(--shadow); }
.cardHead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cardHead h2 { margin-bottom: 6px; }

/* ---------- Formulários e botões ---------- */
input, button, select { font: inherit; }
input:not([type]), input[type=text], input[type=password], select {
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--floor); color: var(--ink); min-width: 0;
}
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
select { flex: 1; }
button {
  padding: 9px 16px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18), 0 1px 2px rgba(60, 40, 20, .2); transition: background .15s, transform .05s;
}
button:hover:not(:disabled) { background: var(--accent-hi); }
button:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .18); }
button.secondary { background: transparent; border: 1px solid var(--line); color: var(--ink); box-shadow: none; }
button.secondary:hover:not(:disabled) { background: var(--floor); border-color: var(--accent); }
button.small { padding: 5px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
button.wide { width: 100%; margin-top: 10px; }
form, .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
form.stack { flex-direction: column; align-items: stretch; }
.err { color: var(--err); min-height: 1em; margin: 6px 0 0; font-size: 14px; }
.err:empty { min-height: 0; margin: 0; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 12px; }
.list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
ol.list { list-style: decimal inside; }
.list li { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: color-mix(in srgb, var(--floor) 50%, transparent); }
.list li.click, .mice li { cursor: pointer; }
.list li.click:hover { border-color: var(--accent); }
.list li.sel { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.check { display: flex; align-items: center; gap: 4px; cursor: pointer; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ---------- Janela de confirmação ---------- */
.modal { position: fixed; inset: 0; background: rgba(20, 12, 5, .5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.modalBox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 400px; width: 100%; display: grid; gap: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.modalBox p { margin: 0; }
.modalBox input { width: 100%; }

/* ---------- Colónia ---------- */
.mice { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.mice li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--floor) 60%, transparent); transition: border-color .15s, background .15s; }
.mice li:hover { border-color: var(--accent); }
.mice li.away { opacity: .6; background: repeating-linear-gradient(135deg, transparent 0 8px, var(--line) 8px 9px); }
.mice li.sel { border-color: var(--accent); background: color-mix(in srgb, var(--hl) 45%, var(--card)); box-shadow: inset 3px 0 0 var(--accent); }
.mice li input { width: 18px; height: 18px; accent-color: var(--accent); grid-row: span 2; }
.mice .top { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 14px; min-width: 0; }
.mice .top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; max-width: 70%; }
.mice .top .status { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.mini span { height: 5px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.mini span i { position: absolute; inset: 0 auto 0 0; background: var(--good); }
.mini span.bad i { background: var(--err); }
.status { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- Palco (labirinto) ---------- */
.stage { padding: 18px; }
.stage canvas { width: 100%; display: block; border-radius: 10px; box-shadow: 0 0 0 4px var(--wall), 0 14px 30px -18px rgba(40, 25, 10, .7); margin: 4px 0; }
.stageHead { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.stageHead h2 { margin: 0; font-size: 22px; }
.clock { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; background: var(--floor); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.speed { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.speed input { width: 100px; accent-color: var(--accent); }
.controls { margin-top: 14px; gap: 12px; }
#trainBtn { font-size: 16px; padding: 11px 20px; }
.cheese { font-weight: 800; font-size: 17px; background: var(--hl); color: var(--hl-ink); border-radius: 999px; padding: 3px 14px; font-variant-numeric: tabular-nums; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.cheese.pop { animation: pop .6s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.record { background: var(--hl); color: var(--hl-ink); border-radius: 12px; padding: 10px 12px; font-weight: 700; margin: 0 0 8px; }
#results:not(:empty) { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
#results h3 { margin-top: 4px; }

/* ---------- Recordes e liga ---------- */
.records { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; font-size: 14px; }
.records li { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 10px; }
.records li:nth-child(-n+3) { background: color-mix(in srgb, var(--floor) 70%, transparent); }
.records li.mine { background: var(--hl); color: var(--hl-ink); }
.records li.mine .muted { color: inherit; opacity: .75; }
.records .rk { width: 26px; }
.records .t { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.records li.sep { justify-content: center; padding: 0; background: none; }
.records .t small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; text-align: right; }
.records li.mine .t small { color: inherit; opacity: .75; }
.tabs { display: flex; gap: 2px; background: var(--line); border-radius: 10px; padding: 2px; }
.tabs button { background: transparent; color: var(--muted); padding: 3px 9px; font-size: 12px; border-radius: 8px; box-shadow: none; font-weight: 600; }
.tabs button:hover:not(:disabled) { background: transparent; color: var(--ink); }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.league { font-size: 13px; margin-top: 4px; }
.league th, .league td { padding: 5px 4px; text-align: center; }
.league th:nth-child(2), .league td:nth-child(2) { text-align: left; }
.league td.pts { font-weight: 800; }
.league tr.mine td { background: var(--hl); color: var(--hl-ink); }
.trophies { margin-left: 2px; }
.divbadge { background: var(--hl); color: var(--hl-ink); border-radius: 999px; padding: 3px 11px; font-weight: 700; font-size: 13px; }
.league tr.zup td:first-child { box-shadow: inset 3px 0 0 var(--good); }
.league tr.zdown td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.list li.minematch { border-color: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 700; padding: 4px 6px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .05em; }
td { padding: 6px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td.ok { color: var(--good); font-weight: 600; }

/* ---------- Ficha e genes ---------- */
.genes { display: grid; gap: 9px; margin: 12px 0; }
.gene label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.gene .bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 3px; }
.gene .bar i { display: block; height: 100%; background: var(--good); border-radius: 4px; }
.gene.bad .bar i { background: var(--err); }
.gene p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.budget { margin: 12px 0 4px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; background: color-mix(in srgb, var(--floor) 50%, transparent); }
.budget label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.budget .bar { position: relative; height: 10px; background: var(--line); border-radius: 5px; margin-top: 4px; }
.budget .bar i { display: block; height: 100%; background: var(--purple); border-radius: 5px; }
.budget .bar s { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.budget p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.nameRow { display: flex; align-items: center; gap: 8px; }
.nameRow h2 { margin: 0; font-size: 24px; }
.cmp { width: 100%; font-size: 13px; margin: 10px 0 0; }
.cmp td { padding: 4px; }
.cmp td:nth-child(2), .cmp td:nth-child(3) { text-align: center; font-variant-numeric: tabular-nums; width: 70px; }
.breedPick select { min-width: 0; }
.baby { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-top: 8px; font-size: 13px; background: color-mix(in srgb, var(--floor) 60%, transparent); }
.up { color: var(--good); font-weight: 700; }
.down { color: var(--err); font-weight: 700; }
.tag { display: inline-block; background: var(--hl); color: var(--hl-ink); border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 700; margin-left: 4px; }

/* ---------- Personagens ---------- */
.avatar { display: inline-block; width: 30px; height: 30px; border-radius: 50%; border: 2px solid; background: var(--floor) no-repeat 50% 10% / 190%;
  margin-right: 7px; vertical-align: middle; flex: none; }
.hero { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; margin: -4px 0 6px; }
.hero .portrait { width: 132px; height: 150px; object-fit: contain; object-position: 50% 100%; border-radius: 12px;
  background: radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--c) 32%, var(--floor)), var(--floor) 72%);
  border: 1px solid var(--line); }
.hero p { margin: 4px 0 0; }

/* Labirinto de fundo no ecrã de entrada */
#loginMaze { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#login > :not(#loginMaze) { position: relative; z-index: 1; }
.loginCard { background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(2px); }

/* ---------- Visita guiada ---------- */
.tour { position: fixed; inset: 0; z-index: 20; }
.tourSpot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(20, 12, 5, .62); outline: 3px solid var(--accent);
  transition: all .3s ease; pointer-events: none; }
.tourBox { position: fixed; display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: start; width: 380px; max-width: calc(100vw - 24px);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  transition: left .3s ease, top .3s ease; }
.tourBox.center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 440px; grid-template-columns: 110px 1fr; }
.tourGuide { width: 100%; height: auto; filter: drop-shadow(0 6px 8px rgba(60, 40, 20, .25)); }
.tourBox h3 { font-family: var(--serif); font-size: 20px; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 2px 0 6px; }
.tourBox p { margin: 0; font-size: 14px; }
.tourStep { font-size: 11px !important; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.tourBtns { justify-content: flex-end; margin-top: 12px; }
@media (max-width: 700px) {
  .tourBox, .tourBox.center { left: 12px !important; right: 12px; top: auto !important; bottom: 12px; transform: none; width: auto !important; grid-template-columns: 64px 1fr; }
}

/* ---------- Como se joga ---------- */
.helpBox { max-width: 860px; max-height: calc(100vh - 32px); overflow: auto; }
.helpGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 20px; }
.helpGrid h3 { margin-top: 10px; font-size: 12px; color: var(--ink); }
.helpGrid p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Enquanto estiveste fora ---------- */
.away { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--hl) 40%, var(--card)), var(--card)); }
.awayHead { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.awayHead img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 8%; background: var(--floor); border: 2px solid var(--accent); }
.awayHead h2 { margin: 0; }
.awayHead p { margin: 2px 0 0; }
.awayList { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; font-size: 14px; }
.awayList li { padding: 7px 10px; border-radius: 10px; background: color-mix(in srgb, var(--floor) 70%, transparent); display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; }
.awayList a { margin-left: auto; font-weight: 600; }

/* ---------- Árvore genealógica ---------- */
.treeBox { max-width: 1100px; max-height: calc(100vh - 32px); overflow: auto; }
.treeHead, .tree { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); column-gap: 18px; }
.treeHead span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 4px 6px; }
.tree { grid-template-rows: repeat(8, minmax(64px, auto)); row-gap: 6px; }
.tree.founder { grid-template-columns: minmax(200px, 320px); grid-template-rows: auto; }
.tnode { align-self: center; display: grid; gap: 3px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px;
  background: color-mix(in srgb, var(--floor) 70%, transparent); box-shadow: inset 3px 0 0 var(--c, var(--line)); position: relative; font-size: 13px; }
.tnode.me { background: color-mix(in srgb, var(--hl) 45%, var(--card)); border-color: var(--accent); }
.tnode.retired { opacity: .7; }
.tnode.unknown { box-shadow: none; border-style: dashed; }
.tnode.empty { border-style: dashed; background: transparent; box-shadow: none; min-height: 44px; display: flex; align-items: center; justify-content: center; opacity: .6; }
.tname { display: flex; align-items: center; min-width: 0; }
.tname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* linha para o filho (à esquerda) */
.tree .tnode:not([style*="grid-column:1;"])::before { content: ""; position: absolute; left: -18px; top: 50%; width: 18px; border-top: 2px solid var(--line); }
@media (max-width: 760px) { .treeHead, .tree { grid-template-columns: repeat(4, 160px); } }
.mice .top b .family { font-weight: 600; color: var(--muted); font-size: 12px; margin-left: 4px; }

/* ---------- Conta e recuperação ---------- */
.loginLinks { margin: 10px 0 0; text-align: center; color: var(--muted); }
.codeBox { max-width: 440px; }
.codeBox h2 { margin: 0; }
.recCode { font: 700 22px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .08em; text-align: center; padding: 14px;
  border: 2px dashed var(--accent); border-radius: 12px; background: var(--hl); color: var(--hl-ink); user-select: all; }
.accountBox { max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; }
.accountBox h3 { margin-top: 18px; }
.accountBox form.row input { flex: 1; }
.err.ok { color: var(--good); }
button.danger { background: var(--err); color: #fff; }
button.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--err) 85%, #000); }

/* ---------- Seletor de língua ---------- */
.langSwitch { display: inline-flex; gap: 4px; margin-left: 4px; vertical-align: middle; }
.langSwitch a { text-decoration: none; font-size: 17px; line-height: 1; opacity: .45; filter: grayscale(.6); transition: opacity .15s, filter .15s; }
.langSwitch a:hover, .langSwitch a.on { opacity: 1; filter: none; }
.loginCard { position: relative; }
.loginLang { position: absolute; top: 14px; right: 16px; }
.langSwitch { gap: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.langSwitch a { font-size: 11px; font-weight: 700; letter-spacing: .05em; padding: 2px 7px; opacity: .6; filter: none; color: var(--muted); }
.langSwitch a.on { background: var(--accent); color: var(--accent-ink); opacity: 1; }
