.box-shadow-generator-page {
  background: #fff;
}

.box-shadow-tool,
.box-shadow-tool * {
  box-sizing: border-box;
}

.box-shadow-tool [hidden] {
  display: none !important;
}

.box-shadow-tool {
  --box-shadow-tool-ink: #172033;
  --box-shadow-tool-muted: #667085;
  --box-shadow-tool-line: #e6eaf0;
  --box-shadow-tool-soft: #f8fafc;
  --box-shadow-tool-blue-soft: #effaff;
  --box-shadow-tool-pink-soft: #fff0fa;
  color: var(--box-shadow-tool-ink);
  padding: 12px 0 40px;
}

.box-shadow-tool__app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 18px;
  align-items: start;
  margin-top: 12px;
}

.box-shadow-tool__main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.box-shadow-tool__sample-groups {
  display: grid;
  gap: 10px;
}

.box-shadow-tool__sample-heading,
.box-shadow-tool__mini-heading {
  margin: 0;
  color: var(--box-shadow-tool-ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.box-shadow-tool__sample-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.box-shadow-tool__sample-head {
  align-items: flex-start;
}

.box-shadow-tool__sample-head > div:first-child {
  min-width: 0;
}

.box-shadow-tool__box-palette {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  max-width: 320px;
}

.box-shadow-tool__palette-custom {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  color: var(--box-shadow-tool-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.box-shadow-tool__palette-custom input {
  width: 34px;
  height: 28px;
  padding: 2px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.box-shadow-tool__sample-card {
  display: grid;
  grid-template-rows: auto 118px;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #fff;
  color: var(--box-shadow-tool-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.box-shadow-tool__sample-card:hover,
.box-shadow-tool__sample-card:focus-visible {
  border-color: var(--accent-color);
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.box-shadow-tool__sample-card:focus-visible,
.box-shadow-tool button:focus-visible,
.box-shadow-tool input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-color) 24%, transparent);
  outline-offset: 2px;
}

.box-shadow-tool__sample-card.is-active {
  border-color: var(--accent-color);
  background: var(--box-shadow-tool-blue-soft);
}

.box-shadow-tool__sample-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.box-shadow-tool__sample-preview {
  display: grid;
  place-items: center;
  min-height: 118px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.box-shadow-tool__sample-preview span {
  display: block;
  width: min(150px, 72%);
  height: 76px;
  border-radius: 8px;
  background: #fff;
}

.box-shadow-tool__control-grid {
  align-items: stretch;
}

.box-shadow-tool__range-card {
  min-width: 0;
}

.box-shadow-tool__range-row,
.box-shadow-tool__color-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.box-shadow-tool__range-row input[type="range"] {
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  accent-color: var(--accent-color);
}

.box-shadow-tool__range-row input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-color), color-mix(in srgb, var(--accent-color) 28%, #ffffff));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-color) 20%, transparent);
}

.box-shadow-tool__range-row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.18);
}

.box-shadow-tool__range-row input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-color), color-mix(in srgb, var(--accent-color) 28%, #ffffff));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-color) 20%, transparent);
}

.box-shadow-tool__range-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.18);
}

.box-shadow-tool__number {
  text-align: right;
}

.box-shadow-tool__color {
  width: 52px;
  height: 42px;
  padding: 2px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
}

.box-shadow-tool__color-row {
  grid-template-columns: 54px minmax(0, 1fr);
  width: 100%;
}

.box-shadow-tool__color-row .omoshiro-tool__input {
  min-width: 0;
  width: 100%;
}

.box-shadow-tool__inset {
  margin-top: 12px;
}

.box-shadow-tool__layer-list {
  display: grid;
  gap: 8px;
}

.box-shadow-tool__layer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #f8fafc;
}

.box-shadow-tool__layer-card.is-active {
  border-color: var(--accent-color);
  background: var(--box-shadow-tool-blue-soft);
}

.box-shadow-tool__layer-select {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--box-shadow-tool-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.box-shadow-tool__layer-select strong,
.box-shadow-tool__layer-select span {
  display: block;
}

.box-shadow-tool__layer-select strong {
  font-size: 14px;
  line-height: 1.4;
}

.box-shadow-tool__layer-select span {
  margin-top: 2px;
  color: var(--box-shadow-tool-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.box-shadow-tool__layer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.box-shadow-tool__icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.box-shadow-tool__icon-button:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.box-shadow-tool__icon-button--danger:hover {
  border-color: var(--main-color);
  color: var(--main-color);
}

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

.box-shadow-tool__preview-stage {
  display: grid;
  place-items: center;
  min-height: 246px;
  padding: 28px 20px;
  overflow: hidden;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #fff;
}

.box-shadow-tool__preview-box {
  display: grid;
  place-items: center;
  max-width: 100%;
  border: 0;
  background: #fff;
  color: #172033;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  transition: box-shadow 0.16s, width 0.16s, height 0.16s, border-radius 0.16s, background-color 0.16s;
}

.box-shadow-tool__preview-box.is-button {
  color: #fff;
  background: var(--accent-color);
}

.box-shadow-tool__preview-box.is-square {
  aspect-ratio: 1 / 1;
}

.box-shadow-tool__radio-list {
  width: 100%;
}

.box-shadow-tool__preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.box-shadow-tool__preview-grid input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 2px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
}

.box-shadow-tool__class-label {
  display: grid;
  gap: 6px;
  color: var(--box-shadow-tool-ink);
  font-size: 13px;
  font-weight: 800;
}

.box-shadow-tool__code,
.box-shadow-tool__guide-code {
  width: 100%;
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #101828;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre;
}

.box-shadow-tool__button-stack {
  width: 100%;
}

.box-shadow-tool__copy-message {
  margin: 0;
}

.box-shadow-tool__empty {
  margin: 0;
  color: var(--box-shadow-tool-muted);
  font-size: 13px;
  line-height: 1.6;
}

.box-shadow-tool__guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.box-shadow-tool__guide .omoshiro-tool__feature-card {
  min-width: 0;
}

.box-shadow-tool__guide-code {
  margin-top: 10px;
  background: #172033;
}

.box-shadow-tool code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 1100px) {
  .box-shadow-tool__sample-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .box-shadow-tool__app,
  .box-shadow-tool__guide-grid {
    grid-template-columns: 1fr;
  }

  .box-shadow-tool .box-shadow-tool__side.omoshiro-tool__side-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .box-shadow-tool .box-shadow-tool__sample-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .box-shadow-tool .box-shadow-tool__sample-head > div:first-child {
    width: 100%;
  }

  .box-shadow-tool .box-shadow-tool__box-palette {
    justify-content: flex-start;
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .box-shadow-tool {
    padding-bottom: 28px;
  }

  .box-shadow-tool__sample-grid,
  .box-shadow-tool__control-grid,
  .box-shadow-tool__preview-grid {
    grid-template-columns: 1fr;
  }

  .box-shadow-tool__sample-card {
    grid-template-rows: auto 104px;
  }

  .box-shadow-tool__sample-preview {
    min-height: 104px;
  }

  .box-shadow-tool__sample-preview span {
    width: min(138px, 76%);
    height: 68px;
  }

  .box-shadow-tool__range-row {
    grid-template-columns: 1fr;
  }

  .box-shadow-tool__number {
    text-align: left;
  }

  .box-shadow-tool__layer-card {
    grid-template-columns: 1fr;
  }

  .box-shadow-tool__layer-actions {
    justify-content: flex-start;
  }

  .box-shadow-tool__preview-stage {
    min-height: 210px;
    padding: 24px 14px;
  }
}
