/* ==========================================================================
   Emoji Battle — "How to Play" page. Page-scoped styles (everything under
   #eb-learn). Built entirely on the shared theme tokens in styles.css, so it
   re-themes automatically across all seven palettes.
   ========================================================================== */

#eb-learn {
    --eb-them-bg: #2b2b31;
    --eb-them-fg: #f3f3f7;
    --eb-blue-1: #2b9dff;
    --eb-blue-2: #0a7bff;
    --eb-win: 16, 185, 129;   /* emerald */
    --eb-lose: 244, 63, 94;   /* rose    */
}
html[data-theme="light"] #eb-learn,
html[data-theme="candy"] #eb-learn {
    --eb-them-bg: #e9e9eb;
    --eb-them-fg: #14172b;
}

/* --------------------------------------------------------------------------
   Shared bits. Consistent vertical rhythm makes each section feel deliberate.
   -------------------------------------------------------------------------- */
#eb-learn .eb-section { padding: 84px 0; position: relative; }
#eb-learn .eb-narrow { max-width: 880px; }
#eb-learn .eb-hero-badge {
    margin: 0 auto 20px;
    width: 68px; height: 68px;
    font-size: 2.1rem;
    position: relative; z-index: 2;
}

#eb-learn .eb-sec-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
/* the numbered step chip anchors every section to the same reading order */
#eb-learn .eb-step {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--accent-text);
    padding: 6px 14px; border-radius: 999px;
    background: var(--glass-bg); border: 1px solid var(--glass-border-hover);
    margin-bottom: 16px;
}
#eb-learn .eb-kicker {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent-text);
    display: inline-block;
    margin-bottom: 10px;
}
#eb-learn .eb-sec-head h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.1; }
#eb-learn .eb-sec-head p { color: var(--text-2); font-size: 1.06rem; margin-top: 12px; line-height: 1.55; }

/* tighten the run between hero → stats → first section */
#eb-learn .eb-stats-section { padding-top: 20px; padding-bottom: 40px; }

/* Header CTA row on the page hero */
#eb-learn .eb-hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; position: relative; z-index: 2; }

/* The download button is the page's main call to action — oversized, glowing. */
#eb-learn .eb-dl {
    height: 62px;
    padding: 0 40px;
    font-size: 1.12rem;
    gap: 12px;
    box-shadow: var(--shadow-btn-hover);
    animation: eb-dl-glow 3.2s ease-in-out infinite;
}
#eb-learn .eb-dl .eb-apple { font-size: 1.35rem; line-height: 1; margin-top: -2px; }
#eb-learn .eb-dl small { font-weight: 500; opacity: 0.85; font-size: 0.72rem; display: block; letter-spacing: 0.02em; }
#eb-learn .eb-dl .eb-dl-stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
@keyframes eb-dl-glow {
    0%, 100% { box-shadow: var(--shadow-btn); }
    50% { box-shadow: var(--shadow-btn-hover), 0 0 34px -6px var(--neon-1); }
}
#eb-learn .eb-dl-note { margin-top: 14px; font-size: 0.8rem; color: var(--text-3); }

/* Sticky download pill — keeps the primary action in view as you scroll. */
#eb-dl-sticky {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translate(-50%, 140%);
    z-index: 90;
    height: 54px;
    padding: 0 30px;
    font-size: 1rem;
    box-shadow: var(--shadow-btn-hover), 0 0 30px -8px var(--neon-1);
    transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}
