﻿:root {
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --font-ui: "Manrope", "Segoe UI", sans-serif;
  --font-display: "Unbounded", "Manrope", sans-serif;
}

body[data-theme="aurora"] {
  --bg: #f4f7ff;
  --bg-accent: #e9f4ff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-soft: rgba(255, 255, 255, 0.62);
  --text: #12213b;
  --muted: #587097;
  --border: rgba(54, 93, 148, 0.23);
  --primary: #194dc8;
  --primary-contrast: #ffffff;
  --chip: #e8f0ff;
  --shadow: 0 14px 36px rgba(18, 40, 79, 0.14);
  --focus: rgba(25, 77, 200, 0.34);
}

body[data-theme="sand"] {
  --bg: #faf5ee;
  --bg-accent: #f2e6d7;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-soft: rgba(255, 255, 255, 0.68);
  --text: #3a2b1e;
  --muted: #78624f;
  --border: rgba(121, 90, 57, 0.22);
  --primary: #8c4e1e;
  --primary-contrast: #fffdf8;
  --chip: #f6e8d7;
  --shadow: 0 14px 36px rgba(93, 64, 39, 0.14);
  --focus: rgba(140, 78, 30, 0.34);
}

body[data-theme="graphite"] {
  --bg: #eef2f6;
  --bg-accent: #dfe8f0;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-soft: rgba(247, 250, 253, 0.68);
  --text: #0f1c2f;
  --muted: #5c6f89;
  --border: rgba(51, 76, 110, 0.25);
  --primary: #0e3f8c;
  --primary-contrast: #ffffff;
  --chip: #dfe9f8;
  --shadow: 0 14px 36px rgba(20, 36, 66, 0.14);
  --focus: rgba(14, 63, 140, 0.35);
}

body[data-theme="ocean"] {
  --bg: #edf7fb;
  --bg-accent: #d6eef9;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-soft: rgba(245, 252, 255, 0.7);
  --text: #0a2f4a;
  --muted: #3f6885;
  --border: rgba(46, 102, 142, 0.23);
  --primary: #006f9f;
  --primary-contrast: #ffffff;
  --chip: #dbf1ff;
  --shadow: 0 14px 36px rgba(6, 54, 83, 0.13);
  --focus: rgba(0, 111, 159, 0.34);
}

body[data-theme="forest"] {
  --bg: #eef7f1;
  --bg-accent: #dcefe1;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-soft: rgba(246, 252, 248, 0.7);
  --text: #143425;
  --muted: #4e7461;
  --border: rgba(56, 111, 79, 0.22);
  --primary: #1f7a49;
  --primary-contrast: #ffffff;
  --chip: #dff2e7;
  --shadow: 0 14px 36px rgba(17, 64, 39, 0.13);
  --focus: rgba(31, 122, 73, 0.34);
}

body[data-theme="sunset"] {
  --bg: #fff4ec;
  --bg-accent: #ffe5d8;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-soft: rgba(255, 249, 245, 0.72);
  --text: #472016;
  --muted: #855448;
  --border: rgba(150, 83, 65, 0.24);
  --primary: #cb5b36;
  --primary-contrast: #ffffff;
  --chip: #ffe8df;
  --shadow: 0 14px 36px rgba(96, 44, 29, 0.14);
  --focus: rgba(203, 91, 54, 0.34);
}

body[data-theme="plum"] {
  --bg: #f6effb;
  --bg-accent: #eadcf6;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-soft: rgba(251, 247, 255, 0.73);
  --text: #2f1d42;
  --muted: #6f5a86;
  --border: rgba(102, 73, 133, 0.24);
  --primary: #7d46af;
  --primary-contrast: #ffffff;
  --chip: #efdefe;
  --shadow: 0 14px 36px rgba(57, 32, 79, 0.14);
  --focus: rgba(125, 70, 175, 0.35);
}

body[data-theme="mint"] {
  --bg: #edf9f5;
  --bg-accent: #d9f0e7;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-soft: rgba(245, 255, 251, 0.72);
  --text: #123a31;
  --muted: #4d7b6f;
  --border: rgba(63, 122, 107, 0.22);
  --primary: #228b72;
  --primary-contrast: #ffffff;
  --chip: #d8f5ec;
  --shadow: 0 14px 36px rgba(18, 67, 56, 0.13);
  --focus: rgba(34, 139, 114, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at 8% 8%, color-mix(in srgb, var(--bg-accent), white 8%) 0%, transparent 36%),
    radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--bg-accent), white 20%) 0%, transparent 32%),
    linear-gradient(140deg, var(--bg) 0%, color-mix(in srgb, var(--bg), white 20%) 100%);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.35s ease, color 0.2s ease;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
  filter: blur(52px);
  opacity: 0.5;
}

body::before {
  width: 380px;
  height: 380px;
  left: -140px;
  top: -110px;
  background: color-mix(in srgb, var(--primary), white 70%);
}

body::after {
  width: 420px;
  height: 420px;
  right: -170px;
  bottom: -150px;
  background: color-mix(in srgb, var(--bg-accent), var(--primary) 22%);
}

