@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600;700&display=swap");

:root {
  --bg: #07111d;
  --panel: #0d1824;
  --panel-2: #13243a;
  --line: rgba(139, 190, 255, 0.18);
  --muted: rgba(232, 242, 255, 0.66);
  --text: #f4f8ff;
  --gold: #2f8cff;
  --gold-bright: #58b7ff;
  --blue: #168dff;
  --danger: #ff7777;
  --success: #88daa2;
  --codex-keyboard-offset: 0px;
  /* Brand colour tokens */
  --brand-bg-primary: #0B192C;
  --brand-bg-secondary: #15253F;
  --brand-accent-gold: #E6C762;
  --brand-text-light: #F5F7F8;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* WordPress build: scoped to the designer, so the rest of the site keeps the theme's own page styles. */
.codex-crystal-app,
.review-dialog {
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

.codex-crystal-app :is(button, input, textarea, select),
.review-dialog :is(button, input, textarea, select) {
  font: inherit;
}

.codex-crystal-app button,
.review-dialog button {
  cursor: pointer;
}

.codex-crystal-app button:disabled,
.review-dialog button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.5;
}

.app {
  min-height: 100vh;
  padding: 32px 32px 132px;
  background:
    radial-gradient(circle at 15% 20%, rgba(32, 141, 255, 0.20), transparent 31%),
    radial-gradient(circle at 90% 18%, rgba(89, 182, 255, 0.10), transparent 30%),
    var(--bg);
}

.product-view {
  display: grid;
  grid-template-columns: minmax(360px, 1.02fr) minmax(390px, 0.98fr);
  gap: 20px;
  width: min(1440px, 100%);
  margin: 0 auto;
}

.codex-product-media,
.product-panel {
  min-width: 0;
}

.codex-product-media {
  display: grid;
  gap: 14px;
  align-self: start;
}

.reseller-context-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  width: min(1100px, 100%);
  margin: 0 auto 18px;
  padding: 14px 16px;
  border: 1px solid rgba(230, 199, 98, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(230, 199, 98, 0.10), transparent 3px),
    linear-gradient(135deg, rgba(21, 37, 63, 0.76), rgba(11, 25, 44, 0.92));
  color: var(--brand-text-light);
}

.reseller-context-banner[hidden] {
  display: none;
}

.reseller-context-banner__logo,
.reseller-logo-card {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 8px;
  background: #5128ad;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.03em;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.reseller-context-banner__logo {
  padding: 10px 13px;
  font-size: 18px;
}

.reseller-logo-card {
  padding: 18px 22px;
  font-size: clamp(30px, 8vw, 54px);
}

.reseller-context-banner__logo strong,
.reseller-logo-card strong {
  color: #ffc84d;
}

.reseller-context-banner__logo i,
.reseller-logo-card i {
  display: block;
  margin-left: 10px;
  border-radius: 3px;
  background: #2fc6dc;
}

.reseller-context-banner__logo i {
  width: 16px;
  height: 16px;
}

.reseller-logo-card i {
  width: 32px;
  height: 32px;
}

.reseller-context-banner .product-kicker {
  margin-bottom: 3px;
  font-size: 11px;
}

.reseller-context-banner strong,
.reseller-context-banner span {
  display: block;
}

.reseller-context-banner strong {
  font-size: 18px;
}

.reseller-context-banner span {
  color: var(--muted);
  font-size: 13px;
}

.reseller-order-page {
  display: grid;
  gap: 24px;
}

.reseller-hero,
.reseller-product-section {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.reseller-hero {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid rgba(230, 199, 98, 0.15);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 80%, rgba(21, 37, 63, 0.85), transparent 38%),
    linear-gradient(140deg, #07111d, #0b192c 58%, #15253f);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.reseller-hero__brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(16px, 4vw, 28px);
  align-items: center;
}

.reseller-hero h1,
.reseller-section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 7vw, 54px);
  line-height: 1.04;
}

.reseller-hero p,
.reseller-hero a,
.reseller-product-card p {
  color: var(--muted);
}

.reseller-hero a {
  text-decoration: none;
}

.reseller-hero__note {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border: 1px solid rgba(230, 199, 98, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.reseller-hero__note strong {
  color: var(--brand-accent-gold);
}

.reseller-section-heading {
  margin-bottom: 16px;
}

.reseller-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.reseller-product-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(230, 199, 98, 0.13);
  border-radius: 8px;
  background: rgba(21, 37, 63, 0.52);
}

.reseller-product-card__media {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  padding: 12px;
  background:
    radial-gradient(circle at 30% 80%, rgba(47, 140, 255, 0.18), transparent 38%),
    #06101b;
}

.reseller-product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reseller-product-card__body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.reseller-product-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.reseller-product-card p {
  margin: 0;
  font-weight: 800;
}

.reseller-product-card__button {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--brand-accent-gold);
  color: var(--brand-bg-primary);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 700px) {
  .reseller-context-banner {
    grid-template-columns: 1fr;
    margin-bottom: 14px;
  }

  .reseller-context-banner__logo {
    width: max-content;
    max-width: 100%;
  }

  .reseller-hero__brand {
    grid-template-columns: 1fr;
  }

  .reseller-logo-card {
    justify-self: start;
    padding: 14px 18px;
  }

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

  .reseller-product-card__body {
    padding: 12px;
  }

  .reseller-product-card h3 {
    font-size: 14px;
  }

  .reseller-product-card__button {
    font-size: 13px;
  }
}

