:root {
    --gold:          #c9a84c;
    --gold-light:    #e8c96a;
    --gold-dim:      #7a6030;
    --gold-faint:    rgba(201,168,76,0.15);
    --shin-blue:     #3a7bd5;
    --shin-blue-dim: rgba(58,123,213,0.25);
    --shin-blue-glow:rgba(58,123,213,0.12);
    --green:         #4caf7d;
    --green-dim:     rgba(76,175,125,0.3);
    --red:           #d53a3a;
    --red-dim:       rgba(213,58,58,0.3);
    --bg-deep:       #030508;
    --bg-dark:       #07090f;
    --bg-panel:      #0b0e17;
    --bg-card:       #0f1220;
    --bg-row:        #0d101a;
    --bg-row-alt:    #0a0d15;
    --text-main:     #c8bfa0;
    --text-bright:   #e8dfc0;
    --text-dim:      #706858;
    --text-muted:    #4a4535;
    --border:        rgba(201,168,76,0.18);
    --border-mid:    rgba(201,168,76,0.35);
    --border-bright: rgba(201,168,76,0.6);
    --header-h:      rgba(58,123,213,0.08);
  }

  *, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

  body {
    background: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
  }

  /* Ambient background */
  body::before {
    content: '';
    position: fixed; inset: 0;
    background:
      radial-gradient(ellipse 60% 50% at 15% 0%, rgba(58,123,213,0.07) 0%, transparent 60%),
      radial-gradient(ellipse 50% 60% at 85% 100%, rgba(58,123,213,0.05) 0%, transparent 60%),
      repeating-linear-gradient(0deg,   transparent, transparent 80px, rgba(201,168,76,0.012) 80px, rgba(201,168,76,0.012) 81px),
      repeating-linear-gradient(90deg,  transparent, transparent 80px, rgba(201,168,76,0.012) 80px, rgba(201,168,76,0.012) 81px);
    pointer-events: none;
    z-index: 0;
  }

  /* Particles */
  .particles { position:fixed; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
  .particle  { position:absolute; width:2px; border-radius:50%; animation:fall linear infinite; opacity:0; }
  @keyframes fall {
    0%   { transform:translateY(-20px); opacity:0; }
    10%  { opacity:0.8; }
    90%  { opacity:0.2; }
    100% { transform:translateY(110vh); opacity:0; }
  }

  /* ── OUTER SHELL (mimics the site's outer grey wrapper) ── */
  .outer-shell {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 0 40px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  /* ═══════════════════════════════════════════
     HEADER
  ═══════════════════════════════════════════ */
  .site-header {
    width: 100%;
    background: linear-gradient(180deg, #07090f 0%, #0b0e17 100%);
    border-bottom: 1px solid var(--border-mid);
    position: relative;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    min-height: 90px;
  }
  .site-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--shin-blue), var(--gold-dim), var(--shin-blue), transparent);
    box-shadow: 0 0 8px var(--shin-blue);
  }

  /* Character image slot */
  .header-char {
    width: 90px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    overflow: hidden;
  }
  .header-char::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(58,123,213,0.08));
  }
  .header-char-img {
    width: 80px;
    height: 82px;
    object-fit: cover;
    object-position: top;
    display: block;
    filter: drop-shadow(0 0 10px rgba(58,123,213,0.4));
  }
  /* Placeholder silhouette */
  .header-char-ph {
    width: 80px; height: 82px;
    display: flex; align-items: center; justify-content: center;
    font-size: 52px;
    color: rgba(58,123,213,0.25);
    filter: drop-shadow(0 0 12px rgba(58,123,213,0.3));
  }

  /* Logo area */
  .header-logo {
    width: 130px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-right: 1px solid var(--border);
    position: relative;
  }
  .logo-text {
    font-family: 'Cinzel Decorative', serif;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(180deg, #f0e6c8, var(--gold), #8a6a20);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(201,168,76,0.4));
    text-align: center;
    line-height: 1.2;
  }
  .logo-sep {
    font-size: 10px;
    color: var(--gold-dim);
    text-align: center;
    letter-spacing: 4px;
    font-family: 'Cinzel', serif;
    margin-top: 2px;
  }

  /* Login form area */
 .header-login {
   flex: 1;
   display: flex; align-items: center; justify-content: center;
   padding: 0 24px; gap: 16px; flex-wrap: wrap;
 }
 .login-label {
   font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 2px;
   color: var(--text-dim); text-transform: uppercase; flex-basis: 100%;
   text-align: center; margin-bottom: -8px;
 }
 .login-input {
   background: rgba(0,0,0,0.5);
   border: 1px solid var(--border);
   color: var(--text-bright);
   font-family: 'Crimson Pro', serif; font-size: 13px;
   padding: 7px 12px;
   outline: none;
   width: 160px;
   transition: border-color 0.25s, box-shadow 0.25s;
 }
 .login-input:focus {
   border-color: rgba(58,123,213,0.5);
   box-shadow: 0 0 8px rgba(58,123,213,0.2);
 }
 .login-input::placeholder { color: var(--text-muted); }

 .btn-login {
   padding: 7px 22px;
   font-family: 'Cinzel', serif; font-size: 10px; font-weight: 700; letter-spacing: 2px;
   text-transform: uppercase;
   color: var(--gold); background: rgba(201,168,76,0.1);
   border: 1px solid rgba(201,168,76,0.4);
   cursor: pointer; position: relative; overflow: hidden;
   transition: all 0.3s;
 }
 .btn-login::before {
   content: ''; position: absolute; inset: 0;
   background: linear-gradient(90deg, transparent, rgba(201,168,76,0.15), transparent);
   transform: translateX(-100%); transition: transform 0.4s;
 }
 .btn-login:hover::before { transform: translateX(100%); }
 .btn-login:hover { color: var(--gold-light); border-color: var(--border-bright); box-shadow: 0 0 12px rgba(201,168,76,0.2); }

 /* Register link in header */
 .header-register {
   padding: 0 20px; flex-shrink: 0;
   display: flex; flex-direction: column; align-items: center; justify-content: center;
   border-left: 1px solid var(--border); gap: 5px;
 }
 .header-register-text {
   font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 1.5px; color: var(--text-dim);
   text-transform: uppercase;
 }
 .header-register a {
   font-family: 'Cinzel', serif; font-size: 10px; letter-spacing: 1px;
   color: var(--shin-blue); text-decoration: none;
   border: 1px solid rgba(58,123,213,0.3); padding: 4px 12px;
   transition: all 0.25s;
 }
 .header-register a:hover { color: #7ab0f0; border-color: rgba(58,123,213,0.6); background: rgba(58,123,213,0.08); }

  /* Nav */
  .header-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 20px;
    gap: 6px;
  }
  .nav-main {
    /*display: flex;*/
    text-align: center;
    flex-wrap: wrap;
    gap: 4px 0;
    align-items: center;
    justify-content: center;
  }
  .nav-main a {
    color: var(--text-main);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 1px;
    padding: 2px 8px;
    transition: color 0.25s, text-shadow 0.25s;
    white-space: nowrap;
  }
  .nav-main a:hover {
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(201,168,76,0.5);
  }
  .nav-sep {
    color: var(--text-dim);
    font-size: 10px;
    padding: 0 2px;
    user-select: none;
  }
  .nav-admin {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
    align-items: center;
    justify-content: center;
  }
  .nav-admin a {
    color: var(--text-dim);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 1px;
    padding: 1px 6px;
    transition: color 0.25s;
  }
  .nav-admin a:hover { color: var(--gold); }
  .nav-admin .nav-sep { font-size: 8px; }

  /* Logout timer */
  .header-timer {
    display: flex;
    align-items: center;
    padding: 0 16px;
    flex-shrink: 0;
    border-left: 1px solid var(--border);
  }
  .timer-label {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.8;
  }
  .timer-val {
    display: block;
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(201,168,76,0.4);
    animation: timerBlink 1s step-end infinite;
  }
  @keyframes timerBlink {
    50% { opacity: 0.6; }
  }

  /* ═══════════════════════════════════════════
     BODY WRAPPER
  ═══════════════════════════════════════════ */
  .page-body {
    flex: 1;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* ══════════════════════════════════════
    FACTION CARDS  — flexible N-up grid
    Works cleanly with 2, 3, or 4 factions.
    To add a faction: copy a .faction-card
    block in the HTML and give it the right
    class (shin / hol / human / quincy).
 ══════════════════════════════════════ */

 /* Outer heading bar */
 .factions-header {
   padding: 14px 20px 0;
   display: flex; align-items: center; justify-content: center; gap: 14px;
 }
 .factions-header-line {
   flex: 1; height: 1px;
   background: linear-gradient(90deg, transparent, var(--border-mid));
 }
 .factions-header-line.right {
   background: linear-gradient(90deg, var(--border-mid), transparent);
 }
 .factions-header-text {
   font-family: 'Cinzel', serif; font-size: 10px; letter-spacing: 4px;
   color: var(--text-dim); text-transform: uppercase; white-space: nowrap;
 }

 /* The grid itself — auto-fills equally for any count */
 .factions-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
   gap: 0;
   position: relative;
 }

 /* Vertical dividers between cards */
 .faction-card + .faction-card {
   border-left: 1px solid var(--border);
 }

 /* Base card */
 .faction-card {
   position: relative; display: flex; flex-direction: column;
   align-items: center; padding: 26px 16px 22px; overflow: hidden;
   transition: transform 0.3s, box-shadow 0.3s;
 }
 .faction-card:hover { transform: translateY(-2px); }

 /* ── Per-faction colour tokens ── */

 /* Shinigami — steel blue */
 .faction-card.shin {
   background: linear-gradient(160deg, rgba(26,58,92,0.4) 0%, rgba(7,9,15,0.75) 100%);
   --fc:     58,123,213;
   --fc-hex: #7ab0f0;
 }
 /* Hollow — crimson */
 .faction-card.hol {
   background: linear-gradient(160deg, rgba(92,26,26,0.4) 0%, rgba(7,9,15,0.75) 100%);
   --fc:     213,58,58;
   --fc-hex: #f07a7a;
 }
 /* Human — warm amber */
 .faction-card.human {
   background: linear-gradient(160deg, rgba(92,72,20,0.4) 0%, rgba(7,9,15,0.75) 100%);
   --fc:     213,160,58;
   --fc-hex: #f0c87a;
 }
 /* Quincy — icy white-blue */
 .faction-card.quincy {
   background: linear-gradient(160deg, rgba(40,80,100,0.4) 0%, rgba(7,9,15,0.75) 100%);
   --fc:     120,210,240;
   --fc-hex: #a0e4f8;
 }

 /* Ambient glow per faction */
 .faction-card::before {
   content: ''; position: absolute; inset: 0; pointer-events: none;
   background: radial-gradient(ellipse 80% 60% at 50% 90%, rgba(var(--fc),0.1) 0%, transparent 70%);
 }

 /* Character image */
 .char-frame {
   width: 130px; height: 185px; position: relative; margin-bottom: 14px; flex-shrink: 0;
 }
 .char-ph {
   width: 100%; height: 100%;
   display: flex; align-items: center; justify-content: center;
   font-size: 72px; border: 1px solid rgba(var(--fc),0.25);
   background: rgba(0,0,0,0.4); position: relative;
   color: rgba(var(--fc),0.4);
 }
 .char-ph img { width:70%; height:70%; object-fit:cover; object-position:top; display:block; }

 /* Animated glow border on image */
 .char-frame::after {
   content: ''; position: absolute; inset: -3px; border-radius: 2px; pointer-events:none;
   animation: fcGlow 3s ease-in-out infinite;
 }
 @keyframes fcGlow {
   0%,100% { box-shadow: 0 0 8px rgba(var(--fc),0.2); }
   50%     { box-shadow: 0 0 22px rgba(var(--fc),0.55); }
 }

 /* "Coming Soon" badge for locked factions */
 .faction-card.locked {
   opacity: 0.55;
   pointer-events: none;
 }
 .coming-soon-badge {
   position: absolute; top: 12px; right: 12px;
   font-family: 'Cinzel', serif; font-size: 8px; letter-spacing: 2px;
   text-transform: uppercase; color: var(--gold-dim);
   border: 1px solid var(--gold-dim); padding: 3px 8px;
   background: rgba(0,0,0,0.5);
 }

 .faction-title {
   font-family: 'Cinzel Decorative', serif; font-size: 13px; font-weight: 700;
   letter-spacing: 2px; text-transform: uppercase; text-align: center; margin-bottom: 10px;
   color: var(--fc-hex);
   text-shadow: 0 0 12px rgba(var(--fc),0.4);
 }

 .faction-quote {
   font-size: 12px; font-style: italic; font-weight: 300; line-height: 1.65;
   text-align: center; color: var(--text-dim); max-width: 220px;
   margin-bottom: 18px; padding: 9px 12px;
   border-left: 2px solid rgba(var(--fc),0.3);
   border-right: 2px solid rgba(var(--fc),0.3);
   background: rgba(var(--fc),0.04);
   position: relative;
 }
 .faction-quote::before { content:'\201C'; font-size:20px; position:absolute; top:2px; left:5px; opacity:0.2; }
 .faction-quote::after  { content:'\201D'; font-size:20px; position:absolute; bottom:-4px; right:5px; opacity:0.2; }

 .btn-join {
   display: inline-block; padding: 8px 22px;
   font-family: 'Cinzel', serif; font-size: 10px; font-weight: 700; letter-spacing: 2.5px;
   text-transform: uppercase; text-decoration: none; border: 1px solid rgba(var(--fc),0.45);
   color: var(--fc-hex); background: rgba(var(--fc),0.08);
   box-shadow: 0 0 10px rgba(var(--fc),0.1);
   position: relative; overflow: hidden; transition: all 0.35s; cursor: pointer;
 }
 .btn-join::before {
   content: ''; position: absolute; inset: 0;
   background: linear-gradient(90deg, transparent, rgba(var(--fc),0.25), transparent);
   transform: translateX(-101%); transition: transform 0.35s;
 }
 .btn-join:hover::before { transform: translateX(0); }
 .btn-join span { position: relative; z-index: 1; }
 .btn-join:hover {
   border-color: rgba(var(--fc),0.75);
   box-shadow: 0 0 18px rgba(var(--fc),0.35);
 }

 /* corner gems */
 .corner-gem {
   position: absolute; width: 7px; height: 7px;
   background: var(--gold-dim); box-shadow: 0 0 5px rgba(201,168,76,0.4);
   transform: rotate(45deg); z-index: 3;
 }
 .tl { top:-3px; left:-3px; } .tr { top:-3px; right:-3px; }
 .bl { bottom:-3px; left:-3px; } .br { bottom:-3px; right:-3px; }

 /* ══════════════════════════════════════
     ABOUT / DESCRIPTION SECTION
  ══════════════════════════════════════ */
  .about-body {
    padding: 24px 26px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 30px;
  }
  .about-col-title {
    font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 3px;
    text-transform: uppercase; color: var(--gold-dim);
    margin-bottom: 12px; padding-bottom: 6px;
    border-bottom: 1px solid rgba(201,168,76,0.12);
    display: flex; align-items: center; gap: 8px;
  }
  .about-col-title::before {
    content: ''; display: inline-block; width: 3px; height: 10px;
    background: linear-gradient(180deg, var(--shin-blue), var(--gold-dim)); flex-shrink:0;
  }
  .about-text {
    font-size: 14px; color: var(--text-main); line-height: 1.75;
  }
  .about-text p + p { margin-top: 10px; }
  .about-text strong { color: var(--text-bright); font-weight: 600; }
  .about-text em     { color: var(--gold); font-style: normal; }

  /* Feature pills */
  .feature-list {
    display: flex; flex-direction: column; gap: 8px; margin-top: 12px;
  }
  .feature-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border); background: rgba(0,0,0,0.2);
    transition: border-color 0.2s, background 0.2s;
  }
  .feature-item:hover { border-color: var(--border-mid); background: rgba(58,123,213,0.04); }
  .feature-icon { font-size: 16px; flex-shrink:0; margin-top:1px; }
  .feature-text { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
  .feature-text strong { color: var(--text-main); display:block; font-size:12px; margin-bottom:1px; }

  /* ══════════════════════════════════════
     NEWS + REGISTER  (two-column row)
  ══════════════════════════════════════ */
  .lower-grid {
    display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start;
  }

  /* News */
  .news-list { padding: 4px 0; }
  .news-item {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(201,168,76,0.08);
    transition: background 0.2s;
  }
  .news-item:last-child { border-bottom: none; }
  .news-item:hover { background: rgba(58,123,213,0.04); }

  .news-date {
    font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 2px;
    color: var(--gold-dim); text-transform: uppercase; margin-bottom: 4px;
    display: flex; align-items: center; gap: 8px;
  }
  .news-date::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, rgba(201,168,76,0.2), transparent);
  }
  .news-title {
    font-family: 'Cinzel', serif; font-size: 12px; font-weight: 600;
    color: var(--text-bright); margin-bottom: 5px;
  }
  .news-body {
    font-size: 13px; color: var(--text-dim); line-height: 1.6;
  }
  .news-tag {
    display: inline-block; margin-top: 6px;
    font-family: 'Cinzel', serif; font-size: 8px; letter-spacing: 1.5px;
    padding: 2px 8px; border: 1px solid;
    text-transform: uppercase;
  }
  .news-tag.update { color: #7ab0f0; border-color: rgba(58,123,213,0.35); }
  .news-tag.new    { color: #4caf7d; border-color: rgba(76,175,125,0.35); }
  .news-tag.event  { color: var(--gold); border-color: rgba(201,168,76,0.35); }

  /* Register panel */
  .register-panel {
    border: 1px solid var(--border); background: rgba(0,0,0,0.35);
    position: relative;
    box-shadow: 0 2px 20px rgba(0,0,0,0.6);
  }
  .register-panel::before {
    content: ''; position: absolute; top:0; left:0; right:0; height:1px;
    background: linear-gradient(90deg, transparent, var(--border-mid), transparent);
  }

  .register-body { padding: 22px 20px; display:flex; flex-direction:column; gap:14px; }

  .reg-intro {
    font-size: 13px; color: var(--text-dim); line-height: 1.6; font-style: italic;
    text-align: center; padding-bottom: 12px; border-bottom: 1px solid var(--border);
  }

  .reg-field { display: flex; flex-direction: column; gap: 5px; }
  .reg-label {
    font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 2px;
    color: var(--text-dim); text-transform: uppercase;
  }
  .reg-input {
    background: rgba(0,0,0,0.5); border: 1px solid var(--border);
    color: var(--text-bright); font-family: 'Crimson Pro', serif; font-size: 13px;
    padding: 8px 12px; outline: none; width: 100%;
    transition: border-color 0.25s, box-shadow 0.25s;
  }
  .reg-input:focus { border-color: rgba(58,123,213,0.5); box-shadow: 0 0 8px rgba(58,123,213,0.15); }
  .reg-input::placeholder { color: var(--text-muted); }

  /* Faction chooser */
  .faction-choose {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px;
  }
  .faction-radio { display: none; }
  .faction-label {
    display: flex; flex-direction: column; align-items: center;
    padding: 10px 8px; border: 1px solid var(--border);
    cursor: pointer; transition: all 0.25s; gap: 4px;
    background: rgba(0,0,0,0.3); position: relative;
  }
  .faction-label .fl-icon { font-size: 20px; }
  .faction-label .fl-name {
    font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--text-dim);
  }
  .faction-label .fl-soon {
    font-family: 'Cinzel', serif; font-size: 7px; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--gold-dim);
    border: 1px solid var(--gold-dim); padding: 1px 5px; margin-top: 2px;
  }
  .locked-pick { opacity: 0.45; cursor: not-allowed; }
  .faction-radio.shin-r:checked + .faction-label {
    border-color: rgba(58,123,213,0.6); background: rgba(58,123,213,0.1);
    box-shadow: 0 0 10px rgba(58,123,213,0.2);
  }
  .faction-radio.shin-r:checked + .faction-label .fl-name { color: #7ab0f0; }
  .faction-radio.hol-r:checked + .faction-label {
    border-color: rgba(213,58,58,0.6); background: rgba(213,58,58,0.1);
    box-shadow: 0 0 10px rgba(213,58,58,0.2);
  }
  .faction-radio.hol-r:checked + .faction-label .fl-name { color: #f07a7a; }
  .faction-label:not(.locked-pick):hover { border-color: var(--border-mid); }

  .btn-register {
    width: 100%; padding: 11px;
    font-family: 'Cinzel', serif; font-size: 11px; font-weight: 700; letter-spacing: 3px;
    text-transform: uppercase; color: var(--gold);
    background: rgba(201,168,76,0.1); border: 1px solid rgba(201,168,76,0.4);
    cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s;
  }
  .btn-register::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(201,168,76,0.15), transparent);
    transform: translateX(-100%); transition: transform 0.4s;
  }
  .btn-register:hover::before { transform: translateX(100%); }
  .btn-register:hover {
    color: var(--gold-light); border-color: var(--border-bright);
    box-shadow: 0 0 16px rgba(201,168,76,0.25);
  }

  .reg-login-row {
    text-align: center; font-size: 12px; color: var(--text-muted);
    padding-top: 4px;
  }
  .reg-login-row a {
    color: var(--shin-blue); text-decoration: none; transition: color 0.2s;
  }
  .reg-login-row a:hover { color: #7ab0f0; }

  /* ═══════════════════════════════════════════
     PANEL  (generic bordered block)
  ═══════════════════════════════════════════ */
  .panel {
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.35);
    position: relative;
    box-shadow: 0 2px 20px rgba(0,0,0,0.6), inset 0 0 40px rgba(0,0,0,0.3);
  }
  .panel::before, .panel::after {
    content: '';
    position: absolute;
    left: 0; right: 0; height: 1px;
  }
  .panel::before {
    top: 0;
    background: linear-gradient(90deg, transparent, var(--border-mid), transparent);
  }
  .panel::after {
    bottom: 0;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
  }

  /* Panel title bar */
  .panel-title {
    background: linear-gradient(90deg, rgba(58,123,213,0.15), rgba(58,123,213,0.06), rgba(58,123,213,0.02));
    border-bottom: 1px solid var(--border);
    padding: 7px 14px;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-light);
    text-shadow: 0 0 10px rgba(201,168,76,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .panel-title::before {
    content: '';
    display: inline-block;
    width: 4px; height: 14px;
    background: linear-gradient(180deg, var(--shin-blue), var(--gold));
    box-shadow: 0 0 6px var(--shin-blue);
    flex-shrink: 0;
  }

  /* ── STATS GRID (3-col inside Training panel) ── */
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 160px;
    border-bottom: 1px solid var(--border);
  }
  .stats-cell {
    padding: 14px 18px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .stats-cell:last-child { border-right: none; }
  .stat-line {
    font-size: 13px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .stat-label { color: var(--text-dim); font-size: 12px; }
  .stat-val   {
    color: var(--text-bright);
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 0 6px rgba(232,201,106,0.2);
  }
  .stat-name {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--gold);
    margin-bottom: 4px;
  }

  /* Sword skill area */
  .skill-area {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .skill-row { font-size: 12px; color: var(--text-dim); }
  .skill-row span { color: var(--text-main); }

  /* Character thumbnail */
  .char-thumb-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
  }
  .char-thumb {
    width: 100px; height: 100px;
    border: 1px solid var(--border-mid);
    background: linear-gradient(135deg, rgba(58,123,213,0.15), rgba(0,0,0,0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: rgba(58,123,213,0.4);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(58,123,213,0.15), inset 0 0 20px rgba(0,0,0,0.5);
    transition: box-shadow 0.3s;
  }
  .char-thumb:hover {
    box-shadow: 0 0 20px rgba(58,123,213,0.3), inset 0 0 20px rgba(0,0,0,0.3);
  }
  .char-thumb img { width:100%; height:100%; object-fit:cover; display:block; }

  /* Reiatsu bar row */
  .reiatsu-row {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .reiatsu-label {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-dim);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
  }
  .reiatsu-track {
    flex: 1;
    height: 10px;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
  }
  .reiatsu-fill {
    height: 100%;
    width: 35%; /* dynamic — set via inline style */
    background: linear-gradient(90deg, rgba(58,123,213,0.8), #7ab0f0, rgba(58,123,213,0.9));
    box-shadow: 0 0 8px rgba(58,123,213,0.6), 0 0 2px #fff inset;
    border-radius: 1px;
    position: relative;
    animation: reiatsuPulse 2.5s ease-in-out infinite;
  }
  @keyframes reiatsuPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(58,123,213,0.4); }
    50%       { box-shadow: 0 0 14px rgba(58,123,213,0.8), 0 0 4px rgba(122,176,240,0.6); }
  }
  .reiatsu-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    background: rgba(255,255,255,0.1);
    border-radius: 1px 1px 0 0;
  }
  .reiatsu-val {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    color: #7ab0f0;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ═══════════════════════════════════════════
     TABLE  (attributes & techniques)
  ═══════════════════════════════════════════ */
  .rpg-table {
    width: 100%;
    border-collapse: collapse;
  }
  .rpg-table thead tr {
    background: linear-gradient(90deg, rgba(58,123,213,0.15), rgba(58,123,213,0.05));
    border-bottom: 1px solid var(--border-mid);
  }
  .rpg-table thead th {
    padding: 9px 14px;
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    text-align: left;
    white-space: nowrap;
  }
  .rpg-table thead th:last-child { text-align: center; }

  .rpg-table tbody tr {
    border-bottom: 1px solid rgba(201,168,76,0.08);
    transition: background 0.25s;
  }
  .rpg-table tbody tr:nth-child(odd)  { background: rgba(11,14,23,0.6); }
  .rpg-table tbody tr:nth-child(even) { background: rgba(7,9,15,0.5); }
  .rpg-table tbody tr:hover           { background: rgba(58,123,213,0.07); }

  .rpg-table td {
    padding: 10px 14px;
    vertical-align: middle;
    font-size: 13px;
    color: var(--text-main);
  }

  /* Icon cell */
  .td-icon {
    width: 54px;
    padding: 8px 10px;
  }
  .icon-box {
    width: 44px; height: 44px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: rgba(58,123,213,0.5);
    transition: border-color 0.3s, box-shadow 0.3s;
    flex-shrink: 0;
  }
  tr:hover .icon-box {
    border-color: var(--border-mid);
    box-shadow: 0 0 8px rgba(58,123,213,0.2);
  }
  .icon-box img { width:100%; height:100%; object-fit:contain; display:block; }

  /* Description cell */
  .td-desc { color: var(--text-main); font-size: 13px; line-height: 1.5; }
  .td-desc .skill-name {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-bright);
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 2px;
  }
  .td-desc .skill-desc { color: var(--text-dim); font-size: 12px; }
  .td-desc .gain { font-size: 12px; }
  .gain-str   { color: #f08060; font-weight: 600; }
  .gain-int   { color: #60a8f0; font-weight: 600; }
  .gain-spd   { color: #60d090; font-weight: 600; }

  /* Time & Action cell */
  .td-action {
    text-align: center;
    white-space: nowrap;
    width: 130px;
  }
  .time-label { color: var(--text-dim); font-size: 11px; display:block; margin-bottom:5px; }

  .btn-train {
    display: inline-block;
    padding: 5px 14px;
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid rgba(58,123,213,0.45);
    color: #7ab0f0;
    background: rgba(58,123,213,0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
  }
  .btn-train-red {
    display: inline-block;
    padding: 5px 14px;
    font-family: 'Cinzel', serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid rgba(58,123,213,0.45);
    color: #990000;
    background: rgba(58,123,213,0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
  }
  .btn-train::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(58,123,213,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.4s;
  }
  .btn-train:hover::before { transform: translateX(100%); }
  .btn-train:hover {
    color: #c8deff;
    border-color: rgba(58,123,213,0.7);
    box-shadow: 0 0 12px rgba(58,123,213,0.3);
  }

  .unavailable {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-muted);
  }

  /* ══════════════════════════════════════
   CHAT TABLE
   — no alternating rows; posts are
     single-color with a clear divider
══════════════════════════════════════ */
  /* ── Tavern description bar ── */
  .tavern-desc {
    padding: 10px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    font-style: italic;
    background: rgba(0,0,0,0.2);
  }
.chat-table {
  width: 100%;
  border-collapse: collapse;
}

/* Column headers */
.chat-table thead tr {
  background: linear-gradient(90deg, rgba(58,123,213,0.12), rgba(58,123,213,0.04));
  border-bottom: 1px solid var(--border-mid);
}
.chat-table thead th {
  padding: 8px 14px;
  font-family: 'Cinzel', serif;
  font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold);
  text-align: left;
}
.chat-table thead th.th-msg { padding-left: 40px; }

/* ── Each post is ONE row, no striping ── */
.chat-table tbody tr.post-row {
  background: var(--bg-post);
  border-bottom: 1px solid rgba(201,168,76,0.1);
  transition: background 0.2s;
}
.chat-table tbody tr.post-row:hover {
  background: rgba(58,123,213,0.06);
}

/* User cell */
.td-user {
  width: 200px;
  padding: 12px 14px;
  vertical-align: top;
  border-right: 1px solid var(--border);
}
.post-username {
  font-family: 'Cinzel', serif;
  font-size: 12px; font-weight: 700;
  color: var(--name-color);
  text-shadow: 0 0 8px rgba(213,58,58,0.3);
  display: block;
  margin-bottom: 2px;
  text-decoration: none;
  transition: text-shadow 0.2s;
}
.post-username:hover { text-shadow: 0 0 14px rgba(213,58,58,0.6); }

.post-rank {
  font-size: 11px;
  color: var(--text-dim);
  display: block;
  margin-bottom: 8px;
  font-style: italic;
}

/* Action icons row */
.post-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.4);
  color: var(--text-dim);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  position: relative;
}
.action-btn:hover { border-color: var(--border-mid); color: var(--text-main); background: rgba(58,123,213,0.1); }
.action-btn.delete:hover { border-color: rgba(213,58,58,0.5); color: #f07a7a; background: rgba(213,58,58,0.1); }
.action-btn.warn:hover   { border-color: rgba(255,180,0,0.5); color: #ffcc44; background: rgba(255,180,0,0.1); }
.action-btn.mail:hover   { border-color: rgba(58,123,213,0.5); color: #7ab0f0; background: rgba(58,123,213,0.1); }

/* Message cell */
.td-msg {
  padding: 14px 18px;
  vertical-align: middle;
  font-size: 14px;
  color: var(--text-bright);
  line-height: 1.6;
}

/* ── Pagination ── */
.pagination-row td {
  padding: 12px 16px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}
.pagination-row a {
  font-family: 'Cinzel', serif;
  font-size: 11px; letter-spacing: 1px;
  color: var(--shin-blue);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(58,123,213,0.25);
  transition: all 0.2s;
}
.pagination-row a:hover {
  color: #7ab0f0;
  border-color: rgba(58,123,213,0.5);
  background: rgba(58,123,213,0.08);
}
.pagination-sep { color: var(--text-muted); margin: 0 8px; font-size: 11px; }

/* ══════════════════════════════════════
   POST NEW MESSAGE
══════════════════════════════════════ */
.post-form-panel {
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.35);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}
.post-form-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-mid), transparent);
}
.post-form-label {
  font-family: 'Cinzel', serif;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-dim);
}
.post-textarea {
  width: 100%;
  max-width: 500px;
  min-height: 60px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  color: var(--text-bright);
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 14px;
  padding: 10px 12px;
  resize: vertical;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.post-textarea:focus {
  border-color: rgba(58,123,213,0.5);
  box-shadow: 0 0 10px rgba(58,123,213,0.15);
}
.post-textarea::placeholder { color: var(--text-muted); }

.btn-post {
  padding: 8px 30px;
  font-family: 'Cinzel', serif;
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.35);
  cursor: pointer;
  position: relative; overflow: hidden;
  transition: all 0.3s;
}
.btn-post::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.4s;
}
.btn-post:hover::before { transform: translateX(100%); }
.btn-post:hover {
  color: var(--gold-light);
  border-color: rgba(201,168,76,0.6);
  box-shadow: 0 0 14px rgba(201,168,76,0.2);
}

  /* ═══════════════════════════════════════════
     FOOTER
  ═══════════════════════════════════════════ */
  .site-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 10px;
    position: relative;
  }
  .site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), var(--gold), var(--gold-dim), transparent);
  }
  .footer-links { display:flex; justify-content:center; gap:14px; margin-bottom:8px; }
  .footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s;
  }
  .footer-links a:hover { color: var(--gold); }
  .footer-copy { font-size: 11px; color: var(--text-dim); line-height: 1.9; }
  .footer-copy a { color: var(--gold-dim); text-decoration: none; }
  .footer-copy a:hover { color: var(--gold); }
  .footer-copy strong { color: var(--text-main); }

  /* ── responsive ── */
  @media (max-width:640px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .char-thumb-cell { display:none; }
    .site-header { flex-wrap: wrap; }
    .header-timer { border-left:none; border-top:1px solid var(--border); width:100%; justify-content:center; padding:6px; }
  }
