:root{
  --wp-bg:#1a1314;
  --wp-surface:rgba(61,40,41,.88);
  --wp-surface-2:rgba(61,40,41,.78);
  --wp-border:rgba(99,75,76,.9);
  --wp-text:#8a7367;
  --wp-text-strong:#d9c7b0;
  --wp-accent:#caa36b;
  --wp-accent-2:#b9873f;
  --radius:10px;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:var(--wp-text);
  background:var(--wp-bg);
}

.hr-brown {
    border: 0;
    border-top: 2px solid #6c482c;
    margin: 12px 0;
    opacity: 1;
}

/* Background layers */
.site-bg{
  position:fixed;
  inset:0;
  background-position:center top;
  background-repeat:no-repeat;
  background-size:cover;
  background-attachment:fixed;
  filter:saturate(1.02) contrast(1.02);
  z-index:-3;
}
.site-overlay{
  position:fixed;
  inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.78));
  z-index:-2;
}

/* Topbar -> Zerath header */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid rgba(99,75,76,.65);
  background:rgba(26,19,20,.45);
  backdrop-filter:saturate(140%) blur(6px);
}

.topbar-title{
  flex:1 1 100%;
}
.brand{
  display:inline-flex;
  align-items:flex-start;
  flex-direction:column;
  gap:12px;
  text-decoration:none;
  font-family:Cinzel,serif;
  font-weight:800;
  letter-spacing:.6px;
  color:var(--wp-text-strong);
  font-size:18px;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
  line-height:1.05;
  position:relative;
  padding-left:50px;
}
.brand::before{
  content:"";
  position:absolute;
  left:0;
  top:2px;
  width:36px;
  height:36px;
  border-radius:10px;
  background: var(--l2z-logo-url) center/contain no-repeat;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.45));
}
.brand-main{
  display:block;
}
.brand-sub{
  display:block;
  font-size:14px;
  letter-spacing:.45px;
  opacity:.9;
}

.nav-toggle{
  display:none;
  margin-left:auto;
  width:46px;
  height:46px;
  padding:0;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  cursor:pointer;
}
.nav-toggle span{
  display:block;
  width:20px;
  height:2px;
  margin:5px auto;
  border-radius:999px;
  background:var(--wp-text-strong);
  transition:transform .2s ease, opacity .2s ease;
}
.topbar.menu-open .nav-toggle span:nth-child(1){
  transform:translateY(7px) rotate(45deg);
}
.topbar.menu-open .nav-toggle span:nth-child(2){
  opacity:0;
}
.topbar.menu-open .nav-toggle span:nth-child(3){
  transform:translateY(-7px) rotate(-45deg);
}

.nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-start;
  flex:1 1 auto;
}
.nav a,
.nav-link-summary{
  color:var(--wp-text);
  text-decoration:none;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.10);
}
.nav a:hover,
.nav-link-summary:hover{
  color:var(--wp-text-strong);
  border-color: rgba(202,163,107,.45);
  background: rgba(202,163,107,.12);
}

