/* ==========================================================================
   ELITE-KAL — 2026 Summer Renovation layout layer
   Loads AFTER style.css: full-width shell, hero scene, plaque countdown,
   register modal, account drawer, new home sections. Sub-pages keep the
   style.css card/form/table styling.
   ========================================================================== */

:root {
  --summer-forest: #2f5233;
  --sunset-gold: #e8b45a;
  --summer-dusk-blue: #24344f;
  --grass-green: #4a6741;
  --petal-accent: #d9a0a0;
  --bronze: #8a6a3b;
  --bronze-dark: #5d472a;
}

/* ---- Full-width shell (kills the old 3-column grid) ---- */
.site-main-full { padding: 0; }
.subpage-container { padding-top: 28px; padding-bottom: 48px; }
.content-area-full { max-width: 980px; margin: 0 auto; }

/* ---- Header: account button ---- */
.nav-account-btn {
  margin-left: 18px;
  padding: 8px 22px;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--gold-light);
  border: 1px solid var(--gold-border-hover);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(200,168,78,0.12), rgba(200,168,78,0.03));
  transition: all var(--transition-fast);
}
.nav-account-btn:hover { background: rgba(200,168,78,0.2); box-shadow: 0 0 14px var(--gold-glow-strong); }

/* ---- Account drawer ---- */
.account-drawer {
  position: fixed;
  top: 0; right: -360px;
  width: 340px; max-width: 92vw;
  height: 100%;
  z-index: 1200;
  background: linear-gradient(180deg, #10141d 0%, #0c1017 100%);
  border-left: 1px solid var(--gold-border-hover);
  box-shadow: -12px 0 40px rgba(0,0,0,0.6);
  transition: right 0.28s ease;
  padding: 68px 22px 22px;
  overflow-y: auto;
}
.account-drawer.open { right: 0; }

/* ==========================================================================
   HERO SCENE — layered ancient-Korean summer evening
   ========================================================================== */
.hero-scene {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid var(--gold-border);
}
.hero-scene > div[class^="hs-"] { position: absolute; inset: 0; pointer-events: none; }

/* Fortress artwork base layer */
.hs-bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* keep the gate + lower city in frame; the baked warrior centers near 49% width */
  object-position: 50% 68%;
}
/* Neutral warm grade over the artwork so text stays readable; tod rules re-tint this */
.hs-tint {
  background:
    linear-gradient(90deg, rgba(8,11,18,0.62) 0%, rgba(8,11,18,0.30) 38%, rgba(8,11,18,0.05) 65%, rgba(8,11,18,0.25) 100%),
    linear-gradient(180deg, rgba(8,11,18,0.45) 0%, transparent 22%, transparent 70%, rgba(8,11,18,0.55) 100%);
}

