:root { font-family: "Yu Gothic UI", system-ui, sans-serif; color: #181818; background: #f2f3f5; --red: #e51d2d; --line: #d9dadd; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.admin-header { height: 76px; padding: 13px 24px; display: flex; align-items: center; gap: 22px; background: #fff; border-bottom: 1px solid var(--line); }
.admin-header img { width: 142px; height: auto; }
.admin-header div { display: grid; gap: 2px; padding-left: 22px; border-left: 1px solid var(--line); }
.admin-header strong { letter-spacing: .18em; font-size: .75rem; }
.admin-header span { color: #6a6d72; font-size: .75rem; }
.admin-layout { min-height: calc(100vh - 76px); display: grid; grid-template-columns: minmax(310px, 380px) minmax(0, 1fr); gap: 20px; padding: 20px; }
.admin-controls, .preview-column { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(21,24,29,.06); }
.admin-controls { padding: 28px; }
.eyebrow { margin: 0 0 7px; color: var(--red); font-size: .68rem; font-weight: 900; letter-spacing: .2em; }
h1 { margin: 0; font-size: 1.45rem; }
.lead { margin: 10px 0 22px; color: #686b70; font-size: .8rem; line-height: 1.65; }
.text-field { display: grid; gap: 7px; margin-top: 15px; font-size: .8rem; font-weight: 800; }
.text-field input, .text-field select { width: 100%; min-height: 43px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.upload-zone { min-height: 92px; margin-top: 18px; display: grid; place-content: center; gap: 4px; text-align: center; border: 2px dashed #c9cbd0; border-radius: 10px; background: #f8f8f9; cursor: pointer; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-zone strong { font-size: .85rem; }
.upload-zone span { color: #85888d; font-size: .68rem; }
.sample-button { width: 100%; min-height: 40px; margin-top: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .76rem; font-weight: 800; }
.check-field { display: flex; gap: 9px; align-items: center; margin-top: 23px; font-size: .8rem; font-weight: 800; }
.check-field input { width: 18px; height: 18px; accent-color: var(--red); }
.range-field { display: grid; gap: 7px; margin-top: 17px; }
.range-field > span { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: .8rem; }
.range-field output { color: var(--red); font-weight: 900; }
.range-field input { width: 100%; accent-color: var(--red); }
.area-settings { margin: 24px 0 0; padding: 17px; border: 1px solid var(--line); border-radius: 10px; }
.area-settings legend { padding: 0 7px; font-size: .82rem; font-weight: 900; }
.area-settings > p { margin: 0 0 13px; color: #686b70; font-size: .7rem; line-height: 1.55; }
.area-diagram { position: relative; width: 100%; aspect-ratio: 3 / 1; overflow: hidden; border: 1px solid #bbbfc5; border-radius: 6px; background: linear-gradient(135deg,#292929,#171717); }
#areaRect { position: absolute; display: grid; place-items: center; border: 2px solid var(--red); background: rgba(229,29,45,.14); color: #fff; font-size: .65rem; font-weight: 900; transition: inset .12s,width .12s,height .12s; }
.origin-field { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.origin-help { margin: 7px 0 0 !important; color: #686b70; font-size: .68rem !important; }
.admin-actions { display: grid; gap: 9px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.admin-actions button { min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .8rem; font-weight: 800; }
.admin-actions .primary { border-color: var(--red); color: #fff; background: var(--red); }
.status { min-height: 20px; margin: 15px 0 0; color: #326247; font-size: .75rem; line-height: 1.5; }
.security-note { margin: 11px 0 0; padding: 10px 12px; border-radius: 7px; color: #795b19; background: #fff7df; font-size: .68rem; line-height: 1.55; }
.preview-column { min-width: 0; padding: 14px; display: flex; flex-direction: column; }
.preview-title { display: flex; justify-content: space-between; gap: 12px; align-items: end; padding: 3px 4px 13px; }
.preview-title div { display: grid; gap: 3px; }
.preview-title span { color: #777a7f; font-size: .72rem; }
.canvas-shell { min-height: 510px; display: grid; place-items: center; padding: 20px; overflow: hidden; border-radius: 10px; background: #e9ebee; }
#editorCanvas { width: min(100%, 900px); height: auto; border-radius: 8px; background-color: #fff; background-image: linear-gradient(45deg,#e1e1e1 25%,transparent 25%),linear-gradient(-45deg,#e1e1e1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e1e1e1 75%),linear-gradient(-45deg,transparent 75%,#e1e1e1 75%); background-size: 28px 28px; background-position: 0 0,0 14px,14px -14px,-14px 0; box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.catalog-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.catalog-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.catalog-heading span { color: #777a7f; font-size: .72rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.catalog-grid article { min-width: 0; padding: 11px; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; border: 1px solid var(--line); border-radius: 9px; }
.catalog-grid img { grid-column: 1 / -1; width: 100%; height: 104px; object-fit: contain; border-radius: 6px; background: #f1f2f4; }
.catalog-grid strong { font-size: .82rem; }
.catalog-grid span { color: #348151; font-size: .68rem; font-weight: 800; }
@media (max-width: 960px) { .admin-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .admin-header { padding-inline: 16px; } .admin-header img { width: 126px; } .admin-header div { display: none; } .admin-layout { padding: 12px; } .admin-controls { padding: 22px 18px; } .preview-title, .catalog-heading { display: grid; } .catalog-grid { grid-template-columns: 1fr; } }
