/* Calmera Wiki — protótipo de layout */

:root {
  --bg: #09090c;
  --bg-soft: #0e0e13;
  --panel: #111117;
  --panel-hover: #17171f;
  --border: #22222c;
  --border-soft: #1a1a22;
  --text: #ececf1;
  --muted: #9a9aa6;
  --dim: #6b6b77;
  --gold: #f5c518;
  --gold-soft: rgba(245, 197, 24, 0.12);
  --green: #34d399;
  --red: #fb7185;
  --text-soft: #cfcfd8;
  --surface: rgba(10, 10, 14, 0.94);
  --surface-2: rgba(10, 10, 14, 0.9);
  --topbar-bg: rgba(9, 9, 12, 0.82);
  --scroll: #26262f;
  --home-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  --wall-x: linear-gradient(90deg, rgba(9, 9, 12, 0.15) 0%, rgba(9, 9, 12, 0.45) 30%, rgba(9, 9, 12, 0.45) 70%, rgba(9, 9, 12, 0.15) 100%);
  --wall-y: linear-gradient(180deg, rgba(9, 9, 12, 0.05) 0%, rgba(9, 9, 12, 0.25) 50%, rgba(9, 9, 12, 0.4) 100%);
  --radius: 10px;
  --topbar-h: 60px;
  --sidebar-w: 240px;
  --font: 'Outfit', system-ui, sans-serif;
  --display: 'Cinzel', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body:not(.admin):not(.admin-login)::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    var(--wall-x),
    var(--wall-y),
    url('img/wallpaper.jpg') center 30% / cover no-repeat;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.icon { flex-shrink: 0; }

kbd {
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-soft);
  white-space: nowrap;
}

/* Topbar */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
}

.topbar__left, .topbar__right { display: flex; align-items: center; gap: 10px; }

.brand { display: flex; align-items: center; gap: 8px; }
.brand img { height: 32px; width: auto; }
.brand__tag {
  font-family: var(--display);
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  padding: 1px 7px;
  border: 1px solid rgba(245, 197, 24, 0.35);
  border-radius: 4px;
}

.topbar__search {
  justify-self: center;
  width: min(460px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--dim);
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  transition: border-color 0.15s;
}
.topbar__search:hover { border-color: #33333f; color: var(--muted); }
.topbar__search span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--panel-hover); color: var(--text); }
.topbar__menu { display: none; }

/* Dropdown idioma */

.dropdown { position: relative; }
.dropdown__trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  font-size: 0.84rem;
  color: var(--muted);
  border-radius: 8px;
}
.dropdown__trigger:hover, .dropdown.is-open .dropdown__trigger { background: var(--panel-hover); color: var(--text); }
.dropdown__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 190px;
  list-style: none;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: 0.15s;
}
.dropdown.is-open .dropdown__menu { opacity: 1; visibility: visible; transform: none; }
.dropdown__menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  font-size: 0.85rem;
  border-radius: 6px;
  color: var(--muted);
}
.dropdown__menu a:hover { background: var(--panel-hover); color: var(--text); }
.dropdown__menu a.is-active { color: var(--gold); }
.dropdown__short { font-size: 0.68rem; font-weight: 700; width: 22px; color: var(--dim); }

/* Shell + sidebar */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  padding-top: var(--topbar-h);
  min-height: 100vh;
  transition: grid-template-columns 0.2s;
}
body.sidebar-collapsed .shell { grid-template-columns: 0 1fr; }
body.sidebar-collapsed .sidebar { transform: translateX(-100%); }

.sidebar {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 16px 10px 30px;
  border-right: 1px solid var(--border-soft);
  background: var(--bg);
  transition: transform 0.2s;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
}

.sidebar__nav { display: flex; flex-direction: column; gap: 1px; }

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  font-size: 0.86rem;
  color: var(--muted);
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}
.sidebar__link:hover { background: var(--panel); color: var(--text); }
.sidebar__link.is-active { background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.sidebar__link--sub { padding-left: 14px; }
.sidebar__ext { margin-left: auto; color: var(--dim); }

.sidebar__group { margin-top: 10px; }
.sidebar__group-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.sidebar__group-title .icon { color: var(--dim); transition: transform 0.2s; transform: rotate(-90deg); }
.sidebar__group.is-open .sidebar__group-title .icon { transform: none; }
.sidebar__list { list-style: none; display: none; margin-top: 2px; border-left: 1px solid var(--border-soft); margin-left: 12px; }
.sidebar__group.is-open .sidebar__list { display: block; }

.sidebar-backdrop { display: none; }

/* Main */

.main { min-width: 0; padding: 28px 32px 20px; }

.footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.78rem;
  color: var(--dim);
  text-align: center;
}
.footer__views { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; opacity: 0.8; }

