.tool-page-main {
  padding: 34px 0 56px;
}

.tool-hero {
  margin-top: 6px;
  margin-bottom: 24px;
}

.tool-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-lg);
}

.tool-hero-copy {
  max-width: 760px;
}

.tool-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1;
  color: var(--blue-dark);
}

.tool-hero-copy p {
  margin: 14px 0 0;
  color: var(--gray);
  font-size: 1.08rem;
  line-height: 1.7;
}

.tool-privacy {
  max-width: 320px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  font-weight: 700;
  line-height: 1.6;
}

.tool-workspace {
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-lg);
}

.tool-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 22px;
  background: rgba(248, 250, 252, 0.84);
}

.tool-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tool-input,
.tool-select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 14px;
  background: var(--white);
  color: var(--blue-dark);
  font: inherit;
}

.tool-input {
  min-width: 220px;
}

.tool-select {
  min-width: 150px;
}

.tool-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
}

.tool-panel {
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
}

.tool-panel h2 {
  margin: 0 0 10px;
  font-size: 1.22rem;
  color: var(--blue-dark);
}

.tool-panel p {
  margin: 0;
  color: var(--gray);
  line-height: 1.6;
}

.tool-panel + .tool-panel {
  margin-top: 16px;
}

.tool-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 16px;
  background: var(--white);
}

.tool-list-item + .tool-list-item {
  margin-top: 12px;
}

.tool-stage {
  min-height: 520px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 246, 255, 0.95));
  overflow: auto;
}

.tool-placeholder {
  display: grid;
  place-items: center;
  min-height: 420px;
  color: var(--gray);
  text-align: center;
  font-weight: 700;
}

.tool-stage-inner {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

.tool-canvas {
  display: block;
  max-width: 100%;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
}

.tool-overlay {
  position: absolute;
  inset: 0;
}

.thumb-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thumb-button {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 16px;
  background: var(--white);
  cursor: pointer;
}

.thumb-button.is-active,
.thumb-button:hover,
.thumb-button:focus-visible {
  border-color: var(--blue);
  transform: translateY(-1px);
  outline: none;
}

.thumb-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #eff6ff;
}

.thumb-label {
  display: block;
  margin-top: 8px;
  color: var(--blue-dark);
  font-weight: 700;
  text-align: center;
  word-break: break-word;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  color: var(--gray);
}

.status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-weight: 700;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.info-card {
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.info-card h3 {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 1.05rem;
}

.info-card p {
  margin: 0;
  color: var(--gray);
  line-height: 1.55;
}

.signature-pad {
  width: 100%;
  height: 180px;
  border: 1px dashed rgba(37, 99, 235, 0.3);
  border-radius: 16px;
  background: #fff;
  touch-action: none;
}

.hidden-input {
  display: none;
}

.page-check {
  width: 18px;
  height: 18px;
  margin-top: 8px;
}

.thumb-preview-shell {
  display: grid;
  place-items: center;
  min-height: 120px;
  border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff, #e2edff);
  color: var(--blue);
  font-size: 2rem;
  font-weight: 800;
}

.signature-text-preview {
  padding: 8px;
  color: var(--blue-dark);
  font-weight: 700;
  line-height: 1.3;
}

.signature-image-preview {
  display: block;
  width: 100%;
  height: calc(100% - 30px);
  object-fit: contain;
}

.highlight-panel {
  border-color: rgba(37, 99, 235, 0.16);
  box-shadow: var(--shadow-md);
}

@media (max-width: 1024px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (max-width: 768px) {
  .tool-page-main {
    padding-bottom: 32px;
  }

  .tool-hero-inner,
  .tool-workspace {
    padding: 22px;
  }

  .tool-hero-inner,
  .status-bar,
  .tool-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-privacy {
    max-width: none;
  }

  .tool-input,
  .tool-select {
    min-width: 0;
    width: 100%;
  }
}
