:root {
        color-scheme: light;
        --page: #fff;
        --ink: #1f2733;
        --muted: #7a8598;
        --line: #e4e8ee;
        --surface: #ffffff;
        --blue: #1f6fc2;
        --blue-2: #1a5ea8;
        --blue-soft: #eef4fb;
        --red: #e0483d;
        --radius: 16px;
        --radius-sm: 10px;
        --shadow: 0 18px 44px rgba(24, 45, 74, 0.08);
      }

      * {
        box-sizing: border-box;
      }

      [hidden] {
        display: none !important;
      }

      html,
      body {
        margin: 0;
        min-height: 100vh;
      }

      body {
        background: var(--page);
        color: var(--ink);
        font-family:
          "Segoe UI",
          "Noto Sans Georgian",
          system-ui,
          -apple-system,
          BlinkMacSystemFont,
          sans-serif;
      }

      button,
      input {
        font: inherit;
      }

      a {
        color: inherit;
        text-decoration: none;
      }

      /* ---- top bar ---- */
      .topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        height: 64px;
        padding: 0 26px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
      }

      .brand {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .brand img {
        height: 34px;
        width: auto;
      }

      .brand strong {
        color: var(--blue);
        font-size: 24px;
        font-weight: 900;
        letter-spacing: 0.3px;
      }

      .mode-tabs {
        display: flex;
        gap: 8px;
      }

      .mode-tab {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 42px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #f4f6f9;
        color: #5c6675;
        padding: 0 18px;
        font-size: 14px;
        font-weight: 800;
        cursor: pointer;
        transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
      }

      .mode-tab svg {
        width: 18px;
        height: 18px;
      }

      .mode-tab.active {
        border-color: var(--blue);
        background: linear-gradient(180deg, #2a7ccb 0%, var(--blue) 100%);
        color: #fff;
        box-shadow: 0 10px 22px rgba(31, 111, 194, 0.28);
      }

      /* ---- shell ---- */
      .app-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 40px 340px;
        gap: 0;
        width: min(1280px, calc(100% - 40px));
        margin: 22px auto;
        align-items: start;
      }

      .app-shell.collapsed {
        grid-template-columns: minmax(0, 1fr) 40px 0;
      }

      /* ---- stage (left) ---- */
      .stage {
        display: flex;
        flex-direction: column;
        gap: 14px;
        min-width: 0;
      }

      .stage-card {
        position: relative;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: var(--shadow);
        padding: 20px;
      }

      .drop-zone {
        display: grid;
        place-items: center;
        min-height: 440px;
        border: 2px dashed #c8d2df;
        border-radius: 14px;
        background: #fbfcfe;
        text-align: center;
        transition: border-color 0.15s ease, background 0.15s ease;
      }

      .drop-zone.drag {
        border-color: var(--blue);
        background: var(--blue-soft);
      }

      .drop-inner {
        display: grid;
        justify-items: center;
        gap: 16px;
        max-width: 420px;
        padding: 20px;
      }

      .drop-icon {
        position: relative;
        width: 84px;
        height: 84px;
        display: grid;
        place-items: center;
        color: #9fb0c4;
      }

      .drop-icon svg {
        width: 84px;
        height: 84px;
      }

      .drop-actions {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
      }

      canvas {
        display: block;
        width: 100%;
        height: auto;
        max-height: 560px;
        border-radius: 14px;
        object-fit: contain;
        background: #dce3ea;
      }

      canvas[hidden] {
        display: none !important;
      }

      .stage-foot {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 4px;
      }

      .foot-hint {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--muted);
        font-size: 12.5px;
        font-weight: 600;
      }

      .foot-hint svg {
        width: 16px;
        height: 16px;
        flex: 0 0 auto;
        color: #9aa6b6;
      }

      .foot-hint.accent svg {
        color: var(--red);
      }

      .stage-canvas-wrap.compare canvas {
        cursor: ew-resize;
      }

      /* ---- product drag & drop onto the photo ---- */
      /* The ring sits on the canvas itself, so it frames exactly the area that accepts
         a drop instead of the whole stage column. */
      .stage-canvas-wrap.drop-target canvas {
        box-shadow: 0 0 0 2px rgba(31, 111, 194, 0.5);
        transition: box-shadow 0.12s ease;
      }

      .stage-canvas-wrap.drop-target.drop-ready canvas {
        box-shadow: 0 0 0 4px var(--blue);
      }

      body.dragging-product {
        cursor: grabbing;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
      }

      /* Small cursor-following preview — never the full-resolution product photo. */
      .drag-ghost {
        --ghost-size: 72px;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 60;
        display: grid;
        place-items: center;
        width: var(--ghost-size);
        height: var(--ghost-size);
        border: 2px solid var(--blue);
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 14px 28px rgba(24, 45, 74, 0.28);
        transform: translate(-50%, -50%);
        opacity: 0.94;
        pointer-events: none;
      }

      .drag-ghost.over {
        border-color: var(--red);
        transform: translate(-50%, -50%) scale(1.06);
      }

      .drag-ghost img {
        width: calc(var(--ghost-size) - 12px);
        height: calc(var(--ghost-size) - 12px);
        border-radius: 50%;
        object-fit: contain;
      }

      /* ---- divider ---- */
      .divider {
        position: relative;
        align-self: stretch;
        display: flex;
        justify-content: center;
        min-height: 100%;
      }

      .divider::before {
        content: "";
        position: absolute;
        top: 8px;
        bottom: 8px;
        width: 1px;
        background: #d7dde6;
      }

      /* ---- sidebar (right) ---- */
      .sidebar {
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: var(--shadow);
        padding: 18px;
        display: flex;
        flex-direction: column;
        gap: 14px;
        min-width: 0;
        overflow: hidden;
      }

      .app-shell.collapsed .sidebar {
        display: none;
      }

      .sidebar-title {
        margin: 0;
        color: #46536a;
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 0.4px;
      }

      .search-box {
        display: flex;
        align-items: center;
        gap: 8px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #f6f8fb;
        padding: 0 12px;
        min-height: 44px;
      }

      .search-box svg {
        width: 17px;
        height: 17px;
        color: var(--muted);
        flex: 0 0 auto;
      }

      .search-box input {
        flex: 1 1 auto;
        min-width: 0;
        border: 0;
        background: transparent;
        color: var(--ink);
        outline: none;
      }

      .requested-changes {
        display: grid;
        gap: 8px;
        padding: 14px;
        border: 1px solid #dfe5ee;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 6px 18px rgba(29, 43, 65, 0.06);
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
      }

      .requested-changes:focus-within {
        border-color: rgba(31, 111, 194, 0.44);
        box-shadow: 0 8px 22px rgba(31, 111, 194, 0.1);
      }

      .requested-changes[hidden] {
        display: none;
      }

      .requested-changes-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
      }

      .requested-changes-head label {
        color: #253247;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.3;
        cursor: text;
      }

      .requested-changes-optional {
        flex: 0 0 auto;
        border-radius: 999px;
        background: rgba(31, 111, 194, 0.09);
        color: var(--blue);
        padding: 4px 8px;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
      }

      .requested-changes-hint {
        margin: -2px 0 2px;
        color: var(--muted);
        font-size: 11px;
        line-height: 1.4;
      }

      .requested-changes textarea {
        box-sizing: border-box;
        width: 100%;
        min-height: 84px;
        resize: vertical;
        border: 1px solid #e1e6ee;
        border-radius: 10px;
        background: #f7f9fc;
        color: var(--ink);
        padding: 10px 11px;
        font: inherit;
        font-size: 12px;
        line-height: 1.5;
        outline: none;
        transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
      }

      .requested-changes textarea::placeholder {
        color: #8793a6;
      }

      .requested-changes textarea:focus {
        border-color: rgba(31, 111, 194, 0.68);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(31, 111, 194, 0.09);
      }

      .product-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-height: 344px;
        overflow-y: auto;
        padding-right: 4px;
      }

      .product-list::-webkit-scrollbar {
        width: 7px;
      }

      .product-list::-webkit-scrollbar-thumb {
        background: #dbe1ea;
        border-radius: 10px;
      }

      .product-card {
        position: relative;
        flex: 0 0 auto;
        display: grid;
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 12px;
        align-items: center;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #fff;
        padding: 10px;
        text-align: left;
        cursor: pointer;
        overflow: hidden;
        transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
      }

      .product-card:hover {
        border-color: rgba(31, 111, 194, 0.4);
        box-shadow: 0 12px 24px rgba(24, 45, 74, 0.08);
        transform: translateY(-1px);
      }

      .product-card[draggable="true"],
      .product-card.draggable {
        cursor: grab;
      }

      /* order badge on a product whose spot was pinned on the photo */
      .card-pin {
        position: absolute;
        top: 8px;
        right: 8px;
        z-index: 2;
        display: grid;
        place-items: center;
        width: 20px;
        height: 20px;
        border: 2px solid #fff;
        border-radius: 50%;
        background: var(--blue);
        box-shadow: 0 4px 10px rgba(31, 111, 194, 0.32);
        color: #fff;
        font-size: 11px;
        font-weight: 800;
        font-variant-numeric: tabular-nums;
        pointer-events: none;
      }

      .product-card img {
        width: 54px;
        height: 54px;
        object-fit: contain;
        border-radius: var(--radius-sm);
        background: linear-gradient(180deg, #f7fbff 0%, #eef4fa 100%);
        pointer-events: none;
      }

      .product-card .info {
        min-width: 0;
      }

      .product-card strong {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding-right: 22px;
        font-size: 13.5px;
        font-weight: 800;
      }

      .product-card small {
        display: block;
        margin-top: 4px;
        color: var(--blue);
        font-size: 13px;
        font-weight: 800;
        font-variant-numeric: tabular-nums;
      }

      .product-card.active {
        border-color: var(--blue);
        box-shadow:
          0 0 0 3px rgba(31, 111, 194, 0.12),
          0 16px 30px rgba(31, 111, 194, 0.12);
      }

      .product-card.active::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        border-style: solid;
        border-width: 0 0 40px 40px;
        border-color: transparent transparent var(--red) transparent;
      }

      .product-card.active::before {
        content: "";
        position: absolute;
        right: 8px;
        bottom: 10px;
        z-index: 1;
        width: 11px;
        height: 6px;
        border-left: 3px solid #fff;
        border-bottom: 3px solid #fff;
        transform: rotate(-45deg);
      }

      .product-card.limit {
        opacity: 0.55;
      }

      .empty-list {
        border: 1px dashed #cbd5e1;
        border-radius: var(--radius-sm);
        padding: 16px;
        color: var(--muted);
        font-size: 13px;
        text-align: center;
      }

      .rail-hint {
        display: grid;
        grid-template-columns: 18px 1fr;
        gap: 10px;
        border-radius: 12px;
        background: var(--blue-soft);
        color: #5b6b82;
        padding: 12px 14px;
        font-size: 12px;
        line-height: 1.5;
      }

      .rail-hint svg {
        width: 16px;
        height: 16px;
        margin-top: 1px;
        color: var(--blue);
      }

      /* ---- buttons ---- */
      .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        min-height: 46px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--surface);
        color: var(--ink);
        padding: 0 18px;
        font-size: 14px;
        font-weight: 800;
        cursor: pointer;
        transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
      }

      .button svg {
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
      }

      .button.ghost:hover {
        border-color: rgba(31, 111, 194, 0.4);
        color: var(--blue);
      }

      .button.primary {
        border-color: var(--blue);
        background: linear-gradient(180deg, #2a7ccb 0%, var(--blue) 100%);
        color: #fff;
        box-shadow: 0 14px 26px rgba(31, 111, 194, 0.24);
      }

      .button.primary:hover {
        background: linear-gradient(180deg, #2575c4 0%, var(--blue-2) 100%);
      }

      .button:disabled {
        cursor: not-allowed;
        opacity: 0.6;
      }

      .sidebar .button.primary {
        width: 100%;
        min-height: 50px;
      }

      /* ---- loading overlay ---- */
      .stage-canvas-wrap {
        position: relative;
      }

      .stage-loader {
        position: absolute;
        inset: 0;
        z-index: 5;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 16px;
        border-radius: 14px;
        background: rgba(244, 247, 251, 0.82);
        backdrop-filter: blur(3px);
      }

      /* ---- error banner ---- */
      .stage-error {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 16px;
        z-index: 6;
        display: flex;
        align-items: center;
        gap: 10px;
        border: 1px solid #f0c2bd;
        border-left: 4px solid var(--red);
        border-radius: 12px;
        background: #fff;
        padding: 12px 14px;
        box-shadow: var(--shadow);
        color: #8a2b23;
        font-size: 13px;
        font-weight: 600;
      }

      .stage-error svg {
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
        color: var(--red);
      }

      .stage-error span {
        flex: 1 1 auto;
      }

      .stage-error button {
        border: 0;
        background: transparent;
        color: var(--muted);
        cursor: pointer;
        font-weight: 800;
        font-size: 16px;
        line-height: 1;
      }

      /* ---- history ---- */
      .history-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 2px;
      }

      .history-bar .history-label {
        flex: 0 0 auto;
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
      }

      .history-strip {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        cursor: grab;
        user-select: none;
        scrollbar-width: none;
        -ms-overflow-style: none;
      }

      .history-strip.grabbing {
        cursor: grabbing;
      }

      .history-strip::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
      }

      .history-item {
        position: relative;
        flex: 0 0 auto;
      }

      .history-thumb {
        display: block;
        flex: 0 0 auto;
        width: 62px;
        height: 46px;
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid var(--line);
        background: #eef1f5;
        cursor: pointer;
        padding: 0;
      }

      .history-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .history-thumb:hover {
        border-color: var(--blue);
      }

      .history-remove {
        position: absolute;
        top: 3px;
        right: 3px;
        display: grid;
        place-items: center;
        width: 16px;
        height: 16px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: rgba(21, 34, 54, 0.72);
        color: #fff;
        cursor: pointer;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.12s ease;
      }

      .history-remove svg {
        display: block;
        width: 10px;
        height: 10px;
      }

      .history-item:hover .history-remove,
      .history-remove:focus-visible {
        opacity: 1;
        pointer-events: auto;
      }

      .history-remove:hover {
        background: var(--red);
      }

      @media (hover: none) {
        .history-remove {
          opacity: 1;
          pointer-events: auto;
        }
      }

      @media (max-width: 940px) {
        .topbar {
          padding: 0 16px;
          height: auto;
          min-height: 64px;
          padding-top: 10px;
          padding-bottom: 10px;
          flex-wrap: wrap;
          justify-content: center;
          gap: 12px;
        }
        .app-shell {
          grid-template-columns: 1fr;
          width: calc(100% - 24px);
          margin: 12px auto;
          gap: 16px;
        }
        .divider {
          display: none;
        }
        .stage-card {
          padding: 12px;
        }
        .drop-zone {
          min-height: 280px;
        }
      }

