/* BlueCairo ARt Viewer. Brand colours and type come from thebluecairo.com. */

:root {
  --nile: #243351;
  --nile-deep: #1a263e;
  --papyrus: #f6eddd;
  --sand: #e9dabf;
  --stone: #635d4e;
  --white: #ffffff;

  --bg: var(--white);
  --surface: var(--papyrus);
  --text: var(--nile);
  --text-muted: #4d5874;
  --border: #d9cdb6;
  --accent: var(--nile);
  --accent-hover: var(--nile-deep);

  --panel-bg: var(--nile);
  --panel-text: var(--papyrus);
  --panel-muted: rgb(246 237 221 / 0.74);
  --panel-line: rgb(246 237 221 / 0.18);
  --panel-selected: rgb(233 218 191 / 0.14);

  --stage-bg: #ddd6ca;
  --stage-text: #24231f;
  --focus: #f2b84b;

  --font: "Instrument Sans", system-ui, sans-serif;
  --step--1: 0.8rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 1.953rem;

  --radius-s: 4px;
  --radius-m: 8px;
  --shadow-sheet: 0 24px 64px rgb(20 26 40 / 0.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121a2b;
    --surface: #1a263e;
    --text: var(--papyrus);
    --text-muted: rgb(246 237 221 / 0.72);
    --border: rgb(246 237 221 / 0.18);
    --accent: var(--sand);
    --accent-hover: var(--papyrus);
    --panel-bg: var(--nile-deep);
    --stage-bg: #d9d2c6;
    --stage-text: #24231f;
  }
}
:root[data-theme="dark"] {
  --bg: #121a2b;
  --surface: #1a263e;
  --text: var(--papyrus);
  --text-muted: rgb(246 237 221 / 0.72);
  --border: rgb(246 237 221 / 0.18);
  --accent: var(--sand);
  --accent-hover: var(--papyrus);
  --panel-bg: var(--nile-deep);
  --stage-bg: #d9d2c6;
  --stage-text: #24231f;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.5;
}

button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Layout: the wall is the page; the panel is a narrow column beside it. */

.viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  min-height: 100dvh;
}

.stage {
  position: relative;
  background: var(--stage-bg);
  min-height: 100dvh;
  overflow: hidden;
}

.stage__status {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 16px;
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--stage-text);
  font-size: var(--step-1);
}
.stage__status[hidden] { display: none; }
/* Over a room photo the message needs its own background. */
.stage[data-mode="room"] .stage__status {
  inset: auto 16px 50% 16px;
  justify-self: center;
  width: fit-content;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: var(--radius-m);
  background: rgb(26 38 62 / 0.88);
  color: var(--papyrus);
  font-size: var(--step-0);
}
.stage__status .button { justify-self: center; }


/* Your room */
.room { position: absolute; inset: 0; display: none; }
.stage[data-mode="room"] .room { display: block; }