.codex-crystal-app :is(h1, h2),
.review-dialog :is(h1, h2) {
  font-family: Inter, Arial, Helvetica, sans-serif !important;
  font-style: normal !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.product-preview {
  position: sticky;
  top: 28px;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 807 / 1057;
  min-height: 0;
  padding: clamp(12px, 2.2vw, 28px) clamp(12px, 2.2vw, 28px) clamp(18px, 2.8vw, 38px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 25% 75%, rgba(25, 150, 255, 0.26), transparent 34%),
    radial-gradient(circle at 75% 20%, rgba(88, 183, 255, 0.10), transparent 28%),
    linear-gradient(120deg, #031827, #07111d 54%, #0a1625);
  color: inherit;
  text-align: left;
  appearance: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.product-preview:hover,
.product-preview:focus-visible {
  border-color: rgba(88, 183, 255, 0.72);
}

.product-preview:focus-visible {
  outline: 3px solid rgba(61, 152, 229, 0.48);
  outline-offset: 4px;
}

.product-preview-image {
  position: relative;
  z-index: 2;
  width: 96%;
  height: 96%;
  object-fit: contain;
}

.product-media-actions {
  display: grid;
  gap: 10px;
}

.product-media-actions .design-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-media-actions .design-actions.is-single-action {
  grid-template-columns: 1fr;
}

.product-media-actions .design-actions.is-single-action .secondary-action {
  min-height: 64px;
  font-size: 16px;
}

.product-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  width: 92%;
  height: 92%;
}

.product-gallery-preview {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  width: calc(100% - clamp(28px, 4.5vw, 64px));
  height: calc(100% - clamp(28px, 4.5vw, 64px));
  align-items: center;
  justify-items: center;
}

.product-gallery-main {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.product-gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  filter: drop-shadow(0 28px 54px rgba(0, 0, 0, 0.42));
}

.product-gallery-strip {
  display: flex;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  min-height: 72px;
  overflow: hidden;
}

.product-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(230, 199, 98, 0.28);
  border-radius: 999px;
  background: rgba(5, 12, 20, 0.72);
  color: var(--brand-accent-gold);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.product-gallery-nav:hover,
.product-gallery-nav:focus-visible {
  border-color: rgba(230, 199, 98, 0.55);
  background: rgba(11, 25, 44, 0.88);
}

.product-gallery-nav--prev {
  left: -18px;
}

.product-gallery-nav--next {
  right: -18px;
}

.product-gallery-thumb-button {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  padding: 2px;
  border: 1px solid rgba(230, 199, 98, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.product-gallery-thumb-button.is-active,
.product-gallery-thumb-button:focus-visible {
  border-color: rgba(230, 199, 98, 0.72);
  box-shadow: 0 0 0 2px rgba(230, 199, 98, 0.14);
}

.product-gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

@media (min-width: 701px) {
  .codex-product-media .product-preview,
  .codex-product-media .product-media-actions {
    width: min(74%, 720px);
    justify-self: center;
  }

  .codex-product-media .product-preview {
    padding: clamp(8px, 1vw, 16px);
  }

  .codex-product-media .product-gallery-preview,
  .codex-product-media .product-preview-image:not([hidden]) {
    width: calc(100% - clamp(12px, 1.6vw, 24px));
    height: calc(100% - clamp(12px, 1.6vw, 24px));
  }

  .codex-product-media .product-gallery-preview {
    gap: 10px;
  }
}

@media (min-width: 1101px) {
  .product-view {
    grid-template-columns:
      minmax(360px, min(540px, calc((100% - 20px) / 2)))
      minmax(390px, min(540px, calc((100% - 20px) / 2)));
    justify-content: center;
  }

  .codex-product-media .product-preview,
  .codex-product-media .product-media-actions {
    width: 100%;
    max-width: 540px;
    justify-self: end;
  }
}

.product-crystal-reference {
  position: relative;
  width: min(78%, 520px);
  aspect-ratio: 807 / 1057;
}

.crystal-reference-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 56px rgba(0, 0, 0, 0.44));
}

.product-upload-note {
  position: absolute;
  left: 18.6%;
  top: 12.4%;
  display: grid;
  place-items: center;
  width: 55.6%;
  height: 65.6%;
  padding: 24px;
  color: #111514;
  text-align: center;
}

.product-upload-note span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px 18px;
  border: 1px dashed rgba(0, 0, 0, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #111514;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}

.product-panel {
  padding: 20px 0 40px;
}

.product-kicker,
.editor-kicker,
.design-label {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-panel h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(32px, 7vw, 48px) !important;
  font-weight: 850 !important;
  line-height: 1.06 !important;
  letter-spacing: 0 !important;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 22px 0 10px;
}

.price-row span {
  color: var(--gold-bright);
  font-size: 48px;
  line-height: 1;
}

.price-row s {
  color: rgba(255, 255, 255, 0.35);
  font-size: 24px;
}

.delivery-line {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18px;
}

.purchase-highlights {
  position: relative;
  display: grid;
  gap: 9px;
  margin: 0 0 22px;
  padding: 15px 16px 15px 18px;
  overflow: hidden;
  border: 1px solid rgba(230, 199, 98, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(230, 199, 98, 0.10), transparent 2px),
    linear-gradient(135deg, rgba(21, 37, 63, 0.72), rgba(11, 25, 44, 0.86));
  list-style: none;
  color: rgba(245, 247, 248, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(230, 199, 98, 0.04) inset;
}

.purchase-highlights li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14.5px;
  line-height: 1.35;
}

.purchase-highlights li::before {
  content: "✓";
  color: var(--brand-accent-gold);
  font-weight: 900;
}

.quantity-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  margin-bottom: 18px;
  padding: 10px 14px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1a27;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  font-weight: 700;
}

.quantity-control {
  display: grid;
  grid-template-columns: 52px 52px 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.quantity-control button,
.quantity-control output {
  display: grid;
  place-items: center;
  border: 0;
  background: #0d1a2a;
  color: #fff;
}

.quantity-control output {
  border-inline: 1px solid var(--line);
}

.size-section {
  margin: 0;
  padding: 0;
  border: 0;
}

.size-section legend {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 22px;
  font-weight: 800;
}

.size-options {
  display: grid;
  gap: 10px;
}

.size-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px 18px;
  min-height: 64px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1a27;
  color: #fff;
  text-align: left;
}

.size-card.is-selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue) inset;
}

.size-name {
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.size-name span {
  color: var(--muted);
  font-size: 0.86em;
  font-weight: 650;
}

.size-meta {
  display: none;
  grid-column: 1;
  color: var(--muted);
  font-size: 14px;
}

.size-price {
  grid-row: auto;
  grid-column: 2;
  align-self: center;
  color: var(--gold-bright);
  font-size: 20px;
  font-weight: 800;
}

.design-card,
.addon-section {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.design-card {
  display: block;
  padding: 18px;
}

.design-card h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.design-card p {
  margin: 0;
  color: var(--muted);
}

.design-option-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.design-option-list[hidden] {
  display: none;
}

.design-option-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(88, 183, 255, 0.18);
  border-radius: 6px;
  background: rgba(88, 183, 255, 0.055);
  color: #eef6ff;
  font-size: 13px;
  line-height: 1.2;
}

.design-option-list li::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(88, 183, 255, 0.22);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.design-option-list li span {
  min-width: 0;
}

.design-option-list li strong {
  color: var(--gold-bright);
  font-size: 12px;
  white-space: nowrap;
}

.design-option-list li.is-total {
  border-color: rgba(255, 204, 54, 0.32);
  background: rgba(255, 204, 54, 0.07);
}

.design-option-list li.is-total::before {
  content: "£";
  background: rgba(255, 204, 54, 0.2);
  color: var(--gold-bright);
}

.design-actions {
  display: flex;
  gap: 10px;
}

.addon-section {
  display: grid;
}

.addon-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  color: #fff;
}

.addon-row + .addon-row {
  border-top: 1px solid var(--line);
}

.addon-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.addon-price {
  color: var(--gold-bright);
  font-weight: 800;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 20px;
}

.configure-button,
.bag-button,
.sticky-bar button,
.save-btn,
.primary-action,
.secondary-action,
.plain-button {
  min-height: 52px;
  border-radius: 6px;
  font-weight: 800;
}

.configure-button,
.sticky-bar button,
.save-btn,
.primary-action {
  border: 0;
  background: var(--gold);
  color: #111514;
}

.bag-button {
  border: 0;
  background: var(--blue);
  color: #fff;
}

.secondary-action,
.plain-button {
  border: 1px solid var(--line);
  background: transparent;
  color: #fff;
}

.checkout-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.sticky-bar[hidden] {
  display: none !important;
}

.sticky-bar {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 18px;
  align-items: center;
  padding: 14px max(24px, calc((100vw - 1440px) / 2));
  border-top: 1px solid var(--line);
  background: rgba(12, 14, 14, 0.92);
  backdrop-filter: blur(16px);
}