.nav a:hover,
.nav a.is-active,
.nav-dropdown.is-active > .nav-link-summary{
  color: var(--wp-text-strong);
  border-color: rgba(202,163,107,.45);
  background: rgba(202,163,107,.12);
}
.nav-dropdown{
  position:relative;
}
.nav-dropdown summary{
  list-style:none;
  cursor:pointer;
}
.nav-dropdown summary::-webkit-details-marker{
  display:none;
}
.nav-link-summary{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.nav-link-summary::after{
  content:"";
  width:8px;
  height:8px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg) translateY(-1px);
  transition:transform .2s ease;
}
.nav-dropdown[open] > .nav-link-summary::after{
  transform:rotate(-135deg) translateY(-1px);
}
.nav-dropdown.admin-menu > .nav-link-summary{
  color:#ff00ff;
  border-color: rgba(255,0,255,.55);
  background: rgba(255,0,255,.14);
}
.nav-dropdown.admin-menu > .nav-link-summary:hover,
.nav-dropdown.admin-menu.is-active > .nav-link-summary,
.nav-dropdown.admin-menu[open] > .nav-link-summary{
  color:#ff00ff;
  border-color: rgba(255,0,255,.9);
  background: rgba(255,0,255,.22);
}
.nav-submenu{
  position:absolute;
  top:calc(100% + 10px);
  left:0;
  min-width:240px;
  display:grid;
  gap:6px;
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(18,13,14,.96);
  box-shadow:0 24px 70px rgba(0,0,0,.55);
}
.nav-submenu-group{
  margin-top:6px;
  color:var(--wp-text-strong);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.nav-submenu-group:first-child{
  margin-top:0;
}
.nav-sublink{
  display:block;
  padding:10px 12px;
  border-radius:12px;
  color:var(--wp-text);
  text-decoration:none;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
}
.nav-sublink:hover{
  color:var(--wp-text-strong);
  border-color:rgba(202,163,107,.45);
  background:rgba(202,163,107,.12);
}

.nav a[href$="/logout.php"]{
  color:#ffd6d6;
  border-color: rgba(220,38,38,.55);
  background: rgba(220,38,38,.12);
}
.nav a[href$="/logout.php"]:hover{
  color:#fff;
  border-color: rgba(220,38,38,.85);
  background: rgba(220,38,38,.22);
}

.nav a[href$="https://l2.zerath.eu/"]{
  color:#FFD700;
  border-color: rgba(202,163,107,.55);
  background: rgba(202,163,107,.12);
}
.nav a[href$="https://l2.zerath.eu/"]:hover{
  color:#FFD700;
  border-color: rgba(202,163,107,.85);
  background: rgba(202,163,107,.22);
}

.langs{display:flex; gap:8px; align-items:center; justify-content:flex-end}
.topbar-right{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.lang{
  display:inline-flex; gap:6px; align-items:center;
  padding:7px 9px; border-radius:999px;
  text-decoration:none; color:var(--wp-text);
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
}
.lang:hover{color:var(--wp-text-strong); border-color: rgba(202,163,107,.45); background: rgba(202,163,107,.10)}
.lang.active{color:var(--wp-text-strong); border-color: rgba(202,163,107,.65); background: rgba(202,163,107,.14)}
.lang img{width:18px; height:12px; border-radius:3px; display:block}

/* Layout */
.wrap{
  min-height:calc(100% - 70px);
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:28px 16px 38px;
}
.card{
  width:min(1080px, 100%);
  background:var(--wp-surface);
  border:1px solid var(--wp-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:22px;
}
.card-inner{
  background: rgba(0,0,0,.10);
  border-radius: calc(var(--radius) - 2px);
  padding:18px;
  border:1px solid rgba(255,255,255,.08);
}

/* Grid */
.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
}
@media (max-width: 860px){ .grid{grid-template-columns:1fr} }

/* Typography */
.h1{font-size:20px; margin:0 0 10px; color:var(--wp-text-strong); font-family:Cinzel,serif}
.section-title{font-size:15px; margin:0 0 10px; font-weight:800; color:var(--wp-text-strong); font-family:Cinzel,serif}
.p{margin:0 0 10px; color:var(--wp-text)}
.small{font-size:12px; color:rgba(217,199,176,.75)}

/* Forms */
.form-row{display:flex; flex-direction:column; gap:6px; margin-bottom:10px}
label{font-size:13px; color:rgba(217,199,176,.85)}
input, select{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.14);
  outline:none;
  font-size:14px;
  background: rgba(0,0,0,.18);
  color: var(--wp-text-strong);
}
input:focus, select:focus{
  border-color: rgba(202,163,107,.65);
  box-shadow: 0 0 0 3px rgba(202,163,107,.18);
}
input::placeholder{color: rgba(217,199,176,.55)}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(202,163,107,.18);
  color:var(--wp-text-strong);
  font-weight:800;
  cursor:pointer;
  text-decoration:none;
}
.btn:hover{background: rgba(202,163,107,.26); border-color: rgba(202,163,107,.5)}
.btn.secondary{background: rgba(0,0,0,.14); color:var(--wp-text); border:1px solid rgba(255,255,255,.10)}
.btn.secondary:hover{background: rgba(202,163,107,.14); color:var(--wp-text-strong); border-color: rgba(202,163,107,.45)}
.btn:disabled{opacity:.6; cursor:not-allowed}

