body {
  font-family: "Geologica", sans-serif;
  color: #e1e5eb;
  background: linear-gradient(-45deg, #1b1229, #150f2b, #231746, #0f0820);
  background-size: 400% 400%;
  animation: bgMove 20s ease infinite alternate;
  padding: 20px 30px;
  overflow-x: hidden;
  max-width: 900px;
  margin: 0 auto 50px auto; 
  box-sizing: border-box;
  position: relative;
}

h1, h2 {
    text-align: center;
    color: #9eb8db;
    margin-top: 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid #2c3347;
    padding-bottom: 10px;
}

h1 {
    color: #a8c5e9;
    letter-spacing: -0.5px;
}

h3 {
  color: #9eb8db;
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 16px;
  padding-bottom: 5px;
  border-bottom: 1px dashed #3a4152;
}
  
button {
    padding: 12px 25px;
    border-radius: 4px;
    border: none;
    background: #4876b2;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s;
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 10px auto;
    font-weight: 500;
}
  
button:hover {
    background: #5a8ac6;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}
  
input[type="number"], 
input[type="text"],
select {
    width: 98%;
    padding: 10px;
    border-radius: 4px;
    background: #232836;
    border: 1px solid #3a4152;
    color: #e1e5eb;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}
  
input[type="number"] {
    width: 98%;
}

input:focus, select:focus {
    outline: none;
    border-color: #5a8ac6;
    box-shadow: 0 0 0 3px rgba(72, 118, 178, 0.2);
}
  
section {
    background: #232836a1;
    padding: 20px;
    margin: 20px 0;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #2c3347;
}

section h2 {
    font-size: 18px;
    margin-top: 0;
    border-bottom-color: #2c3347;
}

footer {
    text-align: center;
    padding: 15px;
    background: #232836;
    border-radius: 6px;
    border: 1px solid #2c3347;
    margin-top: 30px;
}
  
footer a {
    color: #9eb8db;
    margin: 0 6px;
    text-decoration: none;
    font-weight: 500;
}
  
footer a:hover {
    color: #a8c5e9;
    text-decoration: underline;
}

ul {
    padding-left: 20px;
}

li {
    margin-bottom: 6px;
}

ul#favoritesList li {
  background: #2a303e;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-left: 3px solid #ffc107;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

ul#productionList li, 
ul#reagentsList li,
ul#baseReagentsList li {
    background: #2a303e;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-left: 3px solid #4876b2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#themeToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.2);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.particle {
  position: fixed;
  bottom: -5px;
  width: 4px;
  height: 4px;
  background: rgba(255,255,255,0.8);
  opacity: 0.8;
  border-radius: 50%;
  animation: float linear infinite;
  pointer-events: none;
  z-index: -1;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #9eb8db;
}
  
.formContainer {
  background: #232836a1;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid #2c3347;
  margin-bottom: 20px;
}

.empty-message {
    color: #626d85;
    font-style: italic;
    text-align: center;
    padding: 15px 0;
    border-left: none !important;
}


.delete-btn {
    background: transparent;
    color: #8497b1;
    border: none;
    font-size: 14px;
    padding: 5px 10px;
    margin: 0;
    cursor: pointer;
    transition: color 0.2s;
    border-radius: 4px;
    width: auto;
    display: inline-block;
}

.delete-btn:hover {
    color: #e1e5eb;
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

.crafting-steps {
    background: #2a303e;
    border-radius: 4px;
    padding: 15px;
    border: 1px solid #2c3347;
    margin-bottom: 25px;
}

.crafting-step {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #3a4152;
}

.crafting-step:last-child {
    border-bottom: none;
}

.step-number {
    font-size: 18px;
    font-weight: 700;
    color: #4876b2;
    padding-right: 15px;
    width: 30px;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    color: #a8c5e9;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.temp-req {
    font-size: 0.85em;
    background-color: rgba(216, 88, 40, 0.3);
    color: #ffc107;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
    border-left: 2px solid #ffc107;
}

.step-ingredients {
    padding-left: 20px;
    margin: 0;
}

.step-ingredients li {
    color: #e1e5eb;
    margin-bottom: 4px;
}

.light-theme {
  color: #333;
  background-color: #bebeff;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e0e0e6' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.light-theme h1, .light-theme h2 {
  color: #2c5282;
  border-bottom-color: #ddd;
}

.light-theme h1 {
  color: #1a365d;
}

.light-theme button {
  background: #3182ce;
  color: #fff;
}

.light-theme button:hover {
  background: #4299e1;
}

.light-theme input[type="number"], 
.light-theme input[type="text"],
.light-theme select {
  background: #fff;
  border: 1px solid #cbd5e0;
  color: #2d3748;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.light-theme .formContainer,
.light-theme section,
.light-theme footer {
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.light-theme .form-group label {
  color: #2c5282;
}

.light-theme .crafting-steps {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.light-theme .step-title {
  color: #2c5282;
}

.light-theme #themeToggle {
  background: rgba(0,0,0,0.1);
  color: #333;
}

.light-theme ul#productionList li, 
.light-theme ul#reagentsList li,
.light-theme ul#baseReagentsList li,
.light-theme ul#favoritesList li {
  background: #f8fafc;
  border-left: 3px solid #3182ce;
}

.light-theme .crafting-step {
  border-bottom-color: #e2e8f0;
}

.light-theme .empty-message {
  color: #718096;
}

.light-theme footer a {
  color: #2c5282;
}

.light-theme footer a:hover {
  color: #1a365d;
}

.fav-btn, .use-btn {
  background: transparent;
  color: #8497b1;
  border: none;
  font-size: 14px;
  padding: 5px 10px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 4px;
  width: auto;
  display: inline-block;
}

.fav-btn {
  color: #ffc107;
}

.use-btn {
  color: #4876b2;
}

.fav-btn:hover, .use-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: none;
}

.light-theme .fav-btn:hover, .light-theme .use-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.item-buttons, .fav-buttons {
  display: flex;
  align-items: center;
}

.favorites-section h2 {
  display: flex;
  align-items: center;
  justify-content: center;
}

.favorites-section h2:before {
  color: #ffc107;
  margin-right: 10px;
}

.ripple {
  position: fixed;
  width: 10px; height: 10px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  animation: rippleEffect 0.8s ease-out;
  pointer-events: none;
}

.fade-in {
  animation: fadeIn 1s ease forwards;
}

.error-message {
  color: #ff5252;
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

.error-highlight {
  border-color: #ff5252 !important;
  box-shadow: 0 0 0 2px rgba(255, 82, 82, 0.2) !important;
  animation: shake 0.5s ease-in-out;
}

.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ff5252;
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  z-index: 1000;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.notification.show {
  opacity: 1;
}

.light-theme .notification {
  background-color: #e53e3e;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (max-width: 600px) {
  body {
      padding: 15px;
  }

  h1 {
      font-size: 24px;
  }

  h2 {
      font-size: 18px;
  }
}

.utility-controls {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-picker select {
  width: auto;
  min-width: 58px;
  height: 40px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(32, 45, 47, 0.82);
  color: var(--paper);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.language-picker select:hover,
.language-picker select:focus {
  border-color: var(--line-strong);
  background: rgba(42, 61, 61, 0.96);
  outline: none;
  transform: translateY(-1px);
}

.light-theme .language-picker select {
  background: rgba(255, 255, 255, 0.82);
  color: #1c2a29;
  border-color: rgba(47, 105, 91, 0.2);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .utility-controls {
    top: 14px;
    right: 14px;
  }

  .language-picker select,
  #themeToggle {
    height: 36px;
  }
}

@keyframes bgMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  to { transform: translateY(-110vh); opacity: 0; }
}

/* Calm laboratory interface refresh */
:root {
  --ink-950: #101719;
  --ink-900: #172124;
  --ink-800: #202d2f;
  --line: rgba(159, 207, 191, 0.18);
  --line-strong: rgba(159, 207, 191, 0.42);
  --paper: #e8f1eb;
  --muted: #9eb1ab;
  --mint: #9fd0bf;
  --mint-bright: #c0ead9;
  --coral: #ef9b7a;
  --shadow: 0 18px 45px rgba(4, 10, 11, 0.22);
}

html {
  min-height: 100%;
  background: #0d1416;
}

body {
  max-width: 960px;
  color: var(--paper);
  background: transparent;
  padding: 36px 30px 64px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(159, 207, 191, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 207, 191, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 15% 12%, rgba(159, 207, 191, 0.12), transparent 32%),
    radial-gradient(circle at 85% 86%, rgba(239, 155, 122, 0.08), transparent 30%),
    #0d1416;
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  animation: atmosphereDrift 24s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, rgba(192, 234, 217, 0.035) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: lightSweep 18s ease-in-out infinite;
}

h1, h2 {
  color: var(--mint-bright);
  border-bottom-color: var(--line);
  letter-spacing: 0;
}

h1 {
  text-shadow: 0 0 28px rgba(159, 207, 191, 0.2);
}

h3 {
  color: var(--mint);
  border-bottom-color: var(--line);
}

.formContainer,
section,
footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(32, 45, 47, 0.88), rgba(20, 29, 31, 0.9));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: border-color 240ms ease, transform 240ms ease, box-shadow 240ms ease;
}

.formContainer::before,
section::before,
footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.formContainer:hover,
section:hover,
footer:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 24px 55px rgba(4, 10, 11, 0.3);
}

.formContainer {
  padding: 26px;
}

.form-group label {
  color: var(--mint);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  box-sizing: border-box;
  background: rgba(13, 20, 22, 0.68);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--paper);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input:hover,
input:focus {
  background: rgba(13, 20, 22, 0.9);
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(159, 207, 191, 0.1);
}

button:not(#themeToggle) {
  max-width: none;
  border-radius: 8px;
  background: var(--mint);
  color: #13201e;
  box-shadow: 0 8px 18px rgba(159, 207, 191, 0.12);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

button:not(#themeToggle):hover {
  background: var(--mint-bright);
  box-shadow: 0 12px 24px rgba(159, 207, 191, 0.2);
  transform: translateY(-2px);
}

button:not(#themeToggle):active {
  transform: translateY(0) scale(0.98);
}

ul#productionList,
ul#favoritesList,
ul#reagentsList,
ul#baseReagentsList {
  display: grid;
  gap: 9px;
  padding-left: 0;
}

ul#productionList li,
ul#favoritesList li,
ul#reagentsList li,
ul#baseReagentsList li {
  min-height: 24px;
  box-sizing: border-box;
  margin-bottom: 0;
  padding: 11px 14px;
  background: rgba(32, 45, 47, 0.72);
  border: 1px solid transparent;
  border-left: 3px solid var(--mint);
  border-radius: 8px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  animation: cardAppear 420ms both;
}

