@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;600;700&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans SC', 'Segoe UI', sans-serif; background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); color: #e0e0e0; display: flex; height: 100vh; overflow: hidden; transition: background 0.35s ease; }
body[data-map-theme="plain"] { background: linear-gradient(135deg, #1a1f3a, #3c5b3b, #7a5c3e); }
body[data-map-theme="forest"] { background: linear-gradient(135deg, #0c1f1a, #174a32, #325d3d); }
body[data-map-theme="river"] { background: linear-gradient(135deg, #10233a, #185a7a, #1f6a87); }
body[data-map-theme="mountain"] { background: linear-gradient(135deg, #16181f, #3b4350, #596375); }
.mode-screen { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at top, rgba(76,175,80,0.15), rgba(7,11,24,0.92)); }
.mode-screen.hidden { display: none; }
.mode-shell { width: min(820px, calc(100vw - 40px)); padding: 28px; border-radius: 20px; background: rgba(16,24,44,0.94); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 24px 80px rgba(0,0,0,0.45); }
.mode-shell h1 { font-size: 32px; margin-bottom: 10px; }
.mode-shell p { font-size: 14px; opacity: 0.78; line-height: 1.7; margin-bottom: 20px; }
.mode-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mode-card { padding: 22px 18px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); color: #e0e0e0; text-align: left; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.mode-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.26); }
.mode-card strong { display: block; font-size: 22px; margin-bottom: 8px; }
.mode-card span { display: block; font-size: 13px; line-height: 1.65; opacity: 0.82; }
.mode-card.sandbox { border-color: rgba(129,199,132,0.35); }
.mode-card.challenge { border-color: rgba(255,183,77,0.35); }
#canvas-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; }
#canvas-wrap::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 70%); pointer-events: none; }
body[data-map-theme="plain"] #canvas-wrap::before { background: radial-gradient(circle at 50% 45%, rgba(255,224,178,0.10) 0%, rgba(255,224,178,0.03) 28%, transparent 72%); }
body[data-map-theme="forest"] #canvas-wrap::before { background: radial-gradient(circle at 50% 42%, rgba(129,199,132,0.12) 0%, rgba(46,125,50,0.05) 26%, transparent 74%); }
body[data-map-theme="river"] #canvas-wrap::before { background: radial-gradient(circle at 50% 45%, rgba(129,212,250,0.13) 0%, rgba(79,195,247,0.05) 30%, transparent 74%); }
body[data-map-theme="mountain"] #canvas-wrap::before { background: radial-gradient(circle at 50% 40%, rgba(207,216,220,0.12) 0%, rgba(144,164,174,0.04) 32%, transparent 76%); }
canvas#grid { border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 60px rgba(76,175,80,0.08); transition: box-shadow 0.35s ease; }
body[data-map-theme="plain"] canvas#grid { box-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 0 60px rgba(232,198,111,0.12); }
body[data-map-theme="forest"] canvas#grid { box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 60px rgba(76,175,80,0.18); }
body[data-map-theme="river"] canvas#grid { box-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 0 60px rgba(79,195,247,0.18); }
body[data-map-theme="mountain"] canvas#grid { box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 0 60px rgba(176,190,197,0.16); }
#panel { width: 340px; background: rgba(22,33,62,0.95); backdrop-filter: blur(12px); padding: 24px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; border-left: 1px solid rgba(255,255,255,0.08); box-shadow: -4px 0 24px rgba(0,0,0,0.3); transition: background 0.35s ease, border-color 0.35s ease; }
body[data-map-theme="plain"] #panel { background: rgba(47,41,28,0.94); border-left-color: rgba(232,198,111,0.24); }
body[data-map-theme="forest"] #panel { background: rgba(16,42,33,0.94); border-left-color: rgba(129,199,132,0.24); }
body[data-map-theme="river"] #panel { background: rgba(16,38,54,0.94); border-left-color: rgba(79,195,247,0.24); }
body[data-map-theme="mountain"] #panel { background: rgba(37,42,52,0.95); border-left-color: rgba(176,190,197,0.24); }
#panel::-webkit-scrollbar { width: 4px; }
#panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.title-area { text-align: center; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.title-area h2 { font-size: 22px; font-weight: 700; background: linear-gradient(135deg, #4caf50, #81c784); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 2px; }
.title-area p { font-size: 12px; opacity: 0.5; margin-top: 4px; }
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; opacity: 0.4; margin-bottom: -8px; }
body[data-map-theme="plain"] .title-area h2 { background: linear-gradient(135deg, #ffd180, #ffb74d); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
body[data-map-theme="forest"] .title-area h2 { background: linear-gradient(135deg, #81c784, #4db6ac); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
body[data-map-theme="river"] .title-area h2 { background: linear-gradient(135deg, #81d4fa, #4fc3f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
body[data-map-theme="mountain"] .title-area h2 { background: linear-gradient(135deg, #eceff1, #b0bec5); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
body[data-map-theme="plain"] .section-label { color: #ffe0b2; opacity: 0.56; }
body[data-map-theme="forest"] .section-label { color: #c8e6c9; opacity: 0.56; }
body[data-map-theme="river"] .section-label { color: #b3e5fc; opacity: 0.6; }
body[data-map-theme="mountain"] .section-label { color: #d7dde2; opacity: 0.58; }
.param { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 12px; background: rgba(255,255,255,0.03); border-radius: 8px; transition: background 0.2s; }
.param:hover { background: rgba(255,255,255,0.06); }
.param label { font-size: 13px; flex-shrink: 0; opacity: 0.85; }
.param input, .param select { width: 92px; padding: 5px 8px; border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; background: rgba(15,52,96,0.6); color: #eee; text-align: center; font-size: 13px; font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s; }
.param input:focus, .param select:focus { outline: none; border-color: #4caf50; box-shadow: 0 0 8px rgba(76,175,80,0.3); }
.buttons { display: flex; gap: 8px; }
.buttons button { flex: 1; padding: 10px; border: none; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; transition: all 0.25s; text-transform: uppercase; letter-spacing: 1px; }
.buttons button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.buttons button:active { transform: translateY(0); }
#btnStart { background: linear-gradient(135deg, #4caf50, #66bb6a); color: #fff; }
#btnPause { background: linear-gradient(135deg, #ff9800, #ffa726); color: #fff; }
#btnReset { background: linear-gradient(135deg, #e94560, #f06292); color: #fff; }
#btnNext { background: linear-gradient(135deg, #42a5f5, #5c6bc0); color: #fff; }
#btnSandboxEditor, #btnChallengeInfo { background: linear-gradient(135deg, #26a69a, #42a5f5); color: #fff; }
#btnAddExtraSpecies { background: linear-gradient(135deg, #7e57c2, #42a5f5); color: #fff; }
#btnBackToModes { background: rgba(255,255,255,0.07); color: #fff; }
.tool-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tool-buttons button { padding: 9px 6px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; background: rgba(255,255,255,0.04); color: #e0e0e0; cursor: pointer; font-family: inherit; font-size: 12px; transition: all 0.2s; }
.tool-buttons button.active { background: linear-gradient(135deg, rgba(76,175,80,0.45), rgba(129,199,132,0.25)); border-color: rgba(129,199,132,0.6); box-shadow: 0 0 10px rgba(76,175,80,0.18); }
.tool-buttons button:hover { transform: translateY(-1px); }
#extraToolButtons { display: none; }
#extraToolButtons.show { display: grid; }
.info-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.05); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
body[data-map-theme="plain"] .info-card { background: rgba(255,244,220,0.05); border-color: rgba(255,213,128,0.14); }
body[data-map-theme="forest"] .info-card { background: rgba(200,230,201,0.05); border-color: rgba(129,199,132,0.16); }
body[data-map-theme="river"] .info-card { background: rgba(179,229,252,0.05); border-color: rgba(79,195,247,0.16); }
body[data-map-theme="mountain"] .info-card { background: rgba(236,239,241,0.05); border-color: rgba(176,190,197,0.16); }
.upgrade-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.upgrade-btn { width: 100%; padding: 10px; text-align: left; border-radius: 9px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); color: #e0e0e0; cursor: pointer; transition: all 0.2s; }
.upgrade-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.06); }
.upgrade-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.upgrade-btn strong { display: block; font-size: 13px; margin-bottom: 2px; }
.upgrade-btn span { display: block; font-size: 11px; opacity: 0.72; line-height: 1.45; }
.info-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.info-key { font-size: 12px; opacity: 0.55; text-transform: uppercase; letter-spacing: 1px; }
.info-value { font-weight: 700; font-size: 16px; }
.inline-input { width: 88px; padding: 6px 8px; border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; background: rgba(15,52,96,0.6); color: #eee; text-align: center; font-size: 13px; font-family: inherit; }
.subtle { font-size: 12px; opacity: 0.75; line-height: 1.45; }
.status-line { font-size: 12px; min-height: 18px; line-height: 1.5; color: #cfd8dc; }
.tag { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; }
.tag.ok { background: rgba(76,175,80,0.18); color: #9be7a3; }
.tag.warn { background: rgba(255,152,0,0.16); color: #ffcc80; }
.tag.bad { background: rgba(233,69,96,0.16); color: #f8a5b5; }
.tag.info { background: rgba(66,165,245,0.16); color: #90caf9; }
.muted-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { text-align: center; padding: 10px 14px; background: rgba(255,255,255,0.04); border-radius: 10px; }
.extra-stats { margin-top: 8px; display: none; }
.extra-stats.show { display: grid; }
body[data-map-theme="plain"] .stat { background: rgba(255,244,220,0.05); }
body[data-map-theme="forest"] .stat { background: rgba(200,230,201,0.05); }
body[data-map-theme="river"] .stat { background: rgba(179,229,252,0.05); }
body[data-map-theme="mountain"] .stat { background: rgba(236,239,241,0.05); }
.stat .icon { font-size: 18px; margin-bottom: 2px; }
.stat .num { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 10px; opacity: 0.5; text-transform: uppercase; letter-spacing: 1px; }
#chartWrap { background: rgba(15,52,96,0.4); border-radius: 10px; padding: 12px; border: 1px solid rgba(255,255,255,0.05); }
body[data-map-theme="plain"] #chartWrap { background: rgba(121,85,42,0.28); border-color: rgba(255,213,128,0.12); }
body[data-map-theme="forest"] #chartWrap { background: rgba(26,71,52,0.32); border-color: rgba(129,199,132,0.12); }
body[data-map-theme="river"] #chartWrap { background: rgba(20,73,106,0.32); border-color: rgba(79,195,247,0.12); }
body[data-map-theme="mountain"] #chartWrap { background: rgba(63,72,84,0.34); border-color: rgba(176,190,197,0.12); }
.chart-title { font-size: 11px; opacity: 0.4; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
#chart { width: 100%; }
.legend { display: flex; gap: 12px; justify-content: center; margin-top: 8px; }
.legend span { font-size: 11px; display: flex; align-items: center; gap: 4px; opacity: 0.7; }
.legend i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
#extraLegend { display: contents; }
.footer { font-size: 11px; opacity: 0.3; text-align: center; margin-top: auto; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.05); }
.achievement-list { display: flex; flex-direction: column; gap: 6px; }
.achievement-item { padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,0.03); font-size: 12px; line-height: 1.45; }
.achievement-item.locked { opacity: 0.55; }
.weather-overlay { position: absolute; top: 32px; left: 32px; right: 380px; display: flex; justify-content: center; pointer-events: none; z-index: 2; }
.weather-badge { padding: 8px 12px; border-radius: 999px; background: rgba(8,16,32,0.55); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 8px 18px rgba(0,0,0,0.24); backdrop-filter: blur(8px); font-size: 12px; opacity: 0; transform: translateY(-8px); transition: all 0.25s; }
.weather-badge.show { opacity: 1; transform: translateY(0); }
body[data-map-theme="plain"] .weather-badge { background: rgba(74,52,22,0.52); border-color: rgba(255,213,128,0.22); }
body[data-map-theme="forest"] .weather-badge { background: rgba(12,48,31,0.58); border-color: rgba(129,199,132,0.24); }
body[data-map-theme="river"] .weather-badge { background: rgba(12,44,66,0.58); border-color: rgba(79,195,247,0.24); }
body[data-map-theme="mountain"] .weather-badge { background: rgba(41,47,58,0.6); border-color: rgba(176,190,197,0.24); }
.modal-mask { position: fixed; inset: 0; background: rgba(6,10,24,0.62); display: none; align-items: center; justify-content: center; z-index: 20; }
.modal-mask.show { display: flex; }
.modal-card { width: min(420px, calc(100vw - 40px)); background: linear-gradient(180deg, rgba(27,37,67,0.97), rgba(18,25,46,0.97)); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 22px 20px; box-shadow: 0 18px 50px rgba(0,0,0,0.45); }
.modal-card-lg { width: min(760px, calc(100vw - 40px)); max-height: calc(100vh - 60px); overflow-y: auto; }
.modal-card h3 { font-size: 22px; margin-bottom: 10px; }
.modal-card p { font-size: 13px; opacity: 0.82; line-height: 1.6; margin-bottom: 14px; }
.modal-actions { display: flex; gap: 8px; }
.modal-actions button { flex: 1; padding: 10px; border: none; border-radius: 9px; cursor: pointer; font-family: inherit; font-weight: 700; }
.sandbox-editor-card { width: min(1100px, calc(100vw - 40px)); max-height: calc(100vh - 34px); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.editor-modal-header { padding: 22px 24px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.editor-modal-header h3 { margin-bottom: 8px; }
.editor-modal-header p { margin-bottom: 0; max-width: 640px; }
.editor-tip-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.editor-badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); font-size: 12px; font-weight: 700; white-space: nowrap; }
.editor-modal-body { flex: 1; overflow-y: auto; padding: 18px 24px 8px; display: flex; flex-direction: column; gap: 14px; }
.editor-view { display: none; }
.editor-view.active { display: flex; flex-direction: column; gap: 14px; }
.editor-home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.editor-nav-card { text-align: left; padding: 18px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.08); background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025)); color: #e6edf3; cursor: pointer; font-family: inherit; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.editor-nav-card:hover { transform: translateY(-2px); border-color: rgba(129,199,132,0.35); box-shadow: 0 12px 28px rgba(0,0,0,0.22); }
.editor-nav-card strong { display: block; font-size: 17px; margin-bottom: 8px; }
.editor-nav-card span { display: block; font-size: 13px; line-height: 1.6; opacity: 0.78; }
.editor-page-head { display: flex; align-items: flex-start; gap: 14px; }
.editor-page-head h4 { font-size: 20px; margin-bottom: 4px; }
.editor-page-head p { margin: 0; font-size: 13px; opacity: 0.76; line-height: 1.6; }
.editor-back-btn { border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); color: #f1f5f9; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-family: inherit; font-weight: 700; white-space: nowrap; }
.editor-section { border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; background: rgba(255,255,255,0.035); overflow: hidden; }
.editor-section[open] { box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); }
.editor-section-summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)); }
.editor-section-summary::-webkit-details-marker { display: none; }
.editor-section-summary span { font-size: 16px; font-weight: 700; }
.editor-section-summary small { font-size: 12px; opacity: 0.72; }
.editor-section-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.editor-actions { padding: 14px 24px 20px; border-top: 1px solid rgba(255,255,255,0.08); background: linear-gradient(180deg, rgba(14,20,38,0.82), rgba(14,20,38,0.96)); position: sticky; bottom: 0; }
.editor-inline-actions { display: flex; justify-content: flex-start; }
.editor-inline-actions button { padding: 10px 14px; border: none; border-radius: 10px; cursor: pointer; font-family: inherit; font-weight: 700; background: linear-gradient(135deg, #7e57c2, #42a5f5); color: #fff; }
.btn-primary { background: linear-gradient(135deg, #4caf50, #66bb6a); color: #fff; }
.btn-secondary { background: rgba(255,255,255,0.08); color: #e0e0e0; }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.species-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.species-card { padding: 12px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; gap: 8px; }
.species-card-title { font-size: 14px; font-weight: 700; letter-spacing: 0.4px; }
.species-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.species-remove-btn { border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); color: #f5c6cb; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.prey-editor { display: flex; flex-wrap: wrap; gap: 8px; }
.prey-option { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 999px; background: rgba(255,255,255,0.05); font-size: 12px; }
.prey-option input { accent-color: #66bb6a; }
.skill-editor { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-option { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 999px; background: rgba(255,255,255,0.05); font-size: 12px; }
.skill-option input { accent-color: #7e57c2; }
.challenge-info-body { max-height: none; }
.challenge-section { display: flex; flex-direction: column; gap: 10px; }
.challenge-level-card { padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; gap: 8px; }
.challenge-level-card.active { border-color: rgba(79,195,247,0.45); box-shadow: 0 0 0 1px rgba(79,195,247,0.16) inset; }
.challenge-level-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.challenge-level-name { font-size: 16px; font-weight: 700; }
.challenge-level-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; opacity: 0.8; }
.challenge-level-list { display: flex; flex-direction: column; gap: 10px; }
.challenge-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.challenge-detail-item { padding: 9px 10px; border-radius: 10px; background: rgba(255,255,255,0.04); font-size: 12px; line-height: 1.5; }
.challenge-detail-item strong { display: block; font-size: 11px; opacity: 0.58; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.8px; }
.comp-tab { background: rgba(255,255,255,0.08); color: #e0e0e0; }
.comp-tab.active { background: linear-gradient(135deg, rgba(76,175,80,0.45), rgba(129,199,132,0.25)); }
.compendium-body { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 14px 0; padding-right: 4px; }
.compendium-entry { padding: 12px; border-radius: 12px; background: rgba(255,255,255,0.04); line-height: 1.6; font-size: 13px; border: 1px solid rgba(255,255,255,0.06); }
.compendium-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.compendium-title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.compendium-icon { font-size: 18px; }
.compendium-tag { padding: 2px 8px; border-radius: 999px; background: rgba(76,175,80,0.16); color: #a5d6a7; font-size: 11px; white-space: nowrap; }
.compendium-text { opacity: 0.82; }
.compendium-list { margin: 8px 0 0; padding-left: 18px; opacity: 0.9; }
.compendium-list li { margin: 4px 0; }
.sandbox-editor-card .editor-grid,
.sandbox-editor-card .species-editor-grid { margin-bottom: 0; }
.sandbox-editor-card .editor-grid-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sandbox-editor-card .species-editor-grid-base { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sandbox-editor-card .param { min-height: 78px; padding: 12px 14px; border-radius: 12px; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.05); }
.sandbox-editor-card .param:hover { background: rgba(255,255,255,0.06); }
.sandbox-editor-card .param label { font-size: 12px; opacity: 0.68; letter-spacing: 0.5px; }
.sandbox-editor-card .param input,
.sandbox-editor-card .param select { width: 100%; min-width: 0; text-align: left; background: rgba(8,16,32,0.42); }
.sandbox-editor-card .param-wide { grid-column: span 2; }
.sandbox-editor-card .species-card { padding: 14px; gap: 10px; background: rgba(255,255,255,0.045); }
.sandbox-editor-card .species-card-title { font-size: 15px; }
.sandbox-editor-card .subtle { opacity: 0.7; }
.sandbox-editor-card .skill-editor,
.sandbox-editor-card .prey-editor { gap: 8px; }
.sandbox-editor-card .skill-option,
.sandbox-editor-card .prey-option { border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.05); }

@media (max-width: 900px) {
  .mode-cards { grid-template-columns: 1fr; }
  .editor-grid, .challenge-detail-grid, .species-editor-grid, .sandbox-editor-card .editor-grid-wide, .sandbox-editor-card .species-editor-grid-base { grid-template-columns: 1fr; }
  .sandbox-editor-card { width: min(100vw - 18px, 1100px); max-height: calc(100vh - 18px); }
  .editor-modal-header { padding: 18px 18px 14px; flex-direction: column; }
  .editor-modal-body { padding: 14px 18px 6px; }
  .editor-actions { padding: 12px 18px 16px; }
  .editor-home-grid { grid-template-columns: 1fr; }
  .editor-page-head { flex-direction: column; }
  .sandbox-editor-card .param-wide { grid-column: span 1; }
}