/* ---- 2026 studio redesign ---- */
:root {
  --page: #f3f7fb;
  --ink: #182233;
  --muted: #697386;
  --line: #dbe6ef;
  --surface: #ffffff;
  --blue: #1768ad;
  --blue-2: #10578f;
  --blue-soft: #e8f0f6;
  --red: #d44136;
  --navy: #152236;
  --radius: 14px;
  --radius-sm: 7px;
  --shadow: 0 24px 60px rgba(24, 34, 51, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  background: linear-gradient(180deg, #ffffff 0%, var(--page) 100%);
  font-family: "Noto Sans Georgian", "Segoe UI", system-ui, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.26;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 76px;
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: rgba(21, 34, 54, 0.1);
  backdrop-filter: blur(18px) saturate(1.2);
}

.brand-lockup {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 14px;
}

.brand img {
  height: 31px;
}

.mode-tabs {
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(21, 34, 54, 0.1);
  border-radius: 10px;
  background: #eaf2f8;
}

.mode-tab {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #5d6673;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.mode-tab:hover {
  color: var(--ink);
}

.mode-tab.active {
  border: 0;
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 4px 12px rgba(21, 34, 54, 0.08);
}

.app-shell {
  grid-template-columns: minmax(0, 1fr) 28px 370px;
  width: min(1440px, calc(100% - 48px));
  margin: 34px auto 56px;
}

.stage {
  gap: 18px;
}

.stage-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 410px);
  align-items: end;
  gap: 36px;
  padding: 0 4px;
}