.room__start {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 32px;
}
.room__start[hidden] { display: none; }
/* The photo step: one large target to tap, or to drop a photo on. */
.room__drop {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(520px, 100%);
  padding: 48px 32px;
  border: 2px dashed rgb(36 51 81 / 0.45);
  border-radius: var(--radius-m);
  background: rgb(255 255 255 / 0.35);
  color: var(--nile);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: background 150ms var(--ease-out), border-color 150ms var(--ease-out);
}
.room__drop:hover, .room__drop.is-over { background: rgb(255 255 255 / 0.6); border-color: var(--nile); }
.room__drop svg { width: 48px; height: 48px; }
.room__drop-title { font-size: var(--step-1); font-weight: 600; }
.room__drop-text { max-width: 40ch; color: var(--stage-text); font-size: var(--step--1); line-height: 1.5; }
.room__start h2 {
  margin: 0;
  font-size: var(--step-3);
  font-weight: 600;
  font-stretch: 82%;
  line-height: 1.1;
  color: var(--nile);
}
.room__start p { margin: 0; max-width: 52ch; }
.room__small { font-size: var(--step--1); }
.room__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.room__error { color: #8a2a1c; font-weight: 600; min-height: 1.5em; }

.button.button--ink { background: var(--nile); color: var(--papyrus); }
.button.button--ink:hover { background: var(--nile-deep); }
.button.button--ink-quiet { border-color: var(--nile); color: var(--nile); background: none; }
.button.button--ink-quiet:hover { background: rgb(36 51 81 / 0.08); }


.room__compose { position: absolute; inset: 0; background: #2a2723; }
.room__compose canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: move; }
.room__scale-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.room__scale-svg line { stroke: var(--focus); stroke-width: 2; stroke-dasharray: 6 4; }
.room__scale-svg circle { fill: rgb(242 184 75 / 0.25); stroke: var(--focus); stroke-width: 2; pointer-events: all; cursor: grab; touch-action: none; }
.room__scale-svg circle.dot { fill: var(--focus); stroke: none; pointer-events: none; }

.room__bar,
.room__scale-form {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 12px 16px;
  border-radius: var(--radius-m);
  background: rgb(26 38 62 / 0.92);
  color: var(--papyrus);
  font-size: var(--step--1);
}
.room__photos { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; overflow-x: auto; max-width: 100%; }
.room__photos button { display: block; padding: 0; border: 2px solid transparent; border-radius: var(--radius-s); background: none; cursor: pointer; }
.room__photos button[aria-pressed="true"] { border-color: var(--sand); }
.room__photos img { display: block; width: 56px; height: 42px; object-fit: cover; border-radius: 2px; }
.room__scale-note { margin: 0; flex: 1 1 180px; }
.room__tools { display: flex; flex-wrap: wrap; gap: 8px; }
.button.button--chip { min-height: 36px; padding: 4px 12px; border-color: rgb(246 237 221 / 0.45); color: var(--papyrus); background: none; font-size: var(--step--1); }
.button.button--chip:hover { background: rgb(246 237 221 / 0.1); }

.room__scale-form p { margin: 0; flex: 1 1 100%; }
.room__scale-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.room__scale-fields select,
.room__scale-fields input {
  min-height: 40px;
  padding: 4px 8px;
  border: 1px solid rgb(246 237 221 / 0.45);
  border-radius: var(--radius-s);
  background: var(--nile-deep);
  color: var(--papyrus);
}
.room__scale-fields input { width: 88px; }
.room__scale-form .link-button { color: var(--papyrus); }


/* Picked for your room */
.picks { display: grid; gap: 12px; }
.picks__title { margin: 0; font-size: var(--step-1); font-weight: 600; font-stretch: 82%; }
.picks__swatches { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0; padding: 0; list-style: none; font-size: var(--step--1); color: var(--panel-muted); }
.picks__swatches li { display: inline-flex; align-items: center; gap: 6px; }
.picks__swatches i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(246 237 221 / 0.35); }
.picks__status { margin: 0; font-size: var(--step--1); color: var(--panel-muted); }
.picks__status:empty { display: none; }
.picks__why { margin: 0; line-height: 1.55; }
.picks__why:empty, .picks__note:empty { display: none; }
.picks__ask { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius-m); background: var(--panel-selected); }
.picks__ask p { margin: 0; }
.picks__ask-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.picks__ask-buttons .button { flex: 1 1 120px; min-height: 44px; padding: 8px 16px; }
.picks__note { margin: 0; font-size: var(--step--1); color: var(--panel-muted); }
.picks .link-button { justify-self: start; }

/* Every piece in the collection that suits the room, best first. */
.suits { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--panel-line); }
.suits__title { margin: 0; font-size: var(--step-0); font-weight: 600; }
.suits__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; margin: 0; padding: 0; list-style: none; }
.suit {
  display: grid; gap: 4px; width: 100%; padding: 0; border: 0; background: none;
  color: var(--panel-text); font: inherit; text-align: left; cursor: pointer;
}
.suit img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-s);
  background: var(--panel-selected); outline: 2px solid transparent; outline-offset: 2px;
  transition: outline-color 150ms var(--ease-out);
}
.suit span { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.suit:hover span { text-decoration: underline; }
.suit[aria-pressed="true"] img { outline-color: var(--sand); }
@media (prefers-reduced-motion: reduce) { .suit img { transition: none; } }

/* Panel */

.panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 32px 0;
  background: var(--panel-bg);
  color: var(--panel-text);
  max-height: 100dvh;
  overflow-y: auto;
  position: sticky;
  top: 0;
}

.panel__brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--panel-line);
}

.wordmark {
  margin: 0;
  font-weight: 700;
  font-stretch: 100%;
  letter-spacing: 0.01em;
}
.wordmark span { font-weight: 400; color: var(--panel-muted); }

.panel .link-button { color: var(--panel-text); }

.art-title {
  margin: 0;
  font-size: var(--step-2);
  font-weight: 600;
  font-stretch: 82%;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--step--1);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.link-button:hover { text-decoration-thickness: 2px; }
