:root {
  --bg: #130818;
  --bg-2: #23091c;
  --panel: rgba(54, 17, 54, 0.86);
  --panel-2: rgba(33, 16, 68, 0.9);
  --border: #ffb347;
  --border-soft: #ff66c4;
  --text: #fff2d8;
  --muted: #ffd3f3;
  --gold: #ffd94d;
  --gold-soft: #ffb64d;
  --ember: #ff6a00;
  --crimson: #ff3d6e;
  --violet: #944dff;
  --cyan: #56e0ff;
  --lime: #c8ff5b;
  --link: #9fe6ff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 65, 133, 0.26), transparent 20%),
    radial-gradient(circle at 85% 12%, rgba(86, 224, 255, 0.22), transparent 18%),
    radial-gradient(circle at 25% 75%, rgba(148, 77, 255, 0.2), transparent 20%),
    radial-gradient(circle at 80% 82%, rgba(255, 182, 77, 0.24), transparent 18%),
    linear-gradient(180deg, rgba(34, 5, 32, 0.88), rgba(14, 5, 27, 0.96)),
    url('../img/texture.svg') center/cover fixed;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(circle at 9% 16%, rgba(255, 255, 255, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 23% 72%, rgba(255, 214, 102, 0.95) 0 1.5px, transparent 3px),
    radial-gradient(circle at 50% 30%, rgba(255, 128, 205, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 67% 66%, rgba(159, 230, 255, 0.95) 0 1.2px, transparent 2.5px),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.95) 0 1px, transparent 2px),
    radial-gradient(circle at 92% 78%, rgba(255, 217, 77, 0.9) 0 1px, transparent 2px);
  opacity: 0.6;
  animation: glitterShift 8s linear infinite;
}

body::after {
  background:
    radial-gradient(ellipse at bottom, rgba(255, 106, 0, 0.26), transparent 42%),
    radial-gradient(ellipse at bottom, rgba(255, 61, 110, 0.15), transparent 55%);
  mix-blend-mode: screen;
  animation: glowPulse 3.5s ease-in-out infinite;
}

@keyframes glitterShift {
  0% { transform: translateY(0px); opacity: 0.55; }
  50% { transform: translateY(-6px); opacity: 0.82; }
  100% { transform: translateY(0px); opacity: 0.55; }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.8; }
}

a { color: var(--link); text-decoration: none; }
a:hover { color: #ffffff; text-shadow: 0 0 10px rgba(86,224,255,0.8); }
img { max-width: 100%; display: block; }

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  border-bottom: 2px solid rgba(255, 217, 77, 0.4);
  background:
    linear-gradient(to bottom, rgba(77, 13, 39, 0.8), rgba(38, 11, 60, 0.93)),
    url('../img/banner-bg.svg') center/cover no-repeat;
  box-shadow: var(--shadow), 0 0 35px rgba(255, 77, 166, 0.22);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 56px;
  background:
    radial-gradient(circle at 6% 100%, rgba(255,106,0,0.95), transparent 18%),
    radial-gradient(circle at 16% 100%, rgba(255,182,77,0.9), transparent 15%),
    radial-gradient(circle at 30% 100%, rgba(255,61,110,0.85), transparent 16%),
    radial-gradient(circle at 46% 100%, rgba(255,106,0,0.95), transparent 17%),
    radial-gradient(circle at 60% 100%, rgba(255,182,77,0.9), transparent 15%),
    radial-gradient(circle at 76% 100%, rgba(255,61,110,0.9), transparent 16%),
    radial-gradient(circle at 88% 100%, rgba(255,106,0,0.95), transparent 18%);
  opacity: 0.65;
  filter: blur(10px);
  animation: flames 2.2s ease-in-out infinite alternate;
}

@keyframes flames {
  from { transform: scaleY(0.95) translateY(6px); }
  to { transform: scaleY(1.08) translateY(-3px); }
}

.topline {
  text-align: center;
  padding: 0.42rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: #ffe88b;
  border-bottom: 1px solid rgba(255, 217, 77, 0.35);
  background: linear-gradient(90deg, rgba(255,61,110,0.18), rgba(86,224,255,0.1), rgba(255,61,110,0.18));
}

.brand-wrap {
  text-align: center;
  padding: 2rem 1rem 1.35rem;
}

