/* ================================
   MU Online Realm – Scoped UI
   ================================ */

/* Core box hover (inherits site tokens) */
.muor .white-box { transition: box-shadow .18s, background .16s, transform .14s; }
.muor .white-box:hover, .muor .white-box:focus-within {
  transform: none; background: var(--primary-bg); box-shadow: var(--box-shadow);
}

/* Breadcrumbs */
.muor .breadcrumb-nav { margin-bottom: .75rem; }
.muor .breadcrumb-nav .breadcrumb{
  display:flex; flex-wrap:wrap; gap:.4rem; list-style:none; padding:0; margin:0;
}
.muor .breadcrumb-nav .breadcrumb li{ color:var(--text-muted); }
.muor .breadcrumb-nav .breadcrumb li + li::before{
  content:"›"; margin:0 .45rem; color:var(--accent-contrast);
}

/* Intro subtitling */
.muor .section-intro { color: var(--text-muted); margin: .25rem 0 0; }

/* Responsive grid (equal height rows) */
.muor .grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.1rem; }
.muor .grid-equal { grid-auto-rows: 1fr; } /* force equal height per row */

/* Realm & navigation cards */
.muor .realm-card, .muor .nav-card {
  position: relative;
  display: flex; flex-direction: column; /* allow footer pinning */
  height: 100%;
  text-decoration: none; color: var(--text-main);
  background: var(--secondary-bg); border: 1.5px solid var(--border-light);
  border-radius: 14px; padding: 1rem 1.05rem;
  box-shadow: 0 3px 12px rgb(0 0 0 / 6%);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.muor .realm-card:hover, .muor .realm-card:focus-visible,
.muor .nav-card:hover, .muor .nav-card:focus-visible {
  transform: translateY(-3px); background: var(--gradient-glow);
  border-color: var(--accent-contrast); box-shadow: 0 10px 26px rgb(0 0 0 / 10%); outline: none;
}
.muor .realm-card h3, .muor .nav-card h3 { margin: .25rem 0 .5rem; font-size: 1.14rem; color: var(--accent); }
.muor .realm-card p, .muor .nav-card p { margin: 0; color: var(--text-muted); font-size: 1rem; line-height: 1.55; }
.muor .eyebrow {
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-contrast); opacity: .85; margin-bottom: .35rem;
}

/* Clamp summary to 2 lines for uniform height */
.muor .summary.clamp-2{
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(1.55em * 2); /* ensure same space if one line */
}

/* Feature list (max 2) */
.muor .features{ margin:.6rem 0 0 1.05rem; color:var(--text-muted); }
.muor .features li{ margin:.3rem 0; }
.muor .features--placeholder{ height: 1.9rem; } /* reserve space if no features */

