:root {
    --paper: #f7f5f0;
    --paper-deep: #eeece5;
    --surface: #fffefa;
    --ink: #202b2b;
    --ink-muted: #687473;
    --line: #dcded8;
    --line-strong: #c7ccc5;
    --teal: #167d76;
    --teal-dark: #0f5d58;
    --teal-soft: #e4f1ee;
    --lavender: #eae6f4;
    --danger: #a33e3e;
    --shadow: 0 14px 40px rgba(42, 55, 51, .08);
    --page-max-width: 1000px;
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    background: var(--paper);
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.65;
}

button,
input,
select {
    font: inherit;
}

button,
a,
summary,
input[type="range"],
input[type="color"] {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

button {
    color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(22, 125, 118, .42);
    outline-offset: 3px;
}

.page-width {
    width: min(var(--page-max-width), calc(100% - 48px));
    margin: 0 auto;
}

.site-header {
    border-bottom: 1px solid rgba(199, 204, 197, .72);
    background: rgba(247, 245, 240, .94);
}

.header-inner,
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: .88rem;
    font-weight: 750;
    letter-spacing: .1em;
    text-decoration: none;
    text-transform: lowercase;
}

.brand-mark {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border: 1px solid var(--teal);
    border-radius: 50%;
    color: var(--teal);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 25px;
    color: var(--ink-muted);
    font-size: .83rem;
}

.site-nav a {
    white-space: nowrap;
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--teal-dark);
}

.site-nav .nav-cta {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 9px 16px;
    border: 1px solid var(--teal);
    color: var(--teal-dark);
    font-weight: 700;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--teal);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.tool-first-intro {
    padding: 52px 0 28px;
}

.tool-first-intro h1 {
    max-width: 100%;
    margin: 0;
    font-size: clamp(2.35rem, 5vw, 4.2rem);
    font-weight: 750;
    letter-spacing: -.06em;
    line-height: 1.15;
}

.tool-definition {
    max-width: 680px;
    margin: 20px 0 0;
    color: var(--ink-muted);
    font-size: .98rem;
    line-height: 1.9;
}

.hero-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 22px 0 0;
    padding: 0;
    color: var(--ink);
    font-size: .76rem;
    font-weight: 700;
    list-style: none;
}

.hero-benefits li {
    position: relative;
    padding-left: 18px;
}

.hero-benefits li::before {
    position: absolute;
    top: .12em;
    left: 0;
    color: var(--teal);
    content: "✓";
}

.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button:disabled,
.icon-button:disabled {
    cursor: not-allowed;
    opacity: .42;
    transform: none;
}

.button-primary {
    border-color: var(--teal);
    background: var(--teal);
    color: #fff;
}

.button-primary:hover:not(:disabled) {
    border-color: var(--teal-dark);
    background: var(--teal-dark);
}

.button-secondary {
    border-color: var(--teal);
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.button-secondary:hover:not(:disabled) {
    background: #d2e9e4;
}

.button-quiet {
    border-color: var(--line);
    background: transparent;
    color: var(--ink-muted);
}

.button-quiet:hover:not(:disabled) {
    border-color: var(--teal);
    color: var(--teal-dark);
}

.button-large {
    min-height: 48px;
    padding: 12px 22px;
    font-size: .92rem;
}

.button-full {
    width: 100%;
}

.tool-anchor-section {
    padding: 0 0 70px;
    background: var(--paper-deep);
}

.tool-host {
    width: min(var(--page-max-width), calc(100% - 48px));
    margin: 0 auto;
    min-height: 210px;
}

.tool-boot-panel {
    width: min(720px, calc(100% - 48px));
    margin: 0 auto;
    padding: clamp(28px, 6vw, 54px) 24px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 8px 26px rgba(42, 55, 51, .04);
    text-align: center;
}

.tool-boot-panel h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -.04em;
}

.tool-boot-copy {
    max-width: 560px;
    margin: 10px auto 22px;
    color: var(--ink-muted);
    font-size: .85rem;
}

.tool-boot-visual {
    position: relative;
    width: 112px;
    height: 0;
    margin: 0 auto;
    overflow: hidden;
    opacity: 0;
    transform: translateY(5px);
    transition: height .25s ease, margin .25s ease, opacity .2s ease, transform .25s ease;
}

.tool-boot-panel[data-tool-state="starting"] .tool-boot-visual {
    height: 84px;
    margin-bottom: 20px;
    overflow: visible;
    opacity: 1;
    transform: translateY(0);
}

