:root {
  color-scheme: light;
  font-family: Inter, Arial, Helvetica, sans-serif;
  --navy: #0b1f3a;
  --gold: #d4a72c;
  --cyan: #00a6c8;
  --ink: #132039;
  --muted: #68758b;
  --line: #d9e1ec;
  --panel: #ffffff;
  --surface: #eef3f9;
  --control: #f7f9fc;
  --focus: #1769e0;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
canvas:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.24);
  outline-offset: 1px;
}

.studio-topbar {
  position: relative;
  z-index: 10;
  display: grid;
  height: 66px;
  grid-template-columns: minmax(245px, auto) 1fr minmax(290px, auto);
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid #d7e0ec;
  background: rgba(255, 255, 255, 0.97);
  padding: 8px 14px;
  box-shadow: 0 4px 18px rgba(24, 45, 76, 0.08);
}

.studio-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.studio-brand img {
  width: 108px;
  height: 43px;
  object-fit: contain;
}

.studio-brand span {
  display: grid;
  min-width: 0;
}

.studio-brand strong {
  font-size: 0.88rem;
}

.studio-brand small {
  color: var(--muted);
  font-size: 0.66rem;
}

.studio-file-actions,
.studio-project-meta,
.workspace-view-actions,
.side-tabs,
.object-actions,
.upload-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.studio-file-actions button,
.workspace-view-actions button,
.object-actions button,
.upload-actions button,
.full-command {
  min-height: 36px;
  border: 1px solid #ccd6e4;
  border-radius: 6px;
  background: #fff;
  padding: 7px 11px;
  color: #27364d;
  font-size: 0.73rem;
  font-weight: 800;
}

.studio-file-actions button:hover,
.workspace-view-actions button:hover,
.object-actions button:hover,
.upload-actions button:hover,
.full-command:hover {
  border-color: #8da9cf;
  background: #f4f8fd;
}

.studio-file-actions .icon-command {
  width: 36px;
  padding: 0;
  font-size: 1.2rem;
}

.studio-divider {
  width: 1px;
  height: 28px;
  background: #dce3ed;
}

.studio-project-meta {
  justify-content: end;
}

.studio-project-meta label {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.studio-project-meta input {
  width: 160px;
  border: 0;
  border-bottom: 1px solid #b9c6d8;
  background: transparent;
  padding: 3px 1px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.studio-download {
  min-height: 42px;
  border: 1px solid #07172d;
  border-radius: 6px;
  background: var(--navy);
  padding: 9px 17px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 7px 16px rgba(11, 31, 58, 0.18);
}

.studio-shell {
  display: grid;
  height: calc(100dvh - 66px);
  min-height: 0;
  grid-template-columns: 68px minmax(0, 1fr) 338px;
}

.studio-toolrail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 10px 7px;
}

.studio-toolrail button {
  display: grid;
  min-height: 56px;
  place-items: center;
  gap: 1px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  padding: 5px 2px;
  color: #485970;
}

.studio-toolrail button:hover,
.studio-toolrail button.active {
  border-color: #c7d6ea;
  background: #edf4fd;
  color: #145bbd;
}

.studio-toolrail b {
  font-size: 1.2rem;
  line-height: 1;
}

.studio-toolrail span {
  font-size: 0.58rem;
  font-weight: 850;
}

.studio-workspace {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 52px minmax(0, 1fr) auto 30px;
}

.workspace-toolbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #f9fbfd;
  padding: 7px 14px;
}

.side-tabs {
  border: 1px solid #cfd9e6;
  border-radius: 6px;
  background: #eef3f8;
  padding: 3px;
}

.side-tabs button,
.inspector-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 7px 12px;
  color: #66758b;
  font-size: 0.7rem;
  font-weight: 850;
}

.side-tabs button.active,
.inspector-tabs button.active {
  background: #fff;
  color: #1559b6;
  box-shadow: 0 2px 7px rgba(28, 63, 107, 0.12);
}

.workspace-view-actions {
  color: #5f6e83;
  font-size: 0.68rem;
  font-weight: 800;
}

.workspace-view-actions label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.workspace-view-actions input {
  accent-color: var(--focus);
}

.canvas-viewport {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: auto;
  background:
    linear-gradient(45deg, rgba(38, 58, 87, 0.035) 25%, transparent 25% 75%, rgba(38, 58, 87, 0.035) 75%),
    linear-gradient(45deg, rgba(38, 58, 87, 0.035) 25%, transparent 25% 75%, rgba(38, 58, 87, 0.035) 75%),
    #e7edf4;
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
  padding: 38px 46px 46px 54px;
}

.canvas-stage {
  display: grid;
  max-width: 100%;
  max-height: 100%;
  place-items: center;
}

#idCanvas {
  display: block;
  width: auto;
  height: auto;
  max-width: min(860px, calc(100vw - 500px), 100%);
  max-height: calc(100dvh - 196px);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(29, 46, 72, 0.26);
  touch-action: none;
}

.canvas-measure {
  position: absolute;
  display: flex;
  color: #76859a;
  font-size: 0.58rem;
  font-weight: 750;
  pointer-events: none;
}

.canvas-measure-x {
  top: 13px;
  left: 54px;
  right: 34px;
  justify-content: space-between;
}

.canvas-measure-y {
  top: 40px;
  bottom: 44px;
  left: 14px;
  flex-direction: column;
  justify-content: space-between;
}

.studio-statusbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 5px 13px;
  color: #637188;
  font-size: 0.61rem;
  font-weight: 800;
}

