/* Crosswave Live Web Editor - native app shell */
@font-face { font-family: "Pretendard"; font-weight: 400; font-style: normal; src: url("/public/fonts/Pretendard-Regular.otf") format("opentype"); }
@font-face { font-family: "Pretendard"; font-weight: 600; font-style: normal; src: url("/public/fonts/Pretendard-SemiBold.otf") format("opentype"); }
@font-face { font-family: "Pretendard"; font-weight: 700; font-style: normal; src: url("/public/fonts/Pretendard-Bold.otf") format("opentype"); }
@font-face { font-family: "Pretendard"; font-weight: 800; font-style: normal; src: url("/public/fonts/Pretendard-ExtraBold.otf") format("opentype"); }
@font-face { font-family: "NanumGothic"; font-weight: 400; font-style: normal; src: url("/public/fonts/NanumGothic-Regular.ttf") format("truetype"); }
@font-face { font-family: "NanumGothic"; font-weight: 700; font-style: normal; src: url("/public/fonts/NanumGothic-Bold.ttf") format("truetype"); }
@font-face { font-family: "NanumGothic"; font-weight: 800; font-style: normal; src: url("/public/fonts/NanumGothic-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: "Nanum Gothic"; font-weight: 400; font-style: normal; src: url("/public/fonts/NanumGothic-Regular.ttf") format("truetype"); }
@font-face { font-family: "Nanum Gothic"; font-weight: 700; font-style: normal; src: url("/public/fonts/NanumGothic-Bold.ttf") format("truetype"); }
@font-face { font-family: "Nanum Gothic"; font-weight: 800; font-style: normal; src: url("/public/fonts/NanumGothic-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: "NanumMyeongjo"; font-weight: 400; font-style: normal; src: url("/public/fonts/NanumMyeongjo-Regular.ttf") format("truetype"); }
@font-face { font-family: "NanumMyeongjo"; font-weight: 700; font-style: normal; src: url("/public/fonts/NanumMyeongjo-Bold.ttf") format("truetype"); }
@font-face { font-family: "NanumMyeongjo"; font-weight: 800; font-style: normal; src: url("/public/fonts/NanumMyeongjo-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: "Nanum Myeongjo"; font-weight: 400; font-style: normal; src: url("/public/fonts/NanumMyeongjo-Regular.ttf") format("truetype"); }
@font-face { font-family: "Nanum Myeongjo"; font-weight: 700; font-style: normal; src: url("/public/fonts/NanumMyeongjo-Bold.ttf") format("truetype"); }
@font-face { font-family: "Nanum Myeongjo"; font-weight: 800; font-style: normal; src: url("/public/fonts/NanumMyeongjo-ExtraBold.ttf") format("truetype"); }

:root {
  color-scheme: dark;
  --line-soft: rgba(26, 143, 255, 0.1);
  --line-strong: rgba(26, 143, 255, 0.2);
  --text: #ffffff;
  --muted: #94a3b8;
  --accent: #1a8fff;
  --accent-strong: #4fb3ff;
  --preview: #4fb3ff;
  --green: #4fb3ff;
  --red: #f87171;
  --panel: rgba(9, 9, 9, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.022);
  --part-accent: #50627d;
  --part-accent-soft: #50627d;
  --thumb-columns: 4;
  --show-sidebar-width: 246px;
  --show-tools-width: 336px;
  --media-dock-height: 216px;
  --topbar-left-width: var(--show-sidebar-width);
  --font-ui: "SF Pro Display", "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  --text2: var(--muted);
  --text3: rgba(255, 255, 255, 0.52);
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 143, 255, 0.28) transparent;
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    radial-gradient(ellipse at 6% 0%, rgba(26, 143, 255, 0.10), transparent 32%),
    radial-gradient(ellipse at 94% 5%, rgba(79, 179, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #0a0a0e 0%, #0c0c10 46%, #0a0a0e 100%);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

input,
textarea,
[contenteditable="true"],
[data-role="edit-text"] {
  -webkit-user-select: text;
  user-select: text;
}

button {
  border: 0;
  color: inherit;
}

textarea {
  resize: none;
}

[hidden] {
  display: none !important;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(26, 143, 255, 0.28);
  background-clip: padding-box;
}

/* PIN */
#pin-screen {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(26, 143, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #090a0d 0%, #050607 100%);
}

.pin-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.022)),
    rgba(9, 9, 9, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.pin-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: rgba(26, 143, 255, 0.18);
  color: var(--accent-strong);
  font-weight: 900;
}

.pin-card h1 {
  margin: 0;
  font-size: 1.26rem;
  font-weight: 900;
}

.pin-card p {
  margin: 7px 0 22px;
  color: var(--muted);
  font-size: 0.78rem;
}

.pin-input-group {
  margin-top: 14px;
}

.pin-field-label,
.form-label {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.68rem;
  font-weight: 800;
}

.pin-input-wrap input,
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(220, 240, 255, 0.09);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  outline: none;
}

.pin-input-wrap input:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.center-title-input:focus,
.bible-version-select:focus,
.bible-ref-input:focus {
  border-color: rgba(26, 143, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(26, 143, 255, 0.18);
}

.pin-remember-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.pin-remember-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-strong);
  cursor: pointer;
}

#pin-input {
  text-align: center;
  font-size: 1.18rem;
  font-weight: 900;
}

.pin-error {
  min-height: 22px;
  margin-top: 10px;
  color: #ff8b85;
  font-size: 0.7rem;
  font-weight: 800;
}

.btn-primary {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(26, 143, 255, 0.38);
  border-radius: 8px;
  background: rgba(26, 143, 255, 0.28);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

/* Native app shell */
#app {
  display: none;
}

#app.is-visible {
  display: grid;
}

.app-shell {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 10px;
}

.topbar {
  position: relative;
  z-index: 2000;
  display: grid;
  grid-template-columns: max(180px, var(--topbar-left-width)) minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(22px, 2.4vw, 42px);
  row-gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.022)),
    rgba(9, 9, 9, 0.94);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.022);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-block strong {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-editor-tag {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.mode-bar,
.mode-switch,
.source-mode-switch,
.template-mode-switch,
.topbar-actions,
.show-actions,
.sidebar-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-bar {
  justify-self: start;
  min-width: 0;
  flex-wrap: nowrap;
  gap: clamp(34px, 3vw, 48px);
}

.mode-switch,
.source-mode-switch,
.template-mode-switch {
  gap: 0;
  width: max-content;
  min-width: max-content;
  padding: 2px 0 0;
  border-bottom: 1px solid rgba(220, 240, 255, 0.08);
  white-space: nowrap;
}

.mode-button,
.secondary-button {
  cursor: pointer;
  user-select: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.mode-button {
  min-width: 68px;
  padding: 8px 14px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.mode-button.is-active {
  border-bottom-color: rgba(26, 143, 255, 0.9);
  color: #ffffff;
}

.mode-button:disabled {
  color: rgba(255, 255, 255, 0.56);
  cursor: default;
}

.topbar-actions {
  justify-self: end;
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.output-config-quick-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 180px;
  min-width: 92px;
  min-height: 40px;
  padding: 8px 12px 10px;
  color: #ffffff;
  text-align: center;
}

.output-config-quick-button span,
.output-config-quick-button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.output-config-quick-button span {
  font-weight: 700;
}

.output-config-quick-button strong {
  font-size: 0.78rem;
}

.output-status-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.output-status-capsule {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.62rem;
  font-weight: 900;
}

.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(220, 240, 255, 0.07);
  border-radius: 999px;
  background: rgba(220, 240, 255, 0.045);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.connection-dot.is-connected {
  background: #74f29b;
}

.workspace {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 0;
}

.show-workspace {
  display: grid;
  grid-template-columns: var(--show-sidebar-width) 10px minmax(0, 1fr) 10px var(--show-tools-width);
  gap: 0;
  min-height: 0;
}

.library-sidebar {
  position: relative;
  display: grid;
  grid-template-rows: minmax(88px, var(--web-library-pane-height, 140px)) 6px minmax(88px, var(--web-playlist-pane-height, 140px)) 6px minmax(0, 1fr);
  gap: 0;
  min-height: 0;
}

.sidebar-block {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 4px;
  min-height: 0;
  padding: 7px 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.022)),
    rgba(9, 9, 9, 0.94);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.items-block {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(220, 240, 255, 0.018)),
    rgba(11, 11, 11, 0.94);
}

.sidebar-section-resizer,
.show-sidebar-resizer,
.show-tools-resizer {
  position: relative;
}

.sidebar-section-resizer {
  cursor: row-resize;
}

.sidebar-section-resizer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112px;
  height: 3px;
  border-radius: 999px;
  background: rgba(204, 232, 255, 0.18);
  transform: translate(-50%, -50%);
  transition: background 0.16s ease, width 0.16s ease;
}

.sidebar-section-resizer:hover::before,
.sidebar-section-resizer.is-dragging::before {
  width: 148px;
  background: rgba(79, 179, 255, 0.68);
}

.show-sidebar-resizer::before,
.show-tools-resizer::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 3px;
  height: 112px;
  border-radius: 999px;
  background: rgba(204, 232, 255, 0.18);
  transform: translateY(-50%);
  transition: background 0.16s ease, height 0.16s ease;
}

.show-sidebar-resizer,
.show-tools-resizer {
  cursor: col-resize;
}

.show-sidebar-resizer:hover::before,
.show-sidebar-resizer.is-dragging::before,
.show-tools-resizer:hover::before,
.show-tools-resizer.is-dragging::before {
  height: 148px;
  background: rgba(79, 179, 255, 0.68);
}

body.is-resizing-sidebar {
  cursor: col-resize;
  user-select: none;
}

body.is-resizing-show-tools {
  cursor: col-resize;
  user-select: none;
}

body.is-resizing-slide-pane,
body.is-resizing-live-sidebar-pane {
  cursor: row-resize;
  user-select: none;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px;
}

.sidebar-head-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.simple-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.edit-pane-subtitle {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.68rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 1px 5px;
  border: 1px solid rgba(220, 240, 255, 0.07);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--muted);
  font-size: 0.6rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(26, 143, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.022);
  color: rgba(255, 255, 255, 0.84);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.sidebar-list {
  display: grid;
  align-content: start;
  gap: 1px;
  min-height: 0;
  overflow: auto;
  padding: 0 4px 2px;
  -webkit-user-select: none;
  user-select: none;
}