.sticky-bar span,
.sticky-bar strong,
.sticky-bar small {
  display: inline-block;
  margin-right: 14px;
}

.sticky-bar small {
  color: var(--muted);
}

body.is-editing {
  overflow: hidden;
}

body.is-editing .sticky-bar {
  opacity: 0;
  pointer-events: none;
}

.configurator-view {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 10, 11, 0.68);
  backdrop-filter: blur(4px);
}

.editor-modal {
  width: min(1180px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(18, 23, 23, 0.96);
  box-shadow: 0 28px 96px rgba(0, 0, 0, 0.62);
}

.editor-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 12px;
}

.editor-header h2 {
  margin: 0;
  font-size: clamp(22px, 2vw, 34px) !important;
  font-weight: 850 !important;
  line-height: 1.08 !important;
}

.editor-header h2 span {
  color: var(--gold);
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.stage {
  position: relative;
  min-height: min(640px, calc(100vh - 220px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 74%, rgba(25, 150, 255, 0.28), transparent 36%),
    radial-gradient(circle at 76% 24%, rgba(88, 183, 255, 0.10), transparent 34%),
    linear-gradient(115deg, #031827 0%, #07111d 46%, #0a1625 100%);
}

.stage::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle at 50% 35%, transparent 0 48%, rgba(0, 0, 0, 0.22) 72%);
}

.stage::before {
  position: absolute;
  z-index: 33;
  inset: 0;
  content: "";
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(88, 183, 255, 0.62) calc(50% - 1px), rgba(88, 183, 255, 0.62) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(180deg, transparent calc(50% - 1px), rgba(88, 183, 255, 0.62) calc(50% - 1px), rgba(88, 183, 255, 0.62) calc(50% + 1px), transparent calc(50% + 1px));
  filter: drop-shadow(0 0 3px rgba(88, 183, 255, 0.25));
  transition: opacity 120ms ease;
}

.stage.is-aligning::before {
  opacity: 0.58;
}

.status-panel {
  position: absolute;
  z-index: 35;
  top: 18px;
  right: 18px;
  max-width: min(360px, 44%);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 15, 16, 0.76);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.35;
  backdrop-filter: blur(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.status-panel.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

.status-panel.is-error {
  border-color: rgba(255, 119, 119, 0.72);
  color: #ffd8d8;
}

.status-panel.is-success {
  border-color: rgba(136, 218, 162, 0.65);
  color: #ddffe7;
}

.crystal-shell {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 5%;
  height: 90%;
  aspect-ratio: 0.68;
  transform: translateX(-50%);
  pointer-events: none;
}

.crystal-glass {
  position: absolute;
  inset: 0;
  z-index: 8;
  clip-path: polygon(7.5% 0, 92.5% 0, 100% 5.5%, 100% 94.5%, 92.5% 100%, 7.5% 100%, 0 94.5%, 0 5.5%);
  background: transparent;
  box-shadow:
    inset 0 0 0 2px rgba(225, 232, 222, 0.34),
    inset 0 0 0 11px rgba(255, 255, 255, 0.035),
    inset 0 0 90px rgba(0, 0, 0, 0.5),
    0 0 28px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.crystal-shell[data-frame-source="source-svg"] .crystal-glass,
.crystal-shell[data-frame-source="shape-svg"] .crystal-glass {
  display: none;
}

.crystal-frame-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 18;
  overflow: visible;
  pointer-events: none;
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22))
    drop-shadow(0 0 10px rgba(88, 183, 255, 0.05));
}

.crystal-frame-facet {
  shape-rendering: geometricPrecision;
}

.crystal-frame-outline,
.crystal-frame-inner-seam,
.crystal-frame-highlight {
  pointer-events: none;
}

.crystal-frame-inner-seam {
  opacity: 0.7;
}

.crystal-frame-highlight {
  opacity: 0.76;
}

.crystal-edge {
  display: none;
}

.edge-top {
  left: 7.5%;
  top: 0;
  width: 85%;
  height: 5.5%;
  clip-path: polygon(0 0, 100% 0, 93.5% 100%, 6.5% 100%);
  background: linear-gradient(180deg, rgba(88, 87, 79, 0.95), rgba(42, 40, 36, 0.95));
}

.edge-left {
  left: 0;
  top: 5.5%;
  width: 7.5%;
  height: 89%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 94%);
  background: linear-gradient(90deg, rgba(23, 18, 18, 0.98), rgba(45, 40, 36, 0.98));
}

.edge-right {
  right: 0;
  top: 5.5%;
  width: 7.5%;
  height: 89%;
  clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
  background: linear-gradient(90deg, rgba(95, 96, 98, 0.9), rgba(188, 188, 188, 0.78));
}

.edge-bottom {
  left: 7.5%;
  bottom: 0;
  width: 85%;
  height: 5.5%;
  clip-path: polygon(6.5% 0, 93.5% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(44, 39, 34, 0.96), rgba(30, 27, 23, 0.98));
}

.crop-box {
  position: absolute;
  z-index: 4;
  left: 7.5%;
  top: 5.5%;
  width: 85%;
  height: 89%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #19191d;
  touch-action: none;
  pointer-events: auto;
}

.crop-box::before {
  position: absolute;
  inset: 0;
  content: "";
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    45deg,
    rgba(88, 183, 255, 0.16) 0,
    rgba(88, 183, 255, 0.16) 4px,
    transparent 4px,
    transparent 12px
  );
}

.crop-box.has-selection::before {
  opacity: 0.1;
}

.crop-box::after {
  position: absolute;
  z-index: 19;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 44%, transparent 0 58%, rgba(25, 25, 29, 0.10) 82%, rgba(25, 25, 29, 0.46) 100%),
    linear-gradient(90deg, rgba(25, 25, 29, 0.38), transparent 18%, transparent 82%, rgba(25, 25, 29, 0.38));
  opacity: 0.72;
}

.photo-selection {
  position: absolute;
  z-index: 24;
  display: none;
  border: 2px dashed rgba(88, 183, 255, 0.86);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.42);
  transform-origin: center;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}

.photo-selection.is-visible {
  display: block;
}

.photo-selection.is-visible::before,
.photo-selection.is-visible::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0;
  background: rgba(88, 183, 255, 0.78);
  filter: drop-shadow(0 0 3px rgba(88, 183, 255, 0.35));
}

.stage.is-aligning .photo-selection.is-visible::before,
.stage.is-aligning .photo-selection.is-visible::after {
  opacity: 0;
}

.photo-selection.is-visible::before {
  left: 50%;
  top: -120vh;
  width: 2px;
  height: 240vh;
  transform: translateX(-50%);
}

.photo-selection.is-visible::after {
  left: -120vw;
  top: 50%;
  width: 240vw;
  height: 2px;
  transform: translateY(-50%);
}

.photo-selection:active {
  cursor: grabbing;
}

