:root {
  --bg: #e6e6e6;
  --text: #111111;
  --btn-off: #d1d1d1;
  --btn-on: #101216;
  --btn-on-text: #ffffff;
  --global-topbar-h: 60px;
  --sidebar-w: 74px;
  --design-panel-w: clamp(280px, 19vw, 340px);
  --attrs-panel-w: clamp(280px, 18vw, 340px);
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: block;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

.global-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--global-topbar-h);
  background: #ffffff;
  border-bottom: 1px solid #d8d8d8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 10px;
  box-sizing: border-box;
  z-index: 1600;
}

.global-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.global-icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111;
  font-size: 22px;
  cursor: pointer;
}

.global-product-title {
  font-size: 30px;
  color: #1d1d1d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-price-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  margin-right: 6px;
  line-height: 1.05;
}

.global-price-value {
  font-size: 30px;
  color: #111111;
  font-weight: 700;
}

.global-cta {
  height: 38px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  padding: 0 16px;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
}

.global-cta.ghost {
  background: #f5f5f5;
  color: #111;
}

.global-cta.primary {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.layout {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: calc(100vw - var(--sidebar-w));
  margin-left: var(--sidebar-w);
  margin-top: var(--global-topbar-h);
  height: calc(100vh - var(--global-topbar-h));
  padding: 8px 8px 8px 0;
  box-sizing: border-box;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  background: #d0d0d0;
  border-radius: 0 0 8px 8px;
  padding: 10px 6px;
  position: fixed;
  left: 0;
  top: var(--global-topbar-h);
  height: calc(100vh - var(--global-topbar-h));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 1000;
}

.sidebar-bottom {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.tool-btn {
  width: 62px;
  min-height: 62px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.1;
}

.tool-btn.active {
  background: #ececec;
}

.tool-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tool-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  padding: 0;
  flex: 1 1 auto;
  margin: 0;
  width: auto;
  max-width: none;
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.top-toolbar {
  width: 100%;
  max-width: none;
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  background: #f0f0f0;
  box-sizing: border-box;
  flex: 0 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.tb-btn {
  min-width: 32px;
  height: 32px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #fff;
  color: #222;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  padding: 0 8px;
}

.tb-btn svg {
  width: 16px;
  height: 16px;
}

.tb-chip {
  height: 32px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #fff;
  color: #222;
  font-weight: 600;
  padding: 0 12px;
  cursor: pointer;
}

.tb-text-style {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tb-text-style.hidden {
  display: none;
}

.tb-style-block {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #fff;
  height: 32px;
  overflow: hidden;
}

.tb-style-btn {
  border: 0;
  background: transparent;
  color: #222;
  height: 100%;
  min-width: 28px;
  cursor: pointer;
  font-size: 18px;
}

#tbFontSizeInput {
  width: 44px;
  border: 0;
  border-left: 1px solid #e2e2e2;
  border-right: 1px solid #e2e2e2;
  text-align: center;
  font-size: 14px;
  height: 100%;
  outline: none;
  background: transparent;
  -moz-appearance: textfield;
}

#tbFontSizeInput::-webkit-outer-spin-button,
#tbFontSizeInput::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.tb-style-color {
  font-size: 21px;
  line-height: 1;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.tb-color-popover {
  position: fixed;
  width: 260px;
  background: #f6f6f4;
  border: 1px solid #d4d4cf;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  padding: 10px;
  box-sizing: border-box;
  z-index: 2600;
  display: none;
}

.tb-color-popover.open {
  display: block;
}

.tb-color-sv {
  position: relative;
  width: 100%;
  height: 146px;
  border-radius: 6px;
  overflow: hidden;
  cursor: crosshair;
  background: #ff0000;
}

.tb-color-sv-white,
.tb-color-sv-black {
  position: absolute;
  inset: 0;
}

.tb-color-sv-white {
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.tb-color-sv-black {
  background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
}

.tb-color-cursor {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
  transform: translate(-6px, -6px);
  pointer-events: auto;
  cursor: grab;
}

.tb-color-hue {
  width: 100%;
  margin-top: 10px;
  -webkit-appearance: none;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  outline: none;
  cursor: pointer;
}

.tb-color-hue::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #4a4a4a;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: grab;
}

.tb-color-hue:active::-webkit-slider-thumb {
  cursor: grabbing;
}

.tb-color-hue::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #4a4a4a;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: grab;
}

.tb-color-hue:active::-moz-range-thumb {
  cursor: grabbing;
}

.tb-color-hue::-moz-range-track {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}

.tb-color-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 38px;
  gap: 6px;
  align-items: center;
}

.tb-color-preview {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #cdcdc8;
  background: #000;
}

.tb-color-hex-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #cdcdc8;
  border-radius: 6px;
  background: #efefec;
  height: 38px;
  min-width: 0;
  overflow: hidden;
}

