:root { color-scheme: light; font-family: system-ui, sans-serif; color: #102e28; background: #f7f4ed; --accent: #194b42; --line: #dedbd1; --muted: #4d635c; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
button { font-weight: 650; }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #a85530; outline-offset: 3px; }
.top { min-height: 70px; padding: 14px max(24px, calc((100% - 1320px)/2)); display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: #fcfaf5; }
.identity { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; font-size: 16px; font-weight: 730; }
main { max-width: 1368px; margin: auto; padding: 41px 24px 24px; }
.intro { padding-bottom: 27px; }
h1 { font: 500 clamp(2.35rem, 5vw, 4.35rem)/1.03 Georgia, serif; letter-spacing: -.045em; margin: 0 0 13px; }
p { line-height: 1.52; margin: 0; }
.intro p, .hint, #status, #dimensions { color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 374px); align-items: start; gap: 18px; }
.preview-panel, .panel { background: #fffdf9; border: 1px solid var(--line); border-radius: 17px; }
.preview-panel { padding: 18px; }
.preview-header, .panel-title, .preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h2 { font-size: 17px; letter-spacing: -.025em; margin: 0; }
#dimensions, .hint, #status { font-size: 13px; }
.preview-area { display: grid; place-items: center; margin: 14px 0; min-height: clamp(305px, 53vh, 685px); padding: 14px; background: #eae6dc; border-radius: 10px; }
canvas { display: block; max-width: 100%; max-height: 60vh; width: auto; height: auto; box-shadow: 0 3px 16px #142d2330; background-color: #fff; background-image: conic-gradient(#d9dcd7 25%, #fff 0 50%, #d9dcd7 0 75%, #fff 0); background-size: 16px 16px; }
#empty { display: grid; justify-items: center; gap: 13px; padding: 22px 8px; text-align: center; }
#empty p { font-size: 16px; }
.primary, .secondary { border-radius: 8px; min-height: 43px; padding: 8px 14px; }
.primary { background: var(--accent); color: white; border: 1px solid var(--accent); white-space: nowrap; }
.primary:not(:disabled):hover { background: #246354; }
.secondary { color: var(--accent); background: #fffdf9; border: 1px solid #c9d5ca; }
.secondary:hover { background: #eaf4ed; }
.compact { padding: 6px 11px; min-height: 38px; font-size: 13px; }
.controls { display: grid; gap: 14px; }
.panel { padding: 16px; min-width: 0; }
.hint { margin-top: 6px; }
#photos { margin: 0; padding: 0; list-style: none; }
#photos li { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 33px); align-items: center; gap: 5px; margin-top: 8px; }
.photo-select { display: flex; align-items: center; gap: 8px; padding: 4px; background: white; color: var(--accent); text-align: left; min-width: 0; }
.photo-select span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.photo-select img { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 4px; object-fit: cover; }
.photo-select[aria-pressed="true"] { background: #e5f0e9; border-color: #518575; }
.photo-select, .photo-action { min-height: 40px; border: 1px solid #c9d5ca; border-radius: 6px; }
.photo-action { background: white; color: var(--accent); padding: 0; }
fieldset { min-width: 0; margin: 10px 0 0; padding: 6px 10px 8px; border: 1px solid var(--line); border-radius: 8px; }
fieldset label { display: grid; grid-template-columns: 75px minmax(0, 1fr); align-items: center; gap: 6px; }
legend, label { font-size: 13px; font-weight: 650; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 12px; }
.fields label { display: grid; gap: 6px; }
.fields label > span { display: flex; justify-content: space-between; }
.span { grid-column: 1 / -1; }
select { width: 100%; min-height: 42px; border: 1px solid #c9d5ca; border-radius: 7px; background: white; color: #14362e; padding: 4px; font-size: 13px; }
input[type="range"] { accent-color: var(--accent); width: 100%; min-height: 29px; margin: 0; }
.foot { display: flex; flex-wrap: wrap; gap: 15px; padding: 0 24px 30px; margin: 0 auto; max-width: 1368px; font-size: 13px; }
.info main { max-width: 800px; }
.info h2 { margin: 25px 0 8px; }
.info p + p { margin-top: 10px; }
@media (max-width: 820px) { .workspace { grid-template-columns: minmax(0, 1fr); } .preview-area { min-height: 300px; } }
@media (max-width: 460px) { main { padding: 30px 12px 20px; } .preview-panel { padding: 11px; } .preview-area { padding: 9px; min-height: 245px; } .top { padding: 12px; } }
