.tool-page-body {
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.10), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 38%, #eef3f9 100%);
}

.tool-page-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.16) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 88%);
  pointer-events: none;
  z-index: 0;
}

.tool-page-body .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.tool-page-body .site-main,
.tool-page-body .site-footer {
  position: relative;
  z-index: 1;
}

.site-main--tool {
  width: 100%;
  max-width: none;
}

.tool-page-shell {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
}

.tool-page-shell--seo {
  padding-bottom: 12px;
}

.tool-page-heading--premium {
  padding: 28px 0 18px;
}

.tool-page-heading--premium .tool-page-heading-inner {
  border-top: 1px solid rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(224, 231, 255, 0.82);
  border-radius: 36px;
  padding: 34px 34px 30px;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.16), transparent 26%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.14), transparent 22%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.94) 0%, rgba(246, 250, 255, 0.92) 100%);
  box-shadow:
    0 30px 80px rgba(79, 70, 229, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.tool-page-heading--premium .tool-page-heading-inner::before {
  content: none;
}

.tool-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: stretch;
}

.tool-hero-copy {
  min-width: 0;
}

.tool-page-heading--premium .tool-page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tool-page-heading--premium .tool-page-title {
  margin-top: 18px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.tool-page-heading--premium .tool-page-desc {
  margin-top: 14px;
  max-width: 760px;
  font-size: 17px;
  line-height: 1.8;
  color: #475569;
}

.hero-pill-row {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(207, 214, 225, 0.88);
  box-shadow: 0 8px 24px rgba(26, 29, 36, 0.05);
  color: #586476;
  font-size: 13px;
  font-weight: 500;
}

.hero-action-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 600;
}

.hero-action--primary {
  color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.28);
}

.hero-action--ghost {
  color: #435168;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(207, 214, 225, 0.88);
}

.hero-flow {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-flow-item {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-flow-item strong {
  display: block;
  font-size: 12px;
  color: #4f46e5;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.hero-flow-item span {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
}

.tool-hero-side {
  display: grid;
  gap: 14px;
}

.hero-side-card {
  padding: 20px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.hero-side-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #728096;
}

.hero-side-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.hero-side-item {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-side-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.hero-side-item span {
  font-size: 13px;
  line-height: 1.7;
  color: #657287;
}

.hero-side-card--stats {
  background:
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.08), transparent 34%),
    linear-gradient(160deg, rgba(244, 247, 255, 0.94) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.hero-stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-stat {
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-stat strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}

.hero-stat span {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  color: #718097;
}

.workspace-shell {
  margin-top: 24px;
  padding: 16px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(245, 249, 255, 0.82) 100%);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 20px 60px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
}

.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 6px 18px;
}

.workspace-title {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.workspace-desc {
  margin-top: 6px;
  font-size: 13px;
  color: #728096;
}

.workspace-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.workspace-switch span {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: #475569;
}

.workspace-switch .active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  font-weight: 700;
}

.workspace {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr) 320px;
  gap: 16px;
  min-height: 760px;
}

.panel,
.canvas-stage,
.output-panel {
  min-width: 0;
  min-height: 0;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.panel {
  overflow: hidden;
}

.panel-scroll {
  height: 100%;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.panel-section {
  padding: 20px;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: none;
}

.panel-section--list {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  border-bottom: 0;
}

.panel-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a8799;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.12);
  color: #4f46e5;
  font-size: 11px;
  font-weight: 600;
}

.hint-text {
  font-size: 12px;
  color: #7a8799;
  margin-top: 10px;
  line-height: 1.7;
}

.hint-text--warn {
  color: #ef4444;
  font-weight: 600;
}