#eb-dl-sticky.is-visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#eb-dl-sticky .eb-apple { font-size: 1.2rem; margin-top: -2px; }
@media (max-width: 480px) { #eb-dl-sticky { width: calc(100% - 32px); justify-content: center; } }

/* --------------------------------------------------------------------------
   Final CTA — the bottom-of-page payoff. One oversized, shimmering, bobbing
   Download button so the page ends on the primary action, above the footer.
   -------------------------------------------------------------------------- */
#eb-learn .eb-final-section { padding-top: 40px; padding-bottom: 72px; }
#eb-learn .eb-final { text-align: center; }
#eb-learn .eb-final-badge {
    margin: 0 auto 18px;
    width: 72px; height: 72px;
    font-size: 2.2rem;
}
#eb-learn .eb-final h2 { font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 700; line-height: 1.1; }
#eb-learn .eb-final > p {
    color: var(--text-2); font-size: 1.06rem; line-height: 1.55;
    max-width: 520px; margin: 14px auto 0;
}

/* the bob lives on the wrapper so the button keeps its own hover/press feel */
#eb-learn .eb-final-cta {
    display: inline-block;
    margin: 30px auto 0;
    animation: eb-dl-bob 3.4s ease-in-out infinite;
}
@keyframes eb-dl-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* oversized Download button with a continuous shimmer sweep */
#eb-learn .eb-dl-mega {
    height: 78px;
    padding: 0 54px;
    gap: 16px;
    font-size: 1.3rem;
    border-radius: 999px;
}
#eb-learn .eb-dl-mega .eb-apple { font-size: 1.7rem; margin-top: -2px; }
#eb-learn .eb-dl-mega .eb-dl-stack span:last-child { font-size: 1.32rem; font-weight: 700; }
#eb-learn .eb-dl-mega .eb-dl-stack small { font-size: 0.8rem; }
#eb-learn .eb-dl-mega::before {
    content: '';
    position: absolute;
    top: 0; left: -160%;
    width: 55%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    animation: eb-dl-shimmer 2.8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes eb-dl-shimmer {
    0% { left: -160%; }
    55%, 100% { left: 160%; }
}
@media (max-width: 420px) {
    #eb-learn .eb-final-cta { display: block; }
    #eb-learn .eb-dl-mega { height: 70px; padding: 0 28px; width: 100%; }
}

/* --------------------------------------------------------------------------
   Stat strip
   -------------------------------------------------------------------------- */
#eb-learn .eb-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding: 26px;
    border-radius: 22px;
}
#eb-learn .eb-stat { text-align: center; padding: 6px; }
#eb-learn .eb-stat b {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4.5vw, 2.3rem);
    font-weight: 700;
    background: var(--gradient-brand);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    line-height: 1;
}
#eb-learn .eb-stat span {
    display: block;
    margin-top: 7px;
    font-size: 0.8rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
@media (max-width: 560px) {
    #eb-learn .eb-stats { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------------------------------------------------------------
   Onboarding thread — iMessage phone
   -------------------------------------------------------------------------- */
#eb-learn .eb-thread-section { overflow: hidden; }
#eb-learn .eb-floaters { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
#eb-learn .eb-float {
    position: absolute;
    font-size: 2.4rem;
    opacity: 0.10;
    animation: eb-drift 14s ease-in-out infinite;
    filter: saturate(1.2);
}
@keyframes eb-drift {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-26px) rotate(8deg); }
}

#eb-learn .eb-phone {
    position: relative;
    z-index: 1;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 42px;
    padding: 12px;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-card-hover);
}
#eb-learn .eb-phone-inner {
    border-radius: 32px;
    background: var(--bg-1);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}
#eb-learn .eb-phone-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    position: relative;
}
#eb-learn .eb-phone-head::before {
    content: "";
    position: absolute;
    top: 8px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 5px; border-radius: 3px;
    background: var(--text-3); opacity: 0.35;
}
#eb-learn .eb-avatar {
    width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 1.5rem;
    background: var(--gradient-brand);
    box-shadow: 0 4px 14px -4px rgba(0,0,0,0.4);
    margin-top: 6px;
}
#eb-learn .eb-phone-name { font-weight: 600; font-size: 0.95rem; color: var(--text-1); }
#eb-learn .eb-phone-status { font-size: 0.72rem; color: var(--text-3); }