.sidebar-item {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(220, 240, 255, 0.02);
  color: var(--text);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-item.is-selected {
  border-color: rgba(26, 143, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(79, 179, 255, 0.08);
}

.sidebar-item-index {
  position: relative;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(220, 240, 255, 0.1);
  border-radius: 3px;
  background: rgba(220, 240, 255, 0.04);
}

.library-mark {
  border-color: rgba(79, 179, 255, 0.18);
  background: rgba(79, 179, 255, 0.08);
}

.playlist-mark {
  border-color: rgba(26, 143, 255, 0.18);
}

.library-mark::before,
.playlist-mark::before,
.item-mark::before {
  content: "";
  position: absolute;
}

.library-mark::before,
.playlist-mark::before {
  inset: 3px;
  border-radius: 3px;
  background: rgba(79, 179, 255, 0.85);
}

.item-mark {
  border: 0;
  background: transparent;
}

.item-mark::before {
  inset: 2px 2px 2px 4px;
  background: rgba(239, 234, 225, 0.74);
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

.sidebar-item-copy {
  display: grid;
  align-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 0;
}

.sidebar-item-copy strong,
.sidebar-item-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-item-copy strong {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15;
}

.sidebar-item-copy small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.63rem;
  line-height: 1.05;
}

.sidebar-item.is-selected .sidebar-item-copy small {
  color: rgba(255, 255, 255, 0.76);
}

.items-list .sidebar-item {
  grid-template-columns: 12px minmax(0, 1fr);
  min-height: 26px;
  padding: 3px 7px;
  border-radius: 7px;
}

.items-list .sidebar-item-copy small {
  display: none;
}

.sidebar-empty {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
  text-align: center;
}

.sidebar-filter {
  margin-top: auto;
  padding: 4px 7px 1px;
  border-top: 1px solid rgba(220, 240, 255, 0.05);
}

.filter-shell {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(220, 240, 255, 0.06);
  border-radius: 8px;
  background: rgba(11, 11, 11, 0.38);
}

.filter-icon {
  position: relative;
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(204, 232, 255, 0.52);
  border-radius: 999px;
}

.filter-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: 0;
  width: 5px;
  height: 1.5px;
  border-radius: 999px;
  background: rgba(204, 232, 255, 0.52);
  transform: rotate(40deg);
}

.filter-shell input {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 0.72rem;
}

.studio-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  padding: 4px 8px 2px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.022), transparent 28%),
    linear-gradient(180deg, rgba(220, 240, 255, 0.03), rgba(220, 240, 255, 0.012)),
    rgba(11, 11, 11, 0.9);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.show-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 2px 6px 0;
}

.show-header {
  position: relative;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid rgba(220, 240, 255, 0.08);
  border-radius: 8px;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(220, 240, 255, 0.035), rgba(220, 240, 255, 0.014)),
    rgba(9, 9, 9, 0.3);
}