.upload-zone {
  border: 1.5px dashed rgba(79, 70, 229, 0.24);
  border-radius: 24px;
  padding: 30px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
  background:
    radial-gradient(circle at top, rgba(79, 70, 229, 0.09), transparent 54%),
    linear-gradient(180deg, #fcfdff 0%, #f5f9ff 100%);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #4f46e5;
  background:
    radial-gradient(circle at top, rgba(79, 70, 229, 0.14), transparent 56%),
    linear-gradient(180deg, #fbfdff 0%, #eef5ff 100%);
  box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.10);
  transform: translateY(-1px);
}

.upload-zone svg {
  width: 36px;
  height: 36px;
  stroke: #7a8799;
  margin-bottom: 12px;
  transition: stroke 0.2s var(--ease);
}

.upload-zone:hover svg,
.upload-zone.drag-over svg {
  stroke: #4f46e5;
}

.upload-zone p {
  font-size: 14px;
  color: #5f6c80;
  line-height: 1.75;
}

.upload-zone em {
  font-style: normal;
  color: #4f46e5;
  font-weight: 600;
}

#file-input {
  display: none;
}

.panel-cta {
  position: sticky;
  top: 10px;
  z-index: 3;
  margin: -8px 0 0;
  padding: 10px 20px 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.96) 78%, rgba(255, 255, 255, 0) 100%);
}

.action-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #161f44 0%, #243b7a 100%);
  color: #dce7ff;
}

.action-card-copy strong {
  display: block;
  font-size: 15px;
  color: #fff;
  margin-bottom: 8px;
}

.action-card-copy span {
  display: block;
  font-size: 13px;
  line-height: 1.7;
}

.btn-primary {
  width: 100%;
  margin-top: 14px;
  min-height: 48px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
  color: #fff;
  border: none;
  border-radius: 16px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
  box-shadow: 0 16px 32px rgba(34, 211, 238, 0.16);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(34, 211, 238, 0.2);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: rgba(148, 163, 184, 0.4);
  color: rgba(255, 255, 255, 0.8);
  cursor: not-allowed;
  box-shadow: none;
}

.select,
.size-row input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(207, 214, 225, 0.92);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #172033;
  font-family: var(--sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.select:focus,
.size-row input:focus {
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
  background: #fff;
}

.size-row {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.size-row input {
  font-family: var(--mono);
}

.size-row span {
  color: #8a96a8;
  font-family: var(--mono);
  font-size: 12px;
}

.mode-row,
.format-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mode-btn,
.fmt-btn {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(207, 214, 225, 0.92);
  background: #fff;
  color: #5d6b7f;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-weight: 600;
  font-size: 13px;
}

.fmt-btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.mode-btn:hover,
.fmt-btn:hover {
  border-color: rgba(79, 70, 229, 0.24);
  color: #243146;
  transform: translateY(-1px);
}

.mode-btn.active,
.fmt-btn.active {
  border-color: rgba(79, 70, 229, 0.18);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  color: #4f46e5;
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.04);
}

.setting-group + .setting-group {
  margin-top: 18px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.slider-min,
.slider-val {
  font-family: var(--mono);
  font-size: 11px;
  color: #7a8799;
}

.slider-val {
  min-width: 32px;
  text-align: right;
}

.slider-row input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5 0%, #06b6d4 100%);
  outline: none;
  cursor: pointer;
}

.slider-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #4f46e5;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.18);
}

.bg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bg-row input[type=color] {
  width: 48px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(207, 214, 225, 0.92);
  border-radius: 12px;
  background: #fff;
}

.chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(207, 214, 225, 0.82);
  font-size: 12px;
  color: #5f6c80;
  user-select: none;
}

.chk input {
  width: 14px;
  height: 14px;
  accent-color: #4f46e5;
}

.img-list,
.out-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty-list,
.empty-output {
  padding: 14px 12px;
  border: 1px dashed rgba(191, 201, 214, 0.92);
  border-radius: 18px;
  background: #f8fbff;
  color: #7a8799;
  font-size: 13px;
  text-align: center;
}