ul#productionList li:hover,
ul#favoritesList li:hover,
ul#reagentsList li:hover,
ul#baseReagentsList li:hover {
  background: rgba(42, 61, 61, 0.92);
  border-color: var(--line-strong);
  transform: translateX(4px);
  box-shadow: 0 8px 20px rgba(4, 10, 11, 0.18);
}

ul#productionList li:nth-child(2),
ul#favoritesList li:nth-child(2),
ul#reagentsList li:nth-child(2),
ul#baseReagentsList li:nth-child(2) { animation-delay: 45ms; }

ul#productionList li:nth-child(3),
ul#favoritesList li:nth-child(3),
ul#reagentsList li:nth-child(3),
ul#baseReagentsList li:nth-child(3) { animation-delay: 90ms; }

.crafting-steps {
  background: rgba(13, 20, 22, 0.42);
  border-color: var(--line);
  border-radius: 10px;
  transition: border-color 200ms ease, background 200ms ease;
}

.crafting-steps:hover {
  background: rgba(13, 20, 22, 0.6);
  border-color: var(--line-strong);
}

.crafting-step {
  border-bottom-color: var(--line);
  transition: padding-left 180ms ease;
}

.crafting-step:hover {
  padding-left: 6px;
}

.step-number {
  color: var(--coral);
}