.canvas-add-text {
  position: absolute;
  z-index: 34;
  top: 22px;
  left: 22px;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(27, 32, 33, 0.9);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.canvas-add-text span {
  color: var(--gold-bright);
  font-size: 15px;
}

.canvas-add-text:disabled {
  opacity: 0.45;
}

.canvas-background-toggle {
  position: absolute;
  z-index: 34;
  top: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 54px;
  padding: 6px;
  border: 1px solid rgba(88, 183, 255, 0.24);
  border-radius: 999px;
  background: rgba(8, 17, 29, 0.8);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.canvas-background-toggle span {
  padding: 0 6px 0 10px;
  color: rgba(226, 234, 241, 0.72);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.canvas-background-toggle .toggle-option {
  min-height: 38px;
}

.canvas-template-switch {
  position: absolute;
  z-index: 34;
  left: 22px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 5px;
  border: 1px solid rgba(88, 183, 255, 0.24);
  border-radius: 999px;
  background: rgba(8, 17, 29, 0.76);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.canvas-template-switch[hidden] {
  display: none;
}

.canvas-template-switch span {
  padding: 0 6px 0 10px;
  color: rgba(226, 234, 241, 0.72);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.canvas-template-switch button {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(9, 16, 23, 0.64);
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 850;
}

.canvas-template-switch button.is-active {
  border-color: rgba(88, 183, 255, 0.75);
  background: var(--gold-bright);
  color: #061421;
}

.text-layer-container {
  position: absolute;
  inset: 0;
  z-index: 27;
  pointer-events: none;
}

.text-selection {
  position: absolute;
  z-index: 28;
  display: none;
  border: 1px dashed rgba(88, 183, 255, 0.86);
  border-radius: 8px;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}

.text-selection.is-visible {
  display: block;
}

.text-selection:active {
  cursor: grabbing;
}

.text-selection.is-visible .handle {
  opacity: 1;
  pointer-events: auto;
}

.crop-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0;
  filter: grayscale(1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.2));
  transform-origin: center;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}

.crop-photo:active {
  cursor: grabbing;
}

.crop-photo::before {
  position: absolute;
  z-index: 18;
  inset: -5%;
  content: "";
  pointer-events: none;
  display: none;
}

.crop-photo.is-processing::after {
  position: absolute;
  z-index: 12;
  inset: auto 50% 42px auto;
  transform: translateX(50%);
  content: "Preparing photo...";
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 14px;
  white-space: nowrap;
}

.crop-photo.has-background {
  border-radius: 0;
}

.uploaded-photo {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 8;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1);
  transform-origin: center;
  pointer-events: none;
}

.crop-photo.has-background .uploaded-photo {
  filter: grayscale(1);
}

.portrait {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, #f6f6f6 0 4%, transparent 5%),
    linear-gradient(120deg, #b4b4b4, #e6e6e6 40%, #898989 100%);
}

.crop-photo.has-upload .portrait {
  display: none;
}

.head {
  position: absolute;
  left: 24%;
  top: 15%;
  width: 50%;
  height: 48%;
  border-radius: 48% 48% 44% 44%;
  background:
    radial-gradient(circle at 36% 36%, rgba(255,255,255,0.65), transparent 21%),
    linear-gradient(135deg, #eee, #aaa 65%, #666);
  box-shadow: inset -34px -18px 40px rgba(0, 0, 0, 0.28);
}

.hair {
  position: absolute;
  z-index: 2;
  left: 20%;
  top: 9%;
  width: 57%;
  height: 24%;
  border-radius: 54% 54% 30% 30%;
  background: radial-gradient(circle at 42% 45%, #f6f6f6, #bdbdbd 42%, #646464 78%);
}

.ear {
  position: absolute;
  top: 35%;
  width: 8%;
  height: 13%;
  border-radius: 50%;
  background: #aaa;
}

.ear.left { left: 19%; }
.ear.right { right: 22%; }

.eye {
  position: absolute;
  z-index: 3;
  top: 35%;
  width: 7%;
  height: 2.2%;
  border-radius: 99px;
  background: #333;
}

.eye.left { left: 38%; }
.eye.right { left: 56%; }

.nose {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 39%;
  width: 6%;
  height: 12%;
  border-radius: 45%;
  border-right: 4px solid rgba(0, 0, 0, 0.25);
}

.mouth {
  position: absolute;
  z-index: 4;
  left: 43%;
  top: 56%;
  width: 21%;
  height: 7%;
  border-bottom: 5px solid #555;
  border-radius: 50%;
}

.beard {
  position: absolute;
  z-index: 3;
  left: 31%;
  top: 50%;
  width: 39%;
  height: 24%;
  border-radius: 20% 20% 50% 50%;
  background: radial-gradient(circle at 50% 20%, transparent 0 28%, rgba(255,255,255,0.72) 30% 72%, transparent 74%);
}

.neck {
  position: absolute;
  left: 43%;
  top: 64%;
  width: 19%;
  height: 15%;
  background: #a4a4a4;
}

.shirt {
  position: absolute;
  left: 14%;
  bottom: -8%;
  width: 78%;
  height: 36%;
  border-radius: 45% 45% 0 0;
  background:
    linear-gradient(90deg, transparent 47%, rgba(30,30,30,0.4) 48% 50%, transparent 51%),
    linear-gradient(145deg, #d9d9d9, #777);
}

.handle {
  --handle-stroke: 6px;
  --handle-length: 34px;
  position: absolute;
  z-index: 26;
  background: var(--gold-bright);
  opacity: 0;
  pointer-events: none;
}

.photo-selection.is-visible .handle {
  opacity: 0;
  pointer-events: none;
}

.corner {
  width: 26px;
  height: 26px;
  background: transparent;
  border: 0 solid var(--gold-bright);
  border-radius: 0;
  box-shadow: none;
}

.corner::before,
.corner::after {
  content: none;
}

.top-left {
  left: -4px;
  top: -4px;
  border-top-width: var(--handle-stroke);
  border-left-width: var(--handle-stroke);
  border-top-left-radius: 6px;
  cursor: nwse-resize;
}

.top-right {
  right: -4px;
  top: -4px;
  border-top-width: var(--handle-stroke);
  border-right-width: var(--handle-stroke);
  border-top-right-radius: 6px;
  cursor: nesw-resize;
}

.bottom-left {
  left: -4px;
  bottom: -4px;
  border-bottom-width: var(--handle-stroke);
  border-left-width: var(--handle-stroke);
  border-bottom-left-radius: 6px;
  cursor: nesw-resize;
}

.bottom-right {
  right: -4px;
  bottom: -4px;
  border-bottom-width: var(--handle-stroke);
  border-right-width: var(--handle-stroke);
  border-bottom-right-radius: 6px;
  cursor: nwse-resize;
}

.side {
  width: var(--handle-stroke);
  height: var(--handle-length);
  border-radius: 999px;
}

.side.left {
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.side.right {
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.side.bottom {
  left: 50%;
  bottom: -4px;
  width: var(--handle-length);
  height: var(--handle-stroke);
  transform: translateX(-50%);
  cursor: ns-resize;
}

.side.top {
  left: 50%;
  top: -4px;
  width: var(--handle-length);
  height: var(--handle-stroke);
  transform: translateX(-50%);
  cursor: ns-resize;
}

.sample-text {
  position: absolute;
  z-index: 27;
  left: 43%;
  top: 75%;
  min-width: 0;
  min-height: 0;
  width: max-content;
  max-width: none;
  padding: 1px 6px 2px;
  border: 1px dashed transparent;
  border-radius: 8px;
  color: white;
  font-size: 82px;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  transform-origin: center center;
  white-space: nowrap;
  overflow: visible;
  outline: none;
  cursor: text;
  pointer-events: auto;
  touch-action: none;
  -webkit-user-modify: read-write-plaintext-only;
}

.sample-text img,
.sample-text svg,
.sample-text input,
.sample-text button {
  display: none !important;
}

.sample-text.is-active,
.sample-text:focus {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.sample-text:focus {
  background: transparent;
}

.sample-text.is-placeholder {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.text-toolbar-floating {
  position: absolute;
  z-index: 36;
  left: 0;
  top: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  max-width: min(340px, calc(100% - 28px));
  padding: 9px 14px;
  border: 2px solid rgba(88, 183, 255, 0.82);
  border-radius: 999px;
  background: rgba(246, 247, 248, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(22, 141, 255, 0.18);
}

/* Shared: hide styling toolbar while text is actively focused/being typed. */
.stage.is-text-typing .text-toolbar-floating {
  display: none !important;
}

.stage.is-text-typing .text-font-tray {
  display: none !important;
}

/* Shared: hide text selection frame and handles while actively typing. Text itself remains visible. */
.stage.is-text-typing .text-selection {
  display: none !important;
  pointer-events: none;
}

.stage.is-text-typing .text-selection.is-visible [data-text-handle],
.stage.is-text-typing .text-selection.is-visible .handle {
  opacity: 0;
  pointer-events: none;
}

/* Shared: remove dashed/focus/placeholder box from active typing text. Text colour and visibility unchanged. */
.stage.is-text-typing .sample-text.is-active,
.stage.is-text-typing .sample-text:focus,
.stage.is-text-typing .sample-text.is-placeholder {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  outline: none;
}

/* Native input overlay — active typing only, not exported or saved. */
.text-typing-input {
  position: absolute;
  z-index: 35;
  box-sizing: border-box;
  display: none;
  width: var(--active-typing-width, min(72vw, calc(100% - 40px)));
  max-width: var(--active-typing-width, min(72vw, calc(100% - 40px)));
  padding: 4px 8px;
  border: 0 !important;
  border-radius: 4px;
  background: transparent !important;
  background-color: transparent !important;
  appearance: none;
  -webkit-appearance: none;
  color: #fff;
  caret-color: #fff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  outline: none !important;
  box-shadow: none !important;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  height: auto;
  min-height: 0;
  line-height: 1.08;
}

.text-typing-input::selection {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.text-typing-input.is-new-text-placeholder {
  text-align: center;
}

.text-typing-input.is-overflowing {
  text-align: left;
}

.text-typing-input.is-visible {
  display: block;
}

.stage.is-text-typing .sample-text.is-active.is-typing-source-hidden {
  opacity: 0 !important;
}

/* Desktop active typing workspace — unclip text layer, show dark overlay, keep controls visible. */
@media (min-width: 701px) {
  .stage.is-text-typing .text-layer-container {
    clip-path: none !important;
  }

  .stage.is-text-typing .text-layer-container::before {
    position: absolute;
    inset: 0;
    content: "";
    background: rgba(0, 0, 0, 0.70);
    pointer-events: none;
  }

  .stage.is-text-typing .sample-text.is-active {
    left: 50% !important;
    max-width: calc(100% - 48px);
    text-align: center;
    transform: translateX(-50%);
  }

  .stage.is-text-typing .text-toolbar-floating:not([hidden]) {
    display: flex !important;
  }
}

.text-done {
  display: none;
}

.mobile-font-strip {
  display: none;
}

.text-toolbar-floating select,
.text-toolbar-floating button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #050505;
  font-weight: 800;
}

.text-toolbar-floating select {
  display: none;
}

.text-toolbar-floating button {
  width: 42px;
  font-size: 30px;
  line-height: 1;
}

.text-font-tray {
  position: absolute;
  z-index: 35;
  left: 12px;
  right: 12px;
  bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.text-font-tray[hidden] {
  display: none !important;
}

.text-font-tray::-webkit-scrollbar {
  display: none;
}

.text-font-tray .mobile-font-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-width: 100%;
}

.text-font-tray .mobile-font-strip button {
  flex: 0 0 auto;
  min-width: 128px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(42, 42, 42, 0.92);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.text-font-tray .mobile-font-strip button[data-font-sample="monotype"] {
  font-weight: 600;
  font-style: italic;
}

.text-font-tray .mobile-font-strip button[data-font-sample="impact"] {
  font-weight: 700;
}

.text-font-tray .mobile-font-strip button[data-font-sample="arial"] {
  font-weight: 500;
}

.text-font-tray .mobile-font-strip button[data-font-sample="times"] {
  font-weight: 700;
}

.text-font-tray .mobile-font-strip button[data-font-sample="dancing"] {
  font-weight: 700;
}

.text-font-tray .mobile-font-strip button.is-active {
  background: rgba(246, 247, 248, 0.96);
  color: #050505;
}

.photo-toolbar-floating {
  position: absolute;
  z-index: 36;
  left: 0;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  max-width: min(520px, calc(100% - 28px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 19, 19, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.photo-toolbar-floating button {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.photo-tool-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-tool-group button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #13243a;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.photo-tool-group button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
}

.toggle-option,
.text-toggle-option {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: #fff;
}

.toggle-option.is-active,
.text-toggle-option.is-active {
  border-color: var(--gold-bright);
  background: var(--gold-bright);
  color: #111514;
  font-weight: 900;
}

.editor-bottom-actions {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(260px, 0.58fr);
  gap: 12px;
  width: min(720px, 100%);
  margin: 0 auto;
}

.change-photo-btn,
.save-btn {
  min-height: 70px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 900;
}

.change-photo-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
}

.save-btn span {
  display: block;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.save-btn {
  border: 0;
  background: linear-gradient(#58b7ff, #168dff);
  color: #fff;
}

.review-dialog {
  width: min(760px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: #07111d;
  color: white;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.review-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.review-header h1,
.eyebrow {
  margin: 0;
}

.review-header h1 {
  font-size: 32px !important;
  font-weight: 850 !important;
  line-height: 1.1 !important;
}

.eyebrow {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.close-review {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 28px;
  line-height: 1;
}

.review-image {
  display: block;
  width: 100%;
  max-height: 54vh;
  object-fit: contain;
  border-radius: 6px;
  background: #050606;
}

.review-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.review-list div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.review-list dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.review-list dd {
  margin: 0;
  font-size: 18px;
}

.review-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
}

.review-actions button {
  min-height: 58px;
}

@media (max-width: 1100px) {
  .app {
    padding: 18px 14px 118px;
  }

  .product-view {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .configurator-view {
    padding: 12px;
  }

  .editor-modal {
    width: min(900px, calc(100vw - 24px));
  }

  .product-preview {
    position: relative;
    top: auto;
    min-height: 0;
  }

  .sticky-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 700px) {
  .app {
    padding-bottom: 48px;
  }

  .product-preview {
    aspect-ratio: 807 / 1057;
    min-height: 0;
    height: auto;
    max-height: none;
    padding: 14px 0 28px;
    overflow: hidden;
  }

  .product-preview-image {
    width: 94%;
    height: 94%;
    object-fit: contain;
    object-position: center top;
  }

  .product-placeholder {
    width: 98%;
    height: 98%;
  }

  .product-crystal-reference {
    width: min(96%, 560px);
  }

  .sticky-bar {
    display: none;
  }

  .product-actions,
  .product-media-actions .design-actions,
  .editor-header,
  .review-list,
  .review-actions {
    grid-template-columns: 1fr;
  }

  .design-actions {
    flex-direction: column;
  }

  .configurator-view {
    align-items: end;
    padding: 0;
    background: rgba(2, 9, 16, 0.78);
  }

  .editor-modal {
    width: 100%;
    max-height: 100dvh;
    padding: 10px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 14px 14px 0 0;
  }

  .editor-header {
    display: none;
  }

  .editor-grid {
    gap: 10px;
  }

  .stage {
    min-height: min(720px, calc(100dvh - 92px));
    border-radius: 6px;
  }

  .stage.is-mobile-text-editing::after {
    z-index: 31;
    background: rgba(0, 0, 0, 0.55);
  }

  .stage.is-mobile-text-editing .crystal-shell {
    filter: brightness(0.58);
  }

  .stage.is-mobile-text-editing .canvas-add-text,
  .stage.is-mobile-text-editing .canvas-background-toggle,
  .stage.is-mobile-text-editing .canvas-template-switch,
  .stage.is-mobile-text-editing .status-panel,
  .stage.is-mobile-text-editing .photo-toolbar-floating,
  .stage.is-mobile-text-editing .photo-selection {
    opacity: 0;
    pointer-events: none;
  }

  .configurator-view.is-mobile-text-editing .editor-bottom-actions {
    display: none;
  }

  .status-panel {
    top: auto;
    bottom: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
    padding: 10px 12px;
    font-size: 13px;
  }

  .stage.is-aligning::before {
    opacity: 0.36;
  }

  .stage.is-aligning .photo-selection.is-visible::before,
  .stage.is-aligning .photo-selection.is-visible::after {
    opacity: 0;
  }

  .crystal-shell {
    top: 124px;
    height: calc(100% - 170px);
    aspect-ratio: 0.68;
  }

  .crop-box {
    left: 7.5%;
    top: 5.5%;
    width: 85%;
    height: 89%;
  }

  .crop-photo {
    inset: 0;
  }

  .sample-text {
    width: max-content;
    max-width: none;
    overflow: visible;
    font-size: 40px;
    min-width: 120px;
    min-height: 64px;
    padding: 6px 18px 8px;
    line-height: 1.05;
  }

  .stage.is-mobile-text-editing .sample-text {
    opacity: 0.25;
  }

  .stage.is-mobile-text-editing .sample-text.is-active {
    z-index: 43;
    left: 50% !important;
    top: 27% !important;
    box-sizing: border-box;
    width: max-content;
    min-width: 0;
    min-height: 0;
    max-width: min(82vw, calc(100% - 32px));
    padding: 8px 16px;
    border-color: transparent;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    text-align: left;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    opacity: 1;
    color: #fff;
    font-size: clamp(28px, 8.5vw, 42px) !important;
    transform: translate(-50%, -50%);
  }

  .stage.is-mobile-text-editing .sample-text.is-active::-webkit-scrollbar {
    display: none;
  }

  /* Newly added text only: override left/top with live print-area centre variables. */
  .stage.is-mobile-text-editing .sample-text.is-active.is-new-text-mobile-centered {
    left: var(--mobile-active-text-center-x, 50%) !important;
    top: var(--mobile-active-text-center-y, 27%) !important;
  }

  .stage.is-mobile-text-editing .sample-text.is-active:focus {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }

  .stage.is-mobile-text-editing .text-layer-container {
    z-index: 43;
  }

  .stage.is-mobile-text-editing .text-selection {
    display: none;
  }

  .photo-selection.is-visible .handle,
  .text-selection.is-visible .handle {
    opacity: 0;
    pointer-events: none;
  }

  .photo-selection,
  .text-selection {
    border-color: rgba(255, 204, 54, 0.82);
    box-shadow: none;
  }

  .canvas-add-text {
    top: 12px;
    left: 12px;
    min-height: 44px;
    padding: 0 14px;
    font-size: 16px;
  }

  .canvas-add-text span {
    font-size: 13px;
  }

  .canvas-background-toggle {
    top: 12px;
    right: 10px;
    max-width: calc(100% - 142px);
    min-height: 44px;
    gap: 3px;
    padding: 4px;
  }

  .canvas-background-toggle span {
    padding: 0 2px 0 6px;
    font-size: 10px;
    line-height: 1;
  }

  .canvas-background-toggle .toggle-option {
    min-height: 32px;
    padding: 0 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  .canvas-template-switch {
    left: 10px;
    right: 10px;
    bottom: 70px;
    justify-content: center;
    min-height: 38px;
    gap: 3px;
    padding: 4px;
  }

  .canvas-template-switch span {
    padding: 0 2px 0 4px;
    font-size: 10px;
  }

  .canvas-template-switch button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 11px;
  }

  .text-toolbar-floating {
    max-width: calc(100% - 20px);
    padding: 8px;
    gap: 6px;
    border-radius: 10px;
  }

  .photo-toolbar-floating {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: calc(100% - 20px);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    pointer-events: none;
  }

  .photo-toolbar-floating[hidden] {
    display: none !important;
  }

  .photo-toolbar-floating .photo-tool-group {
    pointer-events: auto;
    padding: 4px;
    border: 1px solid rgba(88, 183, 255, 0.24);
    border-radius: 999px;
    background: rgba(8, 17, 29, 0.78);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  }

  .photo-toolbar-floating .photo-tool-group {
    display: none;
    gap: 4px;
  }

  .photo-toolbar-floating.has-photo-tools .photo-tool-group {
    display: flex;
  }

  .photo-toolbar-floating .photo-tool-group button {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 20px;
  }

  .photo-toolbar-floating .photo-tool-group button svg {
    width: 16px;
    height: 16px;
  }

  .text-toolbar-floating {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .text-toolbar-floating::-webkit-scrollbar {
    display: none;
  }

  .text-toolbar-floating select {
    display: none;
  }

  .mobile-font-strip {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    align-items: center;
    min-width: max-content;
  }

  .mobile-font-strip button {
    width: auto;
    min-width: 94px;
    padding: 0 14px;
    border-radius: 10px;
    background: rgba(38, 42, 46, 0.92);
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
  }

  .mobile-font-strip button.is-active {
    background: rgba(244, 248, 255, 0.94);
    color: #111;
  }

  /* Transform toolbar follows selected text; fonts are now in .text-font-tray. */
  .text-toolbar-floating:not([hidden]) {
    position: absolute;
    z-index: 36;
    right: auto;
    bottom: auto;
    max-width: min(300px, calc(100% - 24px));
  }

  /* Toolbar is hidden while the keyboard is open; shown in styling mode after blur. */
  .stage.is-mobile-text-editing .text-toolbar-floating,
  .stage.is-mobile-text-editing .text-font-tray {
    display: none !important;
  }

  .stage.is-mobile-text-editing .text-done {
    display: inline-flex;
  }

  .text-toolbar-floating button {
    width: 38px;
    min-height: 36px;
    font-size: 28px;
  }

  .text-font-tray {
    left: 10px;
    right: 10px;
    bottom: 12px;
  }

  .text-font-tray .mobile-font-strip button {
    min-width: 116px;
    min-height: 48px;
    padding: 0 18px;
    font-size: 18px;
  }

  .corner {
    width: 18px;
    height: 18px;
  }

  .top-left {
    left: -5px;
    top: -5px;
    border-radius: 5px 5px 10px 5px;
  }

  .top-right {
    right: -5px;
    top: -5px;
    border-radius: 5px 5px 5px 10px;
  }

  .bottom-left {
    left: -5px;
    bottom: -5px;
    border-radius: 5px 10px 5px 5px;
  }

  .bottom-right {
    right: -5px;
    bottom: -5px;
    border-radius: 10px 5px 5px 5px;
  }

  .side {
    width: 8px;
    height: 28px;
  }

  .side.left {
    left: -5px;
  }

  .side.right {
    right: -5px;
  }

  .side.bottom {
    left: 48%;
    bottom: -6px;
    width: 34px;
    height: 8px;
  }

  .side.top {
    left: 48%;
    top: -6px;
    width: 34px;
    height: 8px;
  }

  .editor-bottom-actions {
    grid-template-columns: 1fr 1.15fr;
    gap: 8px;
  }

  .change-photo-btn,
  .save-btn {
    min-height: 56px;
    font-size: 16px;
  }

  .save-btn span {
    font-size: 12px;
  }
}

/* =====================================================
   PRODUCT PAGE LAYOUT POLISH — June 2026
   CSS only. No JS or Liquid files changed.
   Scoped to product-view classes only where possible.
   ===================================================== */

/* App background — brand primary with subtle gold warmth */
.app {
  background:
    radial-gradient(circle at 14% 18%, rgba(230, 199, 98, 0.055), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(21, 37, 63, 0.55), transparent 32%),
    var(--brand-bg-primary);
}

/* Preview area — premium gradient and gold border accent */
.product-preview {
  background:
    radial-gradient(circle at 24% 72%, rgba(21, 37, 63, 0.9), transparent 38%),
    radial-gradient(circle at 76% 18%, rgba(230, 199, 98, 0.04), transparent 32%),
    linear-gradient(140deg, #060f1c, var(--brand-bg-primary) 52%, #0d1a2c);
  border-color: rgba(230, 199, 98, 0.13);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(230, 199, 98, 0.05) inset;
}

.product-preview:hover,
.product-preview:focus-visible {
  border-color: rgba(230, 199, 98, 0.44);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.44), 0 0 0 1px rgba(230, 199, 98, 0.13) inset;
}

.product-preview:focus-visible {
  outline-color: rgba(230, 199, 98, 0.38);
}

/* Primary upload/configure CTA — actual brand gold */
.configure-button {
  background: var(--brand-accent-gold);
  color: var(--brand-bg-primary);
  font-size: 16px;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 18px rgba(230, 199, 98, 0.18);
  transition: background 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.configure-button:hover {
  background: #f0d470;
  box-shadow: 0 6px 24px rgba(230, 199, 98, 0.30);
  transform: translateY(-1px);
}

.configure-button:active {
  transform: translateY(0);
}

/* Eyebrow / label text — actual brand gold */
.product-kicker,
.design-label {
  color: var(--brand-accent-gold);
}

/* Purchase highlight checkmarks — brand gold */
.purchase-highlights li::before {
  color: var(--brand-accent-gold);
}

/* Size card — gold selected state */
.size-card.is-selected {
  border-color: var(--brand-accent-gold);
  box-shadow: 0 0 0 1px var(--brand-accent-gold) inset;
  background: rgba(230, 199, 98, 0.06);
}

/* Size prices — brand gold */
.size-price {
  color: var(--brand-accent-gold);
}

/* Design summary card — subtle gold tint */
.design-card {
  border-color: rgba(230, 199, 98, 0.12);
  background: rgba(230, 199, 98, 0.022);
}

/* Add-ons section — subtle gold tint */
.addon-section {
  border-color: rgba(230, 199, 98, 0.1);
}

/* Add-on price labels — brand gold */
.addon-price {
  color: var(--brand-accent-gold);
}

/* Product panel — slightly more breathing room at top */
.product-panel {
  padding-top: 28px;
}

/* =====================================================
   MEDIUM BREAKPOINT (≤1100px) TWEAK
   ===================================================== */

@media (max-width: 1100px) {
  .product-preview {
    min-height: 380px;
  }
}

/* =====================================================
   MOBILE IMPROVEMENTS — max-width: 700px
   ===================================================== */

@media (max-width: 700px) {
  .app {
    padding-top: 14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .product-view {
    gap: 8px;
  }

  /* Larger, more dominant configure CTA on mobile */
  .configure-button {
    min-height: 58px;
    font-size: 17px;
  }

  .product-panel {
    padding-top: 0;
  }

  /* Slightly smaller heading — less overwhelming on small screens */
  .product-panel h1 {
    font-size: clamp(22px, 6.3vw, 30px) !important;
    line-height: 1.08 !important;
  }

  .price-row {
    margin-top: 14px;
    margin-bottom: 8px;
  }

  .price-row span {
    font-size: 38px;
  }

  .delivery-line {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .purchase-highlights {
    gap: 7px;
    margin-bottom: 16px;
    padding: 13px 14px;
  }

  .purchase-highlights li {
    font-size: 13px;
  }

  .quantity-row {
    min-height: 62px;
    margin-bottom: 14px;
    padding: 8px 10px 8px 14px;
    font-size: 16px;
  }

  .quantity-control {
    grid-template-columns: 44px 44px 44px;
    height: 44px;
  }

  /* Slightly more compact size cards on mobile */
  .size-card {
    min-height: 58px;
    padding: 12px 14px;
  }

  .size-name {
    font-size: 16px;
  }

  .size-price {
    font-size: 17px;
  }

  /* Design card tighter on mobile */
  .design-card {
    margin-top: 14px;
    padding: 14px;
  }

  .design-card h2 {
    font-size: 18px;
  }

  /* Add-ons tighter on mobile */
  .addon-section {
    margin-top: 14px;
  }

  .addon-row {
    padding: 12px 14px;
    gap: 12px;
  }

  /* Actions area tighter on mobile */
  .product-actions {
    margin-top: 18px;
  }

  .checkout-note {
    font-size: 12px;
  }
}

/* =====================================================
   RESPONSIVE MOBILE OVERRIDE — June 2026
   Replaces fixed-px override with clamp() values.
   Appended last so these win over all earlier rules.
   !important used only where JS inline styles interfere.
   ===================================================== */

@media (max-width: 700px) {
  .stage {
    min-height: min(720px, calc(100dvh - 92px));
  }

  .stage .crystal-shell {
    top: clamp(58px, 8dvh, 78px) !important;
    height: calc(100% - clamp(66px, 9dvh, 88px)) !important;
  }

  .product-preview {
    --mobile-gallery-edge-space: clamp(8px, 2.4vw, 16px);
    aspect-ratio: 807 / 940;
    display: grid;
    place-items: center;
    padding: var(--mobile-gallery-edge-space);
  }

  .product-preview-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
  }

  .product-gallery-preview {
    position: relative;
    grid-template-rows: minmax(0, 1fr);
    width: 98%;
    height: 98%;
    gap: 0;
  }

  .product-gallery-image {
    object-position: center top;
  }

  .product-gallery-strip {
    position: absolute;
    left: 50%;
    bottom: var(--mobile-gallery-edge-space);
    z-index: 4;
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    min-height: 0;
    justify-content: flex-start;
    padding: 6px;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid rgba(230, 199, 98, 0.18);
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(5, 12, 20, 0.72), rgba(9, 20, 34, 0.58));
    backdrop-filter: blur(10px);
    transform: translateX(-50%);
    scroll-padding: 6px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .product-gallery-strip::-webkit-scrollbar {
    display: none;
  }

  .product-gallery-nav {
    width: 38px;
    height: 38px;
    font-size: 31px;
  }

  .product-gallery-nav--prev {
    left: -10px;
  }

  .product-gallery-nav--next {
    right: -10px;
  }

  .product-gallery-thumb-button {
    flex: 0 0 auto;
    width: clamp(72px, 24vw, 96px);
    height: clamp(72px, 24vw, 96px);
    scroll-snap-align: start;
  }
}

/* =====================================================
   STAGE 2 MOBILE UX — June 2026
   1. Compact background pill with vertical popup dropdown
   2. Saved preview cleanup
   ===================================================== */

/* --- Compact background pill — horizontal segmented control (mobile only) --- */

@media (max-width: 700px) {
  /* Collapsed: horizontal pill — only "Background" label visible */
  .canvas-background-toggle {
    flex-direction: row;
    align-items: center;
    max-width: none;
    min-height: auto;
    min-width: 0;
    gap: 0;
    padding: 0;
    border-radius: 999px;
    overflow: hidden;
  }

  /* Expanded: stays a horizontal pill but widens to show options inline.
     max-width: calc(100% - 152px) leaves room for the + Text pill on the left
     (12px left offset + ~130px button width + 10px gap = ~152px). */
  .canvas-background-toggle.is-expanded {
    border-radius: 999px;
    background: #15253F;
    border-color: rgba(230, 199, 98, 0.30);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.48);
    max-width: calc(100% - 152px);
  }

  /* Compact label when expanded so options have room */
  .canvas-background-toggle.is-expanded > span {
    font-size: 11px;
    padding: 0 6px;
    min-height: 40px;
  }

  /* Always-visible "Background" label — matches .canvas-add-text height */
  .canvas-background-toggle > span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    cursor: pointer;
    letter-spacing: 0;
  }

  /* Options hidden in collapsed state */
  .canvas-background-toggle .toggle-option {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 0;
    border-left: 1px solid rgba(88, 183, 255, 0.22);
    border-top: none;
    font-size: 13px;
    white-space: nowrap;
    width: auto;
  }

  /* Options appear to the right of the label when expanded — compact to fit on small screens */
  .canvas-background-toggle.is-expanded .toggle-option {
    display: flex;
    color: #F5F7F8;
    font-weight: 700;
    font-size: 11px;
    padding: 0 5px;
    min-height: 40px;
    border-left-color: rgba(230, 199, 98, 0.14);
  }

  /* Active/selected option — gold highlight */
  .canvas-background-toggle.is-expanded .toggle-option.is-active {
    background: rgba(230, 199, 98, 0.14);
    color: #E6C762;
    border-left-color: rgba(230, 199, 98, 0.22);
    font-weight: 900;
  }
}

/* --- Saved preview cleanup (all viewports) --- */

/* When a saved image is visible, present it as the design hero */
.product-preview-image:not([hidden]) {
  display: block;
  width: calc(100% - clamp(28px, 4.5vw, 64px));
  height: calc(100% - clamp(28px, 4.5vw, 64px));
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  border-radius: 4px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.38));
}

/* Desktop only: text-selection handles — 8 total, slim tabs + border L-bracket corners. */
@media (min-width: 701px) {
  .text-selection.is-visible [data-text-handle] {
    display: block;
    width: var(--handle-length);
    height: var(--handle-stroke);
    border-radius: 999px;
    background: #58b7ff;
    border: 0;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
  }

  /* top/bottom: horizontal tabs — specificity matches base rule */
  .text-selection.is-visible [data-text-handle="top"],
  .text-selection.is-visible [data-text-handle="bottom"] {
    width: var(--handle-length);
    height: var(--handle-stroke);
  }

  .text-selection.is-visible [data-text-handle="top"] {
    left: 50%;
    top: -4px;
    transform: translateX(-50%);
    cursor: ns-resize;
  }

  .text-selection.is-visible [data-text-handle="bottom"] {
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);
    cursor: ns-resize;
  }

  /* left/right: vertical tabs — specificity matches base rule so dimensions override */
  .text-selection.is-visible [data-text-handle="left"],
  .text-selection.is-visible [data-text-handle="right"] {
    width: var(--handle-stroke);
    height: var(--handle-length);
  }

  .text-selection.is-visible [data-text-handle="right"] {
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
  }

  .text-selection.is-visible [data-text-handle="left"] {
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
  }

  /* Text corner handles: border-based L-shaped brackets */
  .text-selection.is-visible [data-text-handle].corner {
    width: 26px;
    height: 26px;
    background: transparent;
    border: 0 solid #58b7ff;
    box-shadow: none;
    border-radius: 0;
  }

  .text-selection.is-visible [data-text-handle].corner::before,
  .text-selection.is-visible [data-text-handle].corner::after {
    content: none;
  }

  /* Corner direction rules — specificity matches base corner rule so border widths override */
  .text-selection.is-visible [data-text-handle="top-left"].corner {
    left: -4px;
    top: -4px;
    border-top-width: var(--handle-stroke);
    border-left-width: var(--handle-stroke);
    border-top-left-radius: 6px;
  }

  .text-selection.is-visible [data-text-handle="top-right"].corner {
    right: -4px;
    top: -4px;
    border-top-width: var(--handle-stroke);
    border-right-width: var(--handle-stroke);
    border-top-right-radius: 6px;
  }

  .text-selection.is-visible [data-text-handle="bottom-left"].corner {
    left: -4px;
    bottom: -4px;
    border-bottom-width: var(--handle-stroke);
    border-left-width: var(--handle-stroke);
    border-bottom-left-radius: 6px;
  }

  .text-selection.is-visible [data-text-handle="bottom-right"].corner {
    right: -4px;
    bottom: -4px;
    border-bottom-width: var(--handle-stroke);
    border-right-width: var(--handle-stroke);
    border-bottom-right-radius: 6px;
  }
}

/* Desktop only: photo-selection handles — 8 total, follow transformed photo object bounds. */
@media (min-width: 701px) {
  .photo-selection.is-visible [data-handle] {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
}
