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

  :root {
    --gold: #c8a84b;
    --gold-bright: #f0d060;
    --gold-dim: #7a6128;
    /* Versão mais clara do gold-dim para TEXTO, com contraste AA (>=4.5:1)
       sobre o fundo escuro. O gold-dim fica reservado para linhas/bordas. */
    --gold-dim-text: #a0822f;
    --parchment: #1a140a;
    --dark: #0d0a05;
    --darker: #070503;
    --red: #8b1a1a;
    --red-bright: #c42b2b;
    --text: #e8d9b0;
    --text-dim: #9a8a68;
    --rune-blue: #3a6ea8;
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes shimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
  }
  @keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(2deg); }
    66% { transform: translateY(-4px) rotate(-1deg); }
  }
  @keyframes runeGlow {
    0%, 100% { text-shadow: 0 0 10px #3a6ea8, 0 0 20px #3a6ea8; }
    50% { text-shadow: 0 0 20px #5a8ec8, 0 0 40px #3a6ea8, 0 0 60px #1a4e88; }
  }
  @keyframes borderPulse {
    0%, 100% { border-color: var(--gold-dim); }
    50% { border-color: var(--gold); }
  }

  html, body {
    min-height: 100vh;
    background: var(--darker);
    color: var(--text);
    font-family: 'Crimson Text', Georgia, serif;
    overflow-x: hidden;
  }

  .bg-texture {
    position: fixed;
    inset: 0;
    background:
      radial-gradient(ellipse at 20% 50%, rgba(58,110,168,0.08) 0%, transparent 60%),
      radial-gradient(ellipse at 80% 20%, rgba(139,26,26,0.12) 0%, transparent 50%),
      radial-gradient(ellipse at 60% 80%, rgba(200,168,75,0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  .grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
      linear-gradient(rgba(200,168,75,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(200,168,75,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
  }

  .page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* === HEADER === */
  header {
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    border-bottom: 1px solid rgba(200,168,75,0.15);
    animation: fadeUp 0.6s ease both;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-shrink: 0;
    padding: 0.15rem 0;
    text-decoration: none;
  }

  .logo-badge {
    height: 2.6rem;
    width: auto;
    display: block;
    flex-shrink: 0;
  }

  .logo-text {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    color: var(--gold);
    line-height: 1;
  }

  .logo-sub {
    color: var(--text-dim);
    font-weight: 400;
    font-size: 0.85rem;
    display: block;
    letter-spacing: 0.5em;
    margin-top: -2px;
  }

  header nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  header nav a {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.2s;
  }
  header nav a:hover { color: var(--gold); }
  header nav a.active { color: var(--gold); }

  .nav-toggle {
    display: none;
    width: 2.85rem;
    height: 2.85rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.32rem;
    background:
      linear-gradient(135deg, rgba(200,168,75,0.08), transparent 46%),
      rgba(26,20,10,0.72);
    border: 1px solid rgba(200,168,75,0.26);
    color: var(--gold);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible {
    border-color: rgba(200,168,75,0.55);
    background-color: rgba(200,168,75,0.08);
    outline: none;
  }

  .nav-toggle span {
    display: block;
    width: 1.15rem;
    height: 1px;
    background: var(--gold);
    transform-origin: center;
    transition: transform 0.2s, opacity 0.2s;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(0.33rem) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-0.33rem) rotate(-45deg);
  }

  /* === SUB-PAGES === */
  .subpage {
    flex: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 4rem 2rem 5rem;
  }

  .page-title {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeUp 0.6s ease both;
  }

  .page-title h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.01em;
    color: var(--gold);
    -webkit-text-stroke: 1px var(--gold-dim);
    line-height: 1;
    margin-bottom: 1rem;
  }

  .page-title p {
    font-size: 1.2rem;
    color: var(--text-dim);
    font-style: italic;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
  }

  /* === HERO === */
  .hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0rem 2rem 6rem;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
  }

  .rune-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(200,168,75,0.3);
    padding: 0.5rem 1.25rem;
    margin-bottom: 3rem;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--gold-dim);
    animation: fadeUp 0.6s 0.1s ease both, borderPulse 3s infinite;
  }

  .rune-badge::before, .rune-badge::after {
    content: '᚛';
    font-size: 1.2rem;
    color: var(--gold-dim);
    animation: shimmer 2s infinite;
  }
  .rune-badge::after { content: '᚜'; }

  .hero-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    animation: fadeUp 0.7s 0.2s ease both;
  }

  .hero-title .line1 { color: var(--text); display: block; }
  .hero-title .line2 {
    display: block;
    color: var(--gold);
    -webkit-text-stroke: 1px var(--gold-dim);
  }

  .hero-sub {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.8rem, 2vw, 1rem);
    letter-spacing: 0.6em;
    color: var(--red-bright);
    margin-bottom: 1.5rem;
    animation: fadeUp 0.7s 0.3s ease both;
    text-transform: uppercase;
  }

  .hero-desc {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 520px;
    line-height: 1.8;
    margin-bottom: 3rem;
    font-style: italic;
    animation: fadeUp 0.7s 0.4s ease both;
  }

  .hero-desc strong {
    color: var(--text);
    font-style: normal;
    font-weight: 600;
  }

  /* Rune icons floating */
  .runes-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
    animation: fadeUp 0.7s 0.5s ease both;
  }

  .rune-icon {
    width: 52px;
    height: 52px;
    border: 1px solid rgba(58,110,168,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #5a8ec8;
    animation: float var(--dur) var(--delay) ease-in-out infinite, runeGlow 3s var(--delay) infinite;
    position: relative;
  }

  .rune-icon::before {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(58,110,168,0.15);
  }

  /* CTA Button */
  .cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeUp 0.7s 0.6s ease both;
  }

  .btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #1e2a4a 0%, #1a2040 100%);
    border: 1px solid var(--rune-blue);
    color: #7ba7d8;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    padding: 1.1rem 2.5rem;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
  }

  .btn-discord::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(90,142,200,0.15), transparent);
    transition: left 0.5s ease;
  }

  .btn-discord:hover::before { left: 100%; }
  .btn-discord:hover {
    border-color: #7ba7d8;
    color: #c0d8f0;
    box-shadow: 0 0 30px rgba(58,110,168,0.3), inset 0 0 20px rgba(58,110,168,0.05);
    transform: translateY(-2px);
  }

  .discord-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
    flex-shrink: 0;
  }

  .btn-hint {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    font-family: 'Cinzel', serif;
  }

  /* === DIVIDER === */
  .ornament {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 700px;
    margin: 0 auto 5rem;
    animation: fadeUp 0.7s 0.7s ease both;
  }

  .ornament-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
  }

  .ornament-center {
    font-family: 'Cinzel', serif;
    color: var(--gold-dim-text);
    font-size: 1.2rem;
    letter-spacing: 0.5em;
    white-space: nowrap;
  }

  /* === FEATURES === */
  .features {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    border: 1px solid rgba(200,168,75,0.12);
    margin-bottom: 6rem;
    animation: fadeUp 0.7s 0.8s ease both;
  }

  .feature {
    padding: 2.5rem 2rem;
    background: rgba(26,20,10,0.6);
    border-right: 1px solid rgba(200,168,75,0.1);
    position: relative;
    overflow: hidden;
  }

  .feature:last-child { border-right: none; }

  .feature::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
    opacity: 0;
    transition: opacity 0.3s;
  }
  .feature:hover::before { opacity: 1; }

  .feature-num {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 900;
    color: rgba(200,168,75,0.08);
    line-height: 1;
    margin-bottom: 1rem;
    transition: color 0.3s;
  }
  .feature:hover .feature-num { color: rgba(200,168,75,0.15); }

  .feature-title {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
  }

  .feature-text {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.7;
    font-style: italic;
  }

  /* === FLAG SECTION === */
  .portugal-bar {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    margin-bottom: 3rem;
    border-top: 1px solid rgba(200,168,75,0.1);
    animation: fadeUp 0.7s 0.9s ease both;
  }

  .flag-stripe {
    display: flex;
    height: 24px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
  }
  .stripe-green { width: 32px; background: #006600; }
  .stripe-red { width: 48px; background: #cc0000; }

  .portugal-text {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    color: var(--text-dim);
  }

  /* === FOOTER === */
  footer {
    width: 100%;
    padding: 2rem 3rem;
    border-top: 1px solid rgba(200,168,75,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeUp 0.7s 1s ease both;
  }

  footer p {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    font-family: 'Cinzel', serif;
  }

  footer a {
    color: var(--gold-dim-text);
    text-decoration: none;
    transition: color 0.2s;
  }
  footer a:hover { color: var(--gold); }

  /* === STATS === */
  .stats {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    border: 1px solid rgba(200,168,75,0.12);
    margin: 0 auto 6rem;
    animation: fadeUp 0.7s ease both;
  }

  .stat {
    padding: 2.5rem 1.5rem;
    background: rgba(26,20,10,0.6);
    border-right: 1px solid rgba(200,168,75,0.1);
    text-align: center;
  }
  .stat:last-child { border-right: none; }

  .stat-num {
    font-family: 'Cinzel', serif;
    font-size: 2.75rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 0.75rem;
  }

  .stat-label {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    text-transform: uppercase;
  }

  /* === EVENTS === */
  .events {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 6rem;
    display: flex;
    flex-direction: column;
    gap: 1px;
    border: 1px solid rgba(200,168,75,0.12);
    animation: fadeUp 0.7s ease both;
  }

  .event {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    background: rgba(26,20,10,0.6);
    border-bottom: 1px solid rgba(200,168,75,0.1);
    position: relative;
    overflow: hidden;
  }
  .event:last-child { border-bottom: none; }

  .event::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 2px; height: 100%;
    background: linear-gradient(180deg, transparent, var(--gold-dim), transparent);
    opacity: 0;
    transition: opacity 0.3s;
  }
  .event:hover::before { opacity: 1; }

  .event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border: 1px solid rgba(200,168,75,0.3);
    font-family: 'Cinzel', serif;
  }

  .event-day {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
  }

  .event-mon {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    margin-top: 0.25rem;
  }

  .event-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    color: var(--text);
    margin-bottom: 0.4rem;
  }

  .event-desc {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.6;
    font-style: italic;
  }

  .event-body { flex: 1; }

  a.event-title {
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s;
  }
  a.event-title:hover { color: var(--gold); }

  .event-status {
    flex-shrink: 0;
    align-self: flex-start;
    font-family: 'Cinzel', serif;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    border: 1px solid currentColor;
    white-space: nowrap;
  }
  .event-status-ongoing  { color: var(--gold); }
  .event-status-upcoming { color: #7ba7d8; }
  .event-status-ended    { color: var(--text-dim); }

  .events-pager {
    width: 100%;
    max-width: 700px;
    margin: -4rem auto 6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .events-btn {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(26,20,10,0.6);
    border: 1px solid rgba(200,168,75,0.3);
    padding: 0.7rem 1.25rem;
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s, transform 0.3s;
  }
  .events-btn:hover:not(:disabled) {
    border-color: var(--gold);
    transform: translateY(-2px);
  }
  .events-btn:disabled {
    color: var(--text-dim);
    border-color: rgba(200,168,75,0.1);
    opacity: 0.4;
    cursor: not-allowed;
  }

  .events-page {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    text-transform: uppercase;
    text-align: center;
  }

  /* === TABS (leaderboard + eventos) === */
  .lb-tabs, .events-tabs {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }

  .lb-tab, .events-tab {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: rgba(26,20,10,0.6);
    border: 1px solid rgba(200,168,75,0.2);
    padding: 0.6rem 1.1rem;
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s;
  }
  .lb-tab:hover, .events-tab:hover { color: var(--gold); }
  .lb-tab.active, .events-tab.active {
    color: var(--dark);
    background: var(--gold);
    border-color: var(--gold);
  }

  .events-empty {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 6rem;
    padding: 3rem 2rem;
    background: rgba(26,20,10,0.6);
    border: 1px solid rgba(200,168,75,0.12);
    text-align: center;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-dim);
    line-height: 1.7;
  }

  .leaderboard {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    gap: 1px;
    border: 1px solid rgba(200,168,75,0.12);
    animation: fadeUp 0.7s ease both;
  }

  .lb-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.5rem;
    background: rgba(26,20,10,0.6);
    border-bottom: 1px solid rgba(200,168,75,0.1);
    color: var(--text);
    text-decoration: none;
  }
  .lb-row:last-child { border-bottom: none; }
  a.lb-row { cursor: pointer; transition: background 0.2s; }
  a.lb-row:hover { background: rgba(200,168,75,0.08); }
  a.lb-row:hover .lb-profile-name { color: var(--gold); }

  .lb-rank {
    flex-shrink: 0;
    width: 2rem;
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-dim);
  }
  .lb-rank-1 { color: var(--gold-bright); }
  .lb-rank-2 { color: #c8c8d0; }
  .lb-rank-3 { color: #cd7f32; }

  .lb-name {
    flex: 1;
    min-width: 0;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    color: var(--text);
    overflow-wrap: anywhere;
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .lb-mode {
    flex-shrink: 0;
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--rune-blue);
    border: 1px solid var(--rune-blue);
    padding: 0.15rem 0.4rem;
  }

  .lb-bar {
    flex-shrink: 0;
    width: 90px;
    height: 6px;
    background: rgba(200,168,75,0.08);
    overflow: hidden;
  }
  .lb-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  }

  .lb-slots {
    flex-shrink: 0;
    width: 110px;
    text-align: right;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
  }
  .lb-slots span {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-dim);
  }

  .lb-link {
    font-family: 'Cinzel', serif;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    border: 1px solid rgba(200,168,75,0.25);
    padding: 0.3rem 0.5rem;
    transition: border-color 0.2s, color 0.2s;
  }
  .lb-link:hover {
    color: var(--gold);
    border-color: var(--gold);
  }

  .lb-profile-name {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
  }

  .leaderboard-note {
    max-width: 700px;
    margin: 0 auto 6rem;
    text-align: center;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-dim);
    line-height: 1.6;
  }

  /* === STAFF === */
  .staff {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 1.5rem;
    margin: 0 auto 6rem;
    animation: fadeUp 0.7s ease both;
  }

  .staff-card {
    padding: 2rem 1rem;
    background: rgba(26,20,10,0.6);
    border: 1px solid rgba(200,168,75,0.12);
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }
  .staff-card:hover {
    border-color: rgba(200,168,75,0.4);
    transform: translateY(-3px);
  }

  .staff-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    border: 1px solid var(--gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    background: rgba(200,168,75,0.05);
    overflow: hidden;
    flex-shrink: 0;
  }

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

  .staff-name {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.4rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .staff-role {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--red-bright);
    text-transform: uppercase;
  }

  /* === JOIN === */
  .join {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 0 auto 6rem;
    animation: fadeUp 0.7s ease both;
  }

  .join-heading {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
  }

  .join-list {
    list-style: none;
    counter-reset: join;
  }

  .join-list li {
    counter-increment: join;
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.6;
  }

  .join-list li::before {
    content: counter(join);
    position: absolute;
    left: 0;
    top: -0.1rem;
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: rgba(200,168,75,0.4);
    line-height: 1;
  }

  .join-list strong {
    color: var(--gold);
    font-weight: 600;
  }

  .join-col .cta-wrap {
    align-items: flex-start;
    margin-top: 2rem;
  }

  /* === PROFILE === */
  .profile-page {
    max-width: 1100px;
  }

  .profile-title {
    margin-bottom: 2rem;
  }

  /* Badges compactos: icone + label curta com tooltip. */
  .profile-badge-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .profile-badge-chip {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    position: relative;
    padding: 0.48rem 0.55rem;
    background:
      linear-gradient(135deg, rgba(200,168,75,0.08), transparent 48%),
      rgba(7,5,3,0.34);
    border: 1px solid rgba(200,168,75,0.14);
    color: inherit;
  }

  .profile-badge-chip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.5rem);
    z-index: 6;
    width: max-content;
    max-width: 180px;
    padding: 0.4rem 0.55rem;
    background: rgba(7,5,3,0.96);
    border: 1px solid rgba(200,168,75,0.42);
    color: var(--text);
    font-family: 'Cinzel', serif;
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    line-height: 1.35;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 0.2rem);
    transition: opacity 0.16s ease, transform 0.16s ease;
    box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  }

  .profile-badge-chip.profile-tooltip-visible::after,
  .profile-badge-chip:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .profile-badge-chip:focus-visible {
    outline: 1px solid rgba(200,168,75,0.52);
    outline-offset: -1px;
  }

  .profile-badge-card {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0.22rem;
    background: rgba(26,20,10,0.65);
    border: 1px solid rgba(200,168,75,0.3);
    border-radius: 5px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.35);
  }

  /* Badges graduados (ex.: Pet Collector): anel colorido à volta do ícone
     numa progressão tipo OSRS — bronze, prata, ouro. */
  .profile-badge-chip--tier-1 .profile-badge-card {
    border-color: rgba(205,127,50,0.8);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.35), 0 0 0 1px rgba(205,127,50,0.6);
  }
  .profile-badge-chip--tier-2 .profile-badge-card {
    border-color: rgba(200,200,205,0.85);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.35), 0 0 0 1px rgba(200,200,205,0.6);
  }
  .profile-badge-chip--tier-3 .profile-badge-card {
    border-color: rgba(255,205,60,0.9);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,205,60,0.7);
  }

  /* Letra de reserva (badges do wiki) mostrada até a imagem carregar. */
  .profile-badge-card > span {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--gold);
    opacity: 0.45;
  }

  .profile-badge {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  /* Imagem do wiki: sobrepõe-se à letra de reserva, dentro do cartão. */
  .profile-badge-wiki {
    position: absolute;
    max-width: 78%;
    max-height: 78%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
  }

  .profile-badge-label {
    min-width: 0;
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    color: var(--text);
    line-height: 1.2;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-search {
    width: 100%;
    max-width: 560px;
    margin: 0 auto 3rem;
    display: flex;
    gap: 0.75rem;
    animation: fadeUp 0.7s ease both;
  }

  .profile-search input {
    flex: 1;
    min-width: 0;
    background: rgba(26,20,10,0.7);
    border: 1px solid rgba(200,168,75,0.25);
    color: var(--text);
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    padding: 0.85rem 1rem;
    outline: none;
  }

  .profile-search input:focus {
    border-color: var(--gold);
  }

  .profile-search button {
    flex-shrink: 0;
    background: rgba(26,20,10,0.8);
    border: 1px solid rgba(200,168,75,0.4);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 0.85rem 1.2rem;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
  }
  .profile-search button:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
  }

  .profile-highlights {
    width: 100%;
    max-width: 980px;
    margin: -0.4rem auto 2.4rem;
    animation: fadeUp 0.7s ease both;
  }

  .profile-highlights[hidden] {
    display: none;
  }

  .profile-gains {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid rgba(200,168,75,0.16);
    background:
      radial-gradient(circle at 50% 0%, rgba(200,168,75,0.1), transparent 38%),
      linear-gradient(135deg, rgba(200,168,75,0.06), transparent 42%),
      rgba(26,20,10,0.5);
    box-shadow: inset 0 0 32px rgba(0,0,0,0.22);
  }

  .profile-gains::before,
  .profile-gains::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200,168,75,0.46), transparent);
    pointer-events: none;
  }

  .profile-gains::before { top: 0.55rem; }
  .profile-gains::after { bottom: 0.55rem; }

  .profile-gains-head {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-dim-text);
  }

  .profile-gain-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.22fr) minmax(0, 0.92fr);
    gap: 1px;
    border: 1px solid rgba(200,168,75,0.13);
    background: rgba(200,168,75,0.1);
  }

  .profile-gain-card {
    min-width: 0;
    min-height: 126px;
    position: relative;
    padding: 1.25rem 1rem;
    background:
      linear-gradient(180deg, rgba(26,20,10,0.78), rgba(7,5,3,0.42));
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .profile-gain-card::before {
    content: "";
    position: absolute;
    inset: 0.45rem;
    border: 1px solid rgba(200,168,75,0.055);
    pointer-events: none;
  }

  .profile-gain-card-featured {
    min-height: 154px;
    background:
      radial-gradient(circle at 50% 20%, rgba(240,208,96,0.16), transparent 54%),
      linear-gradient(180deg, rgba(36,27,11,0.9), rgba(7,5,3,0.44));
  }

  .profile-gain-card-featured::after {
    content: "";
    position: absolute;
    top: 0;
    left: 18%;
    right: 18%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.7;
  }

  .profile-gain-label {
    position: relative;
    z-index: 1;
    font-family: 'Cinzel', serif;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  .profile-gain-player {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 0.5rem;
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 1.32rem;
    font-weight: 900;
    line-height: 1.05;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
  }

  .profile-gain-card-featured .profile-gain-player {
    font-size: 1.95rem;
    color: var(--gold-bright);
    text-shadow: 0 0 18px rgba(200,168,75,0.16);
  }

  .profile-gain-player:hover {
    color: var(--gold-bright);
  }

  .profile-gain-player[aria-disabled="true"] {
    pointer-events: none;
    color: var(--gold-dim-text);
  }

  .profile-gain-note {
    position: relative;
    z-index: 1;
    margin-top: 0.55rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.35;
  }

  .profile-summary {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid rgba(200,168,75,0.12);
    margin-bottom: 1.5rem;
    animation: fadeUp 0.7s ease both;
  }


  .profile-stat-card {
    min-height: 118px;
    padding: 1.4rem 1rem;
    background: rgba(26,20,10,0.65);
    border-right: 1px solid rgba(200,168,75,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  .profile-stat-card:last-child { border-right: none; }

  .profile-stat-value {
    font-family: 'Cinzel', serif;
    font-size: 2.15rem;
    font-weight: 900;
    line-height: 1;
    color: var(--gold);
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .profile-stat-card:last-child .profile-stat-value {
    font-size: 1.75rem;
  }

  .profile-stat-label {
    margin-top: 0.65rem;
    font-family: 'Cinzel', serif;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
  }

  .profile-stat-note,
  .profile-row-note,
  .profile-muted {
    margin-top: 0.35rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-dim);
    font-style: italic;
  }

  .profile-links {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.4rem;
  }

  .profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 1.5rem;
    align-items: start;
    animation: fadeUp 0.7s ease both;
  }

  .profile-grid-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .profile-panel {
    min-width: 0;
    background: rgba(26,20,10,0.62);
    border: 1px solid rgba(200,168,75,0.12);
    padding: 1.4rem;
  }

  .profile-panel-title {
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 1rem;
  }

  .profile-panel-skills > .profile-panel-title {
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .profile-empty {
    max-width: 620px;
    margin: 0 auto 5rem;
    text-align: center;
  }

  .profile-member-panel {
    max-width: 980px;
    margin: 0 auto 5rem;
  }

  .profile-member-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
  }

  .profile-member-head .profile-panel-title {
    margin-bottom: 0.35rem;
  }

  .profile-member-count {
    flex-shrink: 0;
    border: 1px solid rgba(200,168,75,0.22);
    background: rgba(7,5,3,0.34);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    line-height: 1.2;
    padding: 0.58rem 0.7rem;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .profile-member-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .profile-member-link {
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(200,168,75,0.12);
    background: rgba(7,5,3,0.28);
    color: var(--text);
    font-family: 'Cinzel', serif;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    padding: 0.72rem 0.8rem;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, transform 0.2s, background 0.2s;
  }

  .profile-member-link:hover {
    border-color: rgba(200,168,75,0.42);
    background: rgba(26,20,10,0.78);
    color: var(--gold);
    transform: translateY(-1px);
  }

  .profile-member-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-member-loading,
  .profile-member-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 1.5rem 0;
    text-align: center;
  }

  .profile-member-pager {
    display: grid;
    grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) minmax(0, 7.5rem);
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
  }

  .profile-member-pager[hidden] {
    display: none;
  }

  .profile-member-pager button {
    min-width: 0;
    border: 1px solid rgba(200,168,75,0.28);
    background: rgba(26,20,10,0.72);
    color: var(--gold);
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    padding: 0.72rem 0.75rem;
    text-transform: uppercase;
    transition: border-color 0.2s, transform 0.2s, opacity 0.2s;
  }

  .profile-member-pager button:hover:not(:disabled) {
    border-color: var(--gold);
    transform: translateY(-1px);
  }

  .profile-member-pager button:disabled {
    cursor: default;
    opacity: 0.42;
  }

  .profile-member-page-label {
    color: var(--text-dim);
    font-size: 0.84rem;
    font-style: italic;
    line-height: 1.35;
    text-align: center;
  }

  .skill-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 54px;
    gap: 1px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(200,168,75,0.1);
    border: 1px solid rgba(200,168,75,0.18);
  }

  .skill-tile {
    min-width: 0;
    min-height: 0;
    background:
      linear-gradient(135deg, rgba(200,168,75,0.08), transparent 46%),
      rgba(7,5,3,0.46);
    border: 0;
    padding: 0.58rem 0.65rem;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 0.45rem;
    position: relative;
    box-shadow: inset 0 0 22px rgba(0,0,0,0.18);
  }

  .skill-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255,255,255,0.025);
    pointer-events: none;
  }

  .skill-tile::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.55rem);
    z-index: 4;
    width: max-content;
    max-width: 190px;
    padding: 0.45rem 0.6rem;
    background: rgba(7,5,3,0.96);
    border: 1px solid rgba(200,168,75,0.45);
    color: var(--text);
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    line-height: 1.35;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 0.25rem);
    transition: opacity 0.16s ease, transform 0.16s ease;
    box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  }

  .skill-tile.profile-tooltip-visible::after,
  .skill-tile.skill-tooltip-visible::after,
  .skill-tile:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .skill-tile:focus-visible {
    outline: 1px solid rgba(200,168,75,0.5);
    outline-offset: -1px;
  }

  .skill-icon {
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .skill-icon img {
    display: block;
    max-width: 25px;
    max-height: 25px;
    image-rendering: auto;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.75));
  }

  .skill-icon span {
    font-family: 'Cinzel', serif;
    font-size: 0.58rem;
    color: var(--gold);
  }

  .skill-readout {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    text-align: right;
  }

  .skill-level {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    text-shadow: 0 0 12px rgba(200,168,75,0.12);
  }

  .skill-name {
    margin-top: 0.24rem;
    font-family: 'Cinzel', serif;
    font-size: 0.52rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-pets {
    width: 100%;
    max-width: 560px;
    margin: 1.6rem auto 0;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(200,168,75,0.12);
  }

  .profile-panel-pets .profile-pets {
    max-width: none;
    margin: 0;
    padding-top: 0;
    border-top: 0;
  }

  .profile-pets-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
  }

  .profile-pets-head .profile-panel-title {
    margin-bottom: 0;
  }

  .profile-pets-count {
    flex-shrink: 0;
    min-width: 2rem;
    padding: 0.24rem 0.45rem;
    border: 1px solid rgba(200,168,75,0.22);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 0.66rem;
    font-weight: 700;
    text-align: center;
  }

  .profile-pet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
    gap: 1px;
    border: 1px solid rgba(200,168,75,0.18);
    background: rgba(200,168,75,0.1);
  }

  .profile-pet-tile {
    min-width: 0;
    min-height: 58px;
    background:
      radial-gradient(circle at 50% 34%, rgba(200,168,75,0.12), transparent 56%),
      linear-gradient(180deg, rgba(26,20,10,0.62), rgba(7,5,3,0.54));
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 18px rgba(0,0,0,0.22);
  }

  .profile-pet-tile::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(200,168,75,0.08);
    pointer-events: none;
  }

  .profile-pet-tile::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.5rem);
    z-index: 5;
    width: max-content;
    max-width: 170px;
    padding: 0.4rem 0.55rem;
    background: rgba(7,5,3,0.96);
    border: 1px solid rgba(200,168,75,0.42);
    color: var(--text);
    font-family: 'Cinzel', serif;
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    line-height: 1.35;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 0.2rem);
    transition: opacity 0.16s ease, transform 0.16s ease;
    box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  }

  .profile-pet-tile.profile-tooltip-visible::after,
  .profile-pet-tile:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  @media (hover: hover) and (pointer: fine) {
    .skill-tile:hover::after,
    .profile-badge-chip:hover::after,
    .profile-pet-tile:hover::after {
      opacity: 1;
      transform: translate(-50%, 0);
    }
  }

  .profile-pet-tile:focus-visible {
    outline: 1px solid rgba(200,168,75,0.52);
    outline-offset: -1px;
  }

  .profile-pet-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .profile-pet-icon span {
    font-family: 'Cinzel', serif;
    font-size: 0.76rem;
    font-weight: 900;
    color: var(--gold);
    opacity: 0.45;
  }

  .profile-pet-icon img {
    position: absolute;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.75));
  }

  .profile-pet-count {
    position: absolute;
    right: 0.28rem;
    bottom: 0.24rem;
    min-width: 1.35rem;
    padding: 0.08rem 0.22rem;
    border: 1px solid rgba(200,168,75,0.28);
    background: rgba(7,5,3,0.78);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 0.54rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
  }

  .profile-leaderboards {
    width: 100%;
    max-width: 560px;
    margin: 1.6rem auto 0;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(200,168,75,0.12);
  }

  .profile-panel-leaderboards .profile-leaderboards {
    max-width: none;
    margin: 0;
    padding-top: 0;
    border-top: 0;
  }

  .profile-leaderboards .profile-panel-title {
    margin-bottom: 0.85rem;
  }

  .profile-lb-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .profile-lb-card {
    display: block;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    background:
      linear-gradient(135deg, rgba(200,168,75,0.08), transparent 46%),
      rgba(7,5,3,0.38);
    border: 1px solid rgba(200,168,75,0.14);
    padding: 0.8rem;
    transition: border-color 0.2s, transform 0.2s, background-color 0.2s;
  }

  .profile-lb-card:hover {
    border-color: rgba(200,168,75,0.42);
    background-color: rgba(200,168,75,0.04);
    transform: translateY(-1px);
  }

  .profile-lb-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
  }

  .profile-lb-head span {
    min-width: 0;
    font-family: 'Cinzel', serif;
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-lb-head strong {
    flex-shrink: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    color: var(--gold);
  }

  .profile-lb-rows {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .profile-lb-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 2.15rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.45rem;
    background: rgba(26,20,10,0.45);
    color: var(--text-dim);
  }

  .profile-lb-row.current {
    background: rgba(200,168,75,0.11);
    color: var(--text);
  }

  .profile-lb-rank {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    color: var(--gold);
  }

  .profile-lb-name {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .profile-lb-mode {
    flex-shrink: 0;
    font-size: 0.48rem;
    letter-spacing: 0.1em;
    color: var(--rune-blue);
  }

  .profile-lb-value {
    flex-shrink: 0;
    text-align: right;
    font-family: 'Cinzel', serif;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--gold);
  }

  .profile-lb-value span {
    font-size: 0.58rem;
    font-weight: 400;
    color: var(--text-dim);
  }

  .collection-card {
    min-width: 0;
  }

  .profile-panel-title-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .collection-title-rank {
    flex-shrink: 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text);
    border: 1px solid rgba(200,168,75,0.25);
    padding: 0.22rem 0.48rem;
    text-align: center;
    white-space: nowrap;
  }

  .collection-tier-compact {
    flex-shrink: 0;
    width: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.32rem;
  }

  .collection-tier-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .collection-tier-icon span {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 900;
    color: var(--gold);
    opacity: 0.5;
  }

  .collection-tier-icon img {
    position: absolute;
    display: block;
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.75));
  }

  .collection-tier-icon-empty {
    border: 1px solid rgba(200,168,75,0.12);
  }

  .collection-tier-name {
    width: 100%;
    font-family: 'Cinzel', serif;
    font-size: 0.55rem;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    text-transform: uppercase;
    line-height: 1.15;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .collection-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
  }

  .collection-value,
  .raid-kc {
    font-family: 'Cinzel', serif;
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
  }

  .collection-label {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-dim);
    font-style: italic;
  }

  .profile-progress {
    width: 100%;
    height: 7px;
    background: rgba(200,168,75,0.08);
    overflow: hidden;
  }

  .profile-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  }

  .collection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin-top: 1rem;
    border: 1px solid rgba(200,168,75,0.1);
  }

  .collection-grid div {
    background: rgba(7,5,3,0.3);
    padding: 0.8rem;
  }

  .collection-grid span {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
  }

  .collection-grid strong {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--text);
    overflow-wrap: anywhere;
  }

  .profile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(200,168,75,0.1);
  }
  .profile-row:last-child { border-bottom: none; padding-bottom: 0; }

  .profile-boss-row {
    gap: 0.85rem;
  }

  .profile-row-main {
    flex: 1;
    min-width: 0;
  }

  .profile-row-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .profile-row-icon span {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--gold);
    opacity: 0.45;
  }

  .profile-row-icon img {
    position: absolute;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.75));
  }

  .profile-row-name,
  .raid-name {
    font-family: 'Cinzel', serif;
    font-size: 0.86rem;
    color: var(--text);
  }

  .profile-row-value {
    flex-shrink: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold);
  }

  .raid-highlight {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(240,208,96,0.3);
    background:
      linear-gradient(135deg, rgba(200,168,75,0.14), transparent 42%),
      linear-gradient(180deg, rgba(26,20,10,0.78), rgba(7,5,3,0.42));
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: inset 0 0 28px rgba(0,0,0,0.22), 0 12px 28px rgba(0,0,0,0.16);
  }

  .raid-highlight::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255,255,255,0.035);
    pointer-events: none;
  }

  .raid-highlight-main {
    position: relative;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
  }

  .raid-highlight-copy {
    min-width: 0;
  }

  .raid-label {
    width: max-content;
    max-width: 100%;
    padding: 0.2rem 0.42rem;
    border: 1px solid rgba(240,208,96,0.28);
    background: rgba(7,5,3,0.34);
    font-family: 'Cinzel', serif;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-bright);
  }

  .raid-name {
    margin: 0.45rem 0 0.5rem;
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .raid-highlight-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
    margin-top: 0.62rem;
  }

  .raid-highlight-meta span {
    padding: 0.22rem 0.45rem;
    border: 1px solid rgba(200,168,75,0.18);
    background: rgba(7,5,3,0.32);
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    text-transform: uppercase;
  }

  .raid-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(200,168,75,0.22);
    background:
      radial-gradient(circle at 50% 38%, rgba(200,168,75,0.16), transparent 58%),
      rgba(7,5,3,0.42);
    box-shadow: inset 0 0 14px rgba(0,0,0,0.28);
  }

  .raid-icon span {
    font-family: 'Cinzel', serif;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--gold);
    opacity: 0.62;
  }

  .raid-icon img {
    position: absolute;
    display: block;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.8));
  }

  .raid-icon.raid-icon-large {
    width: 72px;
    height: 72px;
    border-color: rgba(240,208,96,0.38);
    background:
      radial-gradient(circle at 50% 36%, rgba(240,208,96,0.2), transparent 58%),
      rgba(7,5,3,0.48);
  }

  .raid-icon.raid-icon-large span {
    font-size: 0.76rem;
  }

  .raid-icon.raid-icon-large img {
    width: 66px;
    height: 66px;
    max-width: none;
    max-height: none;
  }

  .raid-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
  }

  .raid-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 0.68rem;
    align-items: center;
    padding: 0.68rem;
    border: 1px solid rgba(200,168,75,0.11);
    background: rgba(7,5,3,0.24);
  }

  .raid-row-body {
    min-width: 0;
  }

  .raid-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.24rem;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
  }

  .raid-row-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.42rem;
  }

  .raid-row-title span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .raid-row-head strong {
    color: var(--gold);
    white-space: nowrap;
  }

  .raid-row-note {
    margin-bottom: 0.42rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--text-dim);
    font-style: italic;
  }

  .raid-row .profile-progress {
    height: 6px;
  }

  @media (max-width: 640px) {
    header {
      padding: 1.2rem 1.35rem;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 1rem;
      align-items: center;
    }
    .logo {
      min-width: 0;
      font-size: 1.25rem;
    }
    .logo span {
      font-size: 0.68rem;
      letter-spacing: 0.34em;
    }
    .nav-toggle {
      display: inline-flex;
    }
    header nav {
      grid-column: 1 / -1;
      width: 100%;
      max-height: 0;
      margin-top: 0;
      padding: 0;
      flex-direction: column;
      align-items: stretch;
      justify-content: flex-start;
      overflow: hidden;
      opacity: 0;
      background: rgba(7,5,3,0.9);
      border: 0 solid rgba(200,168,75,0.18);
      transition: max-height 0.24s ease, opacity 0.2s ease, padding 0.2s ease, border-width 0.2s ease;
    }
    header.nav-open nav {
      max-height: 30rem;
      padding: 0.35rem 0;
      border-width: 1px;
      opacity: 1;
    }
    header nav a {
      margin: 0;
      padding: 0.82rem 1rem;
      border-bottom: 1px solid rgba(200,168,75,0.1);
      text-align: center;
    }
    header nav a:last-child {
      border-bottom: none;
    }
    .features { grid-template-columns: 1fr; }
    .feature { border-right: none; border-bottom: 1px solid rgba(200,168,75,0.1); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat { border-right: none; border-bottom: 1px solid rgba(200,168,75,0.1); }
    .staff { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .staff-name {
      font-size: 0.84rem;
    }
    .join { grid-template-columns: 1fr; gap: 2.5rem; }
    .join-col .cta-wrap { align-items: center; }
    footer { flex-direction: column; gap: 0.5rem; text-align: center; }
    .lb-row { gap: 0.75rem; padding: 0.9rem 1rem; flex-wrap: wrap; }
    .lb-bar { display: none; }
    .lb-slots { width: auto; }
    .profile-highlights {
      margin: -0.2rem auto 2.6rem;
    }
    .profile-gains {
      padding: 0.8rem;
    }
    .profile-gains-head {
      font-size: 0.56rem;
      letter-spacing: 0.13em;
    }
    .profile-gain-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .profile-gain-card {
      min-height: 118px;
      padding: 1.05rem 0.7rem;
    }
    .profile-gain-card:not(.profile-gain-card-featured) {
      display: grid;
      grid-template-rows: 2rem 1.15rem 2.35rem;
      align-content: center;
      align-items: center;
      justify-items: center;
      row-gap: 0.38rem;
    }
    .profile-gain-card-featured {
      grid-column: 1 / -1;
      order: -1;
      min-height: 156px;
    }
    .profile-gain-player {
      font-size: 1rem;
    }
    .profile-gain-card-featured .profile-gain-player {
      font-size: 1.9rem;
    }
    .profile-gain-label {
      font-size: 0.53rem;
      letter-spacing: 0.11em;
    }
    .profile-gain-note {
      font-size: 0.84rem;
    }
    .profile-search { flex-direction: column; }
    .profile-search button { width: 100%; }
    .profile-member-head {
      flex-direction: column;
      align-items: stretch;
    }
    .profile-member-count {
      align-self: flex-start;
    }
    .profile-member-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .profile-member-link {
      min-height: 42px;
      padding: 0.68rem 0.7rem;
    }
    .profile-member-pager {
      grid-template-columns: 1fr 1fr;
    }
    .profile-member-page-label {
      grid-column: 1 / -1;
      grid-row: 1;
    }
    .profile-member-pager button {
      grid-row: 2;
    }
    .profile-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-stat-card { border-right: none; border-bottom: 1px solid rgba(200,168,75,0.1); }
    .profile-stat-value { font-size: 1.75rem; }
    .profile-stat-card:last-child .profile-stat-value { font-size: 1.35rem; }
    .profile-grid { grid-template-columns: 1fr; }
    .profile-grid-column { display: contents; }
    .profile-panel-collection { order: 1; }
    .profile-panel-badges { order: 2; }
    .profile-panel-skills { order: 3; }
    .profile-panel-pets { order: 4; }
    .profile-panel-bosses { order: 5; }
    .profile-panel-raids { order: 6; }
    .profile-panel-leaderboards { order: 7; }
    .skill-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      grid-auto-rows: 46px;
    }
    .skill-tile {
      grid-template-columns: 24px minmax(0, 1fr);
      gap: 0.35rem;
      padding: 0.45rem 0.5rem;
    }
    .skill-icon,
    .skill-icon img {
      width: 22px;
      height: 22px;
    }
    .skill-level { font-size: 1.12rem; }
    .skill-name { display: none; }
    .profile-pet-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
    .profile-pet-tile { min-height: 52px; }
    .profile-pet-icon {
      width: 30px;
      height: 30px;
    }
    .profile-pet-icon img {
      max-width: 28px;
      max-height: 28px;
    }
    .profile-lb-cards { grid-template-columns: 1fr; }
    .profile-lb-row {
      grid-template-columns: 2rem minmax(0, 1fr) auto;
      padding: 0.42rem;
    }
    .collection-main { align-items: flex-start; }
    .collection-grid { grid-template-columns: 1fr; }
    .raid-highlight-main {
      grid-template-columns: 86px minmax(0, 1fr);
      gap: 0.75rem;
    }
    .raid-icon.raid-icon-large {
      width: 84px;
      height: 84px;
    }
    .raid-icon.raid-icon-large img {
      width: 78px;
      height: 78px;
    }
    .raid-kc { font-size: 1.48rem; }
    .raid-row {
      grid-template-columns: 32px minmax(0, 1fr);
      gap: 0.58rem;
      padding: 0.58rem;
    }
    .raid-icon {
      width: 32px;
      height: 32px;
    }
    .raid-icon img {
      max-width: 29px;
      max-height: 29px;
    }
    .raid-row-head {
      align-items: flex-start;
      gap: 0.55rem;
    }
    .raid-row-title {
      flex-wrap: wrap;
      row-gap: 0.22rem;
    }
    .raid-row-head strong { font-size: 0.68rem; }
  }