.step-title {
  color: var(--mint-bright);
}

.temp-req {
  background: rgba(239, 155, 122, 0.14);
  color: var(--coral);
  border-left-color: var(--coral);
}

.particle {
  width: 3px;
  height: 3px;
  background: var(--mint-bright);
  opacity: 0.25;
  box-shadow: 0 0 10px rgba(192, 234, 217, 0.5);
  animation: floatSoft linear infinite;
}

#themeToggle {
  background: rgba(32, 45, 47, 0.72);
  border: 1px solid var(--line);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

#themeToggle:hover {
  background: rgba(42, 61, 61, 0.96);
  border-color: var(--line-strong);
  transform: rotate(12deg) scale(1.06);
}

footer a {
  color: var(--mint);
  transition: color 180ms ease, text-shadow 180ms ease;
}

footer a:hover {
  color: var(--mint-bright);
  text-shadow: 0 0 12px rgba(192, 234, 217, 0.45);
  text-decoration: none;
}

.light-theme {
  color: #1c2a29;
  background: transparent;
}

.light-theme::before {
  background:
    linear-gradient(rgba(47, 105, 91, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 105, 91, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 15% 12%, rgba(159, 207, 191, 0.3), transparent 32%),
    #edf5f0;
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.light-theme .formContainer,
.light-theme section,
.light-theme footer {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(47, 105, 91, 0.16);
  box-shadow: 0 18px 45px rgba(47, 105, 91, 0.1);
}

.light-theme ul#productionList li,
.light-theme ul#favoritesList li,
.light-theme ul#reagentsList li,
.light-theme ul#baseReagentsList li {
  background: rgba(239, 248, 243, 0.88);
  border-left-color: #438b77;
}

.light-theme ul#productionList li:hover,
.light-theme ul#favoritesList li:hover,
.light-theme ul#reagentsList li:hover,
.light-theme ul#baseReagentsList li:hover {
  background: #f6fbf8;
  border-color: rgba(47, 105, 91, 0.28);
}

