:root {
  --ink: #070707;
  --ink-2: #0b0b0a;
  --panel: #11110f;
  --panel-2: #161510;
  --panel-3: #1a1812;
  --gold: #b79a59;
  --gold-bright: #d7bc79;
  --gold-pale: #ead9aa;
  --gold-dim: #756641;
  --line: rgba(190, 161, 96, .24);
  --line-strong: rgba(211, 181, 111, .46);
  --text: #e9e4d7;
  --muted: #a39c8e;
  --muted-2: #716c62;
  --red: #8f3d35;
  --max: 1220px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  background:
    radial-gradient(circle at 50% -8%, rgba(185, 151, 76, .10), transparent 31rem),
    radial-gradient(circle at 12% 38%, rgba(97, 82, 47, .05), transparent 28rem),
    radial-gradient(circle at 86% 74%, rgba(97, 82, 47, .045), transparent 24rem),
    linear-gradient(180deg, #090909 0%, #070707 48%, #050505 100%);
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .32;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.006) 0 1px, transparent 1px 7px);
  mix-blend-mode: soft-light;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.52), transparent 18%, transparent 82%, rgba(0,0,0,.52));
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
::selection { background: rgba(183,154,89,.30); color: #fff7df; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

/* ---------- shared ornament ---------- */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--gold-dim);
}
.ornament::before,
.ornament::after {
  content: '';
  width: min(180px, 28vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong));
}
.ornament::after { transform: scaleX(-1); }
.ornament span {
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold-dim);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(183,154,89,.12);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5,5,5,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(183,154,89,.13);
}
.site-header::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(183,154,89,.28), transparent);
}
.navbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 34px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 220px;
}
.brand-rune {
  position: relative;
  width: 25px;
  height: 42px;
  flex: 0 0 auto;
}
.brand-rune::before,
.brand-rune::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(215,188,121,.56);
}
.brand-rune::before {
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(183,154,89,.10);
}
.brand-rune::after {
  top: 20px;
  width: 1px;
  height: 18px;
  border-width: 0 0 0 1px;
}
.brand-copy { display: block; line-height: 1.05; }
.brand-name {
  display: block;
  font: 500 18px/1 var(--serif);
  color: #efe5cc;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.brand-sub {
  display: block;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: .25em;
  text-transform: uppercase;
}
.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-link {
  position: relative;
  padding: 27px 0 23px;
  color: #a9a295;
  text-decoration: none;
  font: 600 11px/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: color .18s ease;
}
.nav-link:hover,
.nav-link.active { color: var(--gold-pale); }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 15px;
  width: 26px;
  height: 1px;
  transform: translateX(-50%);
  background: var(--gold-bright);
  box-shadow: 0 0 10px rgba(215,188,121,.25);
}
.nav-link.tracker-link { color: var(--gold-bright); }
.nav-mini {
  display: inline-block;
  margin-left: 5px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: .08em;
}
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.015);
  cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 1px; margin: 5px auto; background: #c1b8a6; }

