/* ========================================================
   LOOPFORGE ARCADE // HOME PAGE
   Clean dark gray layout with soft, layered shadows.
   Colours and shadows come from arcade-theme.css.
   ======================================================== */

@import url('arcade-theme.css');

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

html {
  scroll-behavior: smooth;
  background-color: var(--tc-bg-canvas);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(255, 255, 255, 0.035), transparent 70%),
    var(--tc-bg-canvas);
  color: var(--tc-text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--tc-accent-yellow);
  outline-offset: 2px;
}

kbd {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--tc-text-muted);
  background: var(--tc-bg-pill);
  border-radius: 5px;
  padding: 1px 6px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

/* ================= LAYOUT ================= */
.lf-app-wrapper {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ================= HEADER ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  margin-bottom: 20px;
  background: linear-gradient(var(--tc-bg-canvas) 70%, rgba(27, 28, 31, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--tc-text-main);
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 14px rgba(240, 181, 77, 0.12));
  transition: transform 0.4s ease;
}

.brand:hover .brand-mark {
  transform: rotate(-12deg) scale(1.04);
}

.brand-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}

.brand-accent {
  color: var(--tc-accent-yellow);
}

.lf-nav-deck {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--tc-bg-surface);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.lf-nav-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--tc-text-muted);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.lf-nav-btn:hover {
  color: var(--tc-text-main);
}

.lf-nav-btn.active {
  background: var(--tc-bg-card-hover);
  color: var(--tc-text-main);
  box-shadow: var(--shadow-sm);
}

.lf-btn-sound {
  color: var(--tc-text-dim);
  font-size: 13px;
}

/* ================= VIEWS ================= */
.lf-view-section {
  display: none;
}

.lf-view-section.active {
  display: block;
  animation: fadeUp 0.35s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 11px 22px;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--tc-accent-yellow);
  color: var(--tc-text-dark);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25), 0 8px 20px rgba(240, 181, 77, 0.18);
}

.btn-primary:hover {
  background: #f5c265;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25), 0 12px 28px rgba(240, 181, 77, 0.26);
}

.btn-secondary {
  background: var(--tc-bg-pill);
  color: var(--tc-text-main);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #3c3d44;
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--tc-text-muted);
  padding: 9px 14px;
}

.btn-ghost:hover {
  background: var(--tc-bg-card);
  color: var(--tc-text-main);
  transform: none;
}

.btn-danger {
  background: rgba(239, 123, 123, 0.12);
  color: #f19a9a;
}

.btn-danger:hover {
  background: rgba(239, 123, 123, 0.2);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--tc-text-dim);
  padding: 9px 14px;
  font-size: 13.5px;
}

.btn-danger-ghost:hover {
  color: #f19a9a;
  transform: none;
}

/* ================= HERO ================= */
.hero {
  margin-bottom: 24px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--tc-bg-card);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 340px;
}

.hero-media {
  position: relative;
  overflow: hidden;
  background: var(--tc-bg-surface);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(42, 43, 48, 0.9));
  pointer-events: none;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s ease, opacity 0.3s ease;
}

.hero-card:hover .hero-img {
  transform: scale(1.025);
}

.hero-body {
  padding: 40px 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--tc-accent-yellow);
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--tc-text-muted);
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 15px;
  color: var(--tc-text-muted);
  margin-bottom: 28px;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.hero-save {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tc-text-dim);
}

/* ================= PROGRESS SUMMARY ================= */
.summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding: 0 4px;
  margin-bottom: 56px;
  font-size: 14px;
  color: var(--tc-text-dim);
}

.summary strong {
  color: var(--tc-text-main);
  font-weight: 700;
}

.summary-link {
  margin-left: auto;
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--tc-text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.summary-link:hover { color: var(--tc-accent-yellow); }

.lf-progress-track {
  width: 100%;
  height: 6px;
  background: var(--tc-bg-pill);
  border-radius: 999px;
  overflow: hidden;
}

.lf-progress-fill {
  height: 100%;
  background: var(--tc-accent-yellow);
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* ================= CATALOG ================= */
.catalog { margin-bottom: 64px; }

.section-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

/* ================= GAME CARDS ================= */
.lf-realms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.arcade-card {
  background: var(--tc-bg-card);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.arcade-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-banner-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--tc-bg-surface);
}

.card-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}

.arcade-card:hover .card-banner-img { transform: scale(1.04); }

.card-status {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--tc-text-main);
  background: rgba(27, 28, 31, 0.82);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 4px 10px 4px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.card-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tc-accent-mint);
}