/* Sky: deep summer blue fading to warm dusk at the horizon */
.hs-sky {
  background:
    linear-gradient(180deg,
      #131c2e 0%,
      var(--summer-dusk-blue) 34%,
      #3d4a63 58%,
      #7a5d43 78%,
      #a8764a 92%,
      #b8824e 100%);
}
/* Low sun glow behind the fortress */
.hs-sun {
  background: radial-gradient(ellipse 46% 34% at 62% 84%,
    rgba(240,190,110,0.55) 0%,
    rgba(232,180,90,0.28) 34%,
    rgba(220,160,80,0.10) 60%,
    transparent 78%);
}
/* Slow drifting cloud bands (two layers, different speeds) */
.hs-clouds {
  background-repeat: repeat-x;
  background-size: 1600px 100%;
  opacity: 0.5;
}
.hs-clouds-far {
  background-image:
    radial-gradient(ellipse 300px 34px at 18% 22%, rgba(210,200,190,0.16) 0%, transparent 70%),
    radial-gradient(ellipse 420px 40px at 55% 15%, rgba(200,190,185,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 260px 26px at 84% 27%, rgba(215,205,195,0.13) 0%, transparent 70%);
  animation: hsCloudDrift 180s linear infinite;
}
.hs-clouds-near {
  background-image:
    radial-gradient(ellipse 500px 44px at 30% 34%, rgba(190,178,168,0.11) 0%, transparent 70%),
    radial-gradient(ellipse 340px 32px at 74% 40%, rgba(200,185,170,0.10) 0%, transparent 70%);
  animation: hsCloudDrift 110s linear infinite reverse;
}
@keyframes hsCloudDrift { from { background-position-x: 0; } to { background-position-x: 1600px; } }

/* Mountain silhouettes (CSS polygons via clip-path on gradient fills) */
.hs-mountains-far {
  background: linear-gradient(180deg, #26364a 0%, #1d2b3c 100%);
  clip-path: polygon(0 100%, 0 66%, 7% 58%, 15% 64%, 24% 52%, 33% 62%, 42% 50%, 52% 61%, 63% 48%, 74% 60%, 84% 52%, 93% 60%, 100% 55%, 100% 100%);
  opacity: 0.85;
}
.hs-mountains-near {
  background: linear-gradient(180deg, #1c2e26 0%, #14211b 60%, #101a15 100%);
  clip-path: polygon(0 100%, 0 78%, 9% 70%, 19% 77%, 28% 66%, 39% 76%, 50% 68%, 61% 77%, 72% 69%, 82% 78%, 91% 72%, 100% 79%, 100% 100%);
}
/* Fortress silhouette on the near ridge: walls + tiered pavilion roofs */
.hs-fortress {
  background:
    /* pavilion upper roof */
    linear-gradient(180deg, #0e1512 0%, #0e1512 100%) no-repeat 68% 58% / 130px 12px,
    /* pavilion lower roof */
    linear-gradient(180deg, #0d1411 0%, #0d1411 100%) no-repeat 68% 64% / 190px 13px,
    /* pavilion body */
    linear-gradient(180deg, #0c130f 0%, #0c130f 100%) no-repeat 68% 66% / 110px 52px,
    /* wall */
    linear-gradient(180deg, #0d1310 0%, #0d1310 100%) no-repeat 62% 76% / 460px 34px,
    /* gate tower */
    linear-gradient(180deg, #0c1310 0%, #0c1310 100%) no-repeat 55% 68% / 70px 60px;
  opacity: 0.92;
  filter: drop-shadow(0 -2px 12px rgba(232,180,90,0.12));
}
/* Warm lantern points along the wall (glow pulses handled in season css) */
.hs-lanterns {
  background:
    radial-gradient(circle 3px at 56% 76%, rgba(255,196,110,0.95) 0%, rgba(255,170,80,0.32) 45%, transparent 70%),
    radial-gradient(circle 2px at 61% 78%, rgba(255,190,105,0.9) 0%, rgba(255,166,76,0.28) 45%, transparent 70%),
    radial-gradient(circle 3px at 67% 74%, rgba(255,200,115,0.95) 0%, rgba(255,176,84,0.32) 45%, transparent 70%),
    radial-gradient(circle 2px at 72% 77%, rgba(255,192,108,0.9) 0%, rgba(255,168,78,0.28) 45%, transparent 70%),
    radial-gradient(circle 2px at 47% 79%, rgba(255,186,100,0.8) 0%, transparent 70%);
}
/* Mist bands between the ridges */
.hs-mist { opacity: 0.5; }
.hs-mist-far {
  background: linear-gradient(180deg, transparent 60%, rgba(190,200,210,0.10) 68%, rgba(190,200,210,0.05) 76%, transparent 84%);
}
.hs-mist-near {
  background: linear-gradient(180deg, transparent 72%, rgba(180,195,205,0.09) 80%, rgba(180,195,205,0.04) 88%, transparent 96%);
}
.hs-vignette {
  background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(5,8,14,0.55) 100%);
}

/* ---- Hero content grid ---- */
.hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 44px;
  min-height: 640px;
}
.hero-copy { max-width: 46%; }
/* The interactive knight stands exactly over the artwork's baked warrior
   (image width maps 1:1 to the hero under cover-crop; warrior center ~49%). */
.hero-knight {
  position: absolute;
  left: 49.5%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 460px;
  max-width: 36vw;
}
/* Depth-of-field plate: melts the artwork's baked warrior into bokeh so the
   interactive 3D knight in front reads as THE warrior of the scene. */
.knight-backplate {
  position: absolute;
  left: 50%; bottom: -10px;
  width: 130%; height: 620px;
  transform: translateX(-50%);
  backdrop-filter: blur(14px) brightness(0.86) saturate(0.9);
  -webkit-backdrop-filter: blur(14px) brightness(0.86) saturate(0.9);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 55%, #000 52%, transparent 76%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 55%, #000 52%, transparent 76%);
  pointer-events: none;
}
/* The ELITE-KAL wordmark lives in the header beside the logo (see .logo-wordmark);
   the hero leads with the slogan plaque only. */
.hero-slogan {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #f2dfae;
  padding: 6px 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(138,106,59,0.65);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(232,180,90,0.16), rgba(232,180,90,0.04));
  box-shadow: inset 0 1px 0 rgba(232,180,90,0.25), 0 2px 14px rgba(0,0,0,0.5);
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

/* ---- Server status pill ---- */
.server-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 18px 0 6px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,14,20,0.55);
  backdrop-filter: blur(3px);
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 2px;
}
.server-status .status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #6a7484;
}
.server-status .status-text { color: #a8b0bd; }
.server-status[data-status="online"] .status-dot { background: var(--korean-jade); box-shadow: 0 0 10px rgba(45,107,79,0.9); animation: statusPulse 2.4s ease-in-out infinite; }
.server-status[data-status="online"] .status-text { color: #6fbf95; }
.server-status[data-status="offline"] .status-dot { background: var(--korean-red); box-shadow: 0 0 10px rgba(155,35,53,0.9); }
.server-status[data-status="offline"] .status-text { color: #d4707f; }
.server-status[data-status="maintenance"] .status-dot,
.server-status[data-status="restarting"] .status-dot { background: var(--gold); box-shadow: 0 0 10px var(--gold-glow-strong); animation: statusPulse 1.6s ease-in-out infinite; }
.server-status[data-status="maintenance"] .status-text,
.server-status[data-status="restarting"] .status-text { color: var(--gold-light); }
@keyframes statusPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ---- Countdown plaque (bronze) ---- */
.countdown-plaque {
  margin-top: 22px;
  max-width: 480px;
  padding: 18px 22px 16px;
  border-radius: var(--radius-md);
  position: relative;
  background:
    linear-gradient(180deg, rgba(26,22,14,0.92) 0%, rgba(16,14,9,0.94) 100%);
  border: 1px solid var(--bronze);
  box-shadow:
    inset 0 1px 0 rgba(232,180,90,0.25),
    inset 0 -1px 0 rgba(0,0,0,0.6),
    0 6px 28px rgba(0,0,0,0.5),
    0 0 30px rgba(232,180,90,0.10);
}
.countdown-plaque::before {
  content: "";
  position: absolute; inset: 3px;
  border: 1px solid rgba(138,106,59,0.45);
  border-radius: 6px;
  pointer-events: none;
}
.plaque-eyebrow {
  font-family: 'Cinzel', serif;
  text-align: center;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sunset-gold);
  margin-bottom: 10px;
}
.countdown-plaque .countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.countdown-plaque .cd-unit {
  text-align: center;
  padding: 8px 4px 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(232,180,90,0.10), rgba(232,180,90,0.02));
  border: 1px solid rgba(138,106,59,0.5);
}
.countdown-plaque .cd-num {
  display: block;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 30px;
  color: #f2dfae;
  text-shadow: 0 0 16px rgba(232,180,90,0.45);
  font-variant-numeric: tabular-nums;
}
.countdown-plaque .cd-lbl {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9c8a63;
  margin-top: 2px;
}
.countdown-plaque .countdown-live {
  display: none;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--gold-light);
  letter-spacing: 2px;
  padding: 6px 0;
}
.countdown-plaque.is-live .countdown-grid { display: none; }
.countdown-plaque.is-live .countdown-live { display: block; animation: statusPulse 1.8s ease-in-out infinite; }

/* ---- 3D knight viewer ---- */
.hero-knight { position: relative; text-align: center; }
.knight-viewer {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 580px;
  margin: 0 auto;
  cursor: grab;
}
.knight-viewer:active { cursor: grabbing; }
.knight-viewer canvas { position: relative; z-index: 2; }
.knight-shadow {
  position: absolute;
  left: 50%; bottom: 34px;
  width: 240px; height: 44px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 55%, transparent 75%);
  z-index: 1;
}
.knight-dust {
  position: absolute; inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.knight-dust .dust-mote {
  position: absolute;
  bottom: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(40,34,26,0.55) 0%, rgba(24,20,16,0.25) 60%, transparent 80%);
  animation: dustRise linear infinite;
  opacity: 0;
}
@keyframes dustRise {
  0%   { transform: translate(0, 0) scale(0.7); opacity: 0; }
  12%  { opacity: 0.55; }
  70%  { opacity: 0.25; }
  100% { transform: translate(var(--dx, 20px), -160px) scale(1.5); opacity: 0; }
}
.knight-hint {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(205,191,159,0.55);
  margin-top: -26px;
  position: relative;
  z-index: 3;
}

/* ==========================================================================
   HOME SECTIONS
   ========================================================================== */
.home-sections { padding: 40px 16px 56px; }
.section-heading {
  font-family: 'Cinzel', serif;
  font-size: 19px;
  color: var(--gold-light);
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}
.see-all-link { font-size: 13px; letter-spacing: 1px; }

.features-grid-summer .feature-card h3 { font-family: 'Cinzel', serif; }
.feature-card-fort { border-color: rgba(45,107,79,0.5); }
.feature-card-fort:hover {
  border-color: var(--sunset-gold);
  box-shadow: 0 0 34px rgba(232,180,90,0.18), var(--shadow-lg);
}
.feature-card-fort:hover .feature-bg { transform: scale(1.06); filter: brightness(1.15) saturate(1.05); }
.feature-card .feature-bg { transition: transform 0.6s ease, filter 0.6s ease; }

.home-duo {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
.top-players-panel {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 14px;
}

/* Castle showcase */
.home-duo-castle { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.castle-showcase {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gold-border-hover);
  min-height: 240px;
  display: flex;
  align-items: center;
}
.castle-showcase-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(0.8);
}
.castle-showcase-inner {
  position: relative;
  z-index: 2;
  padding: 28px 30px;
  width: 100%;
  text-align: center;
  background: linear-gradient(180deg, rgba(10,12,18,0.25), rgba(10,12,18,0.55));
}
.castle-showcase-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--sunset-gold);
}
.castle-showcase-owner .castle-crown { font-size: 34px; display: block; margin: 8px 0 2px; color: var(--gold-light); }
.castle-showcase-owner .castle-owner-name {
  font-family: 'Cinzel', serif;
  font-size: 30px;
  font-weight: 700;
  color: #f2e5c4;
  text-shadow: 0 0 22px rgba(232,180,90,0.4);
}
.castle-showcase-sub { color: var(--text-secondary); font-size: 13px; margin-top: 6px; }

.events-strip .event-list { background: var(--bg-card); border: 1px solid var(--gold-border); border-radius: var(--radius-lg); padding: 10px 14px; }

/* Discord banner */
.discord-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gold-border-hover);
  background: linear-gradient(90deg, rgba(30,36,54,0.7), rgba(20,26,40,0.7));
  font-family: 'Cinzel', serif;
  letter-spacing: 2px;
  color: var(--gold-light);
  transition: all var(--transition);
}
.discord-banner:hover { box-shadow: 0 0 26px rgba(88,101,242,0.25); border-color: #5865f2; color: #fff; }
.discord-banner-icon { width: 34px; height: 34px; }

/* ==========================================================================
   REGISTER MODAL
   ========================================================================== */
.reg-modal-overlay {
  position: fixed; inset: 0;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4,6,10,0.78);
  backdrop-filter: blur(3px);
  padding: 18px;
}
.reg-modal-overlay.open { display: flex; }
.reg-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #151a26 0%, #0e1219 100%);
  border: 1px solid var(--gold-border-hover);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 60px rgba(0,0,0,0.7), 0 0 40px rgba(232,180,90,0.08);
  padding: 30px 28px 26px;
}
.reg-modal-close {
  position: absolute; top: 10px; right: 14px;
  font-size: 26px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}
.reg-modal-close:hover { color: var(--gold-light); }
.reg-title { font-family: 'Cinzel', serif; font-size: 22px; color: var(--gold-light); margin-bottom: 4px; }
.reg-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 18px; }
.reg-label { display: block; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-secondary); margin: 12px 0 5px; }
.reg-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}
.reg-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-glow); }
.reg-captcha-row { display: flex; align-items: center; gap: 8px; }
.reg-captcha-row img { border-radius: 6px; height: 34px; }
.reg-captcha-refresh { font-size: 18px; color: var(--gold); padding: 4px 8px; }
.reg-input-code { flex: 1; min-width: 0; }
.reg-field-error { color: var(--error); font-size: 12px; min-height: 4px; margin-top: 3px; }
.reg-global-error { margin-top: 10px; text-align: center; }
.reg-submit { width: 100%; margin-top: 16px; }
.reg-agree { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 10px; }

