@font-face {
  font-family: 'PixelUI';
  src: local('Courier New');
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a1f14;
  font-family: 'Courier New', monospace;
  image-rendering: pixelated;
  user-select: none;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: crosshair;
}

.pixel-panel {
  background: #2b3a1e;
  border: 3px solid #0f1509;
  box-shadow:
    inset 0 0 0 2px #5c7a3a,
    0 4px 0 rgba(0,0,0,0.4);
  color: #e8e0b8;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  letter-spacing: 0.5px;
  border-radius: 2px;
}

#hud {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

#credits {
  padding: 8px 16px;
  font-size: 20px;
  color: #ffe066;
  text-shadow: 2px 2px 0 #4a3a00;
}

#toast {
  padding: 10px 18px;
  font-size: 14px;
  max-width: 340px;
  transition: opacity 0.2s ease;
}

#toast.hidden { opacity: 0; }

#toolbar {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 96vw;
  gap: 14px;
  padding: 8px 12px;
}

.tool-group {
  display: flex;
  gap: 6px;
  padding: 0 8px;
  border-right: 2px solid #5c7a3a;
}

.tool-group:last-child { border-right: none; }

.tool-btn {
  width: 46px;
  height: 46px;
  font-size: 22px;
  background: #3d4f26;
  border: 2px solid #0f1509;
  box-shadow: inset 0 0 0 1px #6b8a44;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: saturate(0.9);
  transition: transform 0.05s ease;
}

.tool-btn:hover {
  background: #4d6430;
  filter: none;
}

.tool-btn:active { transform: scale(0.92); }

.tool-btn.active {
  background: #7a9a4a;
  box-shadow: inset 0 0 0 2px #ffe066;
}

#hint {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 6px 12px;
  font-size: 11px;
  color: #b9c99a;
  opacity: 0.85;
  max-width: min(46vw, 320px);
}

#devBadge.hidden { display: none; }
#devModeToggle.hidden { display: none; }

#sellPanel {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #cddca8;
  white-space: nowrap;
}
#sellPanel.hidden { display: none; }
#sellPanel .small-btn, #sellPanel .big-btn { padding: 6px 12px; font-size: 12px; }
.sell-total { color: #ffe066; font-size: 14px; font-weight: bold; }
/* Net-negative total (clearing natural scenery costs money instead of refunding it) */
.sell-total.sell-total-cost { color: #ff6b5e; }
#devBadge {
  padding: 6px 12px;
  font-size: 11px;
  color: #ffb347;
  background: #4a2a12;
  border-color: #2a1608;
  box-shadow: inset 0 0 0 2px #8a5a2a;
}

#visitorCount {
  padding: 6px 14px;
  font-size: 15px;
  color: #bcd8ff;
}

#credits.pulse {
  animation: creditPulse 0.4s ease;
}
@keyframes creditPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); color: #7CFC00; }
  100% { transform: scale(1); }
}

#devModeToggle.active {
  background: #8a3a1e;
  box-shadow: inset 0 0 0 2px #ffb347;
}

.big-btn, .small-btn, .choice-btn, .chapter-btn, .concept-btn {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  cursor: pointer;
  color: #e8e0b8;
  background: #3d4f26;
  border: 2px solid #0f1509;
  box-shadow: inset 0 0 0 1px #6b8a44;
  border-radius: 2px;
}
.big-btn:hover, .small-btn:hover, .choice-btn:hover:not(:disabled), .chapter-btn:hover:not(:disabled), .concept-btn:hover:not(:disabled) {
  background: #4d6430;
}
.big-btn:active, .small-btn:active { transform: scale(0.97); }

.big-btn {
  padding: 12px 28px;
  font-size: 16px;
  letter-spacing: 1px;
}
.small-btn {
  padding: 8px 16px;
  font-size: 13px;
  background: transparent;
  box-shadow: none;
  color: #b9c99a;
}

#shopBackdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0,0,0,0.35);
}
#shopBackdrop.hidden { display: none; }

#shopPanel {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 16px 20px;
  width: min(560px, 92vw);
  max-height: 50vh;
  overflow-y: auto;
  text-align: center;
}
#shopPanel.hidden { display: none; }

.shop-panel-title {
  font-size: 15px;
  color: #ffe066;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.shop-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.shop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 92px;
  padding: 10px 6px;
  background: #3d4f26;
  border: 2px solid #0f1509;
  box-shadow: inset 0 0 0 1px #6b8a44;
  border-radius: 2px;
  cursor: pointer;
  color: #e8e0b8;
  font-family: inherit;
  transition: transform 0.05s ease;
}
.shop-item:hover { background: #4d6430; }
.shop-item:active { transform: scale(0.95); }

.shop-item-icon { font-size: 26px; }
.shop-item-name { font-size: 11px; line-height: 1.3; }
.shop-item-price { font-size: 12px; color: #ffe066; }

.shop-item-locked {
  background: #2a2f20;
  cursor: default;
  filter: grayscale(0.6);
  opacity: 0.75;
}
.shop-item-locked:hover { background: #2a2f20; }
.shop-item-locked:active { transform: none; }
.shop-item-lock { font-size: 10px; color: #b9c99a; line-height: 1.3; }

.shop-empty {
  font-size: 13px;
  color: #b9c99a;
  padding: 12px;
}

#hqBackdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0,0,0,0.35);
}
#hqBackdrop.hidden { display: none; }

#hqPrompt {
  position: fixed;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  padding: 20px 26px;
  width: 340px;
  text-align: center;
}
#hqPrompt.hidden { display: none; }

#authBackdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0,0,0,0.35);
}
#authBackdrop.hidden { display: none; }

#authPanel {
  position: fixed;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  padding: 20px 26px;
  width: 340px;
  text-align: center;
}
#authPanel.hidden { display: none; }

.auth-input {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.auth-message {
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
  color: #ffb347;
}
.auth-message.hidden { display: none; }
#authLoggedOut.hidden { display: none; }
#authLoggedIn.hidden { display: none; }
.auth-message.success { color: #7CFC00; }

#cloudSyncBackdrop {
  position: fixed;
  inset: 0;
  z-index: 21;
  background: rgba(0,0,0,0.45);
}
#cloudSyncBackdrop.hidden { display: none; }

#cloudSyncPanel {
  position: fixed;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 22;
  padding: 20px 26px;
  width: 360px;
  text-align: center;
}
#cloudSyncPanel.hidden { display: none; }

.auth-email-display {
  font-size: 13px;
  color: #9fc9ff;
  margin-bottom: 12px;
  word-break: break-all;
}

.hq-prompt-title {
  font-size: 16px;
  color: #ffe066;
  margin-bottom: 10px;
}
.hq-prompt-body {
  font-size: 12px;
  color: #cddca8;
  line-height: 1.5;
  margin-bottom: 16px;
}
.hq-prompt-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

#expedition {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #2f8fdb; /* fallback shown for one frame before the canvas first paints */
  overflow: hidden;
}
#expedition.hidden { display: none; }

#expeditionBg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}

#expeditionScroll {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 40px 20px;
}

#expeditionContent {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  color: #e8e0b8;
  font-family: 'Courier New', monospace;
}

.exp-header {
  text-align: center;
  font-size: 22px;
  color: #ffe066;
  text-shadow: 2px 2px 0 #4a3a00;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.exp-subheader {
  text-align: center;
  font-size: 13px;
  color: #b9c99a;
  margin-bottom: 26px;
}

