:root {
  --canvas: #f2f0ea;
  --surface: #fffefa;
  --surface-strong: #ffffff;
  --surface-muted: #ebe8df;
  --ink: #202624;
  --ink-soft: #626966;
  --ink-faint: #858b88;
  --line: #d9d6cc;
  --line-strong: #c7c3b8;
  --accent: #b9563f;
  --accent-dark: #913d2c;
  --accent-soft: #f1d8d0;
  --success: #2f7157;
  --success-soft: #dfece5;
  --warning: #9a641f;
  --warning-soft: #f4e8d4;
  --danger: #a43e34;
  --danger-soft: #f4deda;
  --shadow: 0 18px 50px rgba(61, 55, 43, 0.12);
  --shadow-tight: 0 8px 24px rgba(61, 55, 43, 0.1);
  --radius-lg: 24px;
  --radius-md: 15px;
  --radius-sm: 10px;
  --header-height: 68px;
  color-scheme: light;
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", "Nirmala UI", "Yu Gothic UI",
    "Microsoft YaHei UI", "Malgun Gothic", "Noto Sans", "Noto Sans Arabic",
    "Noto Sans Devanagari", "Noto Sans Bengali", "Apple SD Gothic Neo", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
  background:
    linear-gradient(rgba(32, 38, 36, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 38, 36, 0.025) 1px, transparent 1px),
    var(--canvas);
  background-size: 24px 24px;
  font-size: 14px;
  line-height: 1.45;
}

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

button,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

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

:focus-visible {
  outline: 3px solid rgba(185, 86, 63, 0.34);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
}

h1,
h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.15;
}

h3 {
  margin-bottom: 4px;
  font-size: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon-button svg,
.button svg,
.guide-button svg,
.search-field svg,
.upload-zone svg,
.reallink-note svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-loading {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  align-content: center;
  gap: 24px;
  background: var(--canvas);
}

.loading-line,
.loading-card {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #dedbd2;
}

.loading-line::after,
.loading-card::after {
  display: block;
  width: 45%;
  height: 100%;
  content: "";
  background: rgba(255, 255, 255, 0.52);
  animation: loading-shimmer 1.2s ease-in-out infinite;
}

.loading-line--long {
  width: min(70vw, 420px);
  height: 12px;
}

.loading-card {
  width: min(78vw, 560px);
  aspect-ratio: 1.75;
  border-radius: 18px;
}

@keyframes loading-shimmer {
  from { transform: translateX(-110%); }
  to { transform: translateX(235%); }
}

.app {
  min-height: 100dvh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(199, 195, 184, 0.8);
  background: rgba(242, 240, 234, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
}

.brand-lockup,
.brand-copy,
.header-actions,
.workspace-controls,
.zoom-control,
.document-status,
.image-file-row,
.dialog-header {
  display: flex;
  align-items: center;
}

.brand-lockup {
  min-width: 224px;
  gap: 10px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-lockup:hover .brand-logo {
  transform: translateY(-1px);
}

.brand-copy {
  align-items: flex-start;
  flex-direction: column;
  line-height: 1.2;
}

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

.brand-copy span {
  color: var(--ink-soft);
  font-size: 11px;
}

.floating-reallink-cta {
  position: fixed;
  right: calc(28vw + 18px);
  bottom: 20px;
  z-index: 6;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  padding: 7px 15px 7px 8px;
  border: 1px solid rgba(32, 38, 36, 0.14);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 9px 26px rgba(61, 55, 43, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
  backdrop-filter: blur(14px);
  transition: border-color 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-reallink-cta img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.floating-reallink-cta:hover {
  border-color: rgba(32, 38, 36, 0.28);
  box-shadow: 0 12px 30px rgba(61, 55, 43, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transform: translateY(-2px);
}

.floating-reallink-cta:active {
  transform: translateY(1px) scale(0.98);
}

.header-actions {
  justify-content: flex-end;
  gap: 6px;
}

.language-control select {
  width: min(150px, 34vw);
  height: 38px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
}

.button,
.header-text-action,
.inspector-tabs button,
.mobile-edit-actions button,
.format-option,
.share-choice {
  overflow-wrap: anywhere;
}

html[dir="rtl"] .language-control select {
  padding-right: 10px;
  padding-left: 30px;
}

html[dir="rtl"] .template-rail {
  border-right: 0;
  border-left: 1px solid var(--line);
}

html[dir="rtl"] .inspector {
  border-right: 1px solid var(--line);
  border-left: 0;
}

html[dir="rtl"] .panel-intro {
  border-right: 3px solid var(--accent);
  border-left: 0;
}

html[dir="rtl"] .panel-intro--privacy {
  border-right-color: var(--success);
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] #qrDestinationInput,
html[dir="rtl"] .ai-answer-demo__link {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] input[type="range"],
html[dir="rtl"] output {
  direction: ltr;
}

.button,
.icon-button,
.guide-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 680;
  text-decoration: none;
  transition: background-color 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.button {
  padding: 9px 14px;
}

.icon-button {
  width: 40px;
  padding: 0;
  border-color: var(--line);
  background: var(--surface);
}

.icon-button--small {
  width: 34px;
  min-height: 34px;
  border-radius: 9px;
}

.button--quiet,
.guide-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button--primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 5px 14px rgba(32, 38, 36, 0.15);
}

.button--primary:hover {
  background: #303936;
}

.button--quiet:hover,
.icon-button:hover:not(:disabled),
.guide-button:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.button-count {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 10px;
}

.studio-shell {
  display: grid;
  height: calc(100dvh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
  grid-template-columns: minmax(250px, 0.72fr) minmax(440px, 1.55fr) minmax(300px, 0.88fr);
  align-items: stretch;
  overflow: hidden;
}

.template-rail,
.inspector {
  min-width: 0;
  background: rgba(255, 254, 250, 0.92);
}

.template-rail {
  border-right: 1px solid var(--line);
  padding: 22px 18px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.inspector {
  border-left: 1px solid var(--line);
  overflow: hidden;
}

.rail-heading,
.inspector-heading,
.workspace-topbar,
.subsection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.template-total {
  display: grid;
  min-width: 32px;
  height: 27px;
  place-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-family: "Cascadia Mono", "SFMono-Regular", monospace;
  font-size: 11px;
}

.rail-controls {
  display: grid;
  gap: 11px;
  margin: 20px 0 12px;
}

.field-block,
.range-field {
  display: grid;
  gap: 7px;
}

.field-block > span,
.range-field > span,
.choice-group legend {
  color: #3e4643;
  font-size: 12px;
  font-weight: 680;
}

.field-block > span b {
  margin-left: 3px;
  color: var(--accent);
}

.field-block input,
.field-block select,
.field-block textarea,
.search-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  box-shadow: inset 0 1px 1px rgba(32, 38, 36, 0.025);
}

.field-block input,
.field-block select,
.field-block textarea {
  padding: 9px 11px;
}

.field-block input[type="color"] {
  height: 44px;
  padding: 5px;
}

.field-block textarea {
  min-height: 62px;
  resize: vertical;
}

.field-block small,
.range-field small,
.toggle-row small,
.format-option small {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 450;
}

.field-block--compact {
  gap: 5px;
}

.field-block--compact input,
.field-block--compact select {
  min-height: 38px;
  padding: 7px 10px;
}

.custom-size-grid,
.two-column-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.two-column-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field svg {
  position: absolute;
  left: 11px;
  width: 16px;
  color: var(--ink-faint);
}

.search-field input {
  min-height: 40px;
  padding: 8px 10px 8px 35px;
}

.filter-strip {
  display: flex;
  gap: 7px;
  padding: 3px 0 13px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.filter-chip,
.text-button {
  border: 0;
  background: transparent;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.filter-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

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

.template-card {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: inherit;
  text-align: left;
  animation: template-in 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--template-index, 0) * 22ms);
}

@keyframes template-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.template-card:hover {
  background: var(--surface-muted);
}

.template-card.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(185, 86, 63, 0.12);
}

.template-card canvas {
  display: block;
  width: 100%;
  border: 1px solid rgba(32, 38, 36, 0.12);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(61, 55, 43, 0.1);
}

.template-card[data-orientation="portrait"] canvas {
  aspect-ratio: 0.57;
}

.template-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 670;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  padding: 42px 12px;
  color: var(--ink-soft);
  text-align: center;
}

.empty-state-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin: 0 auto 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--ink-faint);
  font-family: "Cascadia Mono", monospace;
}

.empty-state strong {
  display: block;
  color: var(--ink);
}

.empty-state p {
  max-width: 210px;
  margin: 5px auto 10px;
  font-size: 12px;
}

.text-button {
  padding: 2px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 720;
}

.text-button:hover {
  text-decoration: underline;
}

.text-button--danger {
  color: var(--danger);
}

.workspace {
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(380px, 1fr) auto;
  padding: 22px clamp(18px, 3vw, 44px) 14px;
  overflow: hidden;
}

.workspace-topbar {
  align-items: center;
  padding-bottom: 16px;
}

.workspace-controls {
  gap: 8px;
}

.segmented-control {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.64);
}

.segmented-control button {
  min-height: 34px;
  padding: 6px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 680;
}

.segmented-control button.is-active {
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: 0 2px 7px rgba(61, 55, 43, 0.1);
}

.segmented-control--wide {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-button {
  min-height: 40px;
  min-width: 122px;
  padding: 8px 13px;
  color: var(--ink-soft);
  font-size: 12px;
}

.guide-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
}

.guide-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 5px 14px rgba(32, 38, 36, 0.14);
}