.logo {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff18d;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.65),
    0 0 18px rgba(255, 61, 110, 0.8),
    0 0 28px rgba(148, 77, 255, 0.65),
    0 0 44px rgba(255, 106, 0, 0.5),
    0 3px 0 #8b2a2a;
  animation: logoShimmer 4s linear infinite;
}

@keyframes logoShimmer {
  0%, 100% { filter: hue-rotate(0deg) saturate(1); }
  50% { filter: hue-rotate(-18deg) saturate(1.2); }
}

.tagline {
  margin: 0.35rem 0 0;
  font-style: italic;
  font-size: 1.1rem;
  color: #ffe3fb;
  text-shadow: 0 0 10px rgba(255, 61, 110, 0.45), 0 0 18px rgba(86, 224, 255, 0.25);
}

.realm-line {
  margin-top: 0.45rem;
  color: #bff6ff;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(86,224,255,0.35);
}

.navbar {
  background: linear-gradient(180deg, rgba(104, 19, 72, 0.95), rgba(72, 20, 104, 0.98));
  border-top: 1px solid rgba(255, 217, 77, 0.4);
  border-bottom: 1px solid rgba(255, 217, 77, 0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.navbar a {
  display: block;
  padding: 1rem 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  border-left: 1px solid rgba(255, 217, 77, 0.18);
  color: #fff0c9;
  text-shadow: 0 0 6px rgba(255, 61, 110, 0.28);
}

.navbar li:last-child a { border-right: 1px solid rgba(255, 217, 77, 0.18); }

.navbar a:hover,
.navbar a.active {
  background: linear-gradient(to bottom, rgba(255, 61, 110, 0.42), rgba(86, 224, 255, 0.18));
  color: #ffffff;
  box-shadow: inset 0 0 18px rgba(255, 217, 77, 0.2);
}

.page-shell {
  padding: 2rem 0 3rem;
  position: relative;
  z-index: 1;
}

.hero-grid,
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
}

.panel {
  background: linear-gradient(to bottom, rgba(81, 17, 67, 0.88), rgba(27, 18, 58, 0.94));
  border: 1px solid rgba(255, 183, 71, 0.8);
  box-shadow: var(--shadow), 0 0 26px rgba(148, 77, 255, 0.18);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 217, 77, 0.28);
  pointer-events: none;
}

.panel::after {
  content: "✦ ✧ ✦";
  position: absolute;
  top: 10px;
  right: 18px;
  color: rgba(255, 241, 141, 0.9);
  letter-spacing: 0.3em;
  font-size: 0.8rem;
  text-shadow: 0 0 10px rgba(255,255,255,0.7), 0 0 18px rgba(255,61,110,0.5);
  animation: twinkle 2.4s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.45; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.08); }
}

.panel-inner {
  padding: 1.25rem;
  position: relative;
  z-index: 1;
}

.section-title,
.page-title,
.card-title {
  font-family: 'Cinzel', Georgia, serif;
  color: #fff0a6;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0;
  text-shadow: 0 0 10px rgba(255, 106, 0, 0.32), 0 0 18px rgba(255, 61, 110, 0.18);
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.35rem;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 70ch;
}

.hero-image {
  border: 2px solid rgba(255, 217, 77, 0.48);
  margin: 1rem 0;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(255, 106, 0, 0.18);
}

.button,
button {
  display: inline-block;
  padding: 0.85rem 1.2rem;
  background: linear-gradient(180deg, #ff5f9f, #8438ff 55%, #ff7d2c);
  border: 1px solid #ffe28a;
  color: #fff7e5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: bold;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 0 16px rgba(255, 61, 110, 0.35), 0 4px 10px rgba(0,0,0,0.35);
}

.button:hover { filter: brightness(1.1) saturate(1.08); }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.meta-list,
.bulletin-list,
.conduct-list,
.archive-list {
  margin: 0;
  padding-left: 1.2rem;
}

.sidebar-stat {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 217, 77, 0.18);
}

