@font-face {
  font-family: "Trophy Display";
  src: url("/fonts/fredoka/Fredoka%5Bwdth,wght%5D.ttf") format("truetype");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-display: swap;
}

.trophy-studio {
  --trophy-ink: #232820;
  --trophy-dark: #232820;
  --trophy-paper: #fcf9f1;
  --trophy-line: #b4ad9c;
  --trophy-accent: #f1c46b;
  color: var(--trophy-ink);
}

.trophy-intro {
  padding: clamp(1rem, 3vw, 3rem) 0 clamp(1.4rem, 4vw, 3rem);
  border-bottom: 2px solid var(--trophy-dark);
}
.trophy-intro h1 {
  margin: 0;
  font-family: "Trophy Display", sans-serif;
  font-stretch: condensed;
  font-weight: 640;
  font-size: clamp(2.55rem, 7.6vw, 7.7rem);
  line-height: .89;
  letter-spacing: -.045em;
}
.trophy-intro p { margin: .9rem 0 0; font-size: clamp(1rem, 1.8vw, 1.2rem); }

.trophy-catalog { padding: 1.65rem 0 0; }
.trophy-studio h2 { margin: 0 0 .85rem; font-family: "Trophy Display", sans-serif; letter-spacing: -.025em; }
.trophy-sports { display: flex; gap: .45rem; margin-bottom: .9rem; }
.trophy-sports button { border: 1px solid var(--trophy-line); background: var(--trophy-paper); color: var(--trophy-ink); font: inherit; font-weight: 700; padding: .55rem .95rem; min-height: 2.5rem; cursor: pointer; }
.trophy-sports button[aria-pressed="true"] { background: var(--trophy-dark); color: var(--trophy-paper); border-color: var(--trophy-dark); }
.trophy-competition { min-width: 0; }
.trophy-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.2rem), 1fr)); gap: clamp(.65rem, 1.4vw, 1.15rem); }
.trophy-card {
  display: flex; flex-direction: column; padding: 0; text-align: left;
  overflow: hidden; border: 1px solid var(--trophy-line); border-radius: 3px;
  color: var(--trophy-ink); background: var(--trophy-paper);
}
.trophy-card[aria-pressed="true"] { background: var(--trophy-dark); color: var(--trophy-paper); border-color: var(--trophy-dark); }
button.trophy-card:hover { border-color: var(--trophy-dark); }
.trophy-image { position: relative; flex: none; display: block; width: 100%; aspect-ratio: 1.49; overflow: hidden; background: #cfb39d; }
.trophy-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.trophy-badge-art { display: grid; place-items: center; background: oklch(86% .038 64); }
.trophy-badge-illustration { width: 78%; max-width: 11rem; position: relative; display: grid; gap: .18rem; padding: .4rem .1rem; border: 2px solid currentColor; border-radius: .48rem; background: #282729; color: #f4e6cd; text-align: center; box-shadow: 0 .22rem 0 oklch(30% .014 38); }
.trophy-badge-illustration span { font-size: clamp(.42rem, .85vw, .63rem); letter-spacing: .035em; }
.trophy-badge-illustration strong { font: 700 clamp(.72rem, 1.75vw, 1.42rem)/1.15 ui-monospace, monospace; }
.trophy-badge-art--stand .trophy-badge-illustration::after { content: ''; position: absolute; z-index: 0; width: 46%; height: .32rem; top: calc(100% + .12rem); left: 27%; border-radius: .2rem; background: #282729; }
.trophy-badge-art--doubles .trophy-badge-illustration { box-shadow: .25rem .25rem 0 #e3c894, .4rem .4rem 0 #282729; }
.trophy-medal-illustration { width: 62%; max-width: 8.5rem; aspect-ratio: 1; position: relative; display: grid; place-content: center; gap: .12rem; border-radius: 50%; background: #282729; color: #f4e6cd; text-align: center; box-shadow: 0 .22rem 0 oklch(30% .014 38), inset 0 0 0 .3rem #282729, inset 0 0 0 .44rem currentColor; }
.trophy-medal-illustration::before { content: ''; position: absolute; left: 34%; width: 32%; height: 18%; top: -12%; border-radius: .35rem .35rem 0 0; background: #282729; box-shadow: inset 0 0 0 .12rem currentColor; }
.trophy-medal-illustration span { font-size: clamp(.4rem, .8vw, .58rem); letter-spacing: .05em; }
.trophy-medal-illustration strong { font: 700 clamp(.66rem, 1.5vw, 1.2rem)/1.1 ui-monospace, monospace; }
.trophy-sticker-illustration { height: 58%; aspect-ratio: 1; margin-top: -6%; position: relative; display: grid; place-content: center; gap: .1rem; padding-bottom: 18%; border-radius: 50%; background: #282729; color: #f4e6cd; text-align: center; box-shadow: 0 0 0 .28rem #ffbf33, 0 0 0 .55rem #fff, 0 .5rem 0 .55rem oklch(30% .014 38 / .25); }
.trophy-badge-art:has(> .trophy-sticker-illustration, > .trophy-bib-illustration, > .trophy-ring-illustration) { container-type: size; }
.trophy-sticker-illustration span { font-size: 5cqh; letter-spacing: .05em; }
.trophy-sticker-illustration strong { font: 700 9.5cqh/1.1 "Trophy Display", sans-serif; }
.trophy-sticker-illustration em { position: absolute; left: -20%; right: -20%; bottom: 6%; padding: .1rem 0; border-radius: .3rem; font: 700 8cqh/1.2 "Trophy Display", sans-serif; letter-spacing: .08em; color: #282729; background: #f4e6cd; box-shadow: 0 0 0 .28rem #fff; clip-path: polygon(-10% -60%, 110% -60%, 110% 45%, 93% 160%, -10% 160%); }
.trophy-bib-illustration { height: 84%; aspect-ratio: .81; margin-top: -4%; position: relative; display: grid; grid-template-rows: auto auto 1fr auto; padding: .45rem 0 .5rem; background: #f4e6cd; color: #282729; text-align: center; clip-path: polygon(0 0, 92% 0, 100% 7%, 100% 100%, 0 100%); box-shadow: 0 .22rem 0 oklch(30% .014 38); }
.trophy-bib-illustration span { font-size: 5cqh; letter-spacing: .05em; font-weight: 700; }
.trophy-bib-illustration b { margin: .2rem 0; padding: .1rem 0; background: #ffbf33; font-size: 4.6cqh; letter-spacing: .05em; }
.trophy-bib-illustration strong { font: 700 22cqh/1 "Trophy Display", sans-serif; align-self: center; }
.trophy-ring-illustration { height: 80%; aspect-ratio: 1; display: grid; place-content: center; gap: .1rem; border-radius: 50%; color: #f4e6cd; text-align: center; background: radial-gradient(circle, #282729 0 61%, transparent 61.5% 87%, #282729 87.5%), repeating-conic-gradient(from 4deg, #f4e6cd 0 19deg, #282729 19deg 20deg, #ffbf33 20deg 31deg, #282729 31deg 32deg, #f4e6cd 32deg 52deg, #282729 52deg 53deg, #ffbf33 53deg 68deg, #282729 68deg 69deg, #f4e6cd 69deg 89deg, #282729 89deg 90deg); box-shadow: 0 .22rem 0 oklch(30% .014 38); }
.trophy-ring-illustration span { font-size: 3.6cqh; letter-spacing: .05em; }
.trophy-ring-illustration strong { font: 700 8.5cqh/1.1 "Trophy Display", sans-serif; }
.trophy-route { height: .3rem; margin: .1rem 12%; background: radial-gradient(circle, currentColor 45%, transparent 50%) 0 50% / .6rem .3rem repeat-x; }
.trophy-card-price:not(:empty) { display: block; margin-top: .4rem; font-weight: 750; font-size: .88rem; }
.trophy-image:has(img[src$="competition-tyrun.webp"]) img { transform: scale(1.06); }
.trophy-image:has(img[src$="competition-weight-plate.webp"]),
.trophy-image:has(img[src$="competition-workout-clock.webp"]) { background: #cfb29a; }
.trophy-card-copy { display: block; width: 100%; padding: .8rem .85rem; }
.trophy-card-copy strong { display: block; font-size: clamp(.95rem, 1.6vw, 1.18rem); line-height: 1.15; }
.trophy-card-copy small, .trophy-season { display: block; margin-top: .35rem; font-size: .74rem; }
.trophy-card-copy small { color: #595548; }
.trophy-card[aria-pressed="true"] small { color: var(--trophy-accent); }

.trophy-workspace {
  display: grid; grid-template: "editor review" auto "delivery review" 1fr / minmax(17rem, .84fr) minmax(0, 1.16fr);
  column-gap: clamp(1.2rem, 4vw, 4rem); align-items: start;
  margin-top: clamp(2rem, 5vw, 4.5rem); padding-top: 1.5rem; border-top: 2px solid var(--trophy-dark);
}
.trophy-editor { grid-area: editor; min-width: 0; padding: .7rem 0 .2rem; }
.trophy-template-label { margin: -.2rem 0 1rem; color: #595548; }
#trophyLiegePreset { margin-bottom: .75rem; }
.trophy-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.trophy-field { min-width: 0; }
.trophy-field[data-trophy-field="title"] { grid-column: 1 / -1; }
.trophy-field input, .trophy-field select, .trophy-field textarea { background: var(--trophy-paper); }
.trophy-field textarea { width: 100%; resize: vertical; font: inherit; }
.trophy-field[data-trophy-field="splits"] { grid-column: 1 / -1; }
.trophy-field p { margin: .3rem 0 0; }
.trophy-field-error { color: #922b29; }
.trophy-delivery { grid-area: delivery; min-width: 0; }
.trophy-delivery .fulfillment { margin-top: 1rem; }

.trophy-review { grid-area: review; position: sticky; top: 1rem; min-width: 0; color: var(--trophy-paper); background: var(--trophy-dark); padding: 1rem; border-radius: 3px; }
.trophy-review-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.1rem; margin-bottom: .9rem; }
.trophy-review-heading h2 { margin: 0; }
.trophy-views { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
.trophy-views[hidden] { display: none; }
.trophy-views button { color: var(--trophy-paper); background: transparent; border: 1px solid #a7a18e; border-radius: 2px; padding: .45rem .6rem; font: inherit; font-size: .8rem; }
.trophy-views button[aria-pressed="true"] { color: var(--trophy-ink); background: var(--trophy-accent); border-color: var(--trophy-accent); }
.trophy-stage {
  position: relative; min-height: clamp(16rem, 31vw, 26rem); display: grid; place-items: center;
  color: var(--trophy-paper); text-align: center; background: radial-gradient(ellipse at center, #626158, #393b35 75%);
}
.trophy-stage-overlay { grid-area: 1/1; z-index: 1; padding: .8rem; }
.trophy-stage-overlay:has(button[hidden]) { pointer-events: none; }
.trophy-stage-overlay p { margin: .25rem 0 .65rem; }
.trophy-stage-overlay .trophy-status-ready { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.trophy-model-slot { position: absolute; inset: 0; }
.trophy-model-slot model-viewer { width: 100%; height: 100%; }
.trophy-model-slot model-viewer[data-loading] { opacity: 0; pointer-events: none; }
.trophy-model-details { margin: .75rem 0 0; font-size: .84rem; }

.trophy-gallery { display: none; }
.trophy-library { margin-top: 2.2rem; }
.trophy-studio :focus-visible { outline: 3px solid #8b5214; outline-offset: 3px; }
.trophy-review :focus-visible { outline-color: var(--trophy-accent); }

@media (max-width: 820px) {
  .trophy-workspace { grid-template: "editor" "review" "delivery" / minmax(0, 1fr); row-gap: .8rem; }
  .trophy-review { position: static; }
}
@media (max-width: 440px) {
  .trophy-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trophy-fields { grid-template-columns: minmax(0, 1fr); }
  .trophy-card-copy { padding: .55rem .6rem; }
  .trophy-stage { min-height: 18rem; }
}

.trophy-catalog-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; }
.trophy-catalog-heading a { color: var(--trophy-ink); text-underline-offset: .2em; }
.trophy-colors {
  position: relative; min-width: 0; margin: 1.45rem 0 0; padding: 1rem;
  border: 1px solid var(--trophy-line); background: var(--trophy-paper); scroll-margin-top: 1rem;
}
.trophy-colors legend { padding: 0 .4rem; font: 620 1.45rem/1.1 "Trophy Display", sans-serif; }
.trophy-color-intro { margin: 0 0 1.1rem; max-width: 42ch; line-height: 1.45; }
.trophy-color-board, .trophy-color-group { display: grid; gap: .65rem; min-width: 0; }
.trophy-color-board { gap: 1rem; }
.trophy-color-kicker { margin: 0; font-size: .85rem; font-weight: 700; }
.trophy-choice-grid, .trophy-core-colors {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.9rem), 1fr)); gap: .5rem;
}
.trophy-choice {
  position: relative; display: grid; align-content: start; gap: .5rem; min-width: 0; padding: .55rem;
  border: 1px solid var(--trophy-line); border-radius: 4px; background: transparent;
  color: var(--trophy-ink); font: inherit; text-align: left; cursor: pointer;
}
.trophy-choice:disabled, .trophy-quick-colors button:disabled { opacity: .5; cursor: not-allowed; }
.trophy-choice-chips { display: flex; overflow: hidden; width: 100%; height: 2.2rem; border-radius: 2px; }
.trophy-chip { flex: 1; box-shadow: inset 0 0 0 1px oklch(30% .01 75 / .12); }
.trophy-chip:first-child:not(:only-child) { flex: 2; }
.trophy-choice-copy { display: grid; gap: .22rem; overflow-wrap: anywhere; }
.trophy-choice-copy strong { font-size: .89rem; }
.trophy-choice-copy small, .trophy-quick-colors small { font-size: .76rem; color: #514d42; }
.trophy-choice[aria-pressed="true"], .trophy-quick-colors button[aria-pressed="true"] {
  border-color: var(--trophy-ink); box-shadow: inset 0 0 0 1px var(--trophy-ink); background: #f5efdf;
}
.trophy-choice[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: .33rem; right: .33rem; display: grid; place-items: center;
  width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--trophy-dark); color: var(--trophy-paper);
  border: 1px solid var(--trophy-paper); font: 700 .75rem/1 sans-serif;
}
.trophy-colors button:hover { border-color: var(--trophy-dark); }
.trophy-core-colors { grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .65rem; }
.trophy-part-color { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); align-items: center; gap: .35rem .5rem; }
.trophy-part-color[hidden] { display: none; }
.trophy-part-color label { grid-column: 1 / -1; }
.trophy-part-color select { grid-column: 2; grid-row: 2; }
.trophy-part-color .field-note { grid-column: 1 / -1; }
.trophy-current-chip { grid-column: 1; grid-row: 2; width: 1.55rem; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px #797562; }
.trophy-colors select { width: 100%; min-width: 0; min-height: 44px; font-size: 1rem; }
.trophy-edit-pair summary { padding: .65rem 0; min-height: 44px; font-size: .88rem; cursor: pointer; }
.trophy-edit-pair[open] .trophy-core-colors { margin: .25rem 0 .55rem; }
.trophy-accents { padding: 0 .9rem; background: #f6f0e0; border-left: 3px solid #ad792f; }
.trophy-accents summary strong { font: 650 1.12rem/1.2 "Trophy Display", sans-serif; }
.trophy-accents[open] { padding-bottom: .9rem; }
.trophy-reset-accent { margin-top: .4rem; min-height: 44px; padding: .5rem 0; font: inherit; font-size: .9rem; color: var(--trophy-ink); border: 0; background: transparent; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.trophy-accents summary { padding: .85rem 0; cursor: pointer; font-weight: 700; }
.trophy-accents summary small { display: block; margin: .2rem 0 0 1rem; font-size: .8rem; font-weight: 500; color: #514d42; }
.trophy-accents .field-note { margin: 0 0 .85rem; line-height: 1.45; }
.trophy-quick-colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 6rem), 1fr)); gap: .45rem; margin: .65rem 0 .85rem; }
.trophy-quick-colors button {
  display: grid; align-content: start; gap: .2rem; padding: .55rem; min-height: 44px;
  color: var(--trophy-ink); background: transparent; border: 1px solid var(--trophy-line); border-radius: 4px;
  text-align: left; font: inherit; cursor: pointer;
}
.trophy-quick-colors button::before { content: ""; width: 1.5rem; height: 1.5rem; margin-bottom: .2rem; border-radius: 50%; background: var(--shade); }
.trophy-quick-colors strong { font-size: .83rem; }
.trophy-color-total:has(strong:not([hidden])) {
  display: grid; gap: .3rem; margin: 1rem -1rem -1rem; padding: .85rem 1rem; background: var(--trophy-dark); color: var(--trophy-paper);
}
.trophy-color-total:has(+ .trophy-review-order:not([hidden])) { margin-bottom: 0; }
.trophy-review-order:not([hidden]) {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 0 -1rem -1rem; padding: .65rem 1rem; min-height: 48px; font-weight: 700;
  background: var(--trophy-accent); color: var(--trophy-ink); text-decoration: none;
}
.trophy-review-order:hover { text-decoration: underline; }
.trophy-review-order span { font-size: 1.35rem; }
.trophy-color-total small { color: var(--trophy-accent); }
.trophy-color-source {
  position: absolute; inset: 0 auto auto 0; width: 1px; height: 1px; margin: 0; overflow: hidden;
  clip-path: inset(50%); pointer-events: none;
}
.trophy-studio select.trophy-native-select {
  position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.trophy-next { display: none; }
@media (max-width: 600px) {
  .trophy-sports { flex-wrap: wrap; }
  .trophy-sports button, .trophy-views button { min-height: 44px; }
  .trophy-fields input, .trophy-fields textarea, .trophy-fields select,
  .trophy-studio .print-delivery input, .trophy-studio .print-delivery select { font-size: 1rem; }
  .trophy-studio :is(input, select, textarea) { scroll-margin-block: 1rem 6rem; }
  .trophy-next { display: inline-flex; align-items: center; min-height: 44px; color: var(--trophy-paper); }
  .trophy-quick-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trophy-delivery { scroll-margin-top: .75rem; }
}

.mobile-export-rail:is(.trophy-rail-past-editor, .trophy-rail-at-order) { display: none; }

.trophy-order-lines:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem 1rem; margin: 1rem 0 .5rem; font-size: .9rem; }
.trophy-order-lines dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