.loader-kicker {
  display: block;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.stage-heading h1 {
  max-width: 700px;
  margin: 8px 0 0;
  color: var(--navy);
  font-size: clamp(28px, 3.1vw, 46px);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.stage-heading p {
  max-width: 46ch;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  text-wrap: pretty;
}

.stage-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--navy);
  padding: 11px;
  box-shadow: 0 32px 70px rgba(21, 34, 54, 0.2);
}

.stage-canvas-wrap {
  overflow: hidden;
  min-height: 500px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #0f1929;
}

.stage-canvas-wrap::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
}

.drop-zone {
  position: relative;
  z-index: 1;
  min-height: 500px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  background: radial-gradient(circle at 50% 35%, rgba(45, 93, 137, 0.28), transparent 55%);
}

.drop-zone.drag {
  border-color: #6aa6d7;
  background: rgba(23, 104, 173, 0.15);
}

.drop-icon {
  color: #8096ad;
}

canvas {
  position: relative;
  z-index: 1;
  max-height: 610px;
  border-radius: 7px;
  background: #0f1929;
}

.stage-foot {
  justify-content: space-between;
  padding: 12px 5px 3px;
}

.stage-foot .foot-hint,
.history-label {
  color: #b4bdc9;
}

.stage-foot .foot-hint svg {
  color: #7f90a5;
}