.sidebar-stat:last-child { border-bottom: 0; }
.sidebar-stat span:last-child { color: #fff0a6; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background: linear-gradient(to bottom, rgba(107, 22, 73, 0.9), rgba(36, 18, 58, 0.98));
  border: 1px solid rgba(255, 217, 77, 0.35);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card .content { padding: 1rem; }
.card p { margin-top: 0.5rem; }
.card small,
.muted { color: var(--muted); }

.card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.notice {
  border-left: 4px solid var(--gold);
  padding: 0.9rem 1rem;
  margin: 0.85rem 0;
  background: linear-gradient(90deg, rgba(255, 106, 0, 0.15), rgba(255, 61, 110, 0.08), rgba(86, 224, 255, 0.08));
}

.ticker {
  overflow: hidden;
  white-space: nowrap;
  background: linear-gradient(90deg, rgba(255,61,110,0.12), rgba(86,224,255,0.1), rgba(255,106,0,0.12));
  border: 1px solid rgba(255, 217, 77, 0.25);
  box-shadow: inset 0 0 20px rgba(255,255,255,0.03);
}

.ticker-track {
  display: inline-block;
  padding: 0.75rem 0;
  animation: ticker 26s linear infinite;
}

.ticker-track span {
  display: inline-block;
  margin-right: 2.5rem;
  color: #fff3c1;
  text-shadow: 0 0 8px rgba(255, 61, 110, 0.2);
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.profile {
  background: linear-gradient(to bottom, rgba(95, 20, 68, 0.94), rgba(35, 18, 60, 0.98));
  border: 1px solid rgba(255, 217, 77, 0.45);
  box-shadow: var(--shadow), 0 0 24px rgba(255, 61, 110, 0.12);
}

.profile header { padding: 1rem 1rem 0; }
.profile .content { padding: 0 1rem 1rem; }
.profile h3 { margin-bottom: 0.2rem; }
.profile em { color: #ffd3f3; }
.profile ul { padding-left: 1.1rem; }

/* Portrait frame */
.profile-shot {
  position: relative;
  margin: 0.85rem 1rem 0.35rem;
  width: 160px;
  height: 160px;
  border: 2px solid gold;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 61, 110, 0.18), rgba(86, 224, 255, 0.1));
  box-shadow:
    0 0 20px rgba(255, 140, 0, 0.4),
    inset 0 0 12px rgba(255, 255, 255, 0.08);
  flex: 0 0 160px;
}

.profile-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 18px rgba(255, 170, 0, 0.6);
  pointer-events: none;
  z-index: 1;
}

.profile-shot::after {
  content: "Glorious Member";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff8d0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  text-align: center;
  pointer-events: none;
  z-index: 3;
}

.profile-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Kazue framing */
img[src*="kazue"] {
  object-position: center 20%;
}

/* Single-member featured cards using current HTML structure */
.profile-featured header {
  display: grid;
  grid-template-columns: 180px 1fr;
  column-gap: 1rem;
  align-items: start;
  padding: 1rem;
}

.profile-featured .profile-shot {
  grid-column: 1;
  grid-row: 1 / span 4;
  margin: 0;
}

.profile-featured header > .rank-badge,
.profile-featured header > h3,
.profile-featured header > .classline,
.profile-featured header > div:not(.profile-shot):not(.rank-badge) {
  grid-column: 2;
  margin-left: 0;
  margin-right: 0;
}

.profile-featured header > .rank-badge {
  margin-bottom: 0.45rem;
  align-self: start;
}

.profile-featured .content {
  padding: 0 1rem 1rem 1rem;
}

/* GM shimmer */
.rank-guild-master .profile-shot {
  animation: gmGlow 2.6s ease-in-out infinite;
}

.rank-guild-master .profile-shot::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 20%,
    rgba(255,255,255,0.18) 40%,
    rgba(255,240,180,0.45) 50%,
    rgba(255,255,255,0.18) 60%,
    rgba(255,255,255,0) 80%
  );
  transform: translateX(-140%) skewX(-18deg);
  animation: gmShimmer 3.2s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes gmGlow {
  0%, 100% {
    box-shadow:
      0 0 16px rgba(255, 170, 0, 0.45),
      0 0 32px rgba(255, 120, 0, 0.18),
      inset 0 0 14px rgba(255,255,255,0.08);
  }
  50% {
    box-shadow:
      0 0 24px rgba(255, 220, 120, 0.75),
      0 0 44px rgba(255, 140, 0, 0.3),
      inset 0 0 18px rgba(255,255,255,0.14);
  }
}

@keyframes gmShimmer {
  0% {
    transform: translateX(-140%) skewX(-18deg);
  }
  100% {
    transform: translateX(140%) skewX(-18deg);
  }
}

.roster-note {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #ffe7ff;
  background: linear-gradient(90deg, rgba(255,61,110,0.14), rgba(86,224,255,0.09));
  border: 1px dashed rgba(255,217,77,0.4);
  padding: 0.9rem 1rem;
}