.hr{height:1px; background:rgba(255,255,255,.10); margin:12px 0}

/* Messages */
.msg{padding:10px 12px; border-radius:12px; margin:0 0 12px; border:1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.18)}
.msg.ok{border-color: rgba(88, 170, 120, .55)}
.msg.err{border-color: rgba(210, 82, 82, .65)}

/* Tables / lists (if used) */
table{width:100%; border-collapse:collapse}
th,td{padding:10px 10px; border-bottom:1px solid rgba(255,255,255,.10); text-align:left}
th{color:var(--wp-text-strong); font-family:Cinzel,serif; font-weight:800}

/* Footer */
.footer{
  padding:18px 16px 26px;
  display:flex;
  justify-content:center;
}


/* ===== Page titles ===== */
.page-title{
  margin: 0 0 14px;
  font-family: Cinzel, serif;
  font-weight: 800;
  letter-spacing: .4px;
  color: var(--wp-text-strong);
  font-size: 28px;
}

/* ===== Key/Value grid (Profile) ===== */
.kv{
  display:grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 12px;
  align-items:center;
  padding: 10px 0 2px;
}
.kv .k{
  color: rgba(217,199,176,.72);
  font-size: 13px;
}
.kv .v{
  color: var(--wp-text-strong);
  font-size: 14px;
  word-break: break-word;
}

/* ===== Alerts (Donate result, general notices) ===== */
.alert{
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  color: var(--wp-text-strong);
  margin: 12px 0;
}
.alert.ok{ border-color: rgba(88, 170, 120, .60); }
.alert.error{ border-color: rgba(210, 82, 82, .70); }

/* ===== Donate page layout ===== */
.donate-wrap{
  display:flex;
  justify-content:center;
}
.donate-card{
  width: min(980px, 100%);
  background: rgba(0,0,0,.10);
  border-radius: calc(var(--radius) - 2px);
  padding: 18px;
  border: 1px solid rgba(255,255,255,.08);
}
.donate-info{ margin-bottom: 10px; }
.donate-lead{
  font-family: Cinzel, serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--wp-text-strong);
  margin-bottom: 6px;
}
.donate-note{
  color: rgba(217,199,176,.70);
  font-size: 13px;
  line-height: 1.45;
}
/*.donate-amounts{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  margin: 10px 0 8px;
}*/
.pill{
  appearance:none;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--wp-text-strong);
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 800;
  cursor:pointer;
}
.pill:hover{ border-color: rgba(202,163,107,.55); background: rgba(202,163,107,.12); }
.pill.active{
  border-color: rgba(202,163,107,.75);
  background: rgba(202,163,107,.18);
  box-shadow: 0 0 0 3px rgba(202,163,107,.12);
}
.donate-selected{
  color: rgba(217,199,176,.78);
  font-size: 13px;
  margin: 8px 0 12px;
}
.muted{ color: rgba(217,199,176,.62); }

.paypal-box{
  /* border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
  border-radius: 14px;
  padding: 12px;
  margin-top: 10px; */
  max-width:420px; 
  margin: 0 auto; 
}

.donate-amounts{
  display:flex;
  flex-wrap:wrap;
  justify-content:center; /* centrování buttonů */
  gap: 10px;
}

.donate-result{ margin-top: 10px; }
.donate-foot{
  margin-top: 10px;
  color: rgba(217,199,176,.60);
  font-size: 12px;
  line-height: 1.45;
}

/* ===== Dashboard grid helpers ===== */
.span-2{ grid-column: 1 / -1; }

