@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600&family=Uncial+Antiqua&family=Inter:wght@300;400;500;600&display=swap');

:root{
  --w: 580px;

  --bg0: #070607;
  --bg1: #0e0b0f;

  --cardA: rgba(20, 15, 20, 0.86);
  --cardB: rgba(12, 10, 14, 0.66);

  --ink: rgba(230, 214, 195, 0.92);
  --muted: rgba(200, 181, 154, 0.74);
  --faint: rgba(155, 137, 113, 0.55);

  --line: rgba(232, 214, 176, 0.18);
  --shadow: rgba(0,0,0,0.62);

  --accent: #b6904e;
  --accent2: #3e9aa1;
  --blood: #8b3b3b;

  --radius: 14px;
  --radius2: 18px;

  --pad: 16px;
  --pad2: 18px;

  --veveA: url("images/veveA.jpg");
  --veveB: url("images/veveB.jpg");
  --snake: url("images/snake1.jpg");
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 620px at 15% 12%, rgba(182,144,78,0.16), transparent 60%),
    radial-gradient(720px 520px at 85% 25%, rgba(62,154,161,0.10), transparent 62%),
    radial-gradient(820px 520px at 50% 100%, rgba(139,59,59,0.10), transparent 64%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x: hidden;
 background-attachment: fixed;
  background-size: cover;
}

.sheet{
  width: 100%;
  max-width: var(--w);
  margin: 0 auto;
  padding: 14px 12px 24px 12px;
  position: relative;
}

.sheet::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(900px 580px at 50% -10%, rgba(182,144,78,0.08), transparent 55%),
    radial-gradient(820px 620px at 0% 100%, rgba(62,154,161,0.06), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,0.62), rgba(0,0,0,0.12) 32%, rgba(0,0,0,0.62));
  opacity: 0.95;
}

.hero{
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  padding: 16px 16px 14px 16px;
  background: linear-gradient(180deg, rgba(20,15,20,0.78), rgba(12,10,14,0.62));
  box-shadow: 0 14px 36px var(--shadow);
  overflow: hidden;
}

.hero::after{
  content:"";
  position:absolute;
  inset:-40px;
  background-image: var(--veveB);
  background-size: 520px auto;
  background-repeat: no-repeat;
  background-position: 120% 25%;
  opacity: 0.14;
  filter: grayscale(1) contrast(1.05);
  mix-blend-mode: screen;
  transform: rotate(-6deg);
  pointer-events:none;
}

.hero-top{
  position: relative;
  z-index: 1;
}

.hero-left{
  display:flex;
  gap: 12px;
  align-items: center;
}

.sigil{
  width: 80px;
  height: 80px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(182,144,78,0.40);
  box-shadow: 0 0 26px rgba(182,144,78,0.20);
  background: rgba(0,0,0,0.22);
}

.sigil img{
  width:100%;
  height:100%;
  object-fit:cover;
  filter: contrast(1.08) saturate(0.90);
}

.hero-title h1{
  margin:0;
  font-family: Cinzel, serif;
  font-weight: 600;
  letter-spacing: 0.4px;
  font-size: 22px;
  line-height: 1.05;
}

.hero-sub{
  margin-top: 6px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  font-size: 11px;
  color: var(--muted);
}

.hero-subdot{
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(182,144,78,0.55);
  box-shadow: 0 0 0 4px rgba(182,144,78,0.10);
}

.hero-data{
  margin-top: 16px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  position: relative;
  z-index: 1;
}

.hd{
  border: 1px solid rgba(232,214,176,0.14);
  border-radius: 12px;
  padding: 10px 10px;
  background: rgba(0,0,0,0.20);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.hdk{
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(182,144,78,0.80);
  margin-bottom: 6px;
}

.hdv{
  font-size: 12px;
  color: var(--ink);
  line-height: 1.35;
}

.card{
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--cardA), var(--cardB));
  box-shadow: 0 12px 30px var(--shadow);
  padding: var(--pad2);
  position: relative;
  overflow: hidden;
}