.studio-inspector {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 49px minmax(0, 1fr);
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  border-bottom: 1px solid var(--line);
  background: #f3f6fa;
  padding: 7px;
}

.inspector-scroll {
  min-height: 0;
  overflow-y: auto;
  scrollbar-color: #a8b8cd transparent;
  scrollbar-width: thin;
}

.inspector-panel {
  display: none;
  padding: 13px;
}

.inspector-panel.active {
  display: block;
}

.inspector-section {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid #e2e8f0;
  padding: 5px 0 16px;
  margin-bottom: 12px;
}

.inspector-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inspector-heading span {
  color: #24344c;
  font-size: 0.72rem;
  font-weight: 900;
}

.inspector-heading strong,
.inspector-heading small {
  color: #6b7a8f;
  font-size: 0.62rem;
}

.studio-inspector label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: #617086;
  font-size: 0.64rem;
  font-weight: 850;
}

.studio-inspector input:not([type="checkbox"], [type="range"], [type="color"]),
.studio-inspector select,
.studio-inspector textarea {
  width: 100%;
  min-height: 37px;
  border: 1px solid #cfd8e5;
  border-radius: 5px;
  background: #fff;
  padding: 7px 9px;
  color: #17263c;
  font-size: 0.72rem;
  font-weight: 700;
}

.studio-inspector textarea {
  min-height: 62px;
  resize: vertical;
}

.studio-inspector input[type="color"] {
  width: 100%;
  height: 37px;
  border: 1px solid #cfd8e5;
  border-radius: 5px;
  background: #fff;
  padding: 3px;
}

.studio-inspector input[type="range"] {
  width: 100%;
  accent-color: var(--focus);
}

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

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid #d2dce8;
  border-radius: 6px;
  background: #f2f5f9;
  padding: 3px;
}

.segmented-control label {
  position: relative;
  display: block;
}

.segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented-control span {
  display: grid;
  min-height: 32px;
  place-items: center;
  border-radius: 4px;
  color: #637188;
  font-size: 0.62rem;
  font-weight: 850;
  cursor: pointer;
}

.segmented-control input:checked + span {
  background: #fff;
  color: #135dbc;
  box-shadow: 0 2px 6px rgba(29, 62, 104, 0.12);
}

.object-actions {
  flex-wrap: wrap;
}

.object-actions button {
  flex: 1 1 44%;
}

.object-actions .danger {
  border-color: #efc1c1;
  color: #ad2020;
}

.upload-actions button {
  flex: 1;
}

.full-command {
  width: 100%;
}

.inspector-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  color: #65748a;
  text-align: center;
}

.inspector-empty strong {
  color: #26354b;
}

.inspector-empty p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.55;
}

.layer-list {
  display: grid;
  gap: 6px;
}

.layer-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #d5deea;
  border-radius: 6px;
  background: #fff;
  padding: 7px;
  color: #33445c;
}

.layer-item.active {
  border-color: #5f91d2;
  background: #eef5ff;
}

.layer-item button {
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.layer-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 4px;
  background: #e9eff7;
  font-size: 0.68rem;
  font-weight: 900;
}

.layer-copy {
  display: grid;
  min-width: 0;
}

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

.layer-copy strong {
  font-size: 0.68rem;
}

.layer-copy small {
  color: #718096;
  font-size: 0.57rem;
}

.layer-state {
  color: #8090a5;
  font-size: 0.62rem;
}

.studio-toast {
  position: fixed;
  z-index: 50;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100% - 36px));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: #10243f;
  padding: 11px 14px;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.studio-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .studio-topbar {
    grid-template-columns: auto 1fr;
  }

  .studio-project-meta {
    display: none;
  }

  .studio-shell {
    grid-template-columns: 64px minmax(0, 1fr) 310px;
  }

  #idCanvas {
    max-width: min(720px, calc(100vw - 440px), 100%);
  }
}

@media (max-width: 820px) {
  html,
  body {
    overflow: auto;
  }

  .studio-topbar {
    position: sticky;
    top: 0;
    height: auto;
    min-height: 66px;
    grid-template-columns: 1fr;
  }

  .studio-brand span {
    display: none;
  }

  .studio-file-actions {
    flex-wrap: wrap;
  }

  .studio-shell {
    height: auto;
    min-height: calc(100dvh - 66px);
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .studio-workspace {
    min-height: 620px;
  }

  .studio-inspector {
    min-height: 620px;
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .canvas-viewport {
    padding: 34px 14px 40px 36px;
  }

  #idCanvas {
    max-width: min(100%, 720px);
    max-height: 500px;
  }

  .workspace-view-actions label {
    display: none;
  }

  .studio-statusbar {
    overflow-x: auto;
    justify-content: start;
  }
}

@media (max-width: 520px) {
  .studio-file-actions button {
    min-height: 34px;
    padding-inline: 9px;
  }

  .workspace-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .side-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .studio-workspace {
    grid-template-rows: auto minmax(0, 1fr) auto 30px;
  }

  .canvas-measure {
    display: none;
  }

  .canvas-viewport {
    padding: 20px 10px;
  }
}

/* ID card ordering and shared payment */
.studio-orderbar {
  display: flex;
  min-width: 0;
  align-items: end;
  gap: 9px;
  overflow-x: auto;
  border-top: 1px solid rgba(83, 116, 149, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.5) 55%, rgba(112, 220, 236, 0.16)),
    rgba(255, 255, 255, 0.62);
  padding: 9px 12px;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 -8px 24px rgba(64, 94, 124, 0.08);
  backdrop-filter: blur(26px) saturate(1.35);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);
}