.history-bar {
  padding: 12px 5px 2px;
}

.divider::before {
  top: 0;
  bottom: 0;
  background: rgba(21, 34, 54, 0.12);
}

.sidebar {
  position: sticky;
  top: 110px;
  max-height: calc(100dvh - 132px);
  border: 1px solid rgba(21, 34, 54, 0.11);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  padding: 18px;
  box-shadow: 0 18px 46px rgba(21, 34, 54, 0.08);
  backdrop-filter: blur(16px);
}

.sidebar-head {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
  padding-bottom: 2px;
}

.sidebar-title {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.search-box {
  min-height: 44px;
  border-color: #d8dbde;
  border-radius: 7px;
  background: #f1f6fa;
}

      .search-box:focus-within {
        border-color: var(--line);
        box-shadow: none;
      }

.product-list {
  gap: 7px;
  max-height: min(38dvh, 390px);
}

.product-card {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 11px;
  min-height: 70px;
  border-color: transparent;
  border-radius: 8px;
  background: #edf4f9;
  padding: 6px;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.product-card:hover {
  border-color: transparent;
  background: #e8edf0;
  box-shadow: none;
  transform: translateX(2px);
}

.product-card img {
  width: 58px;
  height: 58px;
  border-radius: 5px;
  background: #fff;
}

.product-card strong {
  font-size: 12.5px;
  font-weight: 700;
}

.product-card.active {
  border-color: transparent;
  background: #e2edf5;
  box-shadow: inset 3px 0 0 var(--blue);
}

.product-card.active::after {
  border-width: 0 0 30px 30px;
}

.product-card.active::before {
  right: 5px;
  bottom: 7px;
  width: 9px;
  height: 5px;
  border-width: 0 0 2px 2px;
}

.product-card:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.requested-changes {
  gap: 7px;
  border-color: #d8dbde;
  border-radius: 8px;
  background: #f3f8fc;
  padding: 12px;
  box-shadow: none;
}

.requested-changes-optional {
  border-radius: 4px;
}

.requested-changes textarea {
  border-radius: 6px;
  background: #fff;
}

.button {
  border-radius: 7px;
  font-size: 13px;
  font-weight: 750;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.button.primary,
.button.primary:hover {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(23, 104, 173, 0.2);
}

.button.primary:hover {
  background: var(--blue-2);
}

.generation-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
  text-align: center;
}

.generation-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--blue);
}

/* Production-style progress panel */
.stage-loader {
  z-index: 5;
  align-items: flex-end;
  justify-content: flex-end;
  padding: clamp(14px, 3vw, 30px);
  border-radius: 7px;
  background: rgba(8, 15, 25, 0.58);
  backdrop-filter: blur(5px) saturate(0.8);
}