.exp-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chapter-btn, .concept-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 15px;
  text-align: left;
}
.chapter-btn:disabled, .concept-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.concept-btn.mastered {
  box-shadow: inset 0 0 0 2px #7CFC00;
}
.concept-btn.in-progress {
  box-shadow: inset 0 0 0 2px #ffe066;
}
.concept-btn.proficient {
  box-shadow: inset 0 0 0 2px #9fc9ff;
}
.chapter-btn.active {
  background: #4d6430;
  box-shadow: inset 0 0 0 2px #ffe066;
}

.exp-badge {
  font-size: 12px;
  color: #9fc9ff;
  white-space: nowrap;
  margin-left: 12px;
}

.progress-bar-track {
  background: #1a2410;
  border: 2px solid #0f1509;
  border-radius: 2px;
  height: 14px;
  width: 120px;
  overflow: hidden;
  flex-shrink: 0;
}
.progress-bar-fill {
  background: #7a9a4a;
  height: 100%;
}
.progress-bar-fill.mastered { background: #7CFC00; }

.exp-nav {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.question-card {
  background: #24311a;
  border: 3px solid #0f1509;
  box-shadow: inset 0 0 0 2px #5c7a3a;
  border-radius: 3px;
  padding: 26px;
}
.question-prompt {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 22px;
}
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.choice-btn {
  padding: 12px 16px;
  font-size: 14px;
  text-align: left;
}
.choice-btn.selected {
  background: #4a5f2f;
  box-shadow: inset 0 0 0 2px #ffe066;
}
.choice-btn.correct {
  background: #2f6b2f;
  box-shadow: inset 0 0 0 2px #7CFC00;
}
.choice-btn.incorrect {
  background: #6b2f2f;
  box-shadow: inset 0 0 0 2px #ff6b6b;
}
.choice-btn:disabled { cursor: default; }

.numeric-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.numeric-input {
  font-family: 'Courier New', monospace;
  font-size: 15px;
  padding: 10px 12px;
  background: #1a2410;
  border: 2px solid #0f1509;
  color: #e8e0b8;
  border-radius: 2px;
  width: 140px;
}
.numeric-input:disabled { opacity: 0.7; }

.feedback-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.6;
}
.feedback-box.correct {
  background: rgba(124,252,0,0.12);
  box-shadow: inset 0 0 0 2px #7CFC00;
  color: #d6ffb3;
}
.feedback-box.incorrect {
  background: rgba(255,107,107,0.12);
  box-shadow: inset 0 0 0 2px #ff6b6b;
  color: #ffd6d6;
}
.feedback-reward {
  font-size: 18px;
  margin-bottom: 6px;
}
.feedback-explanation {
  color: #cddca8;
}
.feedback-mastery-note {
  margin-top: 8px;
  color: #7CFC00;
  font-weight: bold;
}

.exp-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.summary-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  background: #24311a;
  border: 3px solid #0f1509;
  box-shadow: inset 0 0 0 2px #5c7a3a;
  border-radius: 3px;
  padding: 30px;
  font-size: 15px;
}
.summary-big {
  font-size: 26px;
  color: #ffe066;
}
.summary-credits {
  font-size: 20px;
  color: #7CFC00;
}
.summary-mastery {
  color: #9fc9ff;
  font-size: 13px;
}

.stars-badge {
  font-size: 15px;
  color: #ffe066;
  letter-spacing: 1px;
}

.skill-detail-stars {
  text-align: center;
  font-size: 32px;
  color: #ffe066;
  letter-spacing: 4px;
  margin: 10px 0 4px;
}

.level-stars-big {
  font-size: 30px;
  color: #ffe066;
  letter-spacing: 4px;
}

.pass-banner {
  font-size: 18px;
  color: #7CFC00;
  font-weight: bold;
}

.fail-banner {
  font-size: 18px;
  color: #ffb347;
  font-weight: bold;
}

.unlock-banner {
  margin-top: 6px;
  padding: 10px 16px;
  font-size: 14px;
  color: #ffe066;
  background: rgba(255,224,102,0.08);
  box-shadow: inset 0 0 0 2px #ffe066;
  border-radius: 2px;
  text-align: center;
  line-height: 1.6;
}

