/*FONTS*/
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Uncial+Antiqua&display=swap');
@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Almendra+SC&display=swap');

/*COLOR PALETTE*/
:root {
  --nav-silver: #d7dfe6;
  --steel-dark: #6f7680;
  --nav-blue: #132238;
  --parchment: #f4efd9;
  --parchment-shadow: rgba(40,40,45,0.08);
  --seal-blue: #233b6a;
  --accent-gold: #d7c58b;
  --ink: #222;
  --board-wood: #2d2f33;
  --board-shadow: rgba(0,0,0,0.45);
}

/*BASE STYLES*/
* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: #0f1114;
  color: #e8eef6;
  font-family: Georgia, serif;
}

/*BANNER*/
.banner-wrapper {
  display: flex;
  justify-content: center;
  padding: 30px 12px;
  margin: 12px 0;
  background: url('../images/HOUSE-RULES-BG1.png') center top no-repeat;
  background-size: cover;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.banner-wrapper::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.0);
  pointer-events: none;
  z-index: 0;
}

.banner {
  width: 98%;
  max-width: 1200px;
  border-radius: 12px;
  border: 2px solid rgb(205,205,205);
  display: block;
  box-shadow: 0 8px 40px rgba(0,116,233,0.6);
  position: relative;
  z-index: 1;
}

/*NAVIGATION*/
.scroll-banner {
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.nav-list {
  margin: 0;
  padding: 8px 12px;
  list-style: none;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
}

.rune {
  font-family: 'Uncial Antiqua', serif;
  font-size: 1.2rem;
  color: var(--nav-silver);
  text-shadow: 0 0 8px rgba(160,190,255,0.15);
  animation: pulseRune 2.6s infinite ease-in-out;
}

@keyframes pulseRune {
  0%, 100% { opacity: .8; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.12); }
}

.nav-plate {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: 'Cinzel Decorative', Georgia, serif;
  font-weight: 700;
  text-decoration: none;
  color: var(--nav-blue);
  background: linear-gradient(180deg,#f0f4f8 0%, #cfd8df 100%);
  border: 1px solid rgba(90,100,110,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6),
              0 6px 18px rgba(10,15,20,0.35);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.nav-plate:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 4px 10px rgba(120,160,255,0.12));
}

.nav-plate.active {
  background: linear-gradient(180deg,#bcc9d6 0%, #9ea9b4 100%);
  color: #0d1726;
  box-shadow: inset 0 -6px 18px rgba(0,0,0,0.12),
              0 6px 18px rgba(0,0,0,0.45);
}

/*MAIN CONTENT*/
.hall-background {
  min-height: calc(100vh - 280px);
  padding: 40px 18px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background:
    linear-gradient(180deg, rgba(10,12,18,0.75), rgba(5,7,10,0.9)),
    url('../images/house-rules-bg3.png') no-repeat center top;
  background-size: cover;
}

/*BOARD*/
.board-container {
  width: 100%;
  padding: 40px 8px;
  display: flex;
  justify-content: center;
}

.board-frame {
  width: min(1200px, 95%);
  min-height: 500px;
  max-height: 800px;
  padding: 24px 28px;
  border-radius: 12px;
  position: relative;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(42,44,48,0.33), rgba(36,38,42,0.95)),
    url('../images/house-rules-bg2.png') center/cover no-repeat;
  border: 8px solid #c7ced6;
  box-shadow:
    0 24px 70px rgba(0,0,0,0.65),
    0 8px 24px var(--board-shadow);
}

/*CREST*/
.crest {
  width: 100%;
  height: 64px;
  margin: -12px 0 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.crest-metal {
  width: 100%;
  max-width: 360px;
  height: 64px;
  border-radius: 6px;
  font-family: 'MedievalSharp', Georgia, serif;
  font-size: 20px;
  letter-spacing: 1px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #0b1624;
  background: linear-gradient(180deg,#dfe6eb,#c8d1d9 70%);
  border: 1px solid rgba(90,100,110,0.28);
  box-shadow: inset 0 2px 6px rgba(255,255,255,0.25);
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

.crest-metal::after {
  content: "HOUSE RULES";
}

.crest-ornament {
  position: absolute;
  width: 100%;
  height: 0;
  pointer-events: none;
}

/*PANELS & PLATES RESPONSIVE*/
.decree-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
}

.decree-item {
  position: relative;
  min-width: 0;
  word-wrap: break-word;
  overflow: hidden;
}

.panel-header {
  margin-bottom: 6px;
  padding: 6px 10px;
}

.plate {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Cinzel Decorative', serif;
  font-weight: 700;
  color: var(--nav-blue);
  background: linear-gradient(180deg,#e9eef3 0%, #cfd8df 100%);
  border: 1px solid rgba(90,100,110,0.25);
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.plate:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 8px rgba(120,160,255,0.1));
}

/*PARCHMENT PANELS*/
.panel-body.parchment {
  display: none;
  width: 100%;
  max-width: 100%;
  padding: 16px 18px;
  min-height: 50px;
  max-height: 380px;
  overflow-y: auto;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--parchment), #efe9d0 60%);
  border: 1px solid rgba(70,70,75,0.08);
  color: var(--ink);
  box-shadow:
    0 8px 18px rgba(0,0,0,0.45),
    0 1px 0 rgba(255,255,255,0.03) inset;
  transition: all 0.3s ease;
}

#combat-toggle:checked ~ .panel-body.parchment,
#calledshot-toggle:checked ~ .panel-body.parchment,
#magic-toggle:checked ~ .panel-body.parchment,
#etiquette-toggle:checked ~ .panel-body.parchment {
  display: block;
  animation: unfurl 0.4s ease forwards;
  z-index: 10;
}

@keyframes unfurl {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.wax-seal {
  width: 48px;
  height: 48px;
  display: block;
  margin: 12px auto 0;
  transform: rotate(-8deg);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.45));
}

.rule-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.95rem;
  color: var(--ink);
  word-break: break-word;
}

.rule-table thead th {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 2px solid rgba(0,0,0,0.15);
  font-family: 'Almendra SC', serif;
  letter-spacing: .5px;
}

.rule-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.small-note { font-size: 0.875rem; opacity: 0.9; color: #333; }

#combat-toggle:checked ~ .panel-body.parchment .rule-table { font-size: 0.85rem; }

/*BOARD BOTTOM & FOOTER*/
.board-bottom {
  width: 100%;
  height: 16px;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.metal-footer {
  flex-shrink: 0; 
  padding: 22px 12px;
  display: flex;
  justify-content: center;
  color: #bfc7d2;
  background: linear-gradient(180deg,#1a1d22,#13161a);
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.metal-footer p { margin: 0; }

/*RESPONSIVE BREAKPOINTS*/
@media (max-width: 980px) {
  .board-frame { width: 95%; }
}

@media (max-width: 820px) {
  .decree-panel { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 560px) {
  .decree-panel { grid-template-columns: 1fr; }
  .crest-metal { width: 100%; max-width: 280px; }
  .rule-table { font-size: 0.8rem; }
  .plate { font-size: 0.9rem; padding: 6px 10px; }
}