.card::after{
  content:"";
  position:absolute;
  inset:-80px -80px auto -80px;
  height: 210px;
  background-image: var(--snake);
  background-size: 720px auto;
  background-repeat: no-repeat;
  background-position: 20% 0%;
  opacity: 0.08;
  filter: grayscale(1) contrast(1.05);
  transform: rotate(6deg);
  pointer-events:none;
}

h2{
  margin: 0 0 12px 0;
  font-family: Cinzel, serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.2px;
  position: relative;
  z-index: 1;
}

h3{
  margin: 16px 0 10px 0;
  font-family: Cinzel, serif;
  font-weight: 600;
  font-size: 13px;
  color: rgba(230, 214, 195, 0.86);
  position: relative;
  z-index: 1;
}

.hint{
  margin-top: 10px;
  font-size: 11px;
  color: var(--faint);
  position: relative;
  z-index: 1;
}

.section-head{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.btn{
  appearance:none;
  border: 1px solid rgba(232,214,176,0.18);
  background: rgba(0,0,0,0.28);
  color: rgba(230, 214, 195, 0.86);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(182,144,78,0.40);
  background: rgba(0,0,0,0.40);
}

.btn.subtle{
  border-color: rgba(232,214,176,0.12);
  color: var(--muted);
}

.prose{
  position: relative;
  z-index: 1;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(230, 214, 195, 0.86);
  border: 1px solid rgba(232,214,176,0.12);
  background: rgba(0,0,0,0.20);
  border-radius: 12px;
  padding: 12px;
}

.justify{
  text-align: justify;
  text-justify: inter-word;
  font-size:10px;
}

.history-intro{
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 14px;
  border-left: 2px solid rgba(182,144,78,0.45);
  padding-left: 12px;
  position: relative;
  z-index: 2;
}

/* Múlt: 4 fő (2x2) + 3 vendég (1 sor) */
.history-selector{
  display:flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.history-main{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.history-side{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.history-card{
  position: relative;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(232,214,176,0.16);
  background: rgba(0,0,0,0.20);
  box-shadow: 0 12px 26px rgba(0,0,0,0.50);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}


.history-card .hc-img{
  flex:1;
  width:100%;
  object-fit:cover;
  filter:
    grayscale(0.9)
    brightness(0.35)
    contrast(1.1);
  transition: filter 300ms ease, transform 300ms ease;
}



.history-card.small .hc-img{
  height:110px;
}





.history-name-below{
  flex: 0 0 30px;
  background: rgba(0,0,0,0.85);
  color: rgba(230,214,195,0.95);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-card.small .history-name-below{
  flex: 0 0 24px;
  font-size: 11px;
}


.history-card.small{
  height: 95px;
}

.history-card:hover{
  transform: translateY(-3px);
  border-color: rgba(182,144,78,0.40);
  box-shadow: 0 16px 34px rgba(0,0,0,0.62);
}

.history-card .hc-img{
  flex: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter:
    grayscale(1)
    contrast(1.25)
    brightness(0.10)
    saturate(0.3);
  transform: scale(1.03);
  transition:
    filter 320ms ease,
    transform 320ms ease;
}

.history-card.read .hc-img{
  filter:
    grayscale(0.75)
    contrast(1.05)
    brightness(0.55)
    saturate(0.6);
}


.history-card.read{
  border-color: rgba(47,156,97,0.75);
  box-shadow:
    0 0 0 1px rgba(47,156,97,0.35),
    0 12px 26px rgba(0,0,0,0.50);
}

.history-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0,0,0,0.62);
}

.history-card:not(.read):hover{
  border-color: rgba(182,144,78,0.40);
}


/* Hover – színes, egységes filter */
.history-card:hover .hc-img{
  filter:
    grayscale(0)
    contrast(1.1)
    brightness(0.85)
    saturate(1.05)
    sepia(0.15);
  transform: scale(1.06);
}


.history-card::before{
  content:"";
  position:absolute;
  inset:-30px;
  background:
    radial-gradient(160px 110px at 20% 60%, rgba(255,255,255,0.08), transparent 70%),
    radial-gradient(180px 120px at 70% 30%, rgba(182,144,78,0.10), transparent 75%),
    radial-gradient(180px 120px at 50% 85%, rgba(62,154,161,0.07), transparent 75%);
  filter: blur(10px);
  opacity: 0.95;
  pointer-events:none;
}


.history-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
  overflow:hidden;
}

.history-name{
  font-family: "Uncial Antiqua", Cinzel, serif;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(230, 214, 195, 0.95);

  opacity:0;
  transform: scale(0.85) rotate(-2deg);
  filter: blur(4px);

  transition:
    opacity 200ms ease,
    transform 240ms cubic-bezier(.2,.9,.2,1.2),
    filter 200ms ease;
}

.history-card:hover .history-name{
  opacity:1;
  transform: scale(1.15) rotate(0deg);
  filter: blur(0px);
  animation: namePulse 1.6s ease-in-out infinite alternate;
}


@keyframes namePulse{
  0%{
    text-shadow:
      0 0 6px rgba(182,144,78,0.6),
      0 0 18px rgba(62,154,161,0.3);
  }
  50%{
    text-shadow:
      0 0 12px rgba(182,144,78,0.9),
      0 0 28px rgba(62,154,161,0.4);
  }
  100%{
    text-shadow:
      0 0 8px rgba(182,144,78,0.7),
      0 0 20px rgba(62,154,161,0.3);
  }
}

.history-name::after{
  content: attr(data-text);
  position:absolute;
  left:0;
  top:0;
  color: rgba(139,59,59,0.6);
  opacity:0;
}

.history-card:hover .history-name::after{
  opacity:0.6;
  transform: translateX(2px);
}

@keyframes smokeShift{
  0%{
    transform: translateY(0px) scale(1);
    opacity:0.8;
  }
  100%{
    transform: translateY(-4px) scale(1.05);
    opacity:1;
  }
}

.history-card:hover .history-name{
  opacity:1;
  transform: translateY(0);
}

.history-priority{
  border-color: rgba(232,214,176,0.16);
  box-shadow: 0 12px 26px rgba(0,0,0,0.50);
}

.history-priority:hover{
  border-color: rgba(182,144,78,0.62);
}

.history-transition{
  margin-top: 14px;
  position: relative;
  z-index: 2;
  animation: popIn 220ms ease;
}

.transition-shell{
  height: 175px;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(232,214,176,0.18);
  background: rgba(0,0,0,0.25);
  box-shadow: 0 14px 34px rgba(0,0,0,0.62);
  position: relative;
}

.transition-shell img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(0.92) brightness(0.98);
}

.transition-vignette{
  position:absolute;
  inset:0;
  background:
    radial-gradient(380px 240px at 50% 40%, transparent 55%, rgba(0,0,0,0.50)),
    linear-gradient(180deg, rgba(0,0,0,0.35), transparent 32%, rgba(0,0,0,0.60));
  pointer-events:none;
}

.history-reader{
  margin-top: 14px;
  border-radius: 16px;
  border: 1px solid rgba(232,214,176,0.18);
  background: rgba(0,0,0,0.22);
  box-shadow: 0 12px 28px rgba(0,0,0,0.58);
  padding: 14px;
  position: relative;
  z-index: 2;
  animation: popIn 220ms ease;
}

.reader-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.reader-meta{
  display:flex;
  flex-direction: column;
  gap: 2px;
}

.reader-label{
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--faint);
}