.tool-boot-image {
    position: absolute;
    top: 7px;
    left: 11px;
    width: 88px;
    height: 66px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    background-color: #f8f8f4;
    background-image: linear-gradient(45deg, #dfe4df 25%, transparent 25%), linear-gradient(-45deg, #dfe4df 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #dfe4df 75%), linear-gradient(-45deg, transparent 75%, #dfe4df 75%);
    background-position: 0 0, 0 6px, 6px -6px, -6px 0;
    background-size: 12px 12px;
    box-shadow: 0 7px 18px rgba(42, 55, 51, .12);
    transform: rotate(-2deg);
}

.tool-boot-subject {
    position: absolute;
    z-index: 1;
    top: 22px;
    left: 30px;
    width: 30px;
    height: 34px;
    border-radius: 45% 45% 12% 12%;
    background: var(--teal);
}

.tool-boot-subject::before {
    position: absolute;
    top: -14px;
    left: 8px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #d38d72;
    content: "";
}

.tool-boot-cover {
    position: absolute;
    z-index: 2;
    inset: 0;
    background: linear-gradient(145deg, #cfd7ce 0 49%, #b8c8bf 49% 100%);
    animation: tool-boot-reveal 2.2s ease-in-out infinite;
}

.tool-boot-scan {
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: #ffffff;
    box-shadow: 0 0 8px 2px rgba(20, 134, 126, .7);
    animation: tool-boot-scan 2.2s ease-in-out infinite;
}

.tool-boot-spark {
    position: absolute;
    top: 0;
    right: 0;
    color: var(--teal);
    font-size: 1.2rem;
    animation: tool-boot-spark 1.1s ease-in-out infinite alternate;
}

@keyframes tool-boot-reveal {
    0%, 12% { clip-path: inset(0 0 0 0); }
    72%, 88% { clip-path: inset(0 0 0 100%); }
    100% { clip-path: inset(0 0 0 0); }
}

@keyframes tool-boot-scan {
    0%, 12% { transform: translateX(0); }
    72%, 88% { transform: translateX(86px); }
    100% { transform: translateX(0); }
}

@keyframes tool-boot-spark {
    from { opacity: .35; transform: scale(.8) rotate(-8deg); }
    to { opacity: 1; transform: scale(1.15) rotate(8deg); }
}

.tool-boot-status {
    min-height: 1.5em;
    margin: 14px 0 0;
    color: var(--ink-muted);
    font-size: .78rem;
}

.tool-boot-trust {
    margin: 16px 0 0;
    color: var(--ink-muted);
    font-size: .76rem;
}

.tool-boot-panel[data-tool-state="starting"] .tool-boot-status {
    color: var(--teal-dark);
}

.tool-boot-panel[data-tool-state="failed"] .tool-boot-status {
    color: var(--danger);
}

.tool-boot-noscript {
    margin: 16px auto 0;
    color: var(--ink-muted);
    font-size: .75rem;
}

.loading-progress {
    display: block;
    width: 64px;
    height: 64px;
    margin: 68px auto 10px;
}

.loading-progress circle {
    fill: none;
    stroke: var(--line-strong);
    stroke-width: 7px;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.loading-progress circle:last-child {
    stroke: var(--teal);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .8), 500%;
}

.loading-progress-text {
    margin-top: -65px;
    color: var(--ink-muted);
    font-size: .75rem;
    text-align: center;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "読み込み中");
}

.tool-section {
    width: 100%;
}

.tool-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.tool-heading h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -.04em;
}

.tool-intro {
    max-width: 620px;
    margin: 8px 0 0;
    color: var(--ink-muted);
    font-size: .85rem;
}

.privacy-badge {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid #b4d5cd;
    border-radius: 99px;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-size: .72rem;
    font-weight: 700;
}

.privacy-badge span {
    margin-right: 4px;
    font-size: .62rem;
}

.upload-panel {
    padding: 30px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 8px 26px rgba(42, 55, 51, .04);
}

.upload-dropzone {
    display: flex;
    min-height: 300px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 1px dashed #9eb8b0;
    background: #fcfcf8;
    text-align: center;
    transition: border-color .18s ease, background-color .18s ease;
}

.upload-dropzone.is-dragging,
.upload-dropzone:hover {
    border-color: var(--teal);
    background: #f2faf7;
}

.upload-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    place-items: center;
    border: 1px solid #a9cfc7;
    border-radius: 50%;
    color: var(--teal);
    font-size: 1.55rem;
    line-height: 1;
}

.upload-dropzone h3 {
    margin: 0;
    font-size: 1.15rem;
}

.upload-dropzone > p:not(.upload-hint) {
    margin: 4px 0 10px;
    color: var(--ink-muted);
    font-size: .8rem;
}

.upload-hint {
    margin: 11px 0 0;
    color: var(--ink-muted);
    font-size: .72rem;
}

.upload-hint + .upload-hint {
    margin-top: 3px;
    color: #82918f;
}

.upload-notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
    padding-top: 21px;
    border-top: 1px solid var(--line);
}

.note-item {
    display: flex;
    gap: 10px;
    color: var(--ink-muted);
    font-size: .72rem;
}

.note-item strong {
    color: var(--ink);
    font-size: .76rem;
}

.note-icon {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--lavender);
    color: var(--teal-dark);
    font-size: .85rem;
}

.workspace[hidden],
.upload-panel[hidden] {
    display: none;
}