.img-item,
.out-item {
  border: 1px solid rgba(207, 214, 225, 0.92);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(26, 29, 36, 0.04);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.img-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  cursor: pointer;
}

.img-item:hover,
.out-item:hover {
  border-color: rgba(79, 70, 229, 0.18);
  box-shadow: 0 12px 24px rgba(26, 29, 36, 0.07);
  transform: translateY(-1px);
}

.img-item.is-active {
  border-color: rgba(79, 70, 229, 0.34);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.img-thumb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #f3f6fb;
  border: 1px solid rgba(224, 231, 255, 0.92);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-meta {
  min-width: 0;
}

.img-name,
.out-name {
  font-size: 13px;
  font-weight: 600;
  color: #172033;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.img-size,
.out-stats {
  margin-top: 3px;
  font-size: 11px;
  color: #8a96a8;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.out-stats {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.img-actions,
.out-actions {
  display: flex;
  gap: 6px;
}

.mini-btn {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid rgba(207, 214, 225, 0.92);
  background: #f8fbff;
  color: #5f6c80;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-btn:hover {
  border-color: rgba(79, 70, 229, 0.24);
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
}

.mini-btn svg {
  width: 16px;
  height: 16px;
}

.canvas-stage {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 14px;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 255, 0.96) 100%);
  align-self: start;
}

.canvas-stage-header,
.canvas-stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 6px;
}

.canvas-stage-title {
  font-size: 16px;
  font-weight: 700;
}

.canvas-stage-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #7a8799;
}

.canvas-stage-tools,
.canvas-stage-data {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.canvas-tool,
.canvas-stage-data span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(207, 214, 225, 0.84);
  color: #627083;
  font-size: 12px;
  font-weight: 500;
}

.canvas-tool.is-active {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.16);
  color: #4f46e5;
}

.canvas-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(420px, calc(100vh - 280px), 590px);
  padding: 36px 32px;
  gap: 20px;
  border-radius: 24px;
  border: 1px solid rgba(224, 231, 255, 0.82);
  background-color: #edf2f8;
  background-image:
    linear-gradient(45deg, #e4ebf4 25%, transparent 25%),
    linear-gradient(-45deg, #e4ebf4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e4ebf4 75%),
    linear-gradient(-45deg, transparent 75%, #e4ebf4 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  overflow: hidden;
}

.canvas-area.has-preview {
  justify-content: flex-start;
  padding-top: 28px;
  padding-bottom: 72px;
}

.canvas-stage-glow {
  position: absolute;
  inset: auto -90px -90px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.10) 0%, transparent 68%);
  pointer-events: none;
}

.canvas-area::before {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 26px;
  border: 1px dashed rgba(79, 70, 229, 0.14);
  pointer-events: none;
}

.canvas-wrap {
  position: relative;
  z-index: 1;
  border-radius: 30px;
  overflow: hidden;
  background: transparent;
  outline: none;
  box-shadow:
    0 18px 42px rgba(15, 23, 42, 0.10);
  margin-top: 0;
}

#preview-canvas {
  display: block;
  max-width: min(100%, 780px);
  height: auto;
  cursor: default;
}

.canvas-wrap::before {
  content: none;
}

.empty-state {
  z-index: 1;
  text-align: center;
  padding: 24px;
}

.empty-state svg {
  width: 58px;
  height: 58px;
  stroke: rgba(79, 70, 229, 0.28);
  margin-bottom: 16px;
}

.empty-state p {
  font-size: 15px;
  color: #7a8799;
}

.meta-badge {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 11px;
  color: #5f6c80;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(207, 214, 225, 0.88);
  box-shadow: 0 12px 24px rgba(26, 29, 36, 0.08);
}

.canvas-area.has-preview .meta-badge {
  top: 24px;
  bottom: auto;
}

.canvas-stage-note {
  font-size: 13px;
  color: #7a8799;
}

.output-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  overflow-y: auto;
}