#eb-learn .eb-thread { padding: 18px 14px 22px; display: flex; flex-direction: column; gap: 3px; }

/* caption line between beats */
#eb-learn .eb-caption {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-3);
    margin: 14px auto 8px;
    max-width: 280px;
    line-height: 1.45;
}
#eb-learn .eb-caption:first-child { margin-top: 0; }

/* a message row */
#eb-learn .eb-msg {
    display: flex;
    margin: 2px 0;
    opacity: 0;
    transform: translateY(16px) scale(0.9);
    transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
}
#eb-learn .eb-msg.in { opacity: 1; transform: none; }
#eb-learn .eb-you { justify-content: flex-end; }
#eb-learn .eb-them { justify-content: flex-start; }
#eb-learn .eb-sys { justify-content: center; }

#eb-learn .eb-bubble {
    max-width: 76%;
    padding: 9px 14px;
    border-radius: 20px;
    font-size: 0.98rem;
    line-height: 1.35;
    position: relative;
    word-break: break-word;
}
#eb-learn .eb-you .eb-bubble {
    background: linear-gradient(180deg, var(--eb-blue-1), var(--eb-blue-2));
    color: #fff;
    border-bottom-right-radius: 6px;
}
#eb-learn .eb-them .eb-bubble {
    background: var(--eb-them-bg);
    color: var(--eb-them-fg);
    border-bottom-left-radius: 6px;
}
/* team bubbles read as big emoji */
#eb-learn .eb-bubble.eb-team { font-size: 1.9rem; letter-spacing: 4px; padding: 10px 16px; }
#eb-learn .eb-bubble.eb-hit { font-size: 0.9rem; font-weight: 600; }

/* emphasized (combo) bubble glows */
#eb-learn .eb-msg.eb-pop .eb-bubble {
    background: var(--gradient-cta);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.15), 0 8px 26px -6px rgba(0,0,0,0.5);
    font-weight: 600;
}
#eb-learn .eb-msg.eb-pop.in .eb-bubble { animation: eb-combo-pulse 1.6s ease-in-out 0.2s 2; }
@keyframes eb-combo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* system / result pill */
#eb-learn .eb-sys .eb-bubble {
    background: transparent;
    color: var(--text-3);
    font-size: 0.82rem;
    text-align: center;
    border: 1px dashed var(--glass-border-hover);
    border-radius: 14px;
}
#eb-learn .eb-sys .eb-win-pill {
    color: var(--live-text);
    border-color: rgba(var(--eb-win), 0.5);
    font-weight: 600;
}

/* tapback reaction chip */
#eb-learn .eb-tapback {
    position: absolute;
    top: -12px; left: -10px;
    background: var(--eb-them-bg);
    border-radius: 50%;
    width: 26px; height: 26px;
    display: grid; place-items: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 1.5px solid var(--bg-1);
}
#eb-learn .eb-you .eb-tapback { left: auto; right: -10px; }

/* delivered / read receipt */
#eb-learn .eb-receipt { text-align: right; font-size: 0.68rem; color: var(--text-3); padding: 2px 6px 0; }

/* --------------------------------------------------------------------------
   Rules overview cards
   -------------------------------------------------------------------------- */
#eb-learn .eb-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
#eb-learn .eb-rule { padding: 26px 22px; border-radius: 20px; }
#eb-learn .eb-rule .eb-rule-ico { font-size: 2rem; }
#eb-learn .eb-rule h3 { font-size: 1.15rem; font-weight: 700; margin: 12px 0 8px; }
#eb-learn .eb-rule p { color: var(--text-2); font-size: 0.95rem; line-height: 1.55; }
#eb-learn .eb-rule .eb-rule-n {
    font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
    color: var(--accent-text); text-transform: uppercase;
}
@media (max-width: 800px) { #eb-learn .eb-rules { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Wiki: one section, three tabs
   -------------------------------------------------------------------------- */
#eb-learn .eb-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
}
#eb-learn .eb-tab {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid var(--glass-border-hover);
    background: var(--glass-bg);
    color: var(--text-2);
    font-family: var(--font-body);
    font-size: 1rem; font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