.reader-title{
  font-family: Cinzel, serif;
  font-size: 16px;
  color: rgba(230, 214, 195, 0.92);
}

.history-textbox{
  max-height: 520px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.75;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(182,144,78,0.22);
  background:
    linear-gradient(rgba(0,0,0,0.62), rgba(0,0,0,0.62)),
    var(--snake);
  background-size: 720px auto;
  background-position: center;
  background-blend-mode: overlay;
  box-shadow: inset 0 0 44px rgba(0,0,0,0.65);
  outline: none;
  white-space: normal;
  color: rgba(215, 198, 173, 0.94);
}

.history-textbox p{
  margin: 0 0 14px 0;
}






/* =========================
   UNIFIED SCROLLBAR
   ========================= */

.history-textbox,
.scroll-box{
  scrollbar-width: thin;
  scrollbar-color: rgba(182,144,78,0.55) rgba(0,0,0,0.15);
}

.history-textbox::-webkit-scrollbar,
.scroll-box::-webkit-scrollbar{
  width: 8px;
}

.history-textbox::-webkit-scrollbar-track,
.scroll-box::-webkit-scrollbar-track{
  background: rgba(0,0,0,0.15);
  border-radius: 999px;
}

.history-textbox::-webkit-scrollbar-thumb,
.scroll-box::-webkit-scrollbar-thumb{
  background: linear-gradient(
    180deg,
    rgba(182,144,78,0.65),
    rgba(232,214,176,0.35)
  );
  border-radius: 999px;
  border: 1px solid rgba(232,214,176,0.25);
}