/* ===== Tables ===== */
.table-wrap{
  overflow:auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
}
.table-wrap table{ min-width: 640px; }
.badge{
  display:inline-flex;
  align-items:center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.12);
  border-color: rgba(210, 82, 82, .65); color: rgba(255, 215, 215, .92);
}
.badge.ok{ border-color: rgba(88, 170, 120, .55); color: rgba(195, 238, 210, .92); }
.badge.warn{ border-color: rgba(202,163,107,.55); color: rgba(217,199,176,.92); }
.badge.err{ border-color: rgba(210, 82, 82, .65); color: rgba(255, 215, 215, .92); }

@media (max-width: 640px){
  .page-title{ font-size: 24px; }
  .kv{ grid-template-columns: 120px 1fr; }
  .donate-card{ padding: 14px; }
  .paypal-box{ padding: 10px; }
}


/* --- Info page helpers --- */
.brand.brand-static { cursor: default; }
.panel{
  background: rgba(20, 15, 16, .36);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 16px;
}
.panel-title{
  font-family: Cinzel, serif;
  letter-spacing: .4px;
  color: rgba(255,255,255,.92);
  font-weight: 700;
  margin-bottom: 10px;
}
.list{
  margin: 0;
  padding-left: 18px;
}
.list li{ margin: 8px 0; color: rgba(255,255,255,.82); }
.chips{ display:flex; flex-wrap:wrap; gap:10px; margin-top: 8px; }
.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(202,163,107,.14);
  color: rgba(255,255,255,.90);
  text-decoration:none;
  font-weight: 700;
}
.chip:hover{ background: rgba(202,163,107,.22); }

/* If user is not logged in, keep header compact */
.topbar.no-nav { justify-content: space-between; }


/* Full width card inside grid */
.card-inner.full{ grid-column: 1 / -1; }

