
:root {
  --ghb-bg-main: #070c17;
  --ghb-bg-panel: #111a2c;
  --ghb-bg-panel-2: #18243d;
  --ghb-border: #304867;
  --ghb-border-soft: rgba(148, 178, 219, 0.24);
  --ghb-copy-main: #eef4ff;
  --ghb-copy-muted: #9db2d6;
  --ghb-ok: #9be7bc;
  --ghb-error: #ffc4c9;
}

.ghb-auth-note {
  border: 1px solid var(--ghb-border);
  border-radius: 14px;
  padding: 16px 18px;
  background: linear-gradient(160deg, #0f182b, #0a1221);
  color: var(--ghb-copy-main);
}

.ghb-builder {
  margin: 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 18px;
  color: var(--ghb-copy-main);
  font-family: "Rajdhani", "Segoe UI", Tahoma, sans-serif;
}

.ghb-builder__workspace-card,
.ghb-builder__sidebar-card {
  border: 1px solid var(--ghb-border);
  border-radius: 20px;
  background:
    radial-gradient(115% 90% at 10% 0%, rgba(246, 184, 0, 0.13), transparent 40%),
    radial-gradient(95% 100% at 90% 0%, rgba(225, 6, 0, 0.11), transparent 44%),
    linear-gradient(160deg, var(--ghb-bg-panel-2), var(--ghb-bg-main));
  box-shadow: 0 20px 34px rgba(2, 8, 21, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ghb-builder__workspace-card { padding: 18px; }
.ghb-builder__sidebar-card { padding: 14px; display: grid; gap: 14px; align-content: start; }

.ghb-builder__header { margin-bottom: 10px; }
.ghb-builder__title { margin: 0 0 6px; font-size: clamp(1.2rem, 2.2vw, 1.52rem); letter-spacing: 0.03em; color: #f8fbff; }
.ghb-builder__subtitle { margin: 0; font-size: 0.95rem; color: var(--ghb-copy-muted); }

.ghb-mode-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.ghb-mode-tab {
  min-height: 38px;
  border: 1px solid rgba(96, 130, 176, 0.5);
  border-radius: 10px;
  background: #132443;
  color: #e4eeff;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.ghb-mode-tab.is-active {
  border-color: rgba(246, 184, 0, 0.9);
  background: linear-gradient(180deg, rgba(246, 184, 0, 0.24), rgba(246, 184, 0, 0.08));
  color: #fff2cd;
}

.ghb-stage-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ghb-stage-main {
  display: grid;
  gap: 10px;
}

.ghb-slot-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.ghb-slot-card {
  border: 1px solid rgba(96, 130, 176, 0.5);
  border-radius: 12px;
  background: #132443;
  color: #e4eeff;
  display: grid;
  gap: 6px;
  padding: 8px;
  cursor: pointer;
}
.ghb-slot-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.ghb-slot-card.is-active {
  border-color: rgba(246, 184, 0, 0.95);
  background: linear-gradient(180deg, rgba(246, 184, 0, 0.18), rgba(246, 184, 0, 0.08));
}
.ghb-slot-card__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid rgba(168, 198, 235, 0.35);
  background: radial-gradient(100% 100% at 50% 0%, rgba(255, 255, 255, 0.06), rgba(8, 14, 25, 0.92));
  overflow: hidden;
}
.ghb-slot-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ghb-slot-card__img[hidden] { display: none; }
.ghb-slot-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9eb4d8;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.ghb-slot-card__label {
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: center;
}

.ghb-stage-frame {
  border: 1px solid var(--ghb-border-soft);
  border-radius: 16px;
  background: radial-gradient(100% 110% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 45%), linear-gradient(180deg, #0d1528, #091121);
  padding: 12px;
  display: flex;
  justify-content: flex-end;
}

.ghb-canvas-stage {
  position: relative;
  width: min(100%, 680px);
  margin: 0 0 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(165, 196, 237, 0.18);
  touch-action: none;
}
.ghb-canvas-stage.is-masked { box-shadow: 0 0 0 1px rgba(246, 184, 0, 0.28); }

.ghb-canvas,
.ghb-canvas-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.ghb-canvas--grid { z-index: 1; pointer-events: none; }
.ghb-canvas--paint { z-index: 2; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.ghb-canvas--shape { z-index: 3; touch-action: none; user-select: none; -webkit-user-select: none; cursor: default; }
.ghb-canvas--shape.is-editing { cursor: move; }
.ghb-canvas-champion { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; object-fit: cover; }
.ghb-canvas-champion[hidden] { display: none; }
.ghb-canvas-overlay { z-index: 5; pointer-events: none; object-fit: cover; }
.ghb-canvas-overlay[hidden] { display: none; }

.ghb-stage-meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.ghb-stage-meta__item {
  border: 1px solid rgba(117, 149, 191, 0.4);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--ghb-copy-muted);
  background: rgba(13, 25, 45, 0.75);
}

.ghb-builder__footer { margin-top: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ghb-button-primary.button {
  min-height: 40px;
  border-radius: 10px;
  border-color: #d10500;
  background: linear-gradient(180deg, #fc2f2a, #d90500);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0 16px;
}
.ghb-button-secondary.button {
  min-height: 40px;
  border-radius: 10px;
  border-color: #55739d;
  background: #162640;
  color: #d9e7ff;
  padding: 0 14px;
}
.ghb-builder__status { margin: 0; min-height: 20px; font-size: 0.86rem; color: var(--ghb-copy-muted); }
.ghb-builder__status.is-ok { color: var(--ghb-ok); }
.ghb-builder__status.is-error { color: var(--ghb-error); }

.ghb-sidebar-section {
  border: 1px solid rgba(96, 127, 168, 0.48);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(14, 26, 46, 0.86), rgba(10, 19, 35, 0.9));
  padding: 12px;
}
.ghb-sidebar-section__head { margin-bottom: 10px; }
.ghb-sidebar-section__head h4 { margin: 0; font-size: 0.98rem; letter-spacing: 0.02em; }
.ghb-sidebar-section__head.ghb-sidebar-section__head--sub { margin-top: 12px; margin-bottom: 8px; }
.ghb-sidebar-section__head.ghb-sidebar-section__head--sub h4 { font-size: 0.9rem; color: #cdddf7; }

.ghb-tool-row { display: grid; gap: 8px; margin-bottom: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ghb-tool-row--single { grid-template-columns: 1fr; }
.ghb-tool-row--double { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ghb-tool-row--triple { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ghb-tool-btn {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(96, 130, 176, 0.5);
  border-radius: 9px;
  background: #132443;
  color: #e4eeff;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
}
.ghb-tool-row--shape-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ghb-tool-row--shape-actions .ghb-tool-btn--span-2 { grid-column: span 2; }
.ghb-tool-btn.is-active {
  border-color: rgba(246, 184, 0, 0.9);
  background: linear-gradient(180deg, rgba(246, 184, 0, 0.2), rgba(246, 184, 0, 0.08));
  color: #fff2cd;
}
.ghb-tool-btn--warn { border-color: rgba(225, 6, 0, 0.5); color: #ffdada; }
.ghb-tool-btn--upload {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 40px;
  cursor: pointer;
}
.ghb-tool-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.ghb-control { display: grid; gap: 6px; margin-bottom: 10px; }
.ghb-control span { font-size: 0.8rem; color: var(--ghb-copy-muted); }
.ghb-control input,
.ghb-control select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(95, 127, 172, 0.56);
  border-radius: 9px;
  background: #11203b;
  color: #e6efff;
  padding: 0 9px;
}
.ghb-control input[type="range"] { padding: 0; }
.ghb-control input[type="color"] { padding: 4px; }
.ghb-control--color-opacity .ghb-color-opacity-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
.ghb-color-opacity-color {
  display: grid;
  gap: 4px;
  align-content: end;
}
.ghb-control--color-opacity input[type="color"] {
  min-height: 36px;
  padding: 2px;
  width: 100%;
  margin: 0;
}
.ghb-color-opacity-slider {
  display: grid;
  gap: 4px;
  align-content: end;
}
.ghb-color-opacity-slider input[type="range"] { margin: 0; min-height: 36px; }
.ghb-color-opacity-slider__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--ghb-copy-muted);
  line-height: 1.1;
}

.ghb-shape-inspector-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 40px;
  gap: 6px;
  max-height: calc((40px * 3) + (6px * 2));
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  padding-right: 2px;
}
.ghb-shape-inspector-grid.is-disabled { opacity: 0.55; }
.ghb-shape-inspector-grid__item {
  min-height: 40px;
  border: 1px solid rgba(90, 122, 165, 0.54);
  border-radius: 9px;
  background: #132443;
  color: #dce9ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.ghb-shape-inspector-grid__item:hover,
.ghb-shape-inspector-grid__item:focus-visible,
.ghb-shape-inspector-grid__item.is-active {
  border-color: rgba(246, 184, 0, 0.9);
  background: linear-gradient(180deg, rgba(246, 184, 0, 0.2), rgba(246, 184, 0, 0.08));
}
.ghb-shape-inspector-grid__item:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ghb-shape-inspector-grid__preview {
  width: 34px;
  height: 34px;
  display: block;
}

.ghb-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ghb-control--inline {
  border: 1px solid rgba(90, 122, 165, 0.5);
  border-radius: 10px;
  background: rgba(10, 19, 35, 0.7);
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}
.ghb-control--inline input { width: 18px; min-height: 18px; }

.ghb-builder__hint { margin: 8px 0 0; font-size: 0.8rem; color: var(--ghb-copy-muted); }
.ghb-shape-info {
  margin-top: 2px;
  display: grid;
  justify-items: end;
}
.ghb-shape-info__btn {
  list-style: none;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(115, 149, 193, 0.62);
  border-radius: 6px;
  background: #132443;
  color: #dce9ff;
  font-weight: 700;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}
.ghb-shape-info__btn::-webkit-details-marker { display: none; }
.ghb-shape-info__btn:hover,
.ghb-shape-info__btn:focus-visible {
  border-color: rgba(246, 184, 0, 0.9);
  background: linear-gradient(180deg, rgba(246, 184, 0, 0.2), rgba(246, 184, 0, 0.08));
  color: #fff2cd;
}
.ghb-shape-info__panel {
  margin: 8px 0 0;
  width: min(100%, 380px);
  padding: 8px 10px;
  border: 1px solid rgba(90, 122, 165, 0.54);
  border-radius: 10px;
  background: rgba(8, 15, 28, 0.84);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--ghb-copy-muted);
  text-align: left;
}

.ghb-champion-section {
  margin: 0;
  border: 1px solid rgba(98, 132, 177, 0.5);
  border-radius: 11px;
  padding: 10px;
  background: rgba(10, 19, 35, 0.66);
}
.ghb-champion-section[hidden] { display: none; }
.ghb-champion-section__title {
  display: block;
  margin: 0 0 10px;
  font-family: "Teko", "Rajdhani", "Segoe UI", Tahoma, sans-serif;
  font-size: 1.28rem;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f6c967;
}
.ghb-champion-empty {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--ghb-copy-muted);
}
.ghb-champion-empty[hidden] { display: none; }
.ghb-champion-list {
  display: grid;
  gap: 8px;
}
.ghb-champion-item {
  width: 100%;
  border: 1px solid rgba(96, 130, 176, 0.54);
  border-radius: 10px;
  background: #132443;
  color: #e4eeff;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  align-items: center;
  text-align: left;
  padding: 6px;
  cursor: pointer;
}
.ghb-champion-item:hover,
.ghb-champion-item:focus-visible,
.ghb-champion-item.is-active {
  border-color: rgba(246, 184, 0, 0.9);
  background: linear-gradient(180deg, rgba(246, 184, 0, 0.2), rgba(246, 184, 0, 0.08));
}
.ghb-champion-item__thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid rgba(178, 203, 238, 0.45);
  background: rgba(8, 15, 29, 0.9);
  overflow: hidden;
}
.ghb-champion-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ghb-champion-item__meta {
  display: grid;
  gap: 2px;
}
.ghb-champion-item__name {
  font-size: 0.8rem;
  line-height: 1.2;
  color: #eef4ff;
}
.ghb-champion-item__action {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: #f6c967;
  text-transform: uppercase;
  font-weight: 700;
}

.ghb-layer-list-wrap {
  border: 1px solid rgba(90, 122, 165, 0.5);
  border-radius: 11px;
  max-height: 280px;
  overflow: auto;
  background: rgba(8, 15, 28, 0.72);
  margin-bottom: 10px;
}
.ghb-layer-list { margin: 0; padding: 8px; list-style: none; display: grid; gap: 8px; }
.ghb-layer-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 6px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(84, 113, 153, 0.45);
  background: rgba(15, 29, 53, 0.7);
}
.ghb-layer-row.is-selected { border-color: rgba(160, 194, 238, 0.8); background: rgba(107, 156, 221, 0.14); }
.ghb-layer-row.is-active { border-color: rgba(246, 184, 0, 0.85); background: rgba(246, 184, 0, 0.08); }
.ghb-layer-row.is-drop-target { border-color: rgba(159, 232, 191, 0.85); background: rgba(98, 214, 143, 0.16); }
.ghb-layer-row__select {
  width: 100%;
  border: none;
  background: transparent;
  color: #e8f1ff;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  cursor: pointer;
}
.ghb-layer-list.is-reordering .ghb-layer-row { opacity: 0.9; }
.ghb-layer-row__preview {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(180, 203, 236, 0.45);
  background: rgba(10, 18, 33, 0.88);
  flex: 0 0 auto;
}
.ghb-layer-row__title { font-size: 0.82rem; line-height: 1.2; }
.ghb-layer-row__kind {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9cb4d8;
}
.ghb-layer-row__delete {
  min-width: 30px;
  border: 1px solid rgba(235, 92, 92, 0.78);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(225, 6, 0, 0.3), rgba(225, 6, 0, 0.14));
  color: #ffd9d9;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}
.ghb-layer-row__delete:hover,
.ghb-layer-row__delete:focus-visible {
  border-color: rgba(255, 125, 125, 0.95);
  background: linear-gradient(180deg, rgba(225, 6, 0, 0.42), rgba(225, 6, 0, 0.2));
}
.ghb-layer-row__icon {
  min-width: 46px;
  border: 1px solid rgba(90, 122, 165, 0.5);
  border-radius: 8px;
  background: #132443;
  color: #dce9ff;
  font-size: 0.72rem;
  cursor: pointer;
}
.ghb-layer-row__drag {
  min-width: 40px;
  border: 1px solid rgba(90, 122, 165, 0.5);
  border-radius: 8px;
  background: #132443;
  color: #dce9ff;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  cursor: grab;
  touch-action: none;
}
.ghb-layer-row__drag:active { cursor: grabbing; }
.ghb-layer-row.is-muted {
  opacity: 0.42;
  background: rgba(10, 19, 34, 0.5);
  border-color: rgba(76, 104, 144, 0.35);
}
.ghb-layer-row.is-muted .ghb-layer-row__preview { opacity: 0.7; }
.ghb-layer-row.is-muted [data-layer-action] { display: none; }
.ghb-layer-row.is-muted .ghb-layer-row__drag {
  grid-column: 1 / -1;
  min-height: 30px;
}

.ghb-shape-picker {
  position: fixed;
  z-index: 11000;
}
.ghb-shape-picker[hidden] { display: none; }
.ghb-shape-picker__panel {
  width: min(90vw, 360px);
  max-height: min(72vh, 460px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(117, 149, 191, 0.56);
  background: linear-gradient(180deg, rgba(13, 26, 47, 0.97), rgba(7, 15, 29, 0.98));
  box-shadow: 0 20px 36px rgba(2, 8, 21, 0.64), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 10px;
}
.ghb-shape-picker__title {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ghb-copy-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.ghb-shape-picker__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.ghb-shape-picker__item {
  min-height: 40px;
  border: 1px solid rgba(90, 122, 165, 0.5);
  border-radius: 8px;
  background: #132443;
  color: #dce9ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.ghb-shape-picker__item:hover,
.ghb-shape-picker__item:focus-visible,
.ghb-shape-picker__item.is-active {
  border-color: rgba(246, 184, 0, 0.9);
  background: linear-gradient(180deg, rgba(246, 184, 0, 0.2), rgba(246, 184, 0, 0.08));
}
.ghb-shape-picker__preview { width: 34px; height: 34px; display: block; }

/* Public avatar rendering */
.ghb-helmet {
  --ghb-size: 64px;
  display: inline-block;
  width: var(--ghb-size);
  height: var(--ghb-size);
  vertical-align: middle;
  contain: layout paint style;
}
.ghb-helmet--image { border-radius: 50%; overflow: hidden; }
.ghb-helmet__img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ghb-helmet__shell {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 36% 42% 40% 34% / 38% 36% 44% 40%;
  border: 1px solid #afbacb;
  background: radial-gradient(120% 90% at 20% 8%, rgba(255, 255, 255, 0.86), transparent 45%), linear-gradient(165deg, #ffffff, #d8e2f1);
  box-shadow: 0 9px 16px rgba(5, 11, 22, 0.34), inset -8px -10px 20px rgba(166, 180, 205, 0.45), inset 6px 8px 14px rgba(255, 255, 255, 0.7);
  overflow: hidden;
}
.ghb-helmet__shine { position: absolute; inset: 8% 16% auto 10%; height: 25%; border-radius: 999px; background: linear-gradient(90deg, rgba(255,255,255,0.75), rgba(255,255,255,0)); pointer-events: none; }
.ghb-helmet__surface { position: absolute; inset: 10% 8% 22% 7%; clip-path: polygon(4% 20%, 24% 2%, 60% 2%, 85% 12%, 96% 34%, 91% 74%, 63% 96%, 20% 92%, 4% 66%); overflow: hidden; }
.ghb-helmet__visor {
  position: absolute;
  left: 20%; right: 17%; bottom: 21%; height: 24%;
  border-radius: 25% 32% 40% 42% / 55% 50% 45% 45%;
  background: linear-gradient(180deg, rgba(138,170,213,0.18), rgba(17,28,46,0.96)), linear-gradient(100deg, rgba(255,255,255,0.28), rgba(255,255,255,0));
  border: 1px solid rgba(35,49,75,0.86);
  box-shadow: inset 0 5px 10px rgba(240,250,255,0.08);
}
.ghb-helmet__chin {
  position: absolute;
  right: 5%; bottom: 10%; width: 33%; height: 25%;
  border-radius: 50% 40% 50% 40%;
  background: linear-gradient(170deg, rgba(214,224,237,0.9), rgba(167,179,199,0.86));
  border: 1px solid rgba(141,156,179,0.7);
}

.ghb-layer { position: absolute; left: var(--ghb-x); top: var(--ghb-y); width: var(--ghb-w); height: var(--ghb-h); z-index: var(--ghb-z); background: var(--ghb-color); }
.ghb-layer--stripe,.ghb-layer--circle { border-radius: 999px; }
.ghb-layer--triangle { clip-path: polygon(50% 0%, 100% 100%, 0% 100%); }
.ghb-layer--diagonal-band { clip-path: polygon(0% 24%, 24% 0%, 100% 76%, 76% 100%); }
.ghb-layer--chevron { clip-path: polygon(0% 26%, 18% 0%, 50% 56%, 82% 0%, 100% 26%, 50% 100%); }
.ghb-layer--diamond { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }

.ghb-helmet--hover { transition: transform 0.24s ease, filter 0.24s ease; transform-origin: center; }
.ghb-helmet--hover:hover,
.ghb-helmet--hover:focus-within { transform: scale(1.1); filter: drop-shadow(0 10px 18px rgba(246,184,0,0.2)); }

.ghb-avatar-shortcode,
.ghb-avatar--wp,
.ghb-avatar--um { vertical-align: middle; }

@media (max-width: 1180px) {
  .ghb-builder { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .ghb-builder__workspace-card,
  .ghb-builder__sidebar-card { border-radius: 15px; }
  .ghb-stage-frame { padding: 10px; }
  .ghb-tool-row--triple { grid-template-columns: 1fr 1fr; }
  .ghb-tool-row.ghb-tool-row--layer-order { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ghb-builder__footer .button { width: 100%; }
}

@media (max-width: 900px) {
  .ghb-stage-layout { grid-template-columns: 1fr; }
  .ghb-stage-main { order: 1; }
  .ghb-slot-picker { order: 2; }
  .ghb-slot-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ghb-canvas-stage { margin: 0 auto; }
}

@media (max-width: 640px) {
  .ghb-mode-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ghb-slot-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ghb-slot-card { padding: 6px; gap: 4px; }
  .ghb-slot-card__label { font-size: 0.68rem; }
  .ghb-tool-row,
  .ghb-tool-row--double,
  .ghb-tool-row--triple { grid-template-columns: 1fr; }
  .ghb-tool-row.ghb-tool-row--shape-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ghb-shape-inspector-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ghb-control--color-opacity .ghb-color-opacity-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ghb-control-grid { grid-template-columns: 1fr; }
  .ghb-stage-meta { flex-direction: column; }
  .ghb-layer-row { grid-template-columns: auto 1fr auto auto; }
  .ghb-layer-row__drag { grid-column: span 2; min-height: 32px; }
  .ghb-shape-picker__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