.history-textbox::-webkit-scrollbar-thumb:hover,
.scroll-box::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(
    180deg,
    rgba(182,144,78,0.85),
    rgba(232,214,176,0.55)
  );
}


.history-textbox b[data-role="jackson"]{ color: #b033a6; }
.history-textbox b[data-role="solange"]{ color: #833d5e; }
.history-textbox b[data-role="naya"]{ color: #7e8324; }
.history-textbox b[data-role="kigyo"]{ color: #107b35; }
.history-textbox b[data-role="nate"]{ color: #BD1F42; }
.history-textbox b[data-role="npc"]{ color: #f8ffc7; }


.hidden{ display:none; }

@keyframes popIn{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: translateY(0); }
}

.ornament{
  display:flex;
  align-items:center;
  gap: 10px;
  margin: 4px 0 12px 0;
  position: relative;
  z-index: 1;
}

.ornament-line{
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(232,214,176,0.18), transparent);
}

.ornament-mark{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(182,144,78,0.45);
  background: radial-gradient(circle at 35% 35%, rgba(182,144,78,0.75), rgba(182,144,78,0.10));
  box-shadow: 0 0 0 6px rgba(182,144,78,0.08);
}

.timeline{
  position: relative;
  padding-left: 18px;
  display:flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1;
}

.timeline-line{
  position:absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, rgba(182,144,78,0.45), rgba(232,214,176,0.12));
  border-radius: 999px;
}

.titem{
  display:flex;
  gap: 10px;
  align-items:flex-start;
}

.tdot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 6px;
  border: 1px solid rgba(232,214,176,0.24);
  background: radial-gradient(circle at 35% 30%, rgba(182,144,78,0.75), rgba(182,144,78,0.10));
  box-shadow: 0 0 0 6px rgba(182,144,78,0.08);
}

.tcontent{
  flex:1;
  border: 1px solid rgba(232,214,176,0.12);
  border-radius: 12px;
  padding: 10px 10px;
  background: rgba(0,0,0,0.20);
}

.tdate{
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--muted);
}

.tdesc{
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.5;
  color: rgba(230, 214, 195, 0.86);
}

.prompt-grid{
  margin-top: 12px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  position: relative;
  z-index: 1;
}

.prompt-card{
  border: 1px solid rgba(232,214,176,0.14);
  border-radius: 12px;
  padding: 10px 10px;
  background: rgba(0,0,0,0.18);
}

.prompt-head{
  font-family: Cinzel, serif;
  font-size: 12px;
  color: rgba(230, 214, 195, 0.90);
  margin-bottom: 8px;
}

.prompt-k{
  font-size: 10px;

  letter-spacing: 0.6px;
  color: var(--faint);
  margin-bottom: 6px;
}

.prompt-v{
  font-size: 10px;
  line-height: 1.5;
  color: rgba(230, 214, 195, 0.86);
}

.facts{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  position: relative;
  z-index: 1;
}

.fact{
  border: 1px solid rgba(232,214,176,0.14);
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  padding: 10px 10px;
}

.fk{
  font-size: 10px;

  letter-spacing: 0.6px;
  color: var(--faint);
  margin-bottom: 6px;
}

.fv{
  font-size: 10px;
  line-height: 1.5;
  color: rgba(230, 214, 195, 0.86);
  text-align: justify;
}

.family-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  position: relative;
  z-index: 1;
}