#eb-learn .eb-tab .eb-tab-e { font-size: 1.25rem; line-height: 1; }
#eb-learn .eb-tab em {
    font-style: normal;
    font-family: var(--font-mono); font-size: 0.7rem;
    padding: 2px 7px; border-radius: 999px;
    background: var(--bg-2); color: var(--text-3);
    border: 1px solid var(--glass-border);
}
#eb-learn .eb-tab:hover { color: var(--text-1); border-color: var(--neon-1); transform: translateY(-2px); }
#eb-learn .eb-tab.is-active {
    background: var(--gradient-cta); color: #fff; border-color: transparent;
    box-shadow: var(--shadow-btn);
}
#eb-learn .eb-tab.is-active em { background: rgba(255,255,255,0.22); color: #fff; border-color: transparent; }
#eb-learn .eb-panel[hidden] { display: none; }
#eb-learn .eb-panel { animation: eb-fade 0.35s ease; }
@keyframes eb-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

#eb-learn .eb-ring-tip { font-size: 0.85rem; color: var(--text-3); margin-top: 18px; }

/* --------------------------------------------------------------------------
   Interactive type ring
   -------------------------------------------------------------------------- */
#eb-learn .eb-ring-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}
@media (max-width: 820px) { #eb-learn .eb-ring-layout { grid-template-columns: 1fr; gap: 28px; } }

#eb-learn .eb-ring-stage { position: relative; width: 100%; max-width: 440px; margin: 0 auto; aspect-ratio: 1; }
#eb-learn #eb-ring-svg { width: 100%; height: 100%; overflow: visible; }

#eb-learn .eb-node { cursor: pointer; }
#eb-learn .eb-node-bg {
    fill: var(--glass-bg-strong);
    stroke: var(--glass-border-hover);
    stroke-width: 1.5;
    transition: fill 0.25s ease, stroke 0.25s ease, transform 0.25s ease;
}
#eb-learn .eb-node-glyph { font-size: 26px; pointer-events: none; }
#eb-learn .eb-node:hover .eb-node-bg,
#eb-learn .eb-node:focus-visible .eb-node-bg { stroke: var(--neon-1); }
#eb-learn .eb-node:focus { outline: none; }
#eb-learn .eb-node.is-sel .eb-node-bg {
    fill: var(--neon-1);
    stroke: #fff;
    stroke-width: 2;
    transform: scale(1.14);
    transform-box: fill-box;
    transform-origin: center;
}
#eb-learn .eb-node.is-win .eb-node-bg { fill: rgba(var(--eb-win), 0.22); stroke: rgba(var(--eb-win), 0.7); }
#eb-learn .eb-node.is-lose .eb-node-bg { fill: rgba(var(--eb-lose), 0.16); stroke: rgba(var(--eb-lose), 0.6); }

#eb-learn .eb-ring-hub {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    width: 46%;
}
#eb-learn .eb-hub-glyph { font-size: 2.6rem; line-height: 1; }
#eb-learn .eb-hub-name { font-weight: 700; font-size: 1.05rem; margin-top: 4px; color: var(--text-1); }
#eb-learn .eb-hub-line {
    margin-top: 8px; font-size: 0.74rem; color: var(--text-3);
    display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: center;
}
#eb-learn .eb-win-dot, #eb-learn .eb-lose-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
#eb-learn .eb-win-dot { background: rgb(var(--eb-win)); }
#eb-learn .eb-lose-dot { background: rgb(var(--eb-lose)); }
#eb-learn .eb-sep { opacity: 0.5; }