.diagram-canvas {
  display: block;
  width: 100%;
  height: 160px;
  margin: 4px 0 20px;
  background: rgba(0,0,0,0.15);
  border: 2px solid #0f1509;
  border-radius: 2px;
}

.hint-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  margin-top: 16px;
}
.hint-btn {
  padding: 8px 14px;
}
.hint-revealed {
  font-size: 13px;
  color: #ffe066;
  background: rgba(255,224,102,0.08);
  border-left: 3px solid #ffe066;
  padding: 8px 12px;
  line-height: 1.5;
}

.solution-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(232,224,184,0.2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.equation-chapter-title {
  font-size: 15px;
  color: #ffe066;
  margin: 18px 0 10px;
}
.equation-card {
  background: #24311a;
  border: 2px solid #0f1509;
  box-shadow: inset 0 0 0 1px #5c7a3a;
  border-radius: 2px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.equation-formula {
  font-size: 16px;
  color: #ffe066;
  margin-bottom: 8px;
}
.equation-vars {
  font-size: 12px;
  color: #cddca8;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.equation-unit {
  color: #9fc9ff;
}

select.numeric-input {
  appearance: none;
  cursor: pointer;
}

#researchOpportunity {
  position: fixed;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 21;
  padding: 18px 24px;
  width: 320px;
  text-align: center;
}
#researchOpportunity.hidden { display: none; }
#researchBadge {
  padding: 6px 14px;
  font-size: 14px;
  color: #bcd8ff;
}

/* ---- Character Lab ---- */
#charLabBackdrop {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(0,0,0,0.5);
}
#charLabBackdrop.hidden { display: none; }

#characterLab {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  width: min(560px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px 24px;
}
#characterLab.hidden { display: none; }

#leaderboardBackdrop {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(0,0,0,0.5);
}
#leaderboardBackdrop.hidden { display: none; }

#leaderboard {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  width: min(420px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px 24px;
}
#leaderboard.hidden { display: none; }

/* No backdrop on purpose — this floats over the question instead of
   blocking it, since the whole point is computing while reading the prompt. */
#calculator {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 35;
  width: min(260px, 92vw);
  padding: 12px;
}
#calculator.hidden { display: none; }