/* Characters */
.char-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.char-card{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.char-avatar{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.14);
  flex: 0 0 auto;
}
.char-meta{ flex:1; min-width: 0; }
.char-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.char-name{
  font-weight: 800;
  letter-spacing: .2px;
  color: rgba(255,255,255,.92);
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.char-sub{
  display:grid;
  gap: 4px;
  color: rgba(255,255,255,.86);
  font-size: 13px;
}
.char-title-text{
  color:#8a7367;
}
.char-clan-inline{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.char-crest{
  display:inline-block;
  object-fit:contain;
  vertical-align:middle;
}
.char-crest.ally{
  width:8px;
  height:12px;
}
.char-crest.clan{
  width:16px;
  height:12px;
}
.char-nobless-yes{
  color:#58aa78;
}
.char-nobless-no{
  color:#d25252;
}

/* === Header: Server status popover === */
.topbar-right{display:flex; align-items:center; gap:10px; margin-left:auto;}
.install-app-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(202,163,107,.55);
  background:rgba(202,163,107,.16);
  color:var(--wp-text-strong);
  cursor:pointer;
  font-weight:800;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}
.install-app-btn:hover{
  background:rgba(202,163,107,.26);
  border-color:rgba(202,163,107,.8);
}
.install-app-btn[hidden]{display:none !important;}
.install-app-btn:disabled{
  opacity:.75;
  cursor:default;
}
.status-pop{position:relative;}
.status-pop > summary{list-style:none;}
.status-pop > summary::-webkit-details-marker{display:none;}

.status-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--wp-text);
  cursor:pointer;
  user-select:none;
  font-weight:700;
}
.status-pill:hover{ background: rgba(0,0,0,.26); }
.status-label{font-size:12px; opacity:.9;}
.status-num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:26px;
  height:20px;
  padding:0 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(202,163,107,.14);
  color: var(--wp-text-strong);
  font-size:12px;
}
.st-dot{width:10px;height:10px;border-radius:999px;box-shadow:0 0 0 3px rgba(0,0,0,.22) inset;}
.st-dot.ok{background:#16a34a;}
.st-dot.bad{background:#dc2626;}

.status-card{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  min-width:280px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(18,13,14,.92);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
  z-index:100;
}
.status-table{width:100%; border-collapse:collapse; font-size:13px;}
.status-table td{padding:6px 8px; border-bottom:1px solid rgba(255,255,255,.08);}
.status-table tr:last-child td{border-bottom:none;}
.st-badge{
  display:inline-block;
  padding:3px 8px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
  border:1px solid rgba(255,255,255,.12);
}
.st-ok{ color:#16a34a; background: rgba(22,163,74,.12); }
.st-bad{ color:#dc2626; background: rgba(220,38,38,.10); }
.st-num{ color: var(--wp-text-strong); font-weight:900; }

.stats-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.stats-subtitle{
  max-width:720px;
  line-height:1.5;
}
.stats-active-chip{
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(202,163,107,.45);
  background:rgba(202,163,107,.12);
  color:var(--wp-text-strong);
  font-weight:800;
}
.stats-groups{
  display:grid;
  gap:12px;
  margin-bottom:18px;
}
.stats-group{
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background:rgba(0,0,0,.14);
  overflow:hidden;
}
.stats-group summary{
  list-style:none;
  cursor:pointer;
  padding:14px 16px;
  font-family:Cinzel,serif;
  font-weight:700;
  color:var(--wp-text-strong);
}
.stats-group summary::-webkit-details-marker{
  display:none;
}
.stats-links{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:10px;
  padding:0 16px 16px;
}
.stats-link{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:12px 14px;
  border-radius:14px;
  text-decoration:none;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  color:var(--wp-text);
}
.stats-link span{
  color:var(--wp-text-strong);
  font-weight:700;
}
.stats-link small{
  color:rgba(217,199,176,.72);
}
.stats-link.is-active,
.stats-link:hover{
  border-color:rgba(202,163,107,.45);
  background:rgba(202,163,107,.12);
}
.stats-panel{
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background:rgba(0,0,0,.14);
  padding:18px;
}
.stats-panel-copy{
  margin-bottom:14px;
}
.stats-table-wrap{
  background:rgba(0,0,0,.18);
}
.stats-table td{
  vertical-align:middle;
}
.stats-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:84px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  font-size:12px;
  font-weight:800;
}
.stats-status-badge.online{
  color:#c3eed2;
  border-color:rgba(88,170,120,.55);
  background:rgba(88,170,120,.14);
}
.stats-status-badge.offline{
  color:#ffd7d7;
  border-color:rgba(210,82,82,.65);
  background:rgba(210,82,82,.14);
}
.stats-rank-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:34px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:var(--wp-text-strong);
  font-weight:900;
}
.stats-rank-1 .stats-rank-badge{
  background:rgba(202,163,107,.25);
}
.stats-rank-2 .stats-rank-badge{
  background:rgba(255,255,255,.12);
}
.stats-rank-3 .stats-rank-badge{
  background:rgba(146,101,62,.25);
}
.stats-clan-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  color:var(--wp-text-strong);
}
.stats-crests{
  display:inline-flex;
  align-items:center;
  gap:0;
  line-height:1;
}
.stats-crest{
  display:inline-block;
  vertical-align:middle;
  object-fit:contain;
}
.stats-crest.ally{
  width:8px;
  height:12px;
}
.stats-crest.clan{
  width:16px;
  height:12px;
}
.stats-castles{
  display:grid;
  gap:16px;
}
.stats-castle-card{
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background:rgba(255,255,255,.03);
  padding:16px;
}
.stats-castle-image{
  display:block;
  width:100%;
  height:220px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  margin-bottom:14px;
}
.stats-castle-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
}
.stats-castle-item{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.16);
}
.stats-castle-label{
  font-size:12px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:rgba(217,199,176,.65);
  margin-bottom:6px;
}
.stats-castle-value{
  color:var(--wp-text-strong);
  line-height:1.55;
  word-break:break-word;
}
.stats-ward-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.stats-ward-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}
.stats-ward-icon{
  width:22px;
  height:22px;
  border-radius:6px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.10);
}
.stats-bosses{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:14px;
}
.stats-boss-card{
  display:flex;
  align-items:center;
  gap:14px;
  min-height:116px;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.035);
}
.stats-boss-avatar{
  width:86px;
  height:86px;
  flex:0 0 86px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid rgba(202,163,107,.28);
  background:rgba(0,0,0,.24);
}
.stats-boss-body{
  min-width:0;
  display:grid;
  gap:7px;
}
.stats-boss-title{
  color:var(--wp-text-strong);
  font-family:Cinzel,serif;
  font-weight:800;
  font-size:17px;
}
.stats-boss-meta{
  color:rgba(217,199,176,.62);
  font-size:12px;
  font-weight:700;
}
.stats-boss-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.stats-boss-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:74px;
  padding:6px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  border:1px solid rgba(255,255,255,.12);
}
.stats-boss-status.alive{
  color:#c3eed2;
  border-color:rgba(88,170,120,.55);
  background:rgba(88,170,120,.14);
}
.stats-boss-status.dead{
  color:#ffd7d7;
  border-color:rgba(210,82,82,.65);
  background:rgba(210,82,82,.14);
}
.stats-boss-respawn{
  color:rgba(217,199,176,.78);
  font-size:13px;
  line-height:1.35;
}
.stats-tooltip{
  position:absolute;
  z-index:1000;
  max-width:340px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(18,13,14,.96);
  box-shadow:0 24px 70px rgba(0,0,0,.55);
}
.stats-tooltip-card{
  display:grid;
  gap:6px;
  font-size:13px;
  line-height:1.45;
}
.stats-tooltip-title{
  color:var(--wp-text-strong);
  font-weight:800;
  font-family:Cinzel,serif;
}
.stats-tooltip-title .stats-crest{
  margin-right:4px;
}
.stats-skill-list{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}
.stats-skill-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 8px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:var(--wp-text-strong);
  font-size:12px;
  line-height:1.2;
  max-width:100%;
}
.stats-skill-icon{
  width:18px;
  height:18px;
  border-radius:6px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.18);
}