.editor-toolbar {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.toolbar-group,
.toolbar-status {
    display: flex;
    align-items: center;
    gap: 7px;
}

.toolbar-status {
    min-width: 0;
    color: var(--ink-muted);
    font-size: .76rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #a2b0ad;
}

.status-dot.is-working {
    background: #d39b3b;
    box-shadow: 0 0 0 4px rgba(211, 155, 59, .14);
}

.status-dot.is-success {
    background: var(--teal);
}

.status-dot.is-error {
    background: var(--danger);
}

.status-detail {
    overflow: hidden;
    max-width: 300px;
    color: #87928f;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    margin: 0 5px;
    background: var(--line);
}

.icon-button {
    display: inline-grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
}

.icon-button:hover:not(:disabled) {
    border-color: var(--teal);
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.editor-alert {
    margin-top: 10px;
    padding: 10px 13px;
    border: 1px solid #e2b7b7;
    background: #fff4f2;
    color: var(--danger);
    font-size: .8rem;
}

.editor-progress {
    margin-top: 10px;
    padding: 10px 13px;
    border: 1px solid #c9ddd7;
    background: #f5fbf9;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: var(--teal-dark);
    font-size: .75rem;
}

.editor-progress progress {
    display: block;
    width: 100%;
    height: 7px;
    appearance: none;
}

.editor-progress progress::-webkit-progress-bar {
    border-radius: 8px;
    background: #dce9e4;
}

.editor-progress progress::-webkit-progress-value {
    border-radius: 8px;
    background: var(--teal);
}

.editor-progress progress::-moz-progress-bar {
    border-radius: 8px;
    background: var(--teal);
}

.editor-layout {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 240px;
    gap: 10px;
    min-height: 650px;
    margin-top: 12px;
}

.editor-sidebar {
    border: 1px solid var(--line);
    background: var(--surface);
}

.editor-sidebar-left {
    padding: 12px 10px;
}

.batch-panel {
    min-width: 0;
    padding: 0 0 15px;
    border-bottom: 1px solid var(--line);
}

.batch-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 9px;
}

.batch-list {
    display: grid;
    max-height: 270px;
    gap: 5px;
    margin-top: 9px;
    overflow: auto;
    overscroll-behavior: contain;
}

.batch-item {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
    padding: 3px;
    border: 1px solid transparent;
}

.batch-item.is-active {
    border-color: #b8d6cf;
    background: var(--teal-soft);
}

.batch-item.needs-fix {
    border-left: 3px solid #c98952;
}

.batch-item-select {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    padding: 3px;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}

.batch-thumbnail {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    background-color: #fff;
    background-image: linear-gradient(45deg, #e1e4df 25%, transparent 25%), linear-gradient(-45deg, #e1e4df 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e1e4df 75%), linear-gradient(-45deg, transparent 75%, #e1e4df 75%);
    background-position: 0 0, 0 5px, 5px -5px, -5px 0;
    background-size: 10px 10px;
    color: var(--ink-muted);
    font-size: .7rem;
}

.batch-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.batch-item-info {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.batch-item-info strong,
.batch-item-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-item-info strong {
    font-size: .68rem;
    font-weight: 700;
}

.batch-item-info small {
    color: var(--ink-muted);
    font-size: .61rem;
}

.batch-item-retry {
    align-self: center;
    min-height: 30px;
    padding: 3px 5px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--teal-dark);
    cursor: pointer;
    font-size: .61rem;
}

.batch-item-error {
    grid-column: 1 / -1;
    margin: 2px 3px 0;
    color: var(--danger);
    font-size: .6rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.batch-item-review {
    grid-column: 1 / -1;
    margin: 2px 3px 0;
    color: #986629;
    font-size: .6rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.batch-size-fields[hidden] {
    display: none;
}

.sidebar-section {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.sidebar-section + .sidebar-section {
    padding-top: 12px;
}

.sidebar-label,
.sidebar-label-row .sidebar-label {
    margin: 0;
    color: var(--ink-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.sidebar-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-label-row > span,
.zoom-section #zoom-value {
    color: var(--teal-dark);
    font-size: .7rem;
    font-weight: 700;
}

.segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 10px;
    padding: 3px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.preview-background-control {
    margin-top: 16px;
}

.preview-background-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    margin-top: 8px;
}

.preview-background-choice {
    min-width: 0;
    min-height: 30px;
    padding: 3px 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-muted);
    cursor: pointer;
    font-size: .58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-background-choice:hover,
.preview-background-choice.is-active {
    border-color: var(--teal);
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-weight: 700;
}

.segment-button {
    min-height: 31px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: .7rem;
}

.segment-button.is-active {
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(42, 55, 51, .1);
    color: var(--teal-dark);
    font-weight: 700;
}

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

.tool-button {
    display: flex;
    min-height: 34px;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: .76rem;
    text-align: left;
}

.tool-button:hover,
.tool-button.is-active {
    border-color: #b8d6cf;
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.editor-shell.crop-active .tool-button[data-tool="crop"] {
    border-color: #b8d6cf;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-weight: 700;
}

.editor-shell.lasso-active .tool-button[data-tool="lasso-subject"],
.editor-shell.lasso-active .tool-button[data-tool="lasso-background"],
.editor-shell.component-active .tool-button[data-tool="component"] {
    border-color: #b8d6cf;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-weight: 700;
}

.tool-button.is-active {
    font-weight: 700;
}

.tool-glyph {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: var(--teal);
    font-size: 1rem;
}

.control-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: var(--ink-muted);
    font-size: .72rem;
}

.control-label output {
    color: var(--teal-dark);
    font-weight: 700;
}

input[type="range"] {
    display: block;
    width: 100%;
    accent-color: var(--teal);
    cursor: pointer;
}

.brush-section input[type="range"] {
    margin-top: 10px;
}

.brush-hardness-label {
    margin-top: 15px;
}

.control-help,
.shortcut-hint {
    margin: 6px 0 0;
    color: #8a9592;
    font-size: .65rem;
}

kbd {
    padding: 1px 4px;
    border: 1px solid var(--line-strong);
    background: var(--paper);
    font-family: inherit;
    font-size: .63rem;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 9px;
}

.zoom-controls .icon-button {
    width: 32px;
    height: 32px;
}

.zoom-fit {
    min-height: 32px;
    flex: 1;
    padding: 4px;
    font-size: .68rem;
}

.canvas-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.canvas-viewport {
    position: relative;
    min-height: 0;
    flex: 1;
    overflow: auto;
    border: 1px solid var(--line);
    background: #e6e7e2;
}

.canvas-stage {
    position: relative;
    display: grid;
    min-width: 100%;
    min-height: 100%;
    padding: 26px;
    place-items: center;
}

.crop-overlay {
    position: absolute;
    z-index: 4;
    inset: 0;
    pointer-events: none;
}

.editor-shell.crop-active .canvas-stage {
    cursor: crosshair;
}

.crop-selection {
    position: absolute;
    display: none;
    min-width: 2px;
    min-height: 2px;
    border: 2px solid var(--teal);
    background: rgba(255, 255, 255, .04);
    box-shadow: 0 0 0 9999px rgba(24, 36, 34, .38);
}

.crop-selection.has-selection {
    display: block;
}

.crop-selection.is-circle {
    border-radius: 50%;
}

.crop-selection span {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 2px 5px;
    background: rgba(32, 43, 43, .8);
    color: #fff;
    font-size: .62rem;
    line-height: 1.3;
    white-space: nowrap;
}

.lasso-overlay {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.lasso-overlay[hidden] {
    display: none;
}

.lasso-overlay polyline {
    fill: rgba(22, 125, 118, .12);
    stroke: #0f5d58;
    stroke-width: 2;
    stroke-dasharray: 6 4;
    vector-effect: non-scaling-stroke;
}

#editor-canvas {
    display: block;
    width: 0;
    height: 0;
    background: transparent;
    box-shadow: 0 7px 22px rgba(42, 55, 51, .14);
    cursor: crosshair;
    image-rendering: auto;
    touch-action: none;
}

#editor-canvas[data-tool="move"] {
    cursor: grab;
}

#editor-canvas[data-tool="move"]:active {
    cursor: grabbing;
}

#editor-canvas[data-tool="subject"] {
    cursor: grab;
}

#editor-canvas[data-tool="subject"]:active {
    cursor: grabbing;
}

#editor-canvas[data-tool="lasso-subject"],
#editor-canvas[data-tool="lasso-background"],
#editor-canvas[data-tool="component"] {
    cursor: crosshair;
}