.show-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.show-copy h1,
.center-title-input {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: clamp(0.86rem, 1.02vw, 1.06rem);
  font-weight: 900;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.center-title-input {
  width: 100%;
  padding: 4px 0;
  border: 0;
  background: transparent;
  outline: none;
}

.secondary-button {
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid rgba(220, 240, 255, 0.07);
  border-radius: 8px;
  background: rgba(220, 240, 255, 0.05);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.secondary-button.is-accent,
.secondary-button:hover {
  border-color: rgba(26, 143, 255, 0.36);
  background: rgba(26, 143, 255, 0.14);
}

.slide-canvas {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 6px;
  min-width: 0;
  min-height: 0;
}

.slide-grid {
  display: grid;
  grid-template-columns: repeat(var(--thumb-columns), minmax(0, 1fr));
  grid-auto-rows: max-content;
  gap: 14px;
  align-content: start;
  align-items: start;
  min-height: 0;
  overflow: auto;
  padding: 0 2px 0 0;
}

.slide-grid.is-empty {
  grid-template-columns: 1fr;
}

.slide-grid-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.slide-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(220, 240, 255, 0.08);
  border-radius: 6px;
  background: rgba(9, 9, 9, 0.42);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  user-select: none;
}

.slide-card-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #0b0c0e;
  background-image:
    linear-gradient(45deg, #111 25%, transparent 25%),
    linear-gradient(-45deg, #111 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #111 75%),
    linear-gradient(-45deg, transparent 75%, #111 75%);
  background-size: 26px 26px;
  background-position: 0 0, 0 13px, 13px -13px, -13px 0;
}

.web-stage-preview {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  container-type: size;
}

.web-stage-preview .live-stage-background {
  position: absolute;
  inset: 0;
  opacity: 1;
}

.web-stage-preview .live-stage-background.is-midnight,
.web-stage-preview .live-stage-background.is-checker {
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
    linear-gradient(180deg, #0e0e0e 0%, #0d0d0d 100%);
  background-position: 0 0, 10px 10px, 0 0;
  background-size: 20px 20px, 20px 20px, cover;
}

.web-stage-preview .live-stage-background.is-aurora {
  background:
    radial-gradient(circle at 18% 18%, rgba(113, 173, 142, 0.78), transparent 36%),
    radial-gradient(circle at 82% 20%, rgba(79, 179, 255, 0.48), transparent 30%),
    radial-gradient(circle at 84% 74%, rgba(226, 142, 118, 0.32), transparent 30%),
    linear-gradient(135deg, #0d0d0d 0%, #20312c 46%, #38231e 100%);
}

.web-stage-preview .live-stage-background.is-cinema-red {
  background: linear-gradient(135deg, #100607 0%, #3e1614 44%, #1d0b0d 100%);
}

.web-stage-preview .live-stage-background.is-cinema-blue {
  background: linear-gradient(135deg, #0d0d0d 0%, #173136 45%, #244e53 100%);
}

.web-stage-preview .live-stage-background.is-prompter-black {
  background: #000;
}

.web-stage-preview .stage-item-canvas {
  position: absolute;
  inset: 0;
  container-type: size;
}

.web-stage-preview .stage-item-canvas-background {
  z-index: 0;
  pointer-events: none;
}

.web-stage-preview .stage-item-canvas-web-preview {
  z-index: 1;
}

.edit-canvas-stage-frame .web-edit-marquee-surface {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: default;
  pointer-events: auto;
}

.edit-canvas-stage-frame .stage-item-canvas-web-preview {
  z-index: 2;
  pointer-events: none;
}

.web-stage-preview .stage-item {
  position: absolute;
  z-index: var(--item-z, 1);
  left: calc((var(--item-x, 0) / 1920) * 100%);
  top: calc((var(--item-y, 0) / 1080) * 100%);
  width: calc((var(--item-w, 320) / 1920) * 100%);
  height: calc((var(--item-h, 120) / 1080) * 100%);
  overflow: visible;
  transform: rotate(var(--item-rotation, 0deg));
  transform-origin: center center;
}

.web-stage-preview .stage-item-rotator {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.web-stage-preview .stage-item-shape-container .stage-item-rotator {
  overflow: visible;
}

.web-stage-preview .stage-item-text {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.web-stage-preview .stage-item-text-content,
.web-stage-preview .stage-item-text-lines {
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--item-font-family, var(--font-ui));
  font-size: calc((var(--item-font-size, 64) / 1920) * 100cqw);
  letter-spacing: calc((var(--item-letter-spacing, 0) / 1920) * 100cqw);
  line-height: var(--item-line-height, 1.16);
  font-weight: var(--item-font-weight, 800);
  color: var(--item-color, #ffffff);
  text-shadow: var(--item-shadow-offset-x, 0px) var(--item-shadow-offset-y, 0px) var(--item-shadow-blur, 0px) var(--item-shadow-color, rgba(0, 0, 0, 0));
  -webkit-text-stroke: var(--item-outline-width, 0px) var(--item-outline-color, transparent);
  paint-order: stroke fill;
}

.web-stage-preview .stage-item-text-editor {
  width: 100%;
  flex: 0 0 auto;
  min-height: 0;
  outline: none;
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
  white-space: pre-wrap;
  font-family: var(--item-font-family, var(--font-ui));
  font-size: calc((var(--item-font-size, 64) / 1920) * 100cqw);
  letter-spacing: calc((var(--item-letter-spacing, 0) / 1920) * 100cqw);
  line-height: var(--item-line-height, 1.16);
  font-weight: var(--item-font-weight, 800);
  color: var(--item-color, #ffffff);
  text-shadow: var(--item-shadow-offset-x, 0px) var(--item-shadow-offset-y, 0px) var(--item-shadow-blur, 0px) var(--item-shadow-color, rgba(0, 0, 0, 0));
  -webkit-text-stroke: var(--item-outline-width, 0px) var(--item-outline-color, transparent);
  paint-order: stroke fill;
  cursor: text;
}

.web-stage-preview .stage-item-text-editor-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  -webkit-text-stroke: 0 transparent;
  caret-color: var(--item-color, #ffffff);
}

.web-stage-preview .stage-item-text.has-lineonly .stage-item-text-editor-overlay {
  transform: translateX(var(--item-lineonly-offset-x, 0px));
}

.edit-canvas-stage-frame .stage-item.is-selected .stage-item-text-editor,
.edit-canvas-stage-frame .stage-item.is-selected .stage-item-text-editor-overlay {
  width: 100%;
  min-height: 0;
  margin: 0;
}

.web-stage-preview .stage-item-text-lines {
  display: flex;
  flex-direction: column;
  gap: var(--item-lineonly-gap-y, 0px);
  max-width: 100%;
  pointer-events: none;
  transform: translateX(var(--item-lineonly-offset-x, 0px));
}

.web-stage-preview .stage-item-text-line {
  display: flex;
  box-sizing: border-box;
  background: var(--item-lineonly-bg, #000);
  padding: var(--item-lineonly-pad-y, 0px) var(--item-lineonly-pad-x, 0px);
}

.web-stage-preview .stage-item-text-line-copy {
  display: block;
  min-width: 0;
  white-space: pre-wrap;
}

.web-stage-preview .stage-item-text-lines.mode-line,
.web-stage-preview .stage-item-text-lines.mode-max {
  width: max-content;
  max-width: 100%;
}

.web-stage-preview .stage-item-text-lines.mode-full {
  width: 100%;
  align-self: stretch;
}

.web-stage-preview .stage-item-text.align-left .stage-item-text-content,
.web-stage-preview .stage-item-text.align-left .stage-item-text-editor,
.web-stage-preview .stage-item-text.align-left .stage-item-text-line-copy {
  text-align: left;
}

.web-stage-preview .stage-item-text.align-center .stage-item-text-content,
.web-stage-preview .stage-item-text.align-center .stage-item-text-editor,
.web-stage-preview .stage-item-text.align-center .stage-item-text-line-copy {
  text-align: center;
}

.web-stage-preview .stage-item-text.align-right .stage-item-text-content,
.web-stage-preview .stage-item-text.align-right .stage-item-text-editor,
.web-stage-preview .stage-item-text.align-right .stage-item-text-line-copy {
  text-align: right;
}

.web-stage-preview .stage-item-text.align-left .stage-item-text-lines.mode-line,
.web-stage-preview .stage-item-text.align-left .stage-item-text-lines.mode-max {
  align-items: flex-start;
  align-self: flex-start;
}

.web-stage-preview .stage-item-text.align-center .stage-item-text-lines.mode-line,
.web-stage-preview .stage-item-text.align-center .stage-item-text-lines.mode-max {
  align-items: center;
  align-self: center;
}

.web-stage-preview .stage-item-text.align-right .stage-item-text-lines.mode-line,
.web-stage-preview .stage-item-text.align-right .stage-item-text-lines.mode-max {
  align-items: flex-end;
  align-self: flex-end;
}

.web-stage-preview .stage-item-text.valign-top {
  justify-content: flex-start;
}

.web-stage-preview .stage-item-text.valign-middle {
  justify-content: center;
}

.web-stage-preview .stage-item-text.valign-bottom {
  justify-content: flex-end;
}

.web-stage-preview .stage-item-shape {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: var(--item-opacity, 1);
}

.web-stage-preview .stage-item-shape-fill {
  position: absolute;
  inset: 0;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  background: var(--item-fill, #ffff00);
  border: 0;
  border-radius: calc((var(--item-radius, 0) / 1920) * 100cqw);
  filter: blur(var(--item-feather-blur, 0px));
  -webkit-mask-image: var(--item-feather-mask-image, none);
  mask-image: var(--item-feather-mask-image, none);
  transform: translateZ(0);
}

.web-stage-preview .stage-item-shape-stroke {
  position: absolute;
  inset: 0;
  z-index: 2;
  box-sizing: border-box;
  display: block;
  width: auto;
  height: auto;
  background: transparent;
  border: var(--item-stroke-width, 0px) solid var(--item-stroke-color, transparent);
  border-radius: calc((var(--item-radius, 0) / 1920) * 100cqw);
  pointer-events: none;
  transform: translateZ(0);
}

.web-stage-preview .stage-item-shape.shape-kind-rect .stage-item-shape-fill,
.web-stage-preview .stage-item-shape.shape-kind-rect .stage-item-shape-stroke,
.web-stage-preview .stage-item-shape.shape-kind-rect .stage-item-shape-shadow {
  border-radius: 0;
}

.web-stage-preview .stage-item-shape-shadow {
  position: absolute;
  inset: 0;
  z-index: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  background: var(--item-shape-shadow-color, rgba(0, 0, 0, 0));
  border-radius: calc((var(--item-radius, 0) / 1920) * 100cqw);
  filter: blur(var(--item-shape-shadow-blur, 0px));
  -webkit-mask-image: var(--item-feather-mask-image, none);
  mask-image: var(--item-feather-mask-image, none);
  pointer-events: none;
  transform: translate(var(--item-shape-shadow-offset-x, 0px), var(--item-shape-shadow-offset-y, 0px)) translateZ(0);
}

.web-stage-preview .stage-item-shape-vector-shadow {
  position: absolute;
  left: -100%;
  top: -100%;
  z-index: 0;
  display: none;
  width: 300%;
  height: 300%;
  overflow: visible;
  filter: blur(var(--item-shape-shadow-blur, 0px));
  pointer-events: none;
  transform: translate(var(--item-shape-shadow-offset-x, 0px), var(--item-shape-shadow-offset-y, 0px)) translateZ(0);
}

.web-stage-preview .stage-item-shape-vector-shadow-shape {
  fill: var(--item-shape-shadow-color, rgba(0, 0, 0, 0));
  stroke: none;
}

.web-stage-preview .stage-item-shape-vector {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: blur(var(--item-feather-blur, 0px));
  -webkit-mask-image: var(--item-feather-mask-image, none);
  mask-image: var(--item-feather-mask-image, none);
  pointer-events: none;
  transform: translateZ(0);
}

.web-stage-preview .stage-item-shape-vector-shape {
  fill: var(--item-fill, #ffff00);
  stroke: var(--item-stroke-color, transparent);
  stroke-width: var(--item-stroke-width, 0px);
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  paint-order: stroke fill;
  shape-rendering: geometricPrecision;
}

.web-stage-preview .stage-item-shape.uses-vector-shape .stage-item-shape-fill,
.web-stage-preview .stage-item-shape.uses-vector-shape .stage-item-shape-stroke {
  display: none;
}

.web-stage-preview .stage-item-shape.uses-vector-shape .stage-item-shape-vector {
  display: block;
}

.web-stage-preview .stage-item-shape.shape-kind-ellipse .stage-item-shape-fill {
  border-radius: 50%;
}

.web-stage-preview .stage-item-shape.shape-kind-ellipse .stage-item-shape-stroke {
  border-radius: 50%;
}

.web-stage-preview .stage-item-shape.shape-kind-ellipse .stage-item-shape-shadow {
  border-radius: 50%;
}

.web-stage-preview .stage-item-shape.shape-kind-line .stage-item-shape-fill {
  border-radius: 999px;
}

.web-stage-preview .stage-item-shape.shape-kind-line .stage-item-shape-stroke {
  border-radius: 999px;
}

.web-stage-preview .stage-item-shape.shape-kind-line .stage-item-shape-shadow {
  border-radius: 999px;
}

.web-stage-preview .stage-item-shape.shape-kind-triangle .stage-item-shape-fill {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.web-stage-preview .stage-item-shape.shape-kind-triangle .stage-item-shape-shadow {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.web-stage-preview .stage-item-shape.shape-kind-arrow .stage-item-shape-fill {
  clip-path: polygon(0% 35%, 56% 35%, 56% 10%, 100% 50%, 56% 90%, 56% 65%, 0% 65%);
}

.web-stage-preview .stage-item-shape.shape-kind-arrow .stage-item-shape-shadow {
  clip-path: polygon(0% 35%, 56% 35%, 56% 10%, 100% 50%, 56% 90%, 56% 65%, 0% 65%);
}

.web-stage-preview .stage-item-shape.shape-kind-star .stage-item-shape-fill {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.web-stage-preview .stage-item-shape.shape-kind-star .stage-item-shape-shadow {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.web-stage-preview .stage-item-shape.shape-kind-triangle .stage-item-shape-fill,
.web-stage-preview .stage-item-shape.shape-kind-arrow .stage-item-shape-fill,
.web-stage-preview .stage-item-shape.shape-kind-star .stage-item-shape-fill {
  display: none;
}

.web-stage-preview .stage-item-shape.shape-kind-triangle .stage-item-shape-stroke,
.web-stage-preview .stage-item-shape.shape-kind-arrow .stage-item-shape-stroke,
.web-stage-preview .stage-item-shape.shape-kind-star .stage-item-shape-stroke {
  display: none;
}

.web-stage-preview .stage-item-shape.shape-kind-triangle .stage-item-shape-shadow,
.web-stage-preview .stage-item-shape.shape-kind-arrow .stage-item-shape-shadow,
.web-stage-preview .stage-item-shape.shape-kind-star .stage-item-shape-shadow {
  display: none;
}

.web-stage-preview .stage-item-shape.shape-kind-triangle .stage-item-shape-vector-shadow,
.web-stage-preview .stage-item-shape.shape-kind-arrow .stage-item-shape-vector-shadow,
.web-stage-preview .stage-item-shape.shape-kind-star .stage-item-shape-vector-shadow {
  display: block;
}

.web-stage-preview .stage-item-shape.shape-kind-triangle .stage-item-shape-vector,
.web-stage-preview .stage-item-shape.shape-kind-arrow .stage-item-shape-vector,
.web-stage-preview .stage-item-shape.shape-kind-star .stage-item-shape-vector {
  display: block;
}

.web-stage-preview .stage-item-shape .stage-item-shape-text {
  position: absolute;
  inset: 0;
  z-index: 4;
  box-sizing: border-box;
  padding: calc((18 / 1920) * 100cqw);
  pointer-events: none;
}

.web-stage-preview .stage-item-image {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: calc((var(--item-radius, 0) / 1920) * 100cqw);
}

.web-stage-preview .stage-item-image-content {
  position: absolute;
  display: block;
  max-width: none;
  max-height: none;
  opacity: var(--item-opacity, 1);
  pointer-events: none;
  user-select: none;
}

.slide-card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: clamp(14px, 1.45vw, 22px);
  padding: 0 clamp(5px, 0.72vw, 9px);
  background: var(--part-accent-soft);
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(0.52rem, 0.66vw, 0.72rem);
  line-height: 1;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.34);
}

.slide-card-number,
.slide-card-part {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slide-card.is-selected {
  border-color: rgba(26, 143, 255, 0.9);
  box-shadow:
    0 18px 28px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(26, 143, 255, 0.48),
    0 0 0 4px rgba(255, 255, 255, 0.07);
}

.show-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  max-height: 28px;
  padding: 0 2px;
  border-top: 1px solid rgba(220, 240, 255, 0.06);
}

.show-toolbar-left,
.transition-control,
.transition-mode-buttons,
.transition-duration-control,
.view-size-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toolbar-icon-button,
.transition-mode-button {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.toolbar-icon-button {
  width: 24px;
  height: 24px;
  font-size: 1.18rem;
  font-weight: 700;
}

.toolbar-icon-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.transition-control,
.view-size-control {
  height: 24px;
  padding-left: 8px;
  border-left: 1px solid rgba(220, 240, 255, 0.06);
  color: var(--muted);
}

.transition-mode-buttons {
  gap: 2px;
  padding: 1px;
  border: 1px solid rgba(220, 240, 255, 0.06);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.transition-mode-button {
  min-width: 24px;
  min-height: 20px;
  padding: 1px 4px;
}

.transition-icon {
  display: block;
  width: 14px;
  height: 14px;
}

.transition-icon-cut {
  position: relative;
}

.transition-icon-cut::before,
.transition-icon-cut::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 5px;
  border-radius: 1px;
  background: currentColor;
}

.transition-icon-cut::before { left: 2px; }
.transition-icon-cut::after { right: 2px; }

.transition-icon-fade {
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.08)),
    conic-gradient(currentColor 25%, transparent 0 50%, currentColor 0 75%, transparent 0);
  background-blend-mode: multiply;
  background-size: 100% 100%, 6px 6px;
}

.transition-mode-button.is-active {
  background: rgba(26, 143, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(79, 179, 255, 0.34);
  color: #ffffff;
}

.transition-duration-value {
  min-width: 32px;
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 800;
}

.view-size-input {
  width: 76px;
}

/* Right monitor and editor */
.show-tools {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(220, 240, 255, 0.04), rgba(220, 240, 255, 0.016)),
    rgba(11, 11, 11, 0.92);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.tool-panel-stack,
.tool-panel {
  display: grid;
  min-height: 0;
}

.tool-panel-stack {
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

#editor-scroll {
  min-height: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}

.tool-panel {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}

.stage-monitor-card {
  display: grid;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.stage-monitor-shell {
  display: grid;
  gap: 9px;
  width: 100%;
  min-width: 0;
}

.web-editor-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  padding: 0 2px;
}

.web-editor-preview-head strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-editor-preview-head span {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.62rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-monitor-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.monitor-preview-deck {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(220, 240, 255, 0.07);
  border-radius: 7px;
  background: #000;
}

.monitor-preview-panel,
.live-stage-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 7px;
  background: #000;
}

.web-monitor-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
  font-size: clamp(0.84rem, 1.7vw, 1.28rem);
  font-weight: 900;
  line-height: 1.22;
  text-align: center;
  white-space: pre-wrap;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.84);
  color: rgba(255, 255, 255, 0.52);
}

.output-tool-dock {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid rgba(220, 240, 255, 0.08);
}

.output-tool-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid rgba(220, 240, 255, 0.06);
}

.output-tool-tab {
  display: grid;
  place-items: center;
  height: 34px;
  padding: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.76rem;
  font-weight: 900;
}

.output-tool-tab.is-active {
  border-bottom-color: rgba(26, 143, 255, 0.8);
  background: rgba(26, 143, 255, 0.1);
  color: var(--text);
}

.output-tool-content {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 10px 0 0;
}

.output-tool-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0 4px;
}

.output-tool-section-head strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-edit-only-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(79, 179, 255, 0.26);
  border-radius: 999px;
  background: rgba(26, 143, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.6rem;
  font-weight: 900;
}

.bible-version-select,
.bible-ref-input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(220, 240, 255, 0.09);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  outline: none;
}

body[data-app-mode="edit"] {
  --show-sidebar-width: 246px;
  --show-tools-width: 336px;
  font-size: 13px;
}

body[data-app-mode="edit"] .show-workspace {
  grid-template-columns: var(--show-sidebar-width) 10px minmax(0, 1fr) 10px var(--show-tools-width);
}

body[data-app-mode="edit"] .show-tools-resizer {
  cursor: default;
  pointer-events: none;
}

body[data-app-mode="edit"] .show-tools-resizer::before {
  display: none;
}

body[data-app-mode="edit"] .library-sidebar {
  grid-template-rows: minmax(240px, var(--web-edit-slide-pane-height, 1fr)) 6px minmax(170px, 1fr);
}

body[data-app-mode="edit"] #tab-library {
  grid-template-rows: 54px minmax(0, 1fr);
  padding: 0 0 5px;
}

body[data-app-mode="edit"] #tab-library .simple-head {
  align-items: center;
  padding: 5px 14px;
  border-bottom: 1px solid rgba(220, 240, 255, 0.08);
}

body[data-app-mode="edit"] #tab-library .simple-head h2 {
  font-size: 0.9rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: none;
}

body[data-app-mode="edit"] #edit-song-title-display {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.66rem;
  font-weight: 700;
}

body[data-app-mode="edit"] #tab-library .sidebar-chip {
  display: none;
}

body[data-app-mode="edit"] #tab-library .icon-button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border-color: rgba(79, 179, 255, 0.18);
  background: rgba(255, 255, 255, 0.026);
  font-size: 1.35rem;
  font-weight: 600;
}

body[data-app-mode="edit"] #tab-playlist,
body[data-app-mode="edit"] .library-sidebar > .sidebar-section-resizer:first-of-type,
body[data-app-mode="edit"] .show-toolbar {
  display: none;
}

body[data-app-mode="edit"] .items-block {
  grid-template-rows: auto minmax(0, 1fr);
}

body[data-app-mode="edit"] .items-block .icon-button,
body[data-app-mode="edit"] .items-block .sidebar-filter {
  display: none;
}

body[data-app-mode="edit"] .studio-shell {
  padding: 0;
  border-radius: 0;
  background: #050505;
  box-shadow: none;
}

body[data-app-mode="edit"] .show-stage {
  gap: 0;
  padding: 0;
}

body[data-app-mode="edit"] .show-tools {
  border-color: rgba(220, 240, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.01)),
    rgba(9, 9, 9, 0.94);
}

body[data-app-mode="edit"] .show-header {
  min-height: 54px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid rgba(220, 240, 255, 0.08);
  border-radius: 0;
  background: #0a0a0a;
}

body[data-app-mode="edit"] .slide-canvas {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

body[data-app-mode="edit"] .show-tools {
  grid-template-rows: minmax(0, 1fr);
}

.web-bible-workspace {
  display: none;
  min-height: 0;
}

body[data-app-mode="bible"],
body.is-bible-mode {
  --show-tools-width: 0px;
}

body[data-app-mode="bible"] .show-workspace,
body.is-bible-mode .show-workspace {
  grid-template-columns: var(--show-sidebar-width) 10px minmax(0, 1fr);
}

body[data-app-mode="bible"] .show-tools-resizer,
body[data-app-mode="bible"] .show-tools,
body.is-bible-mode .show-tools-resizer,
body.is-bible-mode .show-tools {
  display: none;
}

body[data-app-mode="bible"] .studio-shell,
body.is-bible-mode .studio-shell {
  min-height: 0;
  padding: 12px 10px 10px;
}

body[data-app-mode="bible"] .show-stage,
body.is-bible-mode .show-stage {
  display: none;
}

body[data-app-mode="bible"] .web-bible-workspace,
body.is-bible-mode .web-bible-workspace {
  display: grid;
  min-height: 0;
}

.web-bible-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  padding: 8px 10px 50px;
  border: 1px solid rgba(26, 143, 255, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008)),
    rgba(8, 8, 8, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 22px 54px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.web-bible-source-row,
.web-bible-save-row {
  display: grid;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.web-bible-source-row {
  grid-template-columns: minmax(220px, 330px) minmax(360px, 760px) auto;
  justify-content: start;
}

.web-bible-save-row {
  grid-template-columns: minmax(220px, 330px) minmax(220px, 300px) auto;
  justify-content: start;
}

.web-bible-field {
  display: grid;
  gap: 0;
  min-width: 0;
}

.web-bible-field > span:first-child {
  display: none;
}

.web-bible-field select,
.web-bible-field input,
.web-bible-reference-entry input {
  width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(220, 240, 255, 0.12);
  border-radius: 7px;
  background: rgba(20, 21, 23, 0.92);
  color: #ffffff;
  outline: none;
  font-size: 0.78rem;
  font-weight: 850;
}

.web-bible-field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-color: rgba(20, 21, 23, 0.92);
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23AFC0D1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

.web-bible-field select:focus,
.web-bible-field input:focus,
.web-bible-reference-entry input:focus {
  border-color: rgba(79, 179, 255, 0.68);
  box-shadow: 0 0 0 1px rgba(79, 179, 255, 0.18);
}

.web-bible-reference-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
}

.web-bible-reference-entry {
  position: relative;
  display: grid;
  min-width: 0;
}

.web-bible-reference-entry input {
  padding-right: 38px;
}

.web-bible-picker-button {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 0 7px 7px 0;
  font-size: 0;
}

.web-bible-picker-button::before {
  content: "";
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23D7E3EF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

.web-bible-search-button,
.web-bible-options-button,
.web-bible-create-button {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 0.72rem;
}

.web-bible-create-button:disabled,
.web-bible-search-button:disabled {
  opacity: 0.36;
  cursor: default;
}

.web-bible-picker-panel {
  position: absolute;
  top: 47px;
  left: 10px;
  z-index: 18;
  display: grid;
  grid-template-columns: 220px 86px 86px;
  gap: 0;
  max-width: calc(100% - 20px);
  padding: 6px;
  border: 1px solid rgba(220, 240, 255, 0.16);
  border-radius: 8px;
  background: #0f0f0f;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

.web-bible-picker-panel[data-depth="1"] {
  grid-template-columns: 220px;
}

.web-bible-picker-panel[data-depth="2"] {
  grid-template-columns: 220px 86px;
}

.web-bible-picker-panel[data-depth="3"] {
  grid-template-columns: 220px 86px 86px;
}

.web-bible-picker-panel[hidden],
.web-bible-options-panel[hidden] {
  display: none;
}

.web-bible-picker-column[hidden] {
  display: none;
}

.web-bible-picker-column {
  display: grid;
  align-content: start;
  gap: 2px;
  height: min(360px, calc(100vh - 220px));
  min-height: 180px;
  overflow: auto;
  padding: 2px;
  background: #0f0f0f;
}

.web-bible-picker-column + .web-bible-picker-column {
  border-left: 1px solid rgba(220, 240, 255, 0.1);
}

.web-bible-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.web-bible-picker-item span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-bible-picker-arrow {
  flex: 0 0 auto;
  color: currentColor;
  font-size: 1.05rem;
  line-height: 1;
}

.web-bible-picker-item:hover,
.web-bible-picker-item.is-active {
  background: rgba(26, 143, 255, 0.18);
  color: #ffffff;
}

.web-bible-picker-empty {
  display: grid;
  place-items: center;
  min-height: 80px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  font-weight: 800;
}

.web-bible-options-panel {
  position: absolute;
  top: 47px;
  right: 10px;
  z-index: 24;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  min-width: min(520px, calc(100% - 20px));
  padding: 12px;
  border: 1px solid rgba(220, 240, 255, 0.12);
  border-radius: 8px;
  background: rgba(11, 11, 11, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.web-bible-check-field {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}

.web-bible-check-field input {
  width: 15px;
  height: 15px;
}

.web-bible-style-field {
  display: grid;
  flex: 1 0 100%;
  gap: 7px;
  min-width: 260px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.7rem;
  font-weight: 850;
}

.web-bible-style-menu-button {
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  padding: 0 12px;
  border: 1px solid rgba(220, 240, 255, 0.12);
  border-radius: 7px;
  background: rgba(20, 21, 23, 0.92);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 850;
  outline: none;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-bible-style-menu-button:hover,
.web-bible-style-menu-button.is-active {
  border-color: rgba(26, 143, 255, 0.58);
  background: rgba(26, 143, 255, 0.16);
}

.web-bible-style-menu-button::after {
  content: "⌄";
  flex: 0 0 auto;
  margin-left: 10px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.9rem;
  line-height: 1;
}

.web-bible-style-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 26;
  width: min(820px, calc(100vw - 40px));
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(220, 240, 255, 0.12);
  border-radius: 10px;
  background: rgba(11, 11, 11, 0.98);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.web-bible-style-menu[hidden] {
  display: none;
}

.web-bible-style-menu button {
  font: inherit;
}

.web-bible-style-menu-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

.web-bible-style-folder-pane {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding-right: 12px;
  border-right: 1px solid rgba(220, 240, 255, 0.08);
}

.web-bible-style-hint {
  padding: 4px 8px 2px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  font-weight: 850;
}

.web-bible-style-folder-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
  cursor: pointer;
}

.web-bible-style-folder-button span,
.web-bible-style-folder-button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-bible-style-folder-button span {
  font-size: 0.88rem;
  font-weight: 850;
}

.web-bible-style-folder-button small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  font-weight: 850;
}

.web-bible-style-folder-button:hover,
.web-bible-style-folder-button.is-active {
  background: rgba(26, 143, 255, 0.22);
  color: #ffffff;
}

.web-bible-style-section {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  max-height: min(520px, calc(100vh - 250px));
  overflow: auto;
  padding-right: 2px;
}

.web-bible-style-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  min-height: 96px;
  padding: 10px;
  border: 1px solid rgba(220, 240, 255, 0.08);
  border-radius: 8px;
  background: rgba(220, 240, 255, 0.025);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

.web-bible-style-row:hover {
  border-color: rgba(26, 143, 255, 0.34);
  background: rgba(255, 255, 255, 0.035);
}

.web-bible-style-row.is-selected {
  border-color: rgba(26, 143, 255, 0.72);
  background: rgba(26, 143, 255, 0.12);
}

.web-bible-style-row:focus-visible {
  border-color: rgba(26, 143, 255, 0.78);
  outline: none;
}

.web-bible-style-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  align-self: center;
  border: 1px solid rgba(220, 240, 255, 0.13);
  border-radius: 6px;
  background: #000000;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.34);
}

.web-bible-style-copy {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
}

.web-bible-style-row strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-bible-style-row small {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.73rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-bible-style-empty {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 10px;
  border: 1px solid rgba(220, 240, 255, 0.06);
  border-radius: 8px;
  background: rgba(220, 240, 255, 0.025);
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
}

.web-bible-status {
  min-height: 20px;
  margin: -2px 0 -4px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.75rem;
  font-weight: 850;
}

.web-bible-status[data-tone="success"] {
  color: rgba(147, 197, 253, 0.9);
}

.web-bible-status[data-tone="error"] {
  color: rgba(248, 113, 113, 0.92);
}

.web-bible-preview-list {
  display: grid;
  grid-template-columns: repeat(var(--thumb-columns), minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 4px 2px 42px;
  -webkit-user-select: none;
  user-select: none;
}

.web-bible-preview-list.is-empty {
  grid-template-columns: 1fr;
}

.web-bible-empty {
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.82rem;
  font-weight: 850;
}

.web-bible-preview-card {
  min-width: 0;
}

.web-bible-preview-button {
  display: grid;
  grid-template-rows: auto auto;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(220, 240, 255, 0.08);
  border-radius: 7px;
  background: rgba(9, 9, 9, 0.42);
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.web-bible-preview-button * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.web-bible-preview-stage .web-stage-preview,
.web-bible-preview-stage .stage-item,
.web-bible-preview-stage .stage-item-text,
.web-bible-preview-stage .stage-item-text-content,
.web-bible-preview-stage .stage-item-text-line-copy {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.web-bible-preview-button:hover,
.web-bible-preview-button:focus-visible {
  border-color: rgba(79, 179, 255, 0.5);
  outline: none;
}

.web-bible-preview-button.is-selected {
  border-color: rgba(79, 179, 255, 0.86);
  background: rgba(26, 143, 255, 0.09);
  box-shadow:
    inset 0 0 0 1px rgba(79, 179, 255, 0.32),
    0 0 0 1px rgba(26, 143, 255, 0.14);
}

.web-bible-preview-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.045) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.045) 75%),
    #0a0a0a;
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
}

.web-bible-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
  padding: 0 9px;
  background: rgba(80, 98, 125, 0.78);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.68rem;
  font-weight: 850;
}

.web-bible-preview-footer strong,
.web-bible-preview-footer span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-bible-toolbar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  min-height: 32px;
  max-height: 32px;
  padding: 0 2px;
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(12px);
}

.web-bible-view-toggle,
.web-bible-duration-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.web-bible-view-toggle {
  gap: 4px;
  padding: 2px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}

.web-bible-view-button {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 9px;
}

.web-bible-view-button.is-active {
  border-color: rgba(79, 179, 255, 0.55);
  background: rgba(26, 143, 255, 0.24);
  color: #ffffff;
}

.web-bible-list-icon,
.web-bible-grid-icon {
  display: block;
  width: 16px;
  height: 16px;
}

.web-bible-list-icon {
  position: relative;
}

.web-bible-list-icon::before,
.web-bible-list-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.78;
}

.web-bible-list-icon::before {
  top: 3px;
}

.web-bible-list-icon::after {
  bottom: 3px;
}

.web-bible-grid-icon {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  grid-template-rows: repeat(3, 4px);
  gap: 2px;
  place-content: center;
}

.web-bible-grid-icon::before {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
  box-shadow:
    6px 0 currentColor,
    12px 0 currentColor,
    0 6px currentColor,
    6px 6px currentColor,
    12px 6px currentColor,
    0 12px currentColor,
    6px 12px currentColor,
    12px 12px currentColor;
}

.web-bible-duration-control {
  min-width: 184px;
}

.web-bible-duration-value {
  min-width: 42px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 950;
  text-align: right;
}

.web-bible-duration-input {
  width: 130px;
}

.edit-canvas-toolbar {
  position: relative;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.edit-tool-group,
.edit-view-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.edit-tool-button,
.edit-icon-button,
.edit-zoom-chip {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(220, 240, 255, 0.1);
  border-radius: 8px;
  background: rgba(220, 240, 255, 0.045);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 900;
}

.edit-tool-button {
  padding: 0 12px;
  cursor: pointer;
}

.edit-icon-button {
  width: 38px;
  padding: 0;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.edit-grid-button {
  font-size: 1rem;
}

.edit-grid-icon {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  grid-template-rows: repeat(3, 4px);
  gap: 2px;
}

.edit-grid-icon span {
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0.82;
}

.edit-zoom-chip {
  min-width: 66px;
  padding: 0 10px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.edit-tool-button.is-active,
.edit-icon-button.is-active {
  border-color: rgba(26, 143, 255, 0.48);
  background: rgba(26, 143, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(79, 179, 255, 0.2);
}

.edit-icon-button:hover,
.edit-zoom-chip:hover,
.edit-tool-button:hover {
  border-color: rgba(79, 179, 255, 0.38);
  background: rgba(220, 240, 255, 0.075);
}

.shape-picker {
  position: relative;
  z-index: 10030;
}

.shape-picker-toggle.is-open {
  border-color: rgba(79, 179, 255, 0.34);
  background: rgba(79, 179, 255, 0.16);
}

.shape-picker-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10040;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 260px;
  padding: 10px;
  border: 1px solid rgba(220, 240, 255, 0.1);
  border-radius: 8px;
  background: rgba(11, 11, 11, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

.shape-picker-menu[hidden] {
  display: none;
}

.shape-picker-option {
  display: grid;
  gap: 8px;
  justify-items: start;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 240, 255, 0.08);
  border-radius: 8px;
  background: rgba(220, 240, 255, 0.035);
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.shape-picker-option:hover {
  border-color: rgba(79, 179, 255, 0.26);
  background: rgba(220, 240, 255, 0.08);
  transform: translateY(-1px);
}

.shape-picker-option:focus-visible {
  outline: 2px solid rgba(79, 179, 255, 0.55);
  outline-offset: 2px;
}

.shape-picker-option span:last-child {
  font-size: 0.8rem;
  font-weight: 800;
}

.shape-picker-icon {
  display: block;
  width: 34px;
  height: 24px;
  border: 2px solid rgba(204, 232, 255, 0.9);
  background: rgba(204, 232, 255, 0.08);
}

.shape-picker-icon-rounded {
  border-radius: 8px;
}

.shape-picker-icon-ellipse {
  width: 28px;
  border-radius: 999px;
}

.shape-picker-icon-line {
  width: 34px;
  height: 0;
  margin-top: 12px;
  border-width: 2px 0 0;
  background: transparent;
}

.shape-picker-icon-triangle,
.shape-picker-icon-arrow,
.shape-picker-icon-star {
  border: none;
  background: rgba(204, 232, 255, 0.9);
}

.shape-picker-icon-triangle {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.shape-picker-icon-arrow {
  width: 36px;
  clip-path: polygon(0% 35%, 56% 35%, 56% 10%, 100% 50%, 56% 90%, 56% 65%, 0% 65%);
}

.shape-picker-icon-star {
  width: 28px;
  aspect-ratio: 1;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.edit-icon-button:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.edit-canvas-surface {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #94a3b8;
}

.edit-canvas-surface.is-panning {
  cursor: grabbing;
  user-select: none;
}

.edit-canvas-surface.is-panning * {
  cursor: grabbing !important;
}

.edit-canvas-workbench {
  --web-workbench-padding-x: 0px;
  --web-workbench-padding-y: 0px;
  --web-edit-stage-width: 1240px;
  --web-edit-stage-height: 698px;
  --web-edit-workspace-width: 1369px;
  --web-edit-workspace-height: 827px;
  --web-edit-pasteboard-x: 65px;
  --web-edit-pasteboard-y: 65px;
  --web-ruler-minor-x: 64.5833px;
  --web-ruler-major-x: 322.9167px;
  --web-ruler-minor-y: 64.5833px;
  --web-ruler-major-y: 322.9167px;
  grid-area: 1 / 1;
  position: relative;
  display: grid;
  place-items: center;
  width: max-content;
  min-width: 100%;
  height: max-content;
  min-height: 100%;
  padding: var(--web-workbench-padding-y) var(--web-workbench-padding-x);
  box-sizing: border-box;
}

.edit-canvas-ruler-layer {
  grid-area: 1 / 1;
  position: sticky;
  left: 0;
  top: 0;
  justify-self: start;
  align-self: start;
  z-index: 10000;
  width: 0;
  height: 0;
  pointer-events: none !important;
  overflow: visible;
}

.edit-canvas-ruler-layer[hidden] {
  display: none !important;
}

.edit-canvas-workspace {
  position: relative;
  width: var(--web-edit-workspace-width);
  height: var(--web-edit-workspace-height);
  overflow: visible;
}

.edit-canvas-stage-frame {
  --web-selection-line-width: 1px;
  --web-selection-outline-width: 1px;
  --web-selection-outline-offset: 2px;
  --web-selection-padding: 5px;
  --web-selection-padding-offset: 0px;
  --web-selection-multi-inset: 0px;
  --web-selection-handle-size: 8px;
  --web-selection-handle-offset: -4px;
  --web-selection-rotate-size: 9px;
  --web-selection-rotate-distance: 22px;
  --web-selection-rotate-top: -22px;
  --web-selection-readout-distance: 44px;
  --web-selection-readout-top: -44px;
  position: absolute;
  left: var(--web-edit-pasteboard-x);
  top: var(--web-edit-pasteboard-y);
  z-index: 1;
  width: var(--web-edit-stage-width);
  height: var(--web-edit-stage-height);
  max-width: none;
  aspect-ratio: auto;
  overflow: visible;
  border: 2px solid rgba(0, 0, 0, 0.26);
  background: #0b0c0e;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.2),
    0 18px 36px rgba(0, 0, 0, 0.18);
}

.edit-canvas-stage-frame.show-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(33.333% - 0.5px), #fff calc(33.333% - 0.5px), #fff calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px)),
    linear-gradient(to right, transparent calc(66.666% - 0.5px), #fff calc(66.666% - 0.5px), #fff calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.333% - 0.5px), #fff calc(33.333% - 0.5px), #fff calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px)),
    linear-gradient(to bottom, transparent calc(66.666% - 0.5px), #fff calc(66.666% - 0.5px), #fff calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px));
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.82));
}

.edit-canvas-ruler {
  position: absolute;
  z-index: 1;
  display: block;
  pointer-events: none !important;
  overflow: hidden;
  border: 1px solid #46505a;
  background-color: #56616d;
  color: #eef2f6;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.edit-canvas-ruler *,
.edit-canvas-ruler::before,
.edit-canvas-ruler::after {
  pointer-events: none !important;
  user-select: none;
}

.edit-canvas-ruler-top {
  left: 0;
  top: 0;
  width: var(--web-ruler-viewport-width, 100%);
  height: 18px;
  min-width: 100%;
  border-bottom-color: rgba(255, 255, 255, 0.14);
  background-image: none;
}

.edit-canvas-ruler-left {
  left: 0;
  top: 0;
  width: 18px;
  height: var(--web-ruler-viewport-height, 100%);
  min-height: 100%;
  border-right-color: rgba(255, 255, 255, 0.14);
  background-image: none;
}

.edit-canvas-ruler-tick {
  position: absolute;
  z-index: 1;
  display: block;
  background: none;
  pointer-events: none;
}

.edit-canvas-ruler-tick-x {
  top: 0;
  width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.38);
}

.edit-canvas-ruler-tick-x.is-major {
  bottom: 0;
}

.edit-canvas-ruler-tick-x.is-minor {
  height: 8px;
  border-left-color: rgba(255, 255, 255, 0.2);
}

.edit-canvas-ruler-tick-y {
  left: 0;
  height: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.38);
}

.edit-canvas-ruler-tick-y.is-major {
  right: 0;
}

.edit-canvas-ruler-tick-y.is-minor {
  width: 8px;
  border-top-color: rgba(255, 255, 255, 0.2);
}

.edit-canvas-ruler-label {
  position: absolute;
  z-index: 2;
  padding: 0 2px;
  border-radius: 2px;
  background-color: #56616d;
  color: inherit;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.42);
  white-space: nowrap;
}

.edit-canvas-ruler-top .edit-canvas-ruler-label {
  top: 50%;
  transform: translate(-50%, -50%);
}

.edit-canvas-ruler-left .edit-canvas-ruler-label {
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
}

.edit-canvas-stage-frame .web-stage-preview {
  position: absolute;
  overflow: visible !important;
  isolation: auto;
}

.edit-canvas-stage-frame .stage-item-canvas,
.edit-canvas-stage-frame .stage-item-canvas-web-preview,
.edit-canvas-stage-frame .stage-item-canvas-background {
  overflow: visible !important;
}

.edit-canvas-stage-frame .stage-item {
  cursor: default;
  pointer-events: auto;
}

.edit-canvas-stage-frame .stage-item-text-container,
.edit-canvas-stage-frame .stage-item-text,
.edit-canvas-stage-frame .stage-item-text-content,
.edit-canvas-stage-frame .stage-item-text-lines,
.edit-canvas-stage-frame .stage-item-text-line,
.edit-canvas-stage-frame .stage-item-text-line-copy {
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
}

.edit-canvas-stage-frame .stage-item.is-locked {
  outline: 1px dashed rgba(220, 240, 255, 0.44);
  outline-offset: 2px;
}

.stage-item-lock-badge {
  position: absolute;
  top: -25px;
  right: 0;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  border: 1px solid rgba(220, 240, 255, 0.24);
  border-radius: 999px;
  background: rgba(9, 9, 9, 0.9);
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.28);
}

.edit-canvas-stage-frame .stage-item.is-selected {
  outline: none;
}

.edit-canvas-stage-frame .stage-item.is-selected:not(.is-primary-selected) {
  outline: none;
}

.edit-canvas-stage-frame .stage-item.is-multi-selected {
  outline: none;
}

.edit-canvas-stage-frame .stage-item.is-multi-selected::after {
  display: none;
}

.edit-canvas-stage-frame .stage-item.is-selected::after {
  display: none;
  content: none;
}

.stage-selection-chrome {
  display: none;
}

.stage-linked-source-badges {
  position: absolute;
  left: 0;
  top: -25px;
  z-index: 5;
  display: flex;
  max-width: min(520px, 100%);
  gap: 5px;
  align-items: center;
  pointer-events: none;
}

.stage-linked-source-badge {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(217, 209, 91, 0.68);
  border-radius: 3px;
  background: rgba(8, 8, 8, 0.92);
  color: rgba(236, 230, 117, 0.96);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.28);
}

.edit-canvas-stage-frame .stage-item.is-selected .stage-selection-chrome {
  position: absolute;
  inset: var(--web-selection-padding-offset);
  z-index: 10;
  display: block;
  box-sizing: border-box;
  border: var(--web-selection-line-width) solid rgba(26, 143, 255, 0.86);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.38);
  pointer-events: none;
}

.edit-canvas-stage-frame .stage-item.is-multi-selected .stage-selection-chrome {
  display: block;
  border-color: rgba(79, 179, 255, 0.52);
  box-shadow: none;
}

.edit-canvas-stage-frame .stage-selection-chrome button,
.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle {
  pointer-events: auto;
}

.edit-canvas-stage-frame .stage-item.is-selected:not(.is-primary-selected) .web-resize-handle {
  display: none;
}

.edit-canvas-stage-frame .stage-item.is-selected:not(.is-primary-selected) .stage-item-rotate-stem,
.edit-canvas-stage-frame .stage-item.is-selected:not(.is-primary-selected) .stage-item-rotate-handle,
.edit-canvas-stage-frame .stage-item.is-selected:not(.is-primary-selected) .stage-item-rotate-readout {
  display: none;
}

.edit-canvas-stage-frame .stage-item.is-multi-selected .stage-selection-chrome .web-resize-handle,
.edit-canvas-stage-frame .stage-item.is-multi-selected .stage-selection-chrome .stage-item-rotate-stem,
.edit-canvas-stage-frame .stage-item.is-multi-selected .stage-selection-chrome .stage-item-rotate-handle,
.edit-canvas-stage-frame .stage-item.is-multi-selected .stage-selection-chrome .stage-item-rotate-readout {
  display: none;
}

.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle {
  position: absolute;
  z-index: 6;
  display: block;
  box-sizing: border-box;
  width: var(--web-selection-handle-size);
  min-width: var(--web-selection-handle-size);
  max-width: var(--web-selection-handle-size);
  height: var(--web-selection-handle-size);
  min-height: var(--web-selection-handle-size);
  max-height: var(--web-selection-handle-size);
  padding: 0;
  margin: 0;
  border: 1px solid rgba(26, 143, 255, 0.95);
  border-radius: 2px;
  background: #f8fbff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 1px 4px rgba(0, 0, 0, 0.36);
  color: transparent;
  font-size: 0;
  line-height: 0;
  appearance: none;
  pointer-events: auto;
}

.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle:hover {
  border-color: rgba(255, 255, 255, 0.96);
  background: #4fb3ff;
}

.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle.is-n,
.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle.is-s {
  width: var(--web-selection-handle-size);
  min-width: var(--web-selection-handle-size);
  max-width: var(--web-selection-handle-size);
  height: var(--web-selection-handle-size);
  min-height: var(--web-selection-handle-size);
  max-height: var(--web-selection-handle-size);
}

.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle.is-e,
.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle.is-w {
  width: var(--web-selection-handle-size);
  min-width: var(--web-selection-handle-size);
  max-width: var(--web-selection-handle-size);
  height: var(--web-selection-handle-size);
  min-height: var(--web-selection-handle-size);
  max-height: var(--web-selection-handle-size);
}

.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle.is-nw { top: var(--web-selection-handle-offset); left: var(--web-selection-handle-offset); cursor: nwse-resize; }
.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle.is-n { top: var(--web-selection-handle-offset); left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle.is-ne { top: var(--web-selection-handle-offset); right: var(--web-selection-handle-offset); cursor: nesw-resize; }
.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle.is-e { top: 50%; right: var(--web-selection-handle-offset); transform: translateY(-50%); cursor: ew-resize; }
.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle.is-se { right: var(--web-selection-handle-offset); bottom: var(--web-selection-handle-offset); cursor: nwse-resize; }
.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle.is-s { bottom: var(--web-selection-handle-offset); left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle.is-sw { bottom: var(--web-selection-handle-offset); left: var(--web-selection-handle-offset); cursor: nesw-resize; }
.edit-canvas-stage-frame .stage-selection-chrome .web-resize-handle.is-w { top: 50%; left: var(--web-selection-handle-offset); transform: translateY(-50%); cursor: ew-resize; }

.edit-canvas-stage-frame .stage-selection-chrome .stage-item-rotate-stem {
  position: absolute;
  top: var(--web-selection-rotate-top);
  left: 50%;
  width: 1px;
  height: var(--web-selection-rotate-distance);
  background: rgba(26, 143, 255, 0.72);
  transform: translateX(-50%);
}

.edit-canvas-stage-frame .stage-selection-chrome .stage-item-rotate-handle {
  position: absolute;
  top: var(--web-selection-rotate-top);
  left: 50%;
  width: var(--web-selection-rotate-size);
  height: var(--web-selection-rotate-size);
  padding: 0;
  margin: 0;
  border: 1px solid rgba(24, 126, 232, 0.86);
  border-radius: 999px;
  background: #ffffff;
  color: transparent;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.82),
    0 1px 2px rgba(0, 0, 0, 0.24);
  cursor: default;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.edit-canvas-stage-frame .stage-selection-chrome .stage-item-rotate-handle:active {
  cursor: default;
}

.edit-canvas-stage-frame .stage-selection-chrome .stage-item-rotate-readout {
  position: absolute;
  top: var(--web-selection-readout-top);
  left: 50%;
  transform: translateX(-50%);
  min-width: 44px;
  padding: 4px 8px;
  border: 1px solid rgba(26, 143, 255, 0.42);
  border-radius: 999px;
  background: rgba(11, 11, 11, 0.92);
  color: #f4f6ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.edit-canvas-stage-frame .stage-multi-selection-chrome {
  position: absolute;
  z-index: 940;
  pointer-events: none;
  transform: rotate(var(--multi-selection-rotation, 0deg));
  transform-origin: center center;
}

.edit-canvas-stage-frame .stage-multi-selection-chrome::before {
  content: "";
  position: absolute;
  inset: var(--web-selection-multi-inset);
  border: var(--web-selection-line-width) solid rgba(26, 143, 255, 0.86);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.38);
  pointer-events: none;
}

.edit-canvas-stage-frame .stage-multi-selection-surface {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: move;
  pointer-events: auto;
}

.edit-canvas-stage-frame .stage-multi-selection-chrome button,
.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle {
  pointer-events: auto;
}

.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle {
  position: absolute;
  z-index: 6;
  display: block;
  box-sizing: border-box;
  width: var(--web-selection-handle-size);
  min-width: var(--web-selection-handle-size);
  max-width: var(--web-selection-handle-size);
  height: var(--web-selection-handle-size);
  min-height: var(--web-selection-handle-size);
  max-height: var(--web-selection-handle-size);
  padding: 0;
  margin: 0;
  border: 1px solid rgba(26, 143, 255, 0.95);
  border-radius: 2px;
  background: #f8fbff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 1px 4px rgba(0, 0, 0, 0.36);
  color: transparent;
  font-size: 0;
  line-height: 0;
  appearance: none;
  pointer-events: auto;
}

.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle:hover {
  border-color: rgba(255, 255, 255, 0.96);
  background: #4fb3ff;
}

.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle.is-n,
.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle.is-s {
  width: var(--web-selection-handle-size);
  min-width: var(--web-selection-handle-size);
  max-width: var(--web-selection-handle-size);
  height: var(--web-selection-handle-size);
  min-height: var(--web-selection-handle-size);
  max-height: var(--web-selection-handle-size);
}

.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle.is-e,
.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle.is-w {
  width: var(--web-selection-handle-size);
  min-width: var(--web-selection-handle-size);
  max-width: var(--web-selection-handle-size);
  height: var(--web-selection-handle-size);
  min-height: var(--web-selection-handle-size);
  max-height: var(--web-selection-handle-size);
}

.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle.is-nw { top: var(--web-selection-handle-offset); left: var(--web-selection-handle-offset); cursor: nwse-resize; }
.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle.is-n { top: var(--web-selection-handle-offset); left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle.is-ne { top: var(--web-selection-handle-offset); right: var(--web-selection-handle-offset); cursor: nesw-resize; }
.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle.is-e { top: 50%; right: var(--web-selection-handle-offset); transform: translateY(-50%); cursor: ew-resize; }
.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle.is-se { right: var(--web-selection-handle-offset); bottom: var(--web-selection-handle-offset); cursor: nwse-resize; }
.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle.is-s { bottom: var(--web-selection-handle-offset); left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle.is-sw { bottom: var(--web-selection-handle-offset); left: var(--web-selection-handle-offset); cursor: nesw-resize; }
.edit-canvas-stage-frame .stage-multi-selection-chrome .web-resize-handle.is-w { top: 50%; left: var(--web-selection-handle-offset); transform: translateY(-50%); cursor: ew-resize; }

.edit-canvas-stage-frame .stage-multi-selection-chrome .stage-item-rotate-stem {
  position: absolute;
  z-index: 2;
  top: var(--web-selection-rotate-top);
  left: 50%;
  width: 1px;
  height: var(--web-selection-rotate-distance);
  background: rgba(26, 143, 255, 0.72);
  transform: translateX(-50%);
}

.edit-canvas-stage-frame .stage-multi-selection-chrome .stage-item-rotate-handle {
  position: absolute;
  z-index: 7;
  top: var(--web-selection-rotate-top);
  left: 50%;
  width: var(--web-selection-rotate-size);
  min-width: var(--web-selection-rotate-size);
  height: var(--web-selection-rotate-size);
  min-height: var(--web-selection-rotate-size);
  padding: 0;
  margin: 0;
  border: 1px solid rgba(24, 126, 232, 0.86);
  border-radius: 999px;
  background: #ffffff;
  color: transparent;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.82),
    0 1px 2px rgba(0, 0, 0, 0.24);
  cursor: default;
  appearance: none;
  transform: translate(-50%, -50%);
}

.edit-canvas-stage-frame .stage-multi-selection-chrome .stage-item-rotate-handle:active {
  cursor: default;
}

.edit-canvas-stage-frame .stage-multi-selection-chrome .stage-item-rotate-readout {
  position: absolute;
  z-index: 4;
  top: var(--web-selection-readout-top);
  left: 50%;
  transform: translateX(-50%);
  min-width: 44px;
  padding: 4px 8px;
  border: 1px solid rgba(26, 143, 255, 0.42);
  border-radius: 999px;
  background: rgba(11, 11, 11, 0.92);
  color: #f4f6ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.edit-canvas-stage-frame .stage-multi-selection-chrome.is-rotating .stage-item-rotate-readout,
.edit-canvas-stage-frame .stage-multi-selection-chrome .stage-item-rotate-handle:hover + .stage-item-rotate-readout {
  opacity: 1;
}

.edit-canvas-stage-frame .stage-item.is-dragging {
  cursor: grabbing;
}

.edit-canvas-stage-frame .stage-item.is-rotating,
.edit-canvas-stage-frame .stage-item.is-rotating .stage-item-rotate-handle {
  cursor: default;
}

.edit-canvas-stage-frame .stage-item.is-rotating .stage-item-rotate-readout {
  opacity: 1;
}

.edit-canvas-stage-frame .stage-item.is-resizing {
  cursor: inherit;
}

.edit-canvas-stage-frame .stage-item-image-container.is-cropping {
  cursor: grab;
}

.edit-canvas-stage-frame .stage-item-image-container.is-cropping.is-selected {
  outline-color: rgba(255, 191, 71, 0.98);
}

.edit-canvas-stage-frame .stage-item-image-container.is-cropping.is-dragging {
  cursor: grabbing;
}

.edit-canvas-stage-frame .stage-crop-selection {
  border-color: rgba(255, 191, 71, 0.98);
}

.edit-canvas-stage-frame .stage-crop-selection .stage-crop-surface {
  position: absolute;
  z-index: 0;
  inset: 7px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 191, 71, 0.08);
  cursor: grab;
  pointer-events: auto;
}

.edit-canvas-stage-frame .stage-crop-selection .stage-crop-surface:active {
  cursor: grabbing;
}

.edit-canvas-stage-frame .stage-crop-selection .web-resize-handle {
  z-index: 2;
  border-color: rgba(255, 220, 112, 0.98);
  background: #ffbf47;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 1px 4px rgba(0, 0, 0, 0.36);
}

.stage-crop-actions {
  position: absolute;
  z-index: 3;
  top: -42px;
  right: -6px;
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.stage-crop-action {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(11, 13, 16, 0.92);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.stage-crop-action:hover {
  background: rgba(24, 32, 41, 0.96);
}

.stage-crop-action.is-confirm {
  color: #86efac;
}

.stage-crop-action.is-cancel {
  color: #fca5a5;
}

.web-edit-stage-guide {
  position: absolute;
  z-index: 920;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.web-edit-stage-guide-vertical {
  top: calc((var(--guide-y-start, 0) / 1080) * 100%);
  left: calc((var(--guide-x, 960) / 1920) * 100%);
  width: 1px;
  height: calc((var(--guide-h, 1080) / 1080) * 100%);
  transform: translateX(-0.5px);
}

.web-edit-stage-guide-horizontal {
  top: calc((var(--guide-y, 540) / 1080) * 100%);
  left: calc((var(--guide-x-start, 0) / 1920) * 100%);
  width: calc((var(--guide-w, 1920) / 1920) * 100%);
  height: 1px;
  transform: translateY(-0.5px);
}

.web-edit-stage-guide.is-active {
  opacity: 1;
  background: rgba(79, 179, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(79, 179, 255, 0.22);
}

.web-edit-selection-marquee {
  position: absolute;
  z-index: 930;
  display: none;
  border: 1px solid rgba(79, 179, 255, 0.94);
  background: rgba(79, 179, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(26, 143, 255, 0.28);
  pointer-events: none;
}

.web-edit-selection-marquee.is-active {
  display: block;
}

.edit-slide-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px;
}

.edit-slide-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 26px;
  flex: 0 0 auto;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(220, 240, 255, 0.08);
  border-radius: 7px;
  background: rgba(9, 9, 9, 0.76);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.edit-slide-card.is-selected {
  border-color: rgba(26, 143, 255, 0.8);
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(79, 179, 255, 0.34);
}

.edit-slide-card.is-dragging {
  opacity: 0.42;
}

.edit-slide-card.drag-before::before,
.edit-slide-card.drag-after::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 8;
  height: 4px;
  border-radius: 999px;
  pointer-events: none;
  background: #4fb3ff;
  box-shadow:
    0 0 0 1px rgba(8, 8, 8, 0.7),
    0 0 12px rgba(79, 179, 255, 0.6);
}

.edit-slide-card.drag-before::before {
  top: 0;
}

.edit-slide-card.drag-after::after {
  bottom: 0;
}

.edit-slide-list.is-drop-target-end::after {
  content: "";
  display: block;
  height: 4px;
  margin: 3px 0 0;
  border-radius: 999px;
  background: #4fb3ff;
  box-shadow:
    0 0 0 1px rgba(8, 8, 8, 0.7),
    0 0 12px rgba(79, 179, 255, 0.6);
}

.edit-slide-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b0c0e;
}

.edit-slide-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 26px;
  padding: 0 8px;
  background: var(--part-accent-soft);
}

.edit-slide-footer strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-object-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px;
}

.edit-object-list[hidden] {
  display: none;
}

.edit-object-row,
.edit-layer-row {
  appearance: none;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  position: relative;
  flex: 0 0 auto;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(220, 240, 255, 0.015);
  color: inherit;
  font: inherit;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.edit-object-row.is-draggable,
.edit-layer-row.is-draggable {
  cursor: default;
}

.edit-object-row.is-dragging,
.edit-layer-row.is-dragging {
  opacity: 0.42;
}

.edit-object-row:hover,
.edit-layer-row:hover {
  background: rgba(255, 255, 255, 0.045);
}

.edit-object-row.drag-before::before,
.edit-object-row.drag-after::after,
.edit-layer-row.drag-before::before,
.edit-layer-row.drag-after::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  border-radius: 999px;
  background: rgba(79, 179, 255, 0.95);
}

.edit-object-row.drag-before::before,
.edit-layer-row.drag-before::before {
  top: -4px;
}

.edit-object-row.drag-after::after,
.edit-layer-row.drag-after::after {
  bottom: -4px;
}

#web-object-list.is-drop-target-end::after {
  content: "";
  display: block;
  height: 2px;
  margin: 2px 10px 0;
  border-radius: 999px;
  background: rgba(79, 179, 255, 0.95);
}

.edit-object-row.is-editing,
.edit-layer-row.is-editing {
  cursor: text;
}

.edit-object-name-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.22;
  outline: none;
}

.edit-object-row.is-selected,
.edit-layer-row.is-selected {
  border-color: rgba(26, 143, 255, 0.7);
  background: linear-gradient(180deg, rgba(60, 96, 78, 0.96), rgba(44, 76, 60, 0.96));
  color: #ffffff;
}

.edit-object-row.is-hidden-layer .sidebar-item-copy,
.edit-object-row.is-hidden-layer .edit-layer-copy,
.edit-object-row.is-hidden-layer .edit-layer-icon,
.edit-layer-row.is-hidden-layer .edit-layer-copy,
.edit-layer-row.is-hidden-layer .edit-layer-icon {
  opacity: 0.46;
}

.edit-layer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
}

.edit-layer-icon-shape,
.edit-layer-icon-image {
  position: relative;
}

.edit-layer-shape-line {
  width: 18px;
  height: 6px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.88);
}

.edit-layer-image-box {
  width: 16px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 2px;
}

.edit-object-row.is-selected .edit-layer-icon,
.edit-layer-row.is-selected .edit-layer-icon {
  color: #ffffff;
}

.edit-object-row.is-selected .edit-layer-shape-line,
.edit-layer-row.is-selected .edit-layer-shape-line {
  background: #ffffff;
}

.edit-object-row.is-selected .edit-layer-image-box,
.edit-layer-row.is-selected .edit-layer-image-box {
  border-color: #ffffff;
}

.edit-layer-copy,
.edit-object-row .sidebar-item-copy {
  display: grid;
  min-width: 0;
  gap: 0;
}

.edit-layer-copy strong,
.edit-layer-copy small,
.edit-object-row .sidebar-item-copy strong,
.edit-object-row .sidebar-item-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-layer-copy strong,
.edit-object-row .sidebar-item-copy strong {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
}

.edit-layer-copy small,
.edit-object-row .sidebar-item-copy small {
  color: var(--muted);
  font-size: 0.62rem;
}

.edit-layer-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.edit-layer-toggles {
  gap: 6px;
}

.edit-layer-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(220, 240, 255, 0.14);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.6rem;
  font-weight: 800;
  cursor: pointer;
}

.edit-layer-toggle svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.edit-layer-toggle.is-on {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.edit-object-row.is-selected .edit-layer-toggle,
.edit-layer-row.is-selected .edit-layer-toggle {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(20, 52, 40, 0.48);
  color: rgba(255, 255, 255, 0.74);
}

.edit-object-row.is-selected .edit-layer-toggle.is-on,
.edit-layer-row.is-selected .edit-layer-toggle.is-on {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.edit-inspector {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: visible;
  padding: 14px 16px;
}

.edit-inspector-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(220, 240, 255, 0.05);
  border-radius: 8px;
  background: rgba(220, 240, 255, 0.02);
}

.edit-inspector-card.is-item-tools {
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(220, 240, 255, 0.02);
}

.edit-inspector-card h2 {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}

.inspector-action-button,
.edit-style-action {
  min-width: 0;
  border: 1px solid rgba(220, 240, 255, 0.06);
  border-radius: 8px;
  background: rgba(220, 240, 255, 0.045);
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.74rem;
  font-weight: 700;
}

.edit-style-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inspector-action-button,
.edit-style-action {
  min-height: 34px;
  padding: 0 10px;
  cursor: pointer;
}

.inspector-action-button:hover:not(:disabled),
.edit-style-action:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.09);
}