.guide-button.is-active .guide-status-dot {
  border-color: #fff;
  background: #fff;
}

.guide-button.is-active:hover {
  border-color: #303936;
  background: #303936;
  color: #fff;
}

.guide-button:active {
  transform: translateY(1px) scale(0.985);
}

.canvas-stage {
  display: grid;
  min-height: 0;
  justify-items: safe center;
  align-items: safe center;
  align-content: safe center;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(113, 91, 145, 0.22);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 7% 4%, rgba(76, 207, 223, 0.94) 0%, rgba(91, 197, 223, 0.5) 28%, transparent 57%),
    radial-gradient(ellipse at 92% 6%, rgba(76, 126, 226, 0.94) 0%, rgba(106, 91, 223, 0.62) 34%, transparent 61%),
    radial-gradient(ellipse at 53% 28%, rgba(196, 72, 220, 0.82) 0%, rgba(190, 76, 218, 0.38) 36%, transparent 62%),
    radial-gradient(ellipse at 8% 96%, rgba(239, 139, 165, 0.92) 0%, rgba(238, 111, 139, 0.54) 37%, transparent 64%),
    radial-gradient(ellipse at 91% 94%, rgba(246, 73, 68, 0.96) 0%, rgba(244, 103, 58, 0.68) 37%, transparent 65%),
    linear-gradient(135deg, #68cbd9 0%, #9b7ee2 43%, #dc62bc 64%, #f26557 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 0 88px rgba(255, 255, 255, 0.13);
  overflow: auto;
}

.canvas-surface {
  position: relative;
  width: var(--preview-display-width, min(100%, 720px));
  max-width: none;
}

.canvas-surface canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  background: #fff;
  box-shadow:
    0 28px 60px rgba(57, 38, 82, 0.28),
    0 7px 18px rgba(83, 43, 72, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.32);
  cursor: default;
  touch-action: none;
}

.canvas-surface canvas.is-draggable {
  cursor: grab;
}

.canvas-surface canvas.is-dragging {
  cursor: grabbing;
}

.canvas-selection-label {
  position: absolute;
  top: -28px;
  right: 0;
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.canvas-instruction {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
  color: rgba(38, 34, 47, 0.76);
  font-size: 11px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.current-template-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 18px;
  color: rgba(38, 34, 47, 0.68);
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
}

.current-template-label > span:first-child {
  font-weight: 560;
}

.current-template-label strong {
  color: rgba(38, 34, 47, 0.9);
  font-weight: 740;
  letter-spacing: -0.01em;
}

.current-template-separator {
  width: 14px;
  height: 1px;
  background: rgba(38, 34, 47, 0.32);
}

.workspace-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
}

.zoom-control {
  gap: 8px;
}

.zoom-control output,
.size-readout {
  color: var(--ink-soft);
  font-family: "Cascadia Mono", "SFMono-Regular", monospace;
  font-size: 10px;
}

.zoom-control output {
  min-width: 38px;
  text-align: center;
}

