.css-button-design-gallery-page {
  background: #fff;
}

.button-gallery,
.button-gallery * {
  box-sizing: border-box;
}

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

.button-gallery [hidden] {
  display: none !important;
}

.button-gallery__app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 18px;
  align-items: start;
  margin-top: 12px;
}

.button-gallery__main,
.button-gallery__side {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.button-gallery__tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 10px;
  padding: 2px 0 14px;
  scrollbar-gutter: stable;
}

.button-gallery__list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.button-gallery__shape-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.button-gallery__arrow-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid #d9e1ea;
  border-radius: 999px;
  background: #fff;
  color: var(--button-gallery-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.button-gallery__arrow-toggle.is-active {
  border-color: var(--accent-color);
  background: var(--button-gallery-blue-soft);
}

.button-gallery__toggle-icon {
  font-size: 18px;
  line-height: 1;
}

.button-gallery__shape-option {
  display: inline-flex;
  cursor: pointer;
}

.button-gallery__shape-option input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.button-gallery__shape-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #d9e1ea;
  border-radius: 999px;
  background: #fff;
  color: var(--button-gallery-ink);
  font-size: 13px;
  font-weight: 800;
}

.button-gallery__shape-option input:checked + span {
  border-color: var(--accent-color);
  background: var(--button-gallery-blue-soft);
}

.button-gallery__tab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #d9e1ea;
  border-radius: 999px;
  background: #fff;
  color: var(--button-gallery-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button-gallery__tab.is-active {
  border-color: var(--accent-color);
  background: var(--button-gallery-blue-soft);
}

.button-gallery__count {
  margin-bottom: 8px;
  color: var(--button-gallery-muted);
  font-size: 13px;
  font-weight: 800;
}

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

.button-gallery__card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #fff;
  color: var(--button-gallery-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

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

.button-gallery__card.is-active {
  border-color: var(--accent-color);
  background: var(--button-gallery-blue-soft);
}

.button-gallery__sample-wrap {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
}

.button-gallery__sample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  white-space: nowrap;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  text-align: center;
}

.button-gallery__sample.has-arrow-icon::after,
.button-gallery__preview-button.has-arrow-icon::after {
  content: "chevron_right";
  position: absolute;
  top: 50%;
  right: 0.9em;
  transform: translateY(-50%);
  font-family: "Material Symbols Rounded";
  font-size: 1em;
  font-weight: 400;
  line-height: 1;
}

.button-gallery__card-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.button-gallery__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.button-gallery__tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #333;
  font-size: 11px;
  font-weight: 400;
}

.button-gallery__settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.button-gallery__settings-grid > .omoshiro-tool__setting-card.button-gallery__setting-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}

.button-gallery__setting-row.is-disabled {
  opacity: 0.48;
}

.button-gallery__setting-row.is-disabled input {
  cursor: not-allowed;
}

.button-gallery__settings-grid > .button-gallery__setting-row > .omoshiro-tool__setting-label {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

.button-gallery__color-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.button-gallery__color-row .omoshiro-tool__input {
  min-width: 0;
  width: 100%;
}

.button-gallery__gradient-card {
  grid-column: 1 / -1;
}

.button-gallery__gradient-colors {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  min-width: 0;
}

.button-gallery__gradient-color {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--button-gallery-muted);
  font-size: 12px;
  font-weight: 800;
}

.button-gallery__color {
  width: 46px;
  height: 38px;
  padding: 2px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
}

.button-gallery__range-row {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

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

.button-gallery__range-row input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-color), #b7e6ff);
}

.button-gallery__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);
}

.button-gallery__number {
  text-align: right;
}

.button-gallery__preview-stage {
  display: grid;
  place-items: center;
  min-height: 250px;
  padding: 28px 18px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #fff;
}

.button-gallery__preview-button {
  border: 0;
  font: inherit;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  cursor: pointer;
}

.button-gallery__preview-button:hover,
.button-gallery__preview-button:focus-visible {
  transform: translateY(-2px);
}

.button-gallery__preview-button[data-hover-css]:not([data-hover-css=""]):hover,
.button-gallery__preview-button[data-hover-css]:not([data-hover-css=""]):focus-visible {
  transform: translateY(4px);
}

.button-gallery__code,
.button-gallery__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;
}

.button-gallery__code-details {
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.button-gallery__icon-note {
  margin: -2px 0 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--accent-color) 28%, #edf1f5);
  border-radius: 8px;
  background: var(--button-gallery-blue-soft);
  color: #25637f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.button-gallery .button-gallery__code-summary {
  padding: 10px 12px;
  color: var(--accent-color) !important;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  list-style-position: inside;
}

.button-gallery .button-gallery__code-summary::marker {
  color: var(--accent-color);
}

.button-gallery__side .omoshiro-tool__button-stack {
  gap: 8px;
  margin-top: 2px;
}

.button-gallery .button-gallery__code-summary:hover,
.button-gallery .button-gallery__code-summary:focus-visible {
  background: var(--button-gallery-blue-soft);
}

.button-gallery__code-actions {
  display: flex;
  justify-content: flex-end;
  padding: 8px 10px;
  border-top: 1px solid #d9e1ea;
  background: #f8fafc;
}

.button-gallery__mini-copy {
  padding: 7px 12px;
  border: 1px solid var(--accent-color);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-color);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.button-gallery__mini-copy:hover,
.button-gallery__mini-copy:focus-visible {
  background: var(--button-gallery-blue-soft);
}

.button-gallery__code-details .button-gallery__code {
  border: 0;
  border-top: 1px solid #d9e1ea;
  border-radius: 0;
}

.button-gallery__copy-message {
  margin: 0;
}

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

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

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

@media (max-width: 900px) {
  .button-gallery__app,
  .button-gallery__guide-grid {
    grid-template-columns: 1fr;
  }

  .button-gallery .button-gallery__side.omoshiro-tool__side-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .button-gallery .omoshiro-tool__panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .button-gallery__list-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .button-gallery__shape-switch {
    justify-content: flex-start;
    gap: 6px;
  }

  .button-gallery__shape-option span,
  .button-gallery__arrow-toggle {
    padding: 7px 10px;
    font-size: 12px;
  }

  .button-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 420px;
    overflow-y: auto;
    gap: 8px;
    padding-right: 4px;
  }

  .button-gallery__card {
    padding: 8px;
  }

  .button-gallery__sample-wrap {
    min-height: 96px;
    padding: 8px;
    overflow: visible;
  }

  .button-gallery__sample {
    display: inline-grid !important;
    place-items: center;
    width: min(128px, 100%);
    padding-right: 0 !important;
    padding-left: 0 !important;
    font-size: 14px !important;
    text-align: center !important;
  }

  .button-gallery__settings-grid {
    grid-template-columns: 1fr;
  }

  .button-gallery__settings-grid > .omoshiro-tool__setting-card.button-gallery__setting-row {
    gap: 8px;
  }

  .button-gallery__range-row {
    grid-template-columns: minmax(0, 1fr) 66px;
  }

  .button-gallery__color-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .button-gallery__gradient-colors {
    grid-template-columns: 1fr;
  }

  .button-gallery__color {
    width: 42px;
  }
}