.calc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
}
.calc-close-btn {
  background: none;
  border: none;
  color: #cddca8;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
}
.calc-close-btn:hover { color: #ffe066; }

.calc-display {
  background: #1a2410;
  border: 2px solid #0f1509;
  border-radius: 2px;
  color: #ffe066;
  font-family: 'Courier New', monospace;
  font-size: 20px;
  text-align: right;
  padding: 10px 10px;
  margin-bottom: 8px;
  overflow-x: auto;
  white-space: nowrap;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}
.calc-btn {
  background: #232a1c;
  border: 1px solid #3d4f26;
  color: #e8e0b8;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  padding: 9px 0;
  border-radius: 3px;
  cursor: pointer;
}
.calc-btn:hover { background: #2c3524; }
.calc-btn-fn { font-size: 11px; color: #cddca8; }
.calc-btn-op { background: #3d4f26; color: #ffe066; }
.calc-btn-op:hover { background: #4a5f2f; }
.calc-btn-clear { color: #d94f4f; }
.calc-btn-equals {
  width: 100%;
  background: #7a9a4a;
  color: #12160b;
  border: 1px solid #ffe066;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  font-size: 15px;
  padding: 9px 0;
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 8px;
}
.calc-btn-equals:hover { background: #8bb058; }
.calc-use-btn { width: 100%; text-align: center; }

.lb-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #232a1c;
  border: 1px solid #3d4f26;
  border-radius: 3px;
  padding: 8px 12px;
}
.lb-row-me { border-color: #ffe066; box-shadow: inset 0 0 0 1px #ffe066; }
.lb-rank { width: 32px; color: #8fa363; font-size: 12px; flex-shrink: 0; }
.lb-name { flex: 1; font-size: 13px; color: #e8e0b8; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name-input { width: 100%; box-sizing: border-box; }
.lb-score { font-size: 13px; color: #ffe066; flex-shrink: 0; }

.cl-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 18px;
  color: #ffe066;
  margin-bottom: 16px;
}
.cl-sub { font-size: 12px; color: #b9c99a; }
.cl-loading, .cl-empty, .cl-error { color: #b9c99a; font-size: 13px; padding: 8px 0; }
.cl-error { color: #ff9a7a; }

.cl-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #232a1c;
  border: 1px solid #3d4f26;
  border-radius: 3px;
  padding: 10px 12px;
}
.cl-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cl-row-name { font-size: 14px; color: #e8e0b8; }
.cl-row-meta { font-size: 11px; color: #8fa363; }
.cl-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.cl-row-actions .small-btn { padding: 6px 10px; font-size: 11px; }

.cl-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

.cl-templates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.cl-template-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  background: #232a1c;
  border: 2px solid #3d4f26;
  border-radius: 3px;
  padding: 12px 14px;
  cursor: pointer;
  color: #e8e0b8;
  font-family: inherit;
}
.cl-template-card:hover { background: #2c3524; border-color: #6b8a44; }
.cl-template-name { font-size: 14px; color: #ffe066; }
.cl-template-desc { font-size: 11px; color: #b9c99a; }
.cl-template-size { font-size: 11px; color: #8fa363; font-family: monospace; }

.cl-frame-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.cl-frame-label { font-size: 13px; color: #cddca8; text-align: center; flex: 1; }

.cl-preview-stage {
  display: flex;
  justify-content: center;
  background: #1a1f14;
  border: 1px solid #3d4f26;
  border-radius: 3px;
  padding: 12px;
  margin-bottom: 10px;
}
.cl-preview-hint { font-size: 11px; color: #8fa363; text-align: center; margin-bottom: 8px; }

.cl-export-text {
  width: 100%;
  height: 160px;
  background: #1a1f14;
  border: 1px solid #3d4f26;
  border-radius: 3px;
  color: #cddca8;
  font-family: monospace;
  font-size: 10px;
  padding: 8px;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 10px;
}

/* ---- Pixel editor widget ---- */
.pixel-editor { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pe-grid-wrap {
  background: #1a1f14;
  border: 2px solid #3d4f26;
  padding: 4px;
  border-radius: 3px;
  overflow: auto;
  max-width: 100%;
}
.pe-grid { display: block; cursor: crosshair; touch-action: none; }

.pe-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.pe-tool-btn {
  background: #232a1c;
  border: 1px solid #3d4f26;
  color: #cddca8;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
}
.pe-tool-btn:hover { background: #2c3524; }
.pe-tool-btn.active { background: #7a9a4a; color: #12160b; border-color: #ffe066; }
.pe-tool-btn:disabled { opacity: 0.4; cursor: default; }
.pe-tool-btn:disabled:hover { background: #232a1c; }

.pe-brush-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; color: #cddca8; }
.pe-brush-label { white-space: nowrap; min-width: 62px; }
.pe-brush { width: 100px; }
.pe-onion-row { display: flex; align-items: center; gap: 6px; cursor: pointer; margin-left: 8px; }

.pe-color-row { display: flex; gap: 16px; align-items: flex-start; }
.pe-wheel { cursor: crosshair; border-radius: 50%; }
.pe-shade-col { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 120px; }
.pe-shade-label { font-size: 10px; color: #b9c99a; text-transform: uppercase; letter-spacing: 0.05em; }
.pe-shade { width: 100%; }
.pe-swatch {
  width: 100%;
  height: 28px;
  border-radius: 3px;
  border: 2px solid #0f1509;
  box-shadow: inset 0 0 0 1px #6b8a44;
}
