:root{
  /* Concept B — Premium Numismatic */
  --bg:#f3f1ec;
  --card:#ffffff;
  --text:#1a1a2e;
  --muted:#777;
  --line:#e0ddd4;

  --brand:#1a1a2e;
  --brand2:#c5a356;

  --shadow: 0 8px 24px rgba(26, 26, 46, .08);
  --shadow2: 0 12px 32px rgba(26, 26, 46, .10);

  --radius:6px;
  --radius2:8px;
  --max:1120px;

  --header-bg: #1a1a2e;
  --header-border: #2a2a4e;
  --header-shadow: none;

  --surface:#f5f3ee;
}

/* Dark theme */
[data-theme="dark"]{
  --bg:#0d0d1a;
  --card:#151528;
  --text:#e9eef9;
  --muted:#a0a0b8;
  --line:#2a2a4e;

  --brand:#c5a356;
  --brand2:#d4b76a;

  --shadow: 0 14px 42px rgba(0,0,0,.45);
  --shadow2: 0 18px 56px rgba(0,0,0,.50);

  --header-bg: #0d0d1a;
  --header-border: #2a2a4e;
  --header-shadow: none;

  --surface:#1a1a30;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; color:var(--text); background: var(--bg)}
.ck-main{min-height:calc(100vh - 200px);}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button{font:inherit}

.container{max-width:var(--max); margin:0 auto; padding:0 18px}
.pill{display:inline-flex; gap:10px; align-items:center; padding:10px 14px; border:1px solid var(--line); border-radius:4px; background:#fff}
.kbd{font-size:12px; color:var(--muted); border:1px solid var(--line); padding:3px 7px; border-radius:8px; background:#fff}

/* ---- Header & Nav ---- */
header.site-header{
  position:-webkit-sticky; position:sticky; top:0; z-index:50;
  background: var(--header-bg);
  backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}
header.site-header::after{
  content:''; display:block; height:2px;
  background: var(--brand2, var(--brand2, #c5a356));
}
.navbar{
  display:flex;
  align-items:center;
  gap:18px;
  height:78px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto;
  padding:0;
  margin-right:18px;
  background:none !important;
  overflow:visible;
}
.brand-mark{
  height:54px;
  width:54px;
  display:block;
  object-fit:contain;
  background:none !important;
  border-radius:0 !important;
  box-shadow:none !important;
  flex-shrink:0;
}
.brand-text{
  font-size:22px;
  font-weight:950;
  letter-spacing:.2px;
  color:var(--brand2, var(--brand2, #c5a356));
  line-height:1;
  white-space:nowrap;
  text-decoration:none;
}
.navlinks{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.navlinks a{
  position:relative;
  padding:10px;
  border-radius:6px;
  color:var(--muted);
  font-weight:700;
  border:1px solid transparent; /* reserves space so active border doesn't shift layout */
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.navlinks a:hover{
  color: var(--text);
  background: rgba(32,58,115,.06);
  transform: translateY(-1px);
}
.navlinks a::after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:7px;
  height:2px;
  border-radius:4px;
  background: var(--brand2, var(--brand2, #c5a356));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
  opacity:.9;
}
.navlinks a:hover::after{
  transform: scaleX(1);
}
.navlinks a:focus-visible{
  outline:none;
  box-shadow: 0 0 0 3px rgba(32,58,115,.18);
}
.navlinks a.active, .navlinks a:hover{
  color:var(--text); background:#fff; border:1px solid var(--line);
}
.nav-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex: 0 0 auto;
}
.icon-btn{
  width:40px;height:40px;
  border-radius:6px;
  border:1px solid var(--line);
  background:var(--card);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.icon-btn:hover{ transform: translateY(-1px); }
.icon{width:18px;height:18px; opacity:.8}

/* ── Nav user (login / logout) ── */
.nav-user {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 4px;
}
.nav-user-link {
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
  color: rgba(255,255,255,.5);
  border: 1.5px solid transparent;
}
.nav-user-link:hover {
  color: #fff;
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.06);
}
.nav-login {
  border-color: var(--brand2, var(--brand2, #c5a356));
  color: var(--brand2, var(--brand2, #c5a356));
  background: var(--brand2, var(--brand2, #c5a356));
  color: #1a1a2e;
}
.nav-login:hover {
  background: var(--brand2, #c5a356);
  color: #1a1a2e !important;
}
.nav-logout {
  color: rgba(255,255,255,.4);
}


.hero{
  padding:18px 0 10px;
}
.hero h1{margin:0 0 6px; font-size:34px}
.hero p{margin:0; color:var(--muted); max-width:68ch; line-height:1.5}
@media(max-width:520px){
  .hero h1{ font-size:26px; }
  .hero{ padding:20px 0 8px; }
}

.grid{
  display:grid; gap:18px;
}
.grid-2{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:16px;
}
@media (max-width: 980px){ .grid-2{grid-template-columns:1fr} }

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius2);
  box-shadow: 0 14px 38px rgba(18, 34, 66, .10);
  margin-top:18px;
  padding:16px;
}
.card-pad{padding:18px}

.section{padding:18px 0 32px}

.subnav{
  display:flex; justify-content:space-between; align-items:center;
  gap:12px; margin:10px 0 14px;
}
.subnav .link{
  color:var(--muted);
  padding:10px 12px;
  border-radius:6px;
  background:#fff;
  border:1px solid var(--line);
}
.subnav .link:hover{color:var(--text)}

/* ---- Coin gallery ---- */
.coin-gallery{
  display:grid;
  grid-template-columns: 1fr 1fr;
  border-radius:var(--radius2);
  overflow:hidden;
}
@media (max-width: 560px){
  .coin-gallery{grid-template-columns:1fr}
}
.coin-panel{
  padding:16px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  min-height:320px;
  background:#fff;
}
.coin-panel + .coin-panel{border-left:1px solid var(--line)}
@media (max-width: 560px){
  .coin-panel + .coin-panel{border-left:none;border-top:1px solid var(--line)}
}
.coin-label{font-size:13px; color:var(--muted); margin-bottom:10px; letter-spacing:.25px}
.coin-img{
  width:230px; height:230px; object-fit:contain;
  filter: drop-shadow(0 16px 18px rgba(0,0,0,.15));
}
.coin-caption{margin-top:10px; font-weight:650; color:var(--muted); font-size:13px}
.coin-title{
  font-size:28px; margin:0 0 10px; letter-spacing:.2px;
}

/* ---- Meta table ---- */
.meta-table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}
.meta-table tr{border-bottom:1px solid var(--line)}
.meta-table td{
  padding:10px 6px;
  vertical-align:top;
}
.meta-k{
  width:42%;
  color:var(--muted);
  font-weight:650;
}
.meta-v{color:var(--text)}
.meta-v small{color:var(--muted)}

/* ---- Badges & pills ---- */
.badge{
  display:inline-flex; align-items:center;
  padding:6px 10px; border-radius:4px;
  border:1px solid var(--line);
  background:var(--card, #fff);
  color:var(--muted);
  font-size:12px;
}
.muted{ color: var(--muted); }

/* ---- Price table ---- */
.table-wrap{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--card, #fff);
}
.price-table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}
.price-table th{
  text-align:left;
  padding:12px;
  background: var(--brand);
  color:#fff;
  font-weight:700;
  letter-spacing: .2px;
  position:-webkit-sticky; position:sticky; top:0;
}
.price-table td{
  padding:12px;
  border-top:1px solid var(--line);
}
.price-table tr:nth-child(even) td{background: rgba(231,236,246,.45)}
.price-table td.muted{color:var(--muted)}
.price-table td.right{text-align:right}

/* ---- Sponsored section ---- */
.sponsored-title{
  margin:0 0 10px;
  font-size:16px;
  color:var(--muted);
  font-weight:750;
}
.sponsored-grid{
  display:grid; gap:14px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px){ .sponsored-grid{grid-template-columns:1fr} }
.sponsored-card{
  display:flex; gap:14px; align-items:center;
  padding:14px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
}
.sponsored-thumb{
  width:72px;height:72px;border-radius:6px;
  background: linear-gradient(135deg, rgba(32,58,115,.12), rgba(202,165,106,.18));
  border:1px solid var(--line);
  display:grid; place-items:center;
}
.sponsored-thumb img{width:54px;height:54px;object-fit:contain;opacity:.9}
.sponsored-copy{flex:1}
.sponsored-copy strong{display:block; margin-bottom:3px}
.sponsored-copy p{margin:0; color:var(--muted); font-size:13px; line-height:1.35}
.cta{
  padding:10px 12px;
  border-radius:6px;
  border:1px solid rgba(202,165,106,.55);
  background: rgba(202,165,106,.15);
  color: #5b3f0f;
  font-weight:750;
  cursor:pointer;
  white-space:nowrap;
}
.cta:hover{background: rgba(202,165,106,.22)}

/* ---- Browse controls ---- */
.browse-controls{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:space-between;
  margin:14px 0 10px;
}
.search{
  flex:1; min-width:240px;
  display:flex; align-items:center; gap:10px;
  padding:12px 14px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:6px;
}
.search input{
  width:100%;
  border:none; outline:none;
  font-size:14px;
}
.select{
  padding:12px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:6px;
  color:var(--text);
}

/* ---- Denomination sections ---- */
.denom-section{
  display:block;
  box-sizing:border-box;
  width:100%;
  min-width:0;
  margin-top:0;
  background:#fff;
  border:1px solid var(--line);
  border-radius:6px;
  padding:14px;
  box-shadow: 0 10px 22px rgba(18,34,66,.06);
}
.denom-section + .denom-section {
  margin-top: 28px;
}
.denom-header{
  display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  margin:18px 0 10px;
}
.denom-header h2{margin:0; font-size:18px}
.denom-header span{color:var(--muted); font-size:13px}
.denom-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:18px;
  margin-top:16px;
  align-items:start;
}
@media (max-width: 900px){
  .denom-grid{ grid-template-columns: 1fr; }
}

/* ---- Tiles ---- */
.tiles{
  display:grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap:14px !important;
  width:100%;
}
.tile{
  width:100%;
  box-sizing:border-box;
  background:#fff;
  border:1px solid var(--line);
  border-radius:6px;
  padding:14px;
  display:flex; gap:12px; align-items:center;
  box-shadow: 0 10px 22px rgba(18,34,66,.06);
}
.tile:hover{transform: translateY(-1px); transition:.15s ease}
.tile img{width:54px;height:54px;object-fit:contain; filter: drop-shadow(0 10px 10px rgba(0,0,0,.10))}
.tile .tmeta{min-width:0}
.tile .tmeta strong{
  display:-webkit-box;
  font-size:14px;
  white-space: normal;
  overflow:hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.2;
}
.tile .tmeta small{color:var(--muted); display:block; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.tile.disabled{
  opacity:.65;
  pointer-events:none;
}
.tile-dot{
  width: 90px !important;
  height: 90px !important;
  max-width: none !important;
  max-height: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius:6px;
  background: rgba(44, 62, 99, .10);
  border: 1px solid rgba(44, 62, 99, .14);
  overflow: hidden !important;
  flex: 0 0 90px !important;
}
.tile .tile-dot img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
  display: block;
}

footer{
  border-top:none;
  padding:18px 0;
  color:rgba(255,255,255,.4);
  background:#1a1a2e;
}
footer a{color:rgba(255,255,255,.35) !important;}
footer a:hover{color:rgba(255,255,255,.7) !important;}
footer .ck-footer-left{color:rgba(255,255,255,.25);}
footer .ck-footer-left span{color:rgba(255,255,255,.25);}

/* ---- Dark mode ---- */
[data-theme="dark"] .price-table tr:nth-child(even) td{ background: rgba(255,255,255,.03); }
[data-theme="dark"] .tile{ box-shadow: 0 12px 26px rgba(0,0,0,.35); }
[data-theme="dark"] .tile:hover{ transform: translateY(-2px); }
[data-theme="dark"] .search, [data-theme="dark"] .select, [data-theme="dark"] .pill{
  background: var(--card);
}

/* ---- Navbar responsiveness ---- */
@media (max-width: 980px){
  .navbar{ gap: 12px; height: 68px; }
  .brand-mark{ height: 48px !important; width: 48px !important; }
  .brand-text{ font-size:20px; }
  .navlinks{
    justify-content:flex-start;
    overflow:auto;
    scrollbar-width: none;
  }
  .navlinks::-webkit-scrollbar{ display:none; }
}
@media (max-width: 520px){
  .container{ padding: 0 14px; }
  .navlinks a{ padding: 10px 8px; }
  .brand-text{ font-size: 15px; }
}

/* ---- Variant picker ---- */
.variant-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.variant-row{
  display:grid;
  grid-template-columns: 84px 1fr;
  gap:12px;
  align-items:flex-start;
  padding-top:10px;
  border-top:1px solid var(--line);
}
.variant-row:first-child{ border-top:none; padding-top:0; }
.variant-year{
  font-weight:950;
  color:var(--text);
  letter-spacing:.2px;
  font-size:14px;
  padding-top:2px;
}
.variant-chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.variant-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 10px;
  border-radius:6px;
  border:1px solid var(--line);
  background: rgba(32,58,115,.05);
  color: var(--text);
  font-weight:800;
  text-decoration:none;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.variant-chip:hover{
  transform: translateY(-1px);
  background: rgba(32,58,115,.09);
  border-color: rgba(32,58,115,.22);
}
@media (max-width: 640px){
  .variant-row{ grid-template-columns: 64px 1fr; }
  .variant-chip{ padding:8px 9px; }
}
.variant-grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap:10px;
}
@media (max-width: 980px){ .variant-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 640px){ .variant-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
.variant-link{
  display:block;
  padding:10px 12px;
  border-radius:6px;
  border:1px solid var(--line);
  text-decoration:none;
  color: var(--text);
  background: rgba(255,255,255,.04);
  font-weight:900;
  text-align:center;
}
.variant-link:hover{
  border-color: rgba(32,58,115,.22);
  background: rgba(32,58,115,.06);
}

/* ---- Breadcrumbs ---- */
.breadcrumbs{
  margin-top:18px;
  color:var(--muted);
  font-size:14px;
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.breadcrumbs a{ color:inherit; text-decoration:none; }
.breadcrumbs a:hover{ text-decoration:underline; }

/* ---- Prose ---- */
.prose p{ margin: 0 0 10px; }
.prose a{ color: var(--brand); }

/* ---- Account & collection ---- */
.btn{ background: var(--brand, #2563eb); color:#fff; border:none; border-radius: 6px; padding: 10px 14px; cursor:pointer; font-weight:600; min-height:44px; }
.btn:hover{ filter: brightness(0.98); }
.btn-soft{ background: rgba(37,99,235,.10); color: var(--brand, #2563eb); border: 1px solid rgba(37,99,235,.18); min-height:44px; }
.btn-soft:hover{ background: rgba(37,99,235,.14); }
.collection-actions{ display:flex; gap:10px; align-items:center; margin: 10px 0 12px; flex-wrap:wrap; }
.collection-status{ font-size: 0.95rem; }
.list{ margin: 8px 0 0; padding-left: 18px; }
.upload-row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.upload-row input[type="file"]{ max-width: 280px; }
.upload-row input, .card input{ padding: 10px 12px; border-radius: 6px; border:1px solid var(--line); }
.uploads{ display:grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; margin-top: 12px; }
.upload-card{ border:1px solid var(--line); border-radius: 6px; padding: 10px; background:#fff; }
.upload-card img{ width:100%; height:auto; border-radius: 10px; margin-top: 8px; display:block; }
.ck-badges{ display:flex; gap:8px; align-items:center; }
.ck-badge{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  line-height: 1;
  border: 1px solid var(--line);
  background: #fff;
}
.ck-badge-want{ background: rgba(255, 193, 7, 0.16); border-color: rgba(255, 193, 7, 0.35); }
.ck-badge-owned{ background: rgba(76, 175, 80, 0.16); border-color: rgba(76, 175, 80, 0.35); }
.collection-actions .btn.ck-active{
  box-shadow: inset 0 0 0 999px rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.15);
}
.collection-actions .btn:disabled{ opacity: 0.6; cursor: not-allowed; }
.collection-actions .collection-login{
  margin-left: 10px;
  font-size: 0.95rem;
  color: var(--link, #2b6cb0);
  text-decoration: none;
}
.collection-actions .collection-login:hover{
  text-decoration: underline;
}

/* ---- Mobile nav ---- */
.nav{
  display:flex;
  align-items:center;
  gap:10px;
}
@media (min-width: 821px){
  .nav-toggle{ display:none; }
  .nav-primary,
  .nav-more{
    display:flex;
    align-items:center;
    gap:14px;
  }
  .nav-more{ position:static; }
}
@media (max-width: 820px){
  .nav-user { display: none; }
  .brand { flex: 1; }
  .navlinks.nav { flex: 0; width: 0; overflow: hidden; }
  .nav-primary{
    display:none !important;
  }
  .nav-primary a{
    padding:8px 10px;
    border-radius:6px;
    white-space:nowrap;
  }
  .nav-toggle{
    display:flex !important;
    align-items:center;
    justify-content:center;
    border:1.5px solid rgba(255,255,255,.15);
    background:rgba(255,255,255,.08);
    border-radius:4px;
    padding:0;
    font-size:20px;
    line-height:1;
    cursor:pointer;
    width:38px;
    height:38px;
    min-width:38px;
    min-height:38px;
    color:#fff;
    flex-shrink:0;

  }
  .nav-more{
    display:none;
    position:absolute;
    left:12px;
    right:12px;
    top:calc(100% + 6px); /* always flush with header bottom regardless of height */
    background:#fff;
    border:1px solid rgba(0,0,0,.08);
    border-radius:6px;
    padding:10px;
    box-shadow:0 10px 30px rgba(0,0,0,.10);
    flex-direction:column;
    gap:6px;
    z-index:999;
  }
  .nav-more a{
    padding:12px 12px;
    border-radius:6px;
    display:flex;
    align-items:center;
    gap:12px;
    min-height:44px;
    color:#1a1a2e;
    font-size:14px;
    font-weight:600;
  }
  .nav-more a:hover{ background:rgba(0,0,0,.04); }
  .nav-more.is-open{ display:flex; }
  .site-header{ position:relative; }
}

/* ---- Gold sections ---- */
.gold-subsection{ margin-top: 16px; }
.gold-subsection h4{
  margin: 6px 4px 8px;
  font-size: 14px;
  font-weight: 700;
}
.gold-badge{
  display:inline-block;
  margin-left:10px;
  padding:3px 8px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.4px;
  border-radius:4px;
  background:linear-gradient(180deg,#f9e7b3,#f1d68a);
  border:1px solid #e2c46b;
  color:#5a4700;
  vertical-align:middle;
  cursor: help;
}
.grid-2 { align-items: start; }

/* Joomla-specific overrides — loaded via @import in Joomla, or add to index.php */

/* ── Nav user — grouped segmented card ── */
.nav-user {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 4px;
}
.nav-user-group {
  gap: 0;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.1);
  overflow: hidden;
}
.nav-user-group .nav-user-link {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  color: rgba(255,255,255,.7);
  border: none;
  border-right: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  transition: background .15s;
}
.nav-user-group .nav-user-link:last-child {
  border-right: none;
}
.nav-user-group .nav-user-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.nav-user-group .nav-logout {
  color: rgba(255,255,255,.4);
}
.nav-login {
  display: inline-flex;
  padding: 8px 18px;
  border-radius: 4px;
  background: var(--brand2, var(--brand2, #c5a356));
  color: #1a1a2e !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid var(--brand2, var(--brand2, #c5a356));
  transition: background .15s;
}
.nav-login:hover {
  background: var(--brand2, #c5a356);
  border-color: var(--brand2, #c5a356);
  color: #1a1a2e !important;
}

/* ── Nav user — grouped segmented card ── */
.nav-user {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 4px;
}
.nav .nav-user-group {
  gap: 0;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.1);
  overflow: hidden;
}
.nav .nav-user-group .nav-user-link {
  padding: 8px 14px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  white-space: nowrap;
  color: rgba(255,255,255,.7) !important;
  border: none !important;
  border-right: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 0 !important;
  background: transparent;
  transition: background .15s;
}
.nav .nav-user-group .nav-user-link:last-child {
  border-right: none !important;
}
.nav .nav-user-group .nav-user-link:hover {
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
}
.nav .nav-user-group .nav-user-link.nav-logout {
  color: rgba(255,255,255,.4) !important;
}
.nav .nav-user .nav-user-link.nav-login {
  display: inline-flex;
  padding: 8px 18px !important;
  border-radius: 4px !important;
  background: var(--brand2, var(--brand2, #c5a356)) !important;
  color: #1a1a2e !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  white-space: nowrap;
  border: 1.5px solid var(--brand2, var(--brand2, #c5a356)) !important;
  transition: background .15s;
}
.nav .nav-user .nav-user-link.nav-login:hover {
  background: var(--brand2, #c5a356) !important;
  border-color: var(--brand2, #c5a356) !important;
  color: #1a1a2e !important;
}

/* ── Mobile nav improvements ── */
.nav-more-divider {
  height: 1px;
  background: var(--line, #e0ddd4);
  margin: 4px 0;
}
.nav-more-login {
  background: var(--brand2, #c5a356);
  color: #1a1a2e !important;
  border-radius: 4px;
  text-align: center;
  font-weight: 700;
  padding: 10px 14px !important;
  line-height: 1;
}
.nav-more-login:hover {
  background: var(--brand2, #c5a356);
}

/* Desktop: hide the entire nav-more since all its content is duplicated elsewhere */
@media (min-width: 821px) {
  .nav-more { display: none !important; }
}

@media (max-width: 820px) {
  .nav-user { display: none !important; }

  .nav-primary { display: none !important; }

  .brand { flex: 1; }
  .navlinks.nav { flex: 0 !important; width: 0 !important; overflow: hidden !important; }

  .nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.08);
    border-radius: 4px;
    padding: 0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    color: #fff;
    flex-shrink: 0;

    transition: background .15s, border-color .15s;
  }
  .nav-toggle:hover {
    border-color: rgba(255,255,255,.3);
    background: rgba(255,255,255,.12);
  }

  .nav-more {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card, #fff);
    z-index: 9999;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-more.is-open {
    display: flex;
  }
  .nav-more a {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    border-bottom: 1px solid #e0ddd4;
    text-decoration: none;
    min-height: 44px;
    transition: background .12s;
  }
  .nav-more a:hover {
    background: rgba(197,163,86,.06);
  }
  .nav-more a:last-child {
    border-bottom: none;
  }
  .nav-more-divider {
    height: 1px;
    background: var(--line, #e7ecf6);
    margin: 8px 0;
  }
  .nav-more .nav-more-login {
    margin: 8px 20px 16px;
    border-radius: 4px;
    justify-content: center;
    border-bottom: none;
    min-height: 42px;
    height: 42px;
    background: var(--brand2, #c5a356);
    color: #1a1a2e;
  }

  /* Hide bullet points from Joomla menu module inside mobile nav */
  .nav-more ul { list-style: none; margin: 0; padding: 0; }
  .nav-more li { margin: 0; padding: 0; }
  .nav-more li a { padding: 16px 20px; }
}

@media print {
  header.site-header { position: relative !important; backdrop-filter: none !important; }
}

/* ---- Guided tour button ---- */
.ck-tour-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: inline-flex !important;
  align-items: center;
  gap: 0;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #fff !important;
  background: #1a1a2e !important;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: background .15s, transform .15s;
  line-height: 1;
  white-space: nowrap;
}
.ck-tour-btn:hover { background: var(--brand2, #c5a356) !important; color: #1a1a2e !important; transform: translateY(-1px); }
.ck-tour-btn svg { flex-shrink: 0; }
@media (max-width: 480px) {
  .ck-tour-btn { bottom: 14px; right: 14px; padding: 8px 12px; font-size: 12px; }
}

/* ---- Driver.js popover overrides ---- */
.ck-tour-popover {
  font-family: inherit !important;
  border-radius: 10px !important;
  padding: 20px 24px 14px !important;
  max-width: 360px !important;
  box-shadow: 0 12px 40px rgba(0,0,0,.18) !important;
  border: 1px solid var(--line, #e0ddd4) !important;
}
.ck-tour-popover .driver-popover-title {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--text, #1a1a2e) !important;
  margin-bottom: 6px !important;
}
.ck-tour-popover .driver-popover-description {
  font-size: 13px !important;
  line-height: 1.65 !important;
  color: var(--muted, #666) !important;
  margin-bottom: 0 !important;
}
.ck-tour-popover .driver-popover-footer {
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 1px solid var(--line, #e0ddd4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.ck-tour-popover .driver-popover-progress-text {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--muted, #aaa) !important;
  margin-left: 4px !important;
}
.ck-tour-popover .driver-popover-navigation-btns {
  display: flex !important;
  gap: 6px !important;
  margin-right: 8px !important;
}
.ck-tour-popover .driver-popover-navigation-btns button {
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  padding: 6px 14px !important;
  border: none !important;
  cursor: pointer !important;
  line-height: 1 !important;
  transition: all .15s !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased !important;
}
.ck-tour-popover .driver-popover-prev-btn {
  background: var(--surface, #f5f3ee) !important;
  color: var(--text, #1a1a2e) !important;
}
.ck-tour-popover .driver-popover-prev-btn:hover {
  background: var(--line, #e0ddd4) !important;
}
.ck-tour-popover .driver-popover-next-btn,
.ck-tour-popover .driver-popover-close-btn-text {
  background: var(--brand2, var(--brand2, #c5a356)) !important;
  color: #1a1a2e !important;
}
.ck-tour-popover .driver-popover-next-btn:hover,
.ck-tour-popover .driver-popover-close-btn-text:hover {
  background: var(--brand2, #c5a356) !important;
}
/* Hide the default X close, we have Done button */
.ck-tour-popover .driver-popover-close-btn {
  display: none !important;
}
.ck-tour-popover .driver-popover-arrow-side-top .driver-popover-arrow,
.ck-tour-popover .driver-popover-arrow-side-bottom .driver-popover-arrow,
.ck-tour-popover .driver-popover-arrow-side-left .driver-popover-arrow,
.ck-tour-popover .driver-popover-arrow-side-right .driver-popover-arrow {
  border: none !important;
}

/* ---- Search button in nav ---- */
.nav-search-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  color: rgba(255,255,255,.5);
  transition: color .15s;
  font-family: inherit;
  flex-shrink: 0;
}
.nav-search-btn:hover { color: #fff; }
.nav-search-label { font-size: 10px; font-weight: 700; letter-spacing: .3px; }
@media (max-width: 820px) {
  .nav-search-btn { display: none !important; }
}

/* ---- Search overlay ---- */
.ck-search-overlay {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 20000;
  background: rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 60px 16px 16px;
  overflow-y: auto;
}
.ck-search-overlay.open { display: block; }

.ck-search-wrap {
  max-width: 600px;
  margin: 0 auto;
  background: var(--card, #fff);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  overflow: hidden;
}

.ck-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line, #e0ddd4);
}
.ck-search-icon { color: var(--muted, #888); flex-shrink: 0; }
.ck-search-input {
  flex: 1;
  border: none;
  outline: none;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  background: transparent;
  color: var(--text, #1a1a2e);
  min-width: 0;
}
.ck-search-input::placeholder { color: var(--muted, #bbb); }
.ck-search-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: none;
  border-radius: 6px;
  background: var(--surface, #f5f3ee);
  cursor: pointer;
  color: var(--muted, #888);
  flex-shrink: 0;
  transition: background .15s;
}
.ck-search-close:hover { background: var(--line, #e0ddd4); }

.ck-search-hint {
  padding: 20px 18px;
  font-size: 13px;
  color: var(--muted, #999);
  text-align: center;
}

/* Search results */
.ck-search-results { max-height: 420px; overflow-y: auto; }
.ck-sr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  text-decoration: none;
  color: var(--text, #1a1a2e);
  border-bottom: 1px solid var(--line, #e0ddd4);
  transition: background .1s;
  cursor: pointer;
}
.ck-sr-item:last-child { border-bottom: none; }
.ck-sr-item:hover { background: var(--surface, #f5f3ee); }
.ck-sr-item:hover .ck-sr-title { color: var(--brand2, var(--brand2, #c5a356)); text-decoration: underline; }

.ck-sr-img {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--surface, #f5f3ee);
}
[data-theme="dark"] .ck-sr-img { mix-blend-mode: lighten; }
.ck-sr-img-empty {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--surface, #f5f3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #ccc);
}
.ck-sr-info { flex: 1; min-width: 0; }
.ck-sr-title {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ck-sr-sub {
  font-size: 12px;
  color: var(--muted, #888);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ck-sr-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
}
.ck-sr-series { background: rgba(197,163,86,.12); color: var(--brand2, var(--brand2, #c5a356)); }
.ck-sr-world { background: rgba(16,100,80,.1); color: #10644f; }
.ck-sr-page { background: rgba(100,60,180,.1); color: #6a3cb4; }
.ck-sr-arrow { color: var(--muted, #ccc); flex-shrink: 0; }

@media (max-width: 600px) {
  .ck-search-overlay { padding: 20px 10px 10px; }
  .ck-search-wrap { border-radius: 8px; }
  .ck-search-results { max-height: 60vh; }
}