.inspector-action-button:disabled,
.edit-style-action:disabled {
  opacity: 0.34;
  cursor: default;
}

.edit-selected-type-chip {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 0, 0.22);
  border-radius: 9px;
  background: rgba(255, 255, 0, 0.08);
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.76rem;
  font-weight: 900;
}

.inspector-divider {
  height: 1px;
  background: rgba(220, 240, 255, 0.08);
}

.field,
.edit-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field span,
.edit-field span {
  color: rgba(178, 198, 220, 0.84);
  font-size: 0.7rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.edit-field input,
.edit-field select,
.edit-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(220, 240, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: #ffffff;
  outline: none;
  font-weight: 700;
}

.field input,
.field select,
.edit-field input,
.edit-field select {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 0.82rem;
}

.field select,
.edit-field select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, rgba(220, 240, 255, 0.68) 50%) right 12px center / 6px 6px no-repeat,
    rgba(0, 0, 0, 0.2);
}

.field input[type="color"],
.edit-field input[type="color"] {
  min-height: 32px;
  padding: 2px;
}

.edit-field textarea {
  min-height: 132px;
  padding: 10px 12px;
  resize: none;
  font-size: 0.8rem;
  line-height: 1.42;
}

.edit-inspector-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.edit-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.edit-field-grid.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.edit-field-grid.is-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.item-inspector-group {
  display: grid;
  gap: 8px;
}