.studio-order-product {
  display: grid;
  min-width: 176px;
  gap: 1px;
}

.studio-order-product span,
.studio-order-total span,
.studio-orderbar > label {
  color: #5a6d82;
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.studio-order-product strong {
  color: #15344e;
  font-size: 0.74rem;
}

.studio-order-product small,
.studio-order-total small {
  color: #65778d;
  font-size: 0.56rem;
  font-weight: 750;
}

.studio-orderbar > label {
  display: grid;
  flex: 0 0 120px;
  gap: 4px;
}

.studio-orderbar > label:nth-of-type(2),
.studio-orderbar > label:nth-of-type(3) {
  flex-basis: 145px;
}

.studio-orderbar input,
.studio-orderbar select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(77, 111, 143, 0.23);
  border-radius: 7px;
  background:
    linear-gradient(145deg, #ffffff, rgba(237, 249, 252, 0.67)),
    rgba(255, 255, 255, 0.78);
  padding: 6px 8px;
  color: #15344e;
  font-size: 0.67rem;
  font-weight: 820;
  box-shadow: inset 0 1px 0 #ffffff;
}

.studio-order-total {
  display: grid;
  min-width: 108px;
  gap: 1px;
  border-left: 1px solid rgba(76, 111, 143, 0.18);
  padding-left: 10px;
}

.studio-order-total strong {
  color: #086b81;
  font-size: 1rem;
}

.studio-order-actions {
  display: flex;
  min-width: max-content;
  align-items: center;
  gap: 7px;
}

.studio-order-actions > button,
.studio-order-actions > a {
  display: inline-flex;
  width: auto;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.66rem;
  font-weight: 900;
  text-decoration: none;
}

.studio-whatsapp-order {
  border: 1px solid rgba(25, 132, 95, 0.3);
  background: linear-gradient(145deg, #ffffff, rgba(194, 241, 224, 0.72));
  color: #177354;
  box-shadow: inset 0 1px 0 #ffffff, 0 7px 18px rgba(38, 126, 95, 0.1);
}

.studio-payment-command,
.studio-order-actions .cart-action {
  border: 1px solid rgba(7, 122, 148, 0.38);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(97, 217, 235, 0.22)),
    #087f9b;
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 8px 20px rgba(8, 126, 155, 0.17);
}

.studio-order-actions .secondary-action,
.studio-order-actions .wallet-payment-shortcut {
  width: auto;
  min-height: 40px;
  margin: 0;
  white-space: nowrap;
}

.studio-project-meta .shared-cart-trigger {
  min-height: 42px;
  border-color: rgba(74, 111, 144, 0.24);
  background: linear-gradient(145deg, #ffffff, rgba(218, 243, 248, 0.66));
  color: #21415c;
  box-shadow: inset 0 1px 0 #ffffff, 0 7px 17px rgba(61, 99, 126, 0.1);
}

.studio-project-meta .shared-cart-trigger strong {
  background: #5a48b6;
}

@media (max-width: 820px) {
  .studio-orderbar {
    flex-wrap: wrap;
    overflow: visible;
  }

  .studio-order-product {
    flex: 1 1 180px;
  }

  .studio-order-actions {
    flex: 1 1 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .studio-orderbar > label {
    flex: 1 1 120px;
  }

  .studio-order-total {
    min-width: 100px;
  }
}

/* Apple-inspired liquid-glass workspace */
:root {
  color-scheme: dark;
  --navy: #071520;
  --gold: #ffc85a;
  --cyan: #54d9ee;
  --ink: #ffffff;
  --muted: #c4cfdd;
  --line: rgba(231, 245, 255, 0.27);
  --panel: rgba(28, 41, 57, 0.72);
  --surface: #0b1520;
  --control: rgba(255, 255, 255, 0.12);
  --focus: #7aebfa;
  --glass-highlight: rgba(255, 255, 255, 0.29);
  --glass-lowlight: rgba(0, 0, 0, 0.28);
  --glass-cyan: rgba(84, 217, 238, 0.15);
  --glass-violet: rgba(151, 132, 255, 0.11);
}

html,
body {
  background:
    linear-gradient(118deg, rgba(92, 224, 241, 0.17) 0%, transparent 34%),
    linear-gradient(242deg, rgba(168, 151, 255, 0.14) 0%, transparent 38%),
    linear-gradient(135deg, #0a131d 0%, #152536 48%, #0d2521 100%);
  color: var(--ink);
}

button {
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
canvas:focus-visible {
  outline-color: rgba(57, 201, 240, 0.42);
}

.studio-topbar,
.studio-toolrail,
.workspace-toolbar,
.studio-statusbar,
.studio-inspector {
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.065) 42%, rgba(84, 217, 238, 0.08)),
    rgba(19, 31, 44, 0.7);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 9px 24px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(32px) saturate(1.5) brightness(1.14);
  -webkit-backdrop-filter: blur(32px) saturate(1.5) brightness(1.14);
}

.studio-topbar {
  border-bottom-color: rgba(135, 205, 233, 0.17);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.37),
    inset 0 -1px 0 rgba(84, 217, 238, 0.18),
    0 14px 38px rgba(0, 0, 0, 0.18);
}

.studio-topbar::after {
  position: absolute;
  right: 8%;
  bottom: 0;
  left: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(105, 230, 246, 0.52), rgba(194, 181, 255, 0.4), transparent);
  content: "";
  pointer-events: none;
}

.studio-brand img {
  filter: brightness(1.18) saturate(1.04);
}

.studio-brand strong,
.inspector-heading span,
.inspector-empty strong {
  color: #ffffff;
}

.studio-brand small,
.studio-project-meta label,
.workspace-view-actions,
.canvas-measure,
.studio-statusbar,
.inspector-heading strong,
.inspector-heading small,
.studio-inspector label,
.inspector-empty,
.layer-copy small,
.layer-state {
  color: var(--muted);
}

.studio-file-actions button,
.workspace-view-actions button,
.object-actions button,
.upload-actions button,
.full-command,
.studio-pdf {
  border-color: rgba(223, 239, 255, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.21), rgba(255, 255, 255, 0.08) 56%, rgba(86, 218, 238, 0.09)),
    rgba(23, 39, 53, 0.52);
  color: #f6fbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.31),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 6px 16px rgba(0, 0, 0, 0.09);
}

