/* Garment photographs, paper and type are shared with the shop window. */
/* The two tailoring entries on the home page are siblings: same size and alignment. */
#made-for .note-copy > .button { align-self: start; margin-top: 18px; }
#made-for .note-copy > .button { width: fit-content; min-width: 13em; }
@media (max-width: 760px) { #made-for .note-copy > .button { width: 100%; } }
#design-sheet .gallery-toolbar { justify-content: flex-end; }
#design-sheet .collection-grid:has(> :only-child) { grid-template-columns: 1fr; }
#design-sheet .collection-grid:has(> :only-child) .look-card { max-width: 760px; width: 100%; }
.tail-site {
  min-height: 100vh; background: var(--ft-paper); color: var(--ft-ink);
  font: 16px/1.55 var(--ft-control-font); accent-color: var(--ft-accent);
}
/* Same bar height, side padding and logo rules as the home page header (.mast). */
.tail-header { height: var(--mast-height); padding: env(safe-area-inset-top, 0px) var(--pad) 0; background: #201115; color: var(--cream);
  border-bottom: 1px solid rgba(246, 234, 214, 0.23); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tail-header-nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 22px); }
.tail-header .tail-back { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; white-space: nowrap; }
.tail-header-nav a:not(.tail-back) { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: #f4e6d3; opacity: .88; white-space: nowrap; }
.tail-header-nav a:not(.tail-back):hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 520px) {
  .tail-header-nav a[href="/dogs"] { display: none; }
}
.tail-main { width: min(1190px, 92%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr);
  align-items: start; gap: clamp(36px, 6vw, 96px); padding: 46px 0 80px; }
