.special-alchemy {
  display: grid;
  gap: clamp(22px, 3vw, 34px);
  min-width: 0;
  color: #173d36;
}

.special-alchemy [id] { scroll-margin-top: 30px; }

.alchemy-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 22px;
  padding: 18px 22px;
  border: 1px solid #d9b97b;
  border-left: 5px solid #c48a36;
  border-radius: 10px;
  background: #fff8e9;
}

.alchemy-period div { display: grid; gap: 5px; }
.alchemy-period strong { font-size: 18px; }
.alchemy-period span { color: #745f46; font-size: 14px; line-height: 1.6; }
.alchemy-period .alchemy-period-status {
  padding: 7px 11px;
  border-radius: 999px;
  background: #f1e0b9;
  color: #664719;
  font-size: 13px;
  font-weight: 900;
}

.special-alchemy .alchemy-intro { max-width: 900px; line-height: 1.8; }
.alchemy-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.alchemy-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #cad8d0;
  border-radius: 8px;
  background: #fffdf8;
  font-size: 14px;
}
.alchemy-jump a:hover, .alchemy-jump a:focus-visible { border-color: #248b77; background: #eef8f2; }

.alchemy-section { display: grid; gap: 18px; min-width: 0; }
.alchemy-section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 24px; }
.alchemy-section-head span { color: #248b77; font-size: 11px; font-weight: 900; letter-spacing: .17em; }
.alchemy-section-head h3 { margin: 5px 0 0; font-size: clamp(23px, 2.4vw, 31px); line-height: 1.25; }
.special-alchemy .alchemy-section-head p { max-width: 460px; font-size: 14px; line-height: 1.7; }

.alchemy-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.alchemy-result-card {
  --alchemy-accent: #a97227;
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: clamp(16px, 2vw, 23px);
  border: 1px solid #d8d7c9;
  border-top: 4px solid var(--alchemy-accent);
  border-radius: 10px;
  background: #fffdf8;
  box-shadow: 0 8px 18px rgba(22, 61, 55, .05);
}
.alchemy-result-card--purple { --alchemy-accent: #7f5aaa; }
.alchemy-result-card--red { --alchemy-accent: #b44a48; }
.alchemy-result-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; }
.alchemy-result-top span { color: var(--alchemy-accent); font-weight: 900; }
.alchemy-result-top small { color: #687c72; font-size: 11px; }
.alchemy-recipe-name { font-size: 20px; line-height: 1.45; }
.alchemy-recipe-name sup { display: inline-block; margin-left: 4px; color: #a84832; font-size: 11px; vertical-align: baseline; }
.alchemy-big-cost { display: grid; gap: 3px; }
.alchemy-big-cost small { color: #647b72; font-size: 12px; }
.alchemy-big-cost strong { color: var(--alchemy-accent); font-size: clamp(22px, 2.4vw, 29px); }
.alchemy-result-card dl { display: grid; gap: 9px; margin: 0; }
.alchemy-result-card dl div { display: flex; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid #e8e8de; }
.alchemy-result-card dt { color: #688077; font-size: 12px; }
.alchemy-result-card dd { margin: 0; font-size: 13px; font-weight: 900; text-align: right; }

.alchemy-section--prices { padding: clamp(18px, 2.5vw, 30px); border-radius: 12px; background: #173d36; color: #f7f4ea; }
.alchemy-section--prices .alchemy-section-head span { color: #8ddbc1; }
.alchemy-section--prices .alchemy-section-head p { color: #d8ebe2; }
.alchemy-price-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.alchemy-price-form fieldset { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 14px; border: 1px solid #5e8174; border-radius: 10px; }
.alchemy-price-form legend { padding: 0 6px; font-weight: 900; }
.alchemy-price-form legend small { font-size: 12px; font-weight: 500; }
.alchemy-price-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; font-size: 14px; }
.alchemy-price-input { display: flex; align-items: center; gap: 5px; width: min(150px, 55%); padding: 0 8px; border: 1px solid #8db2a5; border-radius: 6px; background: #fff; color: #173d36; }
.alchemy-price-input input { width: 100%; min-width: 0; min-height: 36px; border: 0; background: transparent; color: #173d36; font: inherit; text-align: right; }
.alchemy-price-input input:focus-visible { outline: 2px solid #248b77; outline-offset: 2px; }
.alchemy-price-input small { font-size: 12px; }
.alchemy-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; grid-column: 1 / -1; }
.alchemy-form-foot p { color: #d8ebe2 !important; font-size: 13px; }
.alchemy-form-foot button { min-height: 40px; padding: 8px 14px; border: 1px solid #acc7bc; border-radius: 6px; background: transparent; color: #fff; cursor: pointer; }
.alchemy-form-foot button:hover, .alchemy-form-foot button:focus-visible { background: #2d6052; }
.alchemy-recommendation { padding: 16px 18px; border-left: 4px solid #e6bc65; border-radius: 6px; background: #255045; }
.alchemy-recommendation p { color: #f7f4ea !important; line-height: 1.75; }

.alchemy-goal-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.alchemy-goal-tabs button { min-height: 42px; padding: 8px 16px; border: 1px solid #cad8d0; border-radius: 7px; background: #fffdf8; color: #173d36; cursor: pointer; }
.alchemy-goal-tabs button[aria-selected="true"] { border-color: #1f755f; background: #1f755f; color: white; font-weight: 900; }
.alchemy-goal-tabs button:focus-visible { outline: 3px solid #e8ac67; outline-offset: 2px; }
.alchemy-table-scroll { overflow-x: auto; border: 1px solid #d2dacf; border-radius: 9px; background: #fffdf8; }
.alchemy-table-scroll table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 13px; text-align: left; }
.alchemy-table-scroll th, .alchemy-table-scroll td { padding: 13px 11px; border-bottom: 1px solid #e5e9df; white-space: nowrap; }
.alchemy-table-scroll thead { background: #e3eee8; color: #173d36; }
.alchemy-table-scroll tbody tr:last-child th, .alchemy-table-scroll tbody tr:last-child td { border-bottom: 0; }
.alchemy-table-scroll tbody th { white-space: normal; min-width: 180px; }
.alchemy-table-scroll .alchemy-best-row { background: #fff6df; }
.alchemy-rank { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 7px; border-radius: 50%; background: #e7eee7; font-size: 12px; }
.alchemy-method ol { display: grid; gap: 10px; margin: 0; padding-left: 1.5em; line-height: 1.8; }
.alchemy-source-note { padding: 16px 18px; border: 1px solid #c7dbd1; border-radius: 8px; background: #eef7f1; }
.alchemy-source-note strong { color: #176d57; }
.alchemy-source-note p { margin-top: 5px !important; line-height: 1.75; }
.alchemy-related { line-height: 1.8; }
.alchemy-related a { color: #176d57; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 980px) {
  .alchemy-summary-grid { grid-template-columns: 1fr; }
  .alchemy-price-form { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .alchemy-period { padding: 14px 16px; }
  .alchemy-jump a { flex: 1 1 calc(50% - 8px); justify-content: center; font-size: 13px; }
  .alchemy-goal-tabs button { flex: 1; padding-inline: 8px; font-size: 13px; }
  .alchemy-price-field { font-size: 13px; }
  .alchemy-price-input { width: min(140px, 54%); }
}