.link-button:disabled { opacity: 0.5; cursor: default; }

/* The pieces on the wall: tap one to edit it, x to remove it, + to add any artwork from the shop. */
.tray { display: grid; gap: 8px; }
.tray__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tray__title { margin: 0; font-size: var(--step-0); font-weight: 600; }
.tray__list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 8px 0 0; list-style: none; }
.tray__item { position: relative; }
.tray__piece, .tray__add, .tray__yours {
  display: grid; place-items: center; width: 52px; height: 70px; padding: 0;
  border: 2px solid transparent; border-radius: var(--radius-s); background: var(--panel-line); overflow: hidden;
  cursor: pointer;
}
.tray__piece img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tray__piece[aria-pressed="true"] { border-color: var(--sand); }
.tray__yours { border: 1px dashed rgb(246 237 221 / 0.6); background: none; cursor: default; font-size: 11px; line-height: 1.2; color: var(--panel-muted); text-align: center; }
.tray__add { border: 1px dashed rgb(246 237 221 / 0.6); background: none; color: var(--panel-text); font-size: 11px; line-height: 1.2; align-content: center; gap: 2px; }
.tray__add svg { width: 18px; height: 18px; }
.tray__add:hover, .tray__remove:hover { background: rgb(246 237 221 / 0.1); }
.tray__remove {
  position: absolute; top: -8px; right: -8px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  border: 1px solid rgb(246 237 221 / 0.5); border-radius: 50%; background: var(--panel-bg); color: var(--panel-text); cursor: pointer;
}
.tray__remove svg { width: 10px; height: 10px; }
.tray__note { margin: 0; font-size: var(--step--1); color: var(--panel-muted); }
.tray__note:empty { display: none; }

/* The selected piece: its name, then one line of finishes and one line of sizes. */
.selected { display: grid; gap: 12px; }
.selected__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.chips { margin: 0; padding: 0; border: 0; min-width: 0; }
.chips legend { padding: 0; margin-bottom: 6px; font-size: var(--step--1); color: var(--panel-muted); }
.chips__row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px;
  border: 1px solid rgb(246 237 221 / 0.35); border-radius: var(--radius-s);
  font-size: var(--step--1); font-weight: 600; cursor: pointer; transition: background-color 150ms var(--ease-out);
}
.chip:hover span { background: rgb(246 237 221 / 0.08); }
.chip input:checked + span { background: var(--papyrus); border-color: var(--papyrus); color: var(--nile); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip input:disabled + span { cursor: not-allowed; opacity: 0.4; text-decoration: line-through; }
.chips__note { margin: -6px 0 0; font-size: var(--step--1); color: var(--panel-muted); }

.panel__footprint {
  margin: -8px 0 0;
  font-size: var(--step--1);
  color: var(--panel-muted);
  min-height: 1.5em;
}

.panel__credits { margin: -8px 0 0; font-size: var(--step--1); }
.panel__credits a { color: var(--panel-muted); text-underline-offset: 3px; }
.panel__credits a:hover { color: var(--panel-text); }

.panel__actions {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 12px;
  margin: auto -32px 0;
  padding: 16px 32px 24px;
  background: var(--panel-bg);
  border-top: 1px solid var(--panel-line);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.button:disabled { cursor: progress; opacity: 0.6; }

.button--primary { background: var(--papyrus); color: var(--nile); }
.button--primary:hover:not(:disabled) { background: var(--white); }

.button--quiet { border-color: rgb(246 237 221 / 0.5); color: var(--papyrus); background: none; }
.button--quiet:hover { background: rgb(246 237 221 / 0.08); }

.stage__status .button--primary { background: var(--nile); color: var(--papyrus); }

.panel__note {
  margin: 0;
  font-size: var(--step--1);
  color: var(--panel-muted);
  min-height: 1.5em;
}

/* Dialogs */

.sheet {
  width: min(880px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 24px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-sheet);
}
.sheet::backdrop { background: rgb(26 38 62 / 0.55); }
.sheet[open] { display: flex; flex-direction: column; gap: 16px; }
.sheet--small { width: min(400px, calc(100vw - 32px)); }

.sheet__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.sheet__head h2 { margin: 0; font-size: var(--step-2); font-weight: 600; font-stretch: 82%; }
.sheet .link-button { color: var(--text); }
.sheet p { margin: 0; color: var(--text-muted); max-width: 52ch; }

.search input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
}

.picker-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 24px 16px;
}