#app {
  padding: 20px;
  max-width: 1680px;
  margin: 0 auto;
}

.ee_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.ee_headerLeft {
  min-width: 0;
}

.ee_eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  display: none;
}

.ee_title {
  margin-top: 4px;
  font-weight: 700;
  font-size: clamp(16px, 2vw, 22px);
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.ee_headerRight {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ee_meta {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.ee_themeWrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.ee_themeLabel {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.ee_themeSelect {
  min-width: 128px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  font-weight: 700;
  font-size: 13px;
}

.ee_stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}

.ee_step {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 9px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ee_step:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(20, 38, 65, 0.12);
}

.ee_step.ee_active {
  border-color: color-mix(in srgb, var(--primary), black 8%);
  background: color-mix(in srgb, var(--primary), white 80%);
}

.ee_step.ee_done {
  opacity: 0.92;
}

.ee_content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.ee_main {
  min-width: 0;
}

.ee_side {
  position: sticky;
  top: 12px;
}

.ee_cardBlock,
.ee_sideCard {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
}

.ee_sideStack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ee_h2 {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.3;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.ee_hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.ee_warningBlock {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #df948b;
  border-left: 4px solid #b53f31;
  border-radius: var(--radius-sm);
  background: #fff3f1;
}

.ee_warningTitle {
  font-size: 14px;
  font-weight: 800;
  color: #7f271d;
  margin-bottom: 6px;
}

.ee_warningText {
  font-size: 13px;
  line-height: 1.5;
  color: #6f3128;
}

.ee_formRow {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(220px, 560px);
  gap: 12px;
  align-items: center;
  margin: 10px 0;
}

.ee_formRow > :last-child {
  width: 100%;
  max-width: 560px;
}

.ee_label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.ee_input,
.ee_search,
.ee_themeSelect {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ee_input:focus,
.ee_search:focus,
.ee_themeSelect:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary), black 3%);
  box-shadow: 0 0 0 3px var(--focus);
}

.ee_tabs,
.ee_subtabs,
.ee_rowBtns,
.ee_sideActions,
.ee_sideNav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ee_tabs,
.ee_subtabs,
.ee_searchRow,
.ee_rowBtns {
  margin-bottom: 12px;
}

.ee_pickerControls {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-soft), white 30%);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.ee_tab,
.ee_subtab,
.ee_step,
.ee_primary,
.ee_ghost,
.ee_selDel,
.ee_slotDel,
.ee_slotCell {
  font-family: inherit;
}

.ee_tab,
.ee_subtab {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 700;
}

.ee_tab.ee_active,
.ee_subtab.ee_active {
  border-color: color-mix(in srgb, var(--primary), black 12%);
  background: color-mix(in srgb, var(--primary), white 84%);
}

.ee_searchRow {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ee_search {
  flex: 1;
}

.ee_quota {
  min-width: 72px;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.ee_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.ee_shapes,
.ee_rowsEditor {
  min-width: 0;
}

.ee_symCard,
.ee_shapeBtn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ee_symCard:hover,
.ee_shapeBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(14, 30, 52, 0.14);
}

.ee_symCard:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ee_symCard.ee_activeCard,
.ee_shapeBtn.ee_active {
  border-color: color-mix(in srgb, var(--primary), black 14%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary), white 72%);
}

.ee_thumb {
  width: 100%;
  height: 120px;
  object-fit: contain;
  display: block;
}

.ee_cap {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

.ee_sideTitle {
  font-weight: 800;
  margin-bottom: 10px;
}

.ee_rowsList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.ee_rowWrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--surface-soft);
}

.ee_rowWrap.ee_dragOverRow {
  border-color: color-mix(in srgb, var(--primary), black 10%);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary), white 75%);
}

.ee_rowGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  align-items: start;
}

.ee_rowGrid.ee_dense {
  gap: 8px;
}

.ee_rowGrid.ee_ultraDense {
  gap: 6px;
}

.ee_slotCell {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  background: white;
  min-width: 0;
}

.ee_slotCell.ee_activeSlot {
  border-color: color-mix(in srgb, var(--primary), black 8%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary), white 74%);
}

.ee_slotCell.ee_dragging {
  opacity: 0.7;
}

.ee_slotCell.ee_dragOverCell {
  outline: 2px solid color-mix(in srgb, var(--primary), black 5%);
  outline-offset: 1px;
}

.ee_emptySlot {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  display: grid;
  place-items: center;
  color: var(--muted);
}

.ee_slotName,
.ee_selName,
.ee_muted,
.ee_mono {
  color: var(--muted);
}

.ee_slotName {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.2;
  word-break: break-word;
}

.ee_rowGrid.ee_dense .ee_slotCell {
  padding: 7px;
}

.ee_rowGrid.ee_ultraDense .ee_slotCell {
  padding: 6px;
}

.ee_rowGrid.ee_dense .ee_slotThumb {
  width: 34px;
  height: 34px;
}

.ee_rowGrid.ee_ultraDense .ee_slotThumb {
  width: 30px;
  height: 30px;
}

.ee_rowGrid.ee_dense .ee_emptySlot {
  width: 40px;
  height: 40px;
}