.studio-file-actions button:hover,
.workspace-view-actions button:hover,
.object-actions button:hover,
.upload-actions button:hover,
.full-command:hover,
.studio-pdf:hover {
  border-color: rgba(70, 207, 234, 0.52);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(84, 217, 238, 0.17)),
    rgba(28, 67, 79, 0.58);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 20px rgba(26, 180, 207, 0.12);
}

.studio-divider {
  background: var(--line);
}

.studio-project-meta input {
  border-bottom-color: rgba(174, 211, 238, 0.28);
  color: var(--ink);
}

.studio-pdf,
.studio-download {
  min-height: 42px;
  border-radius: 8px;
  padding: 9px 15px;
  font-size: 0.74rem;
  font-weight: 900;
}

.studio-pdf {
  border-color: rgba(255, 211, 111, 0.5);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 200, 90, 0.08)),
    rgba(54, 39, 12, 0.42);
  color: #ffe6a9;
}

.studio-pdf:hover {
  border-color: #ffd36f;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 200, 90, 0.14)),
    rgba(64, 45, 10, 0.5);
}

.studio-download {
  border-color: rgba(115, 229, 244, 0.62);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(84, 217, 238, 0.08) 42%),
    rgba(7, 94, 111, 0.76);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 10px 24px rgba(0, 166, 200, 0.22);
}

.studio-download:hover {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(84, 217, 238, 0.11) 42%),
    rgba(7, 116, 133, 0.82);
}

.studio-toolrail {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 50%),
    rgba(17, 29, 42, 0.72);
}

.studio-toolrail button {
  color: #d3deea;
}

.studio-toolrail button:hover,
.studio-toolrail button.active {
  border-color: rgba(112, 223, 240, 0.36);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.25), rgba(84, 217, 238, 0.14)),
    rgba(34, 77, 90, 0.48);
  color: #bcf6ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

.workspace-toolbar {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.15), transparent 62%),
    rgba(21, 35, 50, 0.7);
}

.side-tabs {
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.26);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.34);
}

.side-tabs button,
.inspector-tabs button {
  color: #c4d0df;
}

.side-tabs button.active,
.inspector-tabs button.active {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(84, 217, 238, 0.15)),
    rgba(35, 92, 106, 0.48);
  color: #d0faff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.21),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 6px 16px rgba(0, 0, 0, 0.2);
}

.canvas-viewport {
  background:
    linear-gradient(45deg, rgba(208, 235, 251, 0.055) 25%, transparent 25% 75%, rgba(208, 235, 251, 0.055) 75%),
    linear-gradient(45deg, rgba(208, 235, 251, 0.055) 25%, transparent 25% 75%, rgba(208, 235, 251, 0.055) 75%),
    linear-gradient(118deg, rgba(84, 225, 242, 0.13), transparent 36%),
    linear-gradient(242deg, rgba(165, 147, 255, 0.1), transparent 40%),
    linear-gradient(135deg, #101a25 0%, #1c2b3a 58%, #112b27 100%);
  background-position: 0 0, 10px 10px, 0 0;
  background-size: 20px 20px, 20px 20px, auto, auto, auto;
}

#idCanvas {
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(118, 224, 240, 0.08),
    0 0 34px rgba(84, 217, 238, 0.045);
}

.studio-statusbar {
  background: rgba(18, 30, 43, 0.76);
}

.studio-inspector {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.16), transparent 35%),
    rgba(20, 33, 47, 0.74);
}

.inspector-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.035);
}

.inspector-tabs button {
  min-width: 0;
  padding-inline: 5px;
  font-size: 0.61rem;
}

.inspector-section {
  border-bottom-color: var(--line);
}

.studio-inspector input:not([type="checkbox"], [type="range"], [type="color"]),
.studio-inspector select,
.studio-inspector textarea {
  border-color: rgba(228, 242, 255, 0.25);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)),
    rgba(19, 31, 44, 0.62);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 2px rgba(0, 0, 0, 0.24);
}

.studio-inspector input::placeholder,
.studio-inspector textarea::placeholder {
  color: #718096;
}

.studio-inspector select option {
  background: #101925;
  color: #edf5ff;
}

.studio-inspector input[type="color"] {
  border-color: rgba(184, 218, 243, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.segmented-control {
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.32);
}

.segmented-control span {
  color: #9bacc0;
}

.segmented-control input:checked + span {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(84, 217, 238, 0.07)),
    rgba(25, 68, 79, 0.38);
  color: #98eef8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.16);
}

.object-actions .danger {
  border-color: rgba(244, 104, 112, 0.35);
  color: #ff9ca3;
}

.layer-list {
  gap: 7px;
}

