:root { color-scheme: dark; --ink: #ecf4f3; --muted: #a6b7b7; --subtle: #78908f; --bg: #101820; --panel: #16232b; --panel-2: #1c2c34; --line: #2b4147; --teal: #55d6c2; --teal-strong: #1db39f; --orange: #f59b62; --danger: #f47777; --shadow: 0 20px 60px #06101388; }
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: radial-gradient(circle at 80% -10%, #23505255, transparent 34rem), var(--bg); }
button, input { font: inherit; }
button, label, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 2; padding: 10px 14px; border-radius: 8px; color: #071313; background: var(--orange); font-weight: 700; }
.skip-link:focus { top: 12px; }
.topbar { min-height: 72px; padding: 12px clamp(16px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #ffffff12; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 13px; letter-spacing: .16em; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--teal); border-radius: 9px; color: var(--teal); font-size: 17px; letter-spacing: 0; }
.topbar-actions, .canvas-toolbar, .canvas-footer, .canvas-status, .history-actions { display: flex; align-items: center; gap: 10px; }
.privacy-note { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.privacy-dot, .status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px #55d6c220; }
.button { min-height: 44px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); font-weight: 700; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover:not(:disabled), .tool-button:hover:not(:disabled), .icon-button:hover:not(:disabled), .filter-chip:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled), .tool-button:active:not(:disabled), .icon-button:active:not(:disabled) { transform: translateY(0); }
.button:disabled, .tool-button:disabled, .icon-button:disabled { cursor: not-allowed; opacity: .4; }
.button-ghost { border-color: var(--line); background: transparent; }
.button-ghost:hover:not(:disabled) { border-color: var(--teal); background: #55d6c210; }
.button-primary { color: #071313; background: var(--teal); }
.button-primary:hover:not(:disabled) { background: #7de4d4; }
.editor-shell { width: min(1440px, calc(100% - 32px)); margin: 0 auto; padding: clamp(32px, 6vw, 78px) 0 36px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 38px; }
.eyebrow, .panel-kicker, .section-heading span, .file-type { color: var(--teal); font-size: 11px; letter-spacing: .16em; font-weight: 800; }
.eyebrow span { color: var(--orange); }
h1, h2, h3, p { margin: 0; }
h1 { max-width: 720px; margin-top: 13px; font-size: clamp(34px, 5vw, 64px); line-height: 1.04; letter-spacing: -.045em; }
h1 em { color: var(--teal); font-style: normal; }
.intro-copy { max-width: 620px; margin-top: 17px; color: var(--muted); font-size: 16px; }
.shortcut-card { min-width: 190px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #16232bcc; }
.shortcut-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--orange); background: #f59b6214; font-size: 20px; }
.shortcut-card strong, .shortcut-card small { display: block; }
.shortcut-card small { margin-top: 2px; color: var(--subtle); font-size: 12px; }
.workspace { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); min-height: 660px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #16232bdd; box-shadow: var(--shadow); }
.tool-panel { padding: 22px; border-right: 1px solid var(--line); background: #132028; }
.panel-heading, .section-heading, .canvas-toolbar { justify-content: space-between; }
.panel-heading { display: flex; align-items: start; gap: 10px; margin-bottom: 18px; }
.panel-heading h2 { margin-top: 4px; font-size: 20px; letter-spacing: -.02em; }
.file-type { margin-top: 7px; color: var(--subtle); font-size: 9px; letter-spacing: .08em; white-space: nowrap; }
.drop-zone { display: flex; min-height: 176px; padding: 22px 14px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; border: 1px dashed #4b666b; border-radius: 12px; color: var(--muted); background: #1b2b321c; text-align: center; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--teal); background: #55d6c20d; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { color: var(--ink); font-size: 14px; }
.drop-zone u { color: var(--teal); text-underline-offset: 3px; }
.drop-zone small { margin-top: 7px; color: var(--subtle); font-size: 11px; }
.drop-icon, .empty-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 6px; border-radius: 12px; color: var(--teal); background: #55d6c215; }
.drop-icon svg, .empty-icon svg { width: 23px; height: 23px; }
.tool-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: baseline; margin-bottom: 14px; }
.section-heading h3 { font-size: 14px; }
.section-heading span { color: var(--subtle); font-size: 9px; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tool-button { min-height: 67px; display: flex; align-items: center; justify-content: center; gap: 7px; flex-direction: column; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #1b2b32; font-size: 11px; transition: .18s ease; }
.tool-button:hover:not(:disabled) { border-color: var(--teal); color: var(--ink); background: #55d6c20f; }
.tool-button svg, .icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.inline-tool { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #101b21; }
.inline-tool p { margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.inline-tool > div { display: flex; gap: 8px; }
.inline-tool .button { min-height: 40px; padding: 0 12px; font-size: 11px; }
.resize-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.resize-form[hidden], .inline-tool[hidden] { display: none; }
.resize-form label { color: var(--muted); font-size: 11px; }
.resize-form input[type=number] { width: 100%; min-height: 40px; margin-top: 4px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--panel-2); }
.resize-form .lock-ratio { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; min-height: 32px; }
.resize-form .button { grid-column: 1 / -1; }
.slider-field { margin-bottom: 15px; }
.slider-field label { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.slider-field output { color: var(--teal); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; height: 4px; accent-color: var(--teal); cursor: pointer; }
.filter-row { display: flex; gap: 7px; margin-top: 20px; }
.filter-chip { min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; }
.filter-chip[aria-pressed=true] { border-color: var(--teal); color: #061314; background: var(--teal); }
.canvas-panel { min-width: 0; display: flex; flex-direction: column; }
.canvas-toolbar { min-height: 65px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.canvas-status { color: var(--muted); font-size: 12px; }
.history-actions { gap: 5px; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; transition: .18s ease; }
.icon-button:hover:not(:disabled) { border-color: var(--line); color: var(--ink); background: #ffffff0a; }
.canvas-wrap { min-height: 500px; flex: 1; display: grid; place-items: center; padding: clamp(18px, 5vw, 60px); overflow: auto; background-color: #101820; background-image: linear-gradient(45deg, #18242b 25%, transparent 25%), linear-gradient(-45deg, #18242b 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #18242b 75%), linear-gradient(-45deg, transparent 75%, #18242b 75%); background-size: 24px 24px; background-position: 0 0, 0 12px, 12px -12px, -12px 0; }
.canvas-stack { position: relative; max-width: 100%; max-height: 590px; line-height: 0; box-shadow: 0 18px 35px #05090dcc; }
#canvas { display: block; max-width: 100%; max-height: 590px; border-radius: 2px; }
#crop-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; touch-action: none; }
#crop-overlay.is-active { pointer-events: auto; cursor: crosshair; }
.empty-canvas { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: var(--subtle); text-align: center; }
.empty-canvas strong { margin-top: 7px; color: var(--muted); font-size: 14px; }
.empty-canvas span:last-child { font-size: 12px; }
.canvas-footer { justify-content: space-between; min-height: 50px; padding: 0 22px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 11px; }
.local-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); }
.local-badge svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.editor-note { margin-top: 17px; color: var(--subtle); font-size: 12px; }
.editor-note strong { color: var(--muted); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 3; max-width: min(360px, calc(100vw - 40px)); padding: 12px 16px; border: 1px solid #55d6c255; border-radius: 9px; color: var(--ink); background: #162c32f5; box-shadow: var(--shadow); }
@media (max-width: 760px) { .topbar { align-items: start; flex-direction: column; } .topbar-actions { width: 100%; justify-content: space-between; } .privacy-note { margin-right: auto; } .intro { align-items: start; flex-direction: column; } .shortcut-card { width: 100%; } .workspace { display: flex; flex-direction: column; } .tool-panel { border-right: 0; border-bottom: 1px solid var(--line); } .drop-zone { min-height: 138px; } .canvas-wrap { min-height: 400px; padding: 20px 12px; } .canvas-footer { align-items: start; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 16px; } }
@media (max-width: 430px) { .editor-shell { width: min(100% - 20px, 1440px); padding-top: 28px; } h1 { font-size: 34px; } .topbar-actions .button { padding: 0 12px; } .privacy-note { font-size: 11px; } .canvas-toolbar { padding: 0 13px; } .canvas-wrap { min-height: 330px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
