.rotate-page [hidden] { display: none !important; }
.rotate-page, .rotate-page button, .rotate-page input, .rotate-page select { letter-spacing: 0; }
.rotate-image-heading { margin-bottom: 1.6rem; }
.rotate-image-heading h1 { margin: 0 0 .7rem; color: #14233a; font-size: 2.25rem; line-height: 1.25; }
.rotate-image-heading > p:not(.rotate-image-eyebrow) { max-width: 790px; margin: 0; color: #52657d; font-size: .98rem; line-height: 1.75; }
.rotate-image-eyebrow { margin: 0 0 .5rem; color: #087f72; font-size: .8rem; font-weight: 900; }
.rotate-local-badge { display: inline-flex; margin-top: .8rem; border: 1px solid #acd5ca; border-radius: 6px; padding: .38rem .62rem; background: #eef8f5; color: #176b5c; font-size: .78rem; font-weight: 800; }
.rotate-image-tool { overflow: visible; padding: 1.3rem; border: 1px solid #d7e1ee; border-radius: 8px; background: #fff; box-shadow: none; }
.rotate-image-tool-header { margin-bottom: 0; }
.rotate-image-tool-header h2 { font-size: 1.25rem; }
.rotate-image-upload-button { flex: 0 0 auto; }
.rotate-image-dropzone { display: flex; min-height: 155px; margin-top: 1rem; align-items: center; justify-content: center; gap: 1rem; border-width: 1px; text-align: left; }
.rotate-file-mark { display: grid; width: 62px; height: 62px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: #dff2ed; color: #087f72; font-size: .84rem; font-weight: 900; }
.rotate-batch-intro { margin-top: .75rem; color: #6d8096; font-size: .82rem; }
.rotate-batch { margin-top: 1rem; }
.rotate-batch-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: .55rem; }
.rotate-batch-head strong { color: #213953; }
.rotate-batch-head button { min-height: 38px; border: 0; background: transparent; color: #934742; font-size: .8rem; font-weight: 800; cursor: pointer; }
.rotate-file-list { display: grid; gap: .45rem; max-height: 420px; overflow: auto; padding-right: .2rem; }
.rotate-file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .7rem; align-items: center; border: 1px solid #d9e3ee; border-radius: 7px; padding: .72rem .8rem; background: #fff; }
.rotate-file-row.is-selected { border-color: #7ebfaf; box-shadow: inset 3px 0 #087f72; }
.rotate-file-row[data-status="complete"] { border-color: #acd5ca; background: #f4fbf8; }
.rotate-file-row[data-status="failed"] { border-color: #e2b5b1; background: #fff7f6; }
.rotate-file-copy { min-width: 0; }
.rotate-file-copy strong, .rotate-file-copy span, .rotate-file-copy small { display: block; overflow-wrap: anywhere; }
.rotate-file-copy strong { overflow: hidden; color: #1f354f; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.rotate-file-copy span { margin-top: .22rem; color: #71839a; font-size: .75rem; }
.rotate-file-copy small { margin-top: .2rem; color: #28796c; font-size: .73rem; line-height: 1.45; }
.rotate-file-row[data-status="failed"] small { color: #a0443f; }
.rotate-file-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; justify-content: flex-end; }
.rotate-file-actions button { min-height: 36px; margin: 0; border: 1px solid #cbd9e6; border-radius: 6px; padding: .38rem .55rem; background: #fff; color: #29415b; font-size: .72rem; font-weight: 800; cursor: pointer; }
.rotate-file-actions button:disabled { opacity: .58; cursor: default; }
.rotate-file-state { min-width: 42px; color: #526981; font-size: .71rem; font-weight: 900; text-align: center; }
.rotate-file-row[data-status="complete"] .rotate-file-state { color: #087f72; }
.rotate-file-row[data-status="failed"] .rotate-file-state { color: #a0443f; }
.rotate-image-meta { grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(92px, 1fr)); }
.rotate-image-stage { position: relative; min-height: 390px; max-height: 650px; background-color: #f7f9fb; background-image: linear-gradient(45deg, #e7edf2 25%, transparent 25%), linear-gradient(-45deg, #e7edf2 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e7edf2 75%), linear-gradient(-45deg, transparent 75%, #e7edf2 75%); background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-size: 16px 16px; }
.rotate-image-stage[data-empty="true"] { background-image: none; }
.rotate-image-stage canvas { max-height: 590px; object-fit: contain; background: transparent; }
#rotateForm { margin-top: 1rem; }
.rotate-transform, .rotate-output { margin: 0; border: 0; padding: 0; }
.rotate-transform legend, .rotate-output legend { width: 100%; margin-bottom: .65rem; border-bottom: 1px solid #dce5ee; padding: 0 0 .5rem; color: #263c55; font-size: .92rem; font-weight: 900; }
.rotate-transform-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.rotate-transform-grid button { min-height: 48px; margin: 0; border: 1px solid #cbd9e6; border-radius: 7px; padding: .55rem .45rem; background: #fff; color: #29415b; font-size: .81rem; font-weight: 900; cursor: pointer; }
.rotate-transform-grid button:hover:not(:disabled) { border-color: #7ebfaf; background: #f1faf7; }
.rotate-transform-grid button.is-active, .rotate-transform-grid button[aria-pressed="true"] { border-color: #087f72; background: #e4f4ef; color: #08665d; }
.rotate-transform-grid button:disabled, .rotate-image-actions button:disabled { opacity: .5; cursor: default; }
#rotateTransformNote, .rotate-advanced > p, #rotateFormatNote { margin: .55rem 0 0; color: #6a7c91; font-size: .76rem; line-height: 1.55; }
.rotate-advanced { margin-top: 1rem; border: 1px solid #d8e3ed; border-radius: 7px; background: #f8fafc; }
.rotate-advanced summary { padding: .85rem 1rem; color: #29415b; font-size: .84rem; font-weight: 900; cursor: pointer; }
.rotate-advanced[open] summary { border-bottom: 1px solid #dce5ee; }
.rotate-angle-controls { display: grid; gap: .75rem; padding: 1rem 1rem 0; }
.rotate-angle-controls > label:first-child { display: grid; gap: .4rem; max-width: 300px; color: #334b65; font-size: .78rem; font-weight: 800; }
.rotate-input-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1px solid #cbd9e6; border-radius: 7px; background: #fff; color: #65798f; }
.rotate-input-unit input { width: 100%; min-height: 46px; margin: 0; border: 0; padding: .55rem .7rem; background: transparent; color: #142d48; font-weight: 800; }
.rotate-input-unit input:focus { box-shadow: none; }
.rotate-input-unit { padding-right: .7rem; }
.rotate-angle-slider { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .65rem; align-items: center; color: #687b91; font-size: .72rem; }
.rotate-angle-slider input, .rotate-quality-control input { width: 100%; margin: 0; accent-color: #087f72; }
.rotate-angle-quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.rotate-angle-quick button { min-width: 54px; min-height: 38px; margin: 0; border: 1px solid #cbd9e6; border-radius: 6px; padding: .35rem .52rem; background: #fff; color: #334b65; font-size: .74rem; font-weight: 800; cursor: pointer; }
.rotate-angle-quick button.is-active { border-color: #087f72; background: #e8f6f2; color: #087066; }
.rotate-advanced > p { padding: 0 1rem 1rem; }
.rotate-output { margin-top: 1.15rem; }
.rotate-output-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.rotate-output-grid > label { display: grid; min-width: 0; gap: .4rem; color: #334b65; font-size: .78rem; font-weight: 800; }
.rotate-output-grid select { width: 100%; min-height: 46px; margin: 0; border: 1px solid #cbd9e6; border-radius: 7px; padding: .55rem 2rem .55rem .7rem; background-color: #fff; color: #18314d; font-size: .82rem; font-weight: 700; }
.rotate-output-grid input[type="color"] { width: 100%; min-height: 46px; margin: 0; border: 1px solid #cbd9e6; border-radius: 7px; padding: .35rem; background: #fff; }
.rotate-quality-control { display: grid; min-height: 46px; grid-template-columns: minmax(0, 1fr) auto; gap: .7rem; align-items: center; border: 1px solid #cbd9e6; border-radius: 7px; padding: 0 .7rem; background: #fff; }
.rotate-quality-control output { min-width: 38px; color: #087f72; font-size: .76rem; font-weight: 900; text-align: right; }
.rotate-warning { margin-top: .8rem; border-left: 4px solid #bd8230; padding: .75rem .85rem; background: #fff8e8; color: #775724; font-size: .78rem; line-height: 1.55; }
.rotate-image-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rotate-image-actions button { border: 1px solid #087f72; background: #fff; color: #087066; cursor: pointer; }
.rotate-image-actions button:first-child { background: #087f72; color: #fff; }
.rotate-image-actions button:nth-child(2) { background: #e8f6f2; }
.rotate-image-actions .rotate-image-secondary { border-color: #cbd9e6; background: #e8edf4; color: #314158; }
.rotate-progress { display: grid; gap: .4rem; margin-top: .8rem; }
.rotate-progress label { color: #50677e; font-size: .76rem; font-weight: 800; }
.rotate-progress progress { width: 100%; height: 9px; border: 0; border-radius: 4px; overflow: hidden; accent-color: #087f72; }
.rotate-progress progress::-webkit-progress-bar { background: #e4ebf1; }
.rotate-progress progress::-webkit-progress-value { background: #087f72; }
.rotate-image-status { border-radius: 6px; padding: .65rem .75rem; background: #f2f6f9; color: #536a80; }
.rotate-image-status[data-type="success"] { background: #edf8f4; color: #12695e; }
.rotate-image-status[data-type="warning"] { background: #fff8e8; color: #7b5a25; }
.rotate-image-status[data-type="error"] { background: #fff1f0; color: #a13f3a; }
.rotate-result { margin-top: 1rem; border-top: 1px solid #dce5ee; padding-top: 1rem; }
.rotate-result header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.rotate-result h2 { margin: 0; color: #172c45; font-size: 1.15rem; }
.rotate-result header > strong { color: #087f72; font-size: .8rem; text-align: right; }
.rotate-result-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .55rem; margin-top: .8rem; }
.rotate-result-summary > div { border: 1px solid #dbe5ee; border-radius: 7px; padding: .68rem; background: #f8fafc; }
.rotate-result-summary span, .rotate-result-summary strong { display: block; }
.rotate-result-summary span { color: #718299; font-size: .68rem; }
.rotate-result-summary strong { margin-top: .22rem; overflow-wrap: anywhere; color: #1f3854; font-size: .82rem; }
.rotate-image-guide { margin-top: 2.4rem; padding-top: 1.8rem; }
.rotate-image-guide-heading h2 { margin: 0 0 .55rem; }
.rotate-image-guide-heading > p:last-child { color: #5d7086; font-size: .9rem; line-height: 1.7; }
.rotate-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1.2rem 0 0; padding: 0; counter-reset: rotate-step; list-style: none; }
.rotate-steps li { position: relative; border-top: 2px solid #9acdc1; padding: .8rem .5rem 0 2rem; color: #35506a; font-size: .78rem; font-weight: 800; }
.rotate-steps li::before { position: absolute; top: .62rem; left: .35rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #087f72; color: #fff; content: counter(rotate-step); counter-increment: rotate-step; font-size: .68rem; line-height: 1.25rem; text-align: center; }
.rotate-image-guide > section { padding: 1.35rem 0; border-bottom: 1px solid #e0e7ee; }
.rotate-image-guide > section h2 { margin: 0 0 .55rem; color: #1d334d; font-size: 1.12rem; line-height: 1.4; }
.rotate-image-guide > section p { margin: 0; color: #5d7087; font-size: .87rem; line-height: 1.72; }
.rotate-image-guide a { color: #087f72; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.rotate-faq { border-bottom: 0 !important; }
.rotate-faq details { border-bottom: 1px solid #dce5ee; }
.rotate-faq summary { padding: .85rem .15rem; color: #253c56; font-size: .88rem; font-weight: 800; cursor: pointer; }
.rotate-faq details p { padding: 0 .15rem .85rem; }
.rotate-image-upload-button:focus-visible, .rotate-image-dropzone:focus-visible, .rotate-page button:focus-visible, .rotate-page input:focus-visible, .rotate-page select:focus-visible, .rotate-page summary:focus-visible { outline: 3px solid rgba(8,127,114,.24); outline-offset: 2px; }
@media screen and (max-width: 980px) {
  .rotate-image-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rotate-image-meta > div:first-child { grid-column: 1 / -1; }
  .rotate-result-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media screen and (max-width: 760px) {
  .rotate-image-heading h1 { font-size: 1.85rem; }
  .rotate-image-tool-header { align-items: stretch; flex-direction: column; }
  .rotate-image-upload-button { width: 100%; }
  .rotate-image-stage { min-height: 300px; max-height: 520px; }
  .rotate-image-stage canvas { max-height: 470px; }
  .rotate-image-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rotate-result-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 520px) {
  .rotate-image-heading h1 { font-size: 1.72rem; }
  .rotate-image-tool { padding: 1rem; }
  .rotate-image-dropzone { align-items: center; flex-direction: column; padding: 1rem; text-align: center; }
  .rotate-file-row { grid-template-columns: 1fr; }
  .rotate-file-actions { justify-content: flex-end; }
  .rotate-image-meta { grid-template-columns: 1fr 1fr; }
  .rotate-image-meta > div:first-child { grid-column: 1 / -1; }
  .rotate-transform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rotate-output-grid { grid-template-columns: 1fr; }
  .rotate-image-stage { min-height: 260px; padding: .7rem; }
  .rotate-image-stage canvas { max-height: 400px; }
  .rotate-result-summary, .rotate-steps { grid-template-columns: 1fr; }
  .rotate-result { overflow: hidden; }
  .rotate-steps li { min-height: 46px; }
}
@media screen and (max-width: 360px) {
  .rotate-transform-grid { grid-template-columns: 1fr; }
}
