.omoshiro-tool__hero {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.omoshiro-tool__title {
  flex: 0 0 auto;
  margin: 0;
  color: #172033;
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}

.omoshiro-tool__lead {
  flex: 1 1 auto;
  margin-top: 0;
}

.omoshiro-tool__lead p {
  margin: 0;
  color: #344054;
  line-height: 1.55;
}

.omoshiro-tool__lead p + p {
  margin-top: 2px;
}

.omoshiro-tool__lead strong {
  color: var(--main-color);
}

@media (min-width: 901px) {
  .omoshiro-tool__hero {
    gap: clamp(22px, 2.6vw, 36px);
    justify-content: flex-start;
  }

  .omoshiro-tool__title {
    flex: 0 0 auto;
  }

  .omoshiro-tool__lead {
    flex: 0 1 640px;
    max-width: 640px;
    padding-left: clamp(22px, 2.6vw, 36px);
    border-left: 1px solid #e6eaf0;
  }
}

.omoshiro-tool__panel {
  padding: 16px;
  border: 1px solid #e6eaf0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(16, 24, 40, 0.06);
}

.omoshiro-tool__side-panel {
  position: sticky;
  top: 96px;
}

.omoshiro-tool__features {
  margin-top: 14px;
}

.omoshiro-tool__features > .omoshiro-tool__heading {
  margin-bottom: 12px;
}

.omoshiro-tool__panel-head,
.omoshiro-tool__section-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.omoshiro-tool__panel-head {
  align-items: flex-start;
  margin-bottom: 12px;
}

.omoshiro-tool__section-head {
  align-items: center;
  margin-bottom: 10px;
}

.omoshiro-tool__heading {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 0;
  color: #172033;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
}

.omoshiro-tool__heading::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  min-height: 1.45em;
  border-radius: 999px;
  background: var(--main-color);
}

.omoshiro-tool__heading--section {
  font-size: 18px;
}

.omoshiro-tool__badge {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff0fa;
  color: var(--main-color);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.omoshiro-tool__dropzone {
  display: grid;
  place-items: center;
  min-height: 154px;
  padding: 18px;
  border: 2px dashed color-mix(in srgb, var(--accent-color) 46%, transparent);
  border-radius: 8px;
  background: #eaf7ff;
  color: #172033;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.omoshiro-tool__dropzone.is-dragging {
  border-color: var(--main-color);
  background: #fff0fa;
}

.omoshiro-tool__file-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.omoshiro-tool__drop-title {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.omoshiro-tool__drop-sub,
.omoshiro-tool__drop-meta {
  display: block;
  margin-top: 4px;
  color: #475467;
  font-size: 13px;
  line-height: 1.55;
}

.omoshiro-tool__selected-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #f8fafc;
}

.omoshiro-tool__upload-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow-y: visible;
  align-content: start;
  scrollbar-gutter: stable;
}

.omoshiro-tool__upload-preview.is-scrollable {
  max-height: 710px;
  padding-right: 4px;
  overflow-y: auto;
}

.omoshiro-tool__upload-thumb {
  position: relative;
  display: grid;
  grid-template-rows: 92px auto;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  padding: 8px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
}

.omoshiro-tool__upload-thumb img {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: contain;
}

.omoshiro-tool__upload-thumb figcaption {
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.omoshiro-tool__upload-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: var(--main-color);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--main-color) 24%, transparent);
}

.omoshiro-tool__upload-remove:hover {
  transform: translateY(-1px);
}

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

.omoshiro-tool__section-head .omoshiro-tool__button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.omoshiro-tool__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.omoshiro-tool__button--primary,
.omoshiro-tool__button--download {
  background: var(--main-color);
  color: #fff;
}

.omoshiro-tool__button--primary {
  padding: 14px 28px;
  font-size: 20px;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--main-color) 18%, transparent);
}

.omoshiro-tool__button--secondary {
  border: 1px solid #d9e1ea;
  background: #fff;
  color: #172033;
}

.omoshiro-tool__button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.omoshiro-tool__button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-color) 20%, transparent);
  outline-offset: 2px;
}