.inspector-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inspector-action-row-stack {
  grid-template-columns: 1fr;
}

.inspector-control-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inspector-control-row-text-core {
  grid-template-columns: minmax(0, 1.2fr) minmax(88px, 0.7fr) 88px;
  align-items: end;
}

.inspector-control-row-geometry {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.item-geometry-panel {
  display: grid;
  gap: 8px;
}

.inspector-field-full {
  width: 100%;
}

.compact-number-field input,
.compact-number-field select {
  text-align: center;
}

.font-size-stepper {
  position: relative;
  display: grid;
  min-width: 0;
}

.font-size-stepper-input {
  padding-right: 32px !important;
  text-align: center;
}

.font-size-stepper-input::-webkit-outer-spin-button,
.font-size-stepper-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.font-size-stepper-buttons {
  position: absolute;
  top: 2px;
  right: 2px;
  bottom: 2px;
  display: grid;
  width: 26px;
  overflow: hidden;
  border-left: 1px solid rgba(220, 240, 255, 0.08);
  border-radius: 0 6px 6px 0;
}

.font-size-stepper-button {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(220, 240, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  touch-action: none;
}

.font-size-stepper-button:last-child {
  border-bottom: 0;
}

.font-size-stepper-button:hover,
.font-size-stepper-button:active {
  background: rgba(126, 190, 255, 0.24);
  color: #ffffff;
}

.compact-color-field {
  gap: 6px;
}

.slider-field {
  gap: 6px;
}

.slider-field input[type="range"] {
  width: 100%;
}

.slider-number-field {
  min-width: 0;
  gap: 4px;
}

.slider-number-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  align-items: center;
  gap: 8px;
}

.slider-number-head > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slider-number-input {
  width: 68px;
  min-height: 28px;
  padding: 4px 6px;
  text-align: center;
}

.slider-number-field input[type="range"] {
  margin-top: -2px;
}

.inspector-row-label {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.74rem;
  font-weight: 700;
}

.text-alignment-group {
  display: grid;
  gap: 7px;
  padding-top: 0;
}

.checkbox-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: rgba(178, 198, 220, 0.86);
  font-size: 0.68rem;
}

