.shadow-tool {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 14px 40px rgba(39, 35, 27, 0.0431372549);
}

.shadow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
}

.shadow-controls, .shadow-preview-column {
  min-width: 0;
}

.shadow-controls__top, .shadow-preview__header, .shadow-code__header, .shadow-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shadow-controls h2, .shadow-preview__header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.05em;
}

.shadow-list {
  display: grid;
  gap: 12px;
}

.shadow-item {
  margin-top: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}

.shadow-item.is-disabled {
  opacity: 0.55;
}

.shadow-item__header {
  margin-bottom: 12px;
}

.shadow-item__header strong {
  font-size: 12px;
}

.shadow-item__header div {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.shadow-item__header button, .shadow-preset-list button {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--muted);
  font: 10px inherit;
  cursor: pointer;
}

.shadow-item__header button:hover, .shadow-preset-list button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.shadow-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.shadow-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 18px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.shadow-field > span {
  grid-column: 1/-1;
  color: var(--ink);
  font-weight: 700;
}

.shadow-field input[type=range] {
  width: 100%;
  accent-color: var(--ink);
}

.shadow-field input[type=number], .shadow-color input[type=text] {
  width: 100%;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.shadow-field em {
  font-style: normal;
}

.shadow-color {
  grid-template-columns: 34px minmax(0, 1fr);
}

.shadow-color input[type=color] {
  width: 34px;
  height: 29px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.shadow-color input[type=text] {
  grid-column: 2;
}

.shadow-inset {
  display: flex;
  align-items: center;
  gap: 7px;
  align-self: end;
  min-height: 29px;
  color: var(--muted);
  font-size: 11px;
}

.shadow-inset input, .shadow-checkbox input {
  accent-color: var(--ink);
}

.shadow-presets {
  margin-top: 19px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.shadow-presets h3 {
  margin: 0 0 10px;
  font-size: 13px;
}

.shadow-preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shadow-preview__header {
  margin-bottom: 12px;
}

.shadow-preview__header label, .shadow-radius {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.shadow-preview__header select {
  padding: 7px 22px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.shadow-preview {
  display: grid;
  place-items: center;
  min-height: 350px;
  padding: 30px;
  border-radius: 14px;
  transition: background 0.2s;
}

.shadow-preview--light {
  background: #f5f3ee;
}

.shadow-preview--gray {
  background: #cfcfcf;
}

.shadow-preview--dark {
  background: #252525;
}

.shadow-card {
  display: grid;
  place-items: center;
  width: min(260px, 100%);
  height: 150px;
  border-radius: 18px;
  background: #fff;
  color: #171717;
  font-size: 13px;
  font-weight: 700;
}

.shadow-radius {
  margin-top: 12px;
}

.shadow-radius input {
  flex: 1;
  accent-color: var(--ink);
}

.shadow-radius output {
  min-width: 38px;
  font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.shadow-code {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--paper);
}

.shadow-code__header {
  padding: 11px 13px;
  background: var(--white);
  font-size: 12px;
}

.shadow-code pre {
  min-height: 72px;
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.shadow-checkbox {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px 11px;
  color: var(--muted);
  font-size: 11px;
}

.shadow-bottom-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.shadow-bottom-actions .json-status {
  flex: 1;
  margin: 0;
}

.shadow-generator-page .tool-content {
  margin-top: 20px;
}

@media (max-width: 900px) {
  .shadow-layout {
    grid-template-columns: 1fr;
  }
  .shadow-preview-column {
    order: -1;
  }
}
@media (max-width: 520px) {
  .shadow-tool {
    padding: 12px;
    border-radius: 15px;
  }
  .shadow-preview {
    min-height: 260px;
    padding: 20px;
  }
  .shadow-card {
    height: 125px;
  }
  .shadow-item__header {
    align-items: flex-start;
    flex-direction: column;
  }
  .shadow-item__header div {
    width: 100%;
  }
  .shadow-item__header button {
    flex: 1;
  }
  .shadow-fields {
    grid-template-columns: 1fr;
  }
  .shadow-preview__header {
    align-items: flex-start;
    flex-direction: column;
  }
  .shadow-preview__header select {
    width: 100%;
  }
  .shadow-bottom-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