.omoshiro-tool__button:not(:disabled):hover {
  transform: translateY(-1px);
}

.omoshiro-tool__button-stack {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

.omoshiro-tool__button-stack .omoshiro-tool__button {
  width: 100%;
}

.omoshiro-tool__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e6eaf0;
}

.omoshiro-tool__actions .omoshiro-tool__button--clear {
  margin-left: auto;
}

.omoshiro-tool__notice,
.omoshiro-tool__preview-subtitle {
  margin: 7px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.omoshiro-tool__notice {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--main-color) 22%, transparent);
  border-radius: 8px;
  background: #fff0fa;
}

.omoshiro-tool__notice--upload {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #344054;
  font-weight: 700;
}

.omoshiro-tool__message {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1.6;
}

.omoshiro-tool__message--error {
  border: 1px solid color-mix(in srgb, var(--main-color) 30%, transparent);
  background: #fff0fa;
  color: var(--main-color);
}

.omoshiro-tool__message--success {
  border: 1px solid color-mix(in srgb, var(--accent-color) 32%, transparent);
  background: #effaff;
  color: #0277bd;
}

.omoshiro-tool__message--loading {
  border: 1px solid color-mix(in srgb, var(--accent-color) 28%, transparent);
  background: #effaff;
  color: #0277bd;
}

.omoshiro-tool__result-empty {
  width: 100%;
  margin: 10px auto 0;
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--accent-color) 56%, transparent);
  border-radius: 8px;
  background: #eaf7ff;
  color: #667085;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.omoshiro-tool__result-empty p {
  margin: 0;
}

.omoshiro-tool__bulk-actions {
  width: 100%;
  margin-top: 10px;
}

.omoshiro-tool__zoom-preview {
  position: relative;
  display: inline-block;
  align-self: start;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  line-height: 0;
}

.omoshiro-tool__zoom-preview img {
  cursor: zoom-in;
}

.omoshiro-tool__zoom-button {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent-color) 36%, #fff);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-color);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.14);
  cursor: pointer;
}

.omoshiro-tool__zoom-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.omoshiro-tool__lightbox {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(23, 32, 51, 0.72);
}

.omoshiro-tool__lightbox-dialog {
  position: relative;
  display: grid;
  place-items: center;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
}

.omoshiro-tool__lightbox-dialog img {
  display: block;
  max-width: calc(100vw - 72px);
  max-height: calc(100vh - 72px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.omoshiro-tool__lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--main-color);
  color: #fff;
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.omoshiro-tool__format-guide {
  width: 100%;
  margin-top: 12px;
  margin-inline: auto;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent-color) 20%, transparent);
  border-radius: 8px;
  background: #effaff;
}

.omoshiro-tool__mini-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.omoshiro-tool__list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.omoshiro-tool__list li {
  line-height: 1.55;
}

.omoshiro-tool__list li::before {
  content: "・";
}

.omoshiro-tool__feature-card {
  padding: 12px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #f8fafc;
}

.omoshiro-tool__feature-title {
  margin: 0 0 6px;
  color: #172033;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.omoshiro-tool__feature-card p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.65;
}

.omoshiro-tool__related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.omoshiro-tool__related-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent-color) 24%, #edf1f5);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.omoshiro-tool__related-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.omoshiro-tool__related-title {
  color: #172033;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.omoshiro-tool__related-description {
  color: #475467;
  font-size: 13px;
  line-height: 1.65;
}

.omoshiro-tool__related-arrow {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--main-color);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.omoshiro-tool__related-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff0fa;
  color: var(--main-color);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.omoshiro-tool__related-link-text {
  align-self: end;
  color: var(--accent-color);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.omoshiro-tool__related-card:hover,
.omoshiro-tool__related-card:focus-visible {
  border-color: var(--accent-color);
  background: #effaff;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent-color) 12%, transparent);
  transform: translateY(-1px);
}

.omoshiro-tool__related-card.is-current {
  border-color: color-mix(in srgb, var(--main-color) 44%, transparent);
  background: #fff0fa;
}

.omoshiro-tool__related-card.is-current .omoshiro-tool__related-link-text {
  color: var(--main-color);
}

.omoshiro-tool__related-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-color) 20%, transparent);
  outline-offset: 2px;
}

