.tool-page { min-height: 100vh; background: #f6f7fc; }
.tool-header { position: absolute; }
.tool-nav { display: flex; align-items: center; gap: 18px; font-size: 13px; font-weight: 800; }
.tool-nav > a { color: #394363; }
.tool-nav .tool-contact-link { padding: 9px 12px; border: 1px solid #dce0eb; border-radius: 11px; color: #4d5775; background: rgba(255,255,255,.78); font-size: 10px; }
.tool-nav .tool-contact-link:hover, .tool-nav .tool-contact-link:focus-visible { border-color: #8871d5; outline: 0; color: #5d43b6; background: #f7f4ff; }
.privacy-chip { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; border-radius: 12px; color: #087b55; background: #eafbf4; font-size: 11px; }
.privacy-chip i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: white; background: #16a875; font-style: normal; }
.tool-hero { position: relative; padding: 150px max(6vw, 36px) 62px; display: flex; align-items: end; justify-content: space-between; gap: 50px; overflow: hidden; background: radial-gradient(circle at 93% 0, #dcf9ff, transparent 28%), radial-gradient(circle at 8% 65%, #f0e4ff, transparent 27%), linear-gradient(145deg, #fbfcff, #f3f1ff); }
.tool-hero::before { content: ""; position: absolute; inset: 0; opacity: .55; background-image: linear-gradient(rgba(255,255,255,.8) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.8) 1px, transparent 1px); background-size: 42px 42px; pointer-events: none; }
.tool-hero-copy, .privacy-card { position: relative; z-index: 1; }
.tool-hero-copy { max-width: 800px; }
.tool-hero h1 { margin: 16px 0 17px; font-size: clamp(48px, 5.1vw, 74px); line-height: .98; letter-spacing: -.06em; }
.tool-hero h1 span { display: block; background: linear-gradient(100deg, #ff4b65, #6339cf 55%, #008fd6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tool-hero-copy > p { max-width: 690px; margin: 0; color: #596482; font-size: 17px; line-height: 1.75; }
.tool-mode-switch { width: max-content; margin: 18px 0 8px; padding: 5px; display: flex; gap: 5px; border: 1px solid #dce0eb; border-radius: 13px; background: rgba(255,255,255,.78); }
.tool-mode-switch a { min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 9px; color: #5e6885; font-size: 10px; font-weight: 900; }
.tool-mode-switch a.active { color: white; background: #111a49; box-shadow: 0 8px 18px rgba(17,26,73,.18); }
.privacy-card { width: min(390px, 100%); padding: 20px; display: flex; align-items: flex-start; gap: 14px; border: 1px solid rgba(255,255,255,.95); border-radius: 19px; background: rgba(255,255,255,.75); box-shadow: 0 18px 45px rgba(33,42,97,.1); backdrop-filter: blur(15px); }
.privacy-icon { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; color: white; background: linear-gradient(135deg, #086af4, #00c8d8); font-size: 23px; font-weight: 900; }
.privacy-card b, .privacy-card span { display: block; }
.privacy-card b { margin: 1px 0 6px; font-size: 13px; }
.privacy-card span { color: #65708d; font-size: 11px; line-height: 1.55; }
.image-workspace { max-width: 1320px; margin: 42px auto 80px; padding: 0 24px; display: grid; grid-template-columns: minmax(360px, .82fr) minmax(0, 1.18fr); gap: 22px; align-items: start; }
.control-column, .preview-column { border: 1px solid #e0e3ef; border-radius: 26px; background: white; box-shadow: 0 20px 55px rgba(25,34,84,.07); }
.control-column { padding: 28px; }
.preview-column { position: sticky; top: 24px; min-height: 690px; padding: 28px; }
.step-heading { display: flex; align-items: flex-start; gap: 13px; }
.step-heading > span { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; color: white; background: #0a153f; font-size: 10px; font-weight: 900; }
.step-heading h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.025em; }
.step-heading p { margin: 0; color: #7b849e; font-size: 11px; }
.step-heading.compact { margin-bottom: 21px; }
.drop-zone { margin-top: 20px; min-height: 230px; padding: 28px 20px; display: flex; align-items: center; justify-content: center; flex-direction: column; border: 1.5px dashed #cbd1e5; border-radius: 20px; outline: 0; cursor: pointer; background: linear-gradient(145deg, #fbfcff, #f7f5ff); transition: border-color .2s ease, background .2s ease, transform .2s ease; text-align: center; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.dragover { border-color: #6b4bd1; background: #f5f1ff; transform: translateY(-2px); }
.upload-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; color: white; background: linear-gradient(135deg, #ff4b65, #7038cf); box-shadow: 0 13px 26px rgba(112,56,207,.22); font-size: 24px; font-weight: 900; }
.drop-zone h3 { margin: 16px 0 5px; font-size: 17px; }
.drop-zone p { margin: 0; color: #747e9b; font-size: 12px; }
.small-button { margin-top: 17px; min-height: 38px; padding: 0 15px; border: 1px solid #d9ddea; border-radius: 11px; color: #263054; background: white; cursor: pointer; font-size: 11px; font-weight: 800; }
.primary-upload-button { min-height: 46px; margin-top: 18px; padding: 0 18px; display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 12px; color: white; background: linear-gradient(110deg,#1c276d,#6336c6 68%,#078cc1); box-shadow: 0 12px 25px rgba(73,49,167,.21); cursor: pointer; font-size: 11px; font-weight: 900; }
.primary-upload-button span { font-size: 17px; line-height: 1; }
.primary-upload-button:hover { transform: translateY(-1px); }
.file-summary { margin-top: 20px; padding: 12px; display: grid; grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; gap: 12px; border: 1px solid #dfe3ef; border-radius: 16px; background: #fafbff; }
.file-summary img { width: 58px; height: 58px; border-radius: 11px; object-fit: cover; background: #eef0f7; }
.file-summary-copy { min-width: 0; }
.file-summary-copy b, .file-summary-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-summary-copy b { font-size: 12px; }
.file-summary-copy span { margin-top: 5px; color: #76809b; font-size: 10px; }
.file-summary button, .preview-topline button { border: 0; color: #5d45b6; background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.settings-panel { margin-top: 30px; padding-top: 27px; border-top: 1px solid #e8eaf2; transition: opacity .2s ease; }
.settings-panel[aria-disabled="true"] { opacity: .42; pointer-events: none; }
.setting-block { padding: 18px 0; border-bottom: 1px solid #eceef5; }
.setting-label { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.setting-label label, .setting-label > span { font-size: 12px; font-weight: 900; }
.setting-label small { color: #818aa3; font-size: 9px; text-align: right; }
.input-with-unit { min-height: 46px; display: flex; align-items: center; border: 1px solid #d8dce9; border-radius: 12px; overflow: hidden; background: white; }
.input-with-unit input { width: 100%; min-width: 0; padding: 0 12px; border: 0; outline: 0; color: #121c46; background: transparent; font-weight: 800; }
.input-with-unit > span, .input-with-unit i { align-self: stretch; min-width: 52px; display: grid; place-items: center; border-left: 1px solid #e1e4ee; color: #69728e; background: #f7f8fc; font-size: 10px; font-style: normal; font-weight: 800; }
.check-row { margin-top: 11px; display: flex; align-items: flex-start; gap: 9px; color: #69728d; font-size: 9px; line-height: 1.45; cursor: pointer; }
.check-row input { margin: 1px 0 0; accent-color: #5b3bc0; }
.dimension-row { display: grid; grid-template-columns: 1fr 34px 1fr; gap: 8px; align-items: end; }
.dimension-row > label { color: #747d97; font-size: 9px; font-weight: 800; }
.dimension-row .input-with-unit { margin-top: 6px; }
.ratio-lock { width: 34px; height: 34px; margin-bottom: 6px; border: 1px solid #d8dce9; border-radius: 10px; color: #737d9a; background: white; cursor: pointer; font-size: 18px; font-weight: 900; }
.ratio-lock.active { border-color: #7a5bd6; color: #6846ca; background: #f3efff; }
.preset-row { margin-top: 11px; display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.preset-row button { min-height: 31px; padding: 0 5px; border: 1px solid #e0e3ed; border-radius: 9px; color: #68718d; background: #fafbfe; cursor: pointer; font-size: 9px; font-weight: 800; }
.preset-row button:hover { border-color: #8d73d8; color: #5b3cb7; }
.format-block select { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #d8dce9; border-radius: 12px; outline: 0; color: #1b2550; background: white; font-size: 11px; font-weight: 700; }
.format-advice { margin-top: 16px; padding: 14px; display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 11px; border: 1px solid #f1d8a5; border-radius: 14px; color: #57431b; background: #fff9ea; }
.format-advice[hidden] { display: none; }
.format-advice.strong { border-color: #f0ba78; background: #fff4e5; box-shadow: 0 10px 24px rgba(171,105,26,.08); }
.advice-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: white; background: #e2932f; font-size: 13px; font-weight: 900; }
.format-advice b { display: block; margin-top: 1px; font-size: 11px; }
.format-advice p { margin: 5px 0 0; color: #7b6539; font-size: 9px; line-height: 1.55; }
.advice-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px; }
.advice-actions button { min-height: 32px; padding: 0 12px; border: 1px solid #d9c28e; border-radius: 9px; color: #654414; background: white; cursor: pointer; font-size: 9px; font-weight: 900; }
.advice-actions button:hover, .advice-actions button:focus-visible { border-color: #9d6a1d; outline: 0; background: #fffdf7; }
.process-button { width: 100%; min-height: 54px; margin-top: 22px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 14px; color: white; background: linear-gradient(110deg, #1c276d, #6336c6 66%, #078cc1); box-shadow: 0 14px 30px rgba(73,49,167,.22); cursor: pointer; font-size: 12px; font-weight: 900; }
.process-button:disabled { box-shadow: none; cursor: not-allowed; opacity: .45; }
.process-button.processing b { animation: tool-spin .8s linear infinite; }
@keyframes tool-spin { to { transform: rotate(360deg); } }
.status-message { min-height: 16px; margin: 10px 0 0; color: #6d7692; font-size: 10px; line-height: 1.5; text-align: center; }
.status-message.error { color: #be3247; }
.preview-topline { display: flex; align-items: center; justify-content: space-between; }
.preview-topline span { color: #777f99; font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.preview-topline h2 { margin: 5px 0 0; font-size: 23px; letter-spacing: -.035em; }
.preview-topline button:disabled { cursor: not-allowed; opacity: .35; }
.preview-empty { min-height: 580px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.empty-picture { width: 112px; height: 92px; padding: 10px; display: flex; align-items: end; justify-content: center; border: 2px solid #d6dae9; border-radius: 18px; transform: rotate(-3deg); }
.empty-picture span { width: 66px; height: 42px; display: block; border-radius: 9px; background: linear-gradient(145deg, #ded8fa, #cceff4); clip-path: polygon(0 100%, 28% 35%, 45% 61%, 64% 18%, 100% 100%); }
.preview-empty h3 { margin: 27px 0 8px; font-size: 17px; }
.preview-empty p { max-width: 330px; margin: 0; color: #77809b; font-size: 11px; line-height: 1.6; }
.preview-content { margin-top: 25px; }
.preview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.preview-grid figure { margin: 0; min-width: 0; }
.preview-grid figcaption { margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 9px; font-size: 10px; }
.preview-grid figcaption span { padding: 5px 7px; border-radius: 8px; color: #69728e; background: #f0f2f8; font-size: 8px; }
.image-stage { position: relative; height: 310px; display: grid; place-items: center; overflow: hidden; border: 1px solid #dfe2ec; border-radius: 17px; }
.checker { background-color: #f8f9fc; background-image: linear-gradient(45deg,#edf0f6 25%,transparent 25%),linear-gradient(-45deg,#edf0f6 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#edf0f6 75%),linear-gradient(-45deg,transparent 75%,#edf0f6 75%); background-size: 18px 18px; background-position: 0 0,0 9px,9px -9px,-9px 0; }
.image-stage img { width: 100%; height: 100%; object-fit: contain; }
.result-placeholder { max-width: 150px; padding: 12px; color: #8a92aa; background: rgba(255,255,255,.8); border-radius: 12px; font-size: 10px; line-height: 1.5; text-align: center; }
.result-stats { margin-top: 16px; display: grid; grid-template-columns: repeat(4,1fr); overflow: hidden; border: 1px solid #e0e3ed; border-radius: 14px; }
.result-stats div { padding: 13px; border-right: 1px solid #e6e8f0; }
.result-stats div:last-child { border: 0; }
.result-stats span, .result-stats b { display: block; }
.result-stats span { color: #8088a0; font-size: 8px; }
.result-stats b { margin-top: 5px; font-size: 11px; }
.result-stats .success { color: #098560; }
.download-button { min-height: 62px; margin-top: 15px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-radius: 15px; color: white; background: linear-gradient(110deg, #087d68, #18b981); box-shadow: 0 12px 26px rgba(19,154,111,.2); }
.download-button.disabled { box-shadow: none; pointer-events: none; opacity: .38; }
.download-button span b, .download-button span small { display: block; }
.download-button span b { font-size: 12px; }
.download-button span small { margin-top: 4px; color: rgba(255,255,255,.75); font-size: 9px; }
.download-button strong { font-size: 22px; }
.tool-notes { max-width: 1180px; margin: 0 auto 90px; padding: 0 24px; display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.tool-notes article { padding: 24px; border: 1px solid #e0e3ef; border-radius: 20px; background: rgba(255,255,255,.7); }
.tool-notes article > span { color: #6950bd; font-size: 9px; font-weight: 900; }
.tool-notes h3 { margin: 24px 0 8px; font-size: 15px; }
.tool-notes p { margin: 0; color: #6e7894; font-size: 10px; line-height: 1.65; }
.tool-footer-main { padding: 30px max(6vw,36px); display: flex; align-items: center; gap: 22px; color: #737c9a; background: #070d28; font-size: 10px; }
.tool-footer-main img { width: 150px; }
.tool-footer-main p { margin: 0; }
.tool-footer-main > span { margin-left: auto; }
.tool-footer-links { display: flex; align-items: center; gap: 14px; }
.tool-footer-links a { color: #8d96b6; font-size: 10px; font-weight: 750; }
.tool-footer-links a:hover { color: white; }
@media (max-width: 980px) { .tool-hero { align-items: flex-start; flex-direction: column; } .privacy-card { width: 100%; } .image-workspace { grid-template-columns: 1fr; } .preview-column { position: static; min-height: auto; } }
@media (max-width: 680px) {
  .tool-nav .privacy-chip { display: none; } .tool-nav { gap: 9px; font-size: 11px; } .tool-nav .tool-contact-link { padding: 8px 10px; font-size: 9px; }
  .tool-hero { padding: 122px 18px 46px; gap: 28px; } .tool-hero h1 { font-size: 46px; } .tool-hero-copy > p { font-size: 14px; }
  .image-workspace { margin-top: 24px; padding: 0 12px; } .control-column, .preview-column { padding: 20px; border-radius: 21px; }
  .setting-label { align-items: flex-start; flex-direction: column; gap: 5px; } .setting-label small { text-align: left; }
  .preset-row { grid-template-columns: repeat(2,1fr); } .preview-grid { grid-template-columns: 1fr; } .image-stage { height: 280px; }
  .result-stats { grid-template-columns: repeat(2,1fr); } .result-stats div:nth-child(2) { border-right: 0; } .result-stats div:nth-child(-n+2) { border-bottom: 1px solid #e6e8f0; }
  .tool-notes { grid-template-columns: 1fr; margin-bottom: 50px; } .tool-footer-main { align-items: flex-start; flex-direction: column; } .tool-footer-main > span { margin-left: 0; }
}
@media (max-width: 390px) { .dimension-row { grid-template-columns: 1fr; } .ratio-lock { margin: 0 auto; transform: rotate(90deg); } }

/* Images to PDF */
.workflow-steps { max-width: 980px; margin: 34px auto 0; padding: 14px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 14px; border: 1px solid #e0e3ee; border-radius: 19px; background: white; box-shadow: 0 14px 34px rgba(30,39,88,.06); }
.workflow-steps > i { color: #a3abc1; font-style: normal; }
.workflow-step { min-height: 54px; padding: 8px; display: flex; align-items: center; gap: 11px; border-radius: 13px; color: #7c859f; transition: color .2s ease,background .2s ease; }
.workflow-step > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #d8dce8; border-radius: 10px; background: #f7f8fb; font-size: 10px; font-weight: 950; }
.workflow-step b, .workflow-step small { display: block; }
.workflow-step b { font-size: 11px; }
.workflow-step small { margin-top: 3px; font-size: 8px; }
.workflow-step.active { color: #17214c; background: #f2efff; }
.workflow-step.active > span { border-color: #5d42bd; color: white; background: #5d42bd; }
.workflow-step.complete { color: #087b55; }
.workflow-step.complete > span { border-color: #18a875; color: white; background: #18a875; }
.pdf-hero { background: radial-gradient(circle at 90% 5%, #e6ddff, transparent 30%), radial-gradient(circle at 7% 70%, #dff9ff, transparent 28%), linear-gradient(145deg, #fcfdff, #f5f2ff); }
.pdf-workspace { grid-template-columns: minmax(420px, .9fr) minmax(0, 1.1fr); }
.pdf-drop-zone { min-height: 205px; }
.pdf-file-toolbar { margin-top: 20px; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #dfe3ee; border-radius: 14px; background: #fafbff; }
.pdf-file-toolbar b, .pdf-file-toolbar span { display: block; }
.pdf-file-toolbar b { font-size: 11px; }
.pdf-file-toolbar span { margin-top: 4px; color: #7a839d; font-size: 9px; }
.pdf-file-toolbar button { min-height: 42px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #d9dced; border-radius: 11px; color: #5940b2; background: white; cursor: pointer; font-size: 10px; font-weight: 900; }
.pdf-file-list { margin-top: 11px; display: grid; gap: 9px; }
.pdf-file-card { min-width: 0; padding: 10px; display: grid; grid-template-columns: 26px 56px minmax(0,1fr) auto; align-items: center; gap: 10px; border: 1px solid #dfe3ee; border-radius: 14px; background: white; transition: border-color .2s ease, box-shadow .2s ease, opacity .2s ease; }
.pdf-file-card[draggable="true"] { cursor: grab; }
.pdf-file-card.dragging { opacity: .45; }
.pdf-file-card.drag-target { border-color: #6a4cc7; box-shadow: 0 0 0 3px rgba(106,76,199,.09); }
.page-index { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; color: white; background: #121c49; font-size: 8px; font-weight: 900; }
.pdf-thumb { width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: #f0f2f8; }
.pdf-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.pdf-file-copy { min-width: 0; }
.pdf-file-copy b, .pdf-file-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-file-copy b { font-size: 10px; }
.pdf-file-copy span { margin-top: 5px; color: #7d869e; font-size: 8px; }
.pdf-card-actions { display: flex; align-items: center; gap: 4px; }
.pdf-card-actions button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #dfe2ec; border-radius: 10px; color: #5b6580; background: #fafbfe; cursor: pointer; font-size: 14px; font-weight: 900; }
.pdf-card-actions button:hover, .pdf-card-actions button:focus-visible { border-color: #7258c7; outline: 0; color: #5f41bb; background: #f4f0ff; }
.pdf-card-actions .remove-page { color: #b33c53; }
.pdf-card-actions button:disabled { cursor: not-allowed; opacity: .3; }
.pdf-settings { margin-top: 26px; }
.pdf-setting-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.pdf-field { min-width: 0; }
.pdf-field > span { display: block; margin-bottom: 8px; color: #59627e; font-size: 11px; font-weight: 900; }
.pdf-field select, .pdf-name-input { width: 100%; min-height: 48px; border: 1px solid #d8dce9; border-radius: 11px; color: #202a52; background: white; font-size: 12px; font-weight: 800; }
.pdf-field select { padding: 0 10px; outline: 0; }
.pdf-name-input { display: flex; align-items: center; overflow: hidden; }
.pdf-name-input input { width: 100%; min-width: 0; padding: 0 10px; border: 0; outline: 0; color: #202a52; font-size: 10px; font-weight: 800; }
.pdf-name-input b { align-self: stretch; padding: 0 10px; display: grid; place-items: center; border-left: 1px solid #e2e5ee; color: #737c96; background: #f7f8fc; font-size: 9px; }
.pdf-preview-column { min-height: 720px; }
.pdf-empty-stack { position: relative; width: 100px; height: 105px; }
.pdf-empty-stack i { position: absolute; inset: 0; border: 2px solid #cfd4e5; border-radius: 14px; background: white; }
.pdf-empty-stack i:nth-child(1) { transform: translate(-14px,10px) rotate(-7deg); background: #f1edff; }
.pdf-empty-stack i:nth-child(2) { transform: translate(14px,7px) rotate(6deg); background: #e6f8fb; }
.pdf-empty-stack i:nth-child(3)::before { content: "PDF"; position: absolute; left: 15px; bottom: 14px; color: #6a4bc3; font-size: 16px; font-style: normal; font-weight: 950; letter-spacing: .04em; }
.pdf-page-preview { margin-top: 22px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.pdf-preview-page { min-width: 0; margin: 0; }
.pdf-paper { position: relative; aspect-ratio: 210 / 297; padding: 7px; display: grid; place-items: center; overflow: hidden; border: 1px solid #dfe2ec; border-radius: 9px; background: white; box-shadow: 0 8px 20px rgba(33,42,87,.08); }
.pdf-paper.landscape { aspect-ratio: 297 / 210; }
.pdf-paper img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s ease; }
.pdf-preview-page figcaption { margin-top: 7px; display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #727b96; font-size: 8px; }
.pdf-preview-page figcaption b { max-width: 75%; overflow: hidden; color: #283253; text-overflow: ellipsis; white-space: nowrap; }
.pdf-result { margin-top: 22px; padding: 16px; display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 13px; border: 1px solid #bce7d6; border-radius: 16px; background: #effbf6; }
.pdf-result-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(135deg,#5640bd,#008fc5); font-size: 10px; font-weight: 950; }
.pdf-result b, .pdf-result span { display: block; }
.pdf-result b { color: #164e3d; font-size: 11px; }
.pdf-result span { margin-top: 5px; color: #56806f; font-size: 9px; }
.pdf-result a { min-height: 48px; padding: 0 16px; display: flex; align-items: center; gap: 10px; border-radius: 11px; color: white; background: #118866; font-size: 10px; font-weight: 900; box-shadow: 0 10px 22px rgba(17,136,102,.18); }
.tool-page button:focus-visible, .tool-page a:focus-visible, .tool-page select:focus-visible, .tool-page input:focus-visible { outline: 3px solid rgba(67,82,187,.24); outline-offset: 2px; }
.pdf-result strong { font-size: 16px; }

@media (max-width: 1120px) {
  .pdf-workspace { grid-template-columns: 1fr; }
  .pdf-preview-column { position: static; min-height: 560px; }
}
@media (max-width: 680px) {
  .workflow-steps { margin: 24px 12px 0; grid-template-columns: 1fr; gap: 5px; }
  .workflow-steps > i { display: none; }
  .workflow-step { min-height: 48px; }
  .pdf-file-card { grid-template-columns: 24px 48px minmax(0,1fr); }
  .pdf-thumb { width: 48px; height: 48px; }
  .pdf-card-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 3px; }
  .pdf-setting-grid { grid-template-columns: 1fr; }
  .pdf-page-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pdf-result { grid-template-columns: 42px minmax(0,1fr); }
  .pdf-result a { grid-column: 1 / -1; justify-content: center; }
}

/* Organize PDF */
.organize-hero { background: radial-gradient(circle at 88% 7%, #dff5ff, transparent 31%), radial-gradient(circle at 8% 75%, #efe3ff, transparent 30%), linear-gradient(145deg, #fcfdff, #f4f3ff); }
.organize-shell { max-width: 1280px; margin: 34px auto 70px; padding: 0 24px; }
.organize-upload-panel { padding: 34px; border: 1px solid #dfe3ee; border-radius: 26px; background: white; box-shadow: 0 18px 48px rgba(27,37,86,.07); }
.organize-drop-zone { min-height: 330px; }
.organize-drop-zone .upload-icon { width: 66px; height: 66px; font-size: 13px; letter-spacing: .08em; }
.organize-drop-zone h2 { margin: 21px 0 8px; font-size: 25px; letter-spacing: -.035em; }
.organize-drop-zone.busy { pointer-events: none; opacity: .72; }
.button-spinner { width: 17px; height: 17px; display: inline-block; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: tool-spin .75s linear infinite; }
.organize-workspace { padding: 24px; border: 1px solid #dfe3ee; border-radius: 26px; background: white; box-shadow: 0 18px 48px rgba(27,37,86,.07); }
.organize-topbar { padding: 0 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #e6e9f1; }
.organize-file-info { min-width: 0; display: flex; align-items: center; gap: 12px; }
.organize-pdf-badge { width: 50px; height: 50px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; color: white; background: linear-gradient(135deg,#30247d,#168bd7); font-size: 10px; font-weight: 950; letter-spacing: .06em; }
.organize-file-info div { min-width: 0; }
.organize-file-info b, .organize-file-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.organize-file-info b { font-size: 13px; }
.organize-file-info span { margin-top: 5px; color: #77809a; font-size: 10px; }
.organize-top-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.organize-top-actions button, .organize-selection button, .organize-bulk-actions button { min-height: 40px; padding: 0 13px; border: 1px solid #dce0eb; border-radius: 10px; color: #4f5a79; background: #fff; cursor: pointer; font-size: 10px; font-weight: 900; }
.organize-top-actions button:hover, .organize-selection button:hover, .organize-bulk-actions button:hover { border-color: #7559cc; color: #5d40b9; background: #f7f4ff; }
.organize-top-actions #reset-pdf { color: #b13a51; }
.organize-toolbar { margin-top: 18px; padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #e0e3ed; border-radius: 15px; background: #f8f9fc; }
.organize-selection, .organize-bulk-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.organize-selection > span { margin-left: 4px; color: #66718e; font-size: 10px; font-weight: 850; }
.organize-bulk-actions button { display: inline-flex; align-items: center; gap: 6px; color: #4f3ba3; }
.organize-bulk-actions button span { font-size: 15px; }
.organize-bulk-actions button.danger { color: #b4344d; }
.organize-bulk-actions button:disabled { cursor: not-allowed; opacity: .38; }
.organize-guidance { margin: 18px 0; padding: 13px 15px; display: flex; align-items: center; gap: 12px; border: 1px solid #d9e6f5; border-radius: 13px; color: #475673; background: #f3f8fd; }
.organize-guidance > span { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: white; background: #3679ba; font-size: 16px; font-weight: 950; }
.organize-guidance p { margin: 0; font-size: 10px; line-height: 1.5; }
.organize-page-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.organize-page-card { min-width: 0; padding: 11px; border: 1px solid #dfe2ec; border-radius: 16px; background: #fafbfe; transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease,opacity .18s ease; }
.organize-page-card[draggable="true"] { cursor: grab; }
.organize-page-card:hover { transform: translateY(-2px); border-color: #c6cbea; box-shadow: 0 11px 25px rgba(29,38,84,.07); }
.organize-page-card.selected { border-color: #6d51c7; box-shadow: 0 0 0 3px rgba(109,81,199,.1); background: #f8f5ff; }
.organize-page-card.dragging { opacity: .42; }
.organize-page-card.drag-target { border-color: #168bd7; box-shadow: 0 0 0 4px rgba(22,139,215,.12); }
.organize-page-head { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.organize-page-head > b { color: #293353; font-size: 10px; }
.organize-check { position: relative; width: 25px; height: 25px; display: grid; place-items: center; cursor: pointer; }
.organize-check input { width: 17px; height: 17px; margin: 0; accent-color: #6245be; }
.organize-check span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.organize-page-thumb { position: relative; height: 230px; display: grid; place-items: center; overflow: hidden; border: 1px solid #dfe2eb; border-radius: 11px; background: #eef1f7; }
.organize-page-thumb::before { content: ""; position: absolute; inset: 10px; border-radius: 5px; background: white; box-shadow: 0 7px 17px rgba(25,35,80,.09); }
.organize-page-thumb img { position: relative; z-index: 1; max-width: calc(100% - 20px); max-height: calc(100% - 20px); object-fit: contain; transition: transform .2s ease; }
.organize-page-thumb.sideways img { max-width: 76%; max-height: 76%; }
.thumb-loading { position: relative; z-index: 1; color: #79839c; font-size: 9px; }
.organize-page-meta { padding: 9px 2px 8px; display: flex; align-items: center; justify-content: space-between; gap: 7px; color: #77809a; font-size: 8px; }
.organize-page-meta b { color: #5d45b5; }
.organize-page-actions { display: grid; grid-template-columns: repeat(6,1fr); gap: 4px; }
.organize-page-actions button { min-width: 0; height: 34px; padding: 0; display: grid; place-items: center; border: 1px solid #dce0ea; border-radius: 8px; color: #55607d; background: white; cursor: pointer; font-size: 13px; font-weight: 900; }
.organize-page-actions button:hover, .organize-page-actions button:focus-visible { border-color: #7256c8; outline: 0; color: #5e40ba; background: #f4f0ff; }
.organize-page-actions button.danger { color: #b4364e; }
.organize-page-actions button:disabled { cursor: not-allowed; opacity: .28; }
.organize-output-panel { margin-top: 24px; padding: 22px; display: grid; grid-template-columns: minmax(220px,1fr) minmax(210px,.55fr) minmax(210px,.55fr); align-items: end; gap: 16px; border: 1px solid #dfe3ec; border-radius: 18px; background: linear-gradient(140deg,#fbfcff,#f3f6ff); }
.organize-output-copy > span { color: #6848c0; font-size: 9px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.organize-output-copy h2 { margin: 7px 0 6px; font-size: 20px; letter-spacing: -.035em; }
.organize-output-copy p { margin: 0; color: #6d7793; font-size: 10px; line-height: 1.55; }
.organize-name-field > span { margin-bottom: 7px; }
.organize-save-button { margin: 0; }
.organize-output-panel > .status-message, .organize-result { grid-column: 1 / -1; }
.organize-result { margin-top: 0; }

@media (max-width: 1050px) {
  .organize-page-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .organize-toolbar { align-items: flex-start; flex-direction: column; }
  .organize-output-panel { grid-template-columns: 1fr 1fr; }
  .organize-output-copy { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .organize-shell { margin-top: 24px; padding: 0 12px; }
  .organize-upload-panel, .organize-workspace { padding: 16px; border-radius: 21px; }
  .organize-drop-zone { min-height: 285px; }
  .organize-topbar { align-items: flex-start; flex-direction: column; }
  .organize-top-actions { width: 100%; justify-content: flex-start; }
  .organize-page-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .organize-page-thumb { height: 205px; }
  .organize-page-actions { grid-template-columns: repeat(3,1fr); }
  .organize-output-panel { grid-template-columns: 1fr; padding: 17px; }
  .organize-output-copy { grid-column: auto; }
}
@media (max-width: 430px) {
  .organize-page-grid { grid-template-columns: 1fr; }
  .organize-page-thumb { height: 315px; }
  .organize-selection, .organize-bulk-actions { width: 100%; }
}

/* Convert to JPG */
.jpg-hero { background: radial-gradient(circle at 91% 2%, #dff8ff, transparent 30%), radial-gradient(circle at 6% 77%, #ffe3e8, transparent 29%), linear-gradient(145deg,#fcfdff,#fff5f7); }
.format-support-row { margin-top: 23px; display: flex; flex-wrap: wrap; gap: 7px; }
.format-support-row span { min-width: 47px; padding: 8px 10px; border: 1px solid rgba(111,87,193,.16); border-radius: 10px; color: #554480; background: rgba(255,255,255,.78); font-size: 9px; font-weight: 950; text-align: center; box-shadow: 0 7px 18px rgba(37,44,92,.04); }
.converter-workflow { max-width: 1050px; }
.converter-shell { max-width: 1240px; margin: 28px auto 70px; padding: 0 24px; display: grid; gap: 18px; }
.converter-panel { padding: 28px; border: 1px solid #dfe3ef; border-radius: 25px; background: white; box-shadow: 0 18px 50px rgba(25,34,84,.065); }
.converter-panel-heading, .converter-results-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.converter-panel-heading > div > span, .converter-results-heading > div > span { color: #6a4bc0; font-size: 8px; font-weight: 950; letter-spacing: .12em; }
.converter-panel-heading h2, .converter-results-heading h2 { margin: 7px 0 6px; font-size: 23px; letter-spacing: -.035em; }
.converter-panel-heading p, .converter-results-heading p { margin: 0; color: #747e99; font-size: 10px; line-height: 1.55; }
.compact-heading { margin-bottom: 22px; }
.converter-reset { min-height: 39px; padding: 0 13px; border: 1px solid #efcbd3; border-radius: 10px; color: #b33b52; background: #fff8f9; cursor: pointer; font-size: 9px; font-weight: 900; }
.converter-reset:disabled { cursor: not-allowed; opacity: .4; }
.converter-drop-zone { min-height: 270px; }
.converter-drop-zone .upload-icon { width: 66px; height: 66px; font-size: 12px; letter-spacing: .05em; }
.converter-drop-zone h3 { margin-top: 20px; font-size: 22px; letter-spacing: -.03em; }
.converter-file-toolbar { margin-top: 22px; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #dfe3ee; border-radius: 14px; background: #fafbff; }
.converter-file-toolbar b, .converter-file-toolbar span { display: block; }
.converter-file-toolbar b { font-size: 11px; }
.converter-file-toolbar div > span { margin-top: 4px; color: #7b849d; font-size: 9px; }
.converter-file-toolbar button { min-height: 42px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #d9dced; border-radius: 11px; color: #5940b2; background: white; cursor: pointer; font-size: 10px; font-weight: 900; }
.converter-file-list { margin-top: 10px; display: grid; gap: 8px; }
.converter-file-card { min-width: 0; padding: 10px; display: grid; grid-template-columns: 30px 62px minmax(0,1fr) auto; align-items: center; gap: 11px; border: 1px solid #dfe3ee; border-radius: 14px; background: white; }
.converter-file-card.error { border-color: #efc7ce; background: #fff8f9; }
.converter-file-index { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: white; background: #111b4a; font-size: 8px; font-weight: 950; }
.converter-file-thumb { width: 62px; height: 62px; display: grid; place-items: center; overflow: hidden; border: 1px solid #e1e4ed; border-radius: 11px; }
.converter-file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.converter-file-thumb > span { padding: 5px; border-radius: 7px; color: white; background: linear-gradient(135deg,#ff4b65,#6e3dcc); font-size: 8px; font-weight: 950; }
.converter-file-copy { min-width: 0; }
.converter-file-copy b, .converter-file-copy span, .converter-file-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.converter-file-copy b { font-size: 11px; }
.converter-file-copy span { margin-top: 5px; color: #747e99; font-size: 8px; }
.converter-file-copy small { margin-top: 4px; color: #18805e; font-size: 8px; }
.converter-file-card.error .converter-file-copy small { color: #bd3b51; }
.converter-remove { min-height: 36px; padding: 0 11px; border: 1px solid #e7d8dc; border-radius: 9px; color: #a83c50; background: #fffafb; cursor: pointer; font-size: 8px; font-weight: 900; }
.converter-remove:disabled { cursor: not-allowed; opacity: .35; }
.converter-settings-panel { transition: opacity .2s ease; }
.converter-settings-panel[aria-disabled="true"] { opacity: .44; pointer-events: none; }
.converter-setting-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.converter-field { min-width: 0; padding: 17px; display: flex; flex-direction: column; border: 1px solid #e0e3ed; border-radius: 15px; background: #fafbfe; }
.converter-field > span { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.converter-field b { color: #303a5c; font-size: 10px; }
.converter-field small { color: #7d86a0; font-size: 8px; text-align: right; }
.converter-field select { width: 100%; min-height: 46px; padding: 0 10px; border: 1px solid #d7dbe8; border-radius: 10px; outline: 0; color: #202a52; background: white; font-size: 10px; font-weight: 800; }
.quality-field input[type="range"] { width: 100%; accent-color: #6345c1; }
.quality-field em { margin-top: 10px; color: #7e87a0; font-size: 8px; font-style: normal; }
.custom-colour-field input[type="color"] { width: 100%; min-height: 46px; padding: 4px; border: 1px solid #d7dbe8; border-radius: 10px; background: white; cursor: pointer; }
.converter-format-note { margin-top: 15px; padding: 14px; display: grid; grid-template-columns: 31px minmax(0,1fr); gap: 11px; border: 1px solid #d8e5f3; border-radius: 14px; color: #3f4f6b; background: #f4f8fc; }
.converter-format-note > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: white; background: #3679ba; font-size: 13px; font-weight: 950; }
.converter-format-note b { display: block; font-size: 10px; }
.converter-format-note p { margin: 5px 0 0; color: #64738d; font-size: 8px; line-height: 1.55; }
.converter-process { max-width: 520px; margin-left: auto; }
.converter-results-panel { scroll-margin-top: 24px; border-color: #cce9dd; background: linear-gradient(145deg,#fff 65%,#f0fbf6); }
.download-all-button { min-height: 50px; padding: 0 16px; display: inline-flex; align-items: center; gap: 15px; border: 0; border-radius: 12px; color: white; background: linear-gradient(110deg,#087d68,#18b981); box-shadow: 0 12px 25px rgba(19,154,111,.19); cursor: pointer; font-size: 10px; font-weight: 900; }
.download-all-button b { font-size: 17px; }
.download-all-button:disabled { box-shadow: none; cursor: wait; opacity: .55; }
.converter-result-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.converter-result-card { min-width: 0; padding: 12px; display: grid; grid-template-columns: 86px minmax(0,1fr) auto; align-items: center; gap: 12px; border: 1px solid #dbe6e1; border-radius: 16px; background: white; }
.converter-result-card.error { grid-template-columns: 46px minmax(0,1fr); border-color: #efc8cf; background: #fff8f9; }
.converter-result-preview { width: 86px; height: 76px; display: grid; place-items: center; overflow: hidden; border: 1px solid #e0e3eb; border-radius: 11px; background: #f3f4f8; }
.converter-result-preview img { width: 100%; height: 100%; object-fit: contain; }
.converter-result-copy { min-width: 0; }
.converter-result-copy span, .converter-result-copy b, .converter-result-copy small, .converter-result-card.error b, .converter-result-card.error span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.converter-result-copy span { color: #16805f; font-size: 7px; font-weight: 950; letter-spacing: .08em; }
.converter-result-copy b { margin-top: 6px; font-size: 10px; }
.converter-result-copy small { margin-top: 5px; color: #76809a; font-size: 8px; }
.converter-result-download { min-height: 42px; padding: 0 12px; display: inline-flex; align-items: center; gap: 9px; border-radius: 10px; color: white; background: #148765; font-size: 8px; font-weight: 900; white-space: nowrap; }
.converter-result-download b { font-size: 14px; }
.converter-result-error { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: white; background: #c74358; font-size: 18px; font-weight: 950; }
.converter-result-card.error b { font-size: 10px; }
.converter-result-card.error span { margin-top: 5px; color: #a94758; font-size: 8px; }

@media (max-width: 1050px) {
  .converter-setting-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .converter-result-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .format-support-row span { flex: 1 0 19%; }
  .converter-shell { margin-top: 20px; padding: 0 12px; }
  .converter-panel { padding: 17px; border-radius: 21px; }
  .converter-panel-heading, .converter-results-heading { align-items: flex-start; flex-direction: column; }
  .converter-reset, .download-all-button { width: 100%; justify-content: center; }
  .converter-file-card { grid-template-columns: 26px 52px minmax(0,1fr); }
  .converter-file-thumb { width: 52px; height: 52px; }
  .converter-remove { grid-column: 1 / -1; justify-self: end; }
  .converter-setting-grid { grid-template-columns: 1fr; }
  .converter-process { max-width: none; }
  .converter-result-card { grid-template-columns: 70px minmax(0,1fr); }
  .converter-result-preview { width: 70px; height: 66px; }
  .converter-result-download { grid-column: 1 / -1; justify-content: center; }
}

/* Crop Image */
.crop-hero { background: radial-gradient(circle at 91% 4%, #dbf8ff, transparent 30%), radial-gradient(circle at 5% 80%, #ffe2e9, transparent 30%), linear-gradient(145deg,#fcfdff,#f7f2ff); }
.crop-workflow { max-width: 1040px; }
.crop-shell { max-width: 1320px; margin: 28px auto 76px; padding: 0 24px; display: grid; grid-template-columns: minmax(0,1.62fr) minmax(330px,.78fr); align-items: start; gap: 18px; }
.crop-editor-panel, .crop-side-panel, .crop-result-panel { border: 1px solid #dfe3ef; border-radius: 25px; background: white; box-shadow: 0 18px 50px rgba(25,34,84,.065); }
.crop-editor-panel { min-width: 0; padding: 28px; }
.crop-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.crop-panel-heading > div > span { color: #6a4bc0; font-size: 8px; font-weight: 950; letter-spacing: .12em; }
.crop-panel-heading h2 { margin: 7px 0 6px; font-size: 23px; letter-spacing: -.035em; }
.crop-panel-heading p { margin: 0; color: #747e99; font-size: 10px; line-height: 1.55; }
.crop-drop-zone { min-height: 500px; }
.crop-drop-zone .upload-icon { width: 68px; height: 68px; font-size: 11px; letter-spacing: .05em; }
.crop-drop-zone h3 { margin-top: 21px; font-size: 24px; letter-spacing: -.035em; }
.crop-filebar { margin-top: 22px; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #e0e3ed; border-radius: 14px; background: #fafbfe; }
.crop-file-info { min-width: 0; display: flex; align-items: center; gap: 11px; }
.crop-file-info img { width: 48px; height: 48px; flex: 0 0 auto; object-fit: cover; border: 1px solid #dfe2ec; border-radius: 10px; background: #eef0f5; }
.crop-file-info div { min-width: 0; }
.crop-file-info b, .crop-file-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crop-file-info b { font-size: 11px; }
.crop-file-info span { margin-top: 5px; color: #76809b; font-size: 8px; }
.crop-filebar > button { min-height: 38px; padding: 0 12px; border: 1px solid #daddE9; border-radius: 9px; color: #5840ae; background: white; cursor: pointer; font-size: 8px; font-weight: 900; }
.crop-transform-toolbar { margin: 12px 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; }
.crop-transform-toolbar button { min-height: 44px; padding: 5px 8px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dfe2ed; border-radius: 10px; color: #505a79; background: white; cursor: pointer; font-size: 8px; font-weight: 900; }
.crop-transform-toolbar button:hover, .crop-transform-toolbar button:focus-visible { border-color: #6c50c5; outline: 0; color: #5d3fb7; background: #f7f4ff; }
.crop-transform-toolbar button span { font-size: 15px; line-height: 1; }
.crop-canvas-wrap { position: relative; overflow: hidden; border: 1px solid #272e4c; border-radius: 17px; background: #151b34; }
#crop-display { width: 100%; height: 560px; display: block; outline: 0; touch-action: none; cursor: crosshair; }
#crop-display.dragging { cursor: grabbing; }
#crop-display:focus-visible { box-shadow: inset 0 0 0 3px #55d5e1; }
.crop-canvas-hint { min-height: 37px; padding: 0 13px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px 17px; border-top: 1px solid rgba(255,255,255,.1); color: #b8bfd9; background: #0d132c; font-size: 8px; font-weight: 750; }
.crop-canvas-hint span::before { content: "✓"; margin-right: 6px; color: #61dbe3; }
.crop-status { margin: 11px 2px 0; }
.crop-side-panel { position: static; padding: 18px; display: grid; gap: 10px; transition: opacity .2s ease; }
.crop-side-panel[aria-disabled="true"] { opacity: .42; pointer-events: none; }
.crop-setting-card { padding: 16px; border: 1px solid #e0e3ed; border-radius: 17px; background: #fafbfe; }
.crop-setting-heading { margin-bottom: 14px; display: flex; align-items: flex-start; gap: 10px; }
.crop-setting-heading > span { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: white; background: #111b4a; font-size: 7px; font-weight: 950; }
.crop-setting-heading h3 { margin: 1px 0 3px; font-size: 13px; letter-spacing: -.02em; }
.crop-setting-heading p { margin: 0; color: #7a839c; font-size: 8px; }
.crop-ratio-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.crop-ratio-grid button { min-width: 0; min-height: 57px; padding: 8px 5px; border: 1px solid #dfe2ec; border-radius: 10px; color: #505a77; background: white; cursor: pointer; }
.crop-ratio-grid b, .crop-ratio-grid small { display: block; }
.crop-ratio-grid b { font-size: 9px; }
.crop-ratio-grid small { margin-top: 4px; color: #848ca3; font-size: 6px; }
.crop-ratio-grid button.active { border-color: #6044bc; color: white; background: linear-gradient(135deg,#171a55,#7043c5); box-shadow: 0 9px 17px rgba(75,52,164,.18); }
.crop-ratio-grid button.active small { color: #dcd6f3; }
.crop-number-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.crop-number-grid label > span, .crop-output-dimensions label > span, .crop-select-field > span { margin-bottom: 6px; display: block; color: #5f6985; font-size: 8px; font-weight: 850; }
.crop-number-grid label > div, .crop-output-dimensions label > div { min-height: 41px; padding: 0 8px; display: flex; align-items: center; border: 1px solid #daddE8; border-radius: 9px; background: white; }
.crop-number-grid input, .crop-output-dimensions input { width: 100%; min-width: 0; border: 0; outline: 0; color: #222c51; background: transparent; font-size: 10px; font-weight: 800; }
.crop-number-grid i, .crop-output-dimensions i { color: #939bb1; font-size: 7px; font-style: normal; }
.crop-select-field { display: block; }
.crop-select-field select { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid #daddE8; border-radius: 9px; outline: 0; color: #273052; background: white; font-size: 9px; font-weight: 800; }
.crop-output-dimensions { margin-top: 9px; display: grid; grid-template-columns: minmax(0,1fr) 34px minmax(0,1fr); align-items: end; gap: 6px; }
.crop-output-dimensions[hidden] { display: none; }
.crop-output-dimensions .ratio-lock { width: 34px; height: 41px; }
.crop-output-row { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.crop-quality-field { min-width: 0; padding: 8px 10px; display: flex; justify-content: center; flex-direction: column; border: 1px solid #daddE8; border-radius: 9px; background: white; }
.crop-quality-field > span { display: flex; align-items: center; justify-content: space-between; gap: 7px; color: #5f6985; font-size: 8px; }
.crop-quality-field small { color: #7252c6; font-weight: 900; }
.crop-quality-field input { width: 100%; margin-top: 7px; accent-color: #6749c2; }
.crop-quality-field.disabled { opacity: .48; }
.crop-process { margin-top: 14px; }
.crop-result-panel { grid-column: 1 / -1; padding: 28px; display: grid; grid-template-columns: minmax(300px,.8fr) minmax(330px,1.2fr); align-items: center; gap: 28px; border-color: #cce9dd; background: linear-gradient(145deg,#fff 55%,#effbf6); scroll-margin-top: 24px; }
.crop-result-panel[hidden] { display: none; }
.crop-result-copy > span { color: #16805f; font-size: 8px; font-weight: 950; letter-spacing: .12em; }
.crop-result-copy h2 { margin: 8px 0 7px; font-size: 26px; letter-spacing: -.04em; }
.crop-result-copy > p { margin: 0; color: #6d7791; font-size: 10px; line-height: 1.6; }
.crop-result-stats { margin: 20px 0 15px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.crop-result-stats div { min-width: 0; padding: 11px; border: 1px solid #dbe7e2; border-radius: 11px; background: rgba(255,255,255,.82); }
.crop-result-stats small, .crop-result-stats b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crop-result-stats small { color: #7b859c; font-size: 7px; }
.crop-result-stats b { margin-top: 6px; color: #263253; font-size: 8px; }
.crop-result-preview { min-height: 360px; max-height: 520px; padding: 15px; display: grid; place-items: center; overflow: hidden; border: 1px solid #d9e4df; border-radius: 17px; }
.crop-result-preview img { max-width: 100%; max-height: 490px; object-fit: contain; }

@media (max-width: 1050px) {
  .crop-shell { grid-template-columns: 1fr; }
  .crop-side-panel { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crop-side-panel .crop-setting-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .crop-shell { margin-top: 20px; padding: 0 12px; }
  .crop-editor-panel, .crop-side-panel, .crop-result-panel { padding: 16px; border-radius: 21px; }
  .crop-panel-heading { align-items: flex-start; flex-direction: column; }
  .crop-panel-heading .converter-reset { width: 100%; }
  .crop-drop-zone { min-height: 360px; }
  .crop-filebar { align-items: flex-start; flex-direction: column; }
  .crop-filebar > button { width: 100%; }
  .crop-transform-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crop-transform-toolbar button:last-child { grid-column: 1 / -1; }
  #crop-display { height: 430px; }
  .crop-canvas-hint { justify-content: flex-start; padding: 10px 13px; }
  .crop-side-panel { grid-template-columns: 1fr; }
  .crop-side-panel .crop-setting-card:last-child { grid-column: auto; }
  .crop-result-panel { grid-template-columns: 1fr; }
  .crop-result-stats { grid-template-columns: 1fr; }
  .crop-result-preview { min-height: 280px; }
}
@media (max-width: 410px) {
  .crop-ratio-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crop-output-row { grid-template-columns: 1fr; }
  #crop-display { height: 370px; }
}

/* Shared finished-image tools */
.finished-image-hero { background: radial-gradient(circle at 91% 3%,#dcf8ff,transparent 30%),radial-gradient(circle at 5% 82%,#ffe1e8,transparent 31%),linear-gradient(145deg,#fcfdff,#f8f4ff); }
.finished-shell { max-width: 1240px; margin: 28px auto 72px; padding: 0 24px; display: grid; gap: 18px; }
.finished-panel { min-width: 0; padding: 27px; border: 1px solid #dfe3ef; border-radius: 25px; background: #fff; box-shadow: 0 18px 50px rgba(25,34,84,.065); }
.finished-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.finished-heading > div > span { color: #6a4bc0; font-size: 8px; font-weight: 950; letter-spacing: .12em; }
.finished-heading h2 { margin: 7px 0 6px; font-size: 23px; letter-spacing: -.035em; }
.finished-heading p { max-width: 660px; margin: 0; color: #747e99; font-size: 10px; line-height: 1.55; }
.finished-reset { min-height: 39px; padding: 0 13px; border: 1px solid #efcbd3; border-radius: 10px; color: #b33b52; background: #fff8f9; cursor: pointer; font-size: 9px; font-weight: 900; }
.finished-drop { min-height: 320px; }
.finished-drop .upload-icon { width: 68px; height: 68px; font-size: 11px; letter-spacing: .05em; }
.finished-drop h3 { margin-top: 20px; font-size: 23px; letter-spacing: -.035em; }
.finished-settings { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.finished-setting { min-width: 0; padding: 17px; border: 1px solid #e0e3ed; border-radius: 15px; background: #fafbfe; }
.finished-setting > span { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #303a5c; font-size: 10px; font-weight: 900; }
.finished-setting > span small { color: #7d86a0; font-size: 8px; }
.finished-setting select,.finished-setting input[type="number"] { width: 100%; min-height: 46px; padding: 0 11px; border: 1px solid #d7dbe8; border-radius: 10px; outline: 0; color: #202a52; background: #fff; font-size: 10px; font-weight: 800; }
.finished-setting input[type="range"] { width: 100%; accent-color: #6345c1; }
.finished-setting input[type="color"] { width: 100%; height: 46px; padding: 4px; border: 1px solid #d7dbe8; border-radius: 10px; background: #fff; cursor: pointer; }
.finished-setting em { margin-top: 8px; display: block; color: #7d86a0; font-size: 8px; font-style: normal; line-height: 1.45; }
.finished-action-row { margin-top: 16px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.finished-action-row .process-button { width: min(100%,520px); margin: 0; }
.finished-note { margin-top: 14px; padding: 13px 14px; display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 11px; border: 1px solid #d8e5f3; border-radius: 14px; background: #f4f8fc; }
.finished-note > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #3679ba; font-size: 13px; font-weight: 950; }
.finished-note b { display: block; color: #34425e; font-size: 10px; }
.finished-note p { margin: 5px 0 0; color: #64738d; font-size: 8px; line-height: 1.55; }

/* Image format converter */
.format-file-list { margin-top: 16px; display: grid; gap: 9px; }
.format-file-card { min-width: 0; padding: 10px; display: grid; grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; gap: 12px; border: 1px solid #dfe3ee; border-radius: 14px; background: #fff; }
.format-file-card img { width: 58px; height: 58px; object-fit: cover; border: 1px solid #e1e4ed; border-radius: 10px; background: #f0f2f6; }
.format-file-copy { min-width: 0; }
.format-file-copy b,.format-file-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.format-file-copy b { font-size: 10px; }
.format-file-copy span { margin-top: 5px; color: #747e99; font-size: 8px; }
.format-remove { min-height: 36px; padding: 0 11px; border: 1px solid #e7d8dc; border-radius: 9px; color: #a83c50; background: #fffafb; cursor: pointer; font-size: 8px; font-weight: 900; }
.format-results { border-color: #cce9dd; background: linear-gradient(145deg,#fff 65%,#f0fbf6); }
.format-result-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.format-result-card { min-width: 0; padding: 12px; display: grid; grid-template-columns: 82px minmax(0,1fr) auto; align-items: center; gap: 12px; border: 1px solid #dbe6e1; border-radius: 16px; background: #fff; }
.format-result-card img { width: 82px; height: 72px; object-fit: contain; border: 1px solid #e0e3eb; border-radius: 10px; background: repeating-conic-gradient(#edf0f4 0 25%,#fff 0 50%) 0/16px 16px; }
.format-result-card div { min-width: 0; }
.format-result-card b,.format-result-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.format-result-card b { font-size: 10px; }
.format-result-card span { margin-top: 5px; color: #16805f; font-size: 8px; }
.format-result-card a { min-height: 40px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 10px; color: #fff; background: #148765; font-size: 8px; font-weight: 900; }

/* Background remover */
.background-workspace { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.7fr); align-items: start; gap: 18px; }
.background-previews { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.background-preview-card { min-width: 0; border: 1px solid #dfe3ed; border-radius: 17px; overflow: hidden; background: #fafbfe; }
.background-preview-head { padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #e4e7ef; }
.background-preview-head b { font-size: 10px; }
.background-preview-head span { color: #7d86a0; font-size: 8px; }
.background-canvas-wrap { position: relative; min-height: 430px; display: grid; place-items: center; overflow: hidden; background: #f1f3f8; }
.background-canvas-wrap.checker { background: repeating-conic-gradient(#e7eaef 0 25%,#fff 0 50%) 0/22px 22px; }
.background-canvas-wrap canvas { display: block; max-width: 100%; max-height: 540px; cursor: crosshair; }
.background-settings { padding: 18px; display: grid; gap: 11px; border: 1px solid #dfe3ef; border-radius: 18px; background: #fff; }
.background-settings h3 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.background-settings > p { margin: -4px 0 3px; color: #747e99; font-size: 9px; line-height: 1.5; }
.background-sample-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.background-sample-row input { min-width: 0; height: 44px; padding: 4px; border: 1px solid #d7dbe8; border-radius: 10px; background: #fff; }
.background-sample-row button,.preview-bg-buttons button { min-height: 44px; padding: 0 12px; border: 1px solid #d8ddeb; border-radius: 10px; color: #5940b2; background: #fff; cursor: pointer; font-size: 8px; font-weight: 900; }
.background-sample-row button.active { color: #fff; border-color: #6345c1; background: #6345c1; }
.preview-bg-buttons { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.preview-bg-buttons button { min-height: 38px; padding: 0 7px; }
.preview-bg-buttons button.active { color: #fff; border-color: #1b2b59; background: #1b2b59; }
.background-result-bar { margin-top: 14px; padding: 13px; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; border: 1px solid #d8e8e0; border-radius: 14px; background: #f4fbf7; }
.background-result-bar div { min-width: 0; }
.background-result-bar span,.background-result-bar b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.background-result-bar span { color: #758099; font-size: 7px; }
.background-result-bar b { margin-top: 5px; font-size: 9px; }

/* Rotate and flip */
.transform-workspace { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(300px,.72fr); align-items: start; gap: 18px; }
.transform-preview { min-height: 520px; padding: 18px; display: grid; place-items: center; overflow: hidden; border: 1px solid #272e4c; border-radius: 18px; background: #151b34; }
.transform-preview canvas { max-width: 100%; max-height: 590px; border-radius: 6px; box-shadow: 0 15px 35px rgba(0,0,0,.24); }
.transform-controls { padding: 18px; display: grid; gap: 11px; border: 1px solid #dfe3ef; border-radius: 18px; background: #fff; }
.transform-controls h3 { margin: 0 0 2px; font-size: 17px; letter-spacing: -.025em; }
.transform-button-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.transform-button-grid button { min-height: 49px; padding: 0 10px; border: 1px solid #d9ddea; border-radius: 11px; color: #4f5a79; background: #fff; cursor: pointer; font-size: 9px; font-weight: 900; }
.transform-button-grid button:hover,.transform-button-grid button:focus-visible { border-color: #6d50c6; outline: 0; color: #5b3fb3; background: #f7f4ff; }
.transform-state { padding: 12px; display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; border-radius: 12px; background: #f5f7fb; }
.transform-state div { text-align: center; }
.transform-state span,.transform-state b { display: block; }
.transform-state span { color: #7a849e; font-size: 7px; }
.transform-state b { margin-top: 5px; color: #303a5c; font-size: 9px; }

@media (max-width: 980px) {
  .finished-settings { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .format-result-grid { grid-template-columns: 1fr; }
  .background-workspace,.transform-workspace { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .finished-shell { margin-top: 20px; padding: 0 12px; }
  .finished-panel { padding: 16px; border-radius: 21px; }
  .finished-heading { flex-direction: column; }
  .finished-reset { width: 100%; }
  .finished-settings { grid-template-columns: 1fr; }
  .finished-action-row .process-button { width: 100%; }
  .format-file-card { grid-template-columns: 50px minmax(0,1fr); }
  .format-file-card img { width: 50px; height: 50px; }
  .format-remove { grid-column: 1 / -1; justify-self: end; }
  .format-result-card { grid-template-columns: 68px minmax(0,1fr); }
  .format-result-card img { width: 68px; height: 64px; }
  .format-result-card a { grid-column: 1 / -1; justify-content: center; }
  .background-previews { grid-template-columns: 1fr; }
  .background-canvas-wrap { min-height: 310px; }
  .transform-preview { min-height: 360px; }
}
@media (max-width: 430px) {
  .background-result-bar { grid-template-columns: 1fr; }
  .transform-button-grid { grid-template-columns: 1fr; }
}