@keyframes atmosphereDrift {
  from { background-position: 0 0, 0 0, 15% 12%, 85% 86%, 0 0; }
  to { background-position: 18px 12px, -12px 16px, 19% 16%, 80% 82%, 0 0; }
}

@keyframes lightSweep {
  0%, 55% { transform: translateX(-100%); opacity: 0; }
  70% { opacity: 0.7; }
  100% { transform: translateX(100%); opacity: 0; }
}

@keyframes floatSoft {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  15% { opacity: 0.28; }
  85% { opacity: 0.18; }
  100% { transform: translate3d(18px, -105vh, 0); opacity: 0; }
}

@keyframes cardAppear {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.crafting-tree {
  position: relative;
  margin: 24px 0 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(32, 45, 47, 0.72), rgba(13, 20, 22, 0.42));
  box-shadow: 0 14px 32px rgba(4, 10, 11, 0.16);
}

.tree-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: center;
  margin: -2px -2px 18px;
  padding: 4px 4px 16px 18px;
  border-bottom: 1px solid var(--line);
}

.tree-kicker {
  grid-column: 1 / -1;
  color: var(--coral);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.tree-header h3 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--mint-bright);
  font-size: 1.1rem;
}

.tree-summary {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.tree-branches {
  position: relative;
  margin: 0;
  padding: 6px 0 4px 18px;
  border: 0;
  background: transparent;
}

.tree-branches::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 7px;
  width: 1px;
  background: linear-gradient(var(--line-strong), var(--line), transparent);
}

.tree-branches .crafting-step {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  padding: 12px 14px 12px 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(32, 45, 47, 0.34);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.tree-branches .crafting-step::before {
  content: "";
  position: absolute;
  top: 25px;
  left: -18px;
  width: 18px;
  height: 1px;
  background: var(--line-strong);
}

.tree-branches .crafting-step::after {
  content: "";
  position: absolute;
  top: 20px;
  left: -23px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--mint);
  border-radius: 50%;
  background: var(--ink-900);
  box-shadow: 0 0 0 4px rgba(159, 207, 191, 0.08);
}

.tree-branches .crafting-step:hover {
  padding-left: 10px;
  background: rgba(42, 61, 61, 0.76);
  border-color: var(--line-strong);
  transform: translateX(4px);
}

.tree-branches .crafting-step.is-target {
  background: rgba(159, 207, 191, 0.1);
  border-color: rgba(159, 207, 191, 0.38);
}

.tree-branches .crafting-step.is-target::after {
  border-color: var(--coral);
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(239, 155, 122, 0.14), 0 0 16px rgba(239, 155, 122, 0.34);
}

.tree-branches .step-number {
  width: 34px;
  padding-right: 12px;
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted);
}

.tree-branches .is-target .step-number {
  color: var(--coral);
}

.tree-branches .step-ingredients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 5px 12px;
  padding-left: 0;
  list-style: none;
}

.tree-branches .step-ingredients li {
  margin: 0;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(13, 20, 22, 0.38);
  color: var(--muted);
  font-size: 0.82rem;
}

.light-theme .crafting-tree {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(47, 105, 91, 0.2);
  box-shadow: 0 14px 32px rgba(47, 105, 91, 0.08);
}

.light-theme .tree-header h3 {
  color: #2f695b;
}

.light-theme .tree-branches .crafting-step {
  background: rgba(239, 248, 243, 0.62);
}

.light-theme .tree-branches .crafting-step::after {
  background: #f6fbf8;
}

.light-theme .tree-branches .step-ingredients li {
  background: rgba(224, 239, 231, 0.72);
  color: #55726a;
}

@media (max-width: 600px) {
  .crafting-tree {
    padding: 13px;
  }

  .tree-header {
    padding-left: 12px;
  }

  .tree-summary {
    grid-column: 1 / -1;
  }

  .tree-branches {
    padding-left: 15px;
  }

  .tree-branches .step-title {
    flex-wrap: wrap;
    gap: 5px;
  }
}

.utility-controls #themeToggle {
  position: static;
  top: auto;
  right: auto;
  margin: 0;
}

.material-category {
  color: #7f8a9e;
  font-size: 0.86em;
  font-weight: 400;
}

.light-theme .material-category {
  color: #707887;
}