.omoshiro-tool__credit {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #edf1f5;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
  text-align: center;
}

.omoshiro-tool__settings-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e6eaf0;
}

.omoshiro-tool__settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.omoshiro-tool__setting-card {
  min-width: 0;
}

.omoshiro-tool__settings-grid > .omoshiro-tool__setting-card {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #f8fafc;
}

.omoshiro-tool__setting-label {
  display: block;
  margin: 0 0 8px;
  color: #172033;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.omoshiro-tool__help {
  margin: 7px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.omoshiro-tool__radio-list {
  display: grid;
  gap: 8px;
}

.omoshiro-tool__radio-list--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.omoshiro-tool__radio-list--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.omoshiro-tool__radio-list--inline {
  display: flex;
  flex-wrap: wrap;
}

.omoshiro-tool__radio-list--format {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.omoshiro-tool__radio--wide {
  grid-column: 1 / -1;
}

.omoshiro-tool__radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  cursor: pointer;
}

.omoshiro-tool__radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.omoshiro-tool__radio span {
  display: grid;
  gap: 3px;
}

.omoshiro-tool__radio strong {
  font-size: 14px;
  font-weight: 800;
}

.omoshiro-tool__radio small {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.omoshiro-tool__radio:has(input:checked) {
  border-color: var(--accent-color);
  background: #effaff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-color) 18%, transparent);
}

.omoshiro-tool__radio:has(input:checked) small {
  color: #0277bd;
}

.omoshiro-tool__radio:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--accent-color) 20%, transparent);
  outline-offset: 2px;
}

.omoshiro-tool__size-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.omoshiro-tool__size-field {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.omoshiro-tool__input {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font: inherit;
}

select.omoshiro-tool__input {
  appearance: none;
  padding-right: 38px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2714%27%20height%3D%2714%27%20viewBox%3D%270%200%2014%2014%27%20fill%3D%27none%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%3E%3Cpath%20d%3D%27M3.5%205.25L7%208.75L10.5%205.25%27%20stroke%3D%27%23667085%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E");
  background-position: calc(100% - 14px) 50%;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  cursor: pointer;
}

.omoshiro-tool__input:focus,
.omoshiro-tool__dropzone:focus-within {
  outline: 3px solid color-mix(in srgb, var(--accent-color) 20%, transparent);
  outline-offset: 2px;
}

.omoshiro-tool__check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  cursor: pointer;
}

.omoshiro-tool__check input {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  appearance: none;
  border: 2px solid #c8d7e4;
  border-radius: 4px;
  background: #fff;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.omoshiro-tool__check input::before {
  content: "";
  position: relative;
  top: -1px;
  width: 8px;
  height: 5px;
  border: solid #fff;
  border-width: 0 0 2.5px 2.5px;
  border-radius: 0;
  background: transparent;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.15s;
}

.omoshiro-tool__check input:checked {
  border-color: var(--accent-color);
  background: var(--accent-color);
}

.omoshiro-tool__check input:checked::before {
  transform: rotate(-45deg) scale(1);
}

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

@media (max-width: 900px) {
  .omoshiro-tool__hero {
    display: block;
  }

  .omoshiro-tool__lead {
    margin-top: 8px;
  }

  .omoshiro-tool__side-panel {
    position: static;
  }

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

@media (max-width: 640px) {
  .omoshiro-tool__hero {
    padding: 12px 0;
  }

  .omoshiro-tool__upload-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .omoshiro-tool__button {
    width: 100%;
  }

  .omoshiro-tool__section-head .omoshiro-tool__button {
    width: auto;
  }

  .omoshiro-tool__related-grid {
    grid-template-columns: 1fr;
  }

  .omoshiro-tool__settings-grid,
  .omoshiro-tool__size-grid,
  .omoshiro-tool__radio-list--two,
  .omoshiro-tool__radio-list--four,
  .omoshiro-tool__radio-list--format {
    grid-template-columns: 1fr;
  }
}