.brush-cursor {
    position: absolute;
    display: none;
    border: 1.5px solid var(--teal-dark);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.brush-cursor.is-visible {
    display: block;
}

#touch-magnifier {
    position: absolute;
    z-index: 6;
    display: none;
    width: 144px;
    height: 144px;
    border: 2px solid var(--teal-dark);
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 8px 24px rgba(24, 36, 34, .28);
    pointer-events: none;
}

#touch-magnifier.is-visible {
    display: block;
}

.canvas-empty-state {
    color: var(--ink-muted);
    font-size: .85rem;
}

.canvas-caption {
    display: flex;
    min-height: 28px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 2px;
    color: var(--ink-muted);
    font-size: .68rem;
}

.canvas-caption-tip {
    color: #8b9793;
    text-align: right;
}

.editor-sidebar-right {
    min-width: 0;
    overflow: auto;
}

.settings-group {
    border-bottom: 1px solid var(--line);
}

.settings-group summary {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    list-style: none;
    font-size: .8rem;
    font-weight: 750;
}

.settings-group summary::-webkit-details-marker {
    display: none;
}

.settings-group summary::after {
    color: var(--teal);
    content: "+";
    font-size: 1.1rem;
    font-weight: 400;
}

.settings-group[open] summary::after {
    content: "−";
}