.timeline-item,
.log-item {
  border-left: 3px solid var(--gold-soft);
  padding: 0.2rem 0 1rem 1rem;
  margin-left: 0.3rem;
}

.log-meta {
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 217, 77, 0.28);
  background: linear-gradient(180deg, rgba(30,8,35,0.65), rgba(5,5,16,0.82));
  text-align: center;
  color: var(--muted);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff5f9f, #ffd94d, #56e0ff, #ff5f9f);
}

.footer .container { padding: 1.2rem 1rem 2rem; }
.footer p { margin: 0.35rem 0; }

.spark {
  color: var(--ember);
  text-shadow: 0 0 8px rgba(255,123,44,0.55);
}

.smallcaps {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: #ffe88b;
}

.fireline {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff5f9f, #ffd94d, #ff7d2c, #ff3d6e);
  box-shadow: 0 0 12px rgba(255, 106, 0, 0.4);
  animation: shimmerline 5s linear infinite;
}

@keyframes shimmerline {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(30deg); }
}

.rank-panel { overflow: visible; }

.rank-badge {
  display: inline-block;
  margin: 0 1rem 0.5rem;
  padding: 0.28rem 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff8d0;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 0 14px rgba(255,255,255,0.08);
}

.classline {
  margin-top: 0.35rem;
  color: #bff6ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.rank-guild-master-panel { box-shadow: var(--shadow), 0 0 30px rgba(255, 217, 77, 0.28); }
.rank-officers-panel { box-shadow: var(--shadow), 0 0 30px rgba(148, 77, 255, 0.22); }
.rank-guild-crafter-panel { box-shadow: var(--shadow), 0 0 30px rgba(86, 224, 255, 0.22); }
.rank-trial-panel { box-shadow: var(--shadow), 0 0 34px rgba(214, 214, 255, 0.26); }
.rank-raiders-panel { box-shadow: var(--shadow), 0 0 30px rgba(255, 106, 0, 0.22); }

.rank-guild-master {
  border-color: rgba(255, 217, 77, 0.85);
  box-shadow: var(--shadow), 0 0 24px rgba(255, 217, 77, 0.18);
}

.rank-guild-master .rank-badge {
  background: linear-gradient(180deg, #ffe47a, #cf8f11);
  color: #3c1d00;
}

.rank-officers {
  border-color: rgba(188, 135, 255, 0.72);
  box-shadow: var(--shadow), 0 0 24px rgba(148, 77, 255, 0.14);
}

.rank-officers .rank-badge {
  background: linear-gradient(180deg, #c892ff, #6d31ff);
}

.rank-guild-crafter {
  border-color: rgba(110, 241, 255, 0.72);
  box-shadow: var(--shadow), 0 0 24px rgba(86, 224, 255, 0.14);
}

.rank-guild-crafter .rank-badge {
  background: linear-gradient(180deg, #7ef6ff, #007ea3);
}

.rank-trial {
  border-color: rgba(224, 224, 255, 0.78);
  box-shadow: var(--shadow), 0 0 28px rgba(214, 214, 255, 0.18);
  filter: saturate(1.05);
}

.rank-trial .rank-badge {
  background: linear-gradient(180deg, #f1f1ff, #8e8eb0);
  color: #25193e;
}

.rank-trial .profile-shot img {
  filter: brightness(0.98) saturate(1.08);
}

.rank-raiders {
  border-color: rgba(255, 167, 77, 0.7);
}

.rank-raiders .rank-badge {
  background: linear-gradient(180deg, #ffb16a, #cc4b00);
}

@media (max-width: 900px) {
  .hero-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .profile-featured header {
    grid-template-columns: 1fr;
    row-gap: 0.75rem;
  }

  .profile-featured .profile-shot {
    grid-column: 1;
    grid-row: auto;
    margin: 0;
  }

  .profile-featured header > .rank-badge,
  .profile-featured header > h3,
  .profile-featured header > .classline,
  .profile-featured header > div:not(.profile-shot):not(.rank-badge) {
    grid-column: 1;
  }

  .profile-featured .content {
    padding: 0 1rem 1rem;
  }
}

@media (max-width: 640px) {
  .navbar a { padding: 0.8rem 0.7rem; font-size: 0.8rem; }
  .container { width: min(100% - 1rem, 1180px); }
  .button-row { flex-direction: column; }
}