#eb-learn .eb-ring-copy h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 12px; }
#eb-learn .eb-ring-copy p { color: var(--text-2); line-height: 1.6; margin-bottom: 12px; }
#eb-learn .eb-ring-copy .eb-legend { display: flex; gap: 18px; font-size: 0.85rem; color: var(--text-3); margin-top: 6px; }
#eb-learn .eb-ring-copy .eb-legend span { display: inline-flex; align-items: center; gap: 7px; }

/* --------------------------------------------------------------------------
   Play-a-round battle simulator
   -------------------------------------------------------------------------- */
#eb-learn .eb-sim { padding: 28px; border-radius: 24px; }
#eb-learn #eb-sim-draft.is-done { opacity: 0.5; pointer-events: none; filter: grayscale(0.3); transition: opacity 0.4s ease; }

#eb-learn .eb-sim-vs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 26px;
}
#eb-learn .eb-sim-side { display: flex; flex-direction: column; gap: 10px; align-items: center; }
#eb-learn .eb-sim-vs-mark {
    font-family: var(--font-display); font-weight: 700;
    color: var(--text-3); font-size: 1.15rem;
}
#eb-learn .eb-sim-label {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-3); text-align: center; display: block;
}

/* team slots */
#eb-learn .eb-team-slots { display: flex; gap: 8px; justify-content: center; }
#eb-learn .eb-slot {
    width: 58px; height: 66px; border-radius: 14px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 1.5px dashed var(--glass-border-hover);
    color: var(--text-3); font-family: var(--font-mono);
    position: relative; cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s ease;
}
#eb-learn .eb-slot.filled {
    border-style: solid; border-color: var(--neon-1);
    background: var(--glass-bg); cursor: pointer;
}
#eb-learn .eb-slot.filled:hover { transform: translateY(-2px); }

/* fighter chips */
#eb-learn .eb-fchip {
    display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 10px; border-radius: 14px;
    background: var(--glass-bg); border: 1px solid var(--glass-border-hover);
    font-family: var(--font-body);
}
#eb-learn .eb-fchip-e { font-size: 1.7rem; line-height: 1; }
#eb-learn .eb-fchip-p {
    font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; color: var(--text-2);
}
#eb-learn .eb-fchip.is-rival { padding: 8px 12px; }
#eb-learn .eb-fchip-meta {
    font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3);
    display: flex; align-items: center; gap: 5px;
}
#eb-learn .eb-fchip-meta b { font-family: var(--font-mono); color: var(--accent-text); font-size: 0.78rem; }
#eb-learn .eb-front {
    position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
    font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.06em;
    background: var(--gradient-cta); color: #fff; border-radius: 999px; padding: 1px 7px;
}

#eb-learn .eb-roster {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    gap: 10px; margin: 12px 0 22px;
}
#eb-learn button.eb-fchip { cursor: pointer; transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
#eb-learn button.eb-fchip:hover { transform: translateY(-3px); border-color: var(--neon-1); }
#eb-learn button.eb-fchip.is-picked {
    border-color: transparent; background: var(--gradient-cta);
    box-shadow: var(--shadow-btn);
}
#eb-learn button.eb-fchip.is-picked .eb-fchip-p,
#eb-learn button.eb-fchip.is-picked .eb-fchip-meta,
#eb-learn button.eb-fchip.is-picked .eb-fchip-meta b { color: #fff; }

#eb-learn .eb-sim-actions {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
#eb-learn .eb-sim-hint { color: var(--text-3); font-size: 0.88rem; flex: 1 1 200px; }
#eb-learn #eb-sim-go:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.4); }

/* battle log reuses the chat bubble reveal */
#eb-learn .eb-sim-log { display: flex; flex-direction: column; gap: 3px; margin-top: 22px; }
#eb-learn .eb-sim-log .eb-bubble.eb-hit { font-size: 0.92rem; }