@media (max-width: 860px){
  .topbar{
    align-items:center;
  }
  .nav-toggle{
    display:inline-block;
  }
  .nav{
    display:none;
    width:100%;
    order:3;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    padding-top:8px;
  }
  .topbar.menu-open .nav{
    display:flex;
  }
  .nav a{
    width:100%;
    border-radius:14px;
    text-align:left;
  }
  .nav-dropdown{
    width:100%;
  }
  .nav-link-summary{
    width:100%;
    justify-content:space-between;
  }
  .nav-submenu{
    position:static;
    min-width:0;
    margin-top:8px;
    padding:10px;
    box-shadow:none;
  }
  .topbar-right{
    display:none;
    width:100%;
    order:4;
    flex-direction:column;
    flex-wrap:wrap;
    justify-content:flex-start;
    gap:12px;
    padding-top:8px;
  }
  .topbar.menu-open .topbar-right{
    display:flex;
  }
  .status-pop,
  .status-pop > summary,
  .install-app-btn{
    width:100%;
  }
  .status-pill{
    width:100%;
    justify-content:space-between;
  }
  .status-card{
    position:static;
    min-width:0;
    margin-top:10px;
  }
  .langs{
    flex-wrap:wrap;
    justify-content:flex-start;
  }
  .stats-hero{
    flex-direction:column;
  }
  .stats-links,
  .stats-castle-grid{
    grid-template-columns:1fr;
  }
  .stats-tooltip{
    display:none !important;
  }
}