.loader-panel {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  width: min(560px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.97);
  padding: 20px;
  box-shadow: 0 26px 64px rgba(4, 10, 18, 0.36), inset 0 1px 0 #fff;
}

.loader-orbit {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid #cbd8e2;
  border-radius: 50%;
}

.loader-orbit::before,
.loader-orbit::after,
.loader-orbit span {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.loader-orbit::before {
  inset: 7px;
  border: 1px solid #a8bdcd;
}

.loader-orbit::after {
  inset: 17px;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(23, 104, 173, 0.12);
}

.loader-orbit span {
  top: 2px;
  left: 21px;
  width: 6px;
  height: 6px;
  background: var(--red);
  transform-origin: 3px 22px;
  animation: nova-orbit 2.4s linear infinite;
}

@keyframes nova-orbit {
  to { transform: rotate(360deg); }
}

.loader-copy {
  min-width: 0;
}

.loader-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}

.stage-loader .loader-text {
  color: var(--ink);
  font-size: 16px;
  font-weight: 760;
  line-height: 1.3;
}

.progress-percent {
  color: var(--navy);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}

.progress-estimate {
  max-width: 48ch;
  margin: 7px 0 16px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.stage-loader .loader-bar {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 2px;
  background: #dfe4e7;
  overflow: hidden;
}

.stage-loader .loader-bar span {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), #4088bf);
  animation: none;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.loader-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: #858e99;
  font-size: 10px;
}

.loader-cancel {
  min-height: 30px;
  border: 0;
  border-bottom: 1px solid #aeb4bb;
  background: transparent;
  color: #4b5664;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.loader-cancel:hover {
  border-color: var(--red);
  color: var(--red);
}

.stage-error {
  border-radius: 7px;
  box-shadow: 0 16px 38px rgba(21, 34, 54, 0.18);
}

.button:focus-visible,
.mode-tab:focus-visible,
.product-card:focus-visible,
.history-thumb:focus-visible,
.history-remove:focus-visible,
.loader-cancel:focus-visible,
textarea:focus-visible,
.stage-canvas-wrap.compare canvas:focus-visible,
.stage-error button:focus-visible {
  outline: 3px solid rgba(23, 104, 173, 0.3);
  outline-offset: 2px;
}

body.is-generating .mode-tabs,
body.is-generating .sidebar {
  pointer-events: none;
  opacity: 0.62;
  filter: saturate(0.65);
}

body.is-generating .stage-loader,
body.is-generating .loader-cancel {
  pointer-events: auto;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr) 20px 340px;
    width: min(100% - 28px, 1180px);
  }

  .stage-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stage-heading p {
    max-width: 62ch;
  }
}

@media (max-width: 940px) {
  .topbar {
    position: relative;
    padding: 10px 16px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
    margin-top: 22px;
    gap: 16px;
  }

  .sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }

  .product-list {
    max-height: 390px;
  }

  .stage-card {
    padding: 8px;
  }

  .stage-canvas-wrap,
  .drop-zone {
    min-height: 420px;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: stretch;
  }

  .brand-lockup {
    justify-content: center;
  }

  .mode-tabs {
    width: 100%;
  }

  .mode-tab {
    flex: 1 1 50%;
    justify-content: center;
  }

  .app-shell {
    width: calc(100% - 16px);
    margin-top: 18px;
  }

  .stage-heading h1 {
    font-size: 29px;
  }

  .stage-heading p {
    font-size: 12px;
  }

  .stage-canvas-wrap,
  .drop-zone {
    min-height: 330px;
  }

  .stage-loader {
    align-items: stretch;
    padding: 8px;
  }

  .loader-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    border-radius: 8px;
    padding: 16px;
  }

  .loader-orbit {
    width: 36px;
    height: 36px;
  }

  .loader-orbit::after {
    inset: 12px;
  }

  .loader-orbit span {
    left: 15px;
    transform-origin: 3px 16px;
  }

  .loader-title-row {
    gap: 10px;
  }

  .stage-loader .loader-text {
    font-size: 14px;
  }

  .progress-percent {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- aspect-ratio and compact visual polish ---- */
.stage-heading {
  grid-template-columns: minmax(0, 1fr) minmax(230px, 360px);
}

.stage-heading h1 {
  max-width: 620px;
  font-size: clamp(24px, 2.35vw, 34px);
  line-height: 1.12;
}

.stage-card {
  border-color: #ccdae6;
  background: #e4eef6;
  box-shadow: 0 22px 54px rgba(35, 42, 51, 0.14);
}

.stage-canvas-wrap {
  border-color: #cbdbe7;
  background: #eef5fa;
}

.stage-canvas-wrap.has-image {
  min-height: 0;
}

.stage-canvas-wrap::before {
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(21, 34, 54, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 34, 54, 0.08) 1px, transparent 1px);
}

.drop-zone {
  border-color: #bfd1df;
  background: radial-gradient(circle at 50% 35%, rgba(23, 104, 173, 0.09), transparent 56%), #f5f9fc;
}

.drop-icon {
  color: #728397;
}

canvas {
  width: 100%;
  height: auto;
  max-height: none;
  background: #eef5fa;
}