/* ---------- typographic system ---------- */
.kicker {
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.hero-title,
.page-title,
.section-title,
.panel-title,
.archive-title,
.error-code,
.error-hero-card h1 { font-family: var(--serif); font-weight: 400; }
.hero-title {
  margin: 14px auto 13px;
  max-width: 1050px;
  font-size: clamp(52px, 8.5vw, 104px);
  line-height: .94;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: #efe9dc;
  text-shadow: 0 2px 28px rgba(0,0,0,.52);
}
.hero-title span { color: var(--gold-bright); }
.hero-lead {
  max-width: 720px;
  margin: 0 auto;
  color: #aba397;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.8;
}
.page-title {
  margin: 10px 0 12px;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1;
  letter-spacing: .025em;
  color: #ede6d7;
}
.section-title {
  margin: 7px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  color: #e9e0cc;
}
.panel-title { margin: 0; font-size: 29px; color: #ede4d0; }
.archive-title { margin: 0; font-size: 24px; color: #ede5d3; }
.lead { max-width: 760px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }

/* ---------- buttons ---------- */
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 43px;
  padding: 0 18px;
  border: 1px solid rgba(183,154,89,.34);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.006));
  color: #d8cfbc;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { color: #f1dfb6; border-color: rgba(215,188,121,.62); background: rgba(183,154,89,.07); }
.btn.primary { color: #17130d; border-color: #b99b5e; background: linear-gradient(180deg, #d5b977, #aa8a4d); }
.btn.primary:hover { color: #100d08; background: linear-gradient(180deg, #e0c789, #b99654); }
.btn.disabled,
.btn[aria-disabled='true'] { opacity: .42; pointer-events: none; }

/* ---------- home hero ---------- */
.elden-hero {
  position: relative;
  min-height: 650px;
  display: flex;
  align-items: center;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(183,154,89,.08);
}
.elden-hero::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 48%;
  width: 460px;
  height: 460px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(183,154,89,.10);
  border-radius: 50%;
  box-shadow:
    0 0 0 58px rgba(183,154,89,.025),
    0 0 0 118px rgba(183,154,89,.015),
    inset 0 0 100px rgba(183,154,89,.025);
  opacity: .8;
}
.elden-hero::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 13%;
  width: 1px;
  height: 70%;
  background: linear-gradient(transparent, rgba(183,154,89,.24), transparent);
  opacity: .65;
}
.hero-inner { position: relative; z-index: 1; padding: 92px 0 82px; }
.hero-inner .actions { justify-content: center; margin-top: 29px; }
.hero-note { margin-top: 28px; color: var(--muted-2); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.hero-note strong { color: var(--gold); font-weight: 600; }

/* ---------- framed shells ---------- */
.section { padding: 76px 0; }
.section.compact { padding: 52px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 27px;
}
.section-head > p { max-width: 560px; margin: 0; color: var(--muted); }
.frame-panel {
  position: relative;
  border: 1px solid rgba(183,154,89,.22);
  background:
    linear-gradient(135deg, rgba(215,188,121,.025), transparent 20%),
    linear-gradient(180deg, rgba(18,17,14,.95), rgba(10,10,9,.95));
  box-shadow: 0 22px 70px rgba(0,0,0,.20), inset 0 0 60px rgba(183,154,89,.012);
}
.frame-panel::before,
.frame-panel::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.frame-panel::before { left: -1px; top: -1px; border-left: 2px solid var(--gold-dim); border-top: 2px solid var(--gold-dim); }
.frame-panel::after { right: -1px; bottom: -1px; border-right: 2px solid var(--gold-dim); border-bottom: 2px solid var(--gold-dim); }

/* ---------- home portals ---------- */
.portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.portal {
  position: relative;
  min-height: 208px;
  padding: 29px 30px 26px;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(183,154,89,.18);
  background:
    linear-gradient(135deg, rgba(183,154,89,.045), transparent 38%),
    rgba(15,14,12,.76);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.portal::after {
  content: '';
  position: absolute;
  right: 25px;
  bottom: 20px;
  width: 58px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
  transition: width .2s ease;
}
.portal:hover { border-color: rgba(215,188,121,.40); background-color: rgba(24,22,17,.88); transform: translateY(-2px); }
.portal:hover::after { width: 86px; }
.portal-index { color: var(--gold-dim); font: 400 13px/1 var(--serif); letter-spacing: .15em; }
.portal h3 { margin: 28px 0 10px; font: 400 31px/1.08 var(--serif); color: #e9e0cc; }
.portal p { max-width: 480px; margin: 0; color: #918a7e; font-size: 13px; }
.portal-enter { display: inline-block; margin-top: 21px; color: var(--gold); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }

/* ---------- featured rows ---------- */
.featured-list { border-top: 1px solid var(--line); }
.featured-row {
  display: grid;
  grid-template-columns: 120px minmax(0,1fr) auto;
  gap: 26px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid rgba(183,154,89,.14);
}
.featured-row .type { color: var(--gold-dim); font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.featured-row h3 { margin: 0; font: 400 22px/1.15 var(--serif); color: #e7decb; }
.featured-row p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.featured-state { color: #817968; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- tracker banner ---------- */
.tracker-banner {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 32px;
  align-items: center;
  padding: 34px 38px;
}
.tracker-banner p { max-width: 700px; margin: 8px 0 0; color: var(--muted); }

/* ---------- sub pages ---------- */
.page-hero { padding: 72px 0 38px; border-bottom: 1px solid rgba(183,154,89,.08); }
.page-hero .ornament { justify-content: flex-start; margin-top: 24px; }
.page-hero .ornament::before { display: none; }
.page-hero .ornament::after { width: 260px; }
.page-hero-inner { max-width: 840px; }

.toolbar-shell { margin-bottom: 18px; padding: 18px; }
.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
}
.search-box {
  min-height: 46px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(183,154,89,.18);
  background: #0b0b0a;
}
.search-box::before {
  content: '';
  width: 13px;
  height: 13px;
  margin-left: 16px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  box-shadow: 8px 8px 0 -6px var(--gold-dim);
  opacity: .8;
}
.search-box input {
  width: 100%;
  min-width: 0;
  padding: 0 15px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}
.search-box input::placeholder { color: #615d54; }
.results-count { color: var(--gold-dim); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.filter-btn {
  min-height: 35px;
  padding: 0 14px;
  border: 1px solid rgba(183,154,89,.14);
  background: transparent;
  color: #857e71;
  font-size: 10px;
  letter-spacing: .11em;
  text-transform: uppercase;
  cursor: pointer;
}
.filter-btn:hover,
.filter-btn.active { color: var(--gold-pale); border-color: rgba(215,188,121,.38); background: rgba(183,154,89,.05); }

.catalog { border-top: 1px solid var(--line); }
.mod-card,
.archive-row {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0,1fr) 220px;
  gap: 26px;
  align-items: center;
  padding: 25px 22px;
  border-bottom: 1px solid rgba(183,154,89,.15);
  background: rgba(14,13,11,.52);
  transition: background .18s ease, border-color .18s ease;
}
.mod-card:hover,
.archive-row:hover { background: rgba(24,21,16,.68); border-color: rgba(215,188,121,.28); }
.row-meta { align-self: start; }
.row-kicker { display: block; color: var(--gold-dim); font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.row-number { display: block; margin-top: 8px; color: rgba(215,188,121,.35); font: 400 26px/1 var(--serif); }
.row-copy h2,
.row-copy h3 { margin: 0; font: 400 25px/1.12 var(--serif); color: #ebe2cf; }
.row-copy p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.row-side { justify-self: end; text-align: right; }
.row-side .btn { min-width: 178px; }
.tags { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid rgba(183,154,89,.15);
  color: #817a6c;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tag.gold { color: #b79a59; border-color: rgba(183,154,89,.28); }
.empty-state { display: none; padding: 38px; text-align: center; color: var(--muted); border: 1px solid var(--line); }

.archive-shell { overflow: hidden; }
.archive-row { grid-template-columns: 155px minmax(0,1fr) 210px; }
.archive-note { color: var(--muted-2); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- footer ---------- */
.site-footer { margin-top: 86px; border-top: 1px solid rgba(183,154,89,.12); background: rgba(5,5,5,.76); }
.site-footer::before { content:''; display:block; height:1px; background:linear-gradient(90deg, transparent, rgba(183,154,89,.22), transparent); }
.footer-grid { min-height: 118px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-copy { color: #6f6a61; font-size: 11px; line-height: 1.75; }
.footer-copy strong { display: block; color: #aa9c7f; font: 400 15px/1.4 var(--serif); letter-spacing: .08em; text-transform: uppercase; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: #7d766a; text-decoration: none; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.footer-links a:hover { color: var(--gold-bright); }

/* ---------- 404 kept from user's concept ---------- */
.error-page { min-height: calc(100vh - 196px); display: flex; align-items: center; padding: 76px 0; }
.error-hero-card { position: relative; overflow: hidden; padding: 64px 42px; text-align: center; border: 1px solid rgba(183,154,89,.24); background: linear-gradient(180deg, rgba(21,19,15,.93), rgba(8,8,7,.96)); }
.error-hero-card__glow { position:absolute; left:50%; top:38%; width:390px; height:390px; transform:translate(-50%,-50%); border-radius:50%; background:radial-gradient(circle, rgba(145,58,49,.12), transparent 65%); pointer-events:none; }
.error-hero-card__content { position:relative; z-index:1; max-width:850px; margin:auto; }
.badge { display:inline-flex; min-height:29px; align-items:center; padding:0 11px; border:1px solid rgba(183,154,89,.24); color:var(--gold); font-size:9px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.badge--red { color:#c78e85; border-color:rgba(155,66,56,.38); background:rgba(122,42,36,.08); }
.error-code { margin: 17px 0 4px; color: rgba(215,188,121,.23); font-size: clamp(92px, 18vw, 190px); line-height:.82; letter-spacing:.02em; }
.error-subtitle { margin:20px 0 8px; color:var(--gold-dim); font-size:10px; letter-spacing:.15em; text-transform:uppercase; }
.error-hero-card h1 { max-width:780px; margin:10px auto 13px; color:#e9e0cf; font-size:clamp(27px,4.5vw,45px); line-height:1.18; }
.error-quote { margin:0 auto; color:var(--muted); }
.error-actions { display:flex; justify-content:center; gap:10px; flex-wrap:wrap; margin-top:29px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .navbar { min-height: 68px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 14px 20px 20px;
    background: rgba(6,6,6,.98);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: grid; }
  .nav-link { padding: 13px 0; border-bottom: 1px solid rgba(183,154,89,.09); }
  .nav-link.active::after { display: none; }
  .portal-grid { grid-template-columns: 1fr; }
  .mod-card, .archive-row { grid-template-columns: 135px minmax(0,1fr); }
  .row-side { grid-column: 2; justify-self: start; text-align: left; }
  .tags { justify-content: flex-start; }
  .tracker-banner { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .brand { min-width: 0; }
  .brand-sub { display: none; }
  .brand-name { font-size: 15px; }
  .elden-hero { min-height: 570px; }
  .elden-hero::before { width: 310px; height: 310px; }
  .hero-inner { padding: 72px 0 64px; }
  .hero-title { font-size: clamp(43px, 15vw, 65px); }
  .section { padding: 58px 0; }
  .section-head { align-items: start; flex-direction: column; gap: 13px; }
  .portal { min-height: 180px; padding: 24px 22px; }
  .featured-row { grid-template-columns: 1fr; gap: 8px; }
  .featured-state { justify-self: start; }
  .toolbar { grid-template-columns: 1fr; gap: 9px; }
  .mod-card, .archive-row { grid-template-columns: 1fr; gap: 13px; padding: 22px 18px; }
  .row-side { grid-column: auto; justify-self: start; text-align: left; }
  .row-side .btn { min-width: 0; }
  .tags { justify-content: flex-start; }
  .tracker-banner { padding: 27px 22px; }
  .footer-grid { padding: 32px 0; align-items: flex-start; flex-direction: column; }
  .footer-links { gap: 13px 18px; }
  .error-hero-card { padding: 48px 20px; }
}

/* ---------- card grid layout ---------- */
body::before {
  opacity: .58;
  background-image:
    linear-gradient(rgba(190,161,96,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190,161,96,.045) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.008) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.008) 1px, transparent 1px);
  background-size: 14px 14px, 14px 14px, 98px 98px, 98px 98px;
  mix-blend-mode: normal;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.92), rgba(0,0,0,.54) 48%, rgba(0,0,0,.82));
}

.portal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal {
  min-height: 250px;
  display: flex;
  flex-direction: column;
}
.portal h3 { margin-top: 34px; }
.portal-enter { margin-top: auto; padding-top: 24px; }

.featured-list,
.catalog,
.archive-shell {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  border: 0;
  overflow: visible;
}

.featured-row,
.mod-card,
.archive-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  min-width: 0;
  min-height: 300px;
  padding: 27px 25px;
  border: 1px solid rgba(183,154,89,.22);
  background:
    linear-gradient(145deg, rgba(215,188,121,.035), transparent 32%),
    linear-gradient(180deg, rgba(18,17,14,.95), rgba(10,10,9,.95));
}

.featured-row:hover,
.mod-card:hover,
.archive-row:hover {
  background:
    linear-gradient(145deg, rgba(215,188,121,.055), transparent 34%),
    linear-gradient(180deg, rgba(24,22,17,.97), rgba(12,11,9,.97));
  border-color: rgba(215,188,121,.40);
}

.featured-row .type {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0 8px;
  border: 1px solid rgba(183,154,89,.20);
  color: var(--gold);
}
.featured-row h3 { margin-top: 28px; font-size: 26px; }
.featured-row p { margin-top: 11px; font-size: 13px; line-height: 1.65; }

.mod-card .row-copy,
.archive-row .row-copy { margin-top: 10px; }
.mod-card .row-copy h2,
.archive-row .archive-title { font-size: 27px; }
.mod-card .row-copy p,
.archive-row .row-copy p { margin-top: 12px; }

.row-side {
  width: 100%;
  margin-top: auto;
  justify-self: stretch;
  text-align: left;
}
.tags { justify-content: flex-start; margin: 0; }
.row-side .btn { min-width: 0; margin-top: 12px; }

.catalog.frame-panel,
.archive-shell.frame-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.catalog.frame-panel::before,
.catalog.frame-panel::after,
.archive-shell.frame-panel::before,
.archive-shell.frame-panel::after { display: none; }

@media (max-width: 1050px) {
  .featured-list,
  .catalog,
  .archive-shell { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mod-card,
  .archive-row { min-height: 280px; }
}

@media (max-width: 980px) {
  .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mod-card,
  .archive-row { display: flex; }
  .row-side { margin-top: auto; }
}

@media (max-width: 680px) {
  body::before { background-size: 12px 12px, 12px 12px, 84px 84px, 84px 84px; }
  .portal-grid,
  .featured-list,
  .catalog,
  .archive-shell { grid-template-columns: 1fr; }
  .portal,
  .featured-row,
  .mod-card,
  .archive-row { min-height: 0; }
}


/* ---------- clickable cards ---------- */
a.featured-row,
a.mod-card {
  color: inherit;
  text-decoration: none;
}
a.featured-row:focus-visible,
a.mod-card:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 4px;
}

/* ---------- simple mod page ---------- */
.mod-simple {
  padding: 72px 0 82px;
}
.mod-simple-inner {
  width: min(900px, 100%);
  margin: 0 auto;
}
.mod-simple .page-title {
  margin-bottom: 24px;
}
.mod-description {
  max-width: 820px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}
.mod-description p {
  margin: 0;
}
.mod-description p + p {
  margin-top: 16px;
}
.mod-media {
  margin: 34px 0 0;
}
.mod-media img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border: 1px solid rgba(183,154,89,.25);
  background: rgba(0,0,0,.22);
  box-shadow: 0 20px 55px rgba(0,0,0,.35);
}
.mod-download {
  margin-top: 30px;
}

@media (max-width: 680px) {
  .mod-simple { padding: 48px 0 58px; }
  .mod-media { margin-top: 26px; }
  .mod-download .btn { width: 100%; }
}

/* ---------- mod page: clean square layout ---------- */
.mod-page {
  padding: 72px 0 82px;
}
.mod-page-inner {
  width: min(1060px, 100%);
  margin: 0 auto;
}
.mod-page .page-title {
  margin-bottom: 30px;
}
.mod-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.mod-square {
  position: relative;
  min-height: 360px;
  margin: 0;
  border: 1px solid rgba(183,154,89,.32);
  background:
    linear-gradient(135deg, rgba(215,188,121,.035), transparent 38%),
    rgba(12,12,10,.78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.018), 0 18px 48px rgba(0,0,0,.24);
}
.mod-square::before,
.mod-square::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.mod-square::before {
  top: 8px;
  left: 8px;
  border-top: 1px solid rgba(215,188,121,.54);
  border-left: 1px solid rgba(215,188,121,.54);
}
.mod-square::after {
  right: 8px;
  bottom: 8px;
  border-right: 1px solid rgba(215,188,121,.42);
  border-bottom: 1px solid rgba(215,188,121,.42);
}
.mod-copy {
  padding: 38px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}
.mod-copy p {
  margin: 0;
}
.mod-copy p + p {
  margin-top: 18px;
}
.mod-copy strong {
  color: var(--gold-pale);
  font-weight: 600;
}
.mod-shot {
  display: grid;
  place-items: center;
  padding: 22px;
  overflow: hidden;
}
.mod-shot img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
}
.mod-page .mod-download {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 820px) {
  .mod-content-grid {
    grid-template-columns: 1fr;
  }
  .mod-square {
    min-height: 0;
  }
  .mod-copy {
    padding: 30px 28px;
  }
  .mod-shot {
    min-height: 300px;
  }
}

@media (max-width: 680px) {
  .mod-page {
    padding: 48px 0 58px;
  }
  .mod-copy {
    padding: 26px 22px;
  }
  .mod-shot {
    min-height: 240px;
    padding: 16px;
  }
  .mod-page .mod-download .btn {
    width: 100%;
  }
}


/* =========================================================
   Sharoms Modding — contenu final
   ========================================================= */

.simple-card-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.simple-card-grid--4{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.simple-card{
  min-height:245px;
  padding:30px 28px;
  display:flex;
  flex-direction:column;
  color:inherit;
  text-decoration:none;
  border:1px solid rgba(183,154,89,.24);
  background:
    linear-gradient(145deg,rgba(215,188,121,.04),transparent 34%),
    linear-gradient(180deg,rgba(18,17,14,.96),rgba(9,9,8,.96));
  transition:border-color .18s ease,transform .18s ease,background .18s ease;
}
a.simple-card:hover{
  transform:translateY(-2px);
  border-color:rgba(215,188,121,.46);
  background:
    linear-gradient(145deg,rgba(215,188,121,.065),transparent 34%),
    linear-gradient(180deg,rgba(24,22,17,.98),rgba(11,10,9,.98));
}
.simple-card h2{
  margin:0;
  color:#eee5d3;
  font:400 28px/1.12 var(--serif);
}
.simple-card p{
  margin:15px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.75;
}
.simple-card>span{
  margin-top:auto;
  padding-top:26px;
  color:var(--gold);
  font-size:10px;
  font-weight:700;
  letter-spacing:.15em;
  text-transform:uppercase;
}
.card-actions{
  margin-top:auto;
  padding-top:24px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.card-actions .btn{
  min-width:0;
}

/* Mod galleries */
.mod-content-grid--single{
  grid-template-columns:minmax(0,760px);
  justify-content:center;
}
.mod-gallery{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}
.gallery-card{
  position:relative;
  aspect-ratio:1/1;
  display:grid;
  place-items:center;
  padding:12px;
  overflow:hidden;
  border:1px solid rgba(183,154,89,.27);
  background:rgba(10,10,9,.84);
}
.gallery-card img{
  width:100%;
  height:100%;
  object-fit:contain;
  transition:transform .18s ease;
}
.gallery-card:hover img{ transform:scale(1.018); }
a.mod-shot{ text-decoration:none; }

/* Compatibility for migrated guides + databases */
:root{
  --mono:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;
  --radius:2px;
  --shadow:0 24px 70px rgba(0,0,0,.46);
}
.panel{
  position:relative;
  border:1px solid rgba(183,154,89,.24);
  background:
    linear-gradient(145deg,rgba(215,188,121,.025),transparent 34%),
    rgba(11,11,9,.90);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.012);
}
.panel+.panel{ margin-top:18px; }
.pad{ padding:30px; }
.title{
  margin:0;
  color:#ece2ce;
  font:400 clamp(26px,4vw,38px)/1.15 var(--serif);
}
.sub{
  color:var(--muted);
  font-size:13px;
  line-height:1.7;
}
.divider{
  height:1px;
  margin:22px 0;
  background:linear-gradient(90deg,rgba(183,154,89,.30),rgba(183,154,89,.08),transparent);
}
.dot{
  display:inline-block;
  width:5px;
  height:5px;
  margin-right:7px;
  transform:rotate(45deg) translateY(-1px);
  background:var(--gold);
}
.mobile{ display:none!important; }
.filters{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.field{
  min-height:44px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 12px;
  border:1px solid rgba(183,154,89,.22);
  background:#0a0a09;
}
.field input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  color:#e8dfce;
  background:transparent;
}
.stat{
  padding:8px 12px;
  border:1px solid rgba(183,154,89,.18);
  background:rgba(183,154,89,.035);
}
.stat .n{ color:var(--gold-pale); font-family:var(--mono); font-size:16px; }
.stat .t{ color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.1em; }
.empty{
  padding:24px;
  color:var(--muted);
  text-align:center;
  border:1px solid rgba(183,154,89,.16);
}
.muted-note{ color:var(--muted); }

/* make migrated tutorial pages breathe under shared header */
body[data-page="guides"] main.section,
body[data-page="databases"] main.section{ padding-top:54px; }

/* Databases inherit the new square language */
body[data-page="databases"] .armor-item,
body[data-page="databases"] .weap-item,
body[data-page="databases"] .tal-item,
body[data-page="databases"] .tool-box{
  border-radius:0!important;
}
body[data-page="databases"] .a-modal,
body[data-page="databases"] .w-modal,
body[data-page="databases"] .t-modal{
  border-radius:2px!important;
}

/* migrated guide images */
body[data-page="guides"] .tuto-img{
  border-radius:0!important;
  border-color:rgba(183,154,89,.28)!important;
}
body[data-page="guides"] .toc .btn,
body[data-page="guides"] .actions .btn{
  min-width:0;
}

@media(max-width:1050px){
  .simple-card-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mod-gallery{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:680px){
  .simple-card-grid,
  .simple-card-grid--4,
  .mod-gallery{ grid-template-columns:1fr; }
  .simple-card{ min-height:0; padding:25px 22px; }
  .simple-card h2{ font-size:25px; }
  .gallery-card{ aspect-ratio:4/3; }
  .pad{ padding:22px 18px; }
}

/* =========================================================
   Tools — two grouped panels
   ========================================================= */
.tool-group-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  align-items:stretch;
}
.tool-group{
  min-width:0;
  padding:30px 28px;
  display:flex;
  flex-direction:column;
  background:
    linear-gradient(145deg,rgba(215,188,121,.04),transparent 34%),
    linear-gradient(180deg,rgba(18,17,14,.96),rgba(9,9,8,.96));
}
.tool-group-title{
  margin:0 0 8px;
  padding:0 0 18px;
  color:#eee5d3;
  font:400 30px/1.12 var(--serif);
  border-bottom:1px solid rgba(183,154,89,.24);
}
.tool-entry{
  padding:22px 0;
  border-bottom:1px solid rgba(183,154,89,.14);
}
.tool-entry:last-child{
  padding-bottom:0;
  border-bottom:0;
}
.tool-entry h3{
  margin:0;
  color:#e8deca;
  font:400 23px/1.18 var(--serif);
}
.tool-entry p{
  margin:10px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.65;
}
.tool-entry .card-actions{
  margin-top:14px;
  padding-top:0;
}

@media(max-width:900px){
  .tool-group-grid{ grid-template-columns:1fr; }
}
@media(max-width:680px){
  .tool-group{ padding:25px 20px; }
  .tool-group-title{ font-size:27px; }
  .tool-entry h3{ font-size:21px; }
}

/* =========================================================
   Update 11 — pages de mods : description large + images dessous
   ========================================================= */
.mod-page-inner {
  width: min(1180px, 100%);
}

.mod-content-grid,
.mod-content-grid--single {
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
}

.mod-copy {
  min-height: 440px;
  padding: 52px 58px;
  font-size: 16px;
  line-height: 1.95;
}

.mod-shot {
  min-height: 460px;
  margin-top: 4px;
}

.mod-shot img {
  width: 100%;
  height: 100%;
  max-height: 620px;
  object-fit: contain;
}

.mod-gallery {
  margin-top: 22px;
}

@media (max-width: 820px) {
  .mod-copy {
    min-height: 360px;
    padding: 40px 36px;
  }

  .mod-shot {
    min-height: 360px;
  }
}

@media (max-width: 680px) {
  .mod-copy {
    min-height: 280px;
    padding: 30px 24px;
  }

  .mod-shot {
    min-height: 280px;
  }
}

/* =========================================================
   Update 12 — pages de mods : texte plus présent + bouton aéré
   ========================================================= */
.mod-page .mod-download {
  margin: 4px 0 36px;
}

.mod-copy {
  font-size: 19px;
  line-height: 1.85;
}

.mod-copy p + p {
  margin-top: 24px;
}

@media (max-width: 820px) {
  .mod-page .mod-download {
    margin-bottom: 30px;
  }

  .mod-copy {
    font-size: 18px;
    line-height: 1.8;
  }
}

@media (max-width: 680px) {
  .mod-page .mod-download {
    margin-top: 0;
    margin-bottom: 26px;
  }

  .mod-copy {
    font-size: 17px;
    line-height: 1.75;
  }
}

/* =========================================================
   Update 13 — identité Sharoms : PP-Malenia dans la navbar
   ========================================================= */
.brand-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: block;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(215,188,121,.42);
  background: #090907;
  box-shadow: 0 0 0 1px rgba(0,0,0,.65), 0 6px 20px rgba(0,0,0,.32);
}

@media (max-width: 680px) {
  .brand-avatar {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
}
