/* Slushy Bros: The Journey — bright animated-movie world: warm cream light,
   glossy candy colours, soft studio shadows, everything rounded. */
.sbg { --bg: #f7f1e6; --bg2: #fffaf3; --card: #ffffff; --ink: #1b2233; --mute: #6c7280; --line: rgba(27, 34, 51, 0.08); --line2: rgba(27, 34, 51, 0.14); --red: #e2342f; --red2: #ff5b57; --yellow: #f2b705; --blue: #2b7de9; --purple: #7b3fe4; --green: #2aa84a; --gold: #d99a06; --radius: 26px; --shadow: 0 18px 44px rgba(70, 45, 20, 0.12), 0 2px 6px rgba(70, 45, 20, 0.06); --shadow-lg: 0 34px 80px rgba(70, 45, 20, 0.18), 0 4px 10px rgba(70, 45, 20, 0.08); --font-display: 'Fredoka', 'Baloo 2', 'Nunito', 'Anton', sans-serif; --font-body: 'DM Sans', 'Nunito', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); font-family: var(--font-body); overflow-x: hidden; }
.sbg * { box-sizing: border-box; }
.sbg-wrap { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.sbg-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }
.sbg-eyebrow--live { color: var(--red); }
.sbg-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(226, 52, 47, 0.55); animation: sbg-pulse 1.8s ease-out infinite; }
.sbg-pulse--on { background: var(--red); }
@keyframes sbg-pulse { 0% { box-shadow: 0 0 0 0 rgba(226, 52, 47, 0.55); } 100% { box-shadow: 0 0 0 12px rgba(226, 52, 47, 0); } }
.sbg-h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4.2vw, 56px); line-height: 1; letter-spacing: -0.01em; margin: 6px 0 0; color: var(--ink); }
.sbg-btn { --c: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 100px; border: 0; font: 800 13px/1 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; cursor: pointer; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 2px var(--line2), 0 6px 16px rgba(70, 45, 20, 0.08); transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease; }
.sbg-btn:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--line2), 0 12px 26px rgba(70, 45, 20, 0.14); }
.sbg-btn--primary, .sbg-btn--choice, .sbg-btn--vote { --c: var(--red); color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 72%, #fff) 0%, var(--c) 42%, color-mix(in srgb, var(--c) 82%, #000) 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 10px 24px color-mix(in srgb, var(--c) 40%, transparent); }
.sbg-btn--primary:hover, .sbg-btn--choice:hover, .sbg-btn--vote:hover { filter: brightness(1.06); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 16px 32px color-mix(in srgb, var(--c) 45%, transparent); }
.sbg-btn--vote { --c: var(--blue); }
.sbg-btn--ghost { padding: 10px 16px; }
.sbg-btn[disabled] { opacity: 0.5; cursor: default; transform: none; filter: none; }

/* Hero: the living room */
.sbg-hero { position: relative; padding: 80px 0 70px; overflow: hidden; background: radial-gradient(60% 70% at 10% 10%, rgba(226, 52, 47, 0.18), transparent 60%), radial-gradient(50% 60% at 95% 15%, rgba(43, 125, 233, 0.18), transparent 60%), radial-gradient(40% 50% at 70% 100%, rgba(242, 183, 5, 0.22), transparent 60%), linear-gradient(180deg, #fff8ec 0%, var(--bg) 100%); }
.sbg-hero::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: linear-gradient(180deg, transparent, rgba(226, 180, 120, 0.14)); pointer-events: none; }
.sbg-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(27, 34, 51, 0.06) 1.2px, transparent 1.2px); background-size: 26px 26px; opacity: 0.5; pointer-events: none; mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent); }
.sbg-hero-cast { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.sbg-hero-cast-img { position: absolute; bottom: -2%; left: calc(71% + var(--i) * 8.5%); height: 90%; width: auto; object-fit: contain; filter: drop-shadow(0 30px 30px rgba(70, 45, 20, 0.28)); transform: translateX(-50%) rotate(calc((var(--i) - 1) * 1.5deg)); transform-origin: bottom center; z-index: calc(6 - var(--i)); animation: sbg-bob 5s ease-in-out infinite; animation-delay: calc(var(--i) * -1.3s); }
@keyframes sbg-bob { 0%, 100% { transform: translateX(-50%) rotate(calc((var(--i) - 1) * 1.5deg)) translateY(0); } 50% { transform: translateX(-50%) rotate(calc((var(--i) - 1) * 1.5deg)) translateY(-6px); } }
.sbg-hero-inner { position: relative; z-index: 2; max-width: 560px; }
.sbg-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(50px, 7.4vw, 108px); line-height: 0.92; letter-spacing: -0.02em; margin: 14px 0 14px; color: var(--red); text-shadow: 0 4px 0 #fff, 0 14px 30px rgba(226, 52, 47, 0.22); }
.sbg-sub { margin: 0; font-size: clamp(17px, 2vw, 22px); line-height: 1.4; color: #3d4455; max-width: 34ch; font-weight: 500; }
.sbg-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.sbg-stats { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sbg-stats li { display: grid; gap: 2px; padding: 12px 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.85); border: 1px solid #fff; box-shadow: var(--shadow); min-width: 120px; backdrop-filter: blur(6px); }
.sbg-stats strong { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1; color: var(--red); }
.sbg-stats span { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }

.sbg-hero.has-art { background: var(--art) center / cover no-repeat; }
.sbg-hero.has-art::before { height: 100%; background: linear-gradient(90deg, rgba(255, 248, 236, 0.94) 0%, rgba(255, 248, 236, 0.86) 36%, rgba(255, 248, 236, 0.35) 62%, rgba(255, 248, 236, 0) 85%), linear-gradient(180deg, rgba(255, 248, 236, 0) 70%, rgba(247, 241, 230, 0.9) 100%); }
.sbg-hero.has-art { padding-bottom: 90px; }
.sbg-hero.has-art .sbg-hero-cast-img { bottom: 6%; height: 74%; left: calc(68% + var(--i) * 9%); }
.sbg-hero.has-art::after { display: none; }
.sbg-hero-cast--group { display: flex; justify-content: flex-end; align-items: flex-end; }
.sbg-hero-group { position: absolute; right: -2%; bottom: -3%; height: 96%; width: auto; max-width: 58%; object-fit: contain; object-position: bottom right; filter: drop-shadow(0 30px 30px rgba(70, 45, 20, 0.28)); }
.sbg-map.has-art .sbg-canvas { background: var(--art) center / cover no-repeat, var(--bg2); height: min(80vh, 820px); }
.sbg-map.has-art .sbg-canvas::before { background: radial-gradient(60% 55% at 50% 50%, rgba(255, 250, 243, 0.5), rgba(255, 250, 243, 0.08) 70%, rgba(255, 250, 243, 0) 100%); }
.sbg-map.has-art .sbg-node { box-shadow: 0 0 0 1px var(--line), 0 18px 36px rgba(60, 50, 40, 0.28); }
.sbg-map.has-art .sbg-path { stroke: rgba(255, 255, 255, 0.85); stroke-width: 6; filter: drop-shadow(0 2px 2px rgba(60, 50, 40, 0.25)); }
.sbg-map.has-art .sbg-path.is-canon, .sbg-map.has-art .sbg-path--canonical.is-canon, .sbg-map.has-art .sbg-path--community_vote.is-canon { stroke: var(--red); stroke-width: 7; filter: drop-shadow(0 0 0 #fff) drop-shadow(0 3px 6px rgba(226, 52, 47, 0.45)); }
.sbg-map.has-art .sbg-path--alternate { stroke: rgba(255, 255, 255, 0.8); stroke-dasharray: 10 10; }
.sbg-map.has-art .sbg-path--future { stroke: rgba(255, 255, 255, 0.7); stroke-dasharray: 3 11; }
.sbg-map .sbg-node.is-locked .sbg-node-blank { background: var(--art-locked, repeating-linear-gradient(135deg, #f1e9da 0 10px, #faf4ea 10px 20px)) center / cover; }
.sbg-map .sbg-node.is-virtual .sbg-node-blank, .sbg-map .sbg-node--alternate .sbg-node-blank { background: var(--art-alt, repeating-linear-gradient(135deg, #f1e9da 0 10px, #faf4ea 10px 20px)) center / cover; }
.sbg-map .sbg-node--decision .sbg-node-art { background: var(--art-decision, linear-gradient(135deg, #fff2c4, #ffe08a)) center 40% / cover; }
.sbg-map .sbg-node--decision .sbg-node-blank { background: transparent; }

/* Hero scene: a title screen. The group shot fills the left two-thirds at its
   own shape (nothing cropped off the bros), the copy sits in a panel on the
   right third. Percent padding resolves against the hero width, so the copy
   column tracks the art at every screen size. Below 1100px it stacks. */
.sbg-hero.has-scene { position: relative; display: flex; align-items: center; min-height: min(82vh, 820px); padding: 56px 0; background: radial-gradient(70% 80% at 100% 50%, #fff8ec, #f3e7d4 70%), #f3e7d4; }
.sbg-hero.has-scene::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 68%; height: auto; background: var(--art) 45% center / cover no-repeat; -webkit-mask-image: linear-gradient(90deg, #000 78%, rgba(0, 0, 0, 0.6) 90%, transparent 100%); mask-image: linear-gradient(90deg, #000 78%, rgba(0, 0, 0, 0.6) 90%, transparent 100%); pointer-events: none; }
.sbg-hero.has-scene::after { display: none; }
.sbg-hero.has-scene .sbg-hero-inner { position: relative; z-index: 2; width: 100%; max-width: none; margin: 0; padding: 0 clamp(20px, 4vw, 72px) 0 calc(64% + 8px); text-align: left; }
.sbg-hero.has-scene .sbg-hero-inner > * { max-width: 560px; }
.sbg-hero.has-scene .sbg-title--pop { font-size: clamp(48px, 5.6vw, 100px); margin: 14px 0 12px; }
.sbg-hero.has-scene .sbg-sub { max-width: 30ch; margin: 18px 0 0; padding: 0; background: none; backdrop-filter: none; display: block; font-size: clamp(18px, 1.5vw, 23px); line-height: 1.35; color: #2b3242; }
.sbg-hero.has-scene .sbg-hero-actions { margin-top: 22px; }
.sbg-hero.has-scene .sbg-stats { margin-top: 24px; gap: 8px; }
.sbg-hero.has-scene .sbg-stats li { min-width: 0; padding: 10px 14px; }
@media (max-width: 1100px) {
    .sbg-hero.has-scene { display: block; min-height: 0; padding: 0 0 40px; background: var(--bg); }
    .sbg-hero.has-scene::before { position: relative; inset: auto; display: block; width: 100%; height: auto; aspect-ratio: 2400 / 1351; max-height: 70vh; background-position: center 30%; -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, #000 78%, transparent 100%); }
    .sbg-hero.has-scene .sbg-hero-inner { width: min(1240px, calc(100% - 40px)); margin: -24px auto 0; padding: 0; }
    .sbg-hero.has-scene .sbg-hero-inner > * { max-width: 640px; }
    .sbg-hero.has-scene .sbg-title--pop { font-size: clamp(46px, 11vw, 88px); }
}

/* Hero title: poster letters, candy extrusion, bounce in, wobble on hover */
.sbg-title--pop { font-family: 'Lilita One', 'Fredoka', sans-serif; font-weight: 400; font-size: clamp(56px, 8vw, 118px); line-height: 0.9; letter-spacing: 0.01em; text-shadow: none; color: var(--red); display: flex; flex-wrap: wrap; gap: 0 0.22em; margin: 16px 0 18px; perspective: 600px; }
.sbg-tw { --c1: var(--red); --c2: #b31f1b; --c3: #7a1210; position: relative; display: inline-block; color: var(--c1); -webkit-text-stroke: 0; transform: rotate(calc((var(--w) - 1) * -1.6deg)) translateY(0); transform-origin: 50% 100%; text-shadow: 0 1px 0 var(--c2), 0 2px 0 var(--c2), 0 3px 0 var(--c2), 0 4px 0 var(--c2), 0 5px 0 var(--c3), 0 6px 0 var(--c3), 0 7px 0 var(--c3), 0 8px 0 var(--c3), 0 14px 0 rgba(255, 255, 255, 0.9), 0 -2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff, 0 22px 34px rgba(70, 45, 20, 0.28); animation: sbg-word-in 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both; animation-delay: calc(0.12s + var(--w) * 0.11s); transition: transform 0.25s cubic-bezier(0.2, 1.4, 0.4, 1); cursor: default; }
.sbg-tw--red { --c1: #ef3b36; --c2: #b31f1b; --c3: #7a1210; }
.sbg-tw--blue { --c1: #2f86f0; --c2: #1b5db3; --c3: #123f7a; }
.sbg-tw--yellow { --c1: #f7bf0f; --c2: #c48d05; --c3: #8a6302; }
.sbg-tw--purple { --c1: #8b4de8; --c2: #6230ad; --c3: #421f78; }
.sbg-tw--green { --c1: #2fb352; --c2: #1f7d38; --c3: #145226; }
.sbg-title--pop:hover .sbg-tw { transform: rotate(calc((var(--w) - 1) * -1.6deg)) translateY(-2px); }
.sbg-tw:hover { transform: rotate(calc((var(--w) - 1) * -1.6deg + 3deg)) translateY(-10px) scale(1.06); animation: sbg-wobble 0.6s ease-in-out; }
@keyframes sbg-word-in { 0% { opacity: 0; transform: translateY(40px) scale(0.6) rotate(-8deg); } 60% { opacity: 1; transform: translateY(-8px) scale(1.06) rotate(calc((var(--w) - 1) * -1.6deg)); } 100% { opacity: 1; transform: translateY(0) scale(1) rotate(calc((var(--w) - 1) * -1.6deg)); } }
@keyframes sbg-wobble { 0%, 100% { rotate: 0deg; } 25% { rotate: 2deg; } 50% { rotate: -2deg; } 75% { rotate: 1deg; } }
.sbg-hero.has-scene .sbg-title--pop, .sbg-hero.has-art .sbg-title--pop { text-shadow: none; }
.sbg-hero .sbg-eyebrow { padding: 8px 14px 8px 10px; border-radius: 100px; background: #fff; box-shadow: var(--shadow); color: var(--red); }
.sbg-hero .sbg-sub { font-family: 'Fredoka', var(--font-body); font-weight: 500; font-size: clamp(18px, 2vw, 23px); color: #2b3242; }
.sbg-hero-actions .sbg-btn { padding: 16px 26px; font-size: 14px; }
.sbg-hero-actions .sbg-btn--primary { animation: sbg-btn-in 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) 0.6s both; }
.sbg-hero-actions .sbg-btn--vote { animation: sbg-btn-in 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) 0.72s both; }
@keyframes sbg-btn-in { from { opacity: 0; transform: translateY(16px) scale(0.9); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .sbg-title--pop { font-size: clamp(44px, 12vw, 72px); gap: 0 0.18em; } }
@media (prefers-reduced-motion: reduce) { .sbg-tw, .sbg-hero-actions .sbg-btn { animation: none !important; transition: none; } }

/* Player bar */
.sbg-player { position: relative; z-index: 3; margin-top: -26px; padding: 0 0 18px; }
.sbg-card { border-radius: var(--radius); background: var(--card); border: 1px solid #fff; box-shadow: var(--shadow); }
.sbg-player-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px 24px; align-items: center; padding: 16px 20px; border-top: 4px solid var(--c, var(--line2)); }
.sbg-player-card--guest { grid-template-columns: 1fr auto; border-top-color: var(--yellow); }
.sbg-player-card--guest > span:first-child { display: grid; gap: 4px; }
.sbg-player-card--guest strong { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.sbg-player-card--guest em { font-style: normal; font-size: 14px; color: var(--mute); }
.sbg-player-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.sbg-player-id { display: flex; align-items: center; gap: 12px; }
.sbg-player-id > span:last-child { display: grid; gap: 2px; }
.sbg-player-id strong { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.sbg-player-id em { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c, var(--mute)); }
.sbg-player-avatar { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--c, var(--bg)); border: 3px solid #fff; box-shadow: 0 6px 16px rgba(70, 45, 20, 0.18); font-family: var(--font-display); font-size: 20px; color: #fff; }
.sbg-player-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sbg-player-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.sbg-player-stats span { display: grid; gap: 1px; }
.sbg-player-stats b { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1; color: var(--gold); }
.sbg-player-stats em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.sbg-level-bar { grid-column: 1 / -1; height: 8px; border-radius: 8px; background: var(--bg); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08); }
.sbg-level-bar span { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--c, var(--yellow)), var(--yellow)); transition: width 0.6s ease; }
.sbg-player-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
.sbg-code { display: inline-flex; gap: 6px; }
.sbg-code input { width: 140px; padding: 10px 12px; border-radius: 100px; border: 2px solid var(--line2); background: #fff; color: var(--ink); font: 700 13px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; }
.sbg-player-logout { font-size: 12px; color: var(--mute); }

/* Decision card */
.sbg-decide { padding: 0 0 40px; margin-top: 0; position: relative; z-index: 3; }
.sbg-decide-card { padding: 28px; border: 0; border-top: 6px solid var(--red); box-shadow: 0 0 0 1px rgba(226, 52, 47, 0.1), var(--shadow-lg); }
.sbg-decide-card--idle { border-top-color: var(--line2); }
.sbg-decide-art { display: none; }
.sbg.has-decision-art .sbg-decide-art { display: block; height: 190px; margin: -28px -28px 22px; border-radius: 0 0 0 0; background: var(--art-decision) center 40% / cover no-repeat, #ffe08a; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06); }
.sbg.has-decision-art .sbg-decide-card { overflow: hidden; }
.sbg-decide-q { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 3.4vw, 46px); line-height: 1; letter-spacing: -0.01em; margin: 8px 0 8px; }
.sbg-decide-intro { margin: 0; color: var(--mute); font-size: 16px; line-height: 1.5; max-width: 60ch; }
.sbg-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 22px; }
.sbg-choice { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 18px 18px 18px 22px; border-radius: 20px; background: var(--bg2); border: 1px solid var(--line); overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.sbg-choice::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--c); }
.sbg-choice:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sbg-choice.is-mine { background: #fff; border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent), var(--shadow); }
.sbg-choice.is-won { border-color: var(--yellow); background: #fff8dc; }
.sbg-choice.is-lost { opacity: 0.6; filter: saturate(0.5); }
.sbg-choice-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.sbg-choice-body { display: grid; gap: 6px; align-content: start; }
.sbg-choice-body strong { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.05; }
.sbg-choice-body p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--mute); }
.sbg-choice-body em { font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.sbg-choice.is-mine .sbg-choice-body em, .sbg-choice.is-won .sbg-choice-body em { color: var(--c); }
.sbg-bar { height: 10px; border-radius: 100px; background: var(--bg); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08); }
.sbg-bar span { display: block; height: 100%; width: 0; border-radius: 100px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); transition: width 0.6s ease; }
.sbg-btn--choice { padding: 12px 16px; }
.sbg-choice.is-mine .sbg-btn--choice { --c: var(--ink); }
.sbg-decide-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 18px; font-size: 13px; color: var(--mute); }
.sbg-countdown { font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; color: var(--red); }
.sbg-countdown b { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: 0.04em; color: var(--ink); }

/* Map */
.sbg-map-section { padding: 30px 0 60px; }
.sbg-map-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sbg-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.sbg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sbg-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sbg-dot--canon { background: var(--red); box-shadow: 0 0 8px rgba(226, 52, 47, 0.6); }
.sbg-dot--decision { background: var(--yellow); box-shadow: 0 0 8px rgba(242, 183, 5, 0.7); }
.sbg-dot--alt { background: #b8bcc6; }
.sbg-dot--locked { background: #fff; border: 2px solid #c9cdd6; }
.sbg-map { position: relative; }
.sbg-map-tools { position: absolute; right: 16px; top: 16px; z-index: 5; display: flex; gap: 4px; padding: 6px; border-radius: 100px; background: rgba(255, 255, 255, 0.92); border: 1px solid #fff; box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.sbg-map-tools button { min-width: 36px; height: 36px; padding: 0 12px; border-radius: 100px; border: 0; background: transparent; color: var(--ink); font: 800 13px/1 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.sbg-map-tools button:hover { background: var(--bg); }
.sbg-canvas { position: relative; height: min(72vh, 760px); border-radius: var(--radius); overflow: hidden; background: radial-gradient(circle at 20% 15%, rgba(43, 125, 233, 0.1), transparent 45%), radial-gradient(circle at 85% 85%, rgba(226, 52, 47, 0.1), transparent 45%), radial-gradient(circle at 60% 40%, rgba(242, 183, 5, 0.1), transparent 40%), var(--bg2); border: 1px solid #fff; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); cursor: grab; touch-action: none; user-select: none; }
.sbg-canvas::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(27, 34, 51, 0.09) 1.2px, transparent 1.2px); background-size: 28px 28px; pointer-events: none; }
.sbg-canvas.is-dragging { cursor: grabbing; }
.sbg-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.sbg-paths { position: absolute; left: 0; top: 0; overflow: visible; }
.sbg-path { fill: none; stroke: rgba(27, 34, 51, 0.18); stroke-width: 4; stroke-linecap: round; }
.sbg-path.is-canon, .sbg-path--canonical.is-canon, .sbg-path--community_vote.is-canon { stroke: var(--red); stroke-width: 6; filter: drop-shadow(0 4px 8px rgba(226, 52, 47, 0.35)); }
.sbg-path--alternate { stroke: rgba(27, 34, 51, 0.2); stroke-dasharray: 8 9; }
.sbg-path--future { stroke: rgba(27, 34, 51, 0.16); stroke-dasharray: 3 10; }
.sbg-map.hide-alt .sbg-path--alternate, .sbg-map.hide-alt .sbg-node-pos[data-status="alternate"] { display: none; }
.sbg-nodes { position: absolute; inset: 0; }
.sbg-node-pos { position: absolute; }
.sbg-node { display: grid; grid-template-rows: auto 1fr; width: 100%; padding: 0; border: 3px solid #fff; border-radius: 20px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 14px 30px rgba(70, 45, 20, 0.16); transition: transform 0.2s ease, box-shadow 0.2s ease; font-family: var(--font-body); }
.sbg-node:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 0 0 1px var(--line), 0 24px 50px rgba(70, 45, 20, 0.24); z-index: 2; }
.sbg-node-art { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--bg); border-bottom: 3px solid var(--ch, var(--line2)); }
.sbg-node-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sbg-node-blank { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(135deg, #f1e9da 0 10px, #faf4ea 10px 20px); }
.sbg-node-body { display: grid; gap: 4px; padding: 10px 12px 12px; align-content: start; }
.sbg-node-kicker { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }
.sbg-node-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.05; letter-spacing: -0.01em; }
.sbg-node-meta { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.sbg-node-meta em { font-style: normal; font-size: 11px; color: var(--mute); margin-left: auto; font-weight: 800; }
.sbg-ci { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c); border: 2px solid #fff; overflow: hidden; margin-right: -7px; font-size: 10px; font-weight: 800; color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
.sbg-ci img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.sbg-yt { width: 18px; height: 13px; border-radius: 3px; background: #ff0000; position: relative; margin-left: 10px; }
.sbg-yt::after { content: ""; position: absolute; left: 7px; top: 3px; border-left: 6px solid #fff; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; }
.sbg-node--decision { border-color: var(--yellow); }
.sbg-node--decision.is-live { animation: sbg-glow 2s ease-in-out infinite alternate; }
@keyframes sbg-glow { from { box-shadow: 0 0 0 3px rgba(242, 183, 5, 0.25), 0 14px 30px rgba(70, 45, 20, 0.16); } to { box-shadow: 0 0 0 10px rgba(242, 183, 5, 0.35), 0 0 40px rgba(242, 183, 5, 0.6), 0 14px 30px rgba(70, 45, 20, 0.16); } }
.sbg-node--decision .sbg-node-kicker { color: var(--gold); }
.sbg-node--decision .sbg-node-art { aspect-ratio: 16 / 6; background: linear-gradient(135deg, #fff2c4, #ffe08a); border-bottom-color: var(--yellow); }
.sbg-node-vote { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; padding: 7px 11px; border-radius: 100px; background: var(--red); justify-self: start; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.sbg-node--alternate, .sbg-node.is-virtual { filter: saturate(0.2); opacity: 0.85; border-style: dashed; border-color: #c9cdd6; background: var(--bg2); }
.sbg-node--alternate .sbg-node-kicker, .sbg-node.is-virtual .sbg-node-kicker { color: var(--mute); }
.sbg.has-alt-art .sbg-node--alternate, .sbg.has-alt-art .sbg-node.is-virtual { filter: none; opacity: 1; background: #fff; border-style: dashed; border-color: color-mix(in srgb, var(--purple) 45%, #fff); box-shadow: 0 0 0 1px color-mix(in srgb, var(--purple) 14%, #fff), 0 14px 30px rgba(90, 60, 140, 0.16); }
.sbg.has-alt-art .sbg-node--alternate .sbg-node-art, .sbg.has-alt-art .sbg-node.is-virtual .sbg-node-art { border-bottom-color: color-mix(in srgb, var(--purple) 55%, #fff); }
.sbg.has-alt-art .sbg-node--alternate .sbg-node-kicker, .sbg.has-alt-art .sbg-node.is-virtual .sbg-node-kicker { color: var(--purple); }
.sbg.has-alt-art .sbg-node--alternate .sbg-node-title, .sbg.has-alt-art .sbg-node.is-virtual .sbg-node-title { color: color-mix(in srgb, var(--purple) 70%, var(--ink)); }
.sbg-m-hero--alt { display: none; }
.sbg.has-alt-art .sbg-m-hero--alt { display: block; aspect-ratio: 4 / 5; background: var(--art-alt) center / cover no-repeat, #d9c8f2; }
.sbg.has-alt-art .sbg-m-timeline { background: color-mix(in srgb, var(--purple) 8%, #fff); }
.sbg-m-hero--decision { display: none; }
.sbg.has-decision-art .sbg-m-hero--decision { display: block; aspect-ratio: 4 / 5; background: var(--art-decision) 50% 45% / cover no-repeat, #ffe08a; border-color: #fff; }
.sbg.has-decision-art .sbg-m-link-blank.is-decision { background: var(--art-decision) center 40% / cover no-repeat; }
.sbg-node.is-locked { filter: none; opacity: 1; background: rgba(255, 255, 255, 0.6); border-style: dashed; border-color: #c9cdd6; backdrop-filter: blur(6px); }
.sbg-node.is-locked .sbg-node-blank { filter: blur(6px); opacity: 0.7; }
.sbg.has-locked-art .sbg-node.is-locked { background: #fff; border-style: solid; border-color: #c6dcee; box-shadow: 0 0 0 1px #e3eef7, 0 14px 30px rgba(60, 90, 120, 0.18); }
.sbg.has-locked-art .sbg-node.is-locked .sbg-node-art { border-bottom-color: #a9c9e3; }
.sbg.has-locked-art .sbg-node.is-locked .sbg-node-blank { filter: none; opacity: 1; }
.sbg.has-locked-art .sbg-node.is-locked .sbg-node-title { color: #8fb3d1; text-shadow: 0 1px 0 #fff; }
.sbg.has-locked-art .sbg-node.is-locked em { color: #6f94b4; }
.sbg.has-locked-art .sbg-node.is-locked .sbg-node-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, 0.35)); pointer-events: none; }
.sbg.has-locked-art .sbg-m-locked { position: relative; overflow: hidden; padding: 64px 24px 24px; border-radius: 28px; border: 4px solid #fff; box-shadow: var(--shadow-lg); background: var(--art-locked) center / cover no-repeat, #cfe3f2; color: #fff; }
.sbg.has-locked-art .sbg-m-locked::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 45%, rgba(20, 60, 100, 0.38), rgba(20, 60, 100, 0) 100%); }
.sbg.has-locked-art .sbg-m-locked > * { position: relative; }
.sbg.has-locked-art .sbg-m-locked .sbg-eyebrow { color: #fff; opacity: 0.9; }
.sbg.has-locked-art .sbg-m-locked h2 { color: #fff; text-shadow: 0 4px 0 rgba(40, 90, 140, 0.45), 0 12px 30px rgba(10, 40, 80, 0.4); }
.sbg.has-locked-art .sbg-m-locked p { color: #fff; text-shadow: 0 1px 8px rgba(10, 40, 80, 0.6); }
.sbg.has-locked-art .sbg-m-locked .sbg-btn--ghost { background: rgba(255, 255, 255, 0.92); color: var(--ink); border-color: #fff; margin-top: 18px; }
.sbg-node.is-locked .sbg-node-title { font-size: 26px; color: #a3a8b3; }
.sbg-node.is-locked em { font-style: normal; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.sbg-node.is-latest { border-color: var(--red); }
.sbg-node-badge { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 5px 9px; border-radius: 100px; font-size: 9px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); background: var(--yellow); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
.sbg-node-badge--big { position: static; display: inline-block; margin-top: 8px; font-size: 11px; padding: 6px 10px; }
.sbg-badge--viral .sbg-node-badge, .sbg-badge--viral.sbg-node-badge--big { background: var(--red); color: #fff; }
.sbg-badge--legendary .sbg-node-badge, .sbg-badge--legendary.sbg-node-badge--big { background: linear-gradient(90deg, #f2b705, #ffe28a); }
.sbg-badge--history .sbg-node-badge, .sbg-badge--history.sbg-node-badge--big { background: linear-gradient(90deg, var(--purple), var(--red), var(--yellow)); background-size: 200% 100%; color: #fff; animation: sbg-shine 3s linear infinite; }
@keyframes sbg-shine { to { background-position: 200% 0; } }
.sbg-node.has-badge.sbg-badge--legendary, .sbg-node.has-badge.sbg-badge--history { border-color: var(--yellow); }

/* Mobile journey */
.sbg-journey { display: none; list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.sbg-journey::before { content: ""; position: absolute; left: 9px; top: 20px; bottom: 20px; width: 4px; border-radius: 4px; background: linear-gradient(to bottom, var(--red), rgba(226, 52, 47, 0.25)); }
.sbg-j { position: relative; margin: 0 0 18px; }
.sbg-j::before { content: ""; position: absolute; left: -23px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--red); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(226, 52, 47, 0.5); }
.sbg-j--decision::before { background: var(--yellow); box-shadow: 0 2px 8px rgba(242, 183, 5, 0.6); }
.sbg-j--decision.is-live::before { animation: sbg-pulse 1.6s ease-out infinite; }
.sbg-j--draft::before { background: #d6d9e0; box-shadow: none; }
.sbg-j .sbg-node { display: grid; grid-template-columns: 120px 1fr; grid-template-rows: none; }
.sbg-j .sbg-node-art { aspect-ratio: auto; border-bottom: 0; border-right: 3px solid var(--ch, var(--line2)); }
.sbg-j-alts { margin: 10px 0 0; }
.sbg-j-alts summary { cursor: pointer; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.sbg-j-alts-row { display: grid; gap: 10px; margin-top: 10px; }

/* Chapters + cast */
.sbg-chapters, .sbg-cast, .sbg-board, .sbg-events, .sbg-adv { padding: 44px 0 56px; border-top: 1px solid rgba(27, 34, 51, 0.06); }
.sbg-chapter-strip { display: flex; gap: 12px; overflow-x: auto; padding: 18px 4px 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.sbg-chapter { flex: 0 0 240px; scroll-snap-align: start; display: grid; gap: 4px; align-content: end; min-height: 190px; padding: 16px; border-radius: 22px; border: 3px solid #fff; background: linear-gradient(to top, rgba(255, 255, 255, 0.92) 42%, rgba(255, 255, 255, 0.2) 100%), linear-gradient(135deg, color-mix(in srgb, var(--c) 60%, #fff), color-mix(in srgb, var(--c) 25%, #fff)); color: var(--ink); text-align: left; cursor: pointer; box-shadow: var(--shadow); transition: transform 0.2s ease; }
.sbg-chapter:hover { transform: translateY(-4px) rotate(-1deg); }
.sbg-chapter.has-art { background: linear-gradient(to top, rgba(255, 255, 255, 0.94) 34%, rgba(255, 255, 255, 0.35) 58%, rgba(255, 255, 255, 0) 100%), var(--bg) center 30% / cover no-repeat; }
.sbg-chapter-n { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c); }
.sbg-chapter strong { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1; }
.sbg-chapter em { font-style: normal; font-size: 12px; color: var(--mute); }
.sbg-cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-top: 18px; }
.sbg-char { display: grid; gap: 2px; justify-items: center; padding: 16px 12px 14px; border-radius: 24px; border: 3px solid #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, #fff) 0%, #fff 60%); color: var(--ink); cursor: pointer; box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.sbg-char:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.sbg-char.is-mine { border-color: var(--c); }
.sbg-char-open { display: grid; gap: 2px; justify-items: center; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font-family: inherit; }
.sbg-char img { width: 100%; height: 170px; object-fit: contain; object-position: bottom; filter: drop-shadow(0 12px 12px rgba(70, 45, 20, 0.22)); margin-bottom: 8px; transition: transform 0.25s ease; }
.sbg-char:hover img { transform: translateY(-4px) scale(1.04); }
.sbg-char-blank { width: 84px; height: 84px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 40%, transparent); margin-bottom: 8px; }
.sbg-char strong { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.01em; color: var(--c); }
.sbg-char em { font-style: normal; font-size: 11px; color: var(--mute); }
.sbg-btn--team { margin-top: 10px; padding: 9px 8px; font-size: 10px; line-height: 1.2; width: 100%; --c: var(--c); color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 72%, #fff), var(--c) 45%, color-mix(in srgb, var(--c) 82%, #000)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 0 rgba(0, 0, 0, 0.16), 0 8px 18px color-mix(in srgb, var(--c) 35%, transparent); }
.sbg-btn--team[disabled] { opacity: 1; }
.sbg-cast-note { margin: 16px 0 0; font-size: 13px; color: var(--mute); }
.sbg-cast-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; }
.sbg-cast-head .sbg-h2 { margin-top: 6px; }
.sbg-m-card { display: flex; justify-content: center; }
.sbg-m-card .sbc { max-width: 100%; }
.sbg-m-card-link { display: block; margin-top: 14px; text-align: center; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }

/* Leaderboard */
.sbg-board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.sbg-board-card { padding: 18px 20px; }
.sbg-board-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.sbg-board-list li { display: grid; grid-template-columns: 30px 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); }
.sbg-board-list strong { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.sbg-board-list em { grid-column: 2; font-style: normal; font-size: 11px; color: var(--mute); }
.sbg-board-list b { grid-row: 1 / span 2; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--gold); }
.sbg-board-rank { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font: 800 12px var(--font-body); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.sbg-board-dot { grid-row: 1 / span 2; width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--c); justify-self: center; }
.sbg-board-empty { grid-template-columns: 1fr !important; color: var(--mute); font-size: 13px; }

/* Events: challenges + battles */
.sbg-events-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.sbg-events-card { padding: 18px 20px; display: grid; gap: 10px; align-content: start; }
.sbg-chal { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sbg-chal-item { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: start; padding: 12px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); }
.sbg-chal-item.is-done { border-color: var(--yellow); background: #fff8dc; }
.sbg-chal-check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line2); background: #fff; display: grid; place-items: center; font-weight: 800; color: var(--gold); }
.sbg-chal-item.is-done .sbg-chal-check { border-color: var(--yellow); background: var(--yellow); color: #fff; }
.sbg-chal-item > span:nth-child(2) { display: grid; gap: 4px; }
.sbg-chal-item strong { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.sbg-chal-item em { font-style: normal; font-size: 12px; color: var(--mute); }
.sbg-chal-bar { display: block; height: 8px; border-radius: 8px; background: var(--bg); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08); }
.sbg-chal-bar span { display: block; height: 100%; background: var(--yellow); border-radius: 8px; }
.sbg-chal-item b { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--gold); white-space: nowrap; }
.sbg-battle-title { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1; }
.sbg-battle-meta { font-style: normal; font-size: 13px; color: var(--mute); }
.sbg-battle-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.sbg-battle-list li { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; }
.sbg-battle-list strong { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--c); }
.sbg-battle-bar { display: block; height: 16px; border-radius: 8px; background: var(--bg); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08); }
.sbg-battle-bar span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); transition: width 0.6s ease; }
.sbg-battle-list b { font-family: var(--font-display); font-weight: 700; font-size: 18px; }

/* Cards + achievements */
.sbg-cc-list, .sbg-ach-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sbg-cc { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--line); }
.sbg-cc-art { width: 64px; height: 88px; border-radius: 12px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); border: 3px solid #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 26px; color: #fff; box-shadow: 0 10px 20px color-mix(in srgb, var(--c) 35%, transparent); }
.sbg-cc strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.sbg-cc em { font-style: normal; font-size: 13px; color: var(--mute); }
.sbg-ach { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); opacity: 0.55; }
.sbg-ach.is-unlocked { opacity: 1; border-color: var(--yellow); background: #fff8dc; }
.sbg-ach-icon { width: 40px; height: 40px; border-radius: 12px; background: #c9cdd6; }
.sbg-ach--uncommon .sbg-ach-icon { background: var(--green); } .sbg-ach--rare .sbg-ach-icon { background: var(--blue); } .sbg-ach--epic .sbg-ach-icon { background: var(--purple); } .sbg-ach--legendary .sbg-ach-icon { background: linear-gradient(135deg, var(--yellow), var(--red)); }
.sbg-ach strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.sbg-ach em { font-style: normal; font-size: 13px; color: var(--mute); }
.sbg-ach b { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--gold); }

/* Adventure */
.sbg-adv-deck { margin: 8px 0 18px; color: var(--mute); max-width: 60ch; }
.sbg-adv-card { padding: 22px; }
.sbg-adv-card--guest { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.sbg-adv-card--guest strong { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.sbg-adv-card.is-busy { opacity: 0.6; pointer-events: none; }
.sbg-adv-pick { display: grid; gap: 12px; }
.sbg-adv-chars { display: flex; flex-wrap: wrap; gap: 8px; }
.sbg-adv-char { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 100px; border: 2px solid var(--line2); background: #fff; color: var(--ink); cursor: pointer; font: 800 12px var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; }
.sbg-adv-char.is-on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); }
.sbg-adv-char img, .sbg-adv-char b { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--c); display: grid; place-items: center; color: #fff; }
.sbg-adv-scen { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.sbg-adv-s { display: grid; gap: 4px; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg2); color: var(--ink); text-align: left; cursor: pointer; font-family: var(--font-body); }
.sbg-adv-s.is-on { border-color: var(--yellow); background: #fff8dc; }
.sbg-adv-s strong { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.sbg-adv-s em { font-style: normal; font-size: 12px; color: var(--mute); }
.sbg-adv-run { display: grid; gap: 14px; }
.sbg-adv-panels { display: grid; gap: 10px; }
.sbg-adv-panel { padding: 14px 16px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); border-left: 6px solid var(--c); }
.sbg-adv-n { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.sbg-adv-panel p { margin: 0; font-size: 16px; line-height: 1.55; }
.sbg-adv-panel em { display: block; margin-top: 6px; font-style: normal; font-size: 13px; color: var(--mute); }
.sbg-adv-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.sbg-adv-choices .sbg-btn--choice { text-transform: none; letter-spacing: 0; font-size: 14px; }
.sbg-adv-end { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--red); }

/* Modal */
.sbg-modal { position: fixed; inset: 0; z-index: 120; background: rgba(247, 241, 230, 0.88); backdrop-filter: blur(10px); overflow-y: auto; padding: 24px; }
.sbg-modal[hidden] { display: none; }
body.sbg-modal-open { overflow: hidden; }
.sbg-modal-close { position: fixed; top: 16px; right: 16px; z-index: 2; width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff; background: var(--ink); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.sbg-modal-inner { max-width: 1040px; margin: 20px auto 60px; border-radius: 30px; background: #fff; border: 3px solid #fff; box-shadow: var(--shadow-lg); padding: 32px; color: var(--ink); font-family: var(--font-body); }
.sbg-m-head { margin-bottom: 20px; }
.sbg-m-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4.2vw, 54px); line-height: 0.98; letter-spacing: -0.02em; margin: 6px 0 6px; }
.sbg-m-meta { margin: 0; color: var(--mute); font-size: 14px; }
.sbg-m-grid { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
.sbg-m-media { position: sticky; top: 24px; display: grid; gap: 12px; }
.sbg-m-video, .sbg-m-hero { position: relative; aspect-ratio: 9 / 16; border-radius: 24px; overflow: hidden; background: var(--bg); border: 4px solid #fff; box-shadow: var(--shadow-lg); }
.sbg-m-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sbg-m-hero--char { aspect-ratio: 4 / 5; background: radial-gradient(circle at 50% 100%, color-mix(in srgb, var(--c) 30%, #fff), #fff 70%); }
.sbg-m-hero--char img { object-fit: contain; object-position: bottom; filter: drop-shadow(0 16px 16px rgba(70, 45, 20, 0.25)); }
.sbg-m-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sbg-yt-poster { position: absolute; inset: 0; border: 0; background: #000 var(--bg) center / cover no-repeat; display: grid; place-items: center; align-content: center; gap: 12px; color: #fff; cursor: pointer; font: 800 12px/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; }
.sbg-yt-poster::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.05)); }
.sbg-yt-poster span { position: relative; }
.sbg-yt-play { width: 72px; height: 72px; border-radius: 50%; background: var(--red); border: 4px solid #fff; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); position: relative; }
.sbg-yt-play::after { content: ""; position: absolute; left: 24px; top: 18px; border-left: 22px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; }
.sbg-m-altnote { margin: 0; font-size: 13px; color: var(--mute); }
.sbg-m-body { display: grid; gap: 22px; }
.sbg-m-section { display: grid; gap: 8px; }
.sbg-m-story { font-size: 16px; line-height: 1.6; color: #2b3242; }
.sbg-m-story p { margin: 0 0 12px; }
.sbg-m-chars { display: flex; flex-wrap: wrap; gap: 8px; }
.sbg-m-char { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 100px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--ink); cursor: pointer; font: 800 12px/1 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; }
.sbg-m-char img, .sbg-m-char b { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--c); display: grid; place-items: center; color: #fff; }
.sbg-m-link { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; width: 100%; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); text-align: left; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; font-family: var(--font-body); }
.sbg-m-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sbg-m-link img, .sbg-m-link-blank { width: 72px; height: 48px; object-fit: cover; border-radius: 10px; display: block; background: repeating-linear-gradient(135deg, #f1e9da 0 8px, #faf4ea 8px 16px); }
.sbg-m-link-blank.is-decision { background: linear-gradient(135deg, #fff2c4, #ffe08a); }
.sbg-m-link em { display: block; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }
.sbg-m-link strong { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.05; }
.sbg-m-link.is-locked { opacity: 0.6; border-style: dashed; }
.sbg-m-next { display: grid; gap: 8px; }
.sbg-m-chose { padding: 16px; border-radius: 16px; background: #fff8dc; border: 2px solid var(--yellow); }
.sbg-m-chose strong { font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.sbg-m-chose em { font-style: normal; font-size: 12px; color: var(--mute); }
.sbg-m-comment blockquote { margin: 0; padding: 14px 18px; border-left: 5px solid var(--yellow); background: var(--bg2); border-radius: 0 14px 14px 0; font-size: 18px; line-height: 1.4; }
.sbg-m-comment cite { font-style: normal; font-size: 13px; color: var(--mute); }
.sbg-tag { display: inline-block; justify-self: start; padding: 6px 10px; border-radius: 100px; background: var(--yellow); color: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.sbg-m-traits { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sbg-m-traits li { padding: 6px 12px; border-radius: 100px; background: var(--bg2); border: 1px solid var(--line); font-size: 13px; }
.sbg-m-locked { text-align: center; padding: 40px 0; }
.sbg-m-locked h2 { font-family: var(--font-display); font-size: 80px; margin: 10px 0; color: #c9cdd6; }
.sbg-choices--modal { margin-top: 6px; grid-template-columns: 1fr; }
.sbg-m-timeline { padding: 16px; border-radius: 18px; background: color-mix(in srgb, var(--purple) 8%, #fff); border: 2px dashed color-mix(in srgb, var(--purple) 45%, #fff); }
.sbg-m-tl-title { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin: 0; }
.sbg-tl-panel { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.sbg-tl-panel img { width: 100%; border-radius: 14px; }
.sbg-tl-panel p { margin: 0; font-size: 15px; line-height: 1.5; }
.sbg-tl-moral { margin: 6px 0 0; font-style: italic; color: var(--mute); }
.sbg-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 200; padding: 12px 18px; border-radius: 100px; background: var(--ink); color: #fff; font: 700 14px/1.3 var(--font-body); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; max-width: calc(100% - 32px); text-align: center; }
.sbg-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.sbg-toast a { color: var(--yellow); font-weight: 800; }

@media (max-width: 900px) {
    .sbg-hero { padding: 56px 0 44px; }
    .sbg-hero-cast-img { height: 50%; left: calc(68% + var(--i) * 10%); opacity: 0.9; bottom: -4%; }
    .sbg-hero-group { height: 52%; max-width: 70%; opacity: 0.95; }
    .sbg-hero.has-art::before { background: linear-gradient(180deg, rgba(255, 248, 236, 0.95) 0%, rgba(255, 248, 236, 0.85) 55%, rgba(255, 248, 236, 0.3) 100%); }
    .sbg-canvas, .sbg-map-tools { display: none; }
    .sbg-journey { display: block; }
    .sbg-decide-card { padding: 20px; }
    .sbg-player-card, .sbg-player-card--guest { grid-template-columns: 1fr; }
    .sbg-player-actions { justify-content: flex-start; }
    .sbg-board-grid, .sbg-events-grid { grid-template-columns: 1fr; }
    .sbg-battle-list li { grid-template-columns: 90px 1fr auto; }
    .sbg-adv-card--guest { flex-direction: column; align-items: flex-start; }
    .sbg-m-grid { grid-template-columns: 1fr; }
    .sbg-m-media { position: static; max-width: 320px; margin: 0 auto; }
    .sbg-modal { padding: 12px; }
    .sbg-modal-inner { padding: 22px 18px; margin: 48px auto 40px; }
    .sbg-modal-close { top: 10px; right: 10px; }
}
@media (max-width: 520px) {
    .sbg-hero-inner { max-width: 70%; }
    .sbg-hero-cast-img { height: 40%; }
    .sbg-j .sbg-node { grid-template-columns: 96px 1fr; }
    .sbg-stats li { min-width: 0; flex: 1; }
    .sbg-chapter { flex-basis: 200px; }
    .sbg-char img { height: 130px; }
}
@media (prefers-reduced-motion: reduce) { .sbg-pulse, .sbg-node--decision.is-live, .sbg-badge--history .sbg-node-badge, .sbg-hero-cast-img { animation: none; } }

/* Empty map: nothing published yet */
.sbg-map.is-empty .sbg-map-tools, .sbg-map.is-empty .sbg-journey { display: none; }
.sbg-map.is-empty .sbg-canvas { cursor: default; }
.sbg-map-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; width: min(560px, calc(100% - 32px)); padding: 30px 30px 26px; border-radius: 28px; background: rgba(255, 250, 243, 0.94); border: 3px solid #fff; box-shadow: 0 30px 70px rgba(60, 50, 40, 0.28); backdrop-filter: blur(8px); text-align: center; }
.sbg-map-empty h3 { font-family: 'Lilita One', var(--font-display); font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); line-height: 1; margin: 10px 0 10px; color: var(--ink); }
.sbg-map-empty p { margin: 0 auto; max-width: 42ch; font-size: 16px; line-height: 1.5; color: var(--mute); }
.sbg-map-empty .sbg-hero-actions { justify-content: center; margin-top: 18px; }
.sbg-map-empty-admin { display: grid; gap: 8px; justify-items: center; margin-top: 20px; padding: 14px 16px; border-radius: 18px; background: #fff3c4; border: 2px dashed var(--yellow); font-size: 13px; line-height: 1.45; color: #5c4600; }
.sbg-map-empty-admin strong { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
@media (max-width: 900px) {
    .sbg-map.is-empty { position: relative; padding: 70px 14px; background: var(--art, var(--bg2)) center / cover no-repeat; border-radius: 24px; margin: 0 16px; }
    .sbg-map.is-empty .sbg-canvas { display: none; }
    .sbg-map-empty { position: relative; left: auto; top: auto; transform: none; width: 100%; padding: 24px 18px 20px; }
}

.sbg-map-empty-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sbg-demo-ribbon { position: sticky; top: 0; z-index: 90; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 8px 16px; background: #fff3c4; border-bottom: 2px dashed var(--yellow); font-size: 13px; color: #5c4600; }
.sbg-demo-ribbon strong { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.sbg-demo-ribbon .sbg-btn { padding: 7px 12px; font-size: 11px; }
