﻿/* Rubicon AI-RPG · sistema visual unificado a partir de boceto_interfaz.html. */
:root {
  --bg-base:#0c1017;
  --bg-surface:#141b24;
  --bg-surface-elevated:#1a2330;
  --bg-surface-glass:rgba(20,27,36,.95);
  --border-subtle:rgba(255,255,255,.08);
  --border-accent:rgba(229,193,123,.35);
  --gold-primary:#e5c17b;
  --gold-glow:rgba(229,193,123,.15);
  --text-main:#f0f3f6;
  --text-muted:#8e9cae;
  --text-story:#e8eaed;
  --accent-emerald:#5ec89b;
  --accent-amber:#e5a75b;
  --accent-crimson:#e06c75;
  --font-ui:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --font-story:"Palatino Linotype","Book Antiqua",Georgia,serif;
  --shadow-soft:0 16px 40px rgba(0,0,0,.22);
  --radius-sm:6px;
  --radius-md:10px;
  --radius-lg:12px;
}

html { color-scheme:dark; scroll-behavior:smooth; }
body { margin:0; background:var(--bg-base); color:var(--text-main); font-family:var(--font-ui); }
body::before { content:""; position:fixed; inset:0; pointer-events:none; z-index:-1; background:radial-gradient(circle at 50% 0%,rgba(229,193,123,.045),transparent 34%); }
[hidden] { display:none!important; }
a { color:var(--gold-primary); }
a:hover { color:#f5d99f; }
h1,h2,h3,h4 { color:var(--text-main); font-family:var(--font-story); font-weight:600; letter-spacing:-.015em; }
p { line-height:1.65; }
::selection { color:#10141a; background:var(--gold-primary); }
.muted-copy,.field-hint { color:var(--text-muted)!important; }
.skip-link { position:fixed; top:.5rem; left:.5rem; z-index:2000; transform:translateY(-160%); padding:.65rem 1rem; border-radius:var(--radius-sm); background:var(--gold-primary); color:#111; }
.skip-link:focus { transform:none; }
:focus-visible { outline:2px solid var(--gold-primary); outline-offset:3px; }

/* Navegación y armazón */
.app-shell { min-height:100vh; display:flex; flex-direction:column; overflow-x:clip; }
.app-header { position:sticky; top:0; z-index:1000; min-height:58px; border-bottom:1px solid var(--border-subtle); background:var(--bg-surface-glass); backdrop-filter:blur(12px); }
.app-header .navbar { min-height:58px; padding:.42rem 0; }
.app-nav { max-width:1440px; margin:auto; padding-inline:1rem; gap:1rem; }
.brand-mark { display:flex; align-items:center; gap:.65rem; color:var(--gold-primary)!important; font-family:var(--font-story); font-size:1.15rem; letter-spacing:.02em; }
.brand-mark small { display:block; margin-top:.05rem; color:var(--text-muted); font:600 .57rem/1 var(--font-ui); letter-spacing:.16em; }
.brand-sigil { display:grid; width:31px; height:31px; place-items:center; border:1px solid var(--border-accent); border-radius:50%; background:var(--gold-glow); box-shadow:0 0 22px rgba(229,193,123,.08); }
.brand-logo { width:36px; height:36px; object-fit:contain; filter:drop-shadow(0 0 12px rgba(229,193,123,.16)); }
.app-tabs { gap:.2rem; overflow-x:auto; scrollbar-width:none; }
.app-tabs .nav-link { position:relative; padding:.6rem .72rem!important; color:var(--text-muted)!important; font-size:.82rem; white-space:nowrap; }
.app-tabs .nav-link::after { content:""; position:absolute; right:.7rem; bottom:.2rem; left:.7rem; height:1px; transform:scaleX(0); background:var(--gold-primary); transition:transform .2s ease; }
.app-tabs .nav-link:hover,.app-tabs .nav-link.active { color:var(--text-main)!important; }
.app-tabs .nav-link.active::after { transform:scaleX(1); }
.nav-account { display:flex; align-items:center; gap:.7rem; }
.account-nav { align-items:center; }
.account-trigger { display:flex; align-items:center; gap:.55rem; color:var(--text-main)!important; font-size:.84rem; }
.account-avatar { display:grid; width:30px; height:30px; place-items:center; border:1px solid var(--border-accent); border-radius:50%; background:var(--bg-surface-elevated); color:var(--gold-primary); font-weight:700; }
.dropdown-menu { border:1px solid var(--border-subtle); background:var(--bg-surface-elevated); box-shadow:var(--shadow-soft); }
.dropdown-item { color:var(--text-main); }
.dropdown-item:hover,.dropdown-item:focus { color:var(--text-main); background:var(--gold-glow); }
.page-host { width:min(100%,1200px); flex:1; margin-inline:auto; padding:1.75rem 1.25rem 2.5rem!important; }
.page-host--fluid { width:100%; max-width:none; margin:0; }
.app-footer { margin-top:auto; border-top:1px solid var(--border-subtle); color:var(--text-muted); font-size:.76rem; }
.footer-content { display:flex; justify-content:space-between; gap:1rem; padding-block:1rem; }
.footer-content--legal nav { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.4rem 1rem; }
.footer-content--legal a { color:var(--text-muted); }
.footer-content--legal a:hover { color:var(--gold-primary); }

/* Controles */
.btn { min-height:38px; border-radius:var(--radius-sm); font-size:.84rem; font-weight:650; letter-spacing:.01em; transition:transform .16s ease,border-color .16s ease,background .16s ease; }
.btn:hover { transform:translateY(-1px); }
.btn-dark,.btn-gold { border:1px solid transparent; background:linear-gradient(135deg,#d8b266,#b88a4a); color:#13171d!important; box-shadow:0 8px 24px rgba(184,138,74,.16); }
.btn-outline-light,.btn-outline-dark,.btn-outline-gold { border-color:var(--border-accent); background:transparent; color:var(--gold-primary); }
.btn-outline-light:hover,.btn-outline-dark:hover,.btn-outline-gold:hover { border-color:var(--gold-primary); background:var(--gold-glow); color:var(--text-main); }
.btn-danger,.btn-outline-danger { border-color:rgba(224,108,117,.48); color:#ffc2c7; background:rgba(224,108,117,.08); }
.btn-danger:hover,.btn-outline-danger:hover { border-color:var(--accent-crimson); background:rgba(224,108,117,.18); color:#fff; }
.form-control,.form-select { min-height:42px; border:1px solid var(--border-subtle); border-radius:var(--radius-sm); background:#0f151e; color:var(--text-main); font-size:.9rem; box-shadow:none!important; }
.form-control:focus,.form-select:focus { border-color:var(--border-accent); background:#111923; color:var(--text-main); }
.form-control::placeholder { color:#667386; }
.form-control:disabled { border-color:transparent; background:#10151c; color:#778394; }
.form-label { margin-bottom:.42rem; color:var(--gold-primary); font-size:.74rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.form-check-input { border-color:var(--border-accent); background-color:#10151d; }
.form-check-input:checked { border-color:var(--gold-primary); background-color:#b88a4a; }
.form-stack { display:grid; gap:1rem; }
.form-grid,.game-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.grid-span-2 { grid-column:1/-1; }
textarea.form-control { resize:vertical; line-height:1.55; }
.alert { border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface-elevated); color:var(--text-main); }
.alert-info { border-color:rgba(94,200,155,.3); background:rgba(94,200,155,.08); }
.alert-warning { border-color:rgba(229,167,91,.36); background:rgba(229,167,91,.09); }
.alert-danger { border-color:rgba(224,108,117,.4); background:rgba(224,108,117,.09); }

/* SweetAlert2 · diálogos Rubicon */
.rubicon-swal-container.swal2-backdrop-show { background:rgba(3,6,10,.78); backdrop-filter:blur(5px); }
.rubicon-swal {
  width:min(92vw,31rem);
  padding:1.6rem 1.5rem 1.35rem;
  border:1px solid var(--border-accent);
  border-radius:var(--radius-lg);
  background:radial-gradient(circle at 50% 0%,rgba(229,193,123,.1),transparent 42%),var(--bg-surface-elevated);
  color:var(--text-main);
  box-shadow:0 28px 80px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.025) inset;
}
.rubicon-swal__title { padding:.25rem .5rem 0!important; color:var(--text-main); font-family:var(--font-story); font-size:1.65rem; font-weight:600; letter-spacing:-.015em; }
.rubicon-swal__copy { margin:.8rem auto 0!important; padding:0 .25rem!important; color:var(--text-muted)!important; font-size:.94rem!important; line-height:1.65!important; }
.rubicon-swal__actions { width:100%; gap:.65rem; margin:1.4rem 0 0!important; }
.rubicon-swal__button {
  min-width:8.5rem;
  min-height:42px;
  padding:.65rem 1rem;
  border:1px solid transparent;
  border-radius:var(--radius-sm);
  font:700 .85rem/1 var(--font-ui);
  transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease;
}
.rubicon-swal__button:hover { transform:translateY(-1px); }
.rubicon-swal__button:focus-visible { outline:2px solid var(--gold-primary); outline-offset:3px; }
.rubicon-swal__button--confirm { background:linear-gradient(135deg,#d8b266,#b88a4a); color:#11161c; box-shadow:0 8px 24px rgba(184,138,74,.18); }
.rubicon-swal__button--confirm:hover { box-shadow:0 10px 30px rgba(184,138,74,.28); }
.rubicon-swal__button--cancel { border-color:var(--border-subtle); background:#111821; color:var(--text-muted); }
.rubicon-swal__button--cancel:hover { border-color:var(--border-accent); color:var(--text-main); }
.rubicon-swal__icon { transform:scale(.82); margin:1rem auto .25rem!important; }
.rubicon-swal .swal2-warning { border-color:var(--accent-amber)!important; color:var(--accent-amber)!important; }
.rubicon-swal .swal2-question { border-color:var(--gold-primary)!important; color:var(--gold-primary)!important; }
.rubicon-swal-toast {
  border:1px solid var(--border-accent)!important;
  border-radius:var(--radius-md)!important;
  background:var(--bg-surface-elevated)!important;
  color:var(--text-main)!important;
  box-shadow:var(--shadow-soft)!important;
}
.rubicon-swal-toast__title { color:var(--text-main)!important; font:650 .86rem/1.35 var(--font-ui)!important; }
.rubicon-swal-toast__progress { background:var(--gold-primary)!important; }
.rubicon-swal-toast--working { border-color:rgba(216,178,102,.65)!important; }
.rubicon-swal-toast--working .swal2-icon { animation:rubicon-toast-pulse 1.15s ease-in-out infinite; }
.app-toast--working::before { content:""; width:.7rem; height:.7rem; margin-right:.65rem; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:rubicon-toast-spin .8s linear infinite; }
@keyframes rubicon-toast-pulse { 0%,100% { transform:scale(.82); opacity:.68; } 50% { transform:scale(.94); opacity:1; } }
@keyframes rubicon-toast-spin { to { transform:rotate(360deg); } }
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { padding-right:0!important; }

@media (max-width:560px) {
  .rubicon-swal { padding:1.2rem 1rem 1rem; }
  .rubicon-swal__title { font-size:1.4rem; }
  .rubicon-swal__actions { display:grid!important; grid-template-columns:1fr; }
  .rubicon-swal__button { width:100%; margin:0!important; }
}
.eyebrow { color:var(--gold-primary); font-size:.68rem; font-weight:750; letter-spacing:.16em; text-transform:uppercase; }
.chip,.status-pill,.turn-pill,.roll-result { display:inline-flex; align-items:center; gap:.38rem; min-height:26px; padding:.25rem .58rem; border:1px solid var(--border-subtle); border-radius:999px; background:var(--bg-surface-elevated); color:var(--text-muted); font-size:.7rem; font-weight:650; white-space:nowrap; }
.chip--accent,.turn-pill { border-color:var(--border-accent); color:var(--gold-primary); background:var(--gold-glow); }
.status-dot,.system-dot { width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:currentColor; box-shadow:0 0 8px currentColor; }
.status-pill--active,.status-pill--published,.status-pill--completed { color:var(--accent-emerald); }
.status-pill--waitingforplayers,.status-pill--draft,.status-pill--paused { color:var(--accent-amber); }
.status-pill--cancelled { color:var(--accent-crimson); }
.roll-result { cursor:help; border-color:currentColor; }
.roll-result--success { color:var(--accent-emerald); background:rgba(94,200,155,.08); }
.roll-result--failure { color:var(--accent-crimson); background:rgba(224,108,117,.08); }
.chips-wrap,.inline-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.55rem; }

/* Elementos generales */
.page-intro { display:flex; align-items:flex-end; justify-content:space-between; gap:2rem; margin-bottom:1.5rem; }
.page-intro h1 { margin:.25rem 0 .35rem; font-size:clamp(1.8rem,3vw,2.35rem); }
.page-intro p { max-width:720px; margin:0; color:var(--text-muted); }
.page-intro__meta { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:.6rem; }
.content-panel,.info-panel,.empty-panel { border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface); }
.content-panel { padding:1.25rem; box-shadow:0 12px 35px rgba(0,0,0,.12); }
.info-panel { padding:.9rem 1rem; background:var(--bg-surface-elevated); }
.info-panel p:last-child { margin-bottom:0; }
.empty-panel { width:100%; padding:2rem; text-align:center; color:var(--text-muted); }
.empty-panel h1,.empty-panel h2,.empty-panel h3 { color:var(--text-main); }
.empty-panel--illustrated { display:grid; min-height:260px; place-items:center; align-content:center; }
.empty-sigil { color:var(--gold-primary); font-size:2.3rem; }
.section-title,.dashboard-heading,.admin-panel-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.section-title h2,.section-title h3,.dashboard-heading h2,.admin-panel-heading h2 { margin:0; }
.section-title>span { color:var(--text-muted); font-size:.78rem; }
.section-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.25rem; }
.section-grid--wide { grid-template-columns:minmax(0,2fr) minmax(280px,.78fr); }
.content-panel--sticky,.create-panel { position:sticky; top:82px; align-self:start; }
.stack-list { display:grid; gap:1rem; }
.collection-tools { display:flex; align-items:center; gap:.8rem; margin:0 0 1rem; padding:.75rem; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface); }
.collection-tools label:not(.visually-hidden) { margin:0; color:var(--text-muted); font-size:.78rem; }
.collection-tools .form-control { flex:1; }
.collection-tools--compact { max-width:680px; }

/* Portada */
.body-landing .page-host,.story-hero~* { }
.story-hero { position:relative; overflow:hidden; margin:-1.75rem calc(50% - 50vw) 0; padding:4.6rem max(1.5rem,calc((100vw - 1200px)/2)) 4rem; text-align:center; isolation:isolate; background:radial-gradient(circle at 50% 20%,rgba(229,193,123,.12),transparent 48%),linear-gradient(#101620,var(--bg-base)); }
.story-hero::after { content:""; position:absolute; z-index:-1; inset:auto 15% -1px; height:1px; background:linear-gradient(90deg,transparent,var(--border-accent),transparent); }
.story-hero h1 { margin:.7rem auto 1.1rem; font-size:clamp(2.35rem,5vw,3.8rem); line-height:1.15; }
.story-hero>p:not(.hero-caption) { max-width:640px; margin:0 auto 1.75rem; color:#b7c0cd; font-size:1.05rem; line-height:1.65; }
.story-hero .inline-actions { justify-content:center; }
.hero-caption { font-size:.78rem; }
.story-hero--carousel { margin-top:-1.75rem; padding:0; text-align:left; background:#090d13; }
.story-hero--carousel::after { display:none; }
.story-hero--carousel .carousel,
.story-hero--carousel .carousel-inner { min-height:clamp(500px,64vh,680px); }
.hero-slide { position:relative; min-height:clamp(500px,64vh,680px); overflow:hidden; isolation:isolate; }
.hero-slide__image { position:absolute; z-index:-3; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; }
.hero-slide__veil { position:absolute; z-index:-2; inset:0; background:linear-gradient(90deg,rgba(7,11,17,.98) 0%,rgba(7,11,17,.86) 42%,rgba(7,11,17,.28) 76%,rgba(7,11,17,.5) 100%),linear-gradient(0deg,rgba(7,11,17,.94),transparent 52%); }
.hero-slide--fallback { background:radial-gradient(circle at 70% 28%,rgba(229,193,123,.16),transparent 34%),linear-gradient(130deg,#121a25,#090d13 65%); }
.hero-slide__content { display:flex; min-height:inherit; max-width:1200px; margin:auto; padding:5rem 5.5rem 5.5rem; flex-direction:column; align-items:flex-start; justify-content:center; }
.story-hero .hero-slide__content h1 { max-width:760px; margin:.75rem 0 1rem; font-size:clamp(2.7rem,6vw,5.2rem); line-height:.98; text-wrap:balance; }
.story-hero .hero-slide__content>p { max-width:610px; margin:0 0 1.6rem; color:#c6ced8; font-size:1.05rem; line-height:1.7; }
.story-hero .hero-slide__content .eyebrow { max-width:720px; overflow:hidden; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.story-hero .hero-slide__content .inline-actions { justify-content:flex-start; }
.hero-slide__content .hero-caption { margin-top:1rem; color:#9ba7b5; }
.story-hero--carousel .carousel-indicators { bottom:1.25rem; }
.story-hero--carousel .carousel-indicators [data-bs-target] { width:2.8rem; height:3px; margin-inline:.3rem; border:0; background-color:#d7b86f; }
.story-hero--carousel .carousel-control-prev,.story-hero--carousel .carousel-control-next { width:5rem; }
.landing-section { padding:3.5rem 0; }
.landing-section+.landing-section { border-top:1px solid var(--border-subtle); }
.landing-section.content-panel { padding-inline:1.5rem; background:transparent; border-right:0; border-left:0; border-radius:0; box-shadow:none; }
.landing-section .section-title { align-items:center; }
.landing-section .section-title h2 { margin:.25rem 0 0; font-size:2rem; }
.campaign-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:1.5rem; }
.campaign-card { position:relative; overflow:hidden; display:grid; grid-template-rows:auto 1fr; height:100%; padding:0; border:1px solid var(--border-subtle); border-radius:var(--radius-lg); background:var(--bg-surface); transition:transform .18s ease,border-color .18s ease; }
.campaign-card:hover { transform:translateY(-3px); border-color:var(--border-accent); }
.campaign-card h2,.campaign-card h3 { margin:.35rem 0 .6rem; font-size:1.35rem; }
.campaign-card p { color:var(--text-muted); font-size:.88rem; }
.campaign-emblem { position:absolute; top:1rem; right:1.15rem; color:rgba(229,193,123,.3); font-size:1.5rem; }
.campaign-card__top { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.campaign-card__media { position:relative; display:block; aspect-ratio:16/9; overflow:hidden; background:linear-gradient(135deg,#17222e,#0b1017); }
.campaign-card__media::after { content:""; position:absolute; inset:auto 0 0; height:42%; background:linear-gradient(transparent,rgba(8,12,18,.72)); }
.campaign-card__media img { width:100%; height:100%; object-fit:cover; transition:transform .35s ease,filter .35s ease; }
.campaign-card:hover .campaign-card__media img { transform:scale(1.035); filter:saturate(1.08); }
.campaign-card__fallback { display:grid; width:100%; height:100%; place-items:center; color:rgba(229,193,123,.55); font-size:3rem; }
.campaign-card__body { display:grid; grid-template-rows:minmax(2.8rem,auto) minmax(3rem,auto) minmax(4.35rem,auto) minmax(5.1rem,auto) auto; padding:1.3rem 1.4rem 1.4rem; }
.campaign-card__theme { overflow:hidden; display:-webkit-box; align-self:start; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-height:1.45; }
.campaign-card__body h3 { align-self:start; overflow:hidden; display:-webkit-box; margin:.35rem 0 .55rem; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.campaign-card .campaign-card__summary { overflow:hidden; display:-webkit-box; margin:0; align-self:start; line-height:1.65; -webkit-box-orient:vertical; -webkit-line-clamp:3; }
.campaign-card__meta { display:flex; align-content:flex-start; align-items:flex-start; flex-wrap:wrap; gap:.5rem; padding-top:.9rem; }
.campaign-card__tone { overflow:hidden; display:-webkit-box; max-width:100%; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.campaign-card__action { align-self:end; justify-self:start; margin-top:.7rem; }
.campaign-detail-cover { width:100%; margin:0 0 1.5rem; overflow:hidden; aspect-ratio:21/7; border:1px solid var(--border-subtle); border-radius:var(--radius-lg); background:var(--bg-surface); }
.campaign-detail-cover img { width:100%; height:100%; object-fit:cover; }
.landing-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.15rem; }
.landing-step { position:relative; min-height:190px; padding:1.35rem; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface); }
.landing-step__number { color:rgba(229,193,123,.35); font-family:var(--font-story); font-size:2.2rem; }
.landing-step h3 { margin:.25rem 0 .5rem; }
.landing-step p { margin:0; color:var(--text-muted); font-size:.88rem; }
.landing-section--cta { padding-block:3rem!important; }

.cookie-notice { position:fixed; z-index:2500; right:1.25rem; bottom:1.25rem; display:flex; width:min(430px,calc(100vw - 2.5rem)); gap:.9rem; padding:1rem; border:1px solid var(--border-accent); border-radius:var(--radius-md); background:rgba(15,21,29,.97); box-shadow:0 1.2rem 3.5rem rgba(0,0,0,.48); backdrop-filter:blur(14px); }
.cookie-notice[hidden] { display:none; }
.cookie-notice__mark { display:grid; width:2.15rem; height:2.15rem; flex:0 0 2.15rem; place-items:center; border:1px solid rgba(229,193,123,.38); border-radius:50%; color:var(--gold-primary); }
.cookie-notice__content strong { display:block; margin:.05rem 0 .3rem; font-family:var(--font-story); font-size:1.15rem; }
.cookie-notice__content p { margin:0; color:var(--text-muted); font-size:.82rem; line-height:1.55; }
.cookie-notice__actions { display:flex; align-items:center; justify-content:flex-end; gap:.9rem; margin-top:.8rem; }
.cookie-notice__actions a { color:var(--gold-soft); font-size:.78rem; }

@media (max-width:700px) {
  .story-hero--carousel .carousel,.story-hero--carousel .carousel-inner,.hero-slide { min-height:610px; }
  .hero-slide__veil { background:linear-gradient(0deg,rgba(7,11,17,.98) 4%,rgba(7,11,17,.76) 66%,rgba(7,11,17,.48)); }
  .hero-slide__content { padding:7rem 1.5rem 5.5rem; justify-content:flex-end; }
  .story-hero .hero-slide__content h1 { font-size:clamp(2.5rem,12vw,3.8rem); }
  .story-hero .hero-slide__content>p { font-size:.94rem; }
  .story-hero .hero-slide__content .inline-actions { width:100%; }
  .story-hero .hero-slide__content .btn { width:100%; }
  .story-hero--carousel .carousel-control-prev,.story-hero--carousel .carousel-control-next { display:none; }
  .campaign-card__body { grid-template-rows:auto auto auto auto auto; }
  .cookie-notice { right:.75rem; bottom:.75rem; width:calc(100vw - 1.5rem); }
}

/* Tablero, lobby y tarjetas */
.player-dashboard,.lobby-page,.admin-console,.admin-view { max-width:1200px; margin-inline:auto; }
.welcome-banner { display:flex; align-items:center; justify-content:space-between; gap:1.5rem; margin-bottom:1rem; padding:1.5rem; border:1px solid var(--border-accent); border-radius:var(--radius-lg); background:linear-gradient(120deg,rgba(229,193,123,.12),rgba(20,27,36,.86) 58%); }
.welcome-banner h1 { margin:.25rem 0 .35rem; font-size:1.8rem; }
.welcome-banner p { margin:0; color:var(--text-muted); }
.welcome-banner__actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.65rem; }
.dashboard-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:.75rem; margin-bottom:1.5rem; }
.dashboard-stats article { padding:.65rem .9rem; border:1px solid var(--border-subtle); border-radius:7px; background:var(--bg-surface-elevated); text-align:center; }
.dashboard-stats span { display:block; color:var(--text-muted); font-size:.68rem; letter-spacing:.08em; text-transform:uppercase; }
.dashboard-stats strong { color:var(--text-main); font-family:var(--font-story); font-size:1.35rem; }
.dashboard-columns { display:grid; grid-template-columns:minmax(0,2fr) minmax(260px,1fr); gap:1.5rem; }
.dashboard-games,.quick-feed-box,.lobby-results { display:grid; gap:1rem; }
.game-card { padding:1.25rem; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface); transition:border-color .18s ease,transform .18s ease; }
.game-card:hover { transform:translateY(-2px); border-color:var(--border-accent); }
.game-card__header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.game-card__header h3 { margin:.2rem 0 0; font-size:1.25rem; }
.game-card__summary { margin:.75rem 0 1rem; color:var(--text-muted); font-size:.85rem; }
.game-card__meta { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; margin:0 0 1rem; overflow:hidden; border:1px solid var(--border-subtle); border-radius:7px; background:var(--border-subtle); }
.game-card__meta div { padding:.65rem; background:var(--bg-surface-elevated); text-align:center; }
.game-card__meta dt { color:var(--text-muted); font-size:.64rem; font-weight:600; text-transform:uppercase; }
.game-card__meta dd { margin:.18rem 0 0; color:var(--text-main); font-size:.82rem; }
.game-card__footer { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:.55rem; }
.game-card__footer .btn { margin-left:auto; }
.dashboard-feed { min-width:0; }
.quick-feed-box { border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface); }
.feed-item { display:block; padding:1rem; color:var(--text-main); text-decoration:none; border-bottom:1px solid var(--border-subtle); }
.feed-item:last-child { border-bottom:0; }
.feed-item:hover { background:var(--gold-glow); }
.feed-item small { color:var(--gold-primary); }
.feed-item p { margin:.35rem 0 0; color:var(--text-muted); font-size:.82rem; }
.dashboard-lobby-link { display:flex; justify-content:space-between; padding:.9rem .25rem; text-decoration:none; font-size:.8rem; }
.lobby-header { display:flex; align-items:flex-end; justify-content:space-between; gap:1.5rem; margin-bottom:1.25rem; }
.lobby-header h1 { margin:.25rem 0 .35rem; font-size:1.8rem; }
.lobby-header p { margin:0; color:var(--text-muted); }
.lobby-filter-bar { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,260px) auto; align-items:center; gap:.75rem; margin-bottom:1rem; padding:.75rem; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface); }
.lobby-search { display:flex; align-items:center; gap:.5rem; }
.lobby-search .form-control { border:0; background:transparent; }
.lobby-result-count { color:var(--text-muted); font-size:.75rem; white-space:nowrap; }

/* Acceso, campaña y cuenta */
.auth-shell { display:grid; min-height:calc(100dvh - 170px); place-items:center; padding:2rem 0; }
.auth-card { width:min(100%,400px); padding:1.75rem; border:1px solid var(--border-accent); border-radius:var(--radius-lg); background:rgba(20,27,36,.9); box-shadow:0 28px 70px rgba(0,0,0,.34); backdrop-filter:blur(12px); }
.auth-card--wide { width:min(100%,680px); }
.auth-card h1 { margin:.35rem 0 1.35rem; font-size:1.75rem; }
.auth-note { margin:1.25rem 0 0; color:var(--text-muted); font-size:.82rem; text-align:center; }
.auth-divider { display:flex; align-items:center; gap:.7rem; margin:1rem 0; color:var(--text-muted); font-size:.7rem; text-transform:uppercase; letter-spacing:.08em; }
.auth-divider::before,.auth-divider::after { content:""; height:1px; flex:1; background:var(--border-subtle); }
.external-login-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; }
.external-login { min-height:42px; }
.external-login--google::before { content:"G"; margin-right:.45rem; color:#4285f4; font-weight:800; }
.external-login--discord::before { content:"◆"; margin-right:.45rem; color:#8799ff; }
.external-login-consent { margin:.65rem 0 0; color:var(--text-muted); font-size:.68rem; text-align:center; }
.external-login-consent a { color:var(--gold-primary); }
.game-config-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }

/* Administración */
.admin-subnav { display:flex; gap:.2rem; margin:0 0 1.35rem; padding:.28rem; overflow-x:auto; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface); scrollbar-width:none; }
.admin-subnav a { display:flex; align-items:center; gap:.42rem; padding:.62rem .8rem; border-radius:7px; color:var(--text-muted); text-decoration:none; font-size:.78rem; white-space:nowrap; }
.admin-subnav a:hover,.admin-subnav a.active { color:var(--text-main); background:var(--bg-surface-elevated); }
.admin-subnav a.active { box-shadow:inset 0 -1px var(--gold-primary); }
.admin-console__header { display:flex; align-items:flex-end; justify-content:space-between; gap:1.5rem; margin-bottom:1.25rem; }
.admin-console__header h1 { margin:.25rem 0; font-size:1.8rem; }
.admin-console__header p { margin:0; color:var(--text-muted); }
.admin-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; margin-bottom:1rem; }
.admin-metrics a { padding:.85rem 1rem; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface); color:var(--text-main); text-decoration:none; }
.admin-metrics span,.admin-metrics small { display:block; color:var(--text-muted); font-size:.68rem; }
.admin-metrics strong { display:block; margin:.15rem 0; font-family:var(--font-story); font-size:1.45rem; }
.model-selector-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:1rem; margin-bottom:1rem; padding:1rem; border:1px solid var(--border-accent); border-radius:var(--radius-md); background:linear-gradient(90deg,var(--gold-glow),var(--bg-surface)); }
.model-selector-card__icon { display:grid; width:42px; height:42px; place-items:center; border:1px solid var(--border-accent); border-radius:8px; color:var(--gold-primary); }
.model-selector-card h2 { margin:.1rem 0; font-size:1.15rem; }
.model-selector-card p { margin:0; color:var(--text-muted); font-size:.78rem; }
.model-selector-card__state { display:flex; align-items:center; gap:.7rem; }
.admin-console-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(240px,.7fr); gap:1rem; }
.admin-table-panel,.admin-system-panel { overflow:hidden; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface); }
.admin-panel-heading,.admin-system-panel { padding:1rem; }
.admin-table-wrap { overflow:auto; }
.admin-table { min-width:600px; margin:0; color:var(--text-main); border-color:var(--border-subtle); }
.admin-table.table > :not(caption) > * > * { background-color:transparent; color:var(--text-main); box-shadow:none; }
.admin-table thead th { padding:.7rem .85rem; border-color:var(--border-subtle); background:var(--bg-surface-elevated); color:var(--text-muted); font-size:.68rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; white-space:nowrap; }
.admin-table tbody td { padding:.75rem .85rem; border-color:var(--border-subtle); color:var(--text-main); font-size:.82rem; vertical-align:middle; }
.admin-table tbody tr:hover td { background:rgba(229,193,123,.035); }
.admin-table td strong,.admin-table td small { display:block; }
.admin-table td small { margin-top:.15rem; color:var(--text-muted); }
.admin-table-empty { padding:2rem!important; color:var(--text-muted)!important; text-align:center; }
.admin-row-action,.admin-row-actions a { text-decoration:none; white-space:nowrap; }
.admin-row-actions { display:flex; align-items:center; gap:.65rem; }
.admin-system-panel h2 { margin:.2rem 0 1rem; font-size:1.15rem; }
.system-row { display:flex; justify-content:space-between; gap:1rem; padding:.7rem 0; border-top:1px solid var(--border-subtle); font-size:.78rem; }
.system-row span { color:var(--text-muted); }
.system-row strong { display:flex; align-items:center; gap:.4rem; text-align:right; }
.system-dot--ok { color:var(--accent-emerald); background:currentColor; }
.system-dot--warn { color:var(--accent-amber); background:currentColor; }
.system-note { color:var(--text-muted); font-size:.74rem; }
.record-grid { display:grid; gap:.65rem; }
.record-table-head { display:grid; grid-template-columns:minmax(180px,1fr) minmax(220px,1.25fr) auto 24px; gap:1rem; padding:.15rem 1rem; color:var(--text-muted); font-size:.65rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; }
.record-card { overflow:hidden; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface-elevated); }
.record-card[open] { border-color:var(--border-accent); }
.record-card__header { display:grid; grid-template-columns:minmax(180px,1fr) minmax(220px,1.25fr) auto 24px; align-items:center; gap:1rem; padding:.85rem 1rem; cursor:pointer; list-style:none; }
.record-card__header::-webkit-details-marker { display:none; }
.record-card__header::after { content:"＋"; grid-column:4; color:var(--gold-primary); text-align:right; }
.record-card[open]>.record-card__header::after { content:"−"; }
.record-card__header>.chips-wrap { grid-column:3; grid-row:1; justify-content:flex-end; }
.ai-routing-panel { margin-bottom:1.25rem; }
.route-queue { padding:1rem; background:color-mix(in srgb,var(--bg-surface) 82%,var(--bg-deep)); }
.ai-effective-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; margin:1rem 0 1.25rem; }
.ai-effective-card { min-height:180px; }
.ai-effective-card h2 { margin:.45rem 0; font-size:1.25rem; }
.ai-effective-card p { color:var(--text-muted); }
.ai-effective-card--legacy { border-style:dashed; }
.ai-observability-panel { margin:1.25rem 0; }
.ai-performance-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:.85rem; }
.ai-performance-card { padding:1rem; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--bg-deep); }
.ai-performance-card h3 { margin:.3rem 0 .8rem; overflow-wrap:anywhere; font-size:1rem; }
.ai-performance-card dl { display:grid; grid-template-columns:repeat(2,1fr); gap:.55rem; margin:0; }
.ai-performance-card dl div { padding:.55rem; border-radius:var(--radius-sm); background:var(--bg-surface); }
.ai-performance-card dt { color:var(--text-muted); font-size:.68rem; text-transform:uppercase; }
.ai-performance-card dd { margin:.15rem 0 0; font-weight:700; }
.ai-performance-card__error { margin:.75rem 0 0; color:var(--danger); font-size:.78rem; }
.ai-log-heading { margin-top:1.6rem; }
.ai-log-list { display:grid; gap:.55rem; }
.ai-log-entry { overflow:hidden; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-deep); }
.ai-log-entry > summary { display:grid; grid-template-columns:75px minmax(180px,1fr) auto auto auto; align-items:center; gap:.75rem; padding:.75rem .9rem; cursor:pointer; color:var(--text-muted); font-size:.75rem; }
.ai-log-entry > summary strong { color:var(--text); overflow-wrap:anywhere; }
.ai-log-entry__result { font-size:.65rem; font-weight:800; letter-spacing:.06em; }
.ai-log-entry__result--ok { color:var(--success); }
.ai-log-entry__result--error { color:var(--danger); }
.ai-log-entry__body { padding:0 .9rem .9rem; border-top:1px solid var(--border); }
.ai-payload-grid { display:grid; grid-template-columns:1fr 1fr; gap:.75rem; }
.ai-payload-grid h3 { font-size:.8rem; }
.ai-payload-grid pre { max-height:420px; margin:0; padding:.8rem; overflow:auto; border:1px solid var(--border); border-radius:var(--radius-sm); background:#080c12; color:#d7dfec; font:11px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
.route-entry>.record-card__header { grid-template-columns:auto minmax(180px,1fr) auto; cursor:default; }
.route-entry>.record-card__header::after { display:none; }
.route-entry>.record-card__body { border-top:1px solid var(--border-subtle); }
.route-entry--disabled { opacity:.62; }
.route-add-form { margin-top:1rem; padding-top:1rem; border-top:1px solid var(--border-subtle); }
.record-table-value { min-width:0; overflow:hidden; color:var(--text-muted); font-size:.75rem; text-overflow:ellipsis; white-space:nowrap; }
.record-card__summary { margin:.2rem 0 0; color:var(--text-muted); font-size:.76rem; }
.record-card__body { padding:1rem; border-top:1px solid var(--border-subtle); background:var(--bg-surface); }
.record-card__toolbar,.record-card__footer { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.record-card__footer { margin-top:1rem; padding-top:1rem; border-top:1px solid var(--border-subtle); }
.record-card__danger { margin-top:1rem; padding-top:1rem; border-top:1px solid rgba(224,108,117,.2); text-align:right; }
.advanced-fields { grid-column:1/-1; padding:.8rem; border:1px solid var(--border-subtle); border-radius:var(--radius-sm); }
.advanced-fields summary { cursor:pointer; color:var(--gold-primary); font-weight:650; }
.advanced-fields[open] { display:grid; gap:1rem; }

/* Mesa: tres zonas, lectura con scroll y compositor anclado */
.body-game-window { height:100dvh; overflow:hidden; }
.body-game-window .app-shell { height:100dvh; min-height:0; }
.body-game-window .app-header,.body-game-window .app-footer { display:none; }
.body-game-window .page-host { width:100%; height:100%; min-height:0; padding:0!important; }
.game-workspace { display:grid; grid-template-columns:260px minmax(0,1fr) 300px; width:100%; height:100%; min-height:0; overflow:hidden; background:var(--bg-base); }
.game-rail,.game-chat { min-width:0; min-height:0; background:var(--bg-surface); }
.game-rail { display:flex; flex-direction:column; overflow:auto; padding:1.05rem; border-right:1px solid var(--border-subtle); }
.game-rail__header h1 { margin:.25rem 0 .15rem; font-size:1.28rem; }
.game-rail__header p { margin:0; color:var(--text-muted); font-size:.78rem; }
.character-mini-sheet { display:flex; align-items:center; gap:.7rem; margin:1rem 0; padding:.72rem; border:1px solid var(--border-subtle); border-radius:8px; background:var(--bg-surface-elevated); }
.character-mini-sheet__avatar { display:grid; width:40px; height:40px; flex:0 0 40px; place-items:center; border:1px solid var(--border-accent); border-radius:6px; color:var(--gold-primary); }
.character-mini-sheet strong,.character-mini-sheet small { display:block; }
.character-mini-sheet small { color:var(--text-muted); font-size:.68rem; }
.game-rail__status { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.8rem; }
.game-rail__nav { display:grid; gap:.18rem; }
.game-nav-link { display:flex; align-items:center; gap:.6rem; width:100%; padding:.65rem .7rem; border:0; border-radius:6px; background:transparent; color:var(--text-muted); font-size:.78rem; text-align:left; }
.game-nav-link:hover,.game-nav-link.is-active { background:var(--bg-surface-elevated); color:var(--text-main); }
.game-nav-link.is-active { box-shadow:inset 2px 0 var(--gold-primary); }
.game-nav-link span { color:var(--gold-primary); }
.game-rail__meta { display:grid; gap:.4rem; margin-top:1rem; }
.game-mini-card { display:flex; justify-content:space-between; gap:.7rem; padding:.55rem .65rem; border:1px solid var(--border-subtle); border-radius:6px; font-size:.7rem; }
.game-mini-card span { color:var(--text-muted); }
.game-mini-card strong { text-align:right; }
.game-rail__footer { display:grid; grid-template-columns:1fr 1fr; gap:.45rem; margin-top:auto; padding-top:1rem; }
.game-main { min-width:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; background:radial-gradient(circle at 50% 0%,rgba(229,193,123,.045),transparent 46%),var(--bg-base); }
.game-main>.alert { flex:0 0 auto; margin:.6rem 1rem 0; }
.game-section { min-width:0; min-height:0; flex:1; overflow:auto; padding:1.25rem; }
.game-section[data-game-section="overview"] { display:flex; flex-direction:column; overflow:hidden; padding:0; }
.game-section__header { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.85rem 1.25rem .65rem; border-bottom:1px solid var(--border-subtle); }
.game-section__header h2 { margin:.1rem 0; font-size:1.12rem; }
.game-section__header p { display:none; }
.game-host-tools { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; }
.turn-status-bar { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex:0 0 auto; padding:.65rem 1.25rem; border-bottom:1px solid var(--border-subtle); background:rgba(20,27,36,.58); color:var(--text-muted); font-size:.76rem; }
.turn-status-bar>div { display:flex; align-items:center; gap:.75rem; }
.turn-deadline { white-space:nowrap; }
.game-overview-stack { display:flex; min-height:0; flex:1; flex-direction:column; overflow:hidden; }
.game-panel { max-width:760px; width:100%; margin-inline:auto; }
.game-panel--story { min-height:0; max-width:none; flex:1; overflow-y:auto; padding:1.5rem max(1.25rem,calc((100% - 800px)/2)); border:0; border-radius:0; background:transparent; box-shadow:none; }
.game-panel--story>.section-title { max-width:720px; margin-inline:auto; }
.story-stream { display:block; max-width:720px; margin-inline:auto; padding:0; overflow:visible; flex:none; }
.story-card { padding:0; border:0; background:transparent; }
.story-card header { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.85rem; color:var(--gold-primary); font-size:.74rem; }
.story-card header span { color:var(--text-muted); }
.story-card>p { color:var(--text-story); font-family:var(--font-story); font-size:1.15rem; line-height:1.8; white-space:normal; }
.dialogue-inline { color:#f7e6c4; font-style:italic; box-decoration-break:clone; -webkit-box-decoration-break:clone; box-shadow:inset 3px 0 var(--gold-primary); padding-left:.55rem; }
.story-card--empty { padding:1.25rem; border:1px dashed var(--border-subtle); border-radius:var(--radius-md); color:var(--text-muted); }
.queue-panel { max-width:720px; margin:1.5rem auto 0; padding-top:1.1rem; border-top:1px solid var(--border-subtle); }
.queue-panel>.section-title { margin-bottom:.7rem; }
.queue-panel>.section-title h3 { font-size:1rem; }
.queue-list { display:grid; gap:.55rem; }
.queue-card { padding:.78rem .85rem; border:1px solid var(--border-subtle); border-radius:7px; background:var(--bg-surface); }
.queue-card header { display:flex; justify-content:space-between; gap:1rem; }
.queue-card header strong,.queue-card header span { display:block; }
.queue-card header span { color:var(--text-muted); font-size:.68rem; }
.queue-card p { margin:.55rem 0 0; font-size:.82rem; }
.game-panel--composer { position:relative; z-index:6; flex:0 0 auto; max-width:800px; margin:0 auto; padding:.8rem 1.25rem .9rem; border:1px solid var(--border-accent); border-bottom:0; border-radius:10px 10px 0 0; background:var(--bg-surface-glass); box-shadow:0 -16px 36px rgba(0,0,0,.24); backdrop-filter:blur(14px); }
.game-panel--composer .section-title { margin-bottom:.55rem; }
.game-panel--composer .section-title h3 { font-size:.96rem; }
.game-turn-textarea { min-height:70px; max-height:180px; resize:vertical; }
.composer-tools { display:flex; align-items:center; justify-content:space-between; gap:.75rem; }
.composer-tools__insert { display:flex; gap:.4rem; }
.composer-token { padding:.3rem .55rem; border:1px solid var(--border-subtle); border-radius:5px; background:var(--bg-surface-elevated); color:var(--text-muted); font-size:.7rem; }
.composer-token:hover { border-color:var(--border-accent); color:var(--gold-primary); }
.composer-count { color:var(--text-muted); font-size:.7rem; }
.game-panel--composer .form-stack { gap:.55rem; }
.game-panel--composer small.muted-copy { font-size:.67rem; }
.turn-composer-editor { display:grid; gap:.55rem; }
.turn-composer-form.is-submitted .turn-composer-editor,
.turn-composer-form.is-submitted [data-composer-submit] { display:none; }
.game-saved-action:empty { display:none; }
.game-saved-action .info-panel { padding:.72rem .85rem; border-color:rgba(94,200,155,.3); background:rgba(94,200,155,.07); }
.game-saved-action .info-panel strong { color:var(--accent-emerald); font-size:.74rem; }
.game-saved-action .info-panel p { margin:.25rem 0 0; color:var(--text-main); font-size:.82rem; line-height:1.45; white-space:pre-wrap; }
.game-chat { display:flex; min-height:0; flex-direction:column; border-left:1px solid var(--border-subtle); }
.game-chat__panel { display:flex; min-height:0; height:100%; flex-direction:column; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.party-sidebar { flex:0 0 auto; max-height:42%; overflow:auto; border-bottom:1px solid var(--border-subtle); }
.game-chat__header { display:flex; align-items:center; justify-content:space-between; gap:.7rem; padding:.85rem 1rem .55rem; }
.game-chat__header h2 { margin:.15rem 0 0; font-size:1rem; }
.party-sidebar__list { display:grid; gap:.2rem; padding:0 .7rem .75rem; }
.party-sidebar__member { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:.55rem; padding:.48rem; border-radius:6px; background:var(--bg-surface-elevated); }
.party-avatar { display:grid; width:34px; height:34px; place-items:center; border:1px solid var(--border-accent); border-radius:6px; color:var(--gold-primary); font-size:.75rem; }
.party-sidebar__member strong,.party-sidebar__member small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.party-sidebar__member strong { font-size:.76rem; }
.party-sidebar__member small { color:var(--text-muted); font-size:.64rem; }
.member-state { color:var(--accent-amber); font-size:.62rem; }
.member-state--ready { color:var(--accent-emerald); }
.game-chat__messages { display:grid; min-height:0; flex:1; align-content:start; gap:.55rem; overflow-y:auto; padding:.35rem .85rem .85rem; }
.tag-post { padding:.68rem .72rem; border-radius:6px; background:var(--bg-surface-elevated); }
.tag-post header { display:flex; justify-content:space-between; gap:.5rem; color:var(--gold-primary); font-size:.7rem; }
.tag-post header span { color:var(--text-muted); font-size:.62rem; }
.tag-post p { margin:.35rem 0 0; font-size:.76rem; line-height:1.5; }
.game-chat__form { display:grid; flex:0 0 auto; gap:.5rem; padding:.75rem; border-top:1px solid var(--border-subtle); }
.game-chat__form textarea { min-height:62px; max-height:120px; }
.game-party-grid,.history-stack { display:grid; max-width:900px; margin-inline:auto; gap:1rem; }
.participant-sheet__header,.history-card__header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.participant-sheet__header p,.history-card__header p { margin:.18rem 0 0; color:var(--text-muted); font-size:.75rem; }
.participant-sheet__details { display:grid; grid-template-columns:1fr 1fr; gap:.7rem; margin-block:.8rem; }
.history-card { padding:1.1rem; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface); }
.history-card>p { color:var(--text-story); font-family:var(--font-story); line-height:1.75; }
.history-actions { padding-top:.75rem; border-top:1px solid var(--border-subtle); }
.history-actions summary { cursor:pointer; color:var(--gold-primary); font-size:.78rem; }
.history-actions__list { display:grid; gap:.55rem; margin-top:.7rem; }
.game-mobile-nav { display:none; }

.dialogue-paragraph {
    display: block;
    margin-block: .65em;
}

/* En escritorio cada columna ocupa exactamente la ventana. La regla antigua
   align-items:start hacía crecer la cuadrícula con la narración y dejaba el
   compositor y el final del menú fuera del área visible. */
@media (min-width:901px) {
  .game-workspace {
    grid-template-rows:minmax(0,1fr);
    align-items:stretch;
  }
  .game-workspace>.game-rail,
  .game-workspace>.game-main,
  .game-workspace>.game-chat {
    height:100%;
    max-height:100%;
    min-height:0;
  }
  .game-rail,
  .game-panel--story,
  .game-chat__messages,
  .party-sidebar {
    scrollbar-width:auto;
    scrollbar-color:rgba(229,193,123,.78) rgba(15,21,30,.72);
    scrollbar-gutter:stable;
  }
  .game-rail {
    overflow-x:hidden;
    overflow-y:scroll;
    overscroll-behavior:contain;
  }
  .game-main { overflow:hidden; }
  .game-section[data-game-section="overview"] { height:100%; }
  .game-overview-stack { height:100%; }
  .game-panel--story {
    overflow-x:hidden;
    overflow-y:scroll;
    overscroll-behavior:contain;
  }
  .game-chat { overflow:hidden; }
  .game-rail::-webkit-scrollbar,
  .game-panel--story::-webkit-scrollbar,
  .game-chat__messages::-webkit-scrollbar,
  .party-sidebar::-webkit-scrollbar { width:11px; }
  .game-rail::-webkit-scrollbar-track,
  .game-panel--story::-webkit-scrollbar-track,
  .game-chat__messages::-webkit-scrollbar-track,
  .party-sidebar::-webkit-scrollbar-track { background:rgba(15,21,30,.72); }
  .game-rail::-webkit-scrollbar-thumb,
  .game-panel--story::-webkit-scrollbar-thumb,
  .game-chat__messages::-webkit-scrollbar-thumb,
  .party-sidebar::-webkit-scrollbar-thumb {
    border:3px solid rgba(15,21,30,.72);
    border-radius:999px;
    background:rgba(229,193,123,.78);
  }
}

/* Legal, contacto y configuración pública */
.legal-document,.contact-layout { width:min(860px,100%); margin:1.5rem auto 3rem; }
.legal-document>h1,.contact-layout>header h1 { margin:.35rem 0 .4rem; font-size:clamp(2rem,5vw,3.1rem); }
.legal-updated,.contact-layout>header p { color:var(--text-muted); }
.legal-document section { margin-top:1.25rem; padding:1.2rem 1.3rem; border:1px solid var(--border-subtle); border-radius:var(--radius-md); background:var(--bg-surface); }
.legal-document section h2 { margin:0 0 .65rem; font-size:1.2rem; }
.legal-document section p:last-child,.legal-document section ul:last-child { margin-bottom:0; }
.legal-document li+li { margin-top:.35rem; }
.legal-facts { display:grid; grid-template-columns:150px minmax(0,1fr); gap:.55rem 1rem; margin:0; overflow-wrap:anywhere; }
.legal-facts dt { color:var(--gold-primary); }
.legal-facts dd { margin:0; color:var(--text-muted); }
.legal-document a,.contact-layout a { color:var(--gold-primary); }
.legal-table { width:100%; overflow-wrap:anywhere; }
.legal-table th,.legal-table td { padding:.6rem; border-bottom:1px solid var(--border-subtle); text-align:left; }
.contact-layout>header { margin-bottom:1.25rem; }
.contact-layout .content-panel { padding:1.35rem; }
.contact-layout textarea { min-height:160px; }
.contact-layout .form-check { display:flex; align-items:flex-start; gap:.6rem; }
.contact-layout .form-check-input { flex:0 0 auto; margin-top:.25rem; }
.contact-honeypot { position:absolute!important; left:-10000px!important; width:1px!important; height:1px!important; overflow:hidden!important; }
.contact-inbox { display:grid; gap:.65rem; }
.contact-message { border:1px solid var(--border-subtle); border-radius:7px; background:var(--bg-surface-elevated); }
.contact-message.is-new { border-color:var(--border-accent); }
.contact-message summary { display:flex; justify-content:space-between; gap:1rem; padding:.85rem 1rem; cursor:pointer; }
.contact-message summary span,.contact-message summary strong { display:block; }
.contact-message summary small { color:var(--text-muted); }
.contact-message__body { padding:0 1rem 1rem; }
.contact-message__body p { white-space:pre-wrap; }
.integration-status { display:grid; gap:.5rem; margin:1rem 0; }
.integration-status>span { display:flex; justify-content:space-between; gap:1rem; padding:.6rem .7rem; border:1px solid var(--border-subtle); border-radius:6px; color:var(--text-muted); }
.integration-status strong { color:var(--accent-amber); }
.integration-status strong.is-ready { color:var(--accent-emerald); }

@media (max-width:1199px) {
  .section-grid--wide,.admin-console-grid { grid-template-columns:1fr; }
  .create-panel,.content-panel--sticky { position:static; }
  .admin-system-panel { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 1rem; }
  .admin-system-panel>.eyebrow,.admin-system-panel>h2,.admin-system-panel>.system-note,.admin-system-panel>.btn { grid-column:1/-1; }
  .game-workspace { grid-template-columns:220px minmax(0,1fr) 270px; }
}

@media (max-width:991px) {
  .navbar-collapse { padding:1rem 0; }
  .nav-account { align-items:flex-start; flex-direction:column; }
  .admin-metrics { grid-template-columns:repeat(2,1fr); }
  .landing-steps { grid-template-columns:1fr; }
}

@media (max-width:900px) {
  .ai-effective-grid,.ai-payload-grid { grid-template-columns:1fr; }
  .ai-log-entry > summary { grid-template-columns:70px minmax(0,1fr); }
  .ai-log-entry > summary span:nth-last-child(-n+3) { grid-column:2; }
  .page-host { padding:1.25rem 1rem 2rem!important; }
  .dashboard-columns,.section-grid { grid-template-columns:1fr; }
  .welcome-banner,.lobby-header,.page-intro,.admin-console__header { align-items:flex-start; flex-direction:column; }
  .welcome-banner__actions { justify-content:flex-start; }
  .lobby-filter-bar { grid-template-columns:1fr 1fr; }
  .lobby-result-count { grid-column:1/-1; }
  .game-workspace { display:block; position:relative; padding:0; overflow:hidden; }
  .game-rail,.game-chat { display:none; }
  .game-workspace[data-active-section="party"] .game-main { display:none; }
  .game-workspace[data-active-section="party"] aside.game-chat { position:absolute; inset:0 0 calc(54px + env(safe-area-inset-bottom)); display:flex!important; width:100%; border-left:0; }
  .game-workspace[data-active-section="party"] .party-sidebar { max-height:36%; }
  .game-main { position:absolute; inset:0 0 calc(54px + env(safe-area-inset-bottom)); width:auto; height:auto; }
  .game-main>.alert { margin:.45rem .65rem 0; padding:.55rem .7rem; max-height:4.25rem; overflow:auto; font-size:.72rem; line-height:1.35; }
  .game-section { padding:1rem; }
  .game-section[data-game-section="overview"] { display:block; overflow-x:hidden; overflow-y:auto; padding:0 0 .8rem; overscroll-behavior:contain; scrollbar-gutter:stable; }
  .game-section__header { padding:.7rem 1rem .55rem; }
  .game-section__header p { display:none; }
  .turn-status-bar { padding:.55rem 1rem; }
  .game-overview-stack { display:block; min-height:auto; overflow:visible; }
  .game-panel--story { min-height:auto; overflow:visible; padding:1.1rem 1rem; }
  .game-panel--composer { position:static; max-width:none; margin-top:.2rem; border-right:0; border-left:0; border-bottom:1px solid var(--border-accent); border-radius:0; padding:.8rem 1rem 1rem; box-shadow:none; backdrop-filter:none; }
  .game-mobile-nav { position:absolute; right:0; bottom:0; left:0; z-index:30; display:grid; grid-template-columns:repeat(5,1fr); height:calc(54px + env(safe-area-inset-bottom)); padding-bottom:env(safe-area-inset-bottom); border-top:1px solid var(--border-subtle); background:var(--bg-surface-glass); backdrop-filter:blur(12px); }
  .game-mobile-nav button { display:grid; min-width:0; place-items:center; align-content:center; gap:.1rem; border:0; border-top:2px solid transparent; background:transparent; color:var(--text-muted); }
  .game-mobile-nav button.is-active { border-color:var(--gold-primary); color:var(--gold-primary); }
  .game-mobile-nav small { font-size:.58rem; }
  .body-game-window .page-host { padding:0!important; }
}

@media (max-width:650px) {
  .story-hero:not(.story-hero--carousel) { margin-inline:0; padding:3.25rem 1.1rem 3rem; }
  .story-hero:not(.story-hero--carousel) h1 { font-size:2.25rem; }
  .campaign-detail-cover { aspect-ratio:16/9; }
  .landing-section { padding-block:2.5rem; }
  .landing-section .section-title,.section-title,.dashboard-heading { align-items:flex-start; flex-direction:column; }
  .dashboard-stats { grid-template-columns:repeat(3,1fr); }
  .game-card__meta { grid-template-columns:repeat(2,1fr); }
  .game-card__header { align-items:flex-start; flex-direction:column; }
  .game-card__footer { justify-content:flex-start; }
  .game-card__footer .btn { width:100%; margin-left:0; }
  .lobby-filter-bar { grid-template-columns:1fr; }
  .lobby-result-count { grid-column:auto; }
  .form-grid,.game-form-grid,.game-config-grid,.participant-sheet__details { grid-template-columns:1fr; }
  .grid-span-2 { grid-column:auto; }
  .model-selector-card { grid-template-columns:auto 1fr; }
  .model-selector-card__state { grid-column:1/-1; justify-content:space-between; }
  .admin-metrics { grid-template-columns:1fr 1fr; }
  .admin-system-panel { grid-template-columns:1fr; }
  .record-card__header { grid-template-columns:1fr auto; }
  .record-table-head { display:none; }
  .record-table-value { grid-column:1/-1; grid-row:auto; }
  .record-card__header>.chips-wrap { grid-column:1; grid-row:auto; justify-content:flex-start; }
  .record-card__header::after { grid-column:2; grid-row:1; }
  .record-card__toolbar,.record-card__footer { align-items:flex-start; flex-direction:column; }
  .game-section__header { align-items:center; gap:.55rem; padding:.55rem .75rem .5rem; }
  .game-section__header .eyebrow { font-size:.52rem; letter-spacing:.12em; }
  .game-section__header h2 { margin:.05rem 0; font-size:.98rem; }
  .game-host-tools { flex:0 0 auto; justify-content:flex-end; }
  .game-host-tools .btn { padding:.42rem .58rem; font-size:.64rem; white-space:nowrap; }
  .turn-status-bar { align-items:center; gap:.55rem; padding:.48rem .75rem; }
  .turn-status-bar>div { align-items:center; flex-direction:row; gap:.48rem; }
  .turn-pill { padding:.25rem .48rem; font-size:.62rem; }
  .turn-deadline { font-size:.65rem; }
  .game-panel--story { padding:.9rem .8rem 1rem; }
  .game-panel--story>.section-title { margin-bottom:.8rem; }
  .game-panel--story>.section-title h3 { font-size:1.25rem; }
  .story-card header { align-items:flex-start; flex-direction:column; gap:.25rem; }
  .story-card>p { font-size:1rem; line-height:1.68; }
  .queue-panel { margin-top:1.15rem; }
  .game-panel--composer { padding:.75rem .8rem calc(1rem + env(safe-area-inset-bottom)); }
  .game-panel--composer .section-title { align-items:center; flex-direction:row; justify-content:space-between; gap:.6rem; }
  .game-panel--composer .section-title h3 { font-size:1rem; }
  .game-panel--composer .section-title span { font-size:.63rem; text-align:right; }
  .game-turn-textarea { min-height:96px; max-height:150px; }
  .game-panel--composer small.muted-copy { display:none; }
  .composer-tools { align-items:flex-start; }
  .turn-composer-form.is-submitted { gap:0; }
  .game-saved-action .info-panel { padding:.68rem .75rem; }
  .game-saved-action .info-panel p { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:3; }
  .game-mobile-nav small { font-size:.52rem; }
  .footer-content { align-items:flex-start; flex-direction:column; gap:.4rem; }
  .footer-content--legal nav { justify-content:flex-start; }
  .legal-document,.contact-layout { margin-top:.5rem; }
  .legal-document section { padding:1rem; }
  .legal-facts { grid-template-columns:1fr; gap:.2rem; }
  .legal-facts dd+dt { margin-top:.5rem; }
}

@media (max-height:680px) and (max-width:900px) {
  .game-section__header { display:none; }
  .game-turn-textarea { min-height:58px; max-height:100px; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; }
}

/* Roll details use a viewport overlay so scrolling cards cannot clip them. */
.roll-result[data-roll-detail] { cursor: help; border-bottom: 1px dotted currentColor; }
.roll-result[data-roll-detail]:focus-visible { outline: 2px solid #d8b76c; outline-offset: 3px; }
.roll-detail-popover { position: fixed; z-index: 10000; max-width: min(360px, calc(100vw - 24px)); padding: .7rem .9rem; background: #18222e; color: #fff; border: 1px solid #d8b76c; border-radius: .6rem; box-shadow: 0 6px 24px #0008; pointer-events: none; font: 14px/1.5 system-ui; }
.admin-quick-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.admin-quick-actions form { margin: 0; }

/* Writing fields grow with their content, then scroll within a bounded area. */
textarea.form-control {
  overflow-y:auto;
  scrollbar-width:auto;
  scrollbar-color:var(--gold-primary) #0f151e;
  scrollbar-gutter:stable;
}
textarea.form-control.textarea-adaptive {
  box-sizing:border-box;
  min-height:4.2rem;
  max-height:min(20rem,45dvh);
  resize:vertical;
  transition:border-color .15s ease,background-color .15s ease;
}
textarea.form-control.game-turn-textarea.textarea-adaptive { max-height:min(12rem,30dvh); }
.game-chat__form textarea.textarea-adaptive { max-height:min(9rem,25dvh); }
textarea.form-control::-webkit-scrollbar { width:12px; }
textarea.form-control::-webkit-scrollbar-track { background:#0f151e; }
textarea.form-control::-webkit-scrollbar-thumb { background:var(--gold-primary); border:3px solid #0f151e; border-radius:8px; }

@media (max-width:900px) {
  .form-control,.form-select { font-size:1rem; }
  .form-label,.field-hint { font-size:.875rem; }
  .game-mobile-nav small { font-size:.75rem; }
  .game-main>.alert { font-size:.875rem; max-height:6rem; }
  .game-section__header { flex-wrap:wrap; }
  .game-section__header .eyebrow { font-size:.75rem; }
  .game-section__header h2 { font-size:1.15rem; }
  .game-host-tools .btn { font-size:.875rem; min-height:44px; white-space:normal; }
  .turn-status-bar,.turn-status-bar>div { flex-wrap:wrap; }
  .turn-pill,.turn-deadline,.game-panel--composer .section-title span { font-size:.8125rem; }
  .game-panel--composer .section-title { flex-wrap:wrap; }
  .game-panel--composer .section-title h3 { font-size:1.125rem; }
  .story-card>p { font-size:1.125rem; line-height:1.7; overflow-wrap:anywhere; }
  textarea.form-control.textarea-adaptive { min-height:4.2rem; max-height:min(16rem,35dvh); }
  textarea.form-control.game-turn-textarea.textarea-adaptive,.game-chat__form textarea.textarea-adaptive { max-height:min(10rem,30dvh); }
}

/* Character and play workspace refinement, November 2026. */
.game-section[data-game-section="character"] .game-panel {max-width:none;}
.game-panel--story {padding:1.2rem clamp(1rem,2.5vw,2.5rem);}
.game-panel--story>.section-title,.story-stream,.queue-panel {max-width:none;width:100%;}
.game-panel--composer {width:calc(100% - 2rem);max-width:none;}
.history-stack,.game-party-grid {max-width:none;}
.story-card {max-width:none;}
.dialogue-paragraph {display:block!important;margin:1.2rem 0!important;padding:.8rem 1rem;border-left:3px solid var(--gold-primary);background:rgba(216,178,102,.055);white-space:normal;}
.dialogue-speaker {display:block;font:600 .8rem/1.5 var(--font-ui);color:var(--gold-primary);margin-bottom:.35rem;}
.dialogue-paragraph>span {display:block;}
.composer-help {position:relative;font-size:.76rem;line-height:1.5;}
.composer-help summary {display:inline-block;cursor:pointer;color:var(--gold-primary);padding:.3rem 0;}
.composer-help>div {padding:.6rem;border:1px solid var(--border-subtle);border-radius:6px;max-height:8rem;overflow:auto;}
.core-sheet-heading h3 {font-size:1.8rem;margin:.2rem 0;}
.core-sheet-heading p {color:var(--text-muted);margin:.2rem 0 1rem;}
.core-stat-strip {display:grid;grid-template-columns:repeat(3,1fr);gap:.7rem;}
.core-stat-strip>div {display:flex;align-items:center;justify-content:space-between;background:#1d2935;border:1px solid var(--border-accent);border-radius:9px;padding:.6rem 1rem;}
.core-stat-strip strong {font-size:1.8rem;color:var(--gold-primary);}
.core-derived {padding:.8rem;border-radius:7px;background:#101720;text-align:center;}
.core-origin-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1rem 0;}
.core-origin-card {overflow:hidden;border:1px solid var(--border-subtle);border-radius:10px;background:#101820;}
.core-origin-card>div {padding:1rem;}
.core-origin-card h4 {margin:.15rem 0 .5rem;}
.core-origin-card p,.core-origin-card details {font-size:.86rem;line-height:1.55;}
.core-origin-card summary,.core-skills>summary,.core-biography>summary {cursor:pointer;color:var(--gold-primary);padding:.3rem 0;}
.core-origin-card small {color:var(--text-muted);}
.core-illustration {display:block;width:100%;height:auto;aspect-ratio:2/1;object-fit:cover;background:#15222d;}
.core-wizard>.swal2-html-container {width:100%;box-sizing:border-box;}
.core-wizard .core-illustration {max-height:210px;object-fit:contain;border-radius:8px;}
.core-wizard .core-selector small {display:block;}
.core-grants [aria-pressed="true"] {background:#50422d;color:#ffe3a3;}
.core-skill-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;padding:.7rem 0;}
.core-skill-grid article {padding:.7rem;border:1px solid var(--border-subtle);border-radius:8px;}
.core-skill-grid strong {display:flex;justify-content:space-between;gap:.5rem;}
.core-skill-grid b {color:var(--gold-primary);}
.core-skill-grid small {display:block;color:var(--text-muted);font-size:.73rem;margin-top:.3rem;}
.core-biography {margin:1rem 0;}
.core-pools {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem;}
.core-pools article,.core-point-bank {border:1px solid var(--border-accent);padding:1rem;border-radius:10px;background:#111b25;text-align:center;}
.core-point-bank {margin-bottom:1rem;}
.core-pools h3 {font-size:1rem;}
.core-gems {display:flex;flex-wrap:wrap;justify-content:center;gap:.35rem;min-height:2.5rem;align-items:center;padding:.5rem;}
.core-gems i {font-style:normal;color:#e2b960;font-size:1.25rem;text-shadow:0 0 12px #d7a84466;}
.core-gems .empty {opacity:.3;}
.core-point-controls {display:flex;justify-content:center;align-items:center;gap:1rem;}
.core-point-controls button {width:40px;height:40px;border-radius:8px;background:#2c3948;color:#f5d08a;border:1px solid #766342;font-size:1.4rem;}
.core-point-controls button:disabled {opacity:.3;cursor:not-allowed;}
@media(min-width:901px){
 .game-rail {gap:.55rem;padding:.85rem;}
 .game-rail__header {padding:.75rem;margin:0;}
 .game-rail__header h1 {font-size:1.08rem;line-height:1.3;}
 .game-rail__header p {font-size:.7rem;line-height:1.4;}
 .character-mini-sheet {margin:0;padding:.6rem;}
 .game-rail__status {margin:0;gap:.3rem;}
 .game-rail__nav {padding:.4rem;margin:0;gap:.1rem;}
 .game-nav-link {padding:.55rem .6rem;}
 .game-rail__meta {margin:0;padding:.45rem;gap:0;}
 .game-rail__meta .game-mini-card {border:0;border-bottom:1px solid var(--border-subtle);border-radius:0;padding:.4rem .2rem;}
 .game-rail__meta .game-mini-card:last-child {display:none;}
 .game-rail__footer {padding-top:.4rem;}
}
@media(max-width:900px){.game-panel--composer {width:100%;}.core-origin-grid,.core-skill-grid {grid-template-columns:1fr 1fr;}.core-pools {gap:.35rem;}.core-pools article {padding:.5rem .2rem;}.core-point-controls {gap:.35rem;}}
@media(max-width:540px){.core-origin-grid,.core-skill-grid {grid-template-columns:1fr;}.core-origin-card {display:grid;grid-template-columns:100px minmax(0,1fr);}.core-origin-card .core-illustration {height:100%;aspect-ratio:auto;object-fit:cover;}.core-origin-card>div {padding:.7rem;}.core-pools h3 {font-size:.8rem;}.core-point-controls button {width:32px;height:36px;}.core-stat-strip>div {padding:.4rem .6rem;}}

[data-game-workspace][data-show-rolls="false"] .roll-result {display:none!important;}

/* Informative campaign content classification. */
.campaign-content-rating { color: #ffd1d9; background: #44202c; border: 1px solid #b7667c; font-weight: 700; width: fit-content; white-space: nowrap; }
.campaign-content-warning { padding: .75rem 1rem; border-left: 3px solid #b7667c; background: #291c24; color: #ffd1d9; border-radius: .3rem; }

.collection-tools:has([data-nsfw-filter]) { flex-wrap: wrap; }
.campaign-rating-filter { display: flex; align-items: center; gap: .6rem; white-space: nowrap; padding-left: 0; }
.campaign-rating-filter .form-check-input { float: none; margin: 0; flex-shrink: 0; cursor: pointer; }
.campaign-card[hidden] { display: none !important; }

.game-card[hidden] { display: none !important; }
.lobby-filter-bar:has([data-nsfw-filter]) { flex-wrap: wrap; }

/* World references are usable by mouse, keyboard and touch. */
.world-reference { display:inline; padding:0 .12em; border:0; border-bottom:1px dotted currentColor; background:transparent; color:#e6c37a; font:inherit; font-weight:700; cursor:pointer; }
.world-reference--person { color:#9bc8f4; }
.world-reference--place { color:#91d3b7; }
.world-reference:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
.world-mention-suggestions { max-height:13rem; overflow-y:auto; background:#17202b; border:1px solid #c5a664; border-radius:.5rem; padding:.3rem; }
.world-mention-suggestions[hidden] { display:none; }
.world-mention-suggestions button { display:block; width:100%; text-align:left; padding:.6rem; background:transparent; color:#edf0f5; border:0; }
.world-mention-suggestions button[aria-selected="true"],.world-mention-suggestions button:hover { background:#344352; }
.world-library { margin-top:1.2rem; }
.world-library details { margin:.6rem 0; padding:.6rem; border:1px solid #35404c; border-radius:.4rem; }
.world-library-row { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.5rem; padding:.5rem 0; }
.world-library-row span { font-size:.85rem; color:#b0bac8; }

/* Shared quest journal */
.quest-journal { width:100%; max-width:1100px; margin-inline:auto; }
[data-quest-journal] { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:1rem; }
.quest-card { min-width:0; padding:1.2rem; border:1px solid var(--border-color, #38404a); border-radius:12px; background:#141c25; overflow-wrap:anywhere; }
.quest-card h3 { font-size:1.3rem; }
.quest-card p { white-space:pre-wrap; }
.quest-objectives { padding-left:1.1rem; }
.quest-objectives small { display:block; color:#adb9c8; margin:.25rem 0 .75rem; }
@media(max-width:991px) { .game-mobile-nav { grid-template-columns:repeat(6,minmax(0,1fr)); } .game-mobile-nav button { min-width:0; padding-inline:2px; } .game-mobile-nav small { font-size:.65rem; } }