#eb-learn .eb-sim-outro {
    margin-top: 24px; text-align: center;
    opacity: 0; transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s var(--ease-out, ease);
}
#eb-learn .eb-sim-outro.in { opacity: 1; transform: none; }
#eb-learn .eb-sim-verdict {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    margin-bottom: 10px;
    background: var(--gradient-brand);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
#eb-learn .eb-sim-outro p { color: var(--text-2); max-width: 460px; margin: 0 auto 20px; line-height: 1.55; }
#eb-learn .eb-sim-outro .eb-hero-cta { margin-top: 0; }

@media (max-width: 560px) {
    #eb-learn .eb-sim-vs { grid-template-columns: 1fr; }
    #eb-learn .eb-sim-actions { flex-direction: column; align-items: stretch; }
    #eb-learn #eb-sim-go { width: 100%; }
}

/* --------------------------------------------------------------------------
   Codex — shared toolbar, grids, cards
   -------------------------------------------------------------------------- */
#eb-learn .eb-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
#eb-learn .eb-search {
    flex: 1 1 240px;
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-hover);
}
#eb-learn .eb-search input {
    flex: 1; border: none; background: transparent; outline: none;
    color: var(--text-1); font-family: var(--font-body); font-size: 0.95rem;
}
#eb-learn .eb-search input::placeholder { color: var(--text-3); }
#eb-learn .eb-search .eb-mag { opacity: 0.6; }

#eb-learn .eb-filters { display: flex; flex-wrap: wrap; gap: 8px; }
#eb-learn .eb-filters button {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--glass-border-hover);
    background: var(--glass-bg);
    color: var(--text-2);
    font-family: var(--font-body);
    font-size: 0.82rem; font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
#eb-learn .eb-filters button:hover { color: var(--text-1); border-color: var(--neon-1); }
#eb-learn .eb-filters button.is-active {
    background: var(--gradient-cta); color: #fff; border-color: transparent;
}

#eb-learn .eb-count { font-size: 0.82rem; color: var(--text-3); font-family: var(--font-mono); margin-bottom: 16px; }

#eb-learn .eb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}
#eb-learn .eb-card {
    padding: 16px 16px 18px;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
#eb-learn .eb-card:hover { transform: translateY(-3px); border-color: var(--glass-border-hover); box-shadow: var(--shadow-card); }
#eb-learn .eb-card h4 { font-size: 1rem; font-weight: 700; margin: 8px 0 6px; color: var(--text-1); }
#eb-learn .eb-card p { font-size: 0.86rem; color: var(--text-2); line-height: 1.5; }
#eb-learn .eb-card.hidden { display: none; }

/* combos use content-visibility to stay cheap at 800+ nodes */
#eb-learn .eb-combo { content-visibility: auto; contain-intrinsic-size: 160px; }
#eb-learn .eb-combo-recipe { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#eb-learn .eb-glyph { font-size: 1.7rem; line-height: 1; }
#eb-learn .eb-arrow, #eb-learn .eb-plus { color: var(--text-3); font-weight: 600; font-size: 0.9rem; }
#eb-learn .eb-order-tag {
    margin-left: auto;
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--accent-text);
    border: 1px solid var(--glass-border-hover); border-radius: 6px; padding: 2px 6px;
}

/* specials read emoji-first: big glyph up top, timing badge beside it */
#eb-learn .eb-special { display: flex; flex-direction: column; }
#eb-learn .eb-sp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#eb-learn .eb-sp-emoji {
    font-size: 2rem; line-height: 1;
    width: 48px; height: 48px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--bg-2); border: 1px solid var(--glass-border);
}
#eb-learn .eb-special h4 { margin-top: 12px; }