.picker-item {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.picker-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--surface);
  border-radius: var(--radius-s);
}
.picker-item span { font-size: var(--step--1); line-height: 1.3; }
.picker-item:hover span { text-decoration: underline; }
.picker-item[aria-current="true"] img { outline: 3px solid var(--accent); outline-offset: 2px; }

.qr-code { display: grid; place-items: center; padding: 16px; background: var(--white); border-radius: var(--radius-s); }
.qr-code svg { width: 100%; max-width: 240px; height: auto; }

/* Phones: the wall on top, choices below, the AR button always in reach. */

@media (max-width: 860px) {
  .viewer { grid-template-columns: 1fr; }
  .stage { min-height: 0; height: 58dvh; }
  .room__start { padding: 16px; }
  .room__drop { padding: 40px 24px; }
  .room__start h2 { font-size: var(--step-2); }
  /* On phones the room tools sit under the photo instead of covering it. */
  .stage[data-mode="room"] { height: 76dvh; }
  .room__compose { display: flex; flex-direction: column; }
  .room__compose canvas { flex: 1; min-height: 0; height: auto; }
  .room__bar, .room__scale-form { position: static; border-radius: 0; padding: 8px 16px 12px; gap: 8px 12px; background: var(--nile-deep); }
  .room__scale-note { flex-basis: 100%; order: 2; }
  .room__tools { order: 3; }
  .panel { position: static; max-height: none; overflow: visible; padding: 16px 16px 0; gap: 20px; }
  .panel__brand { order: -1; }
  .panel__actions {
    grid-template-columns: 3fr 2fr;
    gap: 8px;
    margin: 0 -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--panel-bg);
    border-top: 1px solid var(--panel-line);
  }
  .panel__actions .button { padding: 12px 16px; }
  .panel__note:empty { display: none; }
  .panel__note { grid-column: 1 / -1; }
  .art-title { font-size: var(--step-2); }
  .sheet { padding: 16px; }
  .picker-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; }
}

/* Your room, composed: the photo, then one row of layout tiles, then the tools. */
.room__compose { display: flex; flex-direction: column; }
.room__compose canvas { flex: 1; min-height: 0; height: auto; }
.room__bar, .room__scale-form { position: static; border-radius: 0; background: var(--nile-deep); }

.options {
  display: flex; gap: 10px; margin: 0; padding: 12px 16px 10px; list-style: none; overflow-x: auto;
  background: var(--nile-deep); border-bottom: 1px solid var(--panel-line);
}
.options:empty { display: none; }
.option {
  position: relative; display: grid; gap: 4px; justify-items: center; min-width: 92px; padding: 6px 8px;
  border: 1px solid rgb(246 237 221 / 0.25); border-radius: var(--radius-s); background: none;
  color: var(--papyrus); font-size: 12px; cursor: pointer;
}
.option:hover { background: rgb(246 237 221 / 0.06); }
.option[aria-pressed="true"] { border-color: var(--sand); background: rgb(233 218 191 / 0.14); }
.option svg { display: block; width: 76px; height: 46px; }
.option__best {
  position: absolute; top: -8px; right: -6px; padding: 1px 6px; border-radius: 3px;
  background: var(--sand); color: var(--nile); font-size: 10px; font-weight: 700;
}

/* AR overlay. Chrome's wall-tracking AR shows it over the camera (see-through but for the controls); the camera
   view for other browsers (.xr--camera) puts the live video and the drawn print underneath it. */