.stage-foot .foot-hint,
.history-label {
  color: #657080;
}

.stage-foot .foot-hint svg {
  color: #8390a0;
}

.stage-loader {
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(26, 32, 39, 0.38);
}

.loader-panel {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  width: min(460px, 100%);
  padding: 16px;
}

.loader-orbit {
  width: 38px;
  height: 38px;
}

.loader-orbit::after {
  inset: 13px;
}

.loader-orbit span {
  left: 16px;
  transform-origin: 3px 17px;
}

.stage-loader .loader-text {
  font-size: 14px;
}

.progress-percent {
  font-size: 18px;
}

.progress-estimate {
  margin: 5px 0 12px;
  font-size: 10.5px;
  line-height: 1.45;
}

.loader-meta {
  margin-top: 7px;
  font-size: 9.5px;
}

@media (max-width: 620px) {
  .stage-heading h1 {
    font-size: 25px;
  }

  .loader-panel {
    width: min(390px, 100%);
    padding: 14px;
  }
}

.stage-card.has-image-card {
  width: min(100%, var(--image-frame-width, 100%));
  margin-inline: auto;
  transition: width 220ms ease;
}

/* ---- wide frame with image-derived side treatment ---- */
.stage-heading h1 {
  max-width: 520px;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.stage-card.has-image-card {
  width: 100%;
  margin-inline: 0;
}

.stage-canvas-wrap.has-image {
  min-height: 0;
}

canvas {
  width: 100%;
  height: auto;
  max-height: 610px;
}

@media (max-width: 620px) {
  .stage-heading h1 {
    font-size: 21px;
  }
}

/* ---- disclaimer gate ---- */
body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 28px);
  background: rgba(13, 21, 34, 0.58);
  backdrop-filter: blur(7px) saturate(0.9);
  animation: nova-fade-in 220ms ease both;
}

.modal-card {
  display: grid;
  justify-items: center;
  gap: 13px;
  width: min(500px, 100%);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  background: #fff;
  padding: clamp(20px, 4.4vw, 30px) clamp(18px, 4.4vw, 30px);
  text-align: center;
  box-shadow: 0 30px 76px rgba(6, 12, 22, 0.4), inset 0 1px 0 #fff;
  animation: nova-pop-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.modal-icon svg {
  width: 24px;
  height: 24px;
}

.modal-title {
  margin: 0;
  color: var(--navy);
  font-size: clamp(17px, 4.4vw, 20px);
  font-weight: 760;
  letter-spacing: -0.02em;
}

.modal-body {
  /* let the copy use the full card width: a narrow ch-cap made the text look
     cropped on both sides inside the card. */
  max-width: 100%;
  margin: 0;
  color: #4c5869;
  font-size: clamp(12.5px, 3.4vw, 13.5px);
  line-height: 1.7;
  text-wrap: pretty;
}

.modal-accept {
  width: 100%;
  max-width: 240px;
  min-height: 48px;
  margin-top: 4px;
}

@keyframes nova-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes nova-pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ---- floating icon toolbar over the photo ---- */
.canvas-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.canvas-tools-group {
  display: flex;
  gap: 4px;
  border: 1px solid rgba(21, 34, 54, 0.09);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  padding: 4px;
  box-shadow: 0 10px 26px rgba(12, 22, 36, 0.18);
  backdrop-filter: blur(10px) saturate(1.1);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #35435a;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.icon-button:hover:not(:disabled) {
  background: var(--blue-soft);
  color: var(--blue);
}

.icon-button:active:not(:disabled) {
  transform: scale(0.94);
}

.icon-button.danger:hover:not(:disabled) {
  background: rgba(212, 65, 54, 0.12);
  color: var(--red);
}

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

.icon-button:focus-visible {
  outline: 3px solid rgba(23, 104, 173, 0.32);
  outline-offset: 2px;
}

body.is-generating .canvas-tools {
  pointer-events: none;
  opacity: 0.45;
}

/* compare hint pill on the photo */
.compare-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: rgba(15, 25, 41, 0.74);
  color: #fff;
  padding: 7px 13px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
  backdrop-filter: blur(6px);
}

.compare-hint svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

body.is-generating .compare-hint {
  opacity: 0;
}

/* keep the compare drag from scrolling the page on touch devices */
.stage-canvas-wrap.compare canvas {
  touch-action: none;
}

/* ---- responsive polish ---- */
/* the later "compact polish" layer re-declared the two-column heading after the
   media queries, which kept the narrow text column on phones — reset it here. */
@media (max-width: 1080px) {
  .stage-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stage-heading p {
    max-width: 62ch;
  }
}