.output-card,
.output-side-note {
  border-radius: 22px;
  border: 1px solid rgba(224, 231, 255, 0.82);
  background: linear-gradient(180deg, #fbfcff 0%, #f7faff 100%);
}

.output-card {
  padding: 18px;
}

.output-summary-intro {
  margin-bottom: 14px;
  padding: 15px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.06) 0%, rgba(6, 182, 212, 0.05) 100%);
  border: 1px solid rgba(224, 231, 255, 0.88);
}

.output-summary-intro strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.output-summary-intro span {
  display: block;
  font-size: 13px;
  color: #657287;
  line-height: 1.7;
}

.output-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.output-summary-cell {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px;
  border: 1px solid rgba(224, 231, 255, 0.82);
}

.output-summary-cell strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
  letter-spacing: -0.04em;
  line-height: 1.3;
  color: #172033;
}

.output-summary-cell span {
  color: #7a8799;
  font-size: 12px;
  line-height: 1.6;
}

.out-item {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.out-main {
  min-width: 0;
}

#output-actions {
  margin-top: 12px;
}

.btn-dl-all {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #111827 0%, #334155 100%);
  color: #fff;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.btn-dl-all:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.btn-dl-all:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.output-side-note {
  padding: 18px;
}

.output-note-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4f46e5;
  margin-bottom: 10px;
}

.output-side-note p {
  font-size: 13px;
  line-height: 1.8;
  color: #657287;
}

.seo-content-section {
  margin-top: 26px;
  padding: 0 0 36px;
  border-top: 0;
  background: transparent;
}