/* Conteúdo escrito no editor do painel */
.cms-content h3 { font-size: 1.02rem; margin: 18px 0 8px; color: var(--text); }
.cms-content h4 { font-size: 0.92rem; margin: 14px 0 6px; color: var(--text); }
.cms-content ol { padding-left: 22px; color: var(--text-soft); margin-bottom: 12px; }
.cms-content a:not(.item-chip):not(.npc-name):not(.coord-link) { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.cms-content img { max-width: 100%; height: auto; border-radius: 8px; }
.cms-content .item-chip img, .cms-content .npc-sprite, .cms-content .cms-outfit { border-radius: 0; image-rendering: pixelated; }
.cms-content blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 3px solid var(--gold); background: var(--panel); color: var(--muted); border-radius: 0 8px 8px 0; }
.cms-content figure { margin: 0 0 14px; }
.cms-content figcaption { font-size: 0.78rem; color: var(--dim); margin-top: 4px; }
.cms-content hr { border: 0; border-top: 1px solid var(--border-soft); margin: 20px 0; }
.cms-content pre { padding: 12px; border-radius: 8px; background: var(--bg-soft); border: 1px solid var(--border); overflow-x: auto; margin-bottom: 12px; font-size: 0.82rem; }
.cms-content .callout { margin-bottom: 14px; }
.cms-content .callout > div > :last-child { margin-bottom: 0; }
.cms-items { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; vertical-align: middle; }
.cms-extra { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.cms-notice { margin-bottom: 16px; }
.cms-notice > div > :last-child { margin-bottom: 0; }
.preview-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 9px 14px; border-radius: var(--radius); border: 1px solid rgba(245, 197, 24, 0.4); background: var(--gold-soft); color: var(--gold); font-size: 0.84rem; font-weight: 600; }
.article__lead { font-size: 1rem; color: var(--muted); margin-bottom: 18px; }

/* Home */

.home { max-width: 1180px; margin: 0 auto; }

.welcome { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.welcome__logo { height: 56px; width: auto; }
.welcome__title { font-size: 1.35rem; font-weight: 700; }
.welcome__lead { font-size: 0.9rem; color: var(--muted); max-width: 520px; }
.welcome__views { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); line-height: 1.25; }
.welcome__views span { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.welcome__views strong { font-size: 1.35rem; color: var(--gold); }
.welcome__views small { font-size: 0.74rem; color: var(--muted); }
@media (max-width: 700px) { .welcome__views { display: none; } }

.home-search {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 26px;
  color: var(--dim);
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  transition: border-color 0.15s;
}
.home-search:hover { border-color: rgba(245, 197, 24, 0.35); color: var(--muted); }
.home-search span { flex: 1; text-align: left; }

.home-section { margin-bottom: 22px; }
.home-section__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}

.featured-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.featured-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.featured-card:hover { border-color: rgba(245, 197, 24, 0.4); background: var(--panel-hover); transform: translateY(-1px); }
.featured-card__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  color: var(--gold);
  overflow: hidden;
}
.featured-card__icon img { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.featured-card__title { flex: 1; font-size: 0.88rem; font-weight: 600; }
.featured-card__arrow { color: var(--dim); transition: transform 0.15s, color 0.15s; }
.featured-card:hover .featured-card__arrow { color: var(--gold); transform: translateX(2px); }

.home-layout { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
.category-grid { columns: 2; column-gap: 14px; }
.category-grid > .category-card { display: block; width: 100%; break-inside: avoid; margin-bottom: 14px; }

.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.panel__title { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; font-weight: 700; }
.panel__icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--gold-soft);
  color: var(--gold);
}
.panel__count { font-size: 0.75rem; color: var(--dim); font-weight: 600; }