@media (max-width: 940px) {
  .stage {
    gap: 12px;
  }

  .stage-heading {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .canvas-tools {
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 620px) {
  .topbar {
    gap: 10px;
    padding: 9px 12px;
  }

  .brand img {
    height: 26px;
  }

  .mode-tab {
    min-height: 40px;
    font-size: 12.5px;
  }

  .app-shell {
    gap: 12px;
  }

  .stage-heading {
    grid-template-columns: 1fr;
    padding: 0 2px;
  }

  .stage-heading p {
    display: none;
  }

  .stage-heading h1 {
    font-size: 19px;
  }

  .drop-inner {
    gap: 12px;
    padding: 10px;
  }

  .drop-icon,
  .drop-icon svg {
    width: 58px;
    height: 58px;
  }

  .drop-actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .drop-actions .button {
    width: 100%;
  }

  .canvas-tools-group {
    border-radius: 10px;
    padding: 3px;
  }

  .icon-button {
    width: 36px;
    height: 36px;
  }

  .compare-hint {
    bottom: 8px;
    padding: 6px 10px;
    font-size: 10.5px;
  }

  .stage-foot {
    padding: 8px 3px 0;
  }

  .foot-hint {
    font-size: 11.5px;
  }

  .sidebar {
    border-radius: 10px;
    padding: 14px;
  }

  .sidebar-title {
    font-size: 15px;
  }

  .product-list {
    max-height: 300px;
  }

  .history-thumb {
    width: 54px;
    height: 40px;
  }

  .modal-accept {
    max-width: none;
  }
}

@media (max-width: 400px) {
  .mode-tab {
    padding: 0 8px;
    font-size: 12px;
  }

  .mode-tab svg {
    display: none;
  }

  .app-shell {
    width: calc(100% - 12px);
  }

  .stage-card {
    padding: 6px;
  }

  .stage-canvas-wrap,
  .drop-zone {
    min-height: 260px;
  }
}

/* ---- upload guidance and visualizer instructions ---- */
.drop-copy {
  display: grid;
  gap: 5px;
  color: #526077;
}

.drop-copy strong {
  color: var(--navy);
  font-size: 16px;
  font-weight: 760;
}

.drop-copy span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.sidebar-head {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.instruction-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #cfd9e6;
  border-radius: 50%;
  background: #f3f7fc;
  color: var(--blue);
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.instruction-button svg {
  width: 19px;
  height: 19px;
}

.instruction-button:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-2);
}

.instruction-button:active {
  transform: scale(0.94);
}

.instruction-button:focus-visible,
.modal-close:focus-visible {
  outline: 3px solid rgba(23, 104, 173, 0.3);
  outline-offset: 2px;
}

.instructions-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(760px, calc(100dvh - 28px));
  gap: 10px;
  text-align: left;
  overscroll-behavior: contain;
}

.instructions-card .modal-icon,
.instructions-card .modal-title,
.instructions-card .instructions-intro,
.instructions-card .modal-accept {
  justify-self: center;
  text-align: center;
}


.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #647187;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.modal-close:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.instructions-intro {
  margin-bottom: 4px;
}

.instructions-flow {
  width: 100%;
}

.instructions-list {
  display: grid;
  gap: 0;
  width: 100%;
  margin: 4px 0 8px;
  padding: 0;
  list-style: none;
  counter-reset: instruction-step;
}

.instructions-list li {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
}

.instructions-list li + li {
  border-top: 1px solid #e8edf3;
}

.instruction-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #cbdced;
  border-radius: 50%;
  background: #f2f7fc;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.instructions-list strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 13.5px;
  line-height: 1.35;
}

.instructions-list p {
  margin: 4px 0 0;
  color: #5e6a7d;
  font-size: 12.5px;
  line-height: 1.55;
}

.instruction-callout {
  display: inline-block;
  margin-top: 7px;
  border-radius: 6px;
  background: #edf5fd;
  padding: 6px 8px;
  color: #245f99;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.45;
}

@media (max-width: 620px) {
  .app-shell {
    margin-bottom: 24px;
  }

  .stage-canvas-wrap,
  .drop-zone {
    min-height: clamp(250px, 68vw, 330px);
  }

  .drop-copy strong {
    font-size: 14px;
  }

  .sidebar {
    width: 100%;
  }

  .product-list {
    max-height: min(46dvh, 340px);
    overscroll-behavior: contain;
  }

  #instructionsModal.modal-backdrop {
    place-items: end center;
    padding: 0;
  }

  .instructions-card {
    width: 100%;
    max-height: min(92dvh, 720px);
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
    padding:
      22px
      16px
      calc(16px + env(safe-area-inset-bottom, 0px));
    animation-name: nova-sheet-in;
  }

  .instructions-card .modal-icon {
    width: 40px;
    height: 40px;
  }

  .instructions-card .modal-title {
    font-size: 18px;
  }

  .instructions-intro {
    font-size: 12px;
    line-height: 1.55;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }

  .instructions-list li {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
  }

  .instruction-number {
    width: 27px;
    height: 27px;
  }

  .instructions-list p {
    font-size: 12px;
    line-height: 1.5;
  }

  .instruction-callout {
    display: block;
  }
}

@media (max-width: 420px) {
  .mode-tab {
    min-width: 0;
    padding-inline: 8px;
  }

  .mode-tab svg {
    width: 16px;
    height: 16px;
  }

  .sidebar-head {
    align-items: start;
  }

  .instruction-button {
    width: 38px;
    height: 38px;
  }

  .instructions-card {
    gap: 8px;
    padding-inline: 14px;
  }
}

@media (max-width: 620px) and (max-height: 700px) {
  .instructions-card .modal-icon {
    display: none;
  }

  .instructions-list li {
    padding-block: 8px;
  }
}

