/* Motor de idiomas: profile.css. Páginas (.page), mascote, perfil (cabeçalho, estatísticas, calendário de ofensiva,
   conquistas com progresso), campos de configuração (.section .field), áudio offline e rodapé. Só tokens. */
/* ---------- página ---------- */
.page { padding: 16px 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 32px); }
.page > h2 { margin: 10px 0 16px; font-size: 30px; line-height: 1.1; letter-spacing: -.03em; }

/* ---------- mascote ---------- */
.msc { display: block; width: 100%; height: 100%; overflow: visible; }
.msc .m-shadow { fill: var(--ink); opacity: .08; }
.msc .m-body { fill: var(--primary); }
.msc .m-hi { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; opacity: .28; }
.msc .m-cheek { fill: var(--accent); opacity: .6; }
.msc .m-eye { fill: #fff; }
.msc .m-pup { fill: var(--ink-fixed); }
.msc .m-glint { fill: #fff; }
.msc .m-lid, .msc .m-mouth { fill: none; stroke: var(--ink-fixed); stroke-width: 4; stroke-linecap: round; }
.msc .m-open { fill: var(--ink-fixed); }
.msc .m-tongue { fill: var(--heart); }
.msc .m-spark { fill: var(--accent); }
.msc .m-z { fill: none; stroke: var(--muted); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
/* contêineres do mascote (o SVG pode vir de Illu.mascot, com width/height próprios) */
.pf-mascot > svg, .rv-mascot > svg, .se-mascot > svg { display: block; width: 100%; height: 100%; }

/* ---------- cabeçalho ---------- */
.profile .pf-head {
  position: relative; display: flex; align-items: center; gap: 16px; margin: 4px 0 18px; padding: 18px 16px; overflow: hidden;
  border-radius: 24px; background: linear-gradient(150deg, var(--tint) 0%, var(--tint-2) 100%); border: 1px solid var(--tint-edge);
}
.pf-mascot { flex: none; width: 96px; height: 96px; animation: medal .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.pf-id { min-width: 0; }
.pf-eyebrow { color: var(--primary-ink); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pf-id h2 { margin: 2px 0 2px; font-size: 30px; line-height: 1.05; letter-spacing: -.03em; color: var(--ink); overflow-wrap: anywhere; }
.pf-id p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.4; }
.pf-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pf-pill {
  display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px 0 7px; border-radius: 999px;
  background: var(--card); color: var(--ink); font-size: 13px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--line);
}
.pf-pill .ico { width: 17px; height: 17px; color: var(--accent-edge); fill: var(--accent); stroke-width: 1.6; }
.pf-pill.flame .ico { color: var(--flame); fill: var(--flame); }
.pf-pill.off .ico { color: var(--muted); fill: none; }

/* ---------- blocos ---------- */
.pf-block { margin-bottom: 18px; }
.pf-h, .section h3 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2);
}
.pf-h-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pf-h-row small { color: var(--muted); font-size: 13px; font-weight: 700; }
.pf-h-out { margin-top: 24px; }
.pf-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pf-stat {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 12px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1);
}
.pf-stat-ic { grid-row: 1 / span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--primary-ink); }
.pf-stat-ic .ico { width: 22px; height: 22px; }
.pf-stat.flame .pf-stat-ic { background: var(--flame-soft); }
.pf-stat.flame .ico { color: var(--flame); fill: var(--flame); stroke-width: 1.6; }
.pf-stat.gold .pf-stat-ic { background: var(--accent-soft); color: var(--accent-ink); }
.pf-stat.gold .ico-zap { color: var(--accent-edge); fill: var(--accent); stroke-width: 1.6; }
.pf-stat.ok .pf-stat-ic { background: var(--ok-bg); color: var(--ok); }
.pf-stat b { font-family: var(--font-display); font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pf-stat small { color: var(--ink-2); font-size: 12.5px; font-weight: 600; line-height: 1.25; }
@media (min-width: 700px) { .pf-stats { grid-template-columns: repeat(4, 1fr); } }

/* ---------- calendário de ofensiva ---------- */
.pf-cal-b { padding: 14px 14px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-1); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cal-head .pf-h { margin: 0; }
.cal-m { display: flex; align-items: center; gap: 2px; }
.cal-m b { min-width: 128px; text-align: center; font-family: var(--font-display); font-size: 15.5px; }
.cal-nav, .fc-nav-b {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--ink-2);
  transition: background-color .15s;
}
.cal-nav:hover:not([disabled]), .fc-nav-b:hover:not([disabled]) { background: var(--line); }
.cal-nav[disabled], .fc-nav-b[disabled] { opacity: .35; cursor: default; }
.cal-nav.fwd .ico, .fc-nav-b.fwd .ico { transform: scaleX(-1); }
.cal-wk, .cal { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
.cal-wk span { padding: 4px 0; text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.cd { position: relative; display: grid; place-items: center; height: 40px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cd > span { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.cd.fut { color: var(--muted); opacity: .6; }
.cd.on::before { content: ""; position: absolute; top: 2px; bottom: 2px; left: 2px; right: 2px; border-radius: 99px; background: var(--flame-soft); }
.cd.on.jl::before { left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cd.on.jr::before { right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cd.on > span { color: var(--ink); font-weight: 800; }
.cd.on:not(.jr) > span { background: var(--flame); color: var(--ink-fixed); }
.cd.today > span { box-shadow: 0 0 0 2.5px var(--primary); }
.cd.frz > span { background: var(--sel-bg); color: var(--sel); box-shadow: inset 0 0 0 1.5px var(--sel-line); }
.cd.frz > span .ico { width: 16px; height: 16px; }
.cal-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 2px 2px; color: var(--ink); font-size: 14px; font-weight: 600; }
.cal-note { display: block; margin: 2px 2px 0 20px; color: var(--muted); font-size: 12.5px; }
.cal-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--flame); }

/* ---------- conquistas ---------- */
.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.badges .badge {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px 12px; border-radius: 18px; text-align: center;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.badges .badge .i {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 4px; border-radius: 50%; font-size: 26px;
  background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--accent) 35%, transparent);
}
.badges .badge .i .ico { width: 27px; height: 27px; }
.badges .badge .bt { font-family: var(--font-display); font-size: 15px; line-height: 1.2; }
.badges .badge .bd { color: var(--ink-2); font-size: 12.5px; line-height: 1.3; }
.badges .badge .bp { width: 100%; height: 8px; margin-top: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.badges .badge .bp i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.badges .badge .bn { color: var(--accent-ink); font-size: 12px; font-weight: 800; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.badges .badge.off .i { background: var(--bg); color: var(--muted); box-shadow: inset 0 0 0 2px var(--line); }
.badges .badge.off .i::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--card) var(--ic-lock) center / 13px no-repeat; box-shadow: 0 0 0 1px var(--line-strong);
}
.badges .badge.off .bt { color: var(--ink-2); }
.badges .badge.off .bp i { background: var(--primary); }
.badges .badge.off .bn { color: var(--ink-2); font-weight: 700; }
@media (min-width: 700px) { .badges { grid-template-columns: repeat(3, 1fr); } }

/* ---------- configurações (.section .field: gancho dos testes) ---------- */
.section { margin-bottom: 14px; padding: 4px 16px 6px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-1); }
.section h3 { margin: 14px 0 6px; }
.section h3 .ico { width: 17px; height: 17px; color: var(--primary-ink); }
.section .hint { margin: -2px 0 6px; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15.5px; }
.section h3 + .field, .section .hint + .field { border-top: 0; }
.field .f-l { display: flex; flex-direction: column; min-width: 0; }
.field .f-l small { margin-top: 1px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.field.col { flex-direction: column; align-items: stretch; gap: 8px; }
.field b { font-family: var(--font-display); font-size: 17px; font-variant-numeric: tabular-nums; }
.field select, .field input[type=time] {
  flex: none; max-width: 58%; min-height: 44px; padding: 0 34px 0 12px; border: 1.5px solid var(--line-strong); border-radius: 12px;
  background: var(--card) var(--ic-chev) right 10px center / 16px no-repeat; -webkit-appearance: none; appearance: none; font-size: 15px;
}
.field input[type=time] { padding: 0 12px; background-image: none; font-variant-numeric: tabular-nums; }
.field input[type=time][disabled] { opacity: .5; }
.rate-w { display: flex; align-items: center; gap: 10px; width: 52%; }
.rate-v { min-width: 46px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 14px; }
.field input[type=range] {
  flex: 1; width: 100%; height: 6px; margin: 0; border-radius: 99px; cursor: pointer;
  -webkit-appearance: none; appearance: none; background: var(--line-strong); accent-color: var(--primary);
}
.field input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); border: 3px solid var(--card); box-shadow: 0 1px 4px rgb(0 0 0 / .3); }
.field input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); border: 3px solid var(--card); }
.field input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--line-strong); }
.field input[type=checkbox] {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 52px; height: 32px; margin: 0; border-radius: 99px;
  background: var(--line-strong); cursor: pointer; transition: background-color .18s;
}
.field input[type=checkbox]::before {
  content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .18s;
}
.field input[type=checkbox]:checked { background: var(--primary); }
.field input[type=checkbox]:checked::before { transform: translateX(20px); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 11px;
  background: none; color: var(--ink-2); font-weight: 700; font-size: 14.5px; transition: background-color .15s, color .15s, box-shadow .15s;
}
.seg button .ico { width: 18px; height: 18px; }
.seg button.on { background: var(--card); color: var(--primary-ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08), inset 0 0 0 1.5px var(--primary); }
.field .btn.small { flex: none; min-height: 44px; }
.field .btn.small .ico { width: 18px; height: 18px; }

