/* Perfil do cidadão — usa os mesmos recursos e tokens do jogo. */
.profile-page { --profile-accent: var(--color-primary); }
.profile-breadcrumb { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; color: var(--color-text-3); font-size: 11px; }
.profile-breadcrumb > span:first-child { font-family: var(--font-ui); letter-spacing: .12em; color: var(--color-text-2); }
.profile-breadcrumb span span { margin: 0 8px; color: var(--color-primary); }
.profile-hero { position: relative; overflow: hidden; border: 1px solid color-mix(in srgb, var(--color-primary) 45%, var(--color-line)); border-radius: var(--radius-lg); background: var(--color-bg); isolation: isolate; }
.profile-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; opacity: .45; z-index: -2; }
.profile-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--color-bg) 0%, color-mix(in srgb, var(--color-bg) 85%, transparent) 38%, transparent 100%); z-index: -1; }
.profile-hero-main { display: flex; align-items: center; gap: 24px; padding: 28px; min-height: 250px; }
.profile-portrait { flex: 0 0 142px; text-align: center; }
.profile-avatar { display: inline-flex; align-items: center; justify-content: center; width: 142px; height: 154px; position: relative; overflow: hidden; flex-shrink: 0; border: 1px solid var(--color-primary); border-radius: 18px; background: radial-gradient(ellipse at 20% 0%, color-mix(in srgb, var(--color-primary) 40%, transparent), transparent 70%), linear-gradient(145deg, var(--color-surface-2), var(--color-bg)); color: var(--color-text); font: 800 64px var(--font-display); letter-spacing: -.04em; box-shadow: inset 0 0 30px color-mix(in srgb, var(--color-primary) 10%, transparent), 0 8px 25px color-mix(in srgb, var(--color-bg) 80%, transparent); }
.profile-avatar::after { content: ''; position: absolute; inset: 7px; border: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent); border-radius: 12px; pointer-events: none; }
.profile-avatar > .icon { width: 64px; height: 64px; stroke-width: 1.25; color: var(--color-primary); }
.profile-id { display: block; margin-top: 12px; font: 11px var(--font-ui); letter-spacing: .12em; color: var(--color-text-2); }
.profile-avatar-small { width: 40px; height: 40px; border-radius: 10px; font-size: 19px; box-shadow: none; }
.profile-avatar-small::after { display: none; }
.profile-avatar-small > .icon { width: 22px; height: 22px; }
.profile-identity { flex: 1; min-width: 0; max-width: 610px; }
.profile-identity h1 { margin: 10px 0 6px; font: 800 clamp(30px, 3vw, 46px)/1.1 var(--font-display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.profile-bio { max-width: 550px; color: var(--color-text-2); font-size: 13px; line-height: 1.6; margin: 8px 0 12px; white-space: pre-line; overflow-wrap: anywhere; }
.profile-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--color-text-3); }
.profile-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.profile-meta .icon { color: var(--color-info); }
.profile-xp { margin-top: 18px; max-width: 380px; }
.profile-xp .progress { height: 6px; }
.profile-xp .progress-label { font-size: 11px; margin-bottom: 6px; }
.profile-xp small { display: block; margin-top: 7px; font-size: 10px; color: var(--color-text-3); }
.profile-hero-tools { align-self: flex-start; margin-left: auto; display: flex; flex-direction: column; gap: 8px; }
.profile-hero-bottom { display: flex; align-items: center; gap: 20px; padding: 16px 24px; border-top: 1px solid color-mix(in srgb, var(--color-primary) 20%, var(--color-line)); background: color-mix(in srgb, var(--color-bg) 86%, transparent); }
.profile-facts { display: grid; grid-template-columns: .8fr .8fr 1.2fr; gap: 20px; flex: 1; min-width: 0; }
.profile-facts > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.profile-facts > div > .icon { color: var(--color-primary); flex-shrink: 0; width: 22px; height: 22px; }
.profile-facts > div > span { color: var(--color-text-3); font-size: 10px; min-width: 0; }
.profile-facts strong { display: block; font-size: 13px; color: var(--color-text); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-facts small { font-size: 10px; font-weight: 400; color: var(--color-text-3); }
.profile-actions { display: flex; gap: 6px; }
.profile-shortcuts { display: flex; align-items: center; gap: 4px; padding: 10px 0 14px; overflow-x: auto; }
.profile-shortcuts button { border: 0; background: transparent; color: var(--color-text-2); padding: 9px 12px; font: 12px var(--font-ui); cursor: pointer; border-radius: 7px; }
.profile-shortcuts button:hover { color: var(--color-text); background: var(--color-surface-2); }
.profile-shortcuts > span { display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--color-text-3); font-size: 10px; white-space: nowrap; }
.profile-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.profile-column { display: grid; gap: 16px; min-width: 0; }
.profile-panel { scroll-margin-top: 90px; border-radius: 12px; background: linear-gradient(145deg, color-mix(in srgb, var(--color-surface) 90%, var(--color-bg)), var(--color-bg)); }
.profile-panel .panel-head { min-height: 50px; padding: 10px 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--color-primary) 8%, transparent), transparent); }
.profile-panel .panel-head h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; letter-spacing: .015em; }
.profile-panel .panel-head h2 .icon { color: var(--color-primary); flex-shrink: 0; }
.profile-panel .panel-head .btn { padding: 4px 8px; min-height: 28px; font-size: 11px; }
.profile-panel .panel-body { padding: 14px; }
.profile-panel .state { padding: 20px 4px; }
.profile-panel .state-title { font-size: 14px; }
.profile-panel .state .t-small { font-size: 11px; }
.profile-panel .badge { font-size: 9px; padding: 4px 6px; }
.profile-panel .badge > .icon { width: 12px; height: 12px; }
.profile-count { font: 13px var(--font-ui); color: var(--color-primary); }
.profile-footnote { margin: 12px 0 0; font-size: 10px; line-height: 1.6; color: var(--color-text-3); }
.profile-panel-bottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; color: var(--color-text-3); font-size: 10px; }
.profile-skills { display: grid; gap: 15px; padding: 5px 0; }
.profile-skill { display: grid; grid-template-columns: minmax(80px, 1.1fr) minmax(50px, 1fr) 43px; gap: 10px; align-items: center; font-size: 11px; }
.profile-skill .progress { height: 6px; }
.profile-skill strong { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.profile-skill small { font-weight: 400; color: var(--color-text-3); font-size: 9px; }
.profile-details { margin-top: 14px; border-top: 1px solid var(--color-line); padding-top: 12px; }
.profile-details summary { cursor: pointer; color: var(--color-text-2); font-size: 11px; }
.profile-details[open] summary { margin-bottom: 14px; }
.profile-inventory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.profile-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px 9px 10px; background: var(--color-bg); border: 1px solid var(--color-line); border-radius: 9px; }
.profile-item-icon { display: flex; align-items: center; justify-content: center; height: 60px; width: 60px; background: color-mix(in srgb, var(--color-info) 8%, transparent); border-radius: 12px; margin-bottom: 4px; }
.profile-item-icon .icon { width: 32px; height: 32px; color: var(--color-info); stroke-width: 1.5; }
.player-link { color: var(--color-info); text-decoration: none; }
.player-link:hover { text-decoration: underline; }
.player-link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.profile-item-qty { position: absolute; top: 6px; right: 8px; color: var(--color-info); font: 12px var(--font-ui); }
.profile-item strong { font-size: 11px; }
.profile-item small { font-size: 10px; line-height: 1.5; color: var(--color-text-3); }
.profile-item .btn { margin-top: auto; min-height: 29px; font-size: 11px; }
.profile-map { display: block; width: 100%; border: 1px solid var(--color-line); border-radius: 8px; padding: 0; overflow: hidden; background: var(--color-bg); cursor: pointer; }
.profile-map .vmap { display: block; width: 100%; height: 195px; }
.profile-territory-caption { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 16px 0; }
.profile-territory-caption h3 { font: 500 21px var(--font-ui); margin: 5px 0 0; }
.profile-territory-caption .t-eyebrow { font-size: 9px; }
.profile-panel .progress-label { font-size: 11px; }
.profile-company { display: flex; align-items: center; gap: 10px; padding: 13px 0; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--color-line); cursor: pointer; text-align: left; color: var(--color-text); }
.profile-company:last-child { border-bottom: 0; }
.profile-company:hover strong, .profile-player:hover strong { color: var(--color-info); }
.profile-company-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 43px; height: 43px; background: var(--grad-neon); border-radius: 8px; }
.profile-company > span:nth-child(2) { flex: 1; min-width: 0; }
.profile-company strong { font-size: 12px; display: block; overflow-wrap: anywhere; }
.profile-company small { display: block; color: var(--color-text-3); font-size: 10px; line-height: 1.7; margin-top: 3px; }
.profile-company small.t-legal { color: var(--color-legal); }
.profile-company > span:last-child { display: flex; align-items: center; gap: 2px; }
.profile-milestones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profile-milestone { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 8px; border: 1px solid var(--color-line); border-radius: 8px; background: var(--color-bg); color: var(--color-text-3); }
.profile-milestone > .icon { width: 26px; height: 26px; margin-bottom: 8px; }
.profile-milestone strong { color: var(--color-text-2); font-size: 11px; }
.profile-milestone small { margin-top: 4px; font-size: 9px; }
.profile-milestone > span { font-size: 9px; margin-top: 10px; }
.profile-milestone.is-earned { border-color: color-mix(in srgb, var(--color-civil) 45%, var(--color-line)); background: color-mix(in srgb, var(--color-civil) 5%, var(--color-bg)); }
.profile-milestone.is-earned > .icon, .profile-milestone.is-earned > span { color: var(--color-civil); }
.profile-checklist button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--color-text); text-align: left; padding: 10px 0; cursor: pointer; }
.profile-checklist button > span:nth-child(2) { flex: 1; }
.profile-checklist strong { display: block; font-size: 11px; }
.profile-checklist small { display: block; font-size: 10px; color: var(--color-text-3); margin-top: 5px; }
.profile-checklist button > .icon { width: 14px; height: 14px; color: var(--color-text-3); }
.profile-check { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--color-line); border-radius: 8px; color: var(--color-text-3); }
.profile-check.is-done { color: var(--color-success); border-color: var(--color-success); }
.profile-balances { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-bottom: 1px solid var(--color-line); padding-bottom: 14px; }
.profile-balances > div > small { display: block; font: 9px var(--font-ui); letter-spacing: .1em; color: var(--color-text-3); }
.profile-balances strong { display: block; font: 600 22px var(--font-ui); margin-top: 6px; overflow-wrap: anywhere; }
.profile-balances strong small { font: 10px var(--font-body); }
.profile-transaction { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--color-line); font-size: 11px; }
.profile-transaction:last-child { border-bottom: 0; }
.profile-transaction > span:first-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.profile-transaction > span:last-child { color: var(--color-text-2); }
.profile-transaction small { display: block; font-weight: 400; font-size: 9px; margin-top: 5px; color: var(--color-text-3); }
.profile-feed .feed-item { grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 12px 0; font-size: 11px; }
.profile-feed .feed-item strong { font-weight: 500; line-height: 1.6; }
.profile-feed .feed-dot { width: 28px; height: 28px; }
.profile-feed .feed-time { grid-column: 2; font-size: 9px; text-align: left; }
.profile-search { display: flex; gap: 6px; }
.profile-search .input { width: 100%; min-width: 0; font-size: 11px; min-height: 38px; }
.profile-search .btn { flex-shrink: 0; width: 38px; height: 38px; }
.profile-player { display: flex; align-items: center; gap: 9px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--color-line); background: none; text-align: left; color: var(--color-text); cursor: pointer; }
.profile-player:last-child { border-bottom: 0; }
.profile-player > span:nth-child(2) { flex: 1; min-width: 0; }
.profile-player strong { font-size: 12px; display: block; overflow-wrap: anywhere; }
.profile-player small { display: block; color: var(--color-text-3); font-size: 10px; margin-top: 4px; }
.profile-player > .num { font-size: 12px; color: var(--color-info); }
.profile-editor { margin: 16px 0; }
.profile-editor fieldset { border: 0; padding: 16px 0; margin: 0; }
.profile-editor legend { font-size: 13px; padding-top: 12px; }
.profile-avatar-options { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-avatar-options label { display: flex; align-items: center; gap: 8px; cursor: pointer; border: 1px solid var(--color-line); border-radius: 10px; padding: 8px; font-size: 12px; }
.profile-avatar-options label:has(input:checked) { border-color: var(--color-primary); background: var(--color-surface-2); }
.profile-avatar-options input { accent-color: var(--color-primary); }
.profile-editor textarea { display: block; width: 100%; padding: 12px; resize: vertical; line-height: 1.6; }
.profile-page button:focus-visible, .profile-page summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
@media (max-width: 1250px) {
  .profile-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .profile-column:last-child { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; align-items: start; }
  .profile-column:last-child > :last-child { grid-column: 2; grid-row: 1 / 3; }
  .profile-hero-bottom { flex-wrap: wrap; }
  .profile-facts { min-width: 100%; }
}
@media (max-width: 640px) {
  .profile-breadcrumb > span:last-child { display: none; }
  .profile-hero-main { flex-wrap: wrap; padding: 18px; gap: 14px; }
  .profile-portrait { flex-basis: 76px; align-self: flex-start; }
  .profile-portrait .profile-avatar { width: 76px; height: 86px; font-size: 38px; border-radius: 12px; }
  .profile-portrait .profile-avatar > .icon { width: 38px; height: 38px; }
  .profile-id { font-size: 8px; letter-spacing: .04em; }
  .profile-identity h1 { font-size: 30px; }
  .profile-identity .badge { font-size: 9px; padding: 4px 6px; }
  .profile-identity .cluster { gap: 4px; }
  .profile-bio { font-size: 11px; }
  .profile-meta { gap: 8px; font-size: 10px; }
  .profile-xp { margin-top: 12px; }
  .profile-xp small { font-size: 9px; }
  .profile-hero-tools { flex-direction: row; width: 100%; justify-content: flex-end; }
  .profile-hero-bottom { padding: 14px; gap: 14px; }
  .profile-facts { gap: 10px; }
  .profile-facts > div > .icon { display: none; }
  .profile-facts strong { font-size: 11px; }
  .profile-facts small { display: block; margin-top: 3px; }
  .profile-actions { width: 100%; }
  .profile-actions > .btn { flex: 1; padding: 6px; font-size: 11px; }
  .profile-shortcuts > span { display: none; }
  .profile-shortcuts button { white-space: nowrap; padding: 8px 10px; }
  .profile-columns { grid-template-columns: minmax(0, 1fr); }
  .profile-column:last-child { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .profile-column:last-child > :last-child { grid-column: auto; grid-row: auto; }
  .profile-panel { scroll-margin-top: 142px; }
  .profile-editor .spread { flex-wrap: wrap; }
}

/* Retratos ilustrados como avatar */
.profile-avatar.has-portrait > img, .avatar.has-portrait > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.has-portrait { overflow: hidden; padding: 0; }
.profile-portrait-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-bottom: 12px; }
.profile-portrait-options label { display: grid; gap: 4px; justify-items: center; cursor: pointer; padding: 6px; border-radius: 12px; border: 1px solid var(--color-line); font-size: 12px; text-align: center; }
.profile-portrait-options label:has(input:checked) { border-color: var(--color-primary); background: var(--color-surface-2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 40%, transparent); }
.profile-portrait-options input { position: absolute; opacity: 0; pointer-events: none; }
.profile-avatar-pick { width: 80px; height: 80px; border-radius: 10px; box-shadow: none; }
.profile-avatar-pick::after { display: none; }