.settings-content {
    padding: 0 12px 12px;
}

.control-label select {
    min-width: 112px;
    height: 32px;
    padding: 4px 7px;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    background: var(--surface);
    color: var(--ink);
    font-size: .72rem;
}

.crop-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 12px;
}

.crop-action-row .button {
    min-height: 36px;
    padding-right: 6px;
    padding-left: 6px;
    font-size: .7rem;
}

.subject-transform-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 12px;
}

.subject-transform-actions .button {
    min-height: 38px;
    padding: 5px 6px;
    font-size: .68rem;
    line-height: 1.35;
}

.crop-help {
    margin-top: 10px;
    margin-bottom: 0;
}

.edge-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.edge-action-grid .button {
    min-height: 42px;
    padding: 5px 6px;
    font-size: .68rem;
    line-height: 1.35;
}

.settings-description {
    margin: 0 0 8px;
    color: var(--ink-muted);
    font-size: .69rem;
    line-height: 1.55;
}

.inline-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.radio-label,
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ink-muted);
    font-size: .69rem;
}

.radio-label input,
.checkbox-label input {
    accent-color: var(--teal);
}

.settings-content > input[type="range"] {
    margin: 8px 0 14px;
}

.background-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-bottom: 11px;
}

.background-choice {
    display: flex;
    min-height: 54px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 2px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: .62rem;
}

.background-choice:hover,
.background-choice.is-active {
    border-color: var(--teal);
    color: var(--teal-dark);
}

.solid-swatch,
.checker-swatch {
    display: block;
    width: 22px;
    height: 22px;
    border: 1px solid var(--line-strong);
}