.checkbox-line input {
  width: auto;
}

.inspector-sub-check {
  margin-top: 8px;
}

.text-color-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
}

.text-color-controls-swatch-only {
  grid-template-columns: 1fr;
}

.color-swatch-input {
  width: 40px;
  min-width: 40px;
  height: 32px;
  padding: 2px;
  border: 1px solid rgba(220, 240, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.color-swatch-input-wide {
  width: 100%;
  min-width: 0;
}

.color-swatch-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-swatch-input::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}

.segmented-control,
.edit-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(220, 240, 255, 0.08);
  border-radius: 8px;
  background: rgba(220, 240, 255, 0.04);
}

.segmented-button,
.edit-segment-button {
  min-height: 32px;
  padding: 0 8px;
  border-right: 1px solid rgba(220, 240, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.segmented-button:last-child,
.edit-segment-button:last-child {
  border-right: 0;
}

.segmented-button.is-active,
.edit-segment-button.is-active {
  background: rgba(71, 111, 90, 0.86);
  color: #ffffff;
}

.edit-check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 24px;
  color: rgba(178, 198, 220, 0.86);
  font-size: 0.68rem;
  font-weight: 700;
}

.edit-check-row input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: #8fc5ff;
}

.edit-check-row.is-wide {
  align-items: center;
  min-height: 34px;
}

