:root { font-family: "Segoe UI", Arial, sans-serif; color: #222222; background: var(--surface); --line: #e6e6e6; --muted: #6e6e6e; --accent: #dc4441; --accent-ink: #b23c3b; --accent-strong: #dc4441; --surface: #ffffff; --surface-soft: #f5f5f5; --selected: #fcebea; --soft: #f5f5f5; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
body.has-photos { background: #f8f8f8; }
.has-photos main { padding-top: 24px; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
input, select { color: #4b4b4b; background: var(--surface); }
button, summary, [role="button"] { cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
button, a, input, select, summary, [tabindex] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #d76b66; outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
.header { margin: auto; height: 76px; padding: 0 40px; display: flex; align-items: center; gap: 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; letter-spacing: -.5px; }
.brand-logo { display: block; width: 45px; height: 45px; object-fit: contain; mix-blend-mode: multiply; flex-shrink: 0; }
.header-caption { color: var(--muted); font-size: 13px; }
main { max-width: 1680px; padding: 0 40px 40px; margin: auto; }
.intro { padding: 60px 0 28px; text-align: center; }
h1 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -1px; font-weight: 550; margin: 0; }
.dropzone { max-width: 740px; min-height: 230px; border: 1px dashed #cacaca; border-radius: 12px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--surface-soft); transition: background .15s; }
.dropzone:hover, .dropzone.dragover { background: #fff3f2; border-color: var(--accent); }
.dropzone { position: relative; cursor: pointer; }
.upload-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 1; }
.upload-input:disabled { cursor: progress; }
.dropzone:has(.upload-input:focus-visible) { outline: 3px solid #d76b66; outline-offset: 3px; }
.upload-icon { color: var(--accent-ink); width: 36px; height: 36px; }
.upload-icon svg { width: 100%; height: 100%; }
.dropzone strong { font-size: 16px; font-weight: 500; }
.drop-description { color: var(--muted); font-size: 14px; }
.upload-link { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.dropzone small { font-size: 12px; color: var(--muted); margin-top: 6px; }
.dropzone[aria-busy="true"] { cursor: progress; opacity: .6; }
.limitations { max-width: 1000px; margin: 20px auto 28px; font-size: 13px; color: #6e6e6e; border: 1px solid #e6e6e6; background: var(--surface-soft); border-radius: 8px; }
.limitations summary { padding: 12px 16px; line-height: 1.55; display: flex; justify-content: space-between; gap: 18px; list-style: none; }
.limitations summary::-webkit-details-marker { display: none; }
.limitations summary span { color: var(--accent-ink); white-space: nowrap; }
.limitations[open] summary { border-bottom: 1px solid var(--line); }
.limitations > div { padding: 0 16px 12px; line-height: 1.65; }
.limitations p { margin: 10px 0 0; }
.has-photos .intro { display: none; }
.has-photos .dropzone { max-width: none; min-height: 58px; flex-direction: row; justify-content: flex-start; padding: 12px 18px; gap: 12px; border-radius: 8px; }
.has-photos .upload-icon { width: 22px; height: 22px; }
.has-photos .dropzone strong { font-size: 14px; }
.has-photos .dropzone small { margin: 0 0 0 auto; }
.has-photos .drop-description { font-size: 13px; }
.has-photos .limitations { max-width: none; margin: 12px 0 24px; }
.notice { border-radius: 7px; background: #fff6e7; color: #6e4c17; padding: 12px 16px; margin: 12px 0; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.notice.info { color: #4b4b4b; background: var(--surface-soft); }
.workspace-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 10px; }
.workspace-title { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.workspace-title h2 { margin: 0; font-size: 18px; font-weight: 550; letter-spacing: -.3px; }
.workspace-title h2 span { color: #6e6e6e; font-size: 13px; font-weight: 400; margin-left: 5px; }
.muted { color: var(--muted); font-size: 12px; }
.global-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px 16px; }
.check-label { display: flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 13px; color: #4b4b4b; }
.check-label:has(input:disabled) { color: #909090; }
input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.button { border: 1px solid #d5d5d5; background: var(--surface); border-radius: 6px; padding: 8px 12px; font-size: 13px; color: #4b4b4b; white-space: nowrap; }
.button:hover:not(:disabled) { background: var(--surface-soft); }
.button-primary { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--surface); border-radius: 999px; font-weight: 600; padding-inline: 16px; }
.button-primary:hover:not(:disabled) { background: var(--accent-ink); }
.text-button { background: transparent; border: 0; padding: 5px 0; font-size: 13px; color: var(--accent-ink); }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.workspace-subbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; min-height: 24px; }
.workspace-subbar #workspace-hint { line-height: 1.6; }
.export-options { flex-shrink: 0; position: relative; }
.export-options summary { list-style: none; color: #6e6e6e; }
.export-options[open] .export-label { display: flex; align-items: center; gap: 8px; position: absolute; right: 0; top: 25px; z-index: 3; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; box-shadow: 0 6px 24px #00000010; white-space: nowrap; }
select { border: 1px solid var(--line); padding: 5px; border-radius: 4px; background: var(--surface); font-size: 12px; color: #4b4b4b; }
.match-status { font-size: 12px; color: #6e6e6e; margin: 5px 0 18px; line-height: 1.5; min-height: 18px; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; }
.photo-card { min-width: 0; border: 1px solid #e6e6e6; border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: 0 1px 3px #00000006; }
.photo-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 15px 18px 7px; }
.photo-name-group { display: flex; align-items: center; gap: 10px; min-width: 0; }
.photo-number { color: #909090; font-size: 12px; font-variant-numeric: tabular-nums; }
.photo-name { font-size: 14px; font-weight: 500; margin: 0; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.icon-button { border: 0; background: transparent; color: #6e6e6e; padding: 3px 6px; font-size: 23px; line-height: 1; border-radius: 4px; }
.icon-button:hover { background: var(--surface-soft); }
.photo-status { padding: 0 18px 13px; min-height: 30px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: #8d6819; }
.status-dot { width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.calibrated .photo-status { color: #6e6e6e; }
.candidate-next { font-size: 12px; padding: 0; margin-left: auto; }
.canvas-wrap { height: clamp(360px, 36vw, 560px); position: relative; overflow: hidden; background: var(--surface-soft); border-block: 1px solid #e6e6e6; }
.canvas-wrap canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.canvas-wrap.pan canvas { cursor: grab; }
.canvas-wrap.pan canvas:active { cursor: grabbing; }
.canvas-badge, .canvas-zoom { position: absolute; top: 12px; pointer-events: none; font-size: 11px; color: #6e6e6e; background: #fffffff0; border-radius: 4px; padding: 5px 8px; }
.canvas-badge { left: 12px; }
.canvas-zoom { right: 12px; }
.photo-tools { display: flex; align-items: center; gap: 5px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tool { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #6e6e6e; padding: 8px 10px; font-size: 13px; border-radius: 5px; }
.tool span { font-size: 17px; }
.tool:hover { background: var(--surface-soft); }
.tool.active { background: var(--selected); color: var(--accent-ink); }
.undo { margin-left: auto; }
.markup-review { padding: 12px 16px; background: #fff8f7; border-bottom: 1px solid var(--line); }
.markup-review.complete { background: var(--surface); }
.review-hint { margin: 0 0 10px; font-size: 12px; line-height: 1.5; color: #6e6e6e; }
.review-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.review-row + .review-row { margin-top: 8px; }
.review-row > span { flex: 1; min-width: 120px; font-size: 12px; color: #4b4b4b; }
.review-row .button, .review-row .text-button { font-size: 12px; }
.reference-controls, .polygon-controls { padding: 11px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.reference-controls label { display: flex; align-items: center; gap: 7px; flex: 1; flex-wrap: wrap; }
.reference-size { border: 1px solid var(--line); width: 62px; padding: 6px; border-radius: 4px; }
.polygon-instruction { flex: 1; line-height: 1.5; color: var(--muted); }
.polygon-controls .finish-polygon:disabled { display: none; }
.object-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 16px; }
.only-polygon { font-size: 12px; padding: 6px 10px; }
.only-polygon[aria-pressed="true"] { background: var(--selected); color: var(--accent-ink); border-color: #efc0be; }
.perspective-status { flex: 1; font-size: 12px; color: #6e6e6e; }
.card-options { font-size: 12px; color: #6e6e6e; position: relative; }
.card-options summary { list-style: none; padding: 6px; }
.card-options[open] > div { position: absolute; z-index: 3; bottom: 32px; right: 0; display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; box-shadow: 0 4px 20px #00000018; width: 285px; max-width: calc(100vw - 64px); }
.card-options small { color: var(--muted); line-height: 1.5; font-size: 11px; }
.aspect-label { font-size: 12px; display: grid; gap: 7px; }
.aspect-label span { display: flex; align-items: center; gap: 8px; }
.aspect-label input { min-width: 0; width: 90px; border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; font-size: 13px; }
.focus-controls { display: flex; align-items: center; gap: 6px; padding: 0 16px 10px; }
.focus-controls span { flex: 1; font-size: 12px; color: var(--muted); }
.focus-controls .button { font-size: 16px; padding: 2px 9px; }
.card-warning { margin: 0 16px 12px; padding: 10px 12px; color: #74540e; background: #fff6e7; border-radius: 5px; font-size: 12px; line-height: 1.5; }
.photo-result { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; gap: 12px; border-top: 1px solid var(--line); }
.result-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.area-value { font-size: 26px; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.area-value small { color: #6e6e6e; font-size: 13px; letter-spacing: 0; }
.result-right { display: flex; align-items: flex-end; flex-direction: column; gap: 6px; text-align: right; }
.calibration-value { font-size: 11px; color: #767676; }
.export-png { font-size: 12px; }
@media (max-width: 1100px) { .workspace-toolbar { align-items: flex-start; flex-direction: column; } .global-controls { justify-content: flex-start; } .workspace-title .muted { display: none; } .canvas-wrap { height: 400px; } .photo-grid { gap: 16px; } }
@media (max-width: 700px) { .header { padding: 0 20px; height: 65px; } .header-caption { display: none; } main { padding: 0 16px 28px; } .intro { padding-top: 45px; } .dropzone { padding: 20px; text-align: center; min-height: 210px; } .has-photos .dropzone { padding: 12px; text-align: left; min-height: 52px; } .has-photos .dropzone small, .has-photos .drop-description { display: none; } .limitations summary { padding: 10px 12px; font-size: 12px; } .limitations summary span { display: none; } .global-controls { gap: 10px 14px; } .check-label { font-size: 12px; } .global-controls .button { padding: 7px 10px; font-size: 12px; } .photo-grid { grid-template-columns: 1fr; } .canvas-wrap { height: 400px; } .tool { padding: 7px 9px; font-size: 12px; } .perspective-status { font-size: 11px; } .workspace-subbar { font-size: 11px; } .match-status { font-size: 11px; } }