.zoom-control input {
  width: 90px;
}

.document-status {
  justify-content: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.document-status.is-saving .status-dot {
  background: var(--warning);
  animation: status-pulse 1s ease-in-out infinite;
}

@keyframes status-pulse {
  50% { opacity: 0.34; transform: scale(0.72); }
}

.size-readout {
  justify-self: end;
}

.inspector-heading {
  padding: 22px 18px 14px;
}

.inspector-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-sheet-close {
  display: none;
}

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.inspector-tabs button {
  min-height: 42px;
  padding: 8px 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 720;
}

.inspector-tabs button.is-active {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.inspector-scroll {
  max-height: calc(100dvh - var(--header-height) - 117px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.inspector-panel {
  padding: 18px 18px 80px;
}

.panel-intro {
  margin-bottom: 18px;
  padding: 13px 14px;
  border-left: 3px solid var(--accent);
  background: #f6eee9;
}

.panel-intro--privacy {
  border-left-color: var(--success);
  background: var(--success-soft);
}

.panel-intro strong {
  display: block;
  font-size: 12px;
}

.panel-intro p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.form-stack {
  display: grid;
  gap: 15px;
}

.subsection {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.subsection-heading p {
  margin-bottom: 12px;
  color: var(--ink-faint);
  font-size: 11px;
}

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

.field-order-row {
  display: grid;
  min-height: 43px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.field-order-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.field-order-row span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-actions {
  display: flex;
  gap: 2px;
}

.order-actions button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft);
}

.order-actions button:hover:not(:disabled) {
  background: var(--surface-muted);
}

.choice-group,
.export-format-grid {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.choice-group legend,
.export-format-grid legend {
  margin-bottom: 7px;
}

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

.palette-button {
  min-height: 52px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.palette-button span {
  display: block;
  height: 100%;
  min-height: 38px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--palette-bg) 0 58%, var(--palette-accent) 58% 76%, var(--palette-ink) 76%);
}

.palette-button.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.range-field > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.range-field output {
  color: var(--ink-faint);
  font-family: "Cascadia Mono", monospace;
  font-size: 10px;
}

input[type="range"] {
  accent-color: var(--accent);
}

.range-field.is-disabled > span {
  color: #7b817e;
}

.range-field.is-disabled output {
  color: #929794;
}

.range-field input:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.42;
}

.toggle-row {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
}

.toggle-row > span {
  display: grid;
  gap: 2px;
}

.toggle-row strong {
  font-size: 12px;
}

.toggle-row--featured {
  min-height: 66px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f7f6f1;
}

.toggle-row--featured strong {
  font-size: 13px;
}

.toggle-row--featured small {
  max-width: 31ch;
  line-height: 1.45;
}

.toggle-row input[type="checkbox"] {
  width: 38px;
  height: 22px;
  appearance: none;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-muted);
  transition: background-color 180ms ease;
}

.toggle-row input[type="checkbox"]::after {
  display: block;
  width: 16px;
  height: 16px;
  margin: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(32, 38, 36, 0.22);
  content: "";
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-row input[type="checkbox"]:checked {
  border-color: var(--ink);
  background: var(--ink);
}

.toggle-row input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}

.upload-zone {
  display: grid;
  min-height: 146px;
  place-items: center;
  align-content: center;
  gap: 5px;
  margin: 16px 0 8px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: #faf9f5;
  color: var(--ink-soft);
  cursor: pointer;
  text-align: center;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.upload-zone:hover,
.upload-zone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-zone strong {
  color: var(--ink);
  font-size: 13px;
}

.upload-zone span {
  font-size: 11px;
}

.field-error {
  margin: 3px 0 0;
  color: var(--danger);
  font-size: 11px;
  font-weight: 620;
}

.image-editor {
  display: grid;
  gap: 16px;
  padding-top: 14px;
}

.image-file-row {
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.image-file-row img {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--surface-muted);
}

.image-file-row div {
  display: grid;
  min-width: 0;
  flex: 1;
}

.image-file-row strong,
.image-file-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-file-row strong {
  font-size: 11px;
}

.image-file-row span {
  color: var(--ink-faint);
  font-size: 10px;
}

.control-support-note {
  display: grid;
  gap: 4px;
  margin: -2px 0 0;
  padding: 10px 11px;
  border-left: 3px solid #858b88;
  background: #f0efea;
  color: #555d59;
}

.control-support-note strong {
  color: #343b38;
  font-size: 11px;
  font-weight: 720;
}

.control-support-note p {
  margin: 0;
  font-size: 10px;
  line-height: 1.55;
}

.reallink-note,
.qr-check-card,
.export-note {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f7f2;
}

.reallink-note svg {
  flex: 0 0 auto;
  color: var(--accent);
}

.reallink-note strong,
.qr-check-card strong,
.export-note strong {
  display: block;
  font-size: 11px;
}

.reallink-note p,
.qr-check-card p,
.export-note p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.qr-check-card {
  align-items: flex-start;
  margin-top: 22px;
}

.check-indicator {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 3px;
  border: 2px solid var(--ink-faint);
  border-radius: 50%;
}

.qr-check-card.is-pass .check-indicator {
  border-color: var(--success);
  background: var(--success);
}

.qr-check-card.is-error .check-indicator {
  border-color: var(--danger);
  background: var(--danger);
}

.mobile-action-bar {
  display: none;
}

.share-toast {
  position: fixed;
  top: calc(var(--header-height) + 14px);
  left: 50%;
  z-index: 8;
  max-width: min(90vw, 560px);
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  background: rgba(32, 40, 38, 0.94);
  color: #fffefa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 26px rgba(43, 38, 34, 0.18);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  opacity: 0;
  transform: translate(-50%, -6px);
  transition: opacity 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.share-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.share-toast[hidden] {
  display: none;
}

.studio-dialog {
  width: min(94vw, 680px);
  max-height: min(88dvh, 820px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.studio-dialog::backdrop {
  background: rgba(32, 38, 36, 0.48);
  backdrop-filter: blur(4px);
}

.studio-dialog[open] {
  animation: dialog-in 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog-shell {
  max-height: min(88dvh, 820px);
  padding: 22px;
  overflow-y: auto;
}

.dialog-shell--small {
  max-width: 520px;
}

.dialog-header {
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  font-size: 22px;
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.dialog-footer p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.preflight-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.summary-metric {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf9f5;
}

.summary-metric strong {
  display: block;
  font-family: "Cascadia Mono", monospace;
  font-size: 20px;
}

.summary-metric span {
  color: var(--ink-faint);
  font-size: 10px;
}

.summary-metric--error strong { color: var(--danger); }
.summary-metric--warning strong { color: var(--warning); }
.summary-metric--pass strong { color: var(--success); }

.preflight-list {
  display: grid;
  gap: 7px;
}

.preflight-item {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.preflight-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
}

.preflight-item--warning .preflight-icon {
  background: var(--warning-soft);
  color: var(--warning);
}

.preflight-item--error .preflight-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.preflight-item strong {
  display: block;
  font-size: 12px;
}

.preflight-item p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.preflight-item button {
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 700;
}

.export-format-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 18px 0;
}

.export-format-grid legend {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
}

.format-option {
  position: relative;
  display: grid;
  min-height: 128px;
  align-content: start;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.format-option input {
  position: absolute;
  top: 10px;
  right: 10px;
  accent-color: var(--accent);
}

.format-option.is-selected {
  border-color: var(--accent);
  background: #fbf3ef;
  box-shadow: inset 0 0 0 1px rgba(185, 86, 63, 0.12);
}

.format-option > span:last-child {
  display: grid;
  gap: 3px;
}

.format-option strong {
  font-size: 12px;
}

.format-monogram {
  color: var(--accent-dark);
  font-family: "Cascadia Mono", monospace;
  font-size: 18px;
  font-weight: 800;
}

.export-options {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.export-note {
  margin-top: 16px;
  border-color: #ddd1bd;
  background: var(--warning-soft);
}

.export-error {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: var(--danger-soft);
}

.export-progress,
.export-success {
  min-height: 310px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.export-progress {
  display: grid;
}

.progress-track {
  width: min(100%, 420px);
  height: 7px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.progress-track span {
  display: block;
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  transform: scaleX(var(--progress, 0.1));
  transform-origin: left;
}

.export-progress strong {
  font-size: 15px;
}

.export-progress p {
  max-width: 420px;
  margin: 5px auto 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.export-success {
  display: grid;
}

.success-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin-bottom: 13px;
  border-radius: 18px;
  background: var(--success-soft);
  color: var(--success);
}

.success-mark svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.export-success h3 {
  margin: 0;
  font-size: 22px;
}

.export-success p {
  margin: 4px 0 18px;
  color: var(--ink-soft);
}

.export-success small {
  max-width: 420px;
  color: var(--ink-faint);
  font-size: 10px;
}

.readonly-share-bar {
  display: grid;
  width: min(1180px, calc(100% - 36px));
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  margin: 18px auto 0;
  padding: 13px 14px;
  border: 1px solid rgba(199, 195, 184, 0.86);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 34px rgba(61, 55, 43, 0.09);
  backdrop-filter: blur(16px);
}

.readonly-share-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.readonly-share-identity > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.readonly-share-identity strong,
.readonly-share-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.readonly-share-identity strong {
  font-size: 14px;
}

.readonly-share-identity > div span {
  color: var(--ink-soft);
  font-size: 11px;
}

.readonly-share-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.readonly-contact-links,
.readonly-share-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.readonly-contact-links a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 720;
  text-decoration: none;
}

.readonly-contact-links a:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.readonly-share-actions .button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 10px;
  white-space: nowrap;
}

.readonly-share-actions svg,
.share-mode-option svg,
.share-image-option svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body.is-readonly-share {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 12%, rgba(78, 202, 224, 0.52), transparent 31%),
    radial-gradient(circle at 76% 18%, rgba(173, 91, 220, 0.45), transparent 32%),
    radial-gradient(circle at 87% 78%, rgba(238, 84, 91, 0.55), transparent 30%),
    radial-gradient(circle at 22% 84%, rgba(243, 143, 93, 0.48), transparent 35%),
    #809ddf;
}

body.is-readonly-share .app-header {
  position: relative;
  border-bottom-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 254, 250, 0.86);
}

body.is-readonly-share .header-actions,
body.is-readonly-share .template-rail,
body.is-readonly-share .inspector,
body.is-readonly-share .mobile-action-bar,
body.is-readonly-share .floating-reallink-cta,
body.is-readonly-share .tool-help {
  display: none !important;
}

body.is-readonly-share .studio-shell {
  display: grid;
  height: auto;
  min-height: calc(100dvh - var(--header-height) - 104px);
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
}

body.is-readonly-share .workspace {
  width: min(1180px, calc(100% - 36px));
  min-height: 0;
  margin: 0 auto;
  padding: 18px 0 34px;
  overflow: visible;
}

body.is-readonly-share .workspace-topbar,
body.is-readonly-share .workspace-footer,
body.is-readonly-share .canvas-instruction,
body.is-readonly-share .canvas-selection-label,
body.is-readonly-share .current-template-label {
  display: none !important;
}

body.is-readonly-share .canvas-stage {
  min-height: clamp(420px, 69dvh, 760px);
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 28px 80px rgba(42, 41, 70, 0.16);
  backdrop-filter: blur(18px) saturate(110%);
}

body.is-readonly-share .canvas-surface {
  pointer-events: none;
}

.ai-upgrade-offer {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(199, 195, 184, 0.9);
  border-radius: 17px;
  background: #f5f3ed;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.ai-upgrade-offer--compact {
  margin: 8px 0 2px;
}

.ai-upgrade-copy .eyebrow {
  margin-bottom: 4px;
}

.ai-upgrade-copy h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.15;
}

.ai-upgrade-copy > p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.ai-answer-demo {
  position: relative;
  display: grid;
  min-height: 392px;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(32, 38, 36, 0.12);
  border-radius: 16px;
  background: #fffefa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 12px 28px rgba(61, 55, 43, 0.08);
}

.ai-answer-demo::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 92% 8%, rgba(185, 86, 63, 0.1), transparent 30%),
    linear-gradient(135deg, rgba(47, 113, 87, 0.04), transparent 48%);
}

.ai-answer-demo__topbar {
  position: relative;
  display: grid;
  min-height: 43px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(217, 214, 204, 0.78);
}

.ai-answer-demo__brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
}

.ai-answer-demo__brand img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.ai-answer-demo__sample {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.ai-answer-demo__menu {
  display: grid;
  width: 20px;
  height: 20px;
  place-content: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
}

.ai-answer-demo__menu i {
  display: block;
  width: 8px;
  height: 1px;
  border-radius: 1px;
  background: var(--ink-soft);
}

.ai-answer-demo__conversation {
  position: relative;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 15px 12px 12px;
  transition: opacity 420ms cubic-bezier(0.16, 1, 0.3, 1), transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-answer-demo.is-booking-open .ai-answer-demo__conversation {
  opacity: 0.12;
  transform: translate3d(-10px, 0, 0);
}

html[dir="rtl"] .ai-answer-demo.is-booking-open .ai-answer-demo__conversation {
  transform: translate3d(10px, 0, 0);
}

.ai-answer-demo__bubble {
  width: fit-content;
  max-width: 88%;
  margin: 0;
  padding: 9px 10px;
  border-radius: 13px;
  font-size: 9px;
  line-height: 1.45;
  opacity: 0;
  will-change: transform, opacity;
}

.ai-answer-demo__bubble--question {
  justify-self: end;
  border-bottom-right-radius: 4px;
  background: #2b3330;
  color: #fffefa !important;
  -webkit-text-fill-color: #fffefa;
  opacity: 0;
  transform: translate3d(0, 9px, 0);
  transition: opacity 460ms cubic-bezier(0.16, 1, 0.3, 1), transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-answer-demo__bubble--question.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ai-answer-demo__bubble--question * {
  color: #fffefa !important;
  -webkit-text-fill-color: #fffefa;
}

.ai-answer-demo__bubble--answer {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(47, 113, 87, 0.16);
  border-bottom-left-radius: 4px;
  background: #edf4f0;
  color: #26302c;
  transform: translate3d(0, 8px, 0);
  transition: opacity 520ms cubic-bezier(0.16, 1, 0.3, 1), transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-answer-demo__bubble--answer.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ai-booking-action {
  justify-self: start;
  min-height: 27px;
  padding: 6px 9px;
  border: 1px solid rgba(47, 113, 87, 0.28);
  border-radius: 8px;
  background: #fffefa;
  color: #27644d;
  font: inherit;
  font-size: 8px;
  font-weight: 800;
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  transition: border-color 260ms ease, background-color 260ms ease, color 260ms ease, opacity 480ms cubic-bezier(0.16, 1, 0.3, 1), transform 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-booking-action.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ai-booking-action.is-selected {
  border-color: #2f7157;
  background: #2f7157;
  color: #fffefa;
}

.ai-booking-panel {
  position: absolute;
  top: 49px;
  right: 8px;
  bottom: 48px;
  left: 8px;
  z-index: 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 5px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.96);
  border-radius: 13px;
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 18px 38px -24px rgba(15, 23, 42, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.98);
  opacity: 0;
  transform: translate3d(104%, 0, 0);
  transition: opacity 540ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

html[dir="rtl"] .ai-booking-panel {
  transform: translate3d(-104%, 0, 0);
}

.ai-booking-panel.is-open {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ai-booking-panel__body {
  display: block;
  min-height: 0;
  padding: 1px 4px 5px 1px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.ai-booking-panel__body > * + * {
  margin-top: 5px;
}

.ai-booking-panel__body::-webkit-scrollbar {
  display: none;
}

.ai-booking-panel__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  padding: 0 2px 5px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.ai-booking-panel__header strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-booking-panel__header span {
  position: relative;
  max-width: 118px;
  padding-left: 8px;
  overflow: hidden;
  color: #2563eb;
  font-size: 7px;
  font-weight: 760;
  line-height: 1.25;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-booking-panel__header span::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #2563eb;
  content: "";
  transform: translateY(-50%);
}

html[dir="rtl"] .ai-booking-panel__header span {
  padding-right: 8px;
  padding-left: 0;
  text-align: left;
}

html[dir="rtl"] .ai-booking-panel__header span::before {
  right: 0;
  left: auto;
}

.ai-booking-calendar {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.98);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 24px -22px rgba(15, 23, 42, 0.64), inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.ai-booking-calendar__head {
  display: flex;
  min-height: 27px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 4px 6px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.ai-booking-calendar__head > strong {
  position: relative;
  min-width: 0;
  padding: 2px 4px;
  border-radius: 999px;
  color: #0f172a;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 260ms ease, background-color 260ms ease, box-shadow 260ms ease;
}

.ai-booking-calendar__head > strong.is-ai-target {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.ai-booking-calendar__nav {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
}

.ai-booking-calendar__nav i {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(203, 213, 225, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.ai-booking-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  padding: 5px;
}

.ai-booking-calendar__weekday,
.ai-booking-calendar__day {
  display: grid;
  min-width: 0;
  min-height: 16px;
  place-items: center;
}

.ai-booking-calendar__weekday {
  color: #64748b;
  font-size: 6px;
  font-weight: 850;
  text-transform: uppercase;
}

.ai-booking-calendar__day {
  position: relative;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 7px;
  font-weight: 850;
  line-height: 1;
  transition: border-color 280ms ease, background-color 280ms ease, color 280ms ease, transform 280ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 280ms ease;
}

.ai-booking-calendar__day span {
  position: relative;
  z-index: 1;
}

.ai-booking-calendar__day.has-slots {
  border-color: rgba(203, 213, 225, 0.76);
  background: rgba(255, 255, 255, 0.82);
}

.ai-booking-calendar__day.has-slots::after {
  position: absolute;
  bottom: 1px;
  width: 2px;
  height: 2px;
  border-radius: 999px;
  background: #2563eb;
  content: "";
}

.ai-booking-calendar__day.is-outside {
  color: #cbd5e1;
  opacity: 0.58;
}

.ai-booking-calendar__day.is-ai-target,
.ai-booking-slots button.is-ai-target,
.ai-booking-details-field input.is-ai-target {
  border-color: #2563eb;
  outline: 1px solid rgba(37, 99, 235, 0.9);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.ai-booking-calendar__day.is-selected,
.ai-booking-slots button.is-selected {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 9px 18px -13px rgba(15, 23, 42, 0.94), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.ai-booking-calendar__day.is-selected::after {
  background: #93c5fd;
}

.ai-booking-time-block {
  display: grid;
  gap: 3px;
}

.ai-booking-time-block > span {
  color: #64748b;
  font-size: 7px;
  font-weight: 820;
}

.ai-booking-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.ai-booking-slots button {
  min-width: 0;
  min-height: 28px;
  padding: 4px 3px;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: #1e293b;
  font: inherit;
  font-size: 7px;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 280ms ease, background-color 280ms ease, color 280ms ease, transform 280ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 280ms ease;
}

.ai-booking-details-field {
  display: grid;
  gap: 3px;
  padding: 1px 0 5px;
}

.ai-booking-details-field > span {
  color: #64748b;
  font-size: 7px;
  font-weight: 820;
}

.ai-booking-details-field input {
  width: 100%;
  min-height: 31px;
  padding: 6px 8px;
  border: 1px solid rgba(203, 213, 225, 0.96);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 7px;
  font-weight: 720;
  transition: border-color 280ms ease, outline-color 280ms ease, box-shadow 280ms ease, transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-booking-details-field input.is-selected {
  border-color: #2563eb;
  transform: translateY(-1px);
}

.ai-booking-result {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 7px;
  background: #edf4f0;
  color: #27644d;
  font-size: 7px;
  font-weight: 800;
  opacity: 0.45;
  transform: translate3d(0, 4px, 0);
  transition: opacity 440ms ease, transform 440ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-booking-result i {
  width: 7px;
  height: 4px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(-45deg);
}

.ai-booking-result.is-ready {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ai-booking-pointer {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25), 0 0 0 3px rgba(255, 255, 255, 0.76);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(16px, 58px, 0);
  transition: opacity 320ms ease, transform 1050ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

.ai-booking-pointer span {
  display: block;
  width: 8px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #2563eb;
  color: transparent;
  font-size: 0;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.ai-booking-pointer::after {
  position: absolute;
  top: 13px;
  left: 12px;
  padding: 2px 4px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 4px;
  background: #fff;
  color: #334155;
  content: "AI";
  font-size: 6px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.14);
}

.ai-booking-pointer.is-visible {
  opacity: 1;
}

.ai-booking-pointer.is-pressing {
  animation: ai-booking-pointer-press 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ai-answer-demo__input {
  position: relative;
  display: grid;
  min-height: 38px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin: 0 9px 9px;
  padding: 8px 8px 8px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink-faint);
  font-size: 9px;
}

.ai-answer-demo__placeholder,
.ai-answer-demo__typed {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 180ms ease;
}

.ai-answer-demo__typed {
  color: #26302c;
  font-weight: 720;
  opacity: 0;
}

.ai-answer-demo.is-booking-open .ai-answer-demo__input,
.ai-answer-demo.is-booking-open .ai-answer-demo__topbar {
  z-index: 3;
}

.ai-answer-demo__input.is-typing .ai-answer-demo__placeholder,
.ai-answer-demo__input.is-sending .ai-answer-demo__placeholder {
  opacity: 0;
}

.ai-answer-demo__input.is-typing .ai-answer-demo__typed,
.ai-answer-demo__input.is-sending .ai-answer-demo__typed {
  opacity: 1;
}

.ai-answer-demo__input.is-typing .ai-answer-demo__typed::after {
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 2px;
  background: currentColor;
  content: "";
  vertical-align: -0.12em;
  animation: ai-typing-caret 780ms steps(1, end) infinite;
}

.ai-answer-demo__input i {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--accent);
  animation: ai-input-pulse 2.4s ease-in-out infinite;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), background-color 260ms ease;
}

.ai-answer-demo__input i::after {
  display: block;
  width: 6px;
  height: 6px;
  margin: 7px 0 0 6px;
  border-top: 1.5px solid #fff;
  border-right: 1.5px solid #fff;
  content: "";
  transform: rotate(45deg);
}

.ai-answer-demo__input i.is-pressing {
  animation: none;
  transform: scale(0.78);
}

@keyframes ai-booking-pointer-press {
  0% { scale: 1; }
  42% { scale: 0.78; }
  100% { scale: 1; }
}

@keyframes ai-input-pulse {
  0%, 100% { transform: scale(1); opacity: 0.82; }
  50% { transform: scale(0.92); opacity: 1; }
}

@keyframes ai-typing-caret {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

.ai-insight-line {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--success);
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
}

.ai-offer-price {
  color: var(--ink);
  font-size: 11px;
}

.ai-offer-button {
  width: 100%;
}

.ai-free-note {
  color: var(--ink-faint);
  font-size: 9px;
  text-align: center;
}

.export-success {
  display: grid;
  min-height: 430px;
  grid-template-columns: minmax(0, 0.92fr) minmax(250px, 1.08fr);
  align-items: center;
  gap: 26px;
  text-align: left;
}

.export-success__copy {
  display: grid;
  align-content: center;
  gap: 11px;
}

.export-success .success-mark {
  margin-bottom: 2px;
}

.export-success h3 {
  margin: 0;
}

.export-success p {
  margin: 0;
}

.export-success__pitch {
  font-size: 16px;
  line-height: 1.2;
}

.ai-compare-list {
  display: grid;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ai-compare-list > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
}

.ai-compare-list > div + div {
  border-top: 1px solid var(--line);
}

.ai-compare-list span {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 760;
}

.ai-compare-list strong {
  font-size: 10px;
}

.ai-compare-list .is-active strong {
  color: var(--success);
}

.export-success__demo {
  display: grid;
  gap: 12px;
  scroll-margin-top: 12px;
}

.ai-demo-slogan {
  display: grid;
  gap: 5px;
  padding: 2px 2px 3px 13px;
  border-left: 3px solid #2f7157;
  text-align: left;
}

html[dir="rtl"] .ai-demo-slogan {
  padding-right: 13px;
  padding-left: 2px;
  border-right: 3px solid #2f7157;
  border-left: 0;
}

.ai-demo-slogan strong {
  color: #1f2d29;
  font-size: 17px;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.export-success .ai-demo-slogan p {
  max-width: 48ch;
  color: #52615b;
  font-size: 10px;
  line-height: 1.5;
}

.export-success__demo .ai-answer-demo {
  min-height: 392px;
  border-color: rgba(93, 118, 128, 0.42);
  background: #dfe8ec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 18px 36px rgba(39, 57, 64, 0.16);
}

.export-success__demo .ai-answer-demo::before {
  background: rgba(93, 118, 128, 0.06);
}

.export-success__demo .ai-answer-demo__topbar {
  border-bottom-color: rgba(255, 255, 255, 0.14);
  background: #263a42;
  color: #f8fafc;
}

.export-success__demo .ai-answer-demo__sample {
  color: rgba(248, 250, 252, 0.68);
}

.export-success__demo .ai-answer-demo__menu {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.export-success__demo .ai-answer-demo__menu i {
  background: rgba(255, 255, 255, 0.82);
}

.export-success__demo .ai-answer-demo__input {
  border-color: rgba(93, 118, 128, 0.34);
  background: rgba(255, 255, 255, 0.94);
}

.share-dialog__lead {
  margin: 16px 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.share-mode-list {
  display: grid;
  gap: 9px;
}

.share-mode-option,
.share-image-option {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: border-color 180ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.share-mode-option {
  display: grid;
  min-height: 92px;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: 14px;
}

.share-mode-option:hover,
.share-image-option:hover {
  border-color: var(--line-strong);
  background: #fbfaf7;
}

.share-mode-option--recommended {
  border-color: rgba(47, 113, 87, 0.48);
  background: #f4f8f5;
}

.share-mode-option__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--ink);
}

.share-mode-option--recommended .share-mode-option__icon {
  background: var(--success-soft);
  color: var(--success);
}

.share-mode-option > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.share-mode-option small {
  width: fit-content;
  color: var(--success);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.share-mode-option strong,
.share-image-option strong {
  font-size: 12px;
}

.share-mode-option > span:nth-child(2) > span,
.share-image-option small {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

.share-mode-option__arrow {
  color: var(--ink-faint);
}

.share-image-option {
  display: grid;
  min-height: 66px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
}

.share-image-option > span {
  display: grid;
  gap: 2px;
}

.share-image-note {
  margin-top: 13px;
  padding: 11px 12px;
  border-left: 3px solid var(--warning);
  background: var(--warning-soft);
}

.share-image-note strong {
  font-size: 10px;
}

.share-image-note p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
}

.tool-help {
  width: min(1180px, calc(100% - 36px));
  margin: 72px auto 88px;
  color: var(--ink);
}

.tool-help__back {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--accent-dark);
  font-weight: 750;
  text-underline-offset: 3px;
}

.tool-help__intro {
  display: grid;
  max-width: 800px;
  gap: 12px;
  margin-bottom: 34px;
}

.tool-help__intro h2 {
  max-width: 760px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.03;
}

.tool-help__intro p {
  max-width: 700px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.tool-help__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 50px;
  padding: 0;
  list-style: none;
}

.tool-help__grid li {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 254, 250, 0.88);
  box-shadow: var(--shadow-tight);
}

.tool-help__grid h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.tool-help__grid p,
.tool-help__faq p {
  margin: 0;
  color: var(--ink-soft);
}

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

.tool-help__faq h2 {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  font-size: 24px;
}

.tool-help__faq details {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 254, 250, 0.88);
}

.tool-help__faq summary {
  cursor: pointer;
  font-weight: 750;
}

.tool-help__faq details p {
  padding-top: 12px;
}

@media (max-width: 1180px) {
  .floating-reallink-cta {
    right: 312px;
  }

  .studio-shell {
    grid-template-columns: 220px minmax(390px, 1fr) 292px;
  }

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

  .header-text-action span {
    display: none;
  }

  .header-text-action {
    width: 40px;
    padding: 0;
  }

  .workspace {
    padding-right: 20px;
    padding-left: 20px;
  }

  .workspace-footer {
    grid-template-columns: auto 1fr;
  }

  .document-status {
    justify-self: end;
  }

  .size-readout {
    display: none;
  }

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

@media (max-width: 900px) {
  :root {
    --header-height: 60px;
  }

  .readonly-share-bar {
    width: min(100% - 24px, 720px);
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 12px;
  }

  .readonly-contact-links,
  .readonly-share-actions {
    flex-wrap: wrap;
  }

  .readonly-share-actions .button {
    flex: 1 1 auto;
  }

  body.is-readonly-share .studio-shell {
    display: grid;
    min-height: calc(100dvh - var(--header-height) - 190px);
    padding-bottom: 0;
  }

  body.is-readonly-share .workspace {
    width: min(100% - 24px, 720px);
    padding: 12px 0 28px;
  }

  body.is-readonly-share .canvas-stage {
    min-height: clamp(330px, 57dvh, 620px);
    padding: 24px 16px;
  }

  .export-success {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 20px;
  }

  .export-success__demo .ai-answer-demo {
    min-height: 392px;
  }

  .app-header {
    min-height: var(--header-height);
    padding: 8px 12px;
  }

  .brand-lockup {
    min-width: 0;
  }

  .brand-copy strong {
    display: block;
    max-width: 108px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .language-control select {
    width: min(140px, 42vw);
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand-copy span {
    display: block;
    max-width: 180px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-actions > .icon-button,
  .header-text-action,
  .header-actions #preflightButton,
  .header-actions #downloadButton {
    display: none;
  }

  .studio-shell {
    display: flex;
    height: auto;
    min-height: 0;
    flex-direction: column;
    padding-bottom: 128px;
    overflow: visible;
  }

  .floating-reallink-cta {
    right: 14px;
    bottom: calc(116px + env(safe-area-inset-bottom));
  }

  .workspace {
    order: 1;
    grid-template-rows: auto auto auto;
    padding: 14px 14px 8px;
    overflow: visible;
  }

  .workspace-topbar {
    min-width: 0;
    flex-wrap: wrap;
  }

  .workspace-controls {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }

  .guide-button {
    min-width: 0;
    max-width: min(52%, 190px);
    line-height: 1.2;
    white-space: normal;
  }

  .template-rail {
    order: 2;
    padding: 18px 14px;
    border-top: 1px solid var(--line);
    border-right: 0;
    border-left: 0;
    overflow: visible;
  }

  html[dir="rtl"] .template-rail {
    border-left: 0;
  }

  .inspector {
    position: fixed;
    right: 0;
    bottom: calc(112px + env(safe-area-inset-bottom));
    left: 0;
    z-index: 10;
    order: 3;
    max-height: min(66dvh, 620px);
    border: 1px solid var(--line-strong);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
    background: var(--surface);
    box-shadow: 0 -18px 52px rgba(61, 55, 43, 0.2);
    border-left: 0;
    overflow: hidden;
    transform: translateY(calc(100% + 130px));
    visibility: hidden;
    transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), visibility 280ms;
  }

  .inspector.is-mobile-open {
    transform: translateY(0);
    visibility: visible;
  }

  .mobile-sheet-close {
    display: inline-flex;
  }

  .inspector-heading {
    padding: 14px 14px 10px;
  }

  .canvas-stage {
    min-height: 300px;
    padding: 24px 18px;
  }

  .canvas-surface {
    max-width: none;
  }

  .workspace-footer {
    grid-template-columns: 1fr auto;
  }

  .zoom-control input {
    width: 74px;
  }

  .template-list {
    display: flex;
    gap: 10px;
    padding-bottom: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .template-card {
    width: 156px;
    flex: 0 0 156px;
    scroll-snap-align: start;
  }

  .template-card canvas {
    aspect-ratio: 1.7;
  }

  .template-card[data-orientation="portrait"] {
    width: 108px;
    flex-basis: 108px;
  }

  .template-card[data-orientation="portrait"] canvas {
    width: 72px;
    margin-inline: auto;
    aspect-ratio: 0.57;
  }

  .inspector-heading {
    padding: 18px 14px 12px;
  }

  .inspector-tabs {
    position: sticky;
    top: var(--header-height);
    z-index: 5;
    padding: 0 8px;
    background: rgba(255, 254, 250, 0.95);
    backdrop-filter: blur(12px);
  }

  .inspector-tabs button {
    min-height: 46px;
  }

  .inspector-scroll {
    max-height: calc(min(66dvh, 620px) - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .inspector-panel {
    padding: 18px 14px 38px;
  }

  .mobile-action-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 7;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(242, 240, 234, 0.96);
    box-shadow: 0 -8px 24px rgba(61, 55, 43, 0.08);
    backdrop-filter: blur(14px);
  }

  .mobile-action-bar .button {
    min-height: 42px;
  }

  .mobile-edit-actions,
  .mobile-export-actions {
    display: grid;
    gap: 7px;
  }

  .mobile-edit-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .mobile-export-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mobile-export-actions .button {
    min-width: 0;
    gap: 5px;
    padding: 6px 5px;
    font-size: 10px;
    white-space: nowrap;
  }

  .mobile-export-actions .button svg {
    width: 15px;
    height: 15px;
  }

  .mobile-edit-actions button {
    min-height: 36px;
    padding: 5px 4px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 254, 250, 0.78);
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 720;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.78),
      0 1px 2px rgba(61, 55, 43, 0.04);
    transition:
      transform 150ms cubic-bezier(0.16, 1, 0.3, 1),
      border-color 150ms ease,
      background-color 150ms ease,
      color 150ms ease;
  }

  .mobile-edit-actions button:active {
    transform: translateY(1px) scale(0.98);
  }

  .mobile-edit-actions button.is-active {
    border-color: rgba(139, 65, 48, 0.58);
    background: var(--accent-soft);
    color: var(--accent-dark);
    box-shadow:
      inset 0 0 0 1px rgba(185, 86, 63, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.72);
  }
}

@media (max-width: 560px) {
  .readonly-share-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .readonly-contact-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .readonly-contact-links a {
    justify-content: center;
  }

  .readonly-share-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .readonly-share-actions .button:last-child {
    grid-column: 1 / -1;
  }

  body.is-readonly-share .canvas-stage {
    min-height: clamp(270px, 48dvh, 460px);
    padding: 20px 10px;
  }

  .share-mode-option {
    min-height: 84px;
    grid-template-columns: 38px minmax(0, 1fr) 14px;
    gap: 9px;
    padding: 11px;
  }

  .share-mode-option__icon {
    width: 38px;
    height: 38px;
  }

  .ai-answer-demo {
    min-height: 392px;
  }

  .export-success__demo .ai-answer-demo {
    min-height: 392px;
  }

  .brand-copy strong {
    max-width: 156px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace-topbar {
    align-items: flex-end;
  }

  .guide-button {
    width: auto;
    min-width: 108px;
    padding: 0 10px;
  }

  .guide-button svg {
    width: 16px;
    height: 16px;
  }

  .canvas-stage {
    min-height: 244px;
    padding: 28px 12px 22px;
    border-radius: 17px;
  }

  .canvas-instruction {
    display: none;
  }

  .current-template-label {
    max-width: calc(100% - 20px);
    flex-wrap: wrap;
    row-gap: 3px;
  }

  .workspace-footer {
    grid-template-columns: 1fr;
  }

  .document-status {
    display: none;
  }

  .zoom-control {
    justify-content: center;
  }

  .custom-size-grid,
  .two-column-fields {
    grid-template-columns: 1fr 1fr;
  }

  .dialog-shell {
    padding: 17px;
  }

  .dialog-header h2 {
    font-size: 19px;
  }

  .preflight-summary,
  .export-format-grid {
    grid-template-columns: 1fr;
  }

  .tool-help {
    width: min(100% - 24px, 720px);
    margin: 54px auto 72px;
  }

  .tool-help__grid,
  .tool-help__faq {
    grid-template-columns: 1fr;
  }

  .tool-help__grid li {
    min-height: 0;
  }

  .format-option {
    min-height: 84px;
    grid-template-columns: 54px 1fr;
    align-items: center;
  }

  .dialog-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .dialog-footer .button {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .brand-copy span {
    display: none;
  }

  .brand-copy strong {
    max-width: 132px;
    font-size: 12px;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .workspace {
    padding-right: 10px;
    padding-left: 10px;
  }

  .workspace-controls {
    gap: 5px;
  }

  .segmented-control button {
    min-height: 32px;
    padding: 5px 9px;
  }

  .template-rail,
  .inspector-panel {
    padding-right: 10px;
    padding-left: 10px;
  }

  .inspector-tabs button {
    font-size: 10px;
  }

  .mobile-edit-actions button {
    font-size: 10px;
  }
}

@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;
  }

  .ai-answer-demo__bubble {
    opacity: 1 !important;
    transform: none !important;
  }

  .ai-booking-pointer {
    display: none !important;
  }
}