.tail-plate { position: sticky; top: 24px; min-width: 0; }
/* Photographs keep a unified frame height across dog/cat toggles with balanced focal cropping. */
.tail-main-photo { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: min(62vh, 560px);
  object-fit: cover; object-position: 50% 30%; background: #e8e0d5; border-radius: 3px; }
.tail-plate[data-species=cat] .tail-main-photo { object-position: 44% 38%; }
.tail-plate figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 13px; }
.tail-plate figcaption div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.tail-plate strong { font: 500 25px/1.35 var(--cn); }
.tail-plate figcaption span { color: var(--ft-muted); font-size: 13px; }
.tail-panel { min-width: 0; }
.tail-steps { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--ft-muted); }
.tail-steps > span { display: inline-flex; gap: 8px; align-items: center; }
.tail-steps > span + span::before { content: "/"; color: var(--ft-field-line); }
.tail-steps button { min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.tail-steps [aria-current] { color: var(--ft-accent); font-weight: 650; }
.tail-panel h1 { font: 500 clamp(34px, 3vw, 50px)/1.25 var(--cn); margin: 9px 0 12px; letter-spacing: 0; }
.tail-panel h1:focus { outline: 0; }
.tail-panel h2, .tail-panel legend { font: 600 17px/1.5 var(--ft-control-font); }
.tail-intro { color: var(--ft-muted); margin: 0 0 25px; max-width: 36em; }
.tail-panel form { display: grid; align-content: start; }
.tail-panel fieldset { margin: 0; border: 0; min-width: 0; padding: 0; }
.tail-panel legend { padding: 0; margin-bottom: 8px; }
.tail-panel label { display: block; font-size: 15px; font-weight: 550; }
.tail-panel label small { font-size: 13px; color: var(--ft-muted); font-weight: 400; margin-left: 3px; }
.tail-panel input:not([type=file],[type=radio],[type=checkbox],[type=range]), .tail-panel select, .tail-panel textarea {
  width: 100%; min-width: 0; color: var(--ft-ink); background: var(--ft-surface); border: 1px solid var(--ft-field-line);
  border-radius: var(--ft-field-radius); padding: 10px 13px; font: 16px/1.45 var(--ft-control-font); min-height: 46px;
}
.tail-panel textarea { resize: vertical; }
.tail-panel input::placeholder, .tail-panel textarea::placeholder { color: var(--ft-muted); }
.tail-panel label + :is(input,select,textarea) { margin-top: 6px; }
.tail-panel [aria-invalid=true] { border-color: #9d2735 !important; }

.tail-help { font-size: 14px; line-height: 1.55; color: var(--ft-muted); margin: 5px 0; }
.tail-error { font-size: 14px; font-weight: 400; color: #912034; display: block; margin-top: 4px; }
.tail-primary, .tail-secondary { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px;
  border-radius: var(--ft-pill); font-weight: 600; line-height: 1.45; }
.tail-primary { background: var(--ft-accent); color: white; width: 100%; margin-top: 20px; }
.tail-secondary { background: var(--ft-tint); color: var(--ft-accent); }
.tail-site button:disabled { cursor: wait; opacity: .62; }
.tail-site :is(button,a,summary,input,select,textarea):focus-visible { outline: 2px solid var(--ft-accent); outline-offset: 3px; }
.tail-header a:focus-visible { outline-color: var(--ft-focus-on-dark); }
.tail-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ft-accent); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.tail-bespoke > label:not(:first-of-type), .tail-bespoke > .tail-palette { margin-top: 16px; }
.tail-sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tail-unit { display: flex; position: relative; margin-top: 6px; }
.tail-panel .tail-unit input { padding-right: 34px; }
.tail-unit > span { position: absolute; right: 11px; align-self: center; color: var(--ft-muted); font-size: 14px; }
.tail-accessory { font-size: 14px; color: var(--ft-muted); margin-top: 18px; }
.tail-order { margin: 0; }
.tail-order > div { display: grid; grid-template-columns: 6em 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--ft-line); }
.tail-order dt { color: var(--ft-muted); }
.tail-order dd { margin: 0; overflow-wrap: anywhere; }
.tail-contact { display: flex; align-items: center; gap: 16px; margin: 20px 0 12px; }
.tail-contact img { width: min(34%, 155px); height: auto; object-fit: contain; }
.tail-contact p { color: var(--ft-muted); font-size: 14px; }
.tail-qr-space { display: grid; place-items: center; flex: 0 0 68px; height: 68px; border: 1px dashed var(--ft-field-line);
  border-radius: 8px; color: var(--ft-muted); font-size: 13px; }
.tail-order-links { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 12px; }
.tail-paper p { color: var(--ft-muted); }
.tail-paper-drawing { background: var(--ft-surface); padding: 10px; margin: 16px 0; }
.tail-paper-drawing svg { display: block; width: 100%; height: auto; }
@media (max-width: 760px) {
  .tail-header { background: #211217; padding-right: max(var(--pad), env(safe-area-inset-right, 0px)); }
  .tail-main { display: flex; flex-direction: column; width: 100%; gap: 0; padding: 0 0 max(38px, env(safe-area-inset-bottom)); }
  .tail-plate { position: static; width: 100%; }
  .tail-main-photo { max-height: min(50svh, 420px); border-radius: 0; }
  .tail-plate[data-twin] .tail-main-photo { object-position: 50% 20%; max-height: min(50svh, 420px); }
  .tail-plate[data-species=cat][data-twin] .tail-main-photo { object-position: 44% 36%; }
  .tail-plate figcaption { margin: 0; padding: 9px var(--pad); gap: 8px; }
  .tail-plate strong { font-size: 19px; }
  .tail-plate figcaption div { gap: 2px 8px; }
  .tail-panel { width: 100%; padding: 12px var(--pad) 0; }
  .tail-panel h1 { font-size: 32px; }
  .tail-intro { margin-bottom: 19px; }
  .tail-main:not(.tail-stage-style) .tail-plate { display: flex; align-items: center; gap: 13px; padding: 12px 20px; border-bottom: 1px solid var(--ft-line); }
  .tail-main:not(.tail-stage-style) .tail-main-photo { width: 55px; height: 55px; min-height: 0; object-fit: cover; border-radius: 7px; }
  .tail-main:not(.tail-stage-style) figcaption { display: block; padding: 0; }
  .tail-order > div { grid-template-columns: 5.4em 1fr; gap: 8px; font-size: 15px; }
  .tail-sizes { gap: 8px; }
}
@media (max-width: 350px) {
  .tail-panel { padding-inline: 14px; }
  .tail-sizes { grid-template-columns: 1fr; }
}

.tail-fitting { margin: 18px 0 6px; }
.tail-fitting h3 { font: 600 16px/1.5 var(--ft-control-font); }
.tail-fitting canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 340px; margin: 10px auto; touch-action: none; cursor: move; }
.tail-fitting .tail-scale { display: flex; align-items: center; gap: 15px; }
.tail-scale input { flex: 1; min-width: 0; min-height: 44px; }



.tail-fitting canvas[hidden] { display: none; }
.tail-swatch-picker { display: block; width: fit-content; max-width: 100%; margin: 10px 0; position: relative; cursor: crosshair; }
.tail-swatch-picker img { display: block; width: auto; max-width: 100%; height: auto; max-height: 190px; }
.tail-swatch-picker span { position: absolute; transform: translate(-50%, -50%); border: 2px solid white; box-shadow: 0 0 0 2px var(--ft-ink); pointer-events: none; }

/* Mutually exclusive choices use native radio inputs and a single sliding selection. */
.pet-choice {
  min-inline-size: 0; border: 0; padding: 0; margin: 0; color: var(--ft-ink);
  font-family: var(--ft-control-font);
}
.pet-choice legend { padding: 0; margin: 0 0 8px; font: 600 15px/1.45 var(--ft-control-font); }
.pet-segments {
  --inset: 3px; --index: 0; position: relative; isolation: isolate; display: inline-grid;
  grid-template-columns: repeat(var(--count), minmax(0, 1fr));
  width: min(100%, 14rem); padding: var(--inset); border-radius: 14px; background: #e5dcd3;
  box-shadow: inset 0 1px 2px #4934270c;
}
.pet-segments:has(> label:nth-child(2) input:checked) { --index: 1; }
.pet-segments:has(> label:nth-child(3) input:checked) { --index: 2; }
.pet-segments::before {
  content: ''; position: absolute; inset: var(--inset) auto var(--inset) var(--inset);
  width: calc((100% - 2 * var(--inset)) / var(--count)); border-radius: 11px; background: #fffcf7;
  box-shadow: 0 1px 3px #46302938, 0 0 0 1px #4d392a0a;
  transform: translateX(calc(var(--index) * 100%)); transition: transform 190ms var(--ft-ease);
}
.pet-segments label, .tail-color-options label { position: relative; margin: 0; min-width: 0; cursor: pointer; }
.pet-segments input, .tail-color-options input, .tail-switch input {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; margin: 0;
  opacity: 0; cursor: inherit;
}
.pet-segments label > span {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--ft-target); padding: 5px 10px; border-radius: 11px;
  color: #605452; font: 550 15px/1.35 var(--ft-control-font);
}
.pet-segments input:checked + span { color: var(--ft-accent); font-weight: 680; }
.pet-segments label:active > span { opacity: .72; }
.window-series .pet-choice { margin-inline-start: auto; flex: none; }
.window-series .pet-choice legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.window-series .pet-segments { width: 8.5rem; border-radius: var(--action-radius); background: #e7dccf; }
.window-series .pet-segments::before, .window-series .pet-segments label > span { border-radius: var(--action-radius); }
.window-series .pet-segments label > span { min-height: 44px; padding: 0 6px; gap: 4px; white-space: nowrap; }
@media (max-width: 700px) {
  .window-series #series-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .window-series .pet-segments { width: 7.1rem; }
}
@media (max-width: 374px) {
  .window-series { gap: 6px; padding-inline: 10px; }
  .window-series .pet-segments { width: 6.2rem; }
  .window-series .pet-segments svg { display: none; }
}
.hero[data-species=cat] .hero-photo { object-position: 50% 50%; }
@media (min-width: 701px) and (min-aspect-ratio: 6/5) {
  .hero[data-species=cat] .hero-art { width: min(73%, calc(var(--cover-photo-height) * 1.25)); }
}
.pet-segments input:focus-visible + span, .tail-color-options input:focus-visible + span,
.tail-switch input:focus-visible + .tail-switch-track { outline: 2px solid var(--ft-accent); outline-offset: 2px; }
.pet-choice:disabled .pet-segments { opacity: .55; }
.pet-choice:disabled label, .tail-bespoke:disabled label { cursor: default; }
.tail-bespoke > legend { margin-bottom: 9px; }
.tail-panel select {
  appearance: none; padding-inline-end: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 18' fill='none' stroke='%23685b57' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 3-3 3 3m-6 6 3 3 3-3'/%3E%3C/svg%3E");
  background-position: right 13px center; background-size: 14px 18px; background-repeat: no-repeat;
}
.tail-fabric-input { position: relative; display: block; margin-top: 6px; }
.tail-fabric-input img { position: absolute; pointer-events: none; left: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.tail-fabric-input select { min-height: 54px; padding-inline-start: 58px; }
.tail-palette legend { font: 550 15px/1.45 var(--ft-control-font); margin-bottom: 5px; }
.tail-color-options { display: flex; flex-wrap: wrap; gap: 2px 6px; }
.tail-color-options label { display: grid; align-items: center; min-height: var(--ft-target); }
.tail-color-options label > span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 11px; border: 1px solid var(--ft-line); border-radius: var(--ft-pill);
  background: var(--ft-surface); color: var(--ft-muted); font: 500 14px/1.3 var(--ft-control-font);
}
.tail-color-options i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px #30252a36; }
.tail-color-options input:checked + span { border-color: var(--ft-accent); box-shadow: inset 0 0 0 .5px var(--ft-accent); color: var(--ft-accent); background: #f5e9e4; }
.tail-panel #tail-color { margin-top: 6px; }
.tail-bespoke .tail-switch {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 15px;
  min-height: 54px; margin-block: 12px 8px; cursor: pointer;
}
.tail-switch-track {
  position: relative; flex: none; width: 49px; height: 30px; border-radius: var(--ft-pill);
  background: #b0a49b; box-shadow: inset 0 0 0 1px #49342714; transition: background-color 160ms ease;
}
.tail-switch-track::after {
  content: ''; position: absolute; inset: 3px auto auto 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fffcf7; box-shadow: 0 1px 3px #4934274d; transition: transform 180ms var(--ft-ease);
}
.tail-switch input:checked + .tail-switch-track { background: var(--ft-accent); }
.tail-switch input:checked + .tail-switch-track::after { transform: translateX(19px); }
.tail-guide { margin: 14px 0 20px; border-radius: 13px; background: var(--ft-surface); box-shadow: inset 0 0 0 1px var(--ft-line); }
.tail-guide summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 16px;
  font: 550 15px/1.45 var(--ft-control-font); color: var(--ft-accent); cursor: pointer; list-style: none; border-radius: inherit;
}
.tail-guide summary::-webkit-details-marker { display: none; }
.tail-guide summary::after { content: ''; width: 8px; height: 8px; margin-inline-end: 3px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); transition: transform 160ms var(--ft-ease); }
.tail-guide[open] summary::after { transform: rotate(225deg); }
.tail-guide-content { padding: 0 12px 14px; }
.tail-guide-content .pet-choice legend { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.tail-guide-content .pet-segments { width: 100%; }
.tail-guide-example { margin: 11px 0 0; }
.tail-guide-example img { display: block; width: 100%; height: auto; aspect-ratio: auto 4 / 3; max-height: 300px; object-fit: cover; background: #f4eddf; border-radius: 9px; }
.tail-guide-example figcaption { margin: 9px 3px 0; font-size: 14px; color: var(--ft-muted); }
.tail-site :is(.tail-primary,.tail-secondary,.tail-file-label,.tail-tool) { touch-action: manipulation; }
.tail-site :is(.tail-primary,.tail-secondary,.tail-file-label,.tail-tool):active { filter: brightness(.94); }
.tail-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tail-tool { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 15px; background: var(--ft-tint); color: var(--ft-accent); border-radius: 12px; font: 550 14px/1.4 var(--ft-control-font); }
.tail-tool[aria-pressed=true] { background: var(--ft-accent); color: var(--ft-surface); }
.tail-tool[aria-pressed=true]::before { content: '✓'; margin-inline-end: 5px; }
#design-sheet .gallery-toolbar { justify-content: space-between; align-items: end; gap: 12px; }
.gallery-toolbar .pet-choice { width: min(14rem, 100%); }
.piece-controls > .pet-choice { margin-bottom: 12px; }
.piece-controls > .pet-choice legend { margin-bottom: 5px; }
#collection-grid[data-species=cat] .card-photo { background: #f4eddf; }
@media (prefers-reduced-motion: reduce) {
  .pet-segments::before, .tail-switch-track, .tail-switch-track::after, .tail-guide summary::after { transition: none; }
}
@media (forced-colors: active) {
  .pet-segments, .tail-switch-track, .tail-color-options label > span { outline: 1px solid ButtonText; }
  .pet-segments input:checked + span, .tail-color-options input:checked + span, .tail-switch input:checked + .tail-switch-track { outline: 2px solid Highlight; }
  .tail-switch-track::after { background: ButtonText; forced-color-adjust: none; }
  .tail-panel select { appearance: auto; }
}

/* Page title with the species chosen on the home page (read-only). */
.tail-title { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin: 9px 0 12px; }
.tail-title h1 { margin: 0; }
.tail-species { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 3px 11px 3px 8px; border-radius: var(--ft-pill);
  background: var(--ft-tint); color: var(--ft-accent); font: 600 13px/1.3 var(--ft-control-font); white-space: nowrap; }
.tail-species svg { width: 18px; height: 18px; }

/* Try-on: choose a photo, generate, see the result, then continue to measuring. */
.tail-try-block { margin-top: 4px; padding: 18px clamp(14px, 4vw, 22px) 20px; border: 1px solid var(--ft-line); border-radius: var(--ft-card-radius);
  background: var(--ft-surface); }
.tail-try-head { display: flex; align-items: center; gap: 10px; }
.tail-try-head h2 { margin: 0; }
.tail-try-head span { padding: 1px 9px; border-radius: var(--ft-pill); background: var(--ft-tint); color: var(--ft-muted); font-size: 12px; }
.tail-try-block > .tail-help { margin: 6px 0 0; }
.tail-try-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 20px; }
.tail-try-step { display: grid; gap: 10px; min-width: 0; }
.tail-step-title { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 15px/1.4 var(--ft-control-font); }
.tail-step-title span { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ft-accent); color: #fff9f1; font-size: 12px; font-weight: 700; }
.tail-photo-field { display: grid; gap: 6px; }
.tail-photo-field .tail-help { margin: 0; }
.tail-panel label.tail-file-drop { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 68px; padding: 12px 16px;
  border: 1.5px dashed var(--ft-field-line); border-radius: var(--ft-field-radius); background: var(--ft-paper); color: var(--ft-accent);
  font: 600 15px/1.4 var(--ft-control-font); cursor: pointer; }
.tail-file-drop:hover { background: #efe6db; }
.tail-file-drop input, .tail-file-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tail-file-drop:focus-within, .tail-file-button:focus-within { outline: 2px solid var(--ft-accent); outline-offset: 3px; }
.tail-photo-chosen { display: flex; align-items: center; gap: 14px; }
.tail-photo-chosen > img { flex: none; width: 76px; height: 76px; object-fit: cover; border-radius: 12px; background: #efe7dc; }
.tail-photo-chosen p { margin: 0 0 6px; font-weight: 600; }
.tail-photo-actions { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; }
.tail-panel label.tail-file-button { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border: 1px solid var(--ft-field-line);
  border-radius: var(--ft-pill); background: var(--ft-surface); color: var(--ft-ink); font: 600 14px/1.3 var(--ft-control-font); cursor: pointer; }
.tail-quiet { min-height: 40px; padding: 0 2px; color: var(--ft-muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.tail-generate { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.tail-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 10px 24px;
  border-radius: var(--ft-pill); background: var(--ft-ink); color: #fffaf4; font: 650 16px/1.3 var(--ft-control-font); touch-action: manipulation; }
/* Once a result is shown, generating again steps back so measuring reads as the next step. */
.tail-action--again { background: transparent; color: var(--ft-ink); box-shadow: inset 0 0 0 1.5px var(--ft-ink); }
.tail-site .tail-action:disabled { cursor: not-allowed; opacity: 1; background: #d9cfc6; color: #6e6260; }
.tail-quota { flex: 1 1 13em; margin: 0; color: var(--ft-muted); font-size: 13px; line-height: 1.5; }
.tail-progress { display: flex; align-items: center; gap: 9px; margin: 0; padding: 10px 13px; border-radius: 11px; background: var(--ft-tint);
  color: var(--ft-ink); font-size: 14px; line-height: 1.45; }
.tail-progress--done { background: #e5eee3; color: #24502f; }
.tail-spinner { flex: none; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: tail-spin .9s linear infinite; }
@keyframes tail-spin { to { transform: rotate(360deg); } }
.tail-alert { display: grid; gap: 8px; padding: 12px 14px; border-radius: 11px; background: #f6e5e1; color: #7c1f2c; }
.tail-alert p { margin: 0; font-size: 14px; line-height: 1.55; }
.tail-alert-action { justify-self: start; min-height: 40px; padding: 6px 16px; border: 1px solid currentColor; border-radius: var(--ft-pill);
  color: inherit; font: 600 14px/1.3 var(--ft-control-font); }
.tail-result { display: grid; gap: 10px; margin: 0; }
.tail-result > a img { display: block; width: 100%; height: auto; border-radius: 12px; background: #efe7dc; }
.tail-result figcaption { display: flex; align-items: center; gap: 10px; color: var(--ft-muted); font-size: 13px; }
.tail-result figcaption > img { flex: none; width: 38px; height: 38px; object-fit: cover; border-radius: 8px; }
.tail-result figcaption span { flex: 1; display: grid; min-width: 0; }
.tail-result figcaption strong { color: var(--ft-ink); font-size: 14px; }
.tail-result .tail-link { min-height: 40px; }
.tail-history { display: grid; gap: 8px; }
.tail-history > p { margin: 0; color: var(--ft-muted); font-size: 13px; }
.tail-history ul { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 10px; overflow-x: auto; }
.tail-history li a { display: grid; gap: 5px; width: 96px; color: var(--ft-muted); font-size: 12px; }
.tail-history li a > img { width: 96px; height: 120px; object-fit: cover; border-radius: 9px; background: #efe7dc; }
.tail-history li span { display: flex; align-items: center; gap: 5px; }
.tail-history li span img { width: 18px; height: 18px; object-fit: cover; border-radius: 4px; }
/* The page's next step stands apart from the optional try-on. */
.tail-next { margin-top: 28px; }
.tail-next .tail-primary { margin-top: 0; gap: 8px; }
.tail-next .tail-help { margin-top: 8px; text-align: center; }
@media (max-width: 760px) {
  .tail-action { width: 100%; }
  .tail-quota { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tail-spinner { animation: none; border-right-color: currentColor; opacity: .55; }
}

/* === Flagship Tailoring Workbench Enhancements === */
.tail-site {
  overflow-x: clip;
}

.tail-plate-col {
  position: sticky;
  top: calc(var(--sc-nav-height, 68px) + 24px);
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 18px;
}

.tail-plate-col .tail-plate {
  position: static;
}

.tail-look-switcher {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 14px;
  border-radius: 16px;
  background: var(--ft-surface);
  border: 1px solid var(--ft-line);
}

.tail-switcher-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ft-muted);
  letter-spacing: 0.04em;
}

.tail-look-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.tail-look-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px 4px 4px;
  border-radius: 11px;
  border: 1px solid var(--ft-line);
  background: var(--ft-paper);
  color: var(--ft-ink);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.tail-look-chip img {
  width: 34px;
  height: 40px;
  border-radius: 7px;
  object-fit: cover;
}

.tail-look-chip:hover {
  border-color: var(--ft-accent);
  background: #fff9f2;
}

.tail-look-chip.is-active {
  border-color: var(--ft-accent);
  background: #f5e9e4;
  color: var(--ft-accent);
  font-weight: 650;
}

/* Visual 3-Step Progress Bar */
.tail-steps-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 16px;
}

.tail-step-node {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tail-step-node:not(:last-child)::after {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--ft-line);
}

.tail-step-node > button,
.tail-step-node > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  color: var(--ft-muted);
}

.tail-step-node i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  background: #e6ddd2;
  color: var(--ft-muted);
}

.tail-step-node.is-current > span {
  color: var(--ft-accent);
  font-weight: 650;
}

.tail-step-node.is-current i {
  background: var(--ft-accent);
  color: #fffaf4;
}

.tail-step-node.is-done > button {
  color: var(--ft-ink);
  font-weight: 550;
  cursor: pointer;
}

.tail-step-node.is-done i {
  background: #365c43;
  color: #fffaf4;
}

.tail-species-toggle .pet-choice legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.tail-species-toggle .pet-segments {
  width: 8.8rem;
}

.tail-species-toggle .pet-segments label > span {
  min-height: 38px;
  font-size: 13px;
  padding: 4px 8px;
}

.tail-intro-row {
  margin: 0 0 22px;
}

.tail-intro-row .tail-intro {
  margin-bottom: 8px;
}

.tail-switch-service {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ft-accent);
  font-size: 13px;
  font-weight: 550;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Dog profile quick fill */
.tail-dog-presets {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--ft-surface);
  border: 1px solid var(--ft-line);
}

.tail-dog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tail-dog-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--ft-line);
  background: var(--ft-paper);
  color: var(--ft-ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.tail-dog-chip.is-selected,
.tail-dog-chip:hover {
  border-color: var(--ft-accent);
  background: #f5e9e4;
  color: var(--ft-accent);
}

/* TryOn result compare */
.tail-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tail-compare-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: #e7dcd1;
  gap: 2px;
}

.tail-compare-tabs button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
  color: var(--ft-muted);
}

.tail-compare-tabs button[aria-pressed="true"] {
  background: var(--ft-surface);
  color: var(--ft-accent);
  box-shadow: 0 1px 3px rgba(48, 37, 42, 0.14);
}

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

.tail-compare-pane {
  display: grid;
  gap: 6px;
}

.tail-compare-pane span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ft-muted);
}

.tail-compare-pane img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  background: #efe7dc;
}

.tail-result-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Order Consultation Card */
.tail-order-card {
  padding: 22px;
  border-radius: 18px;
  background: var(--ft-surface);
  border: 1px solid var(--ft-line);
}

.tail-order-summary-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--ft-line);
}

.tail-order-summary-head img {
  width: 48px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
}

.tail-order-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ft-accent);
}

.tail-order-summary-head h2 {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ft-ink);
}

@media (max-width: 760px) {
  .tail-plate-col {
    position: static;
    gap: 12px;
    width: 100%;
  }
  .tail-look-switcher {
    width: calc(100% - 2 * var(--pad));
    margin: 0 auto;
  }
  .tail-main:not(.tail-stage-style) .tail-look-switcher {
    display: none;
  }
  .tail-order-card {
    padding: 16px;
  }
}