textarea{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.14);
  outline:none;
  font-size:14px;
  background: rgba(0,0,0,.18);
  color: var(--wp-text-strong);
  resize:vertical;
  min-height:90px;
}
textarea:focus{
  border-color: rgba(202,163,107,.65);
  box-shadow: 0 0 0 3px rgba(202,163,107,.18);
}
.ticket-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:14px;
}
.ticket-filters .btn.is-active{
  border-color: rgba(202,163,107,.75);
  background: rgba(202,163,107,.25);
  color: var(--wp-text-strong);
}
.ticket-list{
  display:grid;
  gap:10px;
}
.ticket-list-item{
  display:grid;
  gap:6px;
  text-decoration:none;
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
  color: var(--wp-text);
}
.ticket-list-item:hover,
.ticket-list-item.is-active{
  border-color: rgba(202,163,107,.45);
  background: rgba(202,163,107,.10);
}
.ticket-list-top{
  display:flex;
  gap:8px;
  align-items:flex-start;
  justify-content:space-between;
}
.ticket-meta{
  display:grid;
  gap:6px;
  margin-bottom:14px;
}
.ticket-thread{
  display:grid;
  gap:10px;
}
.ticket-msg{
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  padding:10px 12px;
  background: rgba(0,0,0,.12);
}
.ticket-msg.player{
  border-color: rgba(88,170,120,.30);
}
.ticket-msg.admin{
  border-color: rgba(202,163,107,.38);
}
.ticket-msg header{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.ticket-msg p{
  margin:0;
  line-height:1.5;
}
.ticket-attachment{
  display:grid;
  gap:8px;
  margin-top:8px;
}
.ticket-attachment img,
.ticket-attachment video{
  max-width:100%;
  width:min(460px, 100%);
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.3);
}
.ticket-inline-form{
  margin-top:10px;
}
.ticket-admin-actions{
  margin-top:12px;
}
.ticket-create-card,
.ticket-overview-card,
.ticket-detail-card{
  margin-bottom:16px;
}
.ticket-kicker{
  text-transform:uppercase;
  letter-spacing:.22em;
  color:rgba(218,88,88,.9);
  font-size:11px;
  font-weight:800;
  margin-bottom:8px;
}
.ticket-create-grid{
  display:grid;
  grid-template-columns:1.4fr .8fr;
  gap:12px;
}
.ticket-submit{
  margin-top:4px;
  width:100%;
}
.ticket-overview-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.ticket-table-wrap{
  border-radius:14px;
}
.ticket-overview-table{
  min-width:920px;
}
.ticket-overview-table td,
.ticket-overview-table th{
  white-space:nowrap;
}
.ticket-row{
  cursor:pointer;
  transition:background .15s ease;
}
.ticket-row:hover{
  background:rgba(202,163,107,.10);
}
.ticket-row.is-active{
  background:rgba(202,163,107,.18);
}
.ticket-row:focus-visible{
  outline:2px solid rgba(202,163,107,.6);
  outline-offset:-2px;
}
.btn-mini{
  padding:6px 10px;
  font-size:12px;
}
.ticket-category-filter{
  margin-left:auto;
}
.ticket-category-filter select{
  min-width:190px;
}

@media (max-width: 860px){
  .ticket-create-grid{
    grid-template-columns:1fr;
  }
  .ticket-overview-table{
    min-width:760px;
  }
  .ticket-category-filter{
    width:100%;
    margin-left:0;
  }
}

.ticket-create-grid-3{
  grid-template-columns:1.2fr .8fr .8fr;
}
select{
  color:var(--wp-text-strong);
}
select option{
  color:#1b1314;
  background:#f1e5d6;
}
.badge.urgent{
  border-color: rgba(255, 78, 78, .95);
  color: #ffe3e3;
  background: rgba(168, 27, 27, .35);
}
.ticket-checkline{
  display:flex;
  align-items:center;
  gap:8px;
  margin:8px 0 10px;
  font-size:13px;
  color:rgba(217,199,176,.9);
}
.ticket-checkline input[type='checkbox']{
  width:16px;
  height:16px;
  accent-color:#caa36b;
}
.ticket-danger{
  border-color:rgba(194, 76, 76, .72) !important;
  color:#ffd7d7 !important;
  background:rgba(140, 32, 32, .22) !important;
  box-shadow:0 0 18px rgba(140, 32, 32, .16);
}
.ticket-danger:hover{
  background:rgba(170, 42, 42, .3) !important;
  border-color:rgba(220, 98, 98, .88) !important;
}
.ticket-priority-form{
  margin-bottom:12px;
}

@media (max-width: 860px){
  .ticket-create-grid-3{
    grid-template-columns:1fr;
  }
}