.xr-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.xr-open, .xr-open body { overflow: hidden; }
.xr { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: space-between; background: transparent; color: var(--papyrus); font-family: var(--font); pointer-events: none; }
.xr[hidden] { display: none; }
.xr [hidden] { display: none; }
.xr--camera { background: #000; pointer-events: auto; touch-action: manipulation; }
.xr__video, .xr__layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.xr__video { object-fit: cover; }
.xr__layer { pointer-events: none; }
.xr__top, .xr__sheet { position: relative; pointer-events: auto; }
.xr__top { display: flex; gap: 8px; align-items: flex-start; padding: calc(16px + env(safe-area-inset-top)) 16px 0; }
.xr__hint { flex: 1; margin: 0; padding: 12px 16px; border-radius: var(--radius-m); background: rgb(26 38 62 / 0.86); line-height: 1.45; font-size: var(--step--1); }
.xr__hint:empty { visibility: hidden; }
.xr__close, .xr__round {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; padding: 12px;
  border: 0; border-radius: 50%; background: rgb(26 38 62 / 0.86); color: var(--papyrus); cursor: pointer;
}
.xr__sheet {
  display: grid; padding: 0 16px calc(8px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0; background: rgb(26 38 62 / 0.92);
}
.xr__handle {
  display: flex; align-items: center; gap: 12px; position: relative; width: 100%; min-height: 56px; padding: 16px 0 8px;
  border: 0; background: none; color: var(--papyrus); font: inherit; font-weight: 600; text-align: left; cursor: grab; touch-action: none;
}
.xr__grip { position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgb(246 237 221 / 0.45); }
.xr__handle-text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.xr__chevron { flex: none; width: 24px; height: 24px; transition: transform 250ms var(--ease-out); }
.xr__sheet[data-open="true"] .xr__chevron { transform: rotate(180deg); }
.xr__sheet-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 300ms var(--ease-out); }
.xr__sheet[data-open="true"] .xr__sheet-body { grid-template-rows: 1fr; }
.xr__sheet-inner { display: grid; gap: 12px; min-height: 0; overflow: hidden; }
.xr__sheet[data-open="true"] .xr__sheet-inner { padding: 4px 0 8px; }
.xr__sheet[data-open="false"] .xr__sheet-inner { visibility: hidden; }
.xr__measure { justify-self: start; }
.xr__hint { transition: opacity 400ms ease-in; }
.xr__hint.is-faded { opacity: 0; pointer-events: none; }
.xr__aim {
  position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; pointer-events: none;
  background: linear-gradient(var(--papyrus), var(--papyrus)) center / 2px 100% no-repeat,
              linear-gradient(var(--papyrus), var(--papyrus)) center / 100% 2px no-repeat;
  filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.9));
}
@media (prefers-reduced-motion: reduce) { .xr__sheet-body, .xr__chevron, .xr__hint { transition: none; } }
.xr__row { display: flex; align-items: center; gap: 12px; }
.xr__title { flex: 1; margin: 0; font-weight: 600; line-height: 1.3; }
.xr__zoom { display: flex; gap: 8px; }
.xr__round { background: rgb(246 237 221 / 0.14); }
.xr__sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.xr__size {
  min-width: 52px; min-height: 40px; padding: 4px 12px; border: 1px solid rgb(246 237 221 / 0.45); border-radius: var(--radius-s);
  background: none; color: var(--papyrus); font: inherit; font-weight: 600; cursor: pointer;
}
.xr__size[aria-pressed="true"] { border-color: var(--papyrus); background: var(--papyrus); color: var(--nile); }
.xr__arts-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.xr__arts-label { margin: 0; font-size: var(--step-0); font-weight: 600; }
.xr__more {
  min-height: 40px; padding: 8px 0; border: 0; background: none; color: var(--sand); font: inherit; font-size: var(--step--1);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.xr__arts-note { margin: -8px 0 0; font-size: var(--step--1); color: var(--panel-muted); }
.xr__arts-note:empty { display: none; }
.xr__arts { display: flex; gap: 8px; margin: -4px -16px 0; padding: 0 16px 4px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; }
.xr__art { display: block; flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: var(--radius-s); background: rgb(246 237 221 / 0.1); cursor: pointer; scroll-snap-align: center; }
.xr__art img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.xr__art[aria-pressed="true"] { border-color: var(--papyrus); }
.xr button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .xr__arts { scroll-behavior: smooth; } }

/* Camera button: a round shutter that rides just above the sheet, so it moves up when the sheet opens. */
.xr__shutter {
  position: absolute; left: 50%; top: -88px; display: grid; place-items: center; width: 64px; height: 64px; margin-left: -32px; padding: 16px;
  border: 3px solid var(--papyrus); border-radius: 50%; background: rgb(26 38 62 / 0.72); color: var(--papyrus); cursor: pointer;
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.35); transition: transform 150ms var(--ease-out);
}
.xr__shutter:active { transform: scale(0.92); }
.xr__shutter[aria-busy="true"] { opacity: 0.6; }
.xr__flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.xr__flash.is-on { animation: xr-flash 300ms ease-out; }
@keyframes xr-flash { from { opacity: 0.8; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .xr__shutter { transition: none; } .xr__flash.is-on { animation: none; } }

/* "See it on your wall" from the panel: the same two choices as the landing. */
.choice { display: grid; gap: 4px; }
.choice .button { width: 100%; }
.choice__note { margin: 0 0 16px; color: var(--text-muted, #5b6472); font-size: var(--step--1); text-align: center; }
.choice__note:last-child { margin-bottom: 0; }