/* ---------- áudio offline ---------- */
.field.dl .f-l { flex: 1; }
.dl-bar { display: block; width: 100%; max-width: 220px; height: 6px; margin-top: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.dl-bar i { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .2s linear; }
.field.dl.ok .dl-bar i { background: var(--ok-solid); }
.field.dl:not(.ok):not(.busy) .dl-bar { opacity: .6; }
.field.dl .btn { min-width: 112px; font-variant-numeric: tabular-nums; }
.pf-confirm { display: flex; gap: 10px; }
.pf-confirm .btn { flex: 1; }

/* ---------- rodapé ---------- */
.pf-foot { margin: 26px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.pf-foot p { margin: 0; }
.pf-foot a { color: var(--primary-ink); font-weight: 700; text-underline-offset: 3px; display: inline-block; min-height: 44px; line-height: 44px; padding: 0 6px; }


/* ================= acabamento (revisão de design 30/10) ================= */
/* avatar e nome do aluno */
.pf-avatar {
  position: relative; flex: none; align-self: flex-start; display: grid; place-items: center; width: 80px; height: 80px; padding: 0; border: 0; border-radius: 50%;
  background: var(--card); box-shadow: 0 0 0 4px var(--card), 0 8px 18px -10px rgb(0 0 0 / .45); cursor: pointer;
}
.pf-avatar .avatar.av-ill { width: 80px; height: 80px; }
@media (min-width: 600px) { .pf-avatar, .pf-avatar .avatar.av-ill { width: 104px; height: 104px; } }
.pf-avatar > span:first-child:not(.avatar) { font-family: var(--font-display); font-weight: 800; font-size: 38px; color: var(--primary-ink); }
.pf-av-ed {
  position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff; box-shadow: 0 0 0 3px var(--card);
}
.pf-av-ed .ico { width: 15px; height: 15px; }
.pf-id h2.noname { color: var(--ink-2); }
.pf-setname {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: 4px 0 6px; padding: 0 12px 0 10px; border: 0; border-radius: 999px; white-space: nowrap;
  background: var(--card); color: var(--primary-ink); font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 1.5px var(--tint-edge);
}
.pf-setname .ico { width: 16px; height: 16px; }
.pf-name-in {
  display: block; width: 100%; min-height: 52px; margin: 0 0 18px; padding: 0 16px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--bg); font-size: 18px;
}
.pf-name-in:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--tint-2); }

/* conquistas: menos densas, cadeado maior, "ver todas" */
.badges { gap: 12px; }
.badges .badge { padding: 16px 12px 14px; }
.badges .badge .i { width: 64px; height: 64px; }
.badges .badge .i .ico { width: 30px; height: 30px; }
.badges .badge.off .i::after { width: 28px; height: 28px; right: -4px; bottom: -4px; background-size: 15px; }
.pf-more {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 48px; margin-top: 12px; border: 0; border-radius: 14px;
  background: var(--card); color: var(--primary-ink); font-weight: 700; font-size: 15px; box-shadow: inset 0 0 0 1.5px var(--line);
}
.pf-more:hover { background: var(--tint); }
.pf-more .ico { width: 18px; height: 18px; }