.family-card{
  border: 1px solid rgba(232,214,176,0.14);
  border-radius: 14px;
  padding: 12px 12px;
  background: rgba(0,0,0,0.18);
  position: relative;
  overflow:hidden;
}

.family-card::after{
  content:"";
  position:absolute;
  inset:-40px -40px auto -40px;
  height: 120px;
  background-image: var(--veveB);
  background-size: 360px auto;
  background-repeat: no-repeat;
  background-position: 110% 10%;
  opacity: 0.10;
  filter: grayscale(1) contrast(1.05);
  mix-blend-mode: screen;
  transform: rotate(-8deg);
  pointer-events:none;
}

.family-role{
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--faint);
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.family-name{
  font-family: Cinzel, serif;
  font-size: 13px;
  color: rgba(230, 214, 195, 0.92);
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.family-blood{
  font-size: 11px;
  color: rgba(182,144,78,0.85);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.family-desc{
  font-size: 10px;
  line-height: 1.55;
  color: rgba(230, 214, 195, 0.86);
  position: relative;
  z-index: 1;
  text-align:justify;
}

.family-image{
  width:100%;
  border-radius:14px;
  overflow:hidden;
  margin-bottom:14px;
  border:1px solid rgba(232,214,176,0.18);
  box-shadow:0 12px 28px rgba(0,0,0,0.55);
  position: relative;
  z-index: 1;
}

.family-image img{
  width:100%;
  height:380px;              /* magasabb */
  object-fit:cover;
  object-position: center 20%; /* feljebb tolja a fókuszt */
  filter: contrast(1.05) saturate(0.92) brightness(0.95);
}

.kv-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  position: relative;
  z-index: 1;
}

.kv{
  border: 1px solid rgba(232,214,176,0.14);
  border-radius: 12px;
  padding: 10px 10px;
  background: rgba(0,0,0,0.18);
}

.k{
  font-size: 10px;
  letter-spacing: 0.6px;

  color: var(--faint);
  margin-bottom: 6px;
}

.v{
  font-size: 12px;
  color: rgba(230, 214, 195, 0.90);
  line-height: 1.4;
}

.pb-full{
  grid-column: 1 / -1;
  border-top: 1px solid rgba(232,214,176,0.14);
  padding-top: 12px;
  margin-top: 4px;
}

.two-col{
  margin-top: 12px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  position: relative;
  z-index: 1;
}

.mini{
  border: 1px solid rgba(232,214,176,0.14);
  border-radius: 12px;
  padding: 10px 10px;
  background: rgba(0,0,0,0.18);
}

.mini-k{
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--faint);
  margin-bottom: 6px;
}

.mini-v{
  font-size: 10px;
  color: rgba(230, 214, 195, 0.90);
  line-height: 1.4;
}

/* RBF: 3x3 */
.rbf{
  margin-top: 10px;
  display:grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(232,214,176,0.14);
  border-radius: 14px;
  background: rgba(0,0,0,0.14);
  position: relative;
  z-index: 1;
}

.rbf.rbf-3x3{
  grid-template-columns: repeat(3, 1fr);
}

.rbf-item{
  display:flex;
   align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border: 1px solid rgba(232,214,176,0.12);
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  min-width: 0;
}

.rbf-left{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
}