.layer-item {
  border-color: rgba(228, 242, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045)),
    rgba(21, 35, 49, 0.54);
  color: #f1f7fd;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 5px 14px rgba(0, 0, 0, 0.11);
}

.layer-item.active {
  border-color: rgba(58, 209, 234, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(84, 217, 238, 0.07)),
    rgba(17, 57, 68, 0.34);
}

.layer-icon {
  background: rgba(54, 198, 224, 0.11);
  color: #7ee6f4;
  font-size: 0.58rem;
}

.studio-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 0 13px 18px;
}

.studio-template-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(228, 242, 255, 0.23);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045)),
    rgba(21, 35, 49, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 8px 20px rgba(0, 0, 0, 0.12);
}

.studio-template-card > button {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 7px;
  border: 0;
  background: transparent;
  padding: 8px;
  color: #edf5ff;
  text-align: left;
}

.studio-template-card:hover {
  border-color: rgba(103, 222, 240, 0.46);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(84, 217, 238, 0.065)),
    rgba(12, 40, 48, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 26px rgba(0, 0, 0, 0.18);
}

.template-miniature {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 85.6 / 53.98;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  background: var(--template-background);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.template-miniature.portrait {
  width: 63%;
  aspect-ratio: 53.98 / 85.6;
  justify-self: center;
}

.template-miniature i {
  position: absolute;
  display: block;
}

.mini-primary {
  inset: 0 0 auto;
  height: 23%;
  background: var(--template-primary);
}

.mini-accent {
  top: 23%;
  right: 0;
  left: 0;
  height: 5%;
  background: var(--template-accent);
}

.mini-photo {
  top: 38%;
  left: 9%;
  width: 25%;
  aspect-ratio: 0.78;
  border-radius: 2px;
  background: color-mix(in srgb, var(--template-primary) 24%, #dce5ee);
}

.mini-line {
  left: 41%;
  height: 5%;
  border-radius: 3px;
  background: var(--template-primary);
}

.mini-line.one {
  top: 42%;
  width: 42%;
}

.mini-line.two {
  top: 54%;
  width: 30%;
  opacity: 0.46;
}

.mini-qr {
  right: 8%;
  bottom: 9%;
  width: 15%;
  aspect-ratio: 1;
  border: 3px double var(--template-primary);
  background: var(--template-background);
}

.layout-1 .mini-primary {
  inset: 0 auto 0 0;
  width: 24%;
  height: auto;
}

.layout-1 .mini-accent {
  inset: 0 auto 0 24%;
  width: 4%;
  height: auto;
}

.layout-1 .mini-photo {
  left: 34%;
}

.layout-1 .mini-line {
  left: 64%;
}

.layout-2 .mini-primary {
  inset: 0 0 0 auto;
  width: 38%;
  height: auto;
}

.layout-2 .mini-accent {
  inset: 0 auto 0 0;
  width: 4%;
  height: auto;
}

.layout-2 .mini-qr {
  border-color: var(--template-accent);
}

.layout-3 .mini-primary {
  top: auto;
  bottom: 0;
  height: 10%;
}

.layout-3 .mini-accent {
  top: 0;
  height: 6%;
}

.layout-3 .mini-photo {
  right: 8%;
  left: auto;
}

.layout-3 .mini-line {
  left: 9%;
}

.layout-4 .mini-primary {
  top: auto;
  bottom: 0;
  height: 35%;
}

.layout-4 .mini-accent {
  top: 0;
  width: 28%;
  height: 13%;
}

.template-miniature.portrait .mini-photo {
  top: 28%;
  left: 27%;
  width: 46%;
}

.template-miniature.portrait .mini-line {
  left: 18%;
}

.template-miniature.portrait .mini-line.one {
  top: 63%;
  width: 64%;
}

.template-miniature.portrait .mini-line.two {
  top: 71%;
  width: 48%;
}

.template-miniature.portrait .mini-qr {
  width: 21%;
}

.template-card-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

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

.template-card-copy strong {
  color: #edf6ff;
  font-size: 0.64rem;
}

.template-card-copy small {
  color: #91a2b7;
  font-size: 0.54rem;
}

.template-swatches {
  display: flex;
  gap: 4px;
}

.template-swatches i {
  width: 13px;
  height: 4px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 2px;
}

.template-empty {
  display: grid;
  grid-column: 1 / -1;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: var(--muted);
  text-align: center;
}

.template-empty strong {
  color: #eef6ff;
  font-size: 0.76rem;
}

.template-empty span {
  font-size: 0.64rem;
}

.studio-toast {
  border-color: rgba(92, 220, 235, 0.25);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(84, 217, 238, 0.05)),
    rgba(6, 20, 29, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    inset 0 -1px 0 rgba(0, 0, 0, 0.24),
    0 18px 42px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
}

@media (max-width: 1120px) {
  .studio-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .studio-brand span,
  .studio-project-meta label {
    display: none;
  }

  .studio-brand img {
    width: 86px;
  }

  .studio-project-meta {
    display: flex;
  }

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

@media (max-width: 820px) {
  .studio-topbar {
    grid-template-columns: 1fr;
  }

  .studio-project-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .studio-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .studio-template-grid {
    grid-template-columns: 1fr;
  }

  .inspector-tabs button {
    font-size: 0.57rem;
  }
}

/* Light mirror-liquid glass mode */
:root {
  color-scheme: light;
  --navy: #122d4f;
  --gold: #b77916;
  --cyan: #078ea9;
  --ink: #101828;
  --muted: #52627a;
  --line: rgba(96, 125, 157, 0.24);
  --panel: rgba(255, 255, 255, 0.58);
  --surface: #eef6fc;
  --control: rgba(255, 255, 255, 0.62);
  --focus: #087ea4;
  --glass-highlight: rgba(255, 255, 255, 0.95);
}

html,
body {
  background:
    linear-gradient(118deg, rgba(96, 218, 239, 0.23) 0%, transparent 34%),
    linear-gradient(242deg, rgba(175, 151, 255, 0.2) 0%, transparent 39%),
    linear-gradient(135deg, #e9f7ff 0%, #f9fbff 42%, #f5f0ff 71%, #edfbf5 100%);
  color: var(--ink);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
canvas:focus-visible {
  outline-color: rgba(8, 126, 164, 0.34);
}

.studio-topbar,
.studio-toolrail,
.workspace-toolbar,
.studio-statusbar,
.studio-inspector {
  border-color: rgba(107, 135, 164, 0.25);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.5) 45%, rgba(147, 229, 244, 0.2)),
    rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(73, 108, 139, 0.11),
    0 10px 28px rgba(60, 87, 118, 0.12);
  backdrop-filter: blur(32px) saturate(1.5) brightness(1.08);
  -webkit-backdrop-filter: blur(32px) saturate(1.5) brightness(1.08);
}

.studio-topbar {
  border-bottom-color: rgba(74, 126, 160, 0.25);
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(89, 198, 218, 0.18),
    0 15px 38px rgba(53, 86, 118, 0.14);
}

.studio-brand img {
  filter: saturate(1.06);
}

.studio-brand strong,
.inspector-heading span,
.inspector-empty strong {
  color: #10233b;
}

.studio-brand small,
.studio-project-meta label,
.workspace-view-actions,
.canvas-measure,
.studio-statusbar,
.inspector-heading strong,
.inspector-heading small,
.studio-inspector label,
.inspector-empty,
.layer-copy small,
.layer-state {
  color: #52627a;
}

.studio-file-actions button,
.workspace-view-actions button,
.object-actions button,
.upload-actions button,
.full-command,
.studio-pdf {
  border-color: rgba(82, 115, 148, 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.54) 58%, rgba(121, 219, 238, 0.14)),
    rgba(255, 255, 255, 0.46);
  color: #1d3552;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(62, 93, 124, 0.1),
    0 6px 18px rgba(59, 86, 116, 0.1);
}

.studio-file-actions button:hover,
.workspace-view-actions button:hover,
.object-actions button:hover,
.upload-actions button:hover,
.full-command:hover,
.studio-pdf:hover {
  border-color: rgba(8, 142, 169, 0.42);
  background:
    linear-gradient(145deg, #ffffff, rgba(209, 246, 252, 0.7)),
    rgba(255, 255, 255, 0.68);
  color: #0d5065;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 9px 22px rgba(43, 135, 157, 0.13);
}

.studio-divider {
  background: rgba(82, 113, 145, 0.22);
}

.studio-project-meta input {
  border-bottom-color: rgba(55, 94, 132, 0.31);
  color: #122842;
}

.studio-pdf {
  border-color: rgba(183, 121, 22, 0.33);
  background:
    linear-gradient(145deg, #ffffff, rgba(255, 231, 177, 0.46)),
    rgba(255, 249, 233, 0.72);
  color: #7c510c;
}

.studio-pdf:hover {
  border-color: rgba(183, 121, 22, 0.52);
  background:
    linear-gradient(145deg, #ffffff, rgba(255, 221, 144, 0.58)),
    rgba(255, 248, 228, 0.8);
}

.studio-download {
  border-color: rgba(7, 125, 151, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(97, 217, 235, 0.25) 43%),
    #087f9b;
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -1px 0 rgba(0, 63, 79, 0.2),
    0 10px 24px rgba(8, 126, 155, 0.2);
}

.studio-download:hover {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(118, 229, 244, 0.28) 43%),
    #0792ad;
}

.studio-toolrail {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.42) 56%),
    rgba(248, 252, 255, 0.56);
}

.studio-toolrail button {
  color: #53657b;
}

.studio-toolrail button:hover,
.studio-toolrail button.active {
  border-color: rgba(25, 146, 170, 0.3);
  background:
    linear-gradient(145deg, #ffffff, rgba(194, 239, 248, 0.64)),
    rgba(255, 255, 255, 0.67);
  color: #076b81;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(63, 115, 137, 0.1),
    0 8px 20px rgba(64, 123, 148, 0.12);
}

.workspace-toolbar {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.42) 62%),
    rgba(245, 251, 255, 0.56);
}

.side-tabs,
.segmented-control {
  border-color: rgba(86, 116, 148, 0.22);
  background: rgba(110, 145, 177, 0.1);
  box-shadow: inset 0 1px 3px rgba(70, 100, 130, 0.1);
}

.side-tabs button,
.inspector-tabs button,
.segmented-control span {
  color: #5a6b81;
}

.side-tabs button.active,
.inspector-tabs button.active,
.segmented-control input:checked + span {
  background:
    linear-gradient(145deg, #ffffff, rgba(208, 246, 251, 0.64)),
    rgba(255, 255, 255, 0.66);
  color: #076a80;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(61, 102, 129, 0.1),
    0 6px 16px rgba(58, 101, 130, 0.12);
}

.canvas-viewport {
  background:
    linear-gradient(45deg, rgba(65, 103, 139, 0.035) 25%, transparent 25% 75%, rgba(65, 103, 139, 0.035) 75%),
    linear-gradient(45deg, rgba(65, 103, 139, 0.035) 25%, transparent 25% 75%, rgba(65, 103, 139, 0.035) 75%),
    linear-gradient(118deg, rgba(89, 216, 236, 0.19), transparent 39%),
    linear-gradient(242deg, rgba(174, 151, 255, 0.15), transparent 43%),
    linear-gradient(135deg, #e7f4fb 0%, #f5f8fc 58%, #eaf8f3 100%);
  background-position: 0 0, 10px 10px, 0 0;
  background-size: 20px 20px, 20px 20px, auto, auto, auto;
}

#idCanvas {
  border-color: rgba(75, 108, 139, 0.18);
  box-shadow:
    0 28px 64px rgba(65, 89, 116, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.92),
    0 0 36px rgba(72, 199, 220, 0.08);
}

.studio-statusbar {
  background: rgba(255, 255, 255, 0.64);
}

.studio-inspector {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.42) 38%),
    rgba(247, 251, 255, 0.55);
}