.card-body {
  padding: 16px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-text { min-width: 0; }

.card-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-sub {
  font-size: 13px;
  color: var(--tc-text-dim);
}

.card-actions-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-card-info,
.btn-card-guide {
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tc-text-dim);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.arcade-card:hover .btn-card-info,
.arcade-card:hover .btn-card-guide,
.btn-card-info:focus-visible,
.btn-card-guide:focus-visible { opacity: 1; }

.btn-card-info:hover,
.btn-card-guide:hover {
  color: var(--tc-text-main);
  background: var(--tc-bg-surface);
}

.btn-card-guide:hover {
  color: var(--tc-gold);
}

@media (hover: none) {
  .btn-card-info,
  .btn-card-guide { opacity: 1; }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 16px;
  color: var(--tc-text-dim);
  background: var(--tc-bg-surface);
  border-radius: 18px;
}

.empty-state strong {
  display: block;
  font-size: 16px;
  color: var(--tc-text-main);
  margin-bottom: 4px;
}

/* ================= FOOTER ================= */
.site-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--tc-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--tc-text-dim);
}

/* ================= PANELS (TROPHIES / SAVES) ================= */
.panel {
  background: var(--tc-bg-card);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 32px;
  margin-bottom: 48px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.panel-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.panel-sub {
  font-size: 14px;
  color: var(--tc-text-muted);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.progress-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--tc-text-muted);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.achievement-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--tc-bg-surface);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.2s ease;
}

.achievement-card.locked { opacity: 0.5; }
.achievement-card.locked .achieve-icon-box { filter: grayscale(1); }

.achievement-card.unlocked {
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(79, 201, 168, 0.35);
}

.achieve-icon-box {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: var(--tc-bg-card);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.achieve-title {
  font-size: 15px;
  font-weight: 700;
}

.achieve-game-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--tc-accent-yellow);
  margin-bottom: 2px;
}

.achieve-desc {
  font-size: 13px;
  color: var(--tc-text-muted);
  line-height: 1.45;
}

.vault-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.vault-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--tc-bg-surface);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.vault-card-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}

.vault-card-desc {
  font-size: 13.5px;
  color: var(--tc-text-muted);
  margin-bottom: 20px;
  flex: 1;
}

/* ================= VIEW: GUIDES ================= */
.guides-tabs-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-overflow-scrolling: touch;
}

.guides-tabs-nav::-webkit-scrollbar {
  height: 4px;
}

.guides-tabs-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.guides-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--tc-bg-surface);
  color: var(--tc-text-muted);
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.guides-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.guides-tab-btn.active {
  background: var(--tc-bg-card);
  color: var(--tc-gold);
  border-color: rgba(249, 210, 122, 0.4);
  box-shadow: var(--shadow-sm), 0 0 16px rgba(249, 210, 122, 0.12);
}

.guide-pane {
  display: none;
  animation: guideFadeIn 0.22s ease-out;
}

.guide-pane.active {
  display: block;
}

@keyframes guideFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.guide-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  background: var(--tc-bg-surface);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  align-items: center;
}

.guide-hero-media {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-sm);
  background: #000;
}

.guide-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.guide-hero-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-hero-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.guide-hero-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.guide-hero-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--tc-text-dim);
  margin: 0;
}

.guide-hero-tag {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--tc-text-muted);
}

.guide-hero-tag.accent {
  background: rgba(249, 210, 122, 0.15);
  color: var(--tc-gold);
}

.guide-hero-desc {
  font-size: 14px;
  color: var(--tc-text-muted);
  line-height: 1.5;
  margin: 0;
}

.guide-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.guide-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.guide-box {
  background: var(--tc-bg-surface);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.guide-box.full-width {
  grid-column: 1 / -1;
}

.guide-box-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 14px 0;
  color: #fff;
}

.guide-box-title .icon {
  font-size: 18px;
}

.guide-controls-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 14px;
  background: var(--tc-bg-card);
  border-radius: 10px;
}

.guide-key-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.guide-action-text {
  font-size: 13px;
  color: var(--tc-text-muted);
  text-align: right;
}

.guide-feature-list, .guide-tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-feature-item, .guide-tip-item {
  position: relative;
  padding-left: 20px;
  font-size: 13.5px;
  color: var(--tc-text-muted);
  line-height: 1.5;
}

.guide-feature-item::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--tc-gold);
  font-size: 18px;
  line-height: 1;
}

.guide-tip-item::before {
  content: "✦";
  position: absolute;
  left: 3px;
  color: #4fc9a8;
  font-size: 13px;
  line-height: 1.3;
}

.guide-tip-item strong, .guide-feature-item strong {
  color: #fff;
  font-weight: 700;
}

