.sve [hidden] { display: none !important; }

.sve-ctl { display: flex; flex-direction: column; gap: 26px; }
.sve-group { min-width: 0; }
.sve h3.tl-head { min-height: 24px; margin: 0 0 14px; }
.sve-hint { font: 400 12.5px/1 var(--font-ui); color: var(--gk-grey); }

.sve-drop { position: relative; }
.sve-drop__btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 84px; padding: 16px 18px;
  border: 1px dashed #cdd1d8; border-radius: 12px; background: #fff;
  font: inherit; color: inherit; text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.sve-drop__btn:hover { background: var(--gk-tint); border-color: #b8bdc6; }
.sve-drop__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sve-drop.is-dragover .sve-drop__btn { border-color: var(--brand); border-style: solid; background: rgb(35 71 255 / .05); }
.sve.is-loaded .sve-drop__btn { padding-right: 56px; }

.sve-drop__badge {
  flex: none; position: relative;
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 10px;
  background: #f2f3f5; color: var(--gk-soft);
}
.sve-drop__ico svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sve-drop.is-dragover .sve-drop__badge { background: rgb(35 71 255 / .1); color: var(--brand); }
.sve-drop__thumb {
  display: block; max-width: 38px; max-height: 30px; width: auto; height: auto;
  margin-top: -10px;
}
.sve-drop__tag {
  position: absolute; left: 50%; bottom: 5px; translate: -50% 0;
  font: 600 9px/1 var(--tl-mono); letter-spacing: .06em; color: var(--gk-grey);
}
.sve.is-loaded .sve-drop__badge {
  background:
    conic-gradient(#eef0f3 25%, #fff 0 50%, #eef0f3 0 75%, #fff 0) 0 0 / 10px 10px;
  box-shadow: inset 0 0 0 1px var(--gk-line);
}

.sve-drop__text { display: grid; gap: 5px; min-width: 0; }
.sve-drop__text strong { font: 500 14.5px/1.3 var(--font-ui); color: var(--ink-nav); overflow-wrap: anywhere; }
.sve-drop__text small { font: 400 12.5px/1.45 var(--font-ui); color: var(--gk-grey); }

.sve-drop__bin { position: absolute; top: 50%; right: 12px; translate: 0 -50%; }
.sve-drop__bin:hover { color: var(--tl-neg); }
.sve-file { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.sve-error { margin-top: 10px; }

.sve:not(.is-loaded) .sve-up { flex: 1; display: flex; flex-direction: column; }
.sve:not(.is-loaded) .sve-drop { flex: 1; display: flex; }
.sve:not(.is-loaded) .sve-drop__btn { flex-direction: column; justify-content: center; gap: 16px; min-height: 200px; padding: 28px 24px; text-align: center; }
.sve:not(.is-loaded) .sve-drop__text { justify-items: center; }

.sve-colors {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 8px;
  margin: 0; padding: 0; list-style: none;
}
.sve-swatch {
  display: block; width: 100%; aspect-ratio: 1; padding: 0;
  border: 0; border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgb(11 13 18 / .12);
  cursor: pointer;
  transition: outline-color .15s ease;
  outline: 2px solid transparent; outline-offset: 2px;
}
.sve-swatch:hover { outline-color: #d5d8de; }
.sve-swatch.is-active { outline-color: var(--brand); }
.sve-swatch:focus-visible { outline-color: var(--brand); }

.sve-edit {
  display: grid; gap: 12px;
  margin-top: 14px; padding: 12px;
  border-radius: 12px; background: var(--gk-tint); border: 1px solid var(--gk-line);
}
.sve-edit__field { background: #fff; }
.sve-edit__field input.tl-input { height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; }
.sve-edit__field input[type="color"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sve-presets { display: grid; grid-template-columns: repeat(8, minmax(0, 34px)); gap: 6px; }
.sve-preset {
  display: block; width: 100%; aspect-ratio: 1; padding: 0;
  border: 0; border-radius: 6px; background: var(--c);
  box-shadow: inset 0 0 0 1px rgb(11 13 18 / .12);
  cursor: pointer;
  outline: 2px solid transparent; outline-offset: 1px;
  transition: outline-color .15s ease;
}
.sve-preset:hover { outline-color: #d5d8de; }
.sve-preset:focus-visible { outline-color: var(--brand); }
.sve-none { padding: 12px 14px; border-radius: 10px; background: var(--gk-tint); font-size: 13px; color: var(--gk-soft); }

.sve-export__btns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.sve-export__btns .tl-btn { width: 100%; }
.sve-chev { order: 2; }
.tl-btn .sve-chev { width: 14px; height: 14px; transition: rotate .2s ease; }
.sve-export__more.is-open .sve-chev { rotate: 180deg; }

.sve-menu {
  display: grid; margin-top: 8px;
  border-radius: 10px; border: 1px solid var(--gk-line); background: #fff;
  overflow: hidden;
}
.sve-menu__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; height: 40px; padding: 0 14px;
  border: 0; border-top: 1px solid #f0f1f3; background: #fff;
  font: 500 13.5px/1 var(--font-ui); color: var(--ink-nav); text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.sve-menu__item:first-child { border-top: 0; }
.sve-menu__item:hover { background: var(--gk-tint); }
.sve-menu__item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.sve-menu__item.is-copied { color: var(--tl-pos); }
.sve-menu__meta { font: 400 12.5px/1 var(--tl-mono); color: var(--gk-grey); }

.sve-private { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; }
.sve-private svg { flex: none; width: 15px; height: 15px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

.sve-foot { margin-top: auto; padding-top: 20px; border-top: 1px solid #f0f1f3; }

.sve-view { display: flex; flex-direction: column; }
.sve-view h3.tl-head { margin-bottom: 14px; }
.sve-view__meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.sve-pill {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 9px;
  border-radius: 7px; background: #f2f3f5;
  font: 500 12px/1 var(--font-ui); color: var(--gk-soft);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.sve-stage {
  position: relative; flex: 1;
  width: 100%; min-height: 0; aspect-ratio: 1;
  border-radius: 12px; border: 1px solid var(--gk-line); overflow: hidden;
  background: conic-gradient(#eef0f3 25%, #fff 0 50%, #eef0f3 0 75%, #fff 0) 0 0 / 20px 20px;
  transition: border-color .15s ease;
}
.sve-stage.is-empty { cursor: pointer; }
.sve-stage.is-empty:hover { border-color: #cdd1d8; }
.sve-stage.is-dragover { border-color: var(--brand); outline: 1px solid var(--brand); outline-offset: -2px; }

.sve-canvas { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; }
.sve-img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; }

.sve-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center; pointer-events: none;
}
.sve-empty__ico {
  display: grid; place-items: center;
  width: 52px; height: 52px; margin-bottom: 4px;
  border-radius: 12px; background: #fff; border: 1px solid var(--gk-line); color: var(--gk-soft);
}
.sve-empty__ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sve-empty__title { padding: 2px 8px; border-radius: 6px; background: #fff; font: 500 15px/1.3 var(--font-ui); color: var(--ink-nav); }
.sve-empty small { padding: 2px 8px; border-radius: 6px; background: #fff; font: 400 12.5px/1.4 var(--font-ui); color: var(--gk-grey); }

.sve-dropping { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgb(35 71 255 / .05); pointer-events: none; }
.sve-dropping span {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: 999px; background: var(--brand); color: #fff;
  font: 500 14.5px/1 var(--font-ui);
}
.sve-dropping svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) {
  .sve:not(.is-loaded) .sve-drop__btn { min-height: 0; }
  .sve-stage { flex: none; }
}

@media (max-width: 420px) {
  .sve-export__btns { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .tl-btn .sve-chev { transition: none; }
}