.ee_rowGrid.ee_ultraDense .ee_emptySlot {
  width: 34px;
  height: 34px;
}

.ee_rowGrid.ee_dense .ee_slotDel {
  width: 28px;
  height: 28px;
  font-size: 16px;
}

.ee_rowGrid.ee_ultraDense .ee_slotDel {
  width: 24px;
  height: 24px;
  font-size: 14px;
}

.ee_rowGrid.ee_dense .ee_slotName {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.1;
}

.ee_rowGrid.ee_ultraDense .ee_slotName {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ee_slotName.ee_filledName {
  opacity: 0.92;
}

.ee_slotName.ee_emptyName {
  opacity: 0.55;
}

.ee_slotThumb {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}

.ee_slotTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ee_slotDel,
.ee_selDel,
.ee_ghost,
.ee_primary {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 700;
}

.ee_primary {
  border-color: color-mix(in srgb, var(--primary), black 8%);
  background: var(--primary);
  color: var(--primary-contrast);
}

.ee_slotDel {
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.ee_primary:disabled,
.ee_ghost:disabled,
.ee_slotDel:disabled,
.ee_selDel:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ee_ghost:hover,
.ee_primary:hover,
.ee_slotDel:hover,
.ee_selDel:hover {
  transform: translateY(-1px);
}

.ee_footerNav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.ee_previewBox {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.ee_svgHost svg {
  width: 100%;
  height: auto;
  display: block;
}

.ee_svgViewport {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
  background: color-mix(in srgb, var(--surface-soft), white 45%);
}

.ee_printSvgHost {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 180px;
}

.ee_printSvgHost svg {
  width: calc(var(--print-width-mm, 180mm) * var(--preview-scale, 1));
  max-width: none;
  height: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.ee_printSvgHost[data-print-preset="print"] svg {
  filter: grayscale(1) contrast(1.85) brightness(0.78);
}

.ee_printSvgHost svg.ee_draggingCanvas {
  cursor: grabbing;
}

.ee_editPanel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.ee_scaleRow {
  display: grid;
  grid-template-columns: 42px minmax(130px, 280px) 42px;
  gap: 8px;
  align-items: center;
}

.ee_tiny {
  padding: 8px 0;
  min-width: 42px;
}

.ee_shapeBox {
  margin: 10px 0;
}

.ee_shapeThumb {
  width: 100%;
  max-height: 120px;
  object-fit: contain;
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.ee_shapeThumbPlaceholder {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.ee_sideStatus {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  margin: 10px 0;
}

.ee_sideStatusRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.ee_selRow {
  display: grid;
  grid-template-columns: 40px 1fr 34px;
  gap: 10px;
  align-items: center;
}

.ee_selThumb {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 6px;
}

.ee_selRow.ee_draggable {
  grid-template-columns: 18px 40px 1fr 34px;
}

.ee_dragHandle {
  cursor: grab;
  user-select: none;
  opacity: 0.6;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ee_selRow.ee_draggable:active .ee_dragHandle {
  cursor: grabbing;
}

.ee_selRow.ee_dragOver {
  background: color-mix(in srgb, var(--primary), white 88%);
  outline: 2px solid color-mix(in srgb, var(--primary), black 5%);
  outline-offset: 2px;
}

.ee_selRow.ee_dragging {
  opacity: 0.75;
  outline: 2px solid rgba(0, 0, 0, 0.35);
  outline-offset: 2px;
}

@media (max-width: 1280px) {
  .ee_content {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

@media (max-width: 1100px) {
  #app {
    padding: 14px;
  }

  .ee_content {
    grid-template-columns: 1fr;
  }

  .ee_side {
    position: static;
  }
}

@media (max-width: 780px) {
  .ee_header {
    flex-direction: column;
    align-items: stretch;
  }

  .ee_headerRight {
    justify-content: space-between;
  }

  .ee_formRow {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ee_formRow > :last-child {
    max-width: none;
  }

  .ee_scaleRow {
    grid-template-columns: 42px 1fr 42px;
  }

  .ee_warningBlock {
    padding: 10px 12px;
  }
}

@media print {
  .ee_printSvgHost[data-print-preset="print"] svg {
    filter: grayscale(1) contrast(2.05) brightness(0.7);
  }

  body {
    background: #fff !important;
  }

  body::before,
  body::after {
    display: none !important;
  }

  .ee_header,
  .ee_stepper,
  .ee_side,
  .ee_footerNav,
  .ee_rowBtns,
  .ee_editPanel {
    display: none !important;
  }

  #app {
    padding: 0;
    max-width: none;
  }

  .ee_cardBlock {
    border: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }

  .ee_cardBlock > .ee_h2,
  .ee_cardBlock > .ee_hint {
    display: none !important;
  }

  .ee_previewBox {
    border: none;
    padding: 0;
    background: transparent;
  }

  .ee_svgViewport {
    border: none;
    padding: 0;
    overflow: visible;
    background: transparent;
  }

  .ee_printSvgHost svg {
    width: var(--print-width-mm, 180mm) !important;
    max-width: none !important;
  }
}