.tb-color-hex-wrap span {
  width: 28px;
  text-align: center;
  color: #666;
}

#tbColorHexInput {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 18px;
  color: #3a3a2a;
}

.tb-color-eye {
  border: 1px solid #cdcdc8;
  border-radius: 6px;
  background: #efefec;
  height: 38px;
  cursor: pointer;
  font-size: 16px;
}

.workspace {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  flex: 1 1 auto;
  width: auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
  padding: 0;
  box-sizing: border-box;
}

.panel-close-rail {
  position: absolute;
  left: var(--design-panel-w);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 86px;
  border: 0;
  border-radius: 6px 0 0 6px;
  background: #e2e2e2;
  color: #2b2b2b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 20;
  display: none;
}

.panel-close-rail.visible {
  display: block;
}

.panel {
  width: var(--design-panel-w);
  flex: 0 0 var(--design-panel-w);
  min-height: 0;
  height: 100%;
  border-radius: 8px;
  background: #e9e9e9;
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.panel.active {
  display: flex;
}

.settings-title {
  font-size: 34px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid #d3d3d3;
}

.settings-row {
  padding-bottom: 12px;
  border-bottom: 1px solid #dcdcdc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-row label {
  font-size: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-note {
  font-size: 13px;
  color: #4f4f4f;
}

.settings-reset-btn {
  margin-top: auto;
  border: 1px solid #5f5f5f;
  border-radius: 8px;
  background: #f2f2f2;
  color: #1f1f1f;
  padding: 12px 14px;
  font-size: 16px;
  cursor: pointer;
}

.panel-upload-btn {
  border: 0;
  border-radius: 10px;
  padding: 12px;
  background: #0e1116;
  color: #fff;
  font-weight: 600;
  font-size: 26px;
  cursor: pointer;
}

.panel-tabs {
  display: flex;
  border-bottom: 1px solid #cfcfcf;
}

.panel-tab {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 26px;
  color: #666;
  padding: 8px 0;
  cursor: pointer;
}

.panel-tab.active {
  color: #1a1a1a;
  border-bottom: 2px solid #232323;
  font-weight: 600;
}

.help-head {
  font-size: 34px;
  font-weight: 700;
}

.help-tour-btn {
  width: 100%;
  border: 1px solid #2f2f2f;
  border-radius: 999px;
  background: #f5f5f5;
  color: #151515;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
}

.help-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cecece;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 16px;
  background: #f6f6f6;
  color: #222;
}

.help-tabs {
  display: flex;
  border-bottom: 1px solid #cfcfcf;
  gap: 6px;
}

.help-tab {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: #5a5a5a;
  padding: 10px 8px;
  text-transform: uppercase;
  cursor: pointer;
}

.help-tab.active {
  color: #111;
  border-bottom: 2px solid #111;
  font-weight: 700;
}

.help-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: auto;
  min-height: 0;
}

.help-item {
  padding: 14px 0;
  border-bottom: 1px solid #d9d9d9;
}

.help-item:last-child {
  border-bottom: 0;
}

.help-item-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: #141414;
  line-height: 1.25;
}

.help-item-body {
  margin: 0 0 10px 0;
  font-size: 15px;
  color: #4f4f4f;
  line-height: 1.35;
}