.sn-display-modal {
  font-family: 'Consolas', monospace;
  font-size: 17px;
  letter-spacing: 1px;
  text-align: center;
  padding: 14px 10px;
  margin: 12px 0 10px;
  border-radius: var(--radius-sm);
  background: rgba(232,180,90,0.07);
  border: 1px dashed var(--bronze);
  color: #f2dfae;
  user-select: all;
  word-break: break-all;
}
.sn-copy-btn { width: 100%; }
.sn-copy-btn.copied { border-color: var(--korean-jade); color: #6fbf95; }
.reg-sn-warning { font-size: 12.5px; color: #d4a15f; margin: 14px 0 10px; line-height: 1.5; }
.reg-ack-row { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.reg-done-actions { margin-top: 16px; }
.reg-dl-btn { width: 100%; text-align: center; }
.reg-dl-btn[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }

/* ==========================================================================
   NEWS PAGE
   ========================================================================== */
.news-entry {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 18px;
}
.news-entry h3 { font-family: 'Cinzel', serif; color: var(--gold-light); margin-bottom: 2px; }
.news-entry .news-date { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; }
.news-entry pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.6;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; padding-top: 40px; }
  .hero-copy { max-width: none; }
  .hero-knight { position: static; transform: none; width: auto; max-width: none; margin-top: 8px; }
  .hero-actions { justify-content: center; }
  .countdown-plaque { margin-left: auto; margin-right: auto; }
  .knight-viewer { height: 420px; }
  .home-duo, .home-duo-castle { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero-scene { min-height: 520px; }
  .knight-viewer { height: 340px; max-width: 300px; }
  .countdown-plaque .cd-num { font-size: 22px; }
}

/* ==========================================================================
   ROUND 6 — evaluator fixes: ornate frame, plaque CTAs, card art, wood tones
   ========================================================================== */

/* 1) Hero fills tall; no black void under the countdown */
.hero-scene { min-height: 730px; }
.hero-grid { min-height: 730px; }
.hs-tint {
  background:
    linear-gradient(90deg, rgba(8,11,18,0.60) 0%, rgba(8,11,18,0.28) 38%, rgba(8,11,18,0.04) 65%, rgba(8,11,18,0.22) 100%),
    linear-gradient(180deg, rgba(8,11,18,0.42) 0%, transparent 20%, transparent 82%, rgba(8,11,18,0.42) 100%);
}

/* 2) Ornate page frame */
:root { --frame-w: 64px; }
.page-frame { position: fixed; z-index: 900; pointer-events: none; }
.pf-top, .pf-bottom {
  left: 0; right: 0; height: 14px;
  background:
    repeating-linear-gradient(90deg, #17120c 0 46px, #241a10 46px 92px),
    linear-gradient(180deg, #2a1f12, #120d07);
  background-blend-mode: overlay;
  border-bottom: 1px solid rgba(200,168,78,0.25);
}
.pf-top { top: 0; }
.pf-bottom { bottom: 0; border-bottom: 0; border-top: 1px solid rgba(200,168,78,0.25); }
.pf-left, .pf-right {
  top: 0; bottom: 0; width: var(--frame-w);
  background:
    linear-gradient(90deg, #1d150c 0%, #2b2013 30%, #1a130b 70%, #0f0a06 100%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.22) 0 3px, transparent 3px 9px);
  box-shadow: inset -6px 0 14px rgba(0,0,0,0.55);
}
.pf-left { left: 0; }
.pf-right { right: 0; transform: scaleX(-1); }
.pf-left::before, .pf-right::before, .pf-left::after, .pf-right::after {
  content: "";
  position: absolute; left: 50%;
  width: 34px; height: 34px;
  transform: translateX(-50%);
  border: 2px solid rgba(200,168,78,0.5);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45,107,79,0.5) 0%, rgba(24,32,26,0.8) 60%);
  box-shadow: 0 0 12px rgba(200,168,78,0.2);
}
.pf-left::before, .pf-right::before { top: 26px; }
.pf-left::after, .pf-right::after { bottom: 26px; }
.pf-paper {
  position: absolute;
  top: 17%; bottom: 24%;
  left: 50%; width: 40px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #e8dcc0 0%, #d9cba8 55%, #c9b990 100%);
  border: 1px solid #6d5a38;
  border-radius: 3px;
  box-shadow: inset 0 0 14px rgba(120,95,55,0.45), 0 3px 10px rgba(0,0,0,0.5);
  overflow: hidden;
}
.pf-paper > span:first-child { display: none; }
.pf-callig {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  writing-mode: vertical-rl;
  font-family: serif;
  font-size: 15px;
  letter-spacing: 8px;
  line-height: 40px;
  color: #4a3a22;
  opacity: 0.9;
}
.pf-callig br { display: none; }
.pf-tassel {
  position: absolute;
  bottom: -46px; left: 50%;
  width: 4px; height: 40px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #8a2a35, #5d1a22);
  border-radius: 2px;
}
.pf-tassel::before {
  content: "";
  position: absolute; top: -8px; left: 50%;
  width: 12px; height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: #9B2335;
  border: 1px solid rgba(200,168,78,0.5);
}
@media (min-width: 1280px) {
  .announcement-bar, .site-header, .site-main, .site-footer { margin-left: var(--frame-w); margin-right: var(--frame-w); }
  body { padding-top: 14px; }
}
@media (max-width: 1279px) { .page-frame { display: none; } }

/* 3) Plaque CTAs */
.btn-plaque {
  display: inline-block;
  position: relative;
  min-width: 230px;
  padding: 15px 34px;
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  color: #f2dfae;
  border: 2px solid #9a7d30;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(20,14,8,0.9),
    inset 0 0 0 3px rgba(200,168,78,0.35),
    0 4px 18px rgba(0,0,0,0.55),
    0 0 22px rgba(232,180,90,0.12);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}
.btn-plaque-green { background: linear-gradient(180deg, #2c4a33 0%, #1c3123 60%, #142519 100%); }
.btn-plaque-dark  { background: linear-gradient(180deg, #23201a 0%, #16130e 100%); }
.btn-plaque:hover {
  color: #fff;
  border-color: var(--gold-light);
  box-shadow:
    inset 0 0 0 1px rgba(20,14,8,0.9),
    inset 0 0 0 3px rgba(228,199,107,0.55),
    0 4px 22px rgba(0,0,0,0.6),
    0 0 30px rgba(232,180,90,0.3);
  transform: translateY(-1px);
}

/* 4) Feature cards: full-bleed art, medallion left, gold serif titles */
.fc-summer {
  position: relative;
  min-height: 128px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(200,168,78,0.35);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.7), inset 0 0 0 2px rgba(200,168,78,0.14), var(--shadow-md);
}
.fc-summer .feature-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(0.9) brightness(0.85);
}
.fc-summer::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,10,14,0.88) 0%, rgba(8,10,14,0.55) 55%, rgba(8,10,14,0.25) 100%);
}
.fc-summer .fc-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 22px;
  min-height: 128px;
}
.fc-summer .fc-medallion {
  flex: 0 0 54px;
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  border-radius: 50%;
  color: #d9e8cf;
  background: radial-gradient(circle, rgba(45,107,79,0.55) 0%, rgba(20,28,24,0.9) 75%);
  border: 2px solid rgba(200,168,78,0.55);
  box-shadow: 0 0 14px rgba(200,168,78,0.18);
}
.fc-summer h3 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--gold-light) !important;
  margin: 0 0 4px;
  text-align: left;
}
.fc-summer p { color: #cfd6dd; font-size: 13px; margin: 0; text-align: left; line-height: 1.5; }
.fc-summer .feature-icon { display: none; }
.fc-summer:hover .feature-bg { opacity: 0.75; transform: scale(1.05); }

/* 5) Announcement bar: dark wood + gold */
.announcement-bar {
  background: linear-gradient(180deg, #241a10 0%, #170f08 100%) !important;
  border-bottom: 1px solid rgba(200,168,78,0.35);
}
.announcement-bar p { color: #e4c76b !important; font-family: 'Cinzel', serif; letter-spacing: 1.5px; font-size: 12px; }
.announcement-bar #annCountdown { color: #fff; }

/* 6) Lower panels: gold double border, compact, on-palette */
.home-sections .card,
.top-players-panel,
.events-strip .event-list,
.castle-showcase {
  border: 1px solid rgba(200,168,78,0.4);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.75), inset 0 0 0 2px rgba(200,168,78,0.13), var(--shadow-md);
  background: linear-gradient(180deg, #151a22 0%, #0e1218 100%);
}
.castle-showcase-bg { opacity: 0.16; filter: saturate(0.55) brightness(0.8); }
.castle-showcase-inner { background: linear-gradient(180deg, rgba(10,12,18,0.15), rgba(10,12,18,0.5)); }
.events-strip .widget-accent-img { display: none; }
.vote-section { padding: 6px 0 2px; }
.section-heading::before { content: "\2748  "; color: var(--korean-red); font-size: 14px; }

/* 7) Roof-tile footer */
.site-footer-roof {
  position: relative;
  margin-top: 40px;
  padding: 0 0 20px;
  background: linear-gradient(180deg, #171209 0%, #0c0906 100%);
  border-top: 1px solid rgba(200,168,78,0.3);
  text-align: center;
}
.site-footer-roof .roof-tiles {
  height: 26px;
  background:
    radial-gradient(circle 12px at 12px 0, #221a10 11px, transparent 12px) repeat-x,
    linear-gradient(180deg, #191307, #0e0a05);
  background-size: 24px 26px, 100% 100%;
  border-bottom: 1px solid rgba(200,168,78,0.2);
}
.footer-url {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--gold-light);
  padding: 16px 0 4px;
  text-shadow: 0 0 14px rgba(232,180,90,0.35);
}
.site-footer-roof .footer-copy { color: var(--text-muted); font-size: 11px; }

/* 8) Header: warm wood, serif lockup, gold nav underline */
.site-header {
  background: linear-gradient(180deg, rgba(30,22,13,0.97) 0%, rgba(16,12,8,0.97) 100%) !important;
  border-bottom: 1px solid rgba(200,168,78,0.3);
}
.logo-lockup { display: flex; align-items: center; gap: 12px; }
.logo-wordmark {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 3px;
  line-height: 1;
  color: #f2e5c4;
  text-shadow: 0 0 22px rgba(232,180,90,0.35), 0 2px 10px rgba(0,0,0,0.8);
}
.logo-wordmark span { color: var(--sunset-gold); }
.header-kal-logo {
  width: 46px; height: 46px;
  object-fit: contain;
  border: 1px solid rgba(200,168,78,0.45);
  border-radius: 50%;
  padding: 3px;
  background: radial-gradient(circle, rgba(232,180,90,0.14), transparent 70%);
}
.main-nav .nav-link { font-family: 'Cinzel', serif; letter-spacing: 1.5px; font-size: 13px; }
.main-nav .nav-link.active { position: relative; color: var(--gold-light); }
.main-nav .nav-link.active::after {
  content: "\2756";
  position: absolute;
  left: 50%; bottom: -14px;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--gold);
}
.nav-account-btn { border-width: 2px; font-weight: 700; }

/* ==========================================================================
   ROUND 7 — hero compression, top-players table, update card, brighter cards
   ========================================================================== */

/* 1) Compress the hero: countdown in the lower third, cards right after */
.hero-scene { min-height: 660px; max-height: 700px; }
.hero-grid { min-height: 660px; padding-top: 44px; padding-bottom: 30px; }
.home-sections { padding-top: 26px; }

/* 2) Slogan spacing */
.hero-slogan { display: inline-block; margin: 0 0 18px; }

/* 6) Countdown plaque breathing room */
.countdown-plaque { max-width: 520px; padding: 20px 26px 20px; }
.countdown-plaque .countdown-grid { gap: 14px; }
.countdown-plaque .cd-unit { padding: 12px 6px 9px; }
.countdown-plaque .cd-num { font-size: 34px; }

/* 7) Status pill: bare dot + caps text on the art */
.server-status {
  padding: 0;
  border: 0;
  background: none;
  backdrop-filter: none;
  margin: 16px 0 4px;
}
.server-status .status-text { letter-spacing: 2.5px; font-size: 12.5px; }
.server-status[data-status="online"] .status-text { color: #7fd3a4; text-shadow: 0 1px 6px rgba(0,0,0,0.8); }

/* 5) Feature card art legible */
.fc-summer .feature-bg { opacity: 0.85; filter: saturate(1) brightness(0.95); }
.fc-summer::after {
  background: linear-gradient(90deg, rgba(8,10,14,0.82) 0%, rgba(8,10,14,0.45) 52%, rgba(8,10,14,0.12) 100%);
}

/* 3) Top Players table */
.tp-table-wrap { padding: 4px 6px 8px; }
.tp-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 10px 10px;
}
.tp-title {
  font-family: 'Cinzel', serif;
  font-size: 19px;
  color: var(--gold-light);
  letter-spacing: 1.5px;
}
.tp-title::before { content: "\265B  "; color: var(--korean-red); font-size: 15px; }
.tp-viewall {
  font-size: 10.5px;
  letter-spacing: 1.5px;
  color: #9c8a63;
}
.tp-viewall:hover { color: var(--gold-light); }
.tp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tp-table th {
  font-family: 'Cinzel', serif;
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9c8a63;
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(200,168,78,0.25);
}
.tp-table td {
  padding: 9px 10px;
  text-align: center;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.tp-table .tp-l { text-align: left; }
.tp-table .tp-rank { font-size: 15px; width: 40px; }
.tp-table .tp-name { color: #e6edf3; font-weight: 600; }
.tp-table .tp-guild { color: #b8a878; }
.tp-table .tp-rb { color: var(--sunset-gold); font-size: 11px; font-weight: 700; }
.tp-table tr:hover td { background: rgba(200,168,78,0.04); }
.tp-empty td { opacity: 0.4; }

/* 4) Latest Update card (thumbnail + date badge + summary + view details) */
.lu-head-row { display: flex; align-items: center; justify-content: space-between; }
.lu-arrows { display: flex; gap: 6px; }
.lu-arrow {
  width: 30px; height: 26px;
  font-size: 17px;
  line-height: 1;
  color: var(--gold-light);
  border: 1px solid rgba(200,168,78,0.4);
  border-radius: 4px;
  background: rgba(200,168,78,0.06);
  transition: all var(--transition-fast);
}
.lu-arrow:hover { background: rgba(200,168,78,0.18); }
.hero-slider { min-height: 0; }
.us-card {
  display: none;
  align-items: stretch;
  gap: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #151a22 0%, #0e1218 100%);
  border: 1px solid rgba(200,168,78,0.4);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.75), inset 0 0 0 2px rgba(200,168,78,0.13), var(--shadow-md);
}
.us-card.active { display: flex; }
.us-thumb {
  position: relative;
  flex: 0 0 190px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(200,168,78,0.3);
}
.us-thumb img { width: 100%; height: 100%; object-fit: cover; min-height: 132px; }
.us-date {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 8px;
  font-family: 'Cinzel', serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: var(--korean-red);
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.us-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.us-title {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  color: #f2e5c4;
  margin: 6px 0 6px;
}
.us-summary { font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin-bottom: 12px; }
.us-viewdetails {
  margin-top: auto;
  padding: 7px 18px;
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid rgba(200,168,78,0.5);
  border-radius: 4px;
  transition: all var(--transition-fast);
}
.us-viewdetails:hover { background: rgba(200,168,78,0.14); color: #fff; }
.hero-slider .slider-dots { margin-top: 8px; }

/* 8) Vote strip: compact, on-palette */
.vote-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 16px 22px;
  background: linear-gradient(180deg, #151a22 0%, #0e1218 100%);
  border: 1px solid rgba(200,168,78,0.4);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.75), inset 0 0 0 2px rgba(200,168,78,0.13), var(--shadow-md);
}
.vote-strip h3 {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  color: var(--gold-light);
  margin: 0 0 3px;
}
.vote-strip p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.vote-strip .vote-btn img { max-height: 56px; }

/* ==========================================================================
   ROUND 8 — countdown centering, panel voids, castle tighten, tagline clean
   ========================================================================== */

/* 1) Countdown digits dead-center in their cells (beats old style.css .cd-*) */
.hero-scene { max-height: none; min-height: 640px; }
.hero-grid { min-height: 640px; }
.countdown-plaque .countdown-grid { display: grid !important; grid-template-columns: repeat(4, 1fr); flex-wrap: nowrap; }
.countdown-plaque .cd-unit {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 88px;
  padding: 6px 4px !important;
  background: linear-gradient(180deg, rgba(232,180,90,0.10), rgba(232,180,90,0.02));
  border: 1px solid rgba(138,106,59,0.5);
}
.countdown-plaque .cd-num {
  font-size: 34px !important;
  line-height: 1 !important;
  color: #f2dfae !important;
}
.countdown-plaque .cd-lbl { margin-top: 5px !important; color: #9c8a63 !important; }

/* 3) Latest Update: kill the old slider's fixed 380px height; compact card */
#heroSlider.hero-slider { height: auto; border: 0; overflow: visible; margin-bottom: 8px; }
.us-card { min-height: 150px; }
.us-thumb { flex: 0 0 230px; max-height: 150px; }
.us-thumb img { height: 150px; }
.us-body { padding: 2px 0; }
.us-summary { margin-bottom: 8px; }

/* 4) Lords of the Castle: tight, parchment-gold, no red void */
.castle-showcase { min-height: 0; }
.castle-showcase-bg { display: none; }
.castle-showcase-inner {
  padding: 20px 26px;
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(232,180,90,0.10), transparent 60%),
    linear-gradient(180deg, #171d18 0%, #10150f 100%);
}
.castle-showcase-owner .castle-showcase-owner, .castle-showcase-owner .castle-crown { margin: 4px 0 0; font-size: 28px; }
.castle-showcase-owner .castle-owner-name { font-size: 26px; }
.castle-showcase .btn { margin-top: 8px; }

/* 5) Tagline directly on the art — no band, ornaments keep */

/* 6) Trim residual hero art band under the plaque */
.hero-grid { padding-bottom: 22px; }
.countdown-plaque { margin-top: 16px; }

/* Evaluator sign-off nice-to-haves: bigger update thumbnail, tighter hero tail */
.us-thumb { flex: 0 0 300px; max-height: 168px; }
.us-thumb img { height: 168px; }
.us-card { min-height: 168px; }
.hero-grid { padding-bottom: 14px; }

/* ==========================================================================
   ROUND 9 — one-screen fit: the whole homepage composition lands in a single
   ~768px-tall viewport like the mock (hero ~55vh, compact cards/panels).
   ========================================================================== */

/* Announcement + header slimmer */
.announcement-bar p { font-size: 11px; padding: 4px 0; }
.site-header .header-inner { min-height: 54px; }
.header-kal-logo { width: 34px; height: 34px; }
.nav-account-btn { padding: 6px 16px; font-size: 11.5px; }

/* Hero: ~55vh like the mock's proportion */
.hero-scene { min-height: 0; height: clamp(400px, 58vh, 560px); }
.hero-grid {
  min-height: 0;
  height: 100%;
  padding-top: 22px;
  padding-bottom: 12px;
  align-items: start;
}
.hero-slogan { font-size: 11px; padding: 4px 14px; margin-bottom: 10px; }
.btn-plaque { min-width: 180px; padding: 11px 22px; font-size: 14px; }
.server-status { margin: 10px 0 2px; }
.server-status .status-text { font-size: 11px; }

/* Countdown plaque compact */
.countdown-plaque { max-width: 430px; padding: 12px 16px 12px; margin-top: 10px; }
.plaque-eyebrow { font-size: 10.5px; margin-bottom: 6px; }
.countdown-plaque .countdown-grid { gap: 10px; }
.countdown-plaque .cd-unit { height: 64px; }
.countdown-plaque .cd-num { font-size: 26px !important; }
.countdown-plaque .cd-lbl { font-size: 9px; margin-top: 3px !important; }

/* Knight sized to the shorter hero */
.hero-knight { width: 340px; max-width: 30vw; bottom: 4px; }
.knight-viewer { height: clamp(300px, 46vh, 430px); max-width: 340px; }
.knight-backplate { height: 100%; }
.knight-hint { font-size: 9.5px; margin-top: -20px; }
.knight-shadow { bottom: 24px; width: 180px; height: 32px; }

/* Sections tight under the hero */
.home-sections { padding: 16px 16px 26px; }
.features-grid { gap: 14px; margin-bottom: 0; }
.fc-summer { min-height: 96px; }
.fc-summer .fc-inner { min-height: 96px; padding: 14px 16px; gap: 12px; }
.fc-summer .fc-medallion { flex: 0 0 44px; width: 44px; height: 44px; font-size: 19px; }
.fc-summer h3 { font-size: 15px; }
.fc-summer p { font-size: 12px; }

.ornament-divider { margin: 14px 0; }
.section-heading { font-size: 16px; margin-bottom: 8px; }
.home-duo { gap: 16px; }

/* Update card + top players table compact */
.us-card { min-height: 132px; padding: 12px; gap: 14px; }
.us-thumb { flex: 0 0 210px; max-height: 128px; }
.us-thumb img { height: 128px; }
.us-title { font-size: 15px; margin: 4px 0 4px; }
.us-summary { font-size: 12px; margin-bottom: 6px; }
.us-viewdetails { padding: 5px 14px; font-size: 10.5px; }
.hero-slider .slider-dots { margin-top: 4px; }
.tp-head-row { padding: 4px 8px 6px; }
.tp-title { font-size: 16px; }
.tp-table { font-size: 12.5px; }
.tp-table th { padding: 6px 8px; font-size: 10px; }
.tp-table td { padding: 6.5px 8px; }

/* Castle / events / vote / discord compact */
.castle-showcase-inner { padding: 14px 20px; }
.castle-showcase-owner .castle-owner-name { font-size: 22px; }
.castle-showcase-sub { font-size: 12px; }
.events-strip .event-list { padding: 6px 12px; }
.event-item { padding: 7px 0; }
.vote-strip { padding: 12px 18px; margin-top: 0; }
.vote-strip h3 { font-size: 15px; }
.vote-strip p { font-size: 12px; }
.discord-banner { margin-top: 16px; padding: 12px; font-size: 14px; }
.discord-banner-icon { width: 26px; height: 26px; }

/* Footer slim */
.site-footer-roof { margin-top: 22px; padding-bottom: 12px; }
.footer-url { font-size: 13px; padding: 10px 0 2px; }

/* ==========================================================================
   ROUND 10 — TRUE one-screen homepage: the fortress artwork is the page,
   every section lives inside 100vh, no scrolling. Announcement bar removed.
   Side frame panels made identical.
   ========================================================================== */

/* The homepage never scrolls: header + one-screen + footer = 100vh */
body.is-home {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.is-home .site-main-full {
  flex: 1;
  min-height: 0;
  display: flex;
}
.one-screen {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
}
.one-screen > img.hs-bg-img,
.one-screen > div[class^="hs-"] { position: absolute; inset: 0; pointer-events: none; }
.one-screen .hs-bg-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
/* Softer grade — the new artwork has no baked warrior; keep the left readable */
.one-screen .hs-tint {
  background:
    linear-gradient(90deg, rgba(8,11,18,0.58) 0%, rgba(8,11,18,0.30) 40%, rgba(8,11,18,0.06) 68%, rgba(8,11,18,0.18) 100%),
    linear-gradient(180deg, rgba(8,11,18,0.35) 0%, transparent 18%, transparent 70%, rgba(8,11,18,0.5) 100%);
}

/* Column of rows inside the art */
.os-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  gap: 1.4vh;
  padding: 1.6vh 18px 1.4vh;
}

/* Row 1 — copy left, knight right */
.os-top {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: center;
}
.hero-copy { max-width: none; }
.hero-slogan { font-size: clamp(9px, 1.4vh, 12px); padding: 0.5vh 14px; margin-bottom: 1.1vh; }
.hero-actions { gap: 12px; margin-bottom: 0; }
.btn-plaque { min-width: 170px; padding: 1.3vh 20px; font-size: clamp(12px, 1.8vh, 15px); }
.server-status { margin: 1.2vh 0 0.3vh; }
.countdown-plaque { max-width: 420px; padding: 1.2vh 16px; margin-top: 1.1vh; }
.plaque-eyebrow { margin-bottom: 0.7vh; }
.countdown-plaque .cd-unit { height: clamp(48px, 8.2vh, 70px); }
.countdown-plaque .cd-num { font-size: clamp(20px, 3.4vh, 30px) !important; }

/* Knight fills its cell height */
.hero-knight {
  position: relative;
  left: auto; bottom: auto;
  transform: none;
  width: auto;
  max-width: none;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.knight-viewer {
  height: 92%;
  min-height: 240px;
  max-width: 420px;
  width: 100%;
}
.knight-backplate { height: 100%; width: 120%; bottom: 0; }
.knight-hint { margin-top: -2.6vh; font-size: 9px; }
.knight-shadow { bottom: 4%; width: 46%; height: 5%; }

/* Row 2 — cards */
.os-content .features-grid { gap: 14px; margin: 0; flex: 0 0 auto; }
.os-content .fc-summer { min-height: clamp(64px, 10.5vh, 96px); }
.os-content .fc-summer .fc-inner { min-height: clamp(64px, 10.5vh, 96px); padding: 1.2vh 14px; gap: 10px; }
.os-content .fc-summer .fc-medallion { flex: 0 0 40px; width: 40px; height: 40px; font-size: 17px; }
.os-content .fc-summer h3 { font-size: clamp(12px, 1.9vh, 15px); }
.os-content .fc-summer p { font-size: clamp(10px, 1.5vh, 12px); }
.os-content .fc-summer .feature-bg { opacity: 0.7; }
.os-content .fc-summer::after {
  background: linear-gradient(90deg, rgba(8,10,14,0.86) 0%, rgba(8,10,14,0.55) 52%, rgba(8,10,14,0.28) 100%);
}

/* Row 3 — update + top players, translucent panels over the art */
.os-duo {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
}
.os-duo .section-heading { font-size: clamp(12px, 2vh, 16px); margin-bottom: 0.6vh; }
.os-duo .lu-head-row { margin-bottom: 0; }
.os-duo .us-card,
.os-duo .top-players-panel {
  background: linear-gradient(180deg, rgba(16,20,28,0.88) 0%, rgba(10,14,20,0.9) 100%);
}
.os-duo .us-card { min-height: 0; padding: 1.2vh 12px; gap: 12px; }
.os-duo .us-thumb { flex: 0 0 clamp(120px, 14vw, 200px); max-height: none; align-self: stretch; }
.os-duo .us-thumb img { height: 100%; min-height: 84px; }
.os-duo .us-title { font-size: clamp(12px, 1.9vh, 15px); margin: 2px 0 3px; }
.os-duo .us-summary { font-size: clamp(10px, 1.5vh, 12px); margin-bottom: 0.6vh; line-height: 1.4; }
.os-duo .us-viewdetails { padding: 0.6vh 12px; font-size: clamp(9px, 1.3vh, 10.5px); }
.os-duo .top-players-panel { padding: 0.6vh 8px; }
.os-duo .tp-head-row { padding: 0.4vh 8px 0.5vh; }
.os-duo .tp-title { font-size: clamp(12px, 2vh, 16px); }
.os-duo .tp-table { font-size: clamp(10px, 1.55vh, 12.5px); }
.os-duo .tp-table th { padding: 0.5vh 8px; font-size: clamp(8px, 1.25vh, 10px); }
.os-duo .tp-table td { padding: 0.62vh 8px; }
.os-duo .tp-table .tp-rank { font-size: clamp(11px, 1.8vh, 14px); }

/* Top Players panel split — ranking table left, Castle Owner right */
.top-players-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.55fr);
  align-items: stretch;
}
.tp-split-left { min-width: 0; }
.tp-split-right.castle-owner-box {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-left: 1px solid var(--gold-border);
  margin-left: 8px;
  padding: 0.6vh 8px;
  background: radial-gradient(ellipse at center, rgba(58,46,20,0.35) 0%, rgba(10,14,20,0) 70%);
}
.castle-owner-box .castle-eyebrow {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(9px, 1.4vh, 12px);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sunset-gold);
  margin: 0 0 0.8vh;
}
.castle-owner-box .castle-crown {
  display: block;
  font-size: clamp(18px, 3.4vh, 30px);
  line-height: 1;
  color: #f2d98c;
  text-shadow: 0 0 18px rgba(242,217,140,0.45);
  margin-bottom: 0.6vh;
}
.castle-owner-box .castle-owner-name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(13px, 2.4vh, 20px);
  font-weight: 700;
  color: #f2e5c4;
  text-shadow: 0 0 14px rgba(242,217,140,0.35);
  margin: 0;
  overflow-wrap: anywhere;
}

/* Row 4 — discord slim */
.os-content .discord-banner {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.9vh 12px;
  font-size: clamp(10px, 1.7vh, 13px);
  background: linear-gradient(90deg, rgba(30,36,54,0.85), rgba(20,26,40,0.85));
}
.os-content .discord-banner-icon { width: 20px; height: 20px; }

/* Footer inside the viewport, slim */
body.is-home .site-footer-roof { margin-top: 0; padding-bottom: 0.6vh; flex: 0 0 auto; }
body.is-home .roof-tiles { height: 16px; background-size: 24px 16px, 100% 100%; }
body.is-home .footer-url { font-size: clamp(10px, 1.7vh, 13px); padding: 0.7vh 0 0.2vh; }
body.is-home .footer-copy { display: none; }

/* Header slim on home */
body.is-home .site-header .header-inner { min-height: 50px; }

/* ---- Identical side frame panels (no mirror flip, same content both sides) ---- */
.pf-right { transform: none; }
.pf-left, .pf-right {
  background:
    linear-gradient(90deg, #1d150c 0%, #2b2013 30%, #1a130b 70%, #0f0a06 100%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.22) 0 3px, transparent 3px 9px);
  box-shadow: inset -6px 0 14px rgba(0,0,0,0.45), inset 6px 0 14px rgba(0,0,0,0.45);
}
.pf-paper { top: 16%; bottom: 22%; }

/* Small screens: give up the lock, let it scroll naturally */
@media (max-width: 980px), (max-height: 620px) {
  body.is-home { height: auto; overflow: auto; display: block; }
  .one-screen { display: block; }
  /* minmax(0,1fr), not bare 1fr: the knight canvas's intrinsic width otherwise
     forces the auto-min track wider than the screen after orientation changes */
  .os-top { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .hero-actions { justify-content: center; }
  .countdown-plaque { margin-left: auto; margin-right: auto; }
  .knight-viewer { height: 340px; }
  .os-duo { grid-template-columns: 1fr; }
  .top-players-split { grid-template-columns: 1fr; }
  .tp-split-right.castle-owner-box { border-left: none; border-top: 1px solid var(--gold-border); margin-left: 0; margin-top: 6px; padding: 10px 8px; }
}

/* Round 10b: guarantee the countdown plaque fits — top row gets a floor, duo gets a cap */
.os-top { min-height: 44vh; }
.os-duo { max-height: 24vh; overflow: hidden; }
.os-duo .us-thumb { min-height: 84px; }
.os-duo .us-thumb img { object-fit: cover; width: 100%; }
.os-duo .tp-table td { padding: 0.5vh 8px; }
.os-duo .tp-table th { padding: 0.4vh 8px; }
.os-content { gap: 1.1vh; }
.os-content .fc-summer { min-height: clamp(56px, 9vh, 84px); }
.os-content .fc-summer .fc-inner { min-height: clamp(56px, 9vh, 84px); padding: 0.9vh 12px; }
.countdown-plaque { margin-top: 0.8vh; padding: 1vh 14px; }

/* Round 10c: last 30px — keep the duo + discord fully above the footer */
.os-top { min-height: 40vh; }
.os-duo { max-height: 22vh; }
.os-duo .tp-head-row { padding: 0.2vh 8px 0.3vh; }
.os-content { padding-bottom: 0.8vh; gap: 1vh; }
.os-content .discord-banner { padding: 0.7vh 10px; }

/* ==========================================================================
   ROUND 11 — ornate identical side panels (mock treatment) + collision-proof
   one-screen sizing for real-world ~600-780px viewports.
   ========================================================================== */

/* ---- Side panels: carved wood, gold pinstripe, medallions, paper, seal ---- */
.pf-side {
  top: 0; bottom: 0; width: var(--frame-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.20) 0 3px, transparent 3px 9px),
    linear-gradient(90deg, #241a10 0%, #2e2214 26%, #1c140c 62%, #120c07 100%);
  box-shadow: inset -5px 0 12px rgba(0,0,0,0.5), inset 5px 0 12px rgba(0,0,0,0.5);
  transform: none;
}
.pf-left { left: 0; }
.pf-right { right: 0; }
/* gold pinstripe inner frame line, both edges */
.pf-side::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px; left: 7px; right: 7px;
  border: 1px solid rgba(200,168,78,0.28);
  border-radius: 3px;
  pointer-events: none;
}
/* kill the old ::before/::after circle rules (replaced by .pf-medallion) */
.pf-left::after, .pf-right::after { content: none; }
.pf-medallion {
  position: relative;
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border: 2px solid rgba(200,168,78,0.55);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, rgba(93,160,120,0.55) 0%, rgba(24,32,26,0.9) 65%);
  box-shadow: 0 0 12px rgba(200,168,78,0.25), inset 0 0 6px rgba(0,0,0,0.6);
}
.pf-medallion::after {
  content: "";
  position: absolute; inset: 6px;
  border: 1px solid rgba(200,168,78,0.4);
  border-radius: 50%;
}
.pf-med-top { margin-top: 24px; }
.pf-med-bot { margin-bottom: 24px; margin-top: auto; }

.pf-paper {
  position: relative;
  flex: 0 1 52%;
  min-height: 220px;
  width: 40px;
  margin-top: 4vh;
  top: auto; bottom: auto; left: auto;
  transform: none;
  background:
    linear-gradient(180deg, #ece0c6 0%, #ddcfae 50%, #ccbc94 100%);
  border: 1px solid #6d5a38;
  border-radius: 3px;
  box-shadow:
    inset 0 0 12px rgba(120,95,55,0.4),
    inset 0 0 2px rgba(255,250,235,0.6),
    0 3px 10px rgba(0,0,0,0.55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pf-callig {
  position: static;
  transform: none;
  writing-mode: vertical-rl;
  font-family: 'Batang', 'Gungsuh', serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 7px;
  color: #43351f;
  opacity: 0.92;
  margin-top: 14px;
  flex: 0 0 auto;
}
.pf-callig-2 { font-size: 12px; letter-spacing: 5px; opacity: 0.7; margin-top: 10px; }
.pf-seal {
  margin-top: auto;
  margin-bottom: 12px;
  width: 22px; height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #f0e6d6;
  background: #9B2335;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.pf-tassel {
  position: static;
  transform: none;
  flex: 0 0 auto;
  width: 4px; height: 42px;
  margin-top: 10px;
  background: linear-gradient(180deg, #8a2a35, #5d1a22);
  border-radius: 2px;
}
.pf-tassel::before {
  content: "";
  position: absolute;
  margin-top: -8px; margin-left: -4px;
  width: 12px; height: 12px;
  transform: rotate(45deg);
  background: #9B2335;
  border: 1px solid rgba(200,168,78,0.5);
}

/* ---- Collision-proof one-screen sizing ---- */
/* The top row can NEVER be squeezed below its content (min-height:auto in a
   flex column refuses compression) — the flexible rows below absorb the loss. */
.os-top { min-height: auto; flex: 1 1 auto; }
.os-content { gap: 0.9vh; padding: 1.1vh 18px 0.9vh; }

/* Harder vh scaling so ~600px-tall viewports fit without overlap */
.hero-slogan { margin-bottom: 0.9vh; }
.hero-actions { gap: 10px; }
.btn-plaque { min-width: 150px; padding: 1.1vh 18px; font-size: clamp(11px, 1.7vh, 14px); }
.server-status { margin: 0.9vh 0 0.2vh; }
.countdown-plaque { max-width: 400px; padding: 0.9vh 12px; margin-top: 0.7vh; }
.plaque-eyebrow { font-size: clamp(8px, 1.3vh, 11px); margin-bottom: 0.5vh; }
.countdown-plaque .countdown-grid { gap: 8px; }
.countdown-plaque .cd-unit { height: clamp(42px, 7.4vh, 64px); }
.countdown-plaque .cd-num { font-size: clamp(17px, 3vh, 27px) !important; }
.countdown-plaque .cd-lbl { font-size: clamp(7px, 1.1vh, 9px); }

/* duo + cards + discord shrink further */
.os-content .fc-summer,
.os-content .fc-summer .fc-inner { min-height: clamp(48px, 8.2vh, 78px); }
.os-duo { max-height: clamp(120px, 23vh, 175px); }
.os-duo .tp-table td { padding: 0.42vh 8px; }
.os-duo .tp-table th { padding: 0.35vh 8px; }
.os-content .discord-banner { padding: 0.55vh 10px; }

/* Footer never clipped */
body.is-home .roof-tiles { height: 12px; background-size: 24px 12px, 100% 100%; }
body.is-home .footer-url { font-size: clamp(9px, 1.5vh, 12px); padding: 0.5vh 0 0.3vh; }

/* Knight hint pinned INSIDE the viewer (was spilling onto the cards) */
.hero-knight { position: relative; }
.knight-hint {
  position: absolute;
  left: 50%; bottom: 2%;
  transform: translateX(-50%);
  margin: 0;
  z-index: 4;
  white-space: nowrap;
  pointer-events: none;
}

/* round 11b: un-hide the calligraphy (old round-6 rule hid pf-paper's first span) */
.pf-paper > span:first-child { display: inline-block; }

/* ==========================================================================
   ROUND 12 — side panels use the real mock art (images/frame/side_*) and the
   one-screen layout stops clipping: the update card renders in flow, the duo
   row takes its natural height, and the hero row absorbs the difference.
   ========================================================================== */

/* Frame width follows viewport HEIGHT: the right strip's fixed-aspect art
   needs ~7.8x its width in height (top 6.7x + bottom 1.1x), so 11vh always
   leaves the wood-band filler some room between top and bottom pieces. */
:root { --frame-w: clamp(72px, 11vh, 118px); }

.pf-side {
  display: block;
  transform: none;
  box-shadow: inset -3px 0 10px rgba(0,0,0,0.45), inset 3px 0 10px rgba(0,0,0,0.45);
}
.pf-left {
  background:
    url('../images/frame/side_left_top.jpg')  top center    / 100% auto no-repeat,
    url('../images/frame/side_left_bot.png')  bottom center / 100% auto no-repeat,
    url('../images/frame/side_left_fill.png') top center    / 100% auto repeat-y;
}
.pf-right {
  background:
    url('../images/frame/side_right_top.jpg')  top center    / 100% auto no-repeat,
    url('../images/frame/side_right_bot.png')  bottom center / 100% auto no-repeat,
    url('../images/frame/side_right_fill.png') top center    / 100% auto repeat-y;
}
/* the art carries its own pinstripes/medallions — kill the drawn ones */
.pf-side::before, .pf-side::after { content: none; }

/* Header + footer pick up the mock's carved wood / roof tiles */
.site-header {
  background:
    linear-gradient(180deg, rgba(16,12,7,0.55) 0%, rgba(10,7,4,0.72) 100%),
    url('../images/frame/header_wood.png') center / auto 100% repeat-x !important;
  border-bottom: 1px solid rgba(200,168,78,0.35);
}
.site-footer-roof .roof-tiles {
  background: url('../images/frame/roof_tiles.png') bottom center / auto 100% repeat-x;
}
body.is-home .roof-tiles { height: 18px; }

/* ---- Latest Update card: base .slide is position:absolute + height:100%,
   which collapses to 0 inside the auto-height one-screen slider ---- */
.os-duo .slider-track { height: auto; }
.os-duo .slide { position: static; width: auto; height: auto; opacity: 1; }
.os-duo .slide:not(.active) { display: none; }

/* ---- Duo row: natural height, nothing clipped; hero row flexes instead ---- */
.os-duo { max-height: none; overflow: visible; align-items: stretch; }
.os-duo .us-card { height: 100%; padding: 0.8vh 10px; gap: 10px; }
.os-duo .us-thumb { flex: 0 0 clamp(110px, 12vw, 180px); }
.os-duo .us-thumb img { min-height: 0; height: 100%; }
.os-duo .us-title { font-size: clamp(12px, 1.9vh, 16px); margin: 0 0 0.5vh; }
.os-duo .us-summary { font-size: clamp(10px, 1.6vh, 12.5px); line-height: 1.4; margin-bottom: 0.6vh; }
.os-duo .us-viewdetails { padding: 0.5vh 14px; font-size: clamp(9px, 1.5vh, 11px); }
.os-duo .tp-table td { padding: 0.38vh 8px; }
.os-duo .tp-table th { padding: 0.3vh 8px; }

/* ---- Discord banner stays clear of the roof ---- */
.os-content { gap: 0.7vh; padding: 0.8vh 18px 1vh; }
.os-content .discord-banner { padding: 0.45vh 10px; margin-bottom: 0.3vh; }
.os-content .fc-summer,
.os-content .fc-summer .fc-inner { min-height: clamp(44px, 7.6vh, 76px); }
.os-duo .tp-table { font-size: clamp(10px, 1.5vh, 12px); }
.os-duo .tp-table td { padding: 0.32vh 8px; }
.os-duo .tp-table th { padding: 0.25vh 8px; }
.os-duo .tp-head-row { padding: 0.15vh 8px 0.2vh; }
.os-duo .tp-table-wrap { padding: 2px 6px 4px; }

/* ==========================================================================
   ROUND 14 — wordmark moved to the header; hero + rows re-spaced so the freed
   height eases the whole column, aligned top-to-bottom through the discord bar
   ========================================================================== */
.os-content { gap: 1.9vh; }
.os-top { min-height: 34vh; align-items: center; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.hero-slogan { font-size: clamp(11px, 1.9vh, 15px); padding: 0.8vh 20px; margin: 0 0 1.6vh; }
.hero-actions { margin-bottom: 1.4vh; }
.countdown-plaque { margin-top: 1.4vh; padding: 1.5vh 18px; }
.countdown-plaque .cd-unit { padding: 1.1vh 8px 0.9vh; }
.os-content .fc-summer { min-height: clamp(62px, 10.5vh, 96px); }
.os-content .fc-summer .fc-inner { min-height: clamp(62px, 10.5vh, 96px); padding: 1.2vh 14px; }
.os-duo .us-card { padding: 1.5vh 14px; }
.os-duo .top-players-panel { padding: 1vh 10px; }
.os-duo .tp-table td { padding: 0.7vh 8px; }
.os-duo .tp-table th { padding: 0.55vh 8px; }
.os-duo .tp-head-row { padding: 0.4vh 8px 0.5vh; }
.os-content .discord-banner { padding: 1.1vh 12px; }
.os-content { padding-bottom: 1.2vh; }
@media (max-width: 980px), (max-height: 620px) {
  .hero-copy { align-items: center; }
}

/* ==========================================================================
   ROUND 15 — slogan rides above the wordmark in the header; hero leads with a
   short call-to-adventure; 2 feature cards (3rd column empty under the knight);
   BETA/OFFICIAL status prefix; discord bar guaranteed above the fold
   ========================================================================== */
.logo-stack { display: flex; flex-direction: column; line-height: 1.15; }
.logo-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: #9c8a63;
  white-space: nowrap;
}
.hero-callout {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: clamp(24px, 4.8vh, 44px);
  line-height: 1.05;
  letter-spacing: 1.5px;
  margin: 0 0 1.4vh;
  color: #f2e5c4;
  text-shadow: 0 0 28px rgba(232,180,90,0.4), 0 3px 14px rgba(0,0,0,0.8);
}
/* Tighter top row (shorter hero copy) frees height for the rows below */
.os-top { min-height: 30vh; }
.os-duo { max-height: none; }
.os-content { gap: 1.7vh; padding-bottom: 0.8vh; }
.os-content .discord-banner {
  padding: 1.2vh 14px;
  font-size: clamp(11px, 1.8vh, 14px);
  letter-spacing: 2px;
}
/* Short viewports (laptop with browser chrome): compress rows before clipping discord */
@media (min-width: 981px) and (max-height: 700px) {
  .os-top { min-height: 26vh; }
  .knight-viewer { height: clamp(180px, 30vh, 300px); }
  .os-content { gap: 1.2vh; }
  .countdown-plaque { padding: 1vh 14px; margin-top: 1vh; }
  .os-content .fc-summer, .os-content .fc-summer .fc-inner { min-height: clamp(50px, 8.5vh, 72px); }
  .os-duo .tp-table td { padding: 0.5vh 8px; }
  .os-duo .tp-table th { padding: 0.4vh 8px; }
  .os-duo .us-thumb img { min-height: 64px; }
}

/* ==========================================================================
   ROUND 16 — knight extends DOWN into the empty third card column (his lower
   body was cut at the row boundary); cards row sits beneath him in z-order
   ========================================================================== */
@media (min-width: 981px) {
  .hero-knight { position: relative; z-index: 4; }
  .knight-viewer {
    height: clamp(320px, 56vh, 560px);
    margin-bottom: calc(-1 * clamp(64px, 11.5vh, 124px)); /* hangs into the (empty) card slot */
    position: relative;
    z-index: 4;
  }
}
@media (min-width: 981px) and (max-height: 700px) {
  .knight-viewer {
    height: clamp(250px, 46vh, 400px);
    margin-bottom: calc(-1 * clamp(52px, 9.5vh, 100px)); /* stop just above the duo row */
  }
}

/* ==========================================================================
   ROUND 17 — phone alignment pass: header lockup scales down, hero line fits
   one screen width, tighter centered rhythm through the stacked rows
   ========================================================================== */
@media (max-width: 980px) {
  .header-kal-logo { width: 36px; height: 36px; }
  .logo-eyebrow { font-size: 7.5px; letter-spacing: 1.8px; }
  .logo-wordmark { font-size: 19px; letter-spacing: 2px; }
  .hero-callout { font-size: clamp(20px, 6.6vw, 34px); letter-spacing: 1px; margin-bottom: 12px; }
  .hero-copy { align-items: center; text-align: center; }
  .server-status { justify-content: center; }
  .knight-viewer { height: 300px; }
  .os-content { gap: 14px; }
  .os-duo { gap: 14px; }
  .castle-owner-box .castle-owner-name { font-size: 18px; }
  .os-content .discord-banner { padding: 11px 12px; font-size: 12px; }
}
@media (max-width: 480px) {
  .logo-eyebrow { font-size: 6.5px; letter-spacing: 1.4px; }
  .logo-wordmark { font-size: 17px; }
  .countdown-plaque { padding: 12px 10px; }
  .countdown-plaque .countdown-grid { gap: 8px; }
  .countdown-plaque .cd-unit { padding: 8px 4px 7px; }
}

/* ==========================================================================
   ROUND 18 — phones: the Round-12 art pass re-enabled .pf-side with an
   unconditional display:block, overriding the <1280px hide at the top of this
   file. Re-hide the carved side panels on small screens (order wins).
   ========================================================================== */
@media (max-width: 1279px) {
  .page-frame, .pf-side { display: none; }
}

/* ==========================================================================
   ROUND 19 — Castle Owner gets its own stage: a hanging Korean name-board
   (pyeonaek) top-center of the hero, lacquered wood + gold trim + rope ties.
   The Top Players panel goes back to full-width table (split removed).
   ========================================================================== */
.os-top { position: relative; }
.castle-plaque {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  text-align: center;
  min-width: 190px;
  padding: 9px 30px 11px;
  background:
    linear-gradient(180deg, rgba(58,38,18,0.96) 0%, rgba(34,21,11,0.97) 55%, rgba(46,30,15,0.96) 100%);
  border: 1px solid rgba(200,168,78,0.6);
  outline: 1px solid rgba(126,92,42,0.4);
  outline-offset: 3px;
  border-radius: 4px;
  box-shadow:
    0 8px 26px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(232,180,90,0.3),
    inset 0 -2px 8px rgba(0,0,0,0.5);
}
/* rope ties up to the header beam */
.castle-plaque::before,
.castle-plaque::after {
  content: "";
  position: absolute;
  top: -20px;
  width: 2px;
  height: 20px;
  background: linear-gradient(180deg, rgba(200,168,78,0.05), rgba(200,168,78,0.75));
}
.castle-plaque::before { left: 16%; }
.castle-plaque::after  { right: 16%; }
/* red seal dots on the ends, like a stamped name-board */
.castle-plaque .castle-eyebrow {
  position: relative;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--sunset-gold);
  margin: 0 0 3px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}
.castle-plaque .castle-crown {
  display: inline-block;
  vertical-align: -1px;
  font-size: 15px;
  margin-right: 7px;
  color: #f2d98c;
  text-shadow: 0 0 12px rgba(242,217,140,0.5);
}
.castle-plaque .castle-owner-name {
  display: inline-block;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #f2e5c4;
  text-shadow: 0 0 14px rgba(242,217,140,0.4), 0 2px 8px rgba(0,0,0,0.8);
  margin: 0;
}
/* phones/tablets: plaque becomes a normal centered block between hero and knight */
@media (max-width: 980px) {
  .castle-plaque {
    position: static;
    transform: none;
    margin: 4px auto 0;
    width: fit-content;
    justify-self: center; /* grid item: margin auto alone doesn't center */
    order: 2;
  }
  .os-top .hero-copy { order: 1; }
  .os-top .hero-knight { order: 3; }
  .castle-plaque::before, .castle-plaque::after { display: none; }
}

/* ==========================================================================
   ROUND 20 — Castle Owner plaque uses the owner's carved-frame ART
   (images/castle_plaque.png, transparent PNG): drop the CSS-drawn wood/ropes,
   center the text inside the art's inner canvas region.
   ========================================================================== */
.castle-plaque {
  background: url('../images/castle_plaque.png') center / 100% 100% no-repeat;
  border: none;
  outline: none;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
  width: clamp(240px, 36vh, 320px);
  aspect-ratio: 1536 / 1024;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* art's inner canvas sits slightly above the true middle (tassels hang below) */
  padding-bottom: 6%;
  top: -4px;
}
.castle-plaque::before, .castle-plaque::after { content: none; }
.castle-plaque .castle-eyebrow { font-size: clamp(9px, 1.5vh, 11px); margin-bottom: 4px; }
.castle-plaque .castle-crown { font-size: clamp(14px, 2.4vh, 18px); }
.castle-plaque .castle-owner-name { font-size: clamp(15px, 2.8vh, 20px); }
@media (max-width: 980px) {
  .castle-plaque { width: min(64vw, 260px); top: auto; margin: 0 auto; }
}

/* ==========================================================================
   ROUND 21 — plaque size + text alignment fix: the art has transparent margins
   (opaque frame = 4-95% x, 11-84% y; inner canvas measured at 14.7-85.6% x,
   24.8-71.2% y), so the text is pinned to the CANVAS region, not flex-centered
   in the whole (margin-padded) box. Smaller overall footprint.
   ========================================================================== */
.castle-plaque {
  width: clamp(190px, 30vh, 250px);
  padding: 0;
  display: block;
  position: absolute; /* re-assert: desktop hangs top-center */
}
.castle-plaque-inner {
  position: absolute;
  left: 14.7%;
  right: 14.4%;
  top: 24.8%;
  bottom: 28.8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.castle-plaque .castle-eyebrow { font-size: clamp(8px, 1.3vh, 10px); letter-spacing: 2.5px; margin: 0 0 3px; }
.castle-plaque .castle-crown { font-size: clamp(12px, 2vh, 15px); margin: 0; }
.castle-plaque .castle-owner-name { font-size: clamp(13px, 2.3vh, 17px); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 980px) {
  .castle-plaque { position: static; width: min(56vw, 220px); }
}

/* ==========================================================================
   ROUND 22 — blurred hero backdrop, plaque raised, guild name in warm gold
   (not the blue-grey muted tone) flanked by crossed-sword marks
   ========================================================================== */
.hs-bg-img {
  filter: blur(2px) brightness(0.98);
  transform: scale(1.06); /* hides the blur's soft edges at the borders */
}
.castle-plaque { top: -12px; }
.castle-plaque .castle-owner-name {
  color: #ffd76b; /* warm gold — stands apart from the site's blue-grey muted text */
  text-shadow: 0 0 16px rgba(255,215,107,0.45), 0 2px 8px rgba(0,0,0,0.85);
}
.castle-plaque .castle-owner-name::before { content: "\2694  "; }
.castle-plaque .castle-owner-name::after  { content: "  \2694"; }
.castle-plaque .castle-owner-name::before,
.castle-plaque .castle-owner-name::after {
  font-size: 0.85em;
  color: #e8b45a;
  text-shadow: 0 0 10px rgba(232,180,90,0.5);
  white-space: pre;
}
.castle-plaque .castle-owner-name.castle-unclaimed {
  color: #cdb98d; /* parchment, still clearly "empty" but no cold blue */
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
@media (max-width: 980px) {
  .castle-plaque { top: auto; }
}

/* ==========================================================================
   ROUND 23 — show the WHOLE knight: canvas extends further down beside the
   Top Players card; the extension strip is clipped to the center columns
   (clip-path also clips hit-testing) so VIEW FULL RANKINGS stays clickable.
   Pairs with the camera pull-back in knight-viewer.js (full body in frame).
   ========================================================================== */
@media (min-width: 981px) {
  .knight-viewer {
    height: calc(clamp(320px, 56vh, 560px) + 46px);
    margin-bottom: calc(-1 * (clamp(80px, 14vh, 150px) + 46px));
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 50px), 68% calc(100% - 50px), 68% 100%, 32% 100%, 32% calc(100% - 50px), 0 calc(100% - 50px));
  }
}
@media (min-width: 981px) and (max-height: 700px) {
  .knight-viewer {
    height: calc(clamp(250px, 46vh, 400px) + 40px);
    margin-bottom: calc(-1 * (clamp(52px, 9.5vh, 100px) + 40px));
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 44px), 68% calc(100% - 44px), 68% 100%, 32% 100%, 32% calc(100% - 44px), 0 calc(100% - 44px));
  }
}

/* ==========================================================================
   ROUND 24 — no more clip-path (it sliced the seated knight's back and sword
   at the strip edges). Instead the CANVAS is pointer-transparent everywhere,
   so its overhang can never block the panels; interaction happens on the
   .knight-hit layer, which stops above the overhang strip.
   ========================================================================== */
.knight-viewer { position: relative; clip-path: none !important; }
.knight-viewer canvas { pointer-events: none; }
.knight-hit {
  position: absolute;
  left: 0; top: 0; right: 0;
  bottom: 52px; /* leave the overhang strip click-through to the panels below */
  z-index: 5;
  cursor: grab;
}
.knight-hit:active { cursor: grabbing; }
@media (max-width: 980px) {
  .knight-hit { bottom: 0; } /* no overhang on mobile — whole box interactive */
}