.swatch-white { background: #fff; }
.swatch-black { background: #202b2b; }
.swatch-custom { background: #f4f1eb; }

.checker-swatch {
    background-color: #fff;
    background-image: linear-gradient(45deg, #dce1dc 25%, transparent 25%), linear-gradient(-45deg, #dce1dc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #dce1dc 75%), linear-gradient(-45deg, transparent 75%, #dce1dc 75%);
    background-position: 0 0, 0 5px, 5px -5px, -5px 0;
    background-size: 10px 10px;
}

.color-field,
.resize-fields label,
.export-fields label {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--ink-muted);
    font-size: .69rem;
}

.color-field input[type="color"] {
    width: 35px;
    height: 26px;
    padding: 2px;
    border: 1px solid var(--line);
    background: transparent;
    cursor: pointer;
}

.unit-input {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.unit-input input,
.resize-fields input,
.export-fields select {
    min-width: 0;
    height: 32px;
    padding: 4px 7px;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    background: var(--surface);
    color: var(--ink);
    font-size: .72rem;
}

.unit-input input {
    width: 59px;
    text-align: right;
}

.resize-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
    align-items: end;
    gap: 4px;
    color: var(--ink-muted);
}

.resize-fields label {
    display: grid;
    align-items: start;
    gap: 4px;
}

.resize-fields > span {
    padding-bottom: 8px;
    text-align: center;
}

.resize-fields input {
    width: 100%;
}

.checkbox-label {
    margin: 10px 0 13px;
}

.export-fields {
    display: grid;
    gap: 7px;
}

.export-fields label {
    align-items: center;
}

.export-fields select {
    width: 142px;
}

.export-fields input[type="range"] {
    width: 108px;
}

.export-fields output {
    margin-left: auto;
    color: var(--teal-dark);
    font-weight: 700;
}

.export-note {
    margin-top: 9px;
    margin-bottom: 12px;
}

.info-section {
    padding: 90px 0;
}

body.editor-active .tool-first-intro,
body.editor-active main > section:not(.tool-anchor-section),
body.editor-active .site-footer {
    display: none;
}

@media (min-width: 901px) {
    html.editor-active,
    body.editor-active {
        overflow: hidden;
    }

    body.editor-active .header-inner {
        min-height: 60px;
    }

    body.editor-active .tool-anchor-section {
        height: calc(100dvh - 61px);
        min-height: 0;
        padding: 10px 0 14px;
        overflow: hidden;
    }

    body.editor-active .tool-host {
        width: min(1180px, calc(100% - 32px));
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    body.editor-active .tool-section {
        display: flex;
        height: 100%;
        min-height: 0;
        flex-direction: column;
        overflow: hidden;
    }

    body.editor-active .tool-heading {
        min-height: 34px;
        align-items: center;
        margin-bottom: 7px;
    }

    body.editor-active .tool-heading .eyebrow,
    body.editor-active .tool-heading .tool-intro {
        display: none;
    }

    body.editor-active .tool-heading h2 {
        font-size: 1.3rem;
    }

    body.editor-active .workspace {
        display: flex;
        min-height: 0;
        flex: 1;
        flex-direction: column;
        overflow: hidden;
    }

    body.editor-active .editor-toolbar,
    body.editor-active .editor-alert,
    body.editor-active .editor-progress {
        flex: 0 0 auto;
    }

    body.editor-active .editor-layout {
        display: grid;
        height: 100%;
        min-height: 0;
        flex: 1;
        grid-template-columns: 220px minmax(0, 1fr) 240px;
        grid-template-rows: minmax(0, 1fr);
        margin-top: 8px;
        overflow: hidden;
    }

    body.editor-active .editor-sidebar,
    body.editor-active .canvas-column,
    body.editor-active .canvas-viewport {
        min-height: 0;
    }

    body.editor-active .editor-sidebar {
        overflow: hidden;
    }

    body.editor-active .canvas-column {
        min-width: 0;
        overflow: hidden;
    }

    body.editor-active .editor-sidebar-left,
    body.editor-active .editor-sidebar-right {
        overflow: auto;
        overscroll-behavior: contain;
    }

    body.editor-active .editor-sidebar-left {
        padding: 8px;
    }

    body.editor-active .sidebar-section {
        padding-bottom: 8px;
    }

    body.editor-active .sidebar-section + .sidebar-section {
        padding-top: 8px;
    }

    body.editor-active .segmented-control {
        margin-top: 6px;
    }

    body.editor-active .preview-background-control {
        margin-top: 9px;
    }

    body.editor-active .preview-background-grid {
        margin-top: 5px;
    }

    body.editor-active .tool-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3px;
        margin-top: 5px;
    }

    body.editor-active .tool-button {
        min-width: 0;
        min-height: 32px;
        gap: 3px;
        padding: 4px;
        font-size: .66rem;
        white-space: nowrap;
    }

    body.editor-active .tool-glyph {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        font-size: .88rem;
    }

    body.editor-active .lasso-note {
        display: none;
    }

    body.editor-active .brush-section input[type="range"] {
        margin-top: 6px;
    }

    body.editor-active .brush-hardness-label {
        margin-top: 8px;
    }

    body.editor-active .zoom-controls {
        margin-top: 6px;
    }

    body.editor-active .shortcut-hint {
        margin-top: 4px;
        line-height: 1.45;
    }

    body.editor-active .settings-group summary {
        min-height: 34px;
        padding: 5px 10px;
        font-size: .74rem;
        line-height: 1.2;
    }

    body.editor-active .settings-content {
        padding: 0 10px 10px;
    }

    body.editor-active .batch-list {
        max-height: none;
    }
}

.how-section {
    background: var(--surface);
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.section-heading-left {
    margin-right: auto;
    margin-left: 0;
    text-align: left;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    letter-spacing: -.05em;
    line-height: 1.25;
}

.section-heading > p:last-child {
    margin: 12px 0 0;
    color: var(--ink-muted);
    font-size: .9rem;
    line-height: 1.85;
}

.use-cases-section {
    background: var(--surface);
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.use-case-grid li {
    min-height: 190px;
    padding: 22px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
}

.use-case-grid strong,
.use-case-grid span {
    display: block;
}

.use-case-grid strong {
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.55;
}

.use-case-grid span {
    color: var(--ink-muted);
    font-size: .78rem;
    line-height: 1.8;
}

.advantage-section {
    background: var(--ink);
    color: #f8fffc;
}

.advantage-section .eyebrow {
    color: #86cfc4;
}

.advantage-section .section-heading > p:last-child {
    color: #c5d2d0;
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.advantage-card {
    min-height: 270px;
    padding: 24px;
    border: 1px solid rgba(221, 240, 236, .2);
    background: rgba(255, 255, 255, .055);
}

.advantage-number,
.quality-number {
    display: block;
    color: #86cfc4;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.advantage-card h3 {
    margin: 36px 0 14px;
    font-size: 1.03rem;
    line-height: 1.55;
}

.advantage-card p {
    margin: 0;
    color: #c5d2d0;
    font-size: .76rem;
    line-height: 1.85;
}

.section-cta {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.advantage-section .section-cta .button-primary {
    border-color: #a7ddd1;
    background: #f8fffc;
    color: var(--teal-dark);
}

.advantage-section .section-cta .button-primary:hover:not(:disabled) {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--teal-dark);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps-grid li {
    min-height: 168px;
    padding: 24px;
    border-top: 2px solid var(--teal);
    background: var(--paper);
}

.step-number {
    color: var(--teal);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .78rem;
    font-weight: 700;
}

.steps-grid h3,
.feature-card h3 {
    margin: 13px 0 7px;
    font-size: 1rem;
}

.steps-grid p,
.feature-card p {
    margin: 0;
    color: var(--ink-muted);
    font-size: .78rem;
    line-height: 1.8;
}

.problem-section {
    background: var(--paper-deep);
}

.problem-grid,
.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.problem-card,
.trust-card {
    padding: 28px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.problem-label {
    margin: 0 0 12px;
    color: var(--teal);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
}

.problem-card h3,
.trust-card h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    line-height: 1.55;
}

.problem-card > p:not(.problem-label),
.trust-card p {
    margin: 0;
    color: var(--ink-muted);
    font-size: .8rem;
    line-height: 1.85;
}

.problem-card .problem-answer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--ink);
}

.problem-answer strong {
    color: var(--teal-dark);
}

.feature-section {
    background: var(--paper);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.feature-card {
    min-height: 280px;
    padding: 24px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.feature-icon {
    color: var(--teal);
    font-size: 1.6rem;
    line-height: 1;
}

.quality-section {
    background: var(--lavender);
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.quality-grid li {
    min-height: 260px;
    padding: 24px;
    border: 1px solid rgba(82, 72, 112, .14);
    background: rgba(255, 255, 255, .72);
}

.quality-number {
    color: var(--teal);
}

.quality-grid h3 {
    margin: 34px 0 12px;
    font-size: 1rem;
    line-height: 1.55;
}

.quality-grid p {
    margin: 0;
    color: var(--ink-muted);
    font-size: .76rem;
    line-height: 1.85;
}

.finishing-section {
    background: var(--paper-deep);
}

.finishing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.finishing-card {
    padding: 24px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.finishing-card h3 {
    margin: 0 0 18px;
    font-size: 1rem;
}

.finishing-card > p {
    margin: 0;
    color: var(--ink-muted);
    font-size: .78rem;
    line-height: 1.85;
}

.batch-section {
    background: var(--paper);
}

.trust-section {
    background: var(--teal-soft);
}

.trust-card {
    min-height: 190px;
    background: rgba(255, 255, 255, .76);
}

.specs-section {
    background: var(--surface);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    margin: 0;
    border-top: 1px solid var(--line);
}

.specs-grid > div {
    display: grid;
    grid-template-columns: minmax(110px, .45fr) minmax(0, 1fr);
    gap: 18px;
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.specs-grid dt {
    color: var(--ink-muted);
    font-size: .75rem;
    font-weight: 700;
}

.specs-grid dd {
    margin: 0;
    color: var(--ink);
    font-size: .82rem;
}

.faq-section {
    background: var(--surface);
}

.faq-layout {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 90px;
}

.faq-list details {
    border-top: 1px solid var(--line);
}

.faq-list details:last-child {
    border-bottom: 1px solid var(--line);
}

.faq-list summary {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    list-style: none;
    font-size: .86rem;
    font-weight: 700;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    color: var(--teal);
    content: "+";
    font-size: 1.3rem;
    font-weight: 400;
}

.faq-list details[open] summary::after {
    content: "−";
}

.faq-list p {
    max-width: 680px;
    margin: -3px 35px 20px 0;
    color: var(--ink-muted);
    font-size: .78rem;
}

.final-cta {
    padding: 72px 0;
    background: var(--teal-dark);
    color: #f8fffc;
    text-align: center;
}

.final-cta h2 {
    margin: 0 0 14px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    letter-spacing: -.05em;
}

.final-cta p {
    margin: 0 0 26px;
    color: #d8eee8;
    font-size: .86rem;
}

.final-cta .button-primary {
    border-color: #a7ddd1;
    background: #f8fffc;
    color: var(--teal-dark);
}

.final-cta .button-primary:hover:not(:disabled) {
    border-color: #ffffff;
    background: #ffffff;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.static-error-page {
    min-height: 100vh;
    background: var(--paper);
}

.static-error-shell {
    width: min(700px, calc(100% - 48px));
    margin: 0 auto;
    padding: 18vh 0;
}

.static-error-shell h1 {
    margin: 12px 0;
    font-size: clamp(2.5rem, 10vw, 5.5rem);
    letter-spacing: -.06em;
}

.static-error-shell p {
    max-width: 560px;
    color: var(--ink-muted);
}

.static-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.footer-inner {
    gap: 20px;
    color: var(--ink-muted);
    font-size: .72rem;
}

.footer-inner p {
    margin: 0 auto 0 0;
}

.footer-copy {
    color: #94a09d;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

#blazor-error-ui {
    position: fixed;
    z-index: 1000;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    padding: 12px 22px;
    border-top: 1px solid #d99a9a;
    background: #fff2f0;
    color: var(--danger);
    font-size: .8rem;
}

#blazor-error-ui .reload {
    margin-left: 7px;
    font-weight: 700;
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 9px;
    right: 16px;
    cursor: pointer;
    font-size: 1.2rem;
}

@media (max-width: 1200px) {
    .tool-host {
        width: min(var(--page-max-width), calc(100% - 32px));
    }
}

@media (max-width: 900px) {
    .page-width {
        width: min(100% - 32px, 700px);
    }

    .tool-first-intro {
        padding-top: 42px;
    }

    .site-nav {
        gap: 14px;
        font-size: .74rem;
    }

    .editor-layout {
        grid-template-columns: 145px minmax(0, 1fr);
    }

    .editor-sidebar-right {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        align-items: start;
    }

    .settings-group {
        border-right: 1px solid var(--line);
    }

    .settings-group:nth-child(2n) {
        border-right: 0;
    }

    .use-case-grid,
    .feature-grid,
    .advantage-grid,
    .quality-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .finishing-grid {
        grid-template-columns: 1fr;
    }

    .problem-grid,
    .trust-grid {
        grid-template-columns: 1fr;
    }

    .faq-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 640px) {
    .page-width,
    .tool-host {
        width: calc(100% - 24px);
    }

    .header-inner {
        min-height: 62px;
    }

    .site-nav {
        gap: 11px;
        font-size: .68rem;
    }

    .site-nav a:not(.nav-cta) {
        display: none;
    }

    .site-nav .nav-cta {
        padding: 8px 11px;
    }

    .tool-first-intro {
        padding: 34px 0 22px;
    }

    .tool-first-intro h1 {
        font-size: 2.65rem;
    }

    .tool-definition {
        margin-top: 15px;
        font-size: .86rem;
    }

    .tool-anchor-section {
        padding-top: 0;
    }

    .tool-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    body.editor-active .tool-heading {
        align-items: center;
        flex-direction: row;
        gap: 8px;
        margin-bottom: 10px;
    }

    body.editor-active .tool-heading .eyebrow,
    body.editor-active .tool-heading .tool-intro {
        display: none;
    }

    body.editor-active .tool-heading > div {
        min-width: 0;
    }

    body.editor-active .tool-heading h2 {
        overflow: hidden;
        font-size: 1.3rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.editor-active .privacy-badge {
        flex: 0 0 auto;
        padding: 6px 8px;
        font-size: .65rem;
    }

    .tool-intro {
        font-size: .76rem;
    }

    .upload-panel {
        padding: 12px;
    }

    .upload-dropzone {
        min-height: 260px;
        padding: 20px 12px;
    }

    .upload-notes {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .editor-toolbar {
        min-height: 108px;
        flex-wrap: wrap;
    }

    .toolbar-file-actions {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .toolbar-status {
        order: 3;
        width: 100%;
    }

    .toolbar-export-action {
        margin-left: auto;
    }

    .status-detail {
        max-width: 150px;
    }

    .editor-layout {
        display: flex;
        min-height: 0;
        flex-direction: column;
    }

    body.editor-active .editor-layout > * {
        min-width: 0;
        max-width: 100%;
    }

    body.editor-active .canvas-column {
        order: -1;
    }

    body.editor-active .editor-sidebar-left {
        order: 1;
    }

    body.editor-active .editor-sidebar-right {
        order: 2;
    }

    body.editor-active .button,
    body.editor-active .icon-button,
    body.editor-active .segment-button,
    body.editor-active .tool-button,
    body.editor-active .batch-item-select,
    body.editor-active .batch-item-retry,
    body.editor-active .preview-background-choice,
    body.editor-active .background-choice,
    body.editor-active .settings-group summary,
    body.editor-active .control-label select,
    body.editor-active .color-field input[type="color"],
    body.editor-active .unit-input input,
    body.editor-active .resize-fields input,
    body.editor-active .export-fields select {
        min-height: 44px;
    }

    .editor-sidebar-left {
        display: grid;
        grid-template-columns: 1fr 1.45fr;
        gap: 13px;
        padding: 13px;
    }

    .editor-sidebar-left .batch-panel {
        grid-column: 1 / -1;
        width: 100%;
    }

    .batch-list {
        max-height: 220px;
    }

    .editor-sidebar-left .sidebar-section {
        padding: 0;
        border: 0;
    }

    .editor-sidebar-left .brush-section,
    .editor-sidebar-left .zoom-section {
        padding-top: 13px;
        border-top: 1px solid var(--line);
    }

    .editor-sidebar-left .brush-section {
        grid-column: 1 / -1;
    }

    .editor-sidebar-left .zoom-section {
        grid-column: 1 / -1;
    }

    .shortcut-hint {
        display: none;
    }

    .canvas-viewport {
        min-height: 370px;
        max-height: 65vh;
    }

    .canvas-stage {
        padding: 16px;
    }

    .canvas-caption {
        align-items: flex-start;
        flex-direction: column;
    }

    .canvas-caption-tip {
        text-align: left;
    }

    .editor-sidebar-right {
        display: block;
    }

    .settings-group {
        border-right: 0;
    }

    .info-section {
        padding: 62px 0;
    }

    .hero-benefits {
        display: grid;
        gap: 9px;
    }

    .steps-grid,
    .use-case-grid,
    .feature-grid,
    .advantage-grid,
    .quality-grid,
    .specs-grid {
        grid-template-columns: 1fr;
    }

    .specs-grid > div {
        grid-template-columns: minmax(96px, .55fr) minmax(0, 1fr);
        gap: 12px;
    }

    .final-cta {
        padding: 58px 0;
    }

    .footer-inner {
        min-height: 78px;
        flex-wrap: wrap;
        padding: 13px 0;
    }

    .footer-inner p {
        order: 3;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