.subj-name{
  font-size: 12px;
  color: rgba(230, 214, 195, 0.88);
  white-space: normal;     /* törhet */
  overflow: visible;
  text-overflow: unset;
  line-height: 1.3;
}

.subj-ico{
  width: 22px;
  height: 22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 8px;
  border: 1px solid rgba(232,214,176,0.14);
  background: rgba(0,0,0,0.18);
  font-size: 14px;
}

.rbf-grade .grade{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 42px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(232,214,176,0.16);
  background: rgba(0,0,0,0.18);
  font-size: 12px;
  color: rgba(230, 214, 195, 0.90);
}

.links{
  margin: 0;
  padding-left: 0;
  list-style: none;
  position: relative;
  z-index: 1;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.link-item{
  border: 1px solid rgba(232,214,176,0.12);
  background: rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: 10px 10px;
}

.link-item a{
  display:block;
  color: rgba(182,144,78,0.92);
  text-decoration: none;
  font-family: Cinzel, serif;
  font-size: 13px;
  line-height: 1.3;
  border-bottom: 1px solid rgba(182,144,78,0.22);
  padding-bottom: 4px;
}

.link-item a:hover{
  border-bottom-color: rgba(182,144,78,0.55);
}

.foot{
  margin-top: 14px;
  display:flex;
  justify-content: center;
}

.to-top{
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid rgba(232,214,176,0.18);
  text-decoration: none;
}

@media (max-width: 520px){
  .hero-data,
  .kv-grid,
  .prompt-grid,
  .facts,
  .family-grid,
  .two-col{
    grid-template-columns: 1fr;
  }

  .history-main{
    grid-template-columns: 1fr;
  }

  .history-side{
    grid-template-columns: 1fr;
  }

  .rbf.rbf-3x3{
    grid-template-columns: 1fr;
  }

  .subj-name{
    max-width: 260px;
  }
}



.voodoo-visual{
  margin:18px 0 22px 0;
  border-radius:16px;
  overflow:hidden;
  position:relative;
}

.voodoo-visual img {
    width: 100%;
    height: 300px;
    object-position: center 90%;
    object-fit: cover;
}


#csalad{
  position:relative;
  overflow:hidden;
}

#csalad::after{
    content:"";
  position:absolute;
  inset:-80px -80px auto -80px;
  height: 210px;
  background-image: var(--snake);
  background-size: 720px auto;
  background-repeat: no-repeat;
  background-position: 20% 0%;
  opacity: 0.08;
  filter: grayscale(1) contrast(1.05);
  transform: rotate(6deg);
  pointer-events:none;
}





/* =========================
   GRADE SYSTEM
   ========================= */


.grade-e,
.grade-v,
.grade-k,
.grade-h,
.leg{
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.4px;
  border: 1px solid transparent;
  display: inline-block;
}


.grade-e,
.leg.e{
  background: #163c24;
  border: 1px solid #1f5a36;
  color: #a8d5b8;
}


.grade-v,
.leg.v{
  background: #1f6a3f;
  border: 1px solid #2f8c55;
  color: #d8ffe8;
}


.grade-k,
.leg.k{
  background: #2f9c61;
  border: 1px solid #9effc6;
  color: #ffffff;
  box-shadow:
      0 0 6px rgba(120,255,160,0.35); 
}

.grade-h,
.leg.h{
  background: #7a1f1f;
  border: 1px solid #c94a4a;
  color: #ffd6d6;
}



/* =========================
   RBF HOVER LABEL
   ========================= */

.rbf-item{
  position:relative;
}

.rbf-item::after{
  content:attr(data-grade-label);
  position:absolute;
  bottom:110%;
  left:50%;
  transform:translateX(-50%);
  background:rgba(20,20,20,0.95);
  color:#fff;
  font-size:11px;
  padding:4px 8px;
  border-radius:4px;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  transition:opacity 120ms ease;
}

.rbf-item:hover::after{
  opacity:1;
}


