/* The watch photograph and its projected display share a single coordinate system. */
#watchfaces {
  --studio-ink: #222824;
  --studio-paper: #f1eee5;
  --studio-rule: #505751;
  --studio-muted: #bac2b8;
  --studio-accent: #ffae77;
  --studio-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  padding-block: clamp(2rem, 4vw, 3.8rem);
}
#watchfaces .studio-heading {
  align-items: center;
  margin-bottom: clamp(1.3rem, 2.4vw, 2rem);
}
#watchfaces-heading { font-size: clamp(2.3rem, 4.1vw, 3.75rem); }
#watchfaces .studio-heading p { max-width: 34ch; font-size: .94rem; }
#watchfaces .studio-model-field {
  min-width: 0;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}
#watchfaces .studio-model-field legend {
  padding: 0;
  margin-bottom: .55rem;
  color: #f7f5ed;
  font-size: .86rem;
  font-weight: 600;
}
#watchfaces .studio-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .375rem; }
#watchfaces .studio-model {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  min-height: 46px;
  padding: .3rem .45rem;
  border: 1px solid #59625a;
  border-radius: 4px;
  background: #303732;
  color: #f4f3ec;
  cursor: pointer;
  font-size: .77rem;
  font-weight: 500;
  line-height: 1.28;
}
#watchfaces .studio-model input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
#watchfaces .studio-model img {
  flex: none;
  width: 33px;
  height: 33px;
  object-fit: contain;
  padding: 1px;
  border-radius: 3px;
  background-color: #fff;
}
#watchfaces .studio-model:hover { border-color: #a1afa0; background: #39413a; }
#watchfaces .studio-model:has(input:checked) { border-color: var(--studio-accent); background: #edddc9; color: #282d26; }
#watchfaces .studio-model:has(input:checked) img { mix-blend-mode: multiply; }
#watchfaces .studio-model:has(input:focus-visible) { outline: 2px solid #ffd6aa; outline-offset: 2px; }
@container (max-width: 350px) {
  #watchfaces .studio-models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
#watchfaces .watchface-studio {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  border: 0;
  background: var(--studio-ink);
}
#watchfaces .watch-preview-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-content: stretch;
  padding: clamp(1.4rem, 2.6vw, 2.5rem);
  color: var(--studio-ink);
  background: radial-gradient(ellipse at 48% 45%, #fbf9f2 15%, var(--stage-mid, #ebe9df) 67%, var(--stage-edge, #dddcd0) 100%);
}
#watchfaces:is([data-selected-face="studio-meridian"], [data-selected-face="motion-60084"]) { --stage-mid: #e7e9df; --stage-edge: #d9ddd0; }
#watchfaces:is([data-selected-face="studio-signal"], [data-selected-face="motion-60058"]) { --stage-mid: #eee5d8; --stage-edge: #dfd3c3; }
#watchfaces .watch-preview-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 53%,
    transparent calc(27% - 1px), #777a6542 27%, transparent calc(27% + 1px),
    transparent calc(42% - 1px), #777a6522 42%, transparent calc(42% + 1px));
}
#watchfaces #watchface-preview-caption {
  grid-row: 1;
  align-self: start;
  min-width: 0;
  text-align: left;
}
#watchfaces #watchface-preview-caption strong {
  display: flex;
  align-items: center;
  gap: .6rem;
  font: 600 .78rem/1.35 var(--studio-mono);
  text-transform: uppercase;
  letter-spacing: .13em;
}
#watchfaces #watchface-preview-caption strong::before {
  content: "";
  width: 1.65rem;
  height: 3px;
  flex: 0 0 auto;
  background: #ae4a25;
}
#watchfaces #watchface-preview-caption small {
  margin-top: .33rem;
  font: italic normal clamp(1.95rem, 3.5vw, 3.15rem)/1.08 Georgia, "Times New Roman", serif;
  letter-spacing: -.047em;
  color: #31392f;
  text-wrap: balance;
}
#watchfaces .watch-preview-figure {
  grid-row: 2;
  align-self: center;
  justify-self: center;
  width: min(100%, clamp(270px, 31vw, 455px));
  margin: .4rem auto;
}
#watchfaces .watch-preview-actions {
  grid-row: 3;
  justify-content: space-between;
  gap: .4rem 1rem;
  width: 100%;
  margin: 0;
  padding-top: .35rem;
  border-top: 1px solid #a4a79b;
}
#watchfaces .watch-preview-actions button {
  min-height: 40px;
  padding: .4rem 0;
  border: 0;
  background: transparent;
  color: #333b32;
  font-size: .78rem;
  text-decoration: none;
}
#watchfaces .watch-preview-actions button:hover { text-decoration: underline; text-underline-offset: .22em; }
#watchfaces .watch-preview-actions #watchface-expand::before,
#watchfaces .watch-preview-actions [data-face-choice="original"]::before {
  content: "";
  width: .9rem;
  height: .9rem;
  flex: 0 0 auto;
  background-color: currentColor;
  mask: var(--studio-icon) center / contain no-repeat;
}
#watchface-expand {
  --studio-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M11 3h6v6M17 3l-6 6M9 17H3v-6m0 6 6-6'/%3E%3C/svg%3E");
}
#watchfaces .watch-preview-actions [data-face-choice="original"] {
  --studio-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M4 8a6.5 6.5 0 1 1-.3 4M4 3v5h5'/%3E%3C/svg%3E");
}
#watchfaces .watch-preview-actions [aria-pressed="true"] { color: #934223; }