.category-card__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 8px;
  padding: 10px;
}
.category-card__list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  font-size: 0.83rem;
  color: var(--muted);
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}
.category-card__list a:hover { background: var(--panel-hover); color: var(--text); }
.category-card__dot { flex-shrink: 0; width: 28px; height: 28px; display: grid; place-items: center; color: var(--dim); }
.category-card__dot img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; }

.home-live { display: grid; grid-template-columns: 1fr 300px; gap: 14px; margin-bottom: 22px; align-items: stretch; }
.home-live__more { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; color: var(--gold); }
.home-live__more:hover { text-decoration: underline; }
.home-live__label { margin: 0 0 8px; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.home-live__empty { margin: 0; font-size: 0.84rem; color: var(--muted); }
.home-events { border-color: rgba(245, 197, 24, 0.22); background: radial-gradient(ellipse at 0% 0%, rgba(245, 197, 24, 0.07), transparent 55%), var(--panel); }
.home-events__body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 14px; }
.home-events__list { list-style: none; display: grid; gap: 7px; margin: 0; padding: 0; }
.home-events__list li { display: flex; flex-direction: column; padding: 7px 10px; border-left: 3px solid var(--ev); border-radius: 6px; background: color-mix(in srgb, var(--ev) 12%, var(--bg-soft)); }
.home-events__list strong { font-size: 0.87rem; }
.home-events__list span { font-size: 0.75rem; color: var(--muted); }
.home-events__list .is-live { color: var(--green); font-weight: 600; }
.home-boosted__list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
.home-boosted__item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); text-align: center; transition: border-color 0.12s, background 0.12s; }
.home-boosted__item:hover { border-color: rgba(245, 197, 24, 0.4); background: var(--panel-hover); }
.home-boosted__img { width: 64px; height: 64px; display: grid; place-items: center; }
.home-boosted__img img { width: 64px; height: 64px; image-rendering: pixelated; object-fit: contain; }
.home-boosted__kind { font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--green); }
.home-boosted__item.is-boss .home-boosted__kind { color: var(--gold); }
.home-boosted__item strong { font-size: 0.84rem; line-height: 1.25; }
@media (max-width: 600px) { .home-events__body { grid-template-columns: 1fr; } }

.updates { position: sticky; top: calc(var(--topbar-h) + 16px); }
.updates__list { list-style: none; padding: 6px; }
.updates__list a { display: flex; flex-direction: column; padding: 9px 10px; border-radius: 7px; transition: background 0.12s; }
.updates__list a:hover { background: var(--panel-hover); }
.updates__title { font-size: 0.87rem; font-weight: 600; }
.updates__meta { font-size: 0.75rem; color: var(--dim); }

/* Artigo */

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 36px; max-width: 1180px; margin: 0 auto; }
.article { min-width: 0; max-width: 860px; }
.article-layout > .article,
.creatures-page {
  padding: 24px 28px 28px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
.article-layout > .toc {
  padding: 16px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--surface-2);
}
.home { text-shadow: var(--home-shadow); }
@media (max-width: 720px) {
  .article-layout > .article, .creatures-page { padding: 18px 14px; border-radius: 10px; }
}
.article--empty { text-align: center; padding: 60px 0; margin: 0 auto; }
.article--empty .article__title { margin-bottom: 18px; }

.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 0.78rem; color: var(--dim); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .is-current { color: var(--muted); }

.article__head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border-soft); }
.article__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); }
.article__icon img { width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated; }
.article__title { font-size: 1.8rem; font-weight: 700; line-height: 1.2; }
.article__meta { font-size: 0.78rem; color: var(--dim); margin-top: 3px; }

.article__body { display: flow-root; }
.article__body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.article__body h2:first-of-type { margin-top: 0; }
.article__body p, .article__body ul { color: var(--text-soft); margin-bottom: 12px; }
.article__body ul { padding-left: 20px; }
.article__body li { margin-bottom: 4px; }
.article__body strong { color: var(--text); }
.article__body code {
  font-size: 0.82rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--gold);
}