.help-item-link {
  border: 1px solid #cfcfcf;
  background: #f8f8f8;
  color: #151515;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid #d9d9d9;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #d9d9d9;
}

.shortcut-name {
  font-size: 17px;
  color: #000000;
  font-weight: 700;
}

.shortcut-key {
  font-size: 17px;
  color: #6f6f6f;
  font-weight: 400;
  text-align: right;
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.tab-content.active {
  display: flex;
}

.section-title {
  font-size: 34px;
  font-weight: 600;
  margin-top: 4px;
}

.folder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 30px;
  color: #2a2a2a;
}

.folder-plus {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  border: 1px dashed #b7b7b7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.upload-drop {
  margin-top: 22px;
  border: 2px dashed #b9b9b9;
  border-radius: 12px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  color: #1f1f1f;
  font-size: 32px;
  padding: 18px;
  background: #f0f0f0;
  cursor: pointer;
}

.upload-drop small {
  color: #777;
  font-size: 26px;
}

.upload-drop.dragover {
  border-color: #222;
  background: #f5f5f5;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.history-item {
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  background: #f7f7f7;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px;
  cursor: pointer;
}

.history-item img {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  background: #ddd;
}

.history-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 22px;
}

.panel-image-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
}

.panel-image-head .panel-upload-btn {
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 8px;
}

.image-library-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  min-height: 180px;
}

.image-library-item {
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  background: #f7f7f7;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  cursor: pointer;
}

.image-library-item img {
  width: 100%;
  height: 110px;
  border-radius: 6px;
  object-fit: contain;
  background: #e4e4e4;
}

.image-library-item span {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.requirements {
  margin-top: auto;
  border-radius: 8px;
  background: #efefef;
  padding: 12px;
  color: #1c1c1c;
  font-size: 19px;
  line-height: 1.5;
}

.requirements h4 {
  margin: 0 0 6px 0;
  font-size: 30px;
}

.text-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
}

.text-close {
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  color: #333;
  cursor: pointer;
}

.text-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 16px;
  background: #f1f1ec;
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid #c8c8c8;
  background: #f3f3ee;
  color: #222;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}

.chip.active {
  border-color: #8f8f8f;
  background: #e7e7de;
  font-weight: 600;
}

.font-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.font-section {
  border: 1px solid #d3d3cf;
  border-radius: 8px;
  background: #f4f4f1;
  padding: 8px;
}

.font-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #494949;
  margin-bottom: 8px;
  letter-spacing: 0.4px;
}

.font-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.font-block-btn {
  border: 1px solid #d0d0cb;
  background: #ffffff;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1;
  color: #181818;
  cursor: pointer;
}

.font-block-btn.active {
  border-color: #111;
  background: #e8e8e2;
}

.font-accordion {
  flex: 1;
  min-height: 0;
  border: 1px solid #d5d5d0;
  border-radius: 8px;
  background: #f8f8f6;
  padding: 6px;
  overflow: auto;
  box-sizing: border-box;
}

.font-accordion-section + .font-accordion-section {
  margin-top: 8px;
}

.font-section-toggle {
  width: 100%;
  border: 1px solid #d1d1cc;
  border-radius: 6px;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  cursor: pointer;
}

.font-section-arrow {
  font-size: 14px;
  color: #444;
}

.font-section-list {
  display: none;
  margin-top: 6px;
  flex-direction: column;
  gap: 2px;
}

.font-section-list.open {
  display: flex;
}

.font-option-row {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 15px;
  line-height: 1.2;
  color: #181818;
  cursor: pointer;
  text-align: left;
}

.font-option-row:hover {
  background: #eeeeea;
}

.font-option-row.active {
  background: #e3e3dd;
  font-weight: 600;
}

.curved-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.curve-card {
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  background: #f8f8f6;
  min-height: 72px;
  padding: 6px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.font-block-title {
  font-size: 15px;
  font-weight: 700;
  margin-top: 6px;
}

.font-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 300px;
  overflow: auto;
  padding-right: 2px;
}

.font-item {
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 18px;
  color: #171717;
}

.font-item:hover {
  background: #ecece6;
}

.font-item.active {
  background: #e2e2da;
}