/* specials timing badges */
#eb-learn .eb-timing {
    display: inline-block;
    font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 3px 9px; border-radius: 999px;
    border: 1px solid transparent;
}
#eb-learn .eb-t-onPlay   { color: #22c55e; background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.3); }
#eb-learn .eb-t-before   { color: #38bdf8; background: rgba(56,189,248,0.12); border-color: rgba(56,189,248,0.3); }
#eb-learn .eb-t-during   { color: #a78bfa; background: rgba(167,139,250,0.14); border-color: rgba(167,139,250,0.3); }
#eb-learn .eb-t-after    { color: #fb923c; background: rgba(251,146,60,0.12); border-color: rgba(251,146,60,0.3); }
#eb-learn .eb-t-onDefeat { color: #f43f5e; background: rgba(244,63,94,0.12); border-color: rgba(244,63,94,0.3); }
#eb-learn .eb-t-onTurnEnd{ color: #eab308; background: rgba(234,179,8,0.12); border-color: rgba(234,179,8,0.3); }

/* ==========================================================================
   Cinematic motion layer. Makes the page feel alive: a drifting aurora
   backdrop, a cursor spotlight, a staggered hero entrance, flowing gradient
   text, depth parallax, and magnetic CTAs. Everything is transform/opacity/
   filter only, driven by theme tokens + the shared --scroll-y variable, and
   fully stood down under prefers-reduced-motion (see block below).
   ========================================================================== */

/* Aurora — three theme-coloured blobs slowly drift behind the hero.
   Blur lives on each blob (its own compositor layer) so the drift stays cheap. */
#eb-learn #eb-hero { isolation: isolate; }
#eb-learn .eb-aurora {
    position: absolute;
    inset: -18% -8% -12%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    transform: translateY(calc(var(--scroll-y, 0) * 0.05px));
}
html[data-theme="light"] #eb-learn .eb-aurora,
html[data-theme="candy"] #eb-learn .eb-aurora { opacity: 0.38; }
#eb-learn .eb-aurora span {
    position: absolute;
    width: 48%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    filter: blur(54px);
    will-change: transform;
}
#eb-learn .eb-aurora span:nth-child(1) {
    top: 0; left: 4%;
    background: radial-gradient(circle at 50% 50%, var(--neon-1), transparent 68%);
    animation: eb-aurora-a 19s ease-in-out infinite;
}
#eb-learn .eb-aurora span:nth-child(2) {
    top: 6%; right: 2%;
    background: radial-gradient(circle at 50% 50%, var(--neon-3), transparent 68%);
    animation: eb-aurora-b 23s ease-in-out infinite;
}
#eb-learn .eb-aurora span:nth-child(3) {
    bottom: -8%; left: 32%;
    background: radial-gradient(circle at 50% 50%, var(--neon-2), transparent 68%);
    animation: eb-aurora-c 27s ease-in-out infinite;
}
@keyframes eb-aurora-a { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(16%, 9%) scale(1.18); } }
@keyframes eb-aurora-b { 0%, 100% { transform: translate(0, 0) scale(1.06); } 50% { transform: translate(-13%, 11%) scale(0.9); } }
@keyframes eb-aurora-c { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(9%, -13%) scale(1.22); } }

/* Cursor spotlight — a soft accent light that tracks the pointer over the hero */
#eb-learn .eb-spotlight {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.45s ease;
    background: radial-gradient(240px circle at var(--sx, 50%) var(--sy, 50%), var(--neon-1), transparent 62%);
}
#eb-learn #eb-hero.eb-spot-on .eb-spotlight { opacity: 0.14; }

/* Staggered hero entrance — each element focus-pulls up into place on load.
   The shown state restores each item's own scroll parallax so it survives. */