@keyframes nova-sheet-in {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- nova.ge brand alignment ---- */
@font-face {
  font-family: "HelveticaNeue";
  src: url("/static/fonts/HelveticaNeueLTGEO-55Roman.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeueLTGEO45";
  src: url("/static/fonts/HelveticaNeueLTGEO-45Light.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeueLTGEO65Medium";
  src: url("/static/fonts/HelveticaNeueLTGEO65Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeueBold";
  src: url("/static/fonts/HelveticaNeueLTGEO-75Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --page: #fff;
  --surface: #fff;
  --ink: #192029;
  --navy: #192029;
  --muted: #939aad;
  --line: #e5ecf2;
  --blue: #1968ab;
  --blue-2: #2379db;
  --blue-soft: #f5f8fc;
  --red: #e75560;
  --radius: 15px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(25, 104, 171, 0.08);
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: "HelveticaNeue", "Noto Sans Georgian", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font-family: inherit;
}

h1,
h2,
h3,
strong,
.sidebar-title,
.modal-title {
  font-family: "HelveticaNeueBold", "HelveticaNeue", sans-serif;
}

.topbar {
  border-bottom-color: var(--line);
  background: #fff;
  box-shadow: none;
}

.brand-lockup {
  gap: 0;
}

.mode-tabs {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  padding: 3px;
}

.mode-tab {
  border-radius: 15px;
  color: var(--main-text-color, #192029);
  font-family: "HelveticaNeueLTGEO65Medium", "HelveticaNeue", sans-serif;
  font-weight: 400;
}

.mode-tab.active {
  background: var(--blue);
  box-shadow: none;
  color: #fff;
}

.stage-card,
.sidebar,
.modal-card {
  border-color: var(--line);
  border-radius: 15px;
}

.stage-card,
.sidebar {
  box-shadow: var(--shadow);
}

.stage-canvas-wrap,
.drop-zone {
  border-radius: 15px;
}

.drop-zone {
  border-color: #d6e1eb;
  background: #fbfcfd;
}

.drop-zone.drag {
  border-color: var(--blue);
  background: var(--blue-soft);
}

canvas {
  border-radius: 15px;
}

.search-box,
.requested-changes,
.requested-changes textarea,
.empty-list,
.canvas-tools-group,
.stage-error,
.loader-panel {
  border-radius: 15px;
}

.search-box,
.requested-changes textarea {
  border-color: var(--line);
  background: #fbfcfd;
}

.product-card {
  border-color: var(--line);
  border-radius: 0;
  box-shadow: none;
}

.product-card:hover {
  border-color: var(--blue);
  box-shadow: 0 6px 18px rgba(25, 104, 171, 0.09);
}

.product-card.active {
  border-color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue);
}

.product-card.active::after {
  border-color: transparent transparent var(--red) transparent;
}

.product-card img {
  border-radius: 4px;
  background: #fbfcfd;
}

.button {
  border-color: var(--line);
  border-radius: 15px;
  font-family: "HelveticaNeueLTGEO65Medium", "HelveticaNeue", sans-serif;
  font-weight: 400;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: none;
}

.button.primary:hover {
  border-color: var(--blue-2);
  background: var(--blue-2);
}

.icon-button {
  border-radius: 15px;
}

.modal-icon,
.instruction-number,
.card-pin {
  border-radius: 50%;
}

.requested-changes-optional,
.rail-hint,
.instruction-callout,
.compare-hint {
  border-radius: 4px;
}

.modal-card {
  box-shadow: 0 24px 64px rgba(25, 32, 41, 0.2);
}

.modal-accept {
  border-radius: 15px;
}

.stage-heading h1 {
  color: var(--ink);
  font-family: "HelveticaNeueBold", "HelveticaNeue", sans-serif;
}

.stage-heading p,
.modal-body,
.instructions-list p,
.drop-copy span,
.generation-note {
  color: var(--muted);
  font-family: "HelveticaNeue", sans-serif;
}

.drop-copy strong,
.instructions-list strong,
.product-card strong {
  color: var(--ink);
}

.product-card small,
.instruction-button,
.rail-hint svg {
  color: var(--blue);
}

@media (max-width: 620px) {
  .sidebar,
  .instructions-card {
    border-radius: 15px;
  }

  .instructions-card {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
  }
}

/* ---- heading instructions trigger ----
   The subtitle paragraph was replaced by a labelled trigger that opens the
   instructions modal, so the stage heading is now a single column. */
.stage-heading {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

/* heading text and the trigger sit on one row, trigger to the right of the title */
.stage-heading-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 30px;
  min-width: 0;
}

.stage-heading-main h1 {
  margin: 0;
}

.instruction-button-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: center;
  gap: 8px;
  width: auto;
  height: auto;
  min-height: 36px;
  margin-top: 6px;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.instruction-button-inline svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.instruction-button-inline .instruction-button-label {
  color: inherit;
}

@media (max-width: 620px) {
  .stage-heading-main {
    gap: 8px 16px;
  }

  .instruction-button-inline {
    width: auto;
    height: auto;
    min-height: 34px;
    margin-top: 0;
    padding: 6px 12px;
    font-size: 12.5px;
  }
}