.product-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #cfcfcf;
  padding-bottom: 10px;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.product-tabs span {
  color: #666;
}

.product-tabs .active {
  color: #111;
  border-bottom: 2px solid #111;
  padding-bottom: 8px;
}

.product-name {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.product-id {
  color: #7b7b7b;
  font-size: 14px;
}

.product-section-title {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.swatch.active {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.selected-color {
  align-self: flex-start;
  background: #111;
  color: #fff;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 14px;
}

.product-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  margin-top: 8px;
}

.product-ref {
  color: #666;
  font-size: 14px;
}

.product-tech-note {
  color: #666;
  font-style: italic;
  font-size: 14px;
  line-height: 1.4;
  margin-top: 4px;
}

.product-guideline-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  color: #333;
}

.editor-wrap {
  position: relative;
  width: 100%;
  max-width: none;
  margin-left: 0;
  flex: 1 1 auto;
  min-height: 0;
  background: #d7d7d2;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.editor {
  display: none;
  width: 100%;
  height: 100%;
  background: #d7d7d2;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.editor.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle {
  display: inline-flex;
  align-self: center;
  gap: 8px;
  padding: 6px;
  border-radius: 10px;
  background: transparent;
}

.toggle-btn {
  border: 0;
  background: var(--btn-off);
  color: #222;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 24px;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease;
}

.toggle-btn.active {
  background: var(--btn-on);
  color: var(--btn-on-text);
}

.toggle-btn:active {
  transform: translateY(1px);
}

.actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.actions button {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  background: #111;
  color: #fff;
  cursor: pointer;
}

.attrs-panel {
  position: relative;
  right: auto;
  top: auto;
  width: var(--attrs-panel-w);
  flex: 0 0 var(--attrs-panel-w);
  height: calc(100vh - var(--global-topbar-h) - 16px);
  border-radius: 8px;
  background: #e9e9e9;
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 900;
}

.attrs-panel h3 {
  margin: 0;
  font-size: 32px;
}

.attrs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attrs-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.attrs-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  background: #f2f2ef;
  padding: 6px 8px;
}

.attrs-input-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.attrs-input-wrap span {
  color: #666;
  font-size: 13px;
}

.layers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.layer-item {
  border: 1px solid #cccccc;
  border-radius: 8px;
  background: #f6f6f4;
  padding: 8px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 8px;
}

.layer-item-selected {
  border-color: #8a8a8a;
  background: #ecece8;
}

.layer-thumb-wrap {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  border: 1px solid #d3d3d3;
  background-color: transparent;
  background-image:
    linear-gradient(45deg, #ececec 25%, transparent 25%),
    linear-gradient(-45deg, #ececec 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ececec 75%),
    linear-gradient(-45deg, transparent 75%, #ececec 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.layer-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.layer-title {
  font-size: 14px;
  font-weight: 600;
}

.layer-meta {
  font-size: 12px;
  color: #666;
}

.layer-actions {
  display: flex;
  gap: 4px;
}

.layer-btn {
  border: 1px solid #cdcdcd;
  background: #ffffff;
  color: #222;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.layer-btn svg {
  width: 16px;
  height: 16px;
}

.exit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.exit-modal-overlay.open {
  display: flex;
}

.exit-modal {
  width: min(680px, calc(100vw - 24px));
  border-radius: 12px;
  background: #f5f5f5;
  border: 1px solid #d6d6d6;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.exit-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 12px;
  border-bottom: 1px solid #dadada;
}

.exit-modal-head h3 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
}

.exit-modal-close {
  border: 0;
  background: transparent;
  color: #555;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.exit-modal-body {
  padding: 20px 22px;
  font-size: 17px;
  color: #3a3a3a;
  line-height: 1.45;
}

.exit-modal-actions {
  padding: 14px 16px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.exit-btn {
  border-radius: 8px;
  border: 1px solid #cfcfcf;
  background: #f7f7f7;
  color: #222;
  height: 38px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.exit-btn.save {
  background: #1a1b1d;
  border-color: #1a1b1d;
  color: #fff;
}