.callout {
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: 0.86rem;
}
.callout .icon { margin-top: 2px; }
.callout p { color: var(--muted); }
.callout--info { border-color: rgba(96, 165, 250, 0.3); background: rgba(96, 165, 250, 0.06); color: #93c5fd; }
.callout--warn { border-color: rgba(245, 197, 24, 0.3); background: rgba(245, 197, 24, 0.05); color: var(--gold); }

.infobox {
  float: right;
  width: 260px;
  margin: 0 0 16px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.infobox__media { display: grid; place-items: center; height: 130px; background: radial-gradient(circle, rgba(245, 197, 24, 0.12), transparent 70%), var(--bg-soft); }
.infobox__media img { width: 80px; height: 80px; object-fit: contain; image-rendering: pixelated; }
.infobox__title { font-size: 0.9rem; text-align: center; padding: 10px; border-bottom: 1px solid var(--border-soft); }
.infobox__rows { padding: 4px 0; }
.infobox__rows div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; font-size: 0.82rem; }
.infobox__rows div:nth-child(odd) { background: rgba(255, 255, 255, 0.015); }
.infobox__rows dt { color: var(--dim); }
.infobox__rows dd { font-weight: 600; text-align: right; }
.is-gold { color: var(--gold); }

.table-wrap { overflow-x: auto; margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.table td { padding: 9px 14px; border-bottom: 1px solid var(--border-soft); color: var(--text-soft); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--panel); }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
.tag--red { background: rgba(251, 113, 133, 0.12); color: var(--red); }
.tag--gold { background: var(--gold-soft); color: var(--gold); }
.tag--green { background: rgba(52, 211, 153, 0.12); color: var(--green); }

.reward-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.reward-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.reward-card--premium { border-color: rgba(245, 197, 24, 0.28); }
.reward-card img { width: 52px; height: 52px; object-fit: contain; image-rendering: pixelated; }
.reward-card div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.reward-card strong { font-size: 0.9rem; }

.faq { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); margin-bottom: 8px; }
.faq summary { padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.faq[open] summary { color: var(--gold); }
.faq p { padding: 0 14px 12px; margin: 0; color: var(--muted); font-size: 0.87rem; }

.toc { position: sticky; top: calc(var(--topbar-h) + 28px); align-self: start; font-size: 0.83rem; }
.toc__title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.toc ul { list-style: none; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--gold); border-left-color: var(--gold); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  transition: 0.15s;
}
.btn:hover { background: var(--panel-hover); }
.btn--gold { background: linear-gradient(180deg, #f7d24a, #e0a800); color: #1a1400; border-color: rgba(245, 197, 24, 0.7); }
.btn--gold:hover { filter: brightness(1.06); background: linear-gradient(180deg, #f7d24a, #e0a800); }
.btn--sm { padding: 5px 10px; font-size: 0.78rem; }

/* Busca */

.search-modal { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; padding: 12vh 16px 16px; }
.search-modal[hidden] { display: none; }
.search-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(3px); }
.search-modal__panel {
  position: relative;
  width: min(580px, 100%);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.search-modal__input { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); color: var(--dim); }
.search-modal__input input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 0.95rem; }
.search-modal__input kbd { cursor: pointer; }
.search-modal__results { list-style: none; overflow-y: auto; padding: 6px; }
.search-modal__results a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 7px; font-size: 0.88rem; }
.search-modal__results a.is-selected, .search-modal__results a:hover { background: var(--gold-soft); color: var(--gold); }
.search-modal__results small { color: var(--dim); font-size: 0.74rem; }
.search-modal__empty, .search-modal__hint { padding: 18px; text-align: center; font-size: 0.85rem; color: var(--dim); }

/* Responsivo */

@media (max-width: 1100px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-live { grid-template-columns: 1fr; }
  .updates { position: static; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}

@media (max-width: 900px) {
  .topbar { grid-template-columns: auto 1fr auto; }
  .topbar__menu { display: inline-grid; }
  .topbar__collapse { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--topbar-h);
    z-index: 40;
    width: 270px;
    transform: translateX(-100%);
  }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 30; background: rgba(0, 0, 0, 0.55); }
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 22px 16px; }
}

@media (max-width: 640px) {
  .topbar__search span, .topbar__search kbd, .dropdown__label { display: none; }
  .topbar__search { width: auto; justify-self: end; }
  .category-grid { columns: 1; }
  .featured-grid { grid-template-columns: 1fr; }
  .infobox { float: none; width: 100%; margin: 0 0 16px; }
  .reward-cards { grid-template-columns: 1fr; }
  .welcome__logo { height: 42px; }
}
