:root { --brand-primary: #027575; --brand-secondary: #504646; --bg: #fafafa; --surface: #fff; --surface-soft: #f5f5f5; --line: #e5e5e5; --text-main: #222; --text-subtle: #555; --error: #b3261e; --shadow: 0 8px 20px rgba(0,0,0,0.1); }
* { box-sizing: border-box; }
body { margin: 0; font-family: Manrope, Arial, sans-serif; color: var(--text-main); background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%); }
.page { max-width: 1240px; margin: 24px auto 56px; padding: 0 20px; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-secondary); font-weight: 800; font-size: 32px; line-height: 1.2; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand-primary); box-shadow: 0 0 0 6px rgba(2,117,117,0.14); }
.kpi { font-size: 13px; color: var(--text-subtle); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; background: #fff; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.card-head { padding: 12px 14px 9px; border-bottom: 1px solid var(--line); }
.card-body { padding: 12px 14px 14px; }
h2 { margin: 0; color: var(--brand-secondary); font-size: 24px; line-height: 1.25; }
.steps-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.step-item { min-height: 64px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); display: grid; place-items: center; color: var(--text-subtle); font-size: 12px; text-align: center; }
.step-item strong { display: block; margin-top: 2px; color: var(--text-main); font-size: 13px; }
.layout { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start; }
.volume-options { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.volume-option { border: 0; border-radius: 999px; background: transparent; color: var(--text-subtle); font-weight: 700; padding: 8px 4px; cursor: pointer; }
.volume-option.is-active { background: var(--brand-primary); color: #fff; }
.geometry-grid { display: grid; gap: 8px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--text-subtle); }
input[type='number'] { border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text-main); padding: 9px 10px; font-size: 14px; }
.support-note { margin: 0 0 10px; border: 1px dashed var(--line); border-radius: 10px; padding: 10px; font-size: 13px; color: var(--text-subtle); background: var(--surface-soft); }
#upload-button, #bend-button, #download-button { border: 0; border-radius: 10px; background: var(--brand-primary); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 16px; cursor: pointer; box-shadow: 0 8px 18px rgba(2,117,117,0.24); }
#upload-button { width: 100%; margin-bottom: 8px; }
#upload-input { display: none; }
#upload-drop-zone { border: 2px dashed rgba(2,117,117,0.35); border-radius: 10px; background: rgba(2,117,117,0.05); color: var(--text-subtle); text-align: center; font-size: 13px; font-weight: 600; padding: 14px 10px; }
#upload-drop-zone.drag-active { border-color: var(--brand-primary); background: rgba(2,117,117,0.12); }
#upload-drop-zone.is-locked { opacity: 0.6; pointer-events: none; }
#fit-preview { position: relative; min-height: 440px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 30% 30%, rgba(2,117,117,0.18), transparent 45%), linear-gradient(135deg, #f6fafa 0%, #eef4f4 100%); display: grid; place-items: center; margin-bottom: 12px; }
.fit-placeholder { color: #5a5a5a; font-size: 14px; letter-spacing: 0.2px; }
#fit-image { position: absolute; max-width: none; max-height: none; display: none; transform-origin: center center; user-select: none; pointer-events: none; z-index: 2; }
.fit-frame { position: absolute; left: 14%; right: 14%; top: 18%; bottom: 18%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(2,117,117,0.6), 0 0 0 1200px rgba(0,0,0,0.52); border-radius: 10px; pointer-events: none; z-index: 3; }
.workspace-hints { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; gap: 10px; z-index: 4; }
.hint { background: rgba(0,0,0,0.36); border: 1px solid rgba(255,255,255,0.2); color: #f7f7f7; border-radius: 999px; padding: 6px 9px; font-size: 12px; }
.fit-controls { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
input[type='range'] { width: 100%; }
.bend-action-row { display: flex; align-items: center; gap: 10px; min-height: 44px; flex-wrap: wrap; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(2,117,117,0.2); border-top-color: var(--brand-primary); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
.spinner[hidden] { display: none; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.result-preview { min-height: 220px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, #fff 0%, #f7fbfb 100%); color: var(--text-subtle); padding: 12px; display: grid; align-content: center; margin-bottom: 10px; }
.result-preview.has-visual { align-content: start; }
#result-preview-image { width: 100%; min-height: 220px; max-height: 420px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
#result-preview-placeholder { color: var(--text-subtle); }
.download-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.download-formats { display: flex; gap: 8px; flex-wrap: wrap; }
.format-button { border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text-subtle); font-weight: 700; padding: 8px 12px; cursor: pointer; min-width: 80px; }
.format-button.is-ready { border-color: rgba(2,117,117,0.35); }
.format-button.is-failed { border-color: rgba(179,38,30,0.25); color: #8a4c48; }
.format-button.is-active { border-color: rgba(2,117,117,0.35); color: var(--brand-primary); background: rgba(2,117,117,0.08); }
#download-button { min-width: 130px; }
.status-line { margin: 8px 0 0; font-weight: 600; font-size: 13px; color: var(--text-subtle); }
.field-error { margin: 8px 0 0; min-height: 18px; color: var(--error); font-size: 13px; font-weight: 600; }
.format-button:disabled, #bend-button:disabled, #download-button:disabled, #upload-button:disabled, .volume-option:disabled, input:disabled { cursor: not-allowed; opacity: 0.55; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } #fit-preview { min-height: 360px; } }
@media (max-width: 760px) { .page { max-width: 430px; margin: 12px auto 24px; padding: 0 12px 14px; } .header { margin-bottom: 10px; } .brand { font-size: 17px; } .kpi { font-size: 11px; padding: 5px 9px; } h2 { font-size: 15px; } .card { margin-bottom: 12px; } .steps-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; } .step-item { min-height: 56px; font-size: 12px; } .volume-options { gap: 4px; } .volume-option { min-height: 36px; font-size: 11px; } .fit-controls { grid-template-columns: 1fr; } #fit-preview { min-height: 280px; } .fit-frame { left: 8%; right: 8%; top: 16%; bottom: 16%; box-shadow: 0 0 0 1px rgba(2,117,117,0.6), 0 0 0 800px rgba(0,0,0,0.55); } .workspace-hints { bottom: 8px; left: 8px; right: 8px; flex-wrap: wrap; gap: 6px; } .hint { font-size: 10px; padding: 4px 7px; } .result-preview { min-height: 160px; } #download-button { width: 100%; min-width: 0; } }