/* Card footer pinned to bottom so CTAs line up */
.muor .card-footer{
  margin-top: auto; display:flex; align-items:center; gap:.8rem;
  padding-top: .85rem;
}
.muor .meta-line{
  color:var(--text-muted); font-size:.96rem; line-height:1.4; flex:1 1 auto; min-width:0;
  margin-right:.5rem;
}
.muor .realm-card .cta {
  flex:0 0 auto;
  display:inline-flex; align-items:center; justify-content:center;
  text-decoration:none; font-weight:700; font-size:.96rem; white-space:nowrap;
  min-height: 40px; padding:.52rem 1rem; border-radius:10px; border:1px solid #a20707; color:#fff;
  background: linear-gradient(90deg,#a20707 0%,#c02c2c 100%);
  box-shadow: 0 2px 10px rgba(162,7,7,.15);
  transition: transform .12s ease, box-shadow .12s ease;
}
.muor .realm-card .cta:hover,.muor .realm-card .cta:focus-visible{
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(162,7,7,.22);
}

/* Badges */
.muor .status-badge,
.muor .realm-card .badge,
.muor .realm-card .badge-live{
  display:inline-block; font-weight:700; font-size:.78rem; letter-spacing:.03em;
  padding:.28rem .55rem; border-radius:999px; margin-bottom:.5rem; color:#fff;
}
.muor .status-badge,
.muor .realm-card .badge,
.muor .realm-card .badge-new{
  background: linear-gradient(90deg,#a20707 0%,#c02c2c 100%);
  box-shadow:0 4px 16px rgba(162,7,7,.18);
}
.muor .status-badge.live,
.muor .realm-card .badge-live{
  background: linear-gradient(90deg,#2483d6 0%,#3aa2ff 100%);
  box-shadow:0 4px 16px rgba(36,131,214,.18);
}

/* Make upcoming (Bliss) look newer & more clickable */
.muor .realm-card.is-upcoming{
  background: linear-gradient(180deg,#fff 0%,#f7f8fb 100%);
  border-color:#e6c5c5;
  box-shadow: 0 10px 28px rgba(162,7,7,.12), 0 2px 8px rgba(0,0,0,.06);
}
.muor .realm-card.is-upcoming .cta{
  border-color:#821616;
  background: linear-gradient(90deg,#b10f0f 0%,#d43838 100%);
}

/* Subtle animated sheen for upcoming card (pure cosmetic) */
.muor .realm-card.is-upcoming .shine{
  position:absolute; inset:0; border-radius:14px; pointer-events:none;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.38) 30%, rgba(255,255,255,0) 60%);
  transform: translateX(-120%);
  animation: muor-sheen 2.6s ease-in-out infinite;
  opacity:.55;
}
@keyframes muor-sheen {
  0% { transform: translateX(-120%); }
  55% { transform: translateX(140%); }
  100% { transform: translateX(140%); }
}

/* Nav-card tags */
.muor .nav-card .tags { display: flex; flex-wrap: wrap; gap: .38rem; margin-top: .6rem; }
.muor .nav-card .tag {
  font-size: .78rem; padding: .25rem .52rem; border-radius: 999px;
  background: var(--primary-bg); border: 1px solid var(--border-light); color: var(--text-main);
}

/* Stat snapshot */
.muor .stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .8rem; margin-top: .6rem;
}
.muor .stat-grid > div {
  background: var(--secondary-bg); border: 1px solid var(--border-light);
  border-radius: 11px; padding: .9rem .95rem; box-shadow: 0 2px 8px rgb(0 0 0 / 5%);
}
.muor .stat-grid b { color: var(--accent); }

/* Focus visibility */
.muor a:focus-visible { outline: 2px solid var(--accent-contrast); outline-offset: 2px; }

/* Desktop breathing room */
@media (min-width: 1200px){
  .muor .container { max-width: 1320px; }
}

/* ------------------ Hero polish (index + details) ----------------------- */
.muor .hero-lite,
.muor .detail-hero{
  border-radius: 16px; padding: 1.4rem 1.6rem;
  background: linear-gradient(145deg, #fff 0%, #f5f6f8 55%, #eef0f4 100%);
  border: 1px solid var(--border-light);
  box-shadow: 0 12px 28px rgba(0,0,0,.06);
}
.muor .detail-hero .back-link{
  display:inline-block; text-decoration:none; font-weight:700; margin-bottom:.35rem;
}

/* ------------------ Related chip links --------------------------------- */
.muor .related{ display:flex; gap:.45rem; align-items:center; flex-wrap:wrap; }
.muor .related > span{ color:var(--text-muted); }
.muor .related a{
  display:inline-flex; align-items:center; text-decoration:none;
  border:1px solid var(--border-light); background:var(--secondary-bg);
  padding:.34rem .62rem; border-radius:999px; font-size:.92rem; color:var(--text-main);
}
.muor .related a:hover{ background:var(--primary-bg); border-color:var(--accent-contrast); }

/* ------------------ Data Tables (modern, desktop-first) ----------------- */
.muor .table-wrap{
  border:1px solid var(--border-light);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 4px 18px rgba(0,0,0,.06);
}
.muor .dmn-rankings-table{
  width:100%;
  border-collapse:separate; border-spacing:0;
  font-size:1rem;
}
.muor .dmn-rankings-table thead th{
  text-align:left; font-weight:800; letter-spacing:.02em;
  background: linear-gradient(90deg, var(--accent) 0%, #4b4b4e 100%);
  color:#fff; padding:.9rem 1rem; position:sticky; top:0; z-index:1;
}
.muor .dmn-rankings-table tbody td{
  padding:.72rem 1rem; background:var(--secondary-bg);
  border-top:1px solid var(--border-light); vertical-align:top;
}
.muor .dmn-rankings-table tbody tr:nth-child(even) td{ background:#f2f3f6; }
.muor .dmn-rankings-table tbody tr:hover td{ background:#eef1f6; }
.muor .dmn-rankings-table td:first-child{
  font-weight:700; color:var(--accent);
}
.muor .dmn-rankings-table .subtle{ color:var(--text-muted); font-weight:500; }
.muor .dmn-rankings-table .nowrap{ white-space:nowrap; }

/* Command chips (copyable) */
.muor code.cmd{
  display:inline-flex; align-items:center; gap:.38rem;
  background:#202124; color:#ffe27a; border-radius:8px; padding:.18rem .5rem;
  font-size:.97rem; line-height:1.2; cursor:copy; user-select:text; border:1px solid #111;
}
.muor code.cmd::after{
  content:'Copy'; font-size:.72rem; letter-spacing:.03em;
  background:#2a2b2e; color:#e6e6e6; padding:.05rem .35rem;
  border-radius:999px; border:1px solid #3a3b3e; margin-left:.25rem; opacity:.6;
}
.muor code.cmd:hover::after{ opacity:1; }
.muor code.cmd[data-copied="1"]::after{
  content:'Copied!'; background:#2c7a2c; border-color:#2c7a2c; color:#fff; opacity:1;
}

/* Lightweight table toolbar */
.muor .table-toolbar{
  display:flex; align-items:center; justify-content:flex-end;
  gap:.6rem; margin-bottom:.6rem; flex-wrap:wrap;
}
.muor .table-toolbar .search{
  display:flex; align-items:center; gap:.45rem;
  padding:.42rem .65rem; background:var(--secondary-bg);
  border:1px solid var(--border-light); border-radius:10px; min-width:260px;
}
.muor .table-toolbar .search input[type="search"]{
  border:none; background:transparent; outline:none; width:100%;
  font-size:1rem; color:var(--text-main);
}
.muor .table-toolbar .search svg{ width:18px; height:18px; opacity:.6; }

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  .muor .realm-card, .muor .nav-card, .muor .white-box { transition: none !important; }
  .muor .dmn-rankings-table tbody tr:hover td{ background:inherit; }
}