.inspector-tabs {
  background: rgba(111, 145, 177, 0.07);
  box-shadow: inset 0 -1px 0 rgba(68, 99, 130, 0.1);
}

.inspector-section {
  border-bottom-color: rgba(88, 116, 145, 0.19);
}

.studio-inspector input:not([type="checkbox"], [type="range"], [type="color"]),
.studio-inspector select,
.studio-inspector textarea {
  border-color: rgba(80, 111, 143, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.62);
  color: #142942;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 2px rgba(65, 94, 123, 0.08);
}

.studio-inspector input::placeholder,
.studio-inspector textarea::placeholder {
  color: #7a899d;
}

.studio-inspector select option {
  background: #ffffff;
  color: #142942;
}

.studio-inspector input[type="color"] {
  border-color: rgba(80, 111, 143, 0.24);
  background: rgba(255, 255, 255, 0.74);
}

.object-actions .danger {
  border-color: rgba(198, 68, 76, 0.28);
  color: #a52d36;
}

.layer-item {
  border-color: rgba(89, 119, 149, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.5)),
    rgba(255, 255, 255, 0.55);
  color: #213a56;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 6px 17px rgba(70, 99, 128, 0.08);
}

.layer-item.active {
  border-color: rgba(8, 142, 169, 0.34);
  background:
    linear-gradient(145deg, #ffffff, rgba(204, 243, 250, 0.7)),
    rgba(255, 255, 255, 0.7);
}

.layer-icon {
  background: rgba(20, 154, 179, 0.12);
  color: #087188;
}

.studio-template-card {
  border-color: rgba(83, 115, 146, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.52)),
    rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(56, 89, 119, 0.08),
    0 9px 22px rgba(72, 99, 127, 0.09);
}