/* ================= MODAL ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 10, 12, 0.65);
  backdrop-filter: blur(6px);
  animation: overlayIn 0.2s ease-out;
}

.modal-overlay.hidden { display: none; }

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--tc-bg-card);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.btn-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(27, 28, 31, 0.8);
  backdrop-filter: blur(6px);
  color: var(--tc-text-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease;
}

.btn-modal-close:hover { background: rgba(27, 28, 31, 0.95); }

.modal-banner {
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--tc-bg-surface);
}

.modal-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.modal-content-wrap { padding: 24px 26px 26px; }

.modal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-genre-tag {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--tc-accent-yellow);
  background: rgba(240, 181, 77, 0.1);
  border-radius: 999px;
  padding: 4px 10px;
}

.modal-tabs-row {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: var(--tc-bg-surface);
  border-radius: 12px;
  margin-bottom: 16px;
}

.modal-tab-btn {
  background: transparent;
  border: none;
  border-radius: 9px;
  padding: 6px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tc-text-dim);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-tab-btn:hover { color: var(--tc-text-main); }

.modal-tab-btn.active {
  background: var(--tc-bg-card-hover);
  color: var(--tc-text-main);
  box-shadow: var(--shadow-sm);
}

.modal-tab-pane {
  display: none;
  font-size: 14px;
  color: var(--tc-text-muted);
  margin-bottom: 22px;
  min-height: 90px;
}

.modal-tab-pane.active { display: block; }

.modal-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--tc-text-main);
}

.modal-feature-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tc-accent-yellow);
  flex-shrink: 0;
}

.modal-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background: var(--tc-bg-surface);
  border-radius: 10px;
  margin-bottom: 6px;
}

.modal-control-kbd {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--tc-text-main);
  background: var(--tc-bg-pill);
  border-radius: 6px;
  padding: 2px 8px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.modal-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--tc-border-subtle);
}

/* ================= TOASTS ================= */
#portal-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.portal-toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--tc-bg-card-hover);
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tc-text-main);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.3s ease-out;
}

.portal-toast::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tc-text-dim);
  flex-shrink: 0;
}

.portal-toast.toast-success::before { background: var(--tc-accent-mint); }
.portal-toast.toast-warn::before { background: var(--tc-accent-yellow); }

.portal-toast.toast-exit {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= CATEGORY DECK & SECTIONS ================= */
.catalog-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.hub-category-deck {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--tc-bg-surface);
  padding: 6px;
  border-radius: var(--br-pill);
  border: 1px solid var(--tc-border-subtle);
  overflow-x: auto;
  max-width: 100%;
}

.hub-category-btn {
  background: transparent;
  border: none;
  color: var(--tc-text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--br-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.hub-category-btn:hover {
  color: var(--tc-text-main);
  background: var(--tc-bg-card);
}

.hub-category-btn.active {
  background: #ffffff;
  color: #111215;
  box-shadow: var(--shadow-sm);
}

.hub-category-btn.active .hub-cat-count {
  background: #111215;
  color: #ffffff;
}

.hub-category-btn.cat-casino.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b0f19;
}

.hub-category-btn.cat-casino.active .hub-cat-count {
  background: #0b0f19;
  color: #fde68a;
}

.hub-cat-count {
  background: var(--tc-bg-pill);
  color: var(--tc-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--br-pill);
  transition: all 0.2s;
}

.nav-casino-pill {
  color: #fbbf24;
  font-weight: 800;
}

/* Category Sections */
.hub-category-section {
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hub-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tc-border-subtle);
  flex-wrap: wrap;
}

.hub-cat-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hub-cat-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  background: var(--tc-bg-surface);
  border: 1px solid var(--tc-border-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.hub-cat-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--tc-text-main);
  letter-spacing: -0.01em;
}

.hub-cat-sub {
  color: var(--tc-text-muted);
  font-size: 13px;
  max-width: 650px;
  line-height: 1.45;
}

.hub-cat-action-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b0f19;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--br-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.hub-cat-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.hub-cat-count-badge {
  background: var(--tc-bg-surface);
  border: 1px solid var(--tc-border-subtle);
  color: var(--tc-text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--br-pill);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16 / 8; }
  .hero-media::after { background: linear-gradient(180deg, transparent 60%, rgba(42, 43, 48, 0.9)); }
  .hero-body { padding: 28px 28px 30px; }
  .lf-realms-grid { grid-template-columns: repeat(2, 1fr); }
  .vault-cards-grid { grid-template-columns: 1fr; }
  .guide-hero { grid-template-columns: 1fr; }
  .guide-sections-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .lf-app-wrapper { padding: 0 16px 32px; }
  .site-header { flex-wrap: wrap; padding: 14px 0; }
  .brand-name { font-size: 26px; }
  .brand-mark { width: 36px; height: 36px; }
  .lf-nav-deck { width: 100%; justify-content: space-between; }
  .lf-nav-btn { padding: 8px 10px; font-size: 13px; }
  .hero-body { padding: 22px 20px 24px; }
  .summary { gap: 6px 18px; margin-bottom: 40px; }
  .summary-link { margin-left: 0; }
  .lf-realms-grid { grid-template-columns: 1fr; }
  .achievements-grid { grid-template-columns: 1fr; }
  .panel { padding: 22px 18px; }
  .guide-hero { padding: 16px; }
  .guide-box { padding: 16px; }
  .guide-control-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .guide-action-text { text-align: left; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