#watchfaces .watch-studio-panel {
  container-type: inline-size;
  min-width: 0;
  padding: clamp(1.35rem, 2.8vw, 2.6rem);
  background: var(--studio-ink);
  color: #f9f7ef;
}
#watchfaces .dial-collection {
  width: 100%;
  gap: 1.45rem;
  padding: 0;
  margin-bottom: 1.15rem;
  border: 0;
  border-bottom: 1px solid var(--studio-rule);
  border-radius: 0;
  background: transparent;
}
#watchfaces .dial-collection button {
  position: relative;
  margin-bottom: -1px;
  padding: .28rem .05rem .7rem;
  min-height: 42px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--studio-muted);
}
#watchfaces .dial-collection button[aria-pressed="true"] { border-color: var(--studio-accent); color: #fff; }
#watchfaces .watch-studio-label,
#watchfaces .watch-studio-step > label {
  margin-bottom: .4rem;
  color: #f6f5ed;
  font-size: .82rem;
  font-weight: 500;
}
#watchfaces .watch-studio-model-card { margin: -.4rem 0 1.2rem; }
#watchfaces .watch-studio-model-card > span > span { color: var(--studio-muted); font-size: .74rem; }
#watchfaces .face-choice-heading { margin: 0 0 .55rem; }
#watchfaces .face-choice-heading .watch-studio-label { margin: 0; }
#watchfaces .face-choice-heading .selected-face-name {
  color: var(--studio-muted);
  font: normal .73rem/1.5 var(--studio-mono);
  font-variant-numeric: tabular-nums;
}
#watchfaces .watchface-picker,
#watchfaces .watchface-picker:has(.live-dial) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
}
#watchfaces .face-swatch {
  min-width: 0;
  min-height: 0;
  padding: .52rem .3rem .55rem;
  gap: .45rem;
  justify-content: flex-start;
  border: 1px solid #4a524b;
  border-radius: 4px;
  background: #303732;
  color: #f0f0e8;
  transition: background .16s, border-color .16s;
}
#watchfaces .face-swatch:hover { background: #3b433c; border-color: #9da899; }
#watchfaces .face-swatch[aria-pressed="true"] {
  border-color: #ffb380;
  background: #edddc9;
  color: #232921;
  box-shadow: inset 0 -3px #b65830;
}
#watchfaces .face-swatch > span:last-child {
  font-size: clamp(.69rem, 2.3cqw, .79rem);
  font-weight: 500;
  letter-spacing: -.02em;
}
#watchfaces .face-swatch-image,
#watchfaces .face-swatch-image:has(.live-dial) {
  width: min(100%, 98px);
  height: auto;
  aspect-ratio: 1;
}
#watchfaces .face-swatch-image > img { width: auto; height: 100%; max-width: 100%; object-fit: contain; }
#watchfaces .face-swatch[data-face-shape="round"] .face-swatch-image > img { width: 100%; height: 100%; }
.designer-dial { display: block; position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 50%; line-height: 0; }
.designer-dial[data-designer-dial="meridian"]:not([data-rendered]) { background: url("media/dials/meridian/poster.webp") center / contain no-repeat; }
.designer-dial[data-designer-dial="signal"]:not([data-rendered]) { background: url("media/dials/signal/poster.webp") center / contain no-repeat; }
.designer-dial[data-designer-dial="relay"] { border-radius: 21% / 17.25%; }
.designer-dial[data-designer-dial="relay"]:not([data-rendered]) { background: #231a29 url("media/dials/relay/poster.webp") center / cover no-repeat; }
.watch-display .designer-dial[data-designer-dial="relay"] { border-radius: 0; }
.face-swatch-image > .designer-dial[data-designer-dial="relay"] { width: 82.14%; }
.dial-closeup-art[data-dial-shape="square"] { width: min(95%, 368px, 44dvh); aspect-ratio: 368 / 448; border-radius: 21% / 17.25%; }
.dial-closeup-art > img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.designer-dial > canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
#watchfaces .face-gallery-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem .8rem;
  margin: .32rem 0 0;
}
#watchfaces .face-gallery-tools:not(:has(> :not([hidden]))) { display: none; }
#watchfaces .face-gallery-tools .text-link {
  margin: 0;
  padding: .2rem 0;
  min-height: 40px;
  color: #f2d4bb;
  font-size: .78rem;
  text-underline-offset: .22em;
}
#watchfaces .watchface-compatibility,
#watchfaces .watchface-preview-note {
  margin: .35rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c5cec2;
  font-size: .73rem;
  line-height: 1.5;
}
#watchfaces .watchface-preview-note { margin-top: .15rem; }
#watchfaces .watchface-product-cta { margin-top: .85rem; padding-top: .85rem; border-color: var(--studio-rule); }
#watchfaces .watchface-product-cta .button {
  min-height: 40px;
  padding: .55rem 1.05rem;
  border: 1px solid var(--studio-paper);
  border-radius: 3px;
  background: var(--studio-paper);
  color: var(--studio-ink);
}
#watchfaces .watchface-product-cta .button:hover { background: #fff; }
#watchfaces .watchface-product-cta .text-link { color: var(--studio-paper); }
#watchfaces :is(button, select, a):focus-visible { outline: 2px solid #d57c46; outline-offset: 3px; }