.studio-template-card > button {
  color: #142942;
}

.studio-template-card:hover {
  border-color: rgba(9, 142, 168, 0.36);
  background:
    linear-gradient(145deg, #ffffff, rgba(211, 246, 251, 0.68)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 13px 28px rgba(67, 112, 138, 0.12);
}

.template-card-copy strong,
.template-empty strong {
  color: #17324e;
}

.template-card-copy small,
.template-empty {
  color: #66778d;
}

.studio-toast {
  border-color: rgba(56, 130, 153, 0.23);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(211, 247, 251, 0.62)),
    rgba(255, 255, 255, 0.76);
  color: #12344a;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(61, 104, 130, 0.09),
    0 18px 42px rgba(64, 94, 121, 0.18);
}

/* Visible crystal tool buttons */
.studio-shell {
  grid-template-columns: 78px minmax(0, 1fr) 338px;
}

.studio-toolrail {
  gap: 7px;
  padding: 10px 8px;
}

.studio-toolrail button {
  min-height: 58px;
  border: 1px solid rgba(83, 116, 149, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.52) 58%, rgba(121, 219, 238, 0.13)),
    rgba(255, 255, 255, 0.56);
  color: #40566f;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(57, 89, 120, 0.08),
    0 6px 17px rgba(68, 98, 128, 0.09);
}