.edit-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: -4px;
}

.edit-stroke-width-tools {
  display: grid;
  gap: 10px;
}

.edit-stroke-width-tools[hidden] {
  display: none;
}

.edit-range-grid.is-single {
  grid-template-columns: 1fr;
}

.edit-range-input {
  width: 100%;
  accent-color: #8fc5ff;
}

.edit-shape-tools {
  display: grid;
  gap: 8px;
}

.edit-range-field strong {
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.72rem;
}

.edit-effect-group {
  display: grid;
  gap: 7px;
}

.text-effect-group {
  display: grid;
  gap: 7px;
  margin-top: 6px;
}

.text-effect-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.text-effect-head .checkbox-line {
  justify-content: flex-start;
}

.text-effect-body {
  display: grid;
  gap: 8px;
}

.text-effect-body .field input,
.text-effect-body .field select {
  font-size: 0.82rem;
  font-weight: 600;
}

.text-effect-settings-row {
  display: grid;
  gap: 8px;
}

.text-effect-settings-row.is-stroke,
.text-effect-settings-row.is-shadow-primary,
.text-effect-settings-row.is-shape-fill,
.text-effect-settings-row.is-shape-stroke,
.text-effect-settings-row.is-shape-shadow-primary,
.text-effect-settings-row.is-shape-feather {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.text-effect-settings-row.is-shadow-secondary,
.text-effect-settings-row.is-shape-shadow-secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.text-effect-settings-row.is-lineonly-axis {
  grid-template-columns: 56px repeat(2, minmax(0, 1fr));
  align-items: end;
}

.text-effect-setting {
  min-width: 0;
}

.text-effect-axis-label {
  padding-bottom: 10px;
  color: rgba(220, 225, 235, 0.76);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0;
}

.edit-effect-body {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.edit-effect-body[hidden] {
  display: none;
}

.edit-effect-body.is-nested {
  padding: 0;
  border: 0;
  background: transparent;
}

.edit-sub-check {
  min-height: 24px;
  padding-top: 8px;
}

.edit-inspector-note {
  margin: -2px 0 0;
  color: rgba(178, 198, 220, 0.56);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
}

.inspector-note {
  margin: 0;
  color: rgba(178, 198, 220, 0.78);
  font-size: 0.62rem;
  line-height: 1.3;
}

.btn,
.bible-search-btn,
.modal-close {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(220, 240, 255, 0.07);
  border-radius: 8px;
  background: rgba(220, 240, 255, 0.05);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-sm {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.68rem;
}

.btn-accent {
  border-color: rgba(26, 143, 255, 0.36);
  background: rgba(26, 143, 255, 0.14);
}

.btn-danger {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.12);
}

.no-selection {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 120px;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.no-selection-icon {
  padding: 5px 8px;
  border: 1px solid rgba(220, 240, 255, 0.07);
  border-radius: 7px;
  background: rgba(220, 240, 255, 0.045);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.72);
}

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

.modal {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.022)),
    rgba(9, 9, 9, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.modal-header,
.modal-footer {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(220, 240, 255, 0.06);
}

.modal-header h3 {
  flex: 1;
  margin: 0;
  font-size: 0.94rem;
}

.modal-close {
  width: 32px;
  padding: 0;
}

.modal-body {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(220, 240, 255, 0.06);
  border-bottom: 0;
}

.web-text-input-dialog {
  width: min(460px, calc(100vw - 48px));
  max-height: min(420px, calc(100vh - 44px));
}

.web-text-input-dialog-body {
  display: grid;
  gap: 14px;
  min-height: auto;
}

.web-text-input-field {
  display: grid;
  gap: 7px;
}

.web-text-input-field span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.68rem;
  font-weight: 800;
}

.form-group {
  margin-bottom: 12px;
}

.form-textarea {
  min-height: 220px;
  resize: none;
}

.form-hint {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.66rem;
}

.lyrics-preview,
.song-pick-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.lyrics-slide-chip,
.song-pick-item {
  padding: 9px;
  border: 1px solid rgba(220, 240, 255, 0.06);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.lyrics-slide-num,
.song-pick-item-meta {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.lyrics-slide-chip p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.song-pick-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.song-pick-item-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.web-context-menu {
  position: fixed;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-sizing: border-box;
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(220, 240, 255, 0.14);
  border-radius: 8px;
  background: rgba(10, 11, 13, 0.98);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.48);
  color: var(--text);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(79, 179, 255, 0.54) rgba(220, 240, 255, 0.06);
}

.web-context-menu::-webkit-scrollbar {
  width: 8px;
}

.web-context-menu::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(220, 240, 255, 0.04);
}

.web-context-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(79, 179, 255, 0.52);
}