.detail-insight-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.detail-story-card,
.detail-faq-card {
  border-radius: 30px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.detail-story-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.detail-story-title {
  margin: 16px 0 10px;
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.detail-story-text {
  margin: 0;
  color: #475569;
  line-height: 1.9;
  font-size: 15px;
}

.detail-benefit-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-benefit {
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-benefit strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.detail-benefit span {
  color: #475569;
  font-size: 13px;
  line-height: 1.8;
}

.detail-faq-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.detail-faq-item {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px;
}

.detail-faq-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.detail-faq-item span {
  color: #475569;
  line-height: 1.8;
  font-size: 13px;
}

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

  .detail-insight-grid {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .output-panel {
    grid-column: 1 / -1;
  }
}

@media (min-width: 961px) {
  .canvas-stage {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 96px);
  }
}

@media (max-width: 960px) {
  .tool-page-heading--premium .tool-page-heading-inner {
    padding: 24px 18px 20px;
    border-radius: 24px;
  }

  .hero-flow,
  .hero-stats,
  .detail-benefit-grid,
  .workspace {
    grid-template-columns: 1fr;
  }

  .workspace-shell {
    padding: 12px;
    border-radius: 24px;
  }

  .workspace-topbar,
  .canvas-stage-header,
  .canvas-stage-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-scroll,
  .output-panel {
    overflow: visible;
  }

  .workspace {
    min-height: auto;
  }

  .canvas-area {
    min-height: 420px;
  }

  .canvas-area.has-preview {
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 24px;
  }
}

@media (max-width: 640px) {
  .tool-page-shell {
    padding: 0 14px;
  }

  .tool-page-heading--premium {
    padding: 16px 0 10px;
  }

  .tool-page-heading--premium .tool-page-title {
    font-size: 30px;
  }

  .tool-page-heading--premium .tool-page-desc {
    font-size: 14px;
  }

  .hero-pill-row,
  .hero-action-row,
  .canvas-stage-tools,
  .canvas-stage-data {
    gap: 8px;
  }

  .hero-action {
    width: 100%;
  }

  .panel-section,
  .output-card,
  .output-side-note,
  .detail-story-card,
  .detail-faq-card {
    padding: 16px;
  }

  .mode-row,
  .format-row,
  .bg-row {
    flex-direction: column;
    align-items: stretch;
  }

  .mode-btn,
  .fmt-btn {
    width: 100%;
  }

  .canvas-area {
    min-height: 340px;
    padding: 22px 16px;
  }

  .meta-badge {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
  }

  .output-summary-grid,
  .detail-benefit-grid {
    grid-template-columns: 1fr;
  }
}


/* Grid Splitter specific controls and result grid */
.grid-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.grid-opt {
  aspect-ratio: 1;
  border: 1px solid rgba(207, 214, 225, 0.92);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #5f6c80;
}

.grid-opt:hover {
  border-color: rgba(79, 70, 229, 0.24);
  color: #243146;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(26, 29, 36, 0.07);
}

.grid-opt.active {
  border-color: rgba(79, 70, 229, 0.28);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.grid-opt .mini {
  display: grid;
  gap: 2px;
  width: 34px;
  height: 34px;
}

.grid-opt .mini span {
  display: block;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.38;
}

.grid-opt.active .mini span {
  opacity: 0.68;
}

.mode-tab {
  display: flex;
  gap: 0;
  padding: 4px;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(207, 214, 225, 0.92);
  border-radius: 18px;
  width: 100%;
}

.mode-tab button {
  flex: 1;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #5f6c80;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-size: 13px;
  font-weight: 600;
}

.mode-tab button:hover:not(.active) {
  color: #243146;
}

.mode-tab button.active {
  background: #fff;
  color: #4f46e5;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.trim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trim-row label {
  font-size: 13px;
  color: #243146;
}

.toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.42);
  transition: background 0.25s var(--ease);
  cursor: pointer;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  transition: transform 0.25s var(--ease);
}

.toggle input:checked + .toggle-track {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.filename-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.filename-row input {
  flex: 1;
  width: auto;
  padding: 12px 14px;
  border: 1px solid rgba(207, 214, 225, 0.92);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #172033;
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.filename-row input:focus {
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
  background: #fff;
}

.filename-row span {
  color: #8a96a8;
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.canvas-stage-tools .canvas-tool,
.canvas-stage-data span {
  white-space: nowrap;
}

#preview-canvas {
  cursor: default;
}

.crop-controls {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(207, 214, 225, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 24px rgba(26, 29, 36, 0.08);
}

.crop-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(207, 214, 225, 0.92);
  background: #fff;
  color: #243146;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-size: 13px;
  font-weight: 600;
}

.crop-btn:hover {
  border-color: rgba(79, 70, 229, 0.24);
  color: #4f46e5;
}

.crop-btn.confirm {
  border-color: transparent;
  background: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
  color: #fff;
}

.crop-btn.confirm:hover {
  color: #fff;
  box-shadow: 0 12px 24px rgba(34, 211, 238, 0.18);
}

.crop-hint {
  position: relative;
  z-index: 2;
  font-size: 12px;
  color: #7a8799;
}

.panel--controls .panel-section:last-child {
  border-bottom: 0;
  padding-bottom: 18px;
}

.tool-page-body--grid-splitter .canvas-stage-footer {
  justify-content: flex-start;
}

.output-grid {
  display: grid;
  gap: 10px;
}

.output-cell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(224, 231, 255, 0.82);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(26, 29, 36, 0.04);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.output-cell:hover {
  border-color: rgba(79, 70, 229, 0.18);
  box-shadow: 0 12px 24px rgba(26, 29, 36, 0.07);
  transform: translateY(-1px);
}

.output-cell canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.output-cell .dl-btn {
  position: absolute;
  inset: 0;
  border: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18) 0%, rgba(15, 23, 42, 0.68) 100%);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s var(--ease);
}

.output-cell:hover .dl-btn {
  opacity: 1;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #7a8799;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

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

  .mode-tab {
    flex-direction: column;
  }

  .filename-row {
    flex-wrap: wrap;
  }

  .crop-controls {
    width: 100%;
    justify-content: center;
  }
}
