.tool-page { padding-top: clamp(28px, 5vw, 58px); }
.tool-page h1 { font-size: clamp(2.2rem, 5.3vw, 4.7rem); }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--muted); font-size: .9rem; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.workspace {
  display: grid; grid-template-columns: minmax(260px, .81fr) minmax(0, 1.65fr);
  border: 1px solid var(--line); border-radius: 20px; margin-top: 28px; background: var(--paper);
}
.editor-panel { padding: clamp(16px, 3vw, 26px); border-right: 1px solid var(--line); }
.drop-zone {
  position: relative; display: grid; justify-items: center; text-align: center; gap: 10px;
  border: 1px dashed #9cad90; border-radius: 12px; background: #f2f5e9; padding: 24px 10px 17px;
}
.drop-zone.is-dragging { outline: 3px solid #46805b; outline-offset: 2px; background: #e7f4cc; }
.drop-zone:focus-within .button-light { outline: 3px solid #46805b; outline-offset: 4px; }
.upload-symbol { font-size: 1.35rem; line-height: 1; }
.drop-zone p { margin: 0; color: var(--muted); font-size: .83rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 42px; padding: 9px 16px; border-radius: 8px; font-weight: 700;
}
.button-light { cursor: pointer; border: 1px solid #99a893; background: var(--paper); }
.button-light:hover { background: #eaf2da; }
.button-accent { width: 100%; border: 1px solid #c2df59; background: var(--accent); color: #203a2d; }
.button-accent:enabled:not([aria-disabled="true"]):hover { background: #ccec62; }
.button-accent:is(:disabled, [aria-disabled="true"]) {
  color: #50604d; background: #e9ecde; border-color: var(--line); cursor: default;
}
.file-info { margin: 11px 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: .84rem; }
.settings { margin-top: 22px; }
.number-row, .preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.number-row label { font-weight: 700; }
.number-row select {
  background: var(--paper); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; min-width: 64px; min-height: 38px; padding: 4px 8px;
}
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 19px; }
.preset-row button {
  min-width: 34px; min-height: 35px; color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 6px;
}
.preset-row button:disabled { color: #637063; }
.preset-row button[aria-pressed="true"] { background: #e7efd9; border-color: #8a9b7e; font-weight: 700; }
.preset-row button:enabled:hover { border-color: #568261; }
.privacy-note { max-width: 54ch; line-height: 1.5; }
.status, .error { margin: 8px 0 0; font-size: .88rem; line-height: 1.45; }
.status:empty, .error:empty { margin: 0; }
.error { color: #9d3429; }
.preview-panel { padding: clamp(16px, 3vw, 26px); min-width: 0; }
.preview-heading { margin-bottom: 13px; flex-wrap: wrap; }
.preview-heading h2 { font-size: 1.32rem; margin: 0; }
.text-button { padding: 6px 0; border: 0; color: #365b42; background: none; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: #183b25; }
.preview-stage {
  display: grid; place-items: center; min-height: clamp(195px, 26vw, 334px); padding: 14px;
  background-color: #f4f6ee;
  background-image: radial-gradient(#c9d3c3 1px, transparent 1px);
  background-size: 13px 13px;
  border-radius: 12px; border: 1px solid var(--line);
}
.preview-empty { text-align: center; color: var(--muted); }
.preview-empty p { margin: 9px 0 0; }
.empty-icon { font-size: 2rem; color: #526d54; }
.preview-image {
  width: min(100%, calc(300px * var(--aspect))); position: relative; overflow: hidden;
  background: repeating-conic-gradient(#e2e9e0 0% 25%, white 0% 50%) 0 0 / 14px 14px;
  border-radius: 5px;
}
.preview-image canvas { width: 100%; height: auto; display: block; }
.cuts { position: absolute; inset: 0; display: flex; }
.cuts span {
  display: block; overflow: hidden; flex-shrink: 0; text-align: center;
  padding-top: 5px; font-size: clamp(.47rem, 1.2vw, .77rem); font-variant-numeric: tabular-nums;
  color: white; text-shadow: 0 1px 2px #000, 0 0 4px #000; font-weight: 800;
}
.cuts span + span { border-left: 1px dashed white; box-shadow: -1px 0 #18251b88; }
.thumbnails { margin: 13px 0 0; padding: 0 0 4px; display: flex; gap: 7px; overflow-x: auto; list-style: none; }
.thumbnails li { display: grid; gap: 3px; justify-items: center; flex: 0 0 auto; min-width: 38px; font-size: .72rem; }
.thumbnails canvas { align-self: end; max-width: 56px; max-height: 36px; object-fit: contain; }
.info-section { margin-top: 42px; max-width: 750px; line-height: 1.65; }
.info-section ol { padding-left: 1.45rem; }
.info-section li + li { margin-top: 7px; }
.faq details { border-top: 1px solid var(--line); padding-block: 10px; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { color: var(--muted); margin: 6px 0 0; }
@media (max-width: 730px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .editor-panel { border-right: 0; border-bottom: 1px solid var(--line); }
}