.web-context-menu[hidden] {
  display: none;
}

.web-context-menu.has-preview-items {
  gap: 8px;
}

.web-context-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

.web-context-item:hover,
.web-context-item:focus-visible {
  background: rgba(79, 179, 255, 0.14);
  outline: none;
}

.web-context-item:disabled {
  cursor: default;
  opacity: 0.42;
}

.web-context-item.is-danger {
  color: #ffb4b4;
}

.web-context-item.is-preview {
  display: grid;
  grid-template-columns: 18px 112px minmax(0, 1fr);
  gap: 12px;
  min-height: 82px;
  padding: 8px 10px;
  text-align: left;
}

.web-context-preview-check {
  align-self: center;
  color: #9ed0ff;
  font-size: 0.78rem;
  font-weight: 950;
}

.web-context-preview-thumb {
  position: relative;
  align-self: center;
  width: 112px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(220, 240, 255, 0.13);
  border-radius: 5px;
  background: #000000;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.34);
}

.web-context-preview-thumb .web-stage-preview {
  width: 100%;
  height: 100%;
}

.web-context-preview-copy {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.web-context-preview-copy strong,
.web-context-preview-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-context-preview-copy strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 950;
}

.web-context-preview-copy small {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.68rem;
  font-weight: 760;
}

.web-context-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-context-color-chip {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 1px solid rgba(220, 240, 255, 0.3);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.web-context-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--text3);
}

.web-context-shortcut {
  font-size: 0.68rem;
}

.web-context-arrow {
  font-size: 1rem;
  line-height: 1;
}

.web-context-separator {
  height: 1px;
  margin: 4px 2px;
  background: rgba(220, 240, 255, 0.1);
}

.web-context-section-label {
  padding: 7px 8px 3px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  cursor: default;
}

#toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 7000;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 220px;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(11, 11, 11, 0.98);
  color: var(--text);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  font-size: 0.72rem;
  font-weight: 900;
}

.toast-error {
  border-color: rgba(248, 113, 113, 0.42);
}

@media (max-width: 1380px) {
  :root {
    --thumb-columns: 3;
    --show-tools-width: 320px;
  }

  .topbar {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .topbar-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 1080px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100vh;
    height: auto;
  }

  .topbar,
  .show-workspace {
    grid-template-columns: 1fr;
  }

  .show-sidebar-resizer,
  .show-tools-resizer {
    display: none;
  }

  .library-sidebar {
    grid-template-rows: minmax(120px, auto) 6px minmax(120px, auto) 6px minmax(180px, auto);
  }

  .studio-shell,
  .show-tools {
    min-height: 520px;
  }
}