html.js-ready #eb-learn #eb-hero .eb-hero-badge,
html.js-ready #eb-learn #eb-hero h1,
html.js-ready #eb-learn #eb-hero > p,
html.js-ready #eb-learn #eb-hero .eb-hero-cta,
html.js-ready #eb-learn #eb-hero .eb-dl-note {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(10px);
    transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out), filter 0.85s var(--ease-out);
}
html.js-ready #eb-learn #eb-hero.eb-in .eb-hero-badge,
html.js-ready #eb-learn #eb-hero.eb-in .eb-hero-cta,
html.js-ready #eb-learn #eb-hero.eb-in .eb-dl-note {
    opacity: 1; transform: none; filter: blur(0);
}
html.js-ready #eb-learn #eb-hero.eb-in h1,
html.js-ready #eb-learn #eb-hero.eb-in > p {
    opacity: 1; filter: blur(0);
    transform: translateY(calc(var(--scroll-y, 0) * -0.05px)); /* restore parallax */
}
html.js-ready #eb-learn #eb-hero .eb-hero-badge { transition-delay: 0.05s; }
html.js-ready #eb-learn #eb-hero h1 { transition-delay: 0.16s; }
html.js-ready #eb-learn #eb-hero > p { transition-delay: 0.30s; }
html.js-ready #eb-learn #eb-hero .eb-hero-cta { transition-delay: 0.44s; }
html.js-ready #eb-learn #eb-hero .eb-dl-note { transition-delay: 0.56s; }

/* Flowing gradient text — the clipped brand gradient drifts, so headings shimmer */
#eb-learn .text-gradient,
#eb-learn .eb-stat b,
#eb-learn .eb-sim-verdict {
    background-size: 220% 220%;
    animation: eb-grad-flow 8s ease-in-out infinite;
}
@keyframes eb-grad-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Depth parallax on the floating emoji — `translate` composes with the drift
   `transform` so each layer scrolls at its own speed for a sense of depth. */
#eb-learn .eb-float { translate: 0 calc(var(--scroll-y, 0) * var(--depth, 0.06) * -1px); }

/* Magnetic CTAs lean toward the cursor via the standalone `translate` property,
   leaving the button's own hover/press transforms untouched. Snap-back eases. */
#eb-learn .eb-dl,
#eb-learn .eb-dl-mega { transition: translate 0.35s var(--ease-out); }

/* A touch more cinema on the section reveals: focus-pull the blur out too */
html.js-ready #eb-learn [data-reveal],
html.js-ready #eb-learn [data-reveal-children] > * {
    filter: blur(7px);
    transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out), filter var(--dur-reveal) var(--ease-out);
}
html.js-ready #eb-learn [data-reveal].is-revealed,
html.js-ready #eb-learn [data-reveal-children].is-revealed > * { filter: none; }

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    #eb-learn #eb-hero .eb-aurora span { animation: none; }
    #eb-learn .eb-aurora { transform: none; }
    #eb-learn .eb-spotlight { display: none; }
    #eb-learn .text-gradient,
    #eb-learn .eb-stat b,
    #eb-learn .eb-sim-verdict { animation: none; }
    #eb-learn .eb-float { translate: none; }
    html.js-ready #eb-learn #eb-hero .eb-hero-badge,
    html.js-ready #eb-learn #eb-hero h1,
    html.js-ready #eb-learn #eb-hero > p,
    html.js-ready #eb-learn #eb-hero .eb-hero-cta,
    html.js-ready #eb-learn #eb-hero .eb-dl-note {
        opacity: 1; transform: none; filter: none; transition: none;
    }
    html.js-ready #eb-learn [data-reveal],
    html.js-ready #eb-learn [data-reveal-children] > * { filter: none; }
    #eb-learn .eb-msg { opacity: 1; transform: none; transition: none; }
    #eb-learn .eb-float { animation: none; }
    #eb-learn .eb-msg.eb-pop.in .eb-bubble { animation: none; }
    #eb-learn .eb-dl { animation: none; }
    #eb-learn .eb-final-cta { animation: none; }
    #eb-learn .eb-dl-mega::before { animation: none; display: none; }
    #eb-learn .eb-panel { animation: none; }
    #eb-learn .eb-sim-outro { transition: opacity 0.3s ease; }
    #eb-dl-sticky { transition: opacity 0.3s ease; }
}
