@font-face {
  font-family: RebrandAnton;
  src: url(/rebrand/Anton-Regular.ttf);
  font-display: swap;
}
@font-face {
  font-family: RebrandBarlow;
  src: url(/rebrand/Barlow-Regular.ttf);
  font-display: swap;
}
@font-face {
  font-family: RebrandBarlow;
  src: url(/rebrand/Barlow-Bold.ttf);
  font-weight: 700;
  font-display: swap;
}
:root {
  --rb-navy: #102c55;
  --rb-deep: #091d3b;
  --rb-blue: #147cff;
  --rb-blue-deep: #064da9;
  --rb-snow: #f1f7ff;
  --rb-ice: #e9f3ff;
  --rb-gold: #ffd447;
  --rb-focus: #ed7ffa;
  --rb-display: RebrandAnton, Impact, sans-serif;
  --rb-reading: RebrandBarlow, system-ui, sans-serif;
}
[data-rebrand] :focus-visible { outline: 3px solid var(--rb-focus); outline-offset: 3px; }

/* Portada. Conserva el contenido, los cinco juegos y su selector. */
[data-rebrand="portada"] .cp-home { font-family: var(--rb-reading); color: var(--rb-snow); background: var(--rb-deep); }
.cp-home :is(h1,h2,h3,h4) { font-family: var(--rb-display); font-weight: 400; letter-spacing: .005em; }
.cp-home .cp-header { background: #091d3bf5; border-bottom: 1px solid #73b9ff38; }
.cp-home .cp-header nav a { color: var(--rb-snow); }
.cp-home .cp-logo img { height: 34px; width: auto; }
.cp-home .cp-hero {
  background: radial-gradient(ellipse at 74% 51%,#227de0 0%,#104c99 35%,transparent 71%),var(--rb-deep);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.cp-home .hero-inner { min-height: 0; padding-block: clamp(36px,6vw,86px) clamp(24px,4vw,60px); gap: clamp(14px,3vw,44px); }
.cp-home .hero-lockup h1 { font-size: clamp(2.2rem,4.2vw,4.1rem); line-height: 1.04; max-width: none; color: var(--rb-snow); }
.cp-home .hero-lockup .hero-wordmark { width: clamp(156px,21vw,310px); height: auto; margin-bottom: 12px; }
.cp-home .hero-copy > p { color: #e3efff; font-size: clamp(1rem,1.45vw,1.17rem); }
.cp-home .hero-ctas { margin-top: 18px; }
.cp-home .case-desk {
  width: 100%;
  min-height: clamp(280px,39vw,515px);
  margin: 0;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.cp-home .case-desk::before {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 10% 0 9%;
  background: radial-gradient(ellipse,#102c551a 32%,#10346300 75%);
  pointer-events: none;
}
.cp-home .case-desk .desk-card {
  position: relative;
  inset: auto;
  flex: 0 0 54%;
  width: 54%;
  max-width: 344px;
  min-width: 0;
  padding: clamp(5px,1.1vw,13px);
  border-radius: 13px;
  border: 3px solid var(--rb-navy);
  box-shadow: 0 7px 0 var(--rb-deep),0 16px 26px #071a3d70;
}
.cp-home .case-desk .desk-logic { transform: translate(3%,-12%) rotate(-7deg); background: #a9d6fc; }
.cp-home .case-desk .desk-foot { transform: translate(-3%,12%) rotate(6deg); background: #1b426a; }
.cp-home .case-desk :is(.foot-grid,.logic-grid) { width: 100%; min-width: 0; }
.cp-home .case-desk .logic-cell { border-color: #8eb8de; border-radius: 4px; }
.cp-home .gold-button {
  background: var(--rb-gold); color: var(--rb-navy);
  border: 2px solid var(--rb-navy); border-radius: 7px;
  box-shadow: inset 0 4px #fff090,0 4px var(--rb-navy);
  font-family: var(--rb-reading); font-weight: 700;
}
.cp-home .games-catalog2 { background: #0d2851; padding-block: clamp(35px,5vw,75px); }
.cp-home .catalog2-head { margin-bottom: clamp(18px,3vw,35px); }
.cp-home .catalog2-head h2,.cp-home .journal-head h2 { font-size: clamp(2.5rem,5.6vw,5.1rem); line-height: .99; }
.cp-home .catalog2-head h2 em,.cp-home .games-catalog2 .kicker { color: var(--rb-gold); }
.cp-home .catalog2-head > p,.cp-home .selected-copy > p { color: #d5e6fb; }
.cp-home .catalog-card { background: #153864; border: 2px solid #447bb3; box-shadow: 0 5px var(--rb-deep); border-radius: 12px; }
.cp-home .catalog-card:is(:hover,.is-active) { background: #18477c; border-color: var(--rb-gold); transform: translateY(-3px); }
.cp-home .catalog-card-upcoming:hover { transform: none; border-color: #447bb3; }
.cp-home .card-art-slot { border-radius: 7px; }
.cp-home .card-number { padding: 1px 4px; border-radius: 4px; background: var(--rb-deep); color: var(--rb-snow); }
.cp-home .foot-cell b { padding: 0 2px; border-radius: 2px; background: var(--rb-deep); text-shadow: none; }
[data-rebrand="portada"] .cp-home .foot-cell .foot-token-5 { color: #07172e; }
[data-rebrand="portada"] .cp-home .foot-confirmed-player .fd-mini-kit-num {
  padding: 1px 2px; border-radius: 3px; background: #07172e; color: #f1f7ff;
}
.cp-home .card-meta strong { font-family: var(--rb-display); font-weight: 400; }
.cp-home .card-meta small { color: #d5e6fb; }
.cp-home .selected-game { position: relative; margin-top: clamp(30px,5vw,68px); border-color: #447bb3; }
.cp-home .selected-copy > h3 { color: var(--rb-snow); }
.cp-home .selected-copy > .kicker { color: var(--rb-gold); }
.cp-home .world-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cp-home .world-tab:is(:hover,.is-active) { background: #18477c; border-color: #8bc3fa; }
[data-rebrand="portada"] .cp-home .world-tab.is-active span { color: var(--rb-gold); }
.cp-home .journal-section { background: #e4f0ff; color: var(--rb-navy); padding-block: clamp(44px,7vw,90px); }
.cp-home .journal-grid { margin-top: 22px; }
.cp-home .journal-card { border-color: #176cce; min-height: 225px; }
.cp-home .journal-card:hover { background: #d6e8fc; }
.cp-home .journal-card h3 { margin-top: 24px; }
.cp-home .journal-card b { color: #124c91; }
.cp-home .journal-card > span,.cp-home .journal-section .kicker { color: #365f94; }
.cp-home .about-section { background: #c7e2ff; color: var(--rb-navy); }
.cp-home .about-section em { color: #12519f; }
.cp-home .cp-footer { background: var(--rb-deep); color: #d5e6fb; }

/* Menús y camino. Los fondos de las apps se reservan para selección. */
[data-rebrand="cluepost"] {
  --font: var(--rb-reading); --blue: #1168d6; --blue-deep: #0b499b;
  --blue-soft: #e8f0f8; --gold: var(--rb-gold); --gold-dark: #724b00;
  --gold-soft: #fff1b5; --bg: #e9f3ff; --surface: #f1f7ff;
  --text: #163457; --text-soft: #385671; --border: #a9c4df;
  font-family: var(--rb-reading);
}
[data-theme="dark"] [data-rebrand="cluepost"],[data-rebrand="cluepost"][data-theme="dark"] {
  --bg: #0d2342; --surface: #17314f; --text: #f1f7ff; --text-soft: #b4cee7;
  --border: #527dab; --blue: #93c7ff; --blue-deep: #b8dcff;
  --blue-soft: #254969; --gold-soft: #5d5025; --gold-dark: #ffe28c;
}
[data-rebrand="cluepost"] .btn-primary { color: var(--rb-navy); }
[data-rebrand="cluepost"] .btn-primary:hover { background: #ffe281; }
[data-rebrand="cluepost"] .welcome-note a { color: var(--blue-deep); }
[data-rebrand="cluepost"] .settings-btn-danger { color: #9c2530; }
[data-theme="dark"] [data-rebrand="cluepost"] .settings-btn-danger { color: #ff9d9d; }
[data-rebrand="cluepost"] .story-speaker { color: var(--text); color: color-mix(in srgb, var(--text) 70%, var(--story-speaker-color)); }
[data-rebrand="cluepost"] .story-arrow:not(:disabled) { color: var(--rb-navy); }
[data-rebrand="cluepost"] .story-arrow:not(:disabled):hover { background: #ffe281; }
[data-rebrand="cluepost"] .story-strip .story-img { aspect-ratio: 1456 / 816; object-fit: contain; }
[data-rebrand="cluepost"] :is(.worlds-screen,.levels-screen,.loading-screen),
[data-rebrand="footdoku"] .footdoku-screen.fd-entry-hub {
  background-color: #115ec0;
  background-image: url(/rebrand/postal-pattern-suave.svg),radial-gradient(ellipse at 50% 20%,#228df7,#0d56b2 54%,#0b3975 100%);
  background-size: 280px auto,auto;
}
[data-rebrand="cluepost"] :is(.worlds-topbar,.levels-topbar,.game-topbar) {
  background: #1068d5;
  border-bottom: 2px solid #0d4d9b;
  color: var(--rb-snow);
}
[data-rebrand="cluepost"] :is(.worlds-logo,.loading-logo) { object-fit: contain; }
[data-rebrand="cluepost"] :is(.worlds-topbar-btn,.worlds-counter,.levels-counter,.levels-back,.game-back,.game-settings-btn) {
  border: 1px solid #0d4b97; background: #e5f1ff; color: var(--rb-navy); border-radius: 7px;
}
[data-rebrand="cluepost"] :is(.worlds-counter,.levels-counter) b { color: var(--rb-navy); }
[data-rebrand="cluepost"] :is(.levels-title,.world-card-name,.worlds-continue-label,.game-title,.overlay-title) { font-family: var(--rb-display); font-weight: 400; }
[data-rebrand="cluepost"] .world-card { border: 2px solid var(--rb-navy); background: linear-gradient(#d9edff,#9bc7f4); box-shadow: 0 4px var(--rb-navy); color: var(--rb-navy); }
[data-rebrand="cluepost"] .world-card .world-card-flap { display: none; }
[data-rebrand="cluepost"] .world-card:not(.world-card-locked) .world-card-name { color: var(--rb-navy); }
[data-rebrand="cluepost"] .world-card-locked { background: linear-gradient(#cee0f3,#a0b8d2); }
[data-rebrand="cluepost"] .world-card-locked .world-card-name { color: #2c4868; }
[data-rebrand="cluepost"] .world-card-img { filter: none; }
[data-rebrand="cluepost"] :is(.world-card-badge,.daily-card-size-pill):not(.world-card-badge-done,.daily-card-size-pill-done) {
  color: #133e69; background: #edf5ff;
}
[data-rebrand="cluepost"] .worlds-season-teaser { color: #f1f7ff; background: #123f7f; border-color: #6aacf1; }
[data-rebrand="cluepost"] .worlds-footer a { color: #eef6ff; }
[data-rebrand="cluepost"] .worlds-continue { color: var(--rb-navy); border: 2px solid var(--rb-navy); background: var(--rb-gold); box-shadow: inset 0 5px #fff194,0 4px var(--rb-navy); }
[data-rebrand="cluepost"] .levels-screen { background-image: radial-gradient(ellipse at 50% 20%,#228df7,#0d56b2 54%,#0b3975 100%); }
[data-rebrand="cluepost"] .levels-title { color: var(--rb-snow); }
[data-rebrand="cluepost"] .levels-divider { color: var(--rb-snow); }
[data-rebrand="cluepost"] .levels-divider span { padding: 3px 8px; border-radius: 5px; background: #123f7f; }
[data-rebrand="cluepost"] .level-node { font-family: var(--rb-display); font-weight: 400; }
[data-rebrand="cluepost"] .level-node:is(.level-node-done,.level-node-current,.level-node-locked) { border: 0; border-radius: 12px; box-shadow: none; background-size: 100% 100%; background-color: transparent; }
[data-rebrand="cluepost"] .level-node-done { background-image: url(/rebrand/path-done.svg); }
[data-rebrand="cluepost"] .level-node-current { background-image: url(/rebrand/path-current.svg); color: var(--rb-navy); animation: none; }
[data-rebrand="cluepost"] .level-node-locked { background-image: url(/rebrand/path-locked.svg); }

/* The Android play area scrolls between its header and action bar. */
[data-rebrand="cluepost"] .game-screen:has(.game-meta) {
  height: 100dvh; min-height: 0; overflow: hidden;
  background: var(--bg); --game-frame: #102c55; --game-panel: #a7c6e6; --game-bar: #d7e7fa;
}
[data-theme="dark"] .game-screen:has(.game-meta) {
  --game-frame: #79b8ff; --game-panel: #17314f; --game-bar: #102c55;
}
.game-screen:has(.game-meta) .game-topbar {
  position: static; flex: none; gap: 10px; padding: 7px max(12px,calc((100% - 1120px) / 2)); min-height: 64px;
  background: #0d62c8; border-bottom: 2px solid var(--rb-navy);
}
.game-screen:has(.game-meta) .game-title { color: var(--rb-snow); min-width: 0; text-shadow: 0 2px var(--rb-navy); }
.game-world { display: block; overflow: hidden; text-overflow: ellipsis; font: 700 .72rem var(--rb-reading); text-shadow: none; }
.game-title-row { display: flex; align-items: center; gap: 7px; font-size: clamp(1.05rem,5vw,1.65rem); }
.game-size { color: white; background: var(--rb-navy); border-radius: 4px; padding: 3px 6px; font-size: .72em; text-shadow: none; }
.game-screen:has(.game-meta) :is(.game-back,.game-settings-btn) {
  display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; padding: 0 0 4px;
  border: 0; border-radius: 8px; background: #147cff url(/rebrand/secondary-normal.svg) center / 100% 100% no-repeat;
}
.game-screen:has(.game-meta) :is(.game-back,.game-settings-btn):active { background-image: url(/rebrand/secondary-pressed.svg); }
.game-ui-icon { display: block; width: 22px; height: 22px; object-fit: contain; }
.game-meta {
  position: relative; z-index: 9; display: grid; grid-template-columns: 1fr auto 1fr; flex: none; align-items: center;
  width: min(100%,1120px); margin-inline: auto; padding: 0 14px; color: var(--text);
}
.game-meta :is(.game-time,.game-stamps) { display: flex; align-items: center; gap: 5px; font: 400 1.1rem var(--rb-display); }
.game-meta .game-stamps { justify-self: end; padding: 0; background: none; }
.game-meta :is(.game-timer,.game-stamps b) { color: inherit; font: inherit; }
.game-meta .game-ui-icon { width: 18px; height: 18px; }
[data-theme="dark"] .game-meta .game-time img { content: url(/rebrand/clock-white.svg); }
.game-zoom-menu summary { cursor: pointer; padding: 6px 8px; font: 700 .84rem var(--rb-reading); }
.game-zoom-menu[open] .game-zoom {
  position: absolute; z-index: 1; inset: 100% 12px auto; max-width: 330px; margin-inline: auto;
  background: var(--surface); border: 2px solid var(--border); border-radius: 8px;
  padding: 10px; gap: 7px 14px; box-shadow: var(--shadow);
}
.game-screen:has(.game-meta) .game-layout {
  flex: 1 1 0; width: min(100%,1180px); max-width: none; min-height: 0;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 4px 12px 12px; gap: 8px;
}
.game-screen:has(.game-meta) :is(.game-main,.game-clues) { flex: none; min-width: 0; position: static; }
.game-screen:has(.game-meta) .game-grid {
  --board-ratio: 1;
  max-width: min(100%,calc(560px * var(--grid-scale,1)),calc((100dvh - 155px) * .60 * var(--board-ratio) * var(--grid-scale,1)));
  width: 100%; gap: 2px; padding: 3px; border: 3px solid var(--game-frame);
  border-radius: 8px; background: var(--game-panel);
}
.game-screen:has(.game-meta) .game-grid:has(.cell-cols-3) { --board-ratio: 1.48; }
.game-screen:has(.game-meta) .game-grid .cell { min-width: 0; border-radius: 3px; }
.game-screen:has(.game-meta) .game-grid .cell-cols-3 { aspect-ratio: 3 / 2; }
.game-screen:has(.game-meta) .game-grid .cell-candidates { inset: 1px; gap: 1px; }
.game-screen:has(.game-meta) .game-grid .cell-candidate { padding: 0; border-radius: 2px; }
.game-screen:has(.game-meta) .game-clues { align-items: center; gap: 8px; max-height: none; overflow: visible; }
.game-screen:has(.game-meta) :is(.game-clues-v,.game-clues-h):not(:empty) {
  justify-content: safe center; max-width: 100%; padding: 4px;
  background: var(--game-panel); border: 2px solid var(--game-frame); border-radius: 7px;
}
.game-screen:has(.game-meta) .clue-card { border-color: transparent; }
.game-screen:has(.game-meta) .clue-square { border: 1px solid var(--border); background-color: var(--surface); }
.game-screen:has(.game-meta) .clue-square:not(.active) { background-color: var(--blue-soft); }
.clue-negated { position: relative; }
.clue-negated::after {
  content: ""; position: absolute; inset: 1px; pointer-events: none;
  background: linear-gradient(45deg,transparent 46%,#ec282d 47% 53%,transparent 54%),
    linear-gradient(-45deg,transparent 46%,#ec282d 47% 53%,transparent 54%);
}
.game-screen:has(.game-meta) .game-buttons {
  flex: none; display: flex; flex-wrap: nowrap; gap: 8px;
  padding: 8px 12px max(9px,env(safe-area-inset-bottom)); background: var(--game-bar); border-top: 2px solid var(--border);
}
.game-screen:has(.game-meta) .game-btn {
  --face: url(/rebrand/secondary-normal.svg); --face-pressed: url(/rebrand/secondary-pressed.svg);
  --face-disabled: url(/rebrand/secondary-disabled.svg);
  display: grid; place-items: center; align-content: center; gap: 2px; flex: 1 1 0; min-width: 0; max-width: 186px;
  min-height: 57px; padding: 4px 3px 8px; border: 0; box-shadow: none;
  color: #fff; background: var(--face) center / 100% 100% no-repeat;
  font: 400 clamp(.8rem,3.3vw,1rem) var(--rb-display); text-align: center;
}
.game-screen:has(.game-meta) .game-btn img { width: 21px; height: 21px; }
.game-screen:has(.game-meta) .game-btn-check {
  --face: url(/rebrand/success-normal.svg); --face-pressed: url(/rebrand/success-pressed.svg); --face-disabled: url(/rebrand/success-disabled.svg); color: var(--rb-navy);
}
.game-screen:has(.game-meta) .game-btn-hint {
  --face: url(/rebrand/primary-normal.svg); --face-pressed: url(/rebrand/primary-pressed.svg); --face-disabled: url(/rebrand/primary-disabled.svg); color: var(--rb-navy);
}
.game-screen:has(.game-meta) .game-btn:active { background-image: var(--face-pressed); padding-top: 8px; padding-bottom: 4px; }
.game-screen:has(.game-meta) .game-btn:disabled { background-image: var(--face-disabled); }
@media (min-width: 1000px) {
  .game-screen:has(.game-meta) .game-layout { flex: 0 1 auto; gap: 16px; padding-top: 9px; }
  .game-screen:has(.game-meta) .game-main { flex: 1 1 calc(500px * var(--grid-scale,1)); }
  .game-screen:has(.game-meta) .game-clues { flex: 1 1 550px; }
  .game-screen:has(.game-meta) .game-buttons { width: min(100%,1156px); margin-inline: auto; border-radius: 8px; }
}

/* FootDoku. Colores y formas del cliente Android, con sus pantallas web reales. */
[data-rebrand="footdoku"] { margin: 0; font-family: var(--rb-reading); }
[data-rebrand="footdoku"] *,[data-rebrand="footdoku"] *::before,[data-rebrand="footdoku"] *::after { box-sizing: border-box; }
[data-rebrand="footdoku"] .footdoku-screen.fd-entry-hub {
  background-image: url(/rebrand/football-pattern-suave.svg),radial-gradient(ellipse at 50% 12%,#1466c3,#104f9f 52%,#0b3975 100%);
  color: var(--rb-snow);
  --fd-hub-text: #f1f7ff; --fd-hub-text-muted: #d7eaff; --fd-hub-accent: #ffd447;
}
[data-rebrand="footdoku"] .fd-entry-header { background: #0e4b96d9; border-color: #72b4ff60; }
[data-rebrand="footdoku"] :is(.fd-entry-title,.fd-entry-division-name,.fd-entry-match-num,.fd-title) { font-family: var(--rb-display); font-weight: 400; letter-spacing: .015em; }
[data-rebrand="footdoku"] .fd-entry-title span { color: #a3f02f; }
[data-rebrand="footdoku"] :is(.fd-entry-tagline,.fd-entry-section-label,.fd-entry-division-blurb,.fd-entry-match-status,.fd-entry-match-label) { color: #d7eaff; }
[data-rebrand="footdoku"] .fd-entry-division:not(.fd-mods-row) { background: linear-gradient(#1968ba,#124c98); border: 2px solid var(--rb-navy); box-shadow: 0 4px var(--rb-navy); }
[data-rebrand="footdoku"] .fd-entry-division-locked:not(.fd-mods-row) { background: #224f82; }
[data-rebrand="footdoku"] .fd-entry-hub :is(.fd-entry-club,.fd-entry-continue,.fd-entry-size,.fd-entry-match,.fd-mods-back) { border: 2px solid var(--rb-navy); border-radius: 8px; box-shadow: 0 3px var(--rb-navy); }
[data-rebrand="footdoku"] .fd-entry-hub :is(.fd-entry-club,.fd-entry-continue,.fd-entry-size) { background: #d9edff; color: var(--rb-navy); }
[data-rebrand="footdoku"] .fd-entry-club :is(.fd-entry-club-name,.fd-entry-club-cta) { color: #183e68; }
[data-rebrand="footdoku"] .fd-entry-account:not(.fd-entry-continue) :is(.fd-entry-continue-meta,small) { color: #e4f2ff; }
[data-rebrand="footdoku"] .fd-mods-hub .fd-entry-continue :is(.fd-entry-continue-label,.fd-entry-continue-meta) { color: #183e68; }
[data-rebrand="footdoku"] .fd-entry-division-index { color: #dbeeff; }
[data-rebrand="footdoku"] .fd-entry-hub :is(.fd-entry-mod,.fd-entry-size-active) { background: var(--rb-gold); color: var(--rb-navy); }
[data-rebrand="footdoku"] .fd-entry-hub .fd-entry-matches { background: #123e76; border-color: #6aacf1; }
[data-rebrand="footdoku"] .fd-entry-hub .fd-entry-match { background: linear-gradient(#1d65b0,#134b89); color: white; text-shadow: none; }
[data-rebrand="footdoku"] .fd-entry-match-completed { box-shadow: inset 0 0 0 2px #6fe3a1,0 3px var(--rb-navy); }
[data-rebrand="footdoku"] .fd-entry-match-in-progress { box-shadow: inset 0 0 0 2px var(--rb-gold),0 3px var(--rb-navy); }
[data-rebrand="footdoku"] .fd-game-hub .fd-topbar-row { background: #1068d5; color: white; padding: 4px 9px; min-height: 44px; }
[data-rebrand="footdoku"] .fd-game-hub .fd-topbar-row :is(.fd-title,.fd-back,.fd-premise-toggle) { color: white; }
[data-rebrand="footdoku"] .fd-game-hub :is(.fd-back,.fd-premise-toggle) { display: inline-flex; align-items: center; gap: 4px; }
.fd-game-nav-icon { width: 16px; height: 16px; object-fit: contain; }
.fd-premise-toggle .fd-game-nav-icon { transform: rotate(-90deg); }
.fd-premise-collapsed .fd-premise-toggle .fd-game-nav-icon { transform: rotate(90deg); }
[data-rebrand="footdoku"] .fd-game-hub .fd-title { font-size: clamp(.94rem,3.6vw,1.2rem); }
[data-rebrand="footdoku"] .fd-game-hub .fd-premise { border-left-color: #1876dc; }
[data-rebrand="footdoku"] .fd-game-hub .fd-premise-tag { color: #8c2430; }
[data-theme="dark"] [data-rebrand="footdoku"] .fd-game-hub .fd-premise-tag { color: #ff9e9e; }
[data-rebrand="footdoku"] .fd-game-hub .fd-board-frame { border-color: #16395e; }
[data-rebrand="footdoku"] .fd-cell:focus-visible { outline: 3px solid var(--rb-focus); outline-offset: -3px; z-index: 2; }
[data-rebrand="footdoku"] .fd-cell-object-wrap .fd-cell-object-print { filter: none; }
[data-rebrand="footdoku"] .fd-game-hub .fd-tools-actions .fd-tool-btn-primary {
  background: #65df77; border-color: var(--rb-navy); color: var(--rb-navy); box-shadow: inset 0 3px #a4f5ad,0 3px var(--rb-navy);
  display: grid; justify-items: center; gap: 3px;
}
.fd-game-hub img.fd-tool-icon { width: 22px; height: 22px; object-fit: contain; }
.fd-active-clue { display: none; }
.fd-game-extras { margin-top: 12px; padding: 7px; background: var(--fd-hub-surface); border: 1px solid var(--fd-hub-border); border-radius: 6px; }
.fd-game-extras summary { cursor: pointer; font-weight: 700; }
[data-rebrand="footdoku"] .footdoku-screen:has(.fd-profile-layout) .fd-profile-topbar { background: #1059b1; border-bottom: 3px solid #0c3e78; }
[data-rebrand="footdoku"] .footdoku-screen:has(.fd-profile-layout) .fd-profile-topbar :is(.fd-title,.fd-back) { color: #f1f7ff; }
[data-rebrand="footdoku"] .fd-profile-topbar .fd-profile-reset-btn { color: #f1f7ff; border-color: #8ac0f1; }
[data-rebrand="footdoku"] .fd-mod-editor-tab { background: #dcf0ff; color: #133d69; border-color: #a2c7ea; }
[data-rebrand="footdoku"] .fd-mod-editor-tab.is-active { background: var(--rb-gold); color: var(--rb-navy); border-color: #0c3e78; box-shadow: 0 2px #0c3e78; }
[data-rebrand="footdoku"] .footdoku-screen:has(.fd-profile-layout) .fd-profile-kit-preview-hero {
  background: radial-gradient(ellipse,#f1f7ff,#bfdcfb);
  border: 1px solid #95b9de;
}
[data-rebrand="footdoku"] .fd-profile-kit-preview-hero .fd-profile-kit-caption { color: #183e68; }
[data-rebrand="footdoku"] .fd-mods-back .fd-mods-back-meta { color: #f1f7ff; opacity: 1; }
[data-rebrand="footdoku"] .fd-mods-row .fd-entry-division-main {
  padding: 10px; border-radius: 7px; background: #102c55ed; overflow-wrap: anywhere;
}
[data-rebrand="footdoku"] .fd-mods-row .fd-entry-division-main :is(.fd-mods-name,.fd-mods-desc,.fd-mods-code,.fd-mods-author,.fd-mods-copy) {
  color: #f1f7ff; -webkit-text-stroke: 0;
}
[data-rebrand="footdoku"] .fd-mods-row .fd-mods-copy { padding: 5px 8px; border: 1px solid #94bceb; border-radius: 5px; }
[data-rebrand="footdoku"] .fd-mod-card-preview-copy {
  display: grid; gap: 3px; padding: 8px; border-radius: 7px; background: #102c55ed;
}
[data-rebrand="footdoku"] .fd-mod-card-preview :is(strong,span,button) { -webkit-text-stroke: 0; }
[data-rebrand="footdoku"] .fd-mod-card-preview button { background: #102c55; }
[data-rebrand="footdoku"] .fd-kit-custom-hint { color: var(--fd-hub-text-muted,#456480); }
[data-rebrand="footdoku"] :is(.fd-mod-editor-tabs,.fd-profile-topbar,.fd-mod-team-chip) { min-width: 0; }

/* Contenido. Se conservan los títulos, texto, navegación y estructura. */
[data-rebrand="editorial"] {
  --bg: #e6f0fc; --surface: #f1f7ff; --text: #163457; --text-soft: #385671;
  --blue: #365f94; --blue-deep: #124d95; --gold: #ffd447; --gold-dark: #614600; --border: #b6cce7;
  font-family: var(--rb-reading); font-size: 1.05rem;
}
[data-rebrand="editorial"] :is(.topbar,footer.site) { background: var(--rb-deep); }
[data-rebrand="editorial"] .topbar img { height: 34px; }
[data-rebrand="editorial"] .topbar nav .btn-gold { color: var(--rb-navy); }
[data-rebrand="editorial"] :is(h1,h2) { font-family: var(--rb-display); font-weight: 400; }
[data-rebrand="editorial"] h2 { color: #124d95; }
[data-rebrand="editorial"] :is(main,.page,nav:not(.topbar nav)) a:not(.btn-gold) { color: #365f94; }
[data-rebrand="editorial"] :is(.clue-type,.clue-read) b { color: #684600; }
[data-rebrand="editorial"] .bcols { color: #385671; }
[data-rebrand="editorial"] .article h1 { font-size: clamp(1.9rem,4.7vw,3.1rem); line-height: 1.12; }
[data-rebrand="editorial"] .article h2 { color: #124d95; }
[data-rebrand="editorial"] .article .note { background: #d3e7ff; }

@media (max-width: 900px) {
  .cp-home .hero-inner { padding-top: 38px; }
  .cp-home .case-desk { min-height: clamp(200px,48vw,415px); width: min(100%,710px); margin-inline: auto; }
  .cp-home .case-desk .desk-card { flex-basis: 46%; width: 46%; }
  .cp-home .hero-ctas { margin-top: 5px; }
}
@media (max-width: 680px) {
  .cp-home .cp-header nav a:nth-child(n) { display: inline; }
  .cp-home .coming-seal { max-width:100%; padding:2px 1px; border-width:1px; font-size:clamp(.34rem,1.63vw,.59rem); letter-spacing:0; }
  .cp-home .case-desk .desk-card { border-width: 2px; }
  .cp-home .case-desk .desk-logic { transform: translate(1%,-10%) rotate(-5deg); }
  .cp-home .case-desk .desk-foot { transform: translate(-1%,10%) rotate(4deg); }
  [data-rebrand="footdoku"] .fd-mod-editor-tabs { overflow-x: auto; max-width: 100%; }
  [data-rebrand="footdoku"] .fd-profile-hub:not(.fd-mod-editor) .fd-profile-actions { width: 100%; }
  [data-rebrand="cluepost"] .worlds-grid { width:100%; max-width:480px; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  [data-rebrand="cluepost"] .worlds-grid .world-card { min-width:0; min-height:148px; padding:8px 5px; }
  [data-rebrand="cluepost"] .worlds-grid .world-card-visual { height:78px; }
  [data-rebrand="cluepost"] .worlds-grid .world-card-img { max-height:76px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  [data-rebrand="footdoku"] .fd-game-hub .fd-premise p { max-height: 3.6em; overflow: auto; }
}
@media (min-width: 821px) and (orientation: landscape) and (max-height: 520px) {
  [data-rebrand="footdoku"] .fd-game-hub .fd-pane-tools { overflow: hidden; gap: 4px; padding: 6px; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-tools-rail { min-height: 0; overflow: auto; gap: 4px; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-tools-actions { flex: none; margin-top: 0; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-pane-tools .fd-tool-btn {
    display: flex; flex-direction: row; min-height: 36px; padding: 3px; gap: 5px;
  }
}
@media (max-width: 820px) and (orientation: landscape) and (max-height: 520px) {
  [data-rebrand="footdoku"] .fd-game-hub .fd-pane-tools { order: -2; }
}
@media (max-width: 380px) {
  [data-rebrand="footdoku"] .fd-game-hub .fd-premise-toggle { min-width: 40px; min-height: 38px; justify-content: center; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-premise-toggle span { display: none; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-premise p { max-height: 7.1em; overflow: auto; }
}
@media (prefers-reduced-motion: reduce) {
  [data-rebrand="cluepost"] .world-card-img-float { animation: none; }
}
@media (max-width: 820px) {
  [data-rebrand="footdoku"] .fd-game-hub .fd-pane-board { order: -1; padding-top: 6px; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-premise { padding: 5px 8px; margin-block: 0 4px; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-pane-tools {
    display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); align-items: stretch;
    padding: 6px 10px 4px; gap: 5px;
  }
  [data-rebrand="footdoku"] .fd-game-hub .fd-tools-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  [data-rebrand="footdoku"] .fd-game-hub :is(.fd-tools-rail,.fd-tools-actions) { display: contents; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-pane-tools .fd-tool-btn { min-width:0; max-width:none; width:100%; padding:4px 1px; }
  [data-rebrand="footdoku"] .fd-game-hub :is(.fd-tools-help,.fd-hint) { grid-column:1/-1; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-pane-dossier { padding: 5px 10px 20px; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-suspects {
    display:flex; flex-direction:row; gap:5px; padding: 2px 2px 4px; overflow-x:auto; overscroll-behavior-inline:contain;
  }
  [data-rebrand="footdoku"] .fd-game-hub .fd-suspects button.fd-suspect-card {
    position:relative; flex:0 0 53px; min-width:0; display:grid; place-items:center;
    padding:3px; border-radius:7px; border:2px solid #173f68; background:#d1e7ff;
  }
  [data-rebrand="footdoku"] .fd-game-hub .fd-suspects .fd-suspect-selected { background:#88c6ff; outline:2px solid #1168d6; outline-offset:-2px; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-suspects button.fd-suspect-card .fd-suspect-avatar { width:43px; height:43px; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-suspects button .fd-suspect-content { display:none; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-suspects .fd-suspect-badge { position:absolute; right:0; bottom:0; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-active-clue:not(:empty) {
    display:block; padding:8px; margin-top:5px; color:var(--fd-hub-text); background:var(--fd-hub-surface-2);
    border:1px solid var(--fd-hub-border); border-radius:7px;
  }
  [data-rebrand="footdoku"] .fd-game-hub .fd-active-clue p { margin:3px 0 0; color:var(--fd-hub-text); }
  [data-rebrand="footdoku"] .fd-profile-layout > .fd-profile-pane { min-width:0; max-width:100%; }
  [data-rebrand="footdoku"] .fd-mod-editor .fd-profile-team-identity > input { min-width:0; }
}

@media (min-width: 600px) and (max-width: 820px) and (orientation: landscape) and (max-height: 520px) {
  [data-rebrand="footdoku"] .footdoku-screen.fd-game-hub {
    height: 100dvh; max-height: 100dvh; overflow: hidden;
  }
  [data-rebrand="footdoku"] .fd-game-hub .fd-layout {
    display: grid; grid-template-columns: 106px minmax(0, 1fr) minmax(160px, 29%); overflow: hidden;
  }
  [data-rebrand="footdoku"] .fd-game-hub .fd-layout > .fd-pane { order: 0; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-pane-board { padding: 8px; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-pane-dossier { overflow-y: auto; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-pane-tools {
    display: flex; flex-direction: column; overflow: hidden; gap: 4px; padding: 6px;
  }
  [data-rebrand="footdoku"] .fd-game-hub :is(.fd-tools-rail,.fd-tools-actions) {
    display: flex; flex-direction: column; flex-wrap: nowrap; gap: 4px;
  }
  [data-rebrand="footdoku"] .fd-game-hub .fd-tools-rail {
    min-height: 0; overflow: auto; justify-content: flex-start;
  }
  [data-rebrand="footdoku"] .fd-game-hub .fd-tools-actions { flex: none; margin-top: 0; }
  [data-rebrand="footdoku"] .fd-game-hub .fd-pane-tools .fd-tool-btn {
    display: flex; flex: none; flex-direction: row; min-height: 35px; padding: 3px; gap: 4px;
  }
}
