/* ============================================================================
   gachapon.css  —  🎰 The Capsule Machine (mode-based random picker) styling (.gac-*)
   A gachapon dome of capsules; pick a mode, turn the knob, one capsule drops and
   cracks open. Self-contained. Scene colours live in the SVG; this styles the
   mode chips, motion, controls and the SEO section.
   ============================================================================ */
.gac-stage { position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 22px 55px -22px rgba(30, 12, 16, .7); background: radial-gradient(120% 90% at 50% 0%, #33405c, #171d2b); padding: 12px 10px 8px; }
.gac-svg { display: block; width: min(320px, 82%); height: auto; margin: 0 auto; overflow: visible; }
/* The scene is driven per-frame by JS setAttribute('transform', …). site.css
   applies `transition: all` broadly, which would animate the capsule/balls
   BETWEEN frames — the capsule slides in from the SVG origin on the first move
   and smears during a spin. Kill transitions on the scene (the knob uses a CSS
   @keyframes animation, which `transition:none` does not touch). */
.gac-svg, .gac-svg * { transition: none !important; }

.gac-ball-e, .gac-cap-e { text-anchor: middle; dominant-baseline: middle; font-family: system-ui, "Segoe UI Emoji", "Apple Color Emoji", sans-serif; font-weight: 800; fill: #23283a; }
/* the icon in the cracked-open capsule — larger so it reads clearly on reveal */
.gac-cap-e { font-size: 40px; }
/* a WORD item (name/colour/custom) revealed in full when the capsule cracks — white
   with a dark outline (paint-order:stroke) so it reads over the machine on any colour;
   font-size is set inline by the engine, shrink-to-fit for length. */
.gac-cap-name { text-anchor: middle; dominant-baseline: middle; font-family: system-ui, "Segoe UI", sans-serif; font-weight: 800; fill: #fff; paint-order: stroke; stroke: rgba(20, 12, 14, .6); stroke-width: 3.5px; stroke-linejoin: round; }
.gac-marq { text-anchor: middle; fill: #fbbf24; font-size: 16px; font-weight: 800; letter-spacing: 3px; font-family: system-ui, sans-serif; }
.gac-knob-t { text-anchor: middle; fill: #6b7280; font-size: 13px; font-weight: 800; letter-spacing: 1px; font-family: system-ui, sans-serif; }
.gac-knob { cursor: pointer; }
/* Pivot on the arm's OWN centre (its bbox centre sits on the knob at 240,356).
   With transform-box:fill-box, transform-origin is relative to the element's own
   box — 240px 356px there is FAR outside the tiny arm, so it swung around a
   distant point ("flew in a circle"). 50% 50% turns it in place like a crank. */
.gac-knob-arm { transform-box: fill-box; transform-origin: 50% 50%; }
.gac-knob.gac-turning .gac-knob-arm { animation: gacTurn 1.4s cubic-bezier(.4,0,.2,1); }
@keyframes gacTurn { from { transform: rotate(0); } to { transform: rotate(340deg); } }
.gac-tray.gac-won { filter: drop-shadow(0 0 10px rgba(255,220,120,.6)); }

/* mode chips — swap the whole capsule set */
.gac-modes-wrap { text-align: center; }
.gac-modes-lbl { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--theme-muted, #6b7280); margin: 12px 0 8px; }
.gac-modes { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin: 0 auto 4px; max-width: 560px; }
.gac-mode { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13.5px; font-weight: 650; padding: 7px 13px; border-radius: 11px;
    background: var(--theme-surface, #fff); color: var(--theme-text, #1a1a2e); border: 1.5px solid var(--theme-border, #dfe4ee);
    transition: transform .12s ease, border-color .15s, background .15s, box-shadow .15s; }
.gac-mode .gac-mode-e { font-size: 15px; line-height: 1; }
.gac-mode:hover { transform: translateY(-2px); border-color: var(--gac-accent, #e23744); }
.gac-mode.is-on { background: var(--gac-accent, #e23744); border-color: var(--gac-accent, #e23744); color: #fff; box-shadow: 0 7px 18px -6px var(--gac-accent, #e23744); }
.gac-mode:focus-visible { outline: 3px solid color-mix(in srgb, var(--gac-accent, #e23744) 55%, transparent); outline-offset: 2px; }

.gac-count-wrap { text-align: center; margin-top: 8px; min-height: 20px; }
.gac-count { font-size: 12.5px; color: var(--theme-muted, #5b6470); }
.gac-status { display: block; font-size: 12.5px; color: #e2b6bc; min-height: 16px; }

.gac-pickbtn-wrap { text-align: center; }
.gac-pickbtn-main {
    display: inline-flex; align-items: center; gap: 8px; margin: 14px auto 0; font-size: 15px; font-weight: 800; color: #fff;
    padding: 13px 34px; border-radius: 14px; border: 0; cursor: pointer; letter-spacing: .4px;
    background: linear-gradient(135deg, var(--gac-grad-a, #e6394a), var(--gac-grad-b, #b01e2c));
    box-shadow: 0 12px 24px -8px var(--gac-accent, #e23744), inset 0 1px 0 rgba(255,255,255,.18);
    transition: transform .12s ease, filter .15s;
}
.gac-pickbtn-main:hover { transform: translateY(-2px); filter: brightness(1.05); }
.gac-pickbtn-main:disabled, .gac-pickbtn-main.is-busy { opacity: .6; cursor: default; transform: none; filter: grayscale(.2); }

.gac-effects { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; font-size: 13px; color: var(--theme-text, #1a1a2e); justify-content: center; }
.gac-effects label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.gac-items-ta { width: 100%; min-height: 210px; font-family: monospace; font-size: .9rem; line-height: 1.55; border-radius: 10px; border: 1px solid var(--theme-border, #d7dbe0); background: var(--theme-bg, #fff); color: var(--theme-text, #1a1a2e); padding: 10px 12px; resize: vertical; }
.gac-items-ta:focus { outline: 2px solid var(--gac-accent, #e23744); outline-offset: 1px; border-color: transparent; }

.gac-modal-emoji { font-size: 60px; line-height: 1; }

.page-gac-scope {
    --wsp-result-accent: var(--gac-accent, #e23744);
    --wsp-result-grad: linear-gradient(135deg, var(--gac-grad-a, #e6394a), var(--gac-grad-b, #b01e2c));
    --wsp-result-plate: color-mix(in srgb, var(--gac-accent, #e23744) 12%, #fff);
}

/* ── SEO content (.gac-content) — type scale from .content-guide; colour only ── */
.gac-content { color: var(--theme-text, #1a1a2e); background: var(--theme-bg, #fff); padding: 3.25rem 0 3.5rem; margin-top: 1rem; border-top: 1px solid var(--theme-border, #e9ecef); }
.gac-inner { max-width: 860px; margin: 0 auto; padding: 0 1rem; }
.gac-content h2, .gac-content h3 { color: var(--theme-text, #1a1a2e); }
.gac-content p, .gac-content li { color: var(--theme-muted, #5b6470); }
.gac-content strong { color: var(--theme-text, #1a1a2e); }
.gac-content a { color: #c62a38; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.gac-kicker-chip { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, #e6394a, #b01e2c); border-radius: 999px; padding: .3rem .85rem; margin-bottom: .95rem; }
.gac-content .gac-lead { font-size: 1.2rem; line-height: 1.7; color: var(--theme-text, #1a1a2e); margin-bottom: 1.25rem; }
.gac-section { margin-top: 2.9rem; }
.gac-content .table { font-size: 1rem; }
.gac-content .table thead th { text-transform: uppercase; letter-spacing: .05em; font-size: .74rem; font-weight: 800; color: #fff; background: #c62a38; padding: .7rem 1rem; }
.gac-content .table tbody td { padding: .6rem 1rem; border-bottom: 1px solid var(--theme-border, #e9ecef); vertical-align: top; }
.gac-content .table tbody td:first-child { font-weight: 700; color: var(--theme-text, #1a1a2e); white-space: nowrap; }
.gac-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.gac-pair-card { background: var(--theme-surface, #f8f9fa); border: 1px solid var(--theme-border, #e9ecef); border-radius: 12px; padding: 1rem 1.1rem; border-top: 3px solid #e6394a; }
.gac-pair-card h3 { margin-top: 0 !important; font-size: 1.02rem !important; } .gac-pair-card p:last-child { margin-bottom: 0; font-size: .92rem; }
.gac-faq { margin-top: 1.4rem; }
.gac-faq .accordion-item { background: transparent; border: 0; border-bottom: 1px solid var(--theme-border, #e9ecef); }
.gac-faq .accordion-button { background: transparent; color: var(--theme-text, #1a1a2e); font-weight: 600; padding-left: 0; padding-right: 2.5rem; box-shadow: none; }
.gac-faq .accordion-button:not(.collapsed) { color: #c62a38; background: transparent; }
.gac-faq .accordion-button:focus { box-shadow: none; }
.gac-faq .accordion-body { padding-left: 0; color: var(--theme-muted, #5b6470); }
@media (max-width: 767.98px) { .gac-pair { grid-template-columns: 1fr; } }
body[data-theme="high-contrast"] .gac-content p, body[data-theme="high-contrast"] .gac-content li, body[data-theme="high-contrast"] .gac-content .gac-lead { color: rgba(255,255,255,.84); }
body[data-theme="high-contrast"] .gac-content h2, body[data-theme="high-contrast"] .gac-content h3 { color: #fff; }