.studio-toolrail button b {
  display: grid;
  width: 28px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(66, 111, 143, 0.16);
  border-radius: 7px;
  background:
    linear-gradient(145deg, #ffffff, rgba(213, 244, 249, 0.55)),
    rgba(255, 255, 255, 0.76);
  color: #0c7790;
  font-size: 0.96rem;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 3px 9px rgba(51, 101, 124, 0.1);
}

.studio-toolrail button span {
  color: inherit;
  font-size: 0.59rem;
}

.studio-toolrail button[data-tool="qr"] b {
  border-color: rgba(100, 87, 192, 0.22);
  background:
    linear-gradient(145deg, #ffffff, rgba(226, 220, 255, 0.67)),
    rgba(255, 255, 255, 0.78);
  color: #5947b5;
  font-size: 0.64rem;
}

.studio-toolrail button:hover,
.studio-toolrail button.active {
  border-color: rgba(17, 143, 169, 0.38);
  background:
    linear-gradient(145deg, #ffffff, rgba(196, 240, 248, 0.76)),
    rgba(255, 255, 255, 0.78);
  color: #075f73;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(42, 105, 126, 0.09),
    0 9px 22px rgba(45, 116, 141, 0.14);
}

.studio-toolrail button:hover b,
.studio-toolrail button.active b {
  border-color: rgba(11, 145, 171, 0.26);
  background: linear-gradient(145deg, #ffffff, rgba(177, 235, 245, 0.78));
  color: #05647a;
}

.studio-toolrail button[data-tool="qr"]:hover b,
.studio-toolrail button[data-tool="qr"].active b {
  border-color: rgba(91, 71, 181, 0.3);
  background: linear-gradient(145deg, #ffffff, rgba(212, 203, 255, 0.8));
  color: #4e3aa8;
}

@media (max-width: 1120px) {
  .studio-shell {
    grid-template-columns: 72px minmax(0, 1fr) 310px;
  }

  .studio-toolrail {
    padding-inline: 6px;
  }
}

@media (max-width: 820px) {
  .studio-shell {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .studio-toolrail {
    padding-inline: 5px;
  }

  .studio-toolrail button {
    min-height: 55px;
  }
}

/* Inspector tab buttons and uploaded-template workflow */
.studio-inspector {
  grid-template-rows: 58px minmax(0, 1fr);
}

.inspector-tabs {
  gap: 6px;
  padding: 7px;
}

.inspector-tabs button {
  min-height: 42px;
  border: 1px solid rgba(83, 116, 149, 0.21);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.51) 60%, rgba(121, 219, 238, 0.12)),
    rgba(255, 255, 255, 0.56);
  color: #53677f;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(57, 89, 120, 0.08),
    0 5px 15px rgba(68, 98, 128, 0.08);
}

.inspector-tabs button:hover {
  border-color: rgba(18, 143, 169, 0.33);
  background: linear-gradient(145deg, #ffffff, rgba(204, 242, 249, 0.69));
  color: #08677c;
}

.inspector-tabs button.active {
  border-color: rgba(8, 139, 165, 0.38);
  background:
    linear-gradient(145deg, #ffffff, rgba(187, 237, 246, 0.78)),
    rgba(255, 255, 255, 0.78);
  color: #075b70;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(39, 104, 125, 0.09),
    0 8px 20px rgba(48, 119, 143, 0.13);
}

.side-workflow {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.template-upload-command {
  min-height: 40px;
  border: 1px solid rgba(92, 74, 184, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(145deg, #ffffff, rgba(224, 218, 255, 0.62)),
    rgba(255, 255, 255, 0.7);
  padding: 7px 12px;
  color: #5946ad;
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(77, 63, 153, 0.08),
    0 7px 18px rgba(85, 68, 165, 0.11);
}

.blank-page-command {
  min-height: 40px;
  border: 1px solid rgba(48, 119, 97, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, #ffffff, rgba(205, 244, 232, 0.62)),
    rgba(255, 255, 255, 0.7);
  padding: 7px 12px;
  color: #28745d;
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(39, 108, 86, 0.08),
    0 7px 18px rgba(48, 126, 101, 0.1);
}

.blank-page-command:hover {
  border-color: rgba(39, 116, 92, 0.38);
  background: linear-gradient(145deg, #ffffff, rgba(190, 238, 223, 0.76));
  color: #1d654f;
}

.template-upload-command:hover {
  border-color: rgba(83, 63, 178, 0.4);
  background: linear-gradient(145deg, #ffffff, rgba(211, 202, 255, 0.76));
  color: #49359e;
}

.template-upload-command:disabled {
  opacity: 0.62;
}

.quick-page-control {
  position: relative;
  display: grid;
  min-width: 150px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(58, 113, 145, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, #ffffff, rgba(209, 244, 250, 0.58)),
    rgba(255, 255, 255, 0.7);
  padding: 4px 5px 4px 9px;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(42, 95, 123, 0.08),
    0 7px 18px rgba(55, 105, 132, 0.1);
}

.quick-page-control > label {
  color: #416178;
  font-size: 0.59rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-page-control > select {
  min-width: 0;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
  padding: 5px 22px 5px 7px;
  color: #173c55;
  font-size: 0.65rem;
  font-weight: 850;
}

.quick-page-control > select:focus-visible {
  outline: 2px solid rgba(8, 126, 164, 0.3);
}

.quick-custom-size {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: 270px;
  gap: 10px;
  border: 1px solid rgba(71, 114, 145, 0.23);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(231, 248, 252, 0.86)),
    #f7fbfe;
  padding: 12px;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 18px 42px rgba(52, 82, 111, 0.18);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
}

.quick-custom-size[hidden] {
  display: none;
}

.quick-custom-size > strong {
  color: #173650;
  font-size: 0.72rem;
}

.quick-custom-size > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-custom-size label {
  display: grid;
  gap: 5px;
  color: #5b6e83;
  font-size: 0.59rem;
  font-weight: 850;
}

.quick-custom-size input {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(76, 111, 143, 0.23);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  padding: 6px 8px;
  color: #173650;
  font-size: 0.7rem;
  font-weight: 800;
}

.quick-custom-size button {
  min-height: 37px;
  border: 1px solid rgba(5, 119, 145, 0.35);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(102, 219, 236, 0.23)),
    #0786a2;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 7px 17px rgba(8, 125, 151, 0.16);
}

@media (max-width: 980px) {
  .workspace-toolbar {
    align-items: stretch;
  }

  .side-workflow {
    align-items: stretch;
    flex-direction: column;
  }

  .template-upload-command {
    min-height: 34px;
  }

  .blank-page-command {
    min-height: 34px;
  }

  .quick-page-control {
    min-height: 40px;
  }
}

@media (max-width: 520px) {
  .side-workflow {
    width: 100%;
  }

  .template-upload-command {
    width: 100%;
  }

  .blank-page-command {
    width: 100%;
  }

  .quick-page-control {
    width: 100%;
  }

  .quick-custom-size {
    width: min(270px, calc(100vw - 92px));
  }
}