.dialog:has(.dial-closeup) {
  border: 1px solid #60685e;
  border-radius: 8px;
  background: #232a25;
  color: #f5f3e9;
}
.dialog:has(.dial-closeup) .dialog-header { margin-bottom: .85rem; }
.dialog:has(.dial-closeup) .dialog-header > .eyebrow { color: #c3cabd; }
.dialog:has(.dial-closeup) .close-button { color: #f5f3e9; border-color: #697164; background: #323a32; }
.dial-closeup h2 {
  margin: 0 0 1.25rem;
  color: #fff5e3;
  font: italic normal clamp(1.95rem, 4.1vw, 3.1rem)/1.1 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
}
.dial-closeup-art {
  isolation: isolate;
  width: min(97%, 466px, 53dvh);
  border-radius: 50%;
  outline: 1px solid #677060;
  outline-offset: 4px;
}
.dial-closeup-footer { padding-top: .45rem; border-top: 1px solid #515b4e; }
.dial-closeup-footer span { color: #c7cdbf; font: .78rem/1.4 ui-monospace, Consolas, monospace; }
.dial-closeup-footer button { color: #ffd0a3; font-size: .85rem; }
.watch-studio-detail .watch-preview-stage { border-radius: 4px; border: 0; background: #eeeae1; }
.watch-studio-detail .watch-preview-figure { mix-blend-mode: multiply; }

@container (max-width: 365px) {
  #watchfaces .watchface-picker,
  #watchfaces .watchface-picker:has(.live-dial) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 790px) {
  #watchfaces .studio-heading { align-items: flex-start; }
  #watchfaces .watchface-studio { grid-template-columns: minmax(0, 1fr); }
  #watchfaces .watch-preview-stage {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    grid-template-rows: auto auto;
    align-items: center;
    padding: 1.1rem 1.25rem .3rem;
  }
  #watchfaces .watch-preview-stage::before { background-position: right center; background-size: 70% 150%; background-repeat: no-repeat; }
  #watchfaces #watchface-preview-caption { grid-area: 1 / 1; align-self: center; }
  #watchfaces #watchface-preview-caption strong { font-size: .7rem; gap: .4rem; }
  #watchfaces #watchface-preview-caption strong::before { width: .9rem; height: 2px; }
  #watchfaces #watchface-preview-caption small { font-size: clamp(1.55rem, 5.8vw, 2.7rem); }
  #watchfaces .watch-preview-figure { grid-area: 1 / 2; width: min(100%, 245px); margin: 0 auto .5rem; }
  #watchfaces .watch-preview-actions { grid-area: 2 / 1 / 3 / -1; }
  #watchfaces .watch-studio-panel { padding: 1rem 1.25rem 1.2rem; }
}
@media (max-width: 530px) {
  #watchfaces .studio-heading { gap: .6rem; }
  #watchfaces .studio-heading p { max-width: 40ch; font-size: .85rem; }
  #watchfaces .dial-collection { margin-bottom: .85rem; }
  #watchfaces .watch-studio-model-card { margin-bottom: .85rem; }
  #watchfaces .watchface-picker,
  #watchfaces .watchface-picker:has(.live-dial) {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: clamp(82px, 23vw, 110px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-color: #87937e #343d34;
    scrollbar-width: thin;
    padding: 3px 3px 7px;
  }
  #watchfaces .face-swatch { scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  #watchfaces .face-swatch { transition: none; }
}
#watchfaces #watchface-picker[data-paged="true"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  overflow: visible;
  padding: 0;
}
.native-dial-number { display: block; margin-top: .14rem; font: .68rem/1.3 var(--studio-mono); opacity: .8; }
.face-pager { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .45rem 0 .1rem; border-bottom: 1px solid var(--studio-rule); }
.face-pager button { min-height: 42px; padding: 0 .25rem; background: transparent; border: 0; color: #f5e1cf; font: inherit; font-size: .8rem; }
.face-pager button:disabled { color: #a0a99f; cursor: default; }
#watchface-page-status { font: .75rem/1.4 var(--studio-mono); color: #d4d9d1; }
