/* Sandboxels-specific additions layered on top of the existing cream/pastel system. */

.sandboxels-page .language-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1.5px solid rgba(55, 39, 51, .16);
  border-radius: 12px;
  background: rgba(255, 253, 248, .92);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.sandboxels-home .topbar { padding-bottom: 12px; }
.sandboxels-home .tool-hero { padding-top: 62px; }
.sandboxels-hero .tool-hero-content { max-width: 930px; }
.sandboxels-hero h1 { max-width: 920px; margin-inline: auto; }
.sandboxels-hero p { max-width: 760px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.unofficial-note { margin-top: 20px !important; font-size: 13px !important; color: var(--muted); }
.unofficial-note strong { color: var(--ink); }

.section-heading { max-width: 780px; margin: 0 auto 22px; text-align: center; }
.compact-heading { margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 12px; }
.section-heading p { color: var(--muted); line-height: 1.7; }
.section-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 950; letter-spacing: .09em; text-transform: uppercase; }
.section-kicker::before { content: ""; width: 18px; height: 6px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--mint); }

.sandboxels-workbench-section { padding: 18px 0 48px; }
.sandboxels-tool-shell { overflow: hidden; border: 2px solid #2c2d3a; border-radius: 28px; background: #171820; box-shadow: 10px 11px 0 rgba(55,39,51,.16); color: #f7f3e9; }
.sandboxels-tool-compact { margin-top: 12px; }
.tool-shell-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border-bottom: 1px solid rgba(255,255,255,.11); background: linear-gradient(180deg, #252733, #1b1c25); }
.tool-shell-topbar strong { display: block; color: #fff7df; font-size: 16px; letter-spacing: .01em; }
.tool-shell-eyebrow { display: block; margin-bottom: 4px; color: #a9a7b5; font-family: var(--mono); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.tool-live-status { display: inline-flex; align-items: center; gap: 8px; color: #b6b5c1; font-family: var(--mono); font-size: 11px; font-weight: 800; white-space: nowrap; }
.live-dot { width: 9px; height: 9px; border: 1px solid #0c1b13; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(78,223,166,.12); }
.tool-mode-tabs { display: flex; gap: 8px; padding: 13px 18px; border-bottom: 1px solid rgba(255,255,255,.11); background: #20212b; }
.tool-mode-tab { appearance: none; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 9px 14px; background: #292a36; color: #c6c4ce; cursor: pointer; font: inherit; font-family: var(--mono); font-size: 11px; font-weight: 900; letter-spacing: .02em; transition: transform .18s ease, background .18s ease, color .18s ease; }
.tool-mode-tab:hover { transform: translateY(-1px); color: #fff; }
.tool-mode-tab.is-active { border-color: #ffd45f; background: #ffd45f; color: #2d2430; box-shadow: 3px 3px 0 rgba(0,0,0,.3); }
.tool-workarea { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; padding: 14px; background: #111218; }
.tool-panel-mode { min-width: 0; }
.tool-panel-mode[hidden] { display: none; }
.pixel-canvas-frame { overflow: hidden; border: 1px solid #454756; border-radius: 18px; background: #0d0e13; box-shadow: 0 8px 18px rgba(0,0,0,.28); }
.pixel-canvas-header { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 12px; border-bottom: 1px solid #323441; color: #b7b5c0; font-family: var(--mono); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.window-lights { display: inline-flex; gap: 5px; }
.window-lights i { width: 7px; height: 7px; display: block; border: 1px solid #171820; border-radius: 50%; background: var(--pink); }
.window-lights i:nth-child(2) { background: var(--sun); }
.window-lights i:nth-child(3) { background: var(--mint); }
.canvas-coordinates { margin-left: auto; color: #777887; }
.sandboxels-canvas { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; image-rendering: pixelated; cursor: crosshair; background: #11131b; }
.canvas-caption { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; color: #91909e; font-family: var(--mono); font-size: 10px; line-height: 1.4; }
.canvas-pixel-label { color: #626370; white-space: nowrap; }
.canvas-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.pixel-button { appearance: none; border: 1px solid #565866; border-radius: 10px; padding: 9px 11px; background: #262733; color: #efedf1; cursor: pointer; font: inherit; font-family: var(--mono); font-size: 11px; font-weight: 900; transition: transform .18s ease, background .18s ease, color .18s ease; }
.pixel-button:hover { transform: translateY(-2px); background: #ffd45f; color: #312530; }
.tool-side-rail { display: flex; min-width: 0; flex-direction: column; gap: 12px; }
.selected-element-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px; border: 1px solid #4d4e5c; border-radius: 15px; background: #252632; }
.selected-element-swatch { width: 42px; height: 42px; border: 2px solid #111218; border-radius: 9px; background: #d8b06a; box-shadow: 3px 3px 0 rgba(0,0,0,.25); }
.selected-element-card strong { display: block; overflow: hidden; color: #fff5da; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.selected-element-card [data-selected-meta] { display: block; margin-top: 4px; color: #a5a3b1; font-family: var(--mono); font-size: 10px; }
.element-picker { min-height: 0; padding: 13px; border: 1px solid #40414e; border-radius: 15px; background: #1e1f28; }
.picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; color: #efedf1; font-size: 12px; }
.picker-heading span { color: #858492; font-family: var(--mono); font-size: 10px; }
.picker-search, .element-search-input { width: 100%; min-height: 38px; border: 1px solid #555765; border-radius: 10px; outline: none; background: #13141a; color: #fff; padding: 8px 10px; font: inherit; font-size: 13px; }
.picker-search::placeholder, .element-search-input::placeholder { color: #777684; }
.picker-search:focus, .element-search-input:focus { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(255,212,95,.12); }
.element-chip-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 248px; margin-top: 10px; overflow-y: auto; padding-right: 2px; }
.element-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #444652; border-radius: 999px; padding: 6px 8px; background: #2a2b37; color: #cccbd3; cursor: pointer; font: inherit; font-size: 10px; font-weight: 800; }
.element-chip::before { content: ""; width: 8px; height: 8px; border: 1px solid #16171d; border-radius: 3px; background: var(--element-color, #d8b06a); }
.element-chip:hover, .element-chip.is-selected { border-color: var(--sun); background: #37343a; color: #fff5da; }
.tool-side-note { display: flex; gap: 9px; align-items: flex-start; padding: 11px 12px; border: 1px dashed #4b4c58; border-radius: 14px; color: #a7a5b2; font-size: 11px; line-height: 1.55; }
.tool-side-note p { margin: 0; }
.note-mark { display: grid; flex: 0 0 18px; width: 18px; height: 18px; place-items: center; border: 1px solid #6e6d78; border-radius: 50%; color: #ffd45f; font-family: var(--mono); font-size: 11px; font-weight: 900; }
.finder-panel { min-height: 100%; padding: clamp(18px, 4vw, 32px); border: 1px solid #444652; border-radius: 18px; background: linear-gradient(145deg, #252632, #181920); }
.finder-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.finder-panel h3 { margin: 0; color: #fff5db; font-size: clamp(22px, 3vw, 32px); }
.finder-panel > p { max-width: 680px; color: #b1afbb; line-height: 1.65; }
.query-arrow { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #f0ca59; border-radius: 11px; background: #ffd45f; color: #2e2630; font-size: 24px; font-weight: 900; transform: rotate(-6deg); }
.reaction-input-grid { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); align-items: end; gap: 10px; margin-top: 22px; }
.reaction-input-grid label { display: grid; gap: 7px; color: #cbc9d3; font-family: var(--mono); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.plus-sign { align-self: center; color: var(--sun); font-size: 22px; font-weight: 800; text-align: center; }
.suggestion-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.suggestion-chip, .category-filter { appearance: none; border: 1px solid #50515d; border-radius: 999px; padding: 7px 10px; background: #292a35; color: #c3c1cb; cursor: pointer; font: inherit; font-family: var(--mono); font-size: 10px; font-weight: 900; }
.suggestion-chip:hover, .category-filter:hover, .category-filter.is-active { border-color: var(--mint); background: rgba(78,223,166,.16); color: #effff5; }
.finder-result { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px; border: 1px solid #4c4e5b; border-radius: 14px; background: #1b1c24; }
.result-icon { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border: 1px solid #6d6c74; border-radius: 8px; color: #fff; font-family: var(--mono); font-weight: 900; }
.finder-result strong { display: block; color: #fff6dc; }
.finder-result p { margin: 6px 0 0; color: #aaa8b4; font-size: 13px; line-height: 1.55; }
.success-result { border-color: rgba(78,223,166,.54); background: rgba(78,223,166,.09); }
.success-result .result-icon { border-color: var(--mint); background: var(--mint); color: #173025; }
.no-match-result { border-color: rgba(255,143,202,.55); background: rgba(255,143,202,.08); }
.reaction-equation { font-size: 16px; }
.reaction-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 9px; color: #9d9ba8; font-family: var(--mono); font-size: 10px; }
.reaction-guide { color: var(--sun); font-weight: 900; text-decoration: none; }
.reaction-guide:hover { color: #fff; text-decoration: underline; }
.catalog-toolbar { display: grid; gap: 10px; margin-top: 18px; }
.category-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.element-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.element-result-card { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 4px 8px; align-items: center; min-width: 0; border: 1px solid #484a56; border-radius: 12px; padding: 10px; background: #1b1c24; color: #f6f1e4; cursor: pointer; text-align: left; }
.element-result-card:hover { border-color: var(--sun); transform: translateY(-1px); }
.element-result-swatch { grid-row: span 3; width: 24px; height: 24px; border: 1px solid #16171b; border-radius: 6px; }
.element-result-card strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.element-result-meta, .element-result-card small { overflow: hidden; color: #9d9ba7; font-family: var(--mono); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.empty-catalog { color: #b1afbb; }

.intro-section, .how-section, .faq-section { padding: 42px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-card, .guide-card { display: flex; min-height: 190px; flex-direction: column; padding: 22px; border: 2px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: 5px 6px 0 rgba(55,39,51,.1); color: var(--ink); text-decoration: none; transition: transform .22s var(--bounce), box-shadow .22s var(--bounce); }
.feature-card:hover, .guide-card:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 8px 10px 0 rgba(55,39,51,.12); }
.feature-card-icon { display: grid; width: 40px; height: 40px; place-items: center; margin-bottom: 16px; border: 2px solid var(--line); border-radius: 12px; background: var(--mint); color: var(--ink); font-family: var(--mono); font-size: 22px; font-weight: 900; }
.feature-card:nth-child(2) .feature-card-icon { background: var(--lavender); }
.feature-card:nth-child(3) .feature-card-icon { background: var(--sun); }
.feature-card:nth-child(4) .feature-card-icon { background: var(--sky); }
.feature-card:nth-child(5) .feature-card-icon { background: var(--peach); }
.feature-card:nth-child(6) .feature-card-icon { background: var(--pink); }
.feature-card h3, .guide-card h3 { margin: 0 0 8px; font-size: 21px; }
.feature-card p, .guide-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.feature-card-link { display: block; margin-top: auto; padding-top: 16px; color: #6c4fe7; font-family: var(--mono); font-size: 11px; font-weight: 950; }
.sandboxels-step-cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.sandboxels-step-cards .step-card { position: relative; min-height: 180px; padding: 22px; border: 2px solid var(--line); border-radius: 20px; background: var(--paper-tint); box-shadow: 4px 5px 0 rgba(55,39,51,.08); }
.step-number { display: grid; width: 30px; height: 30px; place-items: center; margin-bottom: 18px; border: 2px solid var(--line); border-radius: 9px; background: var(--sun); font-family: var(--mono); font-size: 12px; font-weight: 950; }
.sandboxels-step-cards .step-card:nth-child(2) .step-number { background: var(--mint); }
.sandboxels-step-cards .step-card:nth-child(3) .step-number { background: var(--lavender); }
.sandboxels-step-cards .step-card:nth-child(4) .step-number { background: var(--pink); }
.sandboxels-step-cards h3 { margin: 0 0 8px; font-size: 18px; }
.sandboxels-step-cards p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.sandboxels-content-grid { align-items: start; padding: 24px 0 46px; }
.sandboxels-content-grid .info { min-height: 100%; }
.source-line { margin-top: 22px !important; padding-top: 16px; border-top: 1px dashed rgba(55,39,51,.22); color: var(--muted); font-family: var(--mono); font-size: 11px; }
.source-line a { color: #6c4fe7; font-weight: 900; }
.faq-list { display: grid; gap: 8px; }
.faq-list details, .faq-item { border: 1.5px solid rgba(55,39,51,.16); border-radius: 13px; background: rgba(255,255,255,.48); }
.faq-list summary, .faq-item summary { cursor: pointer; list-style: none; padding: 13px 14px; color: var(--ink); font-size: 14px; font-weight: 850; }
.faq-list summary::-webkit-details-marker, .faq-item summary::-webkit-details-marker { display: none; }
.faq-list summary::after, .faq-item summary::after { content: "+"; float: right; color: #7959df; font-family: var(--mono); font-weight: 950; }
.faq-list details[open] summary::after, .faq-item[open] summary::after { content: "−"; }
.faq-list p, .faq-item p { margin: 0; padding: 0 14px 14px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.disclaimer-band, .internal-cta { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 46px; padding: 20px 22px; border: 2px solid var(--line); border-radius: 20px; background: var(--cream); box-shadow: 5px 6px 0 rgba(55,39,51,.1); }
.disclaimer-band strong, .internal-cta strong { font-size: 19px; }
.disclaimer-band p, .internal-cta p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.page-hero { padding: 44px 0 28px; text-align: center; }
.breadcrumbs { display: flex; justify-content: center; gap: 8px; margin-bottom: 22px; color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 800; }
.breadcrumbs a { color: #6c4fe7; text-decoration: none; }
.page-hero h1 { max-width: 900px; margin: 12px auto 15px; font-size: clamp(38px, 6vw, 72px); line-height: .98; text-shadow: 4px 4px 0 #fff, 7px 7px 0 rgba(55,39,51,.08); }
.page-hero > p:not(.page-hero-note) { max-width: 760px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.65; }
.page-hero-note { max-width: 760px; margin: 18px auto 0 !important; color: var(--ink); font-family: var(--mono); font-size: 11px !important; font-weight: 800; }
.page-tool-section { padding: 6px 0 36px; }
.core-content-section { align-items: start; padding: 26px 0 48px; }
.core-content-section .wide { grid-column: span 2; }
.core-content-section .info { min-height: 100%; }
.recipe-list, .mod-list, .guide-list, .related-links, .source-cards { display: grid; gap: 10px; }
.recipe-card, .guide-card { display: block; padding: 14px; border: 1.5px solid rgba(55,39,51,.17); border-radius: 14px; background: rgba(255,255,255,.56); color: var(--ink); text-decoration: none; }
.recipe-card:hover { border-color: var(--violet); background: #fff; }
.recipe-equation { display: block; margin-bottom: 7px; color: #6c4fe7; font-family: var(--mono); font-size: 11px; font-weight: 950; }
.recipe-equation b { color: var(--peach); }
.recipe-card strong { display: block; font-size: 14px; }
.recipe-card > span:last-child { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.mini-element-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.mini-element { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 2px 8px; align-items: center; padding: 9px; border: 1.5px solid rgba(55,39,51,.14); border-radius: 12px; color: var(--ink); text-decoration: none; }
.mini-element:hover { border-color: var(--violet); background: #fff; }
.mini-element-swatch { grid-row: span 2; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--element-color); }
.mini-element strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mini-element span:last-child { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.safety-callout, .guide-boundary { margin-top: 20px; padding: 14px 16px; border-left: 4px solid var(--peach); border-radius: 0 14px 14px 0; background: #fff0e4; }
.safety-callout p, .guide-boundary p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.mod-card { padding: 14px; border: 1.5px solid rgba(55,39,51,.16); border-radius: 15px; background: rgba(255,255,255,.55); }
.mod-card-top, .mod-card-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.mod-badge { color: #6c4fe7; font-weight: 950; text-transform: uppercase; }
.mod-card h3 { margin: 10px 0 6px; font-size: 16px; }
.mod-card p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.mod-card-bottom a { color: #6c4fe7; font-weight: 950; text-decoration: none; }
.controls-table-wrap { overflow-x: auto; margin-top: 20px; }
.controls-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.controls-table th, .controls-table td { padding: 11px 10px; border-bottom: 1px solid rgba(55,39,51,.14); text-align: left; vertical-align: top; }
.controls-table th { color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
kbd { display: inline-block; border: 1px solid rgba(55,39,51,.25); border-bottom-width: 2px; border-radius: 6px; padding: 4px 7px; background: var(--paper-tint); color: var(--ink); font-family: var(--mono); font-size: 10px; font-weight: 850; white-space: nowrap; }
.plain-list { display: grid; gap: 10px; margin: 0 0 20px; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.plain-list a { color: #6c4fe7; font-weight: 850; text-decoration: none; }
.source-cards { grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 22px; }
.source-card { display: flex; min-height: 230px; flex-direction: column; padding: 16px; border: 1.5px solid rgba(55,39,51,.16); border-radius: 15px; background: var(--paper-tint); }
.source-icon { display: grid; width: 36px; height: 36px; place-items: center; border: 2px solid var(--line); border-radius: 10px; background: var(--sun); font-family: var(--mono); font-weight: 950; }
.source-card h3 { margin: 14px 0 6px; font-size: 17px; }
.source-card p { margin: 0 0 15px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.source-card .btn { margin-top: auto; min-height: 42px; padding: 10px 12px; font-size: 12px; }
.guide-list { grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 20px; }
.guide-card { min-height: 210px; }
.guide-label { display: block; margin-bottom: 12px; color: #6c4fe7; font-family: var(--mono); font-size: 10px; font-weight: 950; text-transform: uppercase; }
.related-links a { padding: 10px 0; border-bottom: 1px dashed rgba(55,39,51,.18); color: #6c4fe7; font-size: 13px; font-weight: 850; text-decoration: none; }
.faq-section { padding-bottom: 38px; }
.supporting-copy { padding: 0 0 30px; }
.supporting-copy .info { max-width: 900px; margin-inline: auto; }
.supporting-copy p { color: var(--muted); font-size: 14px; line-height: 1.75; }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.faq-item { height: fit-content; }

.guide-answer { display: flex; max-width: 700px; gap: 12px; align-items: flex-start; margin: 24px auto 0; padding: 16px 18px; border: 2px solid var(--line); border-radius: 18px; background: var(--mint); box-shadow: 4px 5px 0 rgba(55,39,51,.11); text-align: left; }
.answer-mark { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border: 2px solid var(--line); border-radius: 9px; background: var(--paper); font-weight: 950; }
.guide-answer strong { font-size: 15px; }
.guide-answer p { margin: 5px 0 0; color: #345746; font-size: 14px; line-height: 1.55; }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr); gap: 18px; align-items: start; padding: 18px 0 38px; }
.guide-sidebar { display: grid; gap: 18px; }
.guide-steps { display: grid; gap: 20px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: guide-step; }
.guide-steps li { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 12px; }
.guide-step-number { display: grid; width: 34px; height: 34px; place-items: center; border: 2px solid var(--line); border-radius: 10px; background: var(--sun); font-family: var(--mono); font-size: 12px; font-weight: 950; }
.guide-steps li:nth-child(2) .guide-step-number { background: var(--mint); }
.guide-steps li:nth-child(3) .guide-step-number { background: var(--lavender); }
.guide-steps li:nth-child(4) .guide-step-number { background: var(--pink); }
.guide-steps h3 { margin: 0 0 5px; font-size: 18px; }
.guide-steps p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.guide-tool-section { padding-top: 8px; }

.legal-page { padding: 48px 0 70px; }
.legal-hero { max-width: 850px; margin: 0 auto 24px; text-align: center; }
.legal-hero h1 { margin: 12px 0; font-size: clamp(38px, 6vw, 68px); line-height: 1; text-shadow: 4px 4px 0 #fff; }
.legal-hero p { color: var(--muted); line-height: 1.7; }
.legal-panel { max-width: 900px; margin-inline: auto; }
.legal-panel h2 { margin-top: 28px; font-size: 23px; }
.legal-panel p, .legal-panel li { color: var(--muted); font-size: 14px; line-height: 1.75; }
.legal-panel a { color: #6c4fe7; font-weight: 850; }
.legal-meta { color: var(--ink) !important; font-family: var(--mono); font-size: 11px !important; font-weight: 900; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.no-script-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 980px) {
  .topbar-actions { align-items: flex-end; flex-direction: column; }
  .primary-nav { justify-content: flex-end; }
  .feature-grid, .source-cards, .guide-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sandboxels-step-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .sandboxels-home .topbar, .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-actions { width: 100%; align-items: stretch; }
  .primary-nav { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; border-radius: 16px; }
  .primary-nav a { flex: 0 0 auto; }
  .language-pill { align-self: flex-start; }
  .tool-shell-topbar { align-items: flex-start; flex-direction: column; }
  .tool-workarea { grid-template-columns: 1fr; }
  .tool-side-rail { order: -1; }
  .element-chip-list { max-height: 150px; }
  .element-result-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .core-content-section .wide { grid-column: auto; }
  .faq-grid, .guide-layout { grid-template-columns: 1fr; }
  .source-cards, .guide-list { grid-template-columns: 1fr; }
  .internal-cta, .disclaimer-band { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .wrap { width: min(100% - 22px, 1180px); }
  .sandboxels-home .tool-hero { padding-top: 42px; }
  .tool-hero h1, .page-hero h1 { font-size: clamp(35px, 12vw, 52px); }
  .hero-actions { align-items: stretch; flex-direction: column; width: min(100%, 320px); }
  .hero-actions .btn { width: 100%; }
  .tool-mode-tabs { overflow-x: auto; }
  .tool-mode-tab { flex: 0 0 auto; }
  .reaction-input-grid { grid-template-columns: 1fr; }
  .plus-sign { display: none; }
  .element-result-grid { grid-template-columns: 1fr; }
  .feature-grid, .sandboxels-step-cards, .mini-element-grid { grid-template-columns: 1fr; }
  .pixel-button { flex: 1 1 calc(50% - 8px); }
  .canvas-caption { align-items: flex-start; flex-direction: column; }
  .page-hero { padding-top: 30px; }
  .breadcrumbs { flex-wrap: wrap; line-height: 1.5; }
  .guide-answer { padding: 14px; }
  .controls-table { min-width: 560px; }
}

/* Full reference-game launcher: the official game opens in its own tab so its controls remain intact. */
.sandboxels-full-game-shell {
  overflow: hidden;
  border: 2px solid #2c2d3a;
  border-radius: 28px;
  background: #111218;
  box-shadow: 10px 11px 0 rgba(55, 39, 51, .16);
}

.full-game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .11);
  background: linear-gradient(180deg, #252733, #1b1c25);
  color: #fff7df;
}

.full-game-topbar strong {
  display: block;
  font-size: 16px;
  letter-spacing: .01em;
}

.full-game-direct-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 212, 95, .55);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 212, 95, .1);
  color: #ffd45f;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.full-game-launch-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
  gap: 20px;
  padding: clamp(20px, 4vw, 34px);
  background:
    radial-gradient(circle at 15% 20%, rgba(78, 223, 166, .12), transparent 28%),
    radial-gradient(circle at 90% 75%, rgba(255, 212, 95, .1), transparent 25%),
    #111218;
}

.full-game-launch-copy {
  min-width: 0;
}

.full-game-reason {
  max-width: 760px;
  margin: 0;
  color: #e8e3d8;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
}

.full-game-features-label {
  margin: 24px 0 10px;
  color: #ffd45f;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.full-game-feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.full-game-feature-list li {
  position: relative;
  min-height: 46px;
  padding: 10px 12px 10px 31px;
  border: 1px solid #41434f;
  border-radius: 12px;
  background: rgba(37, 38, 50, .78);
  color: #c9c7d0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.45;
}

.full-game-feature-list li::before {
  content: "✓";
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--mint);
  font-size: 13px;
  font-weight: 950;
}

.full-game-launch-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 20px;
  border: 1px solid #4a4b58;
  border-radius: 18px;
  background: linear-gradient(145deg, #252632, #181920);
  box-shadow: 5px 6px 0 rgba(0, 0, 0, .2);
}

.full-game-launch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border: 2px solid #14151b;
  border-radius: 13px;
  padding: 12px 16px;
  background: var(--sun);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, .32);
  color: #2d2430;
  font-size: 15px;
  font-weight: 950;
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.full-game-launch-button:hover,
.full-game-launch-button:focus-visible {
  background: #ffe38a;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, .32);
  transform: translate(2px, 2px);
}

.full-game-launch-action p {
  margin: 16px 0 0;
  color: #a8a6b2;
  font-size: 12px;
  line-height: 1.6;
}

.full-game-launch-action a:not(.full-game-launch-button),
.full-game-credit a {
  color: #ffd45f;
  font-weight: 800;
}

.full-game-credit {
  display: grid;
  gap: 6px;
  padding: 13px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, .11);
  background: #171820;
  color: #b6b5c1;
  font-size: 12px;
  line-height: 1.6;
}

.full-game-credit p { margin: 0; }

@media (max-width: 980px) {
  .full-game-launch-panel { grid-template-columns: 1fr; }
  .full-game-launch-action { min-height: 0; }
}

@media (max-width: 720px) {
  .full-game-topbar { align-items: flex-start; flex-direction: column; }
  .full-game-direct-badge { white-space: normal; }
  .full-game-feature-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .sandboxels-full-game-shell { border-radius: 20px; }
  .full-game-topbar { padding: 15px 14px; }
  .full-game-launch-panel { padding: 16px 14px; }
  .full-game-credit { padding: 12px 14px 14px; }
}