/* =========================
   RANDOM BUTTON
   ========================= */

.random-block{
  margin: 16px 0 6px 0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  text-align:center;
}

.random-instructions{
  font-size:12px;
  line-height:1.5;
  color:var(--muted);
  max-width:420px;
}

.random-btn{
  appearance:none;
  border:none;
  background:none;
  cursor:pointer;
  padding:0;
  transition: transform 180ms ease;
}

.random-btn img{
  width:70px;
  height:70px;
  object-fit:cover;
  border-radius:999px;
  border:1px solid rgba(182,144,78,0.35);
  box-shadow:0 0 16px rgba(182,144,78,0.25);
}

.random-btn:hover{
  transform:scale(1.08);
}



/* =========================
   APRÓSÁGOK – FULL WIDTH ITEMS
   ========================= */

.facts{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:16px;
}

.fact.full{
  grid-column: 1 / -1;
}


.fact.full .fv ul{
  padding-left:18px;
  margin:6px 0 0 0;
}


/* =========================
   LIST
   ========================= */

.fact.full .fv ul{
  list-style:none;
  padding:0;
  margin:8px 0 0 0;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.fact.full .fv li{
  padding:10px 12px;
  border-radius:6px;
  font-size:10px;
  line-height:1.5;
}

/* váltakozó háttér */
.fact.full .fv li:nth-child(odd){
  background:rgba(182,144,78,0.08);
}

.fact.full .fv li:nth-child(even){
  background:rgba(182,144,78,0.16);
}



/* =========================
   INTERNAL SCROLL SECTIONS
   ========================= */

.scroll-box{
  max-height:300px;
  overflow-y:auto;
  padding-right:8px;
  font-size:10px;
background: linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.62)), var(--snake);
}

/* finomabb scrollbar */
.scroll-box::-webkit-scrollbar{
  width:6px;
}

.scroll-box::-webkit-scrollbar-track{
  background:transparent;
}

.scroll-box::-webkit-scrollbar-thumb{
  background:rgba(182,144,78,0.4);
  border-radius:6px;
}

.scroll-box::-webkit-scrollbar-thumb:hover{
  background:rgba(182,144,78,0.65);
}



/* =========================
   STORY DIVIDER (HR)
   ========================= */

.history-textbox hr{
  border: none;
  height: 1px;
  margin: 24px 0;
  position: relative;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(182,144,78,0.45),
    transparent
  );
}

.history-textbox hr::after{
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(182,144,78,0.9),
    rgba(182,144,78,0.2)
  );
  box-shadow: 0 0 10px rgba(182,144,78,0.6);
}



.reader-head{
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.reader-avatar{
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  z-index: 2;
}

.reader-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter: contrast(1.1) brightness(0.85);
}


.reader-head::before{
  content:"";
  position:absolute;
  left:-20px;
  top:50%;
  transform:translateY(-50%);
  width:150px;
  height:150px;
  background: radial-gradient(circle,
      rgba(140,20,30,0.45) 0%,
      rgba(140,20,30,0.25) 35%,
      rgba(140,20,30,0.10) 60%,
      transparent 75%);
  animation: snakeAura 5s ease-in-out infinite;
  pointer-events:none;
  z-index:1;
}

@keyframes snakeAura{
  0%   { transform:translateY(-50%) scale(1); opacity:0.5; }
  50%  { transform:translateY(-50%) scale(1.15); opacity:0.9; }
  100% { transform:translateY(-50%) scale(1); opacity:0.5; }
}


/* ==============================
   FORRÁS LINK HOVER OVERLAY
================================ */

.link-item{
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 200ms ease;
}

.link-item::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgb(120 98 20 / 15%) 0%, rgb(111 67 30 / 25%) 50%, rgba(0, 0, 0, 0.62) 100%);
  opacity:0;
  transition:opacity 250ms ease;
  pointer-events:none;
}

.link-item:hover::before{
  opacity:1;
}

.link-item:hover{
  transform:translateX(4px);
}