.clip-tool-page {
  min-height: 0;
  margin: 0;
  background: #fff8f4;
  color: #333942;
  font-size: 16px;
}

html.is-embedded .clip-tool-topbar {
  display: none;
}

.clip-tool-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  min-height: 64px;
  padding: 0 max(20px, calc((100vw - 1440px) / 2));
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 248, 244, 0.94);
  border-bottom: 1px solid rgba(207, 75, 69, 0.16);
  backdrop-filter: blur(12px);
}

.clip-tool-back,
.clip-tool-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cf4b45;
  text-decoration: none;
}

.clip-tool-note {
  color: #856b65;
}

.clip-tool-note span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cf4b45;
  box-shadow: 0 0 0 5px rgba(207, 75, 69, 0.12);
}

.clip-tool-shell {
  width: min(1440px, calc(100% - 32px));
  min-height: 0;
  margin: 0 auto;
  padding: 24px 0 14px;
}

html.is-embedded .clip-tool-shell {
  padding: 10px 0;
}

.clip-tool-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.clip-tool-heading h1 {
  margin: 0;
  color: #cf4b45;
  font-size: 24px;
  font-weight: 550;
}

.clip-tool-heading p,
.clip-tool-status {
  margin: 6px 0 0;
  color: #856b65;
  line-height: 1.65;
}

.clip-tool-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.clip-tool-panel {
  display: grid;
  gap: 10px;
}

.clip-tool-card {
  background: #ffffff;
  border: 1px solid rgba(207, 75, 69, 0.16);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(207, 75, 69, 0.08);
  padding: 14px;
}

.clip-tool-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.clip-tool-card h2 {
  margin: 0;
  color: #4f3834;
  font-size: 18px;
  font-weight: 550;
}

.clip-tool-card-title span {
  color: #856b65;
  line-height: 1.65;
}

.clip-tool-file {
  min-height: 44px;
  margin-top: 12px;
  padding: 11px 14px;
  color: #59433f;
  background: #fffaf2;
  border: 1px solid rgba(207, 75, 69, 0.12);
  border-radius: 12px;
  line-height: 1.55;
}

.clip-tool-upload {
  width: 100%;
  justify-content: center;
  cursor: pointer;
}

.clip-tool-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.clip-tool-actions .g_button {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.clip-tool-check {
  display: flex;
  min-height: 44px;
  margin-top: 12px;
  align-items: center;
  gap: 10px;
  color: #4f3834;
  line-height: 1.55;
}

.clip-tool-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.clip-tool-check input {
  width: 20px;
  height: 20px;
  accent-color: #cf4b45;
}

.clip-tool-progress {
  height: 14px;
  margin-top: 12px;
  overflow: hidden;
  background: #fff1eb;
  border: 1px solid rgba(207, 75, 69, 0.14);
  border-radius: 999px;
}

.clip-tool-progress div {
  width: 0;
  height: 100%;
  background: #cf4b45;
  border-radius: inherit;
  transition: width 0.18s ease;
}

.clip-tool-main {
  min-width: 0;
}

.clip-tool-video {
  display: block;
  width: 100%;
  max-height: 420px;
  background: #2f2825;
  border-radius: 14px;
}

.clip-tool-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.clip-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: #fffaf7;
  border: 1px solid rgba(207, 75, 69, 0.14);
  border-radius: 12px;
}

.clip-row input {
  width: 20px;
  height: 20px;
  accent-color: #cf4b45;
}

.clip-row strong {
  display: block;
  color: #333942;
  font-size: 16px;
  font-weight: 550;
  line-height: 1.45;
}

.clip-row span,
.clip-row small {
  color: #856b65;
  line-height: 1.55;
}

.clip-row small {
  white-space: nowrap;
}

.clip-tool-empty {
  margin-top: 12px;
  padding: 26px 18px;
  color: #856b65;
  text-align: center;
  background: #fffaf2;
  border: 1px dashed rgba(207, 75, 69, 0.24);
  border-radius: 12px;
  line-height: 1.65;
}

.clip-tool-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 16px;
  color: #ffffff;
  background: #cf4b45;
  border-radius: 12px;
  box-shadow: 0 16px 42px rgba(92, 42, 37, 0.24);
}

@media (max-width: 900px) {
  .clip-tool-heading,
  .clip-tool-workspace {
    display: grid;
    grid-template-columns: 1fr;
  }

  .clip-tool-actions,
  .clip-tool-checks,
  .clip-row {
    grid-template-columns: 1fr;
  }

  .clip-row small {
    white-space: normal;
  }
}
