:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --text: #16171a;
  --muted: #61646b;
  --line: #dcd9d0;
  --field-border: #b5b1a6; /* bordo dei campi: nel tema chiaro deve staccarsi dal bianco */
  --accent: #ffcc00;
  --accent-text: #111;
  --accent-strong: #e0a800;
  --ok: #1a7a43; /* verde per i testi: contrasto ≥ 4.5 sul chiaro */
  --ok-strong: #1a7a43; /* verde pieno dei pulsanti, con testo bianco */
  --danger: #c0392b; /* rosso per i testi */
  --danger-strong: #c0392b; /* rosso pieno dei pulsanti, con testo bianco */
  --topbar: #16171a;
  --topbar-text: #fff;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 4px 16px rgb(0 0 0 / 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #111214;
    --ok: #4cc27f;
    --danger: #ff7b6b;
    --surface: #1b1c20;
    --text: #f1f1f2;
    --muted: #a0a3ab;
    --line: #2c2e34;
    --field-border: #3a3d44;
    --topbar: #0a0a0b;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #111214;
  --ok: #4cc27f;
  --danger: #ff7b6b;
  --surface: #1b1c20;
  --text: #f1f1f2;
  --muted: #a0a3ab;
  --line: #2c2e34;
  --field-border: #3a3d44;
  --topbar: #0a0a0b;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 20px 16px 120px; outline: none; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 8px; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -0.02em; }
h2 { font-size: 1.3rem; margin-top: 28px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* barra superiore */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--topbar); color: var(--topbar-text);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.05rem; min-width: 0; }
.brand #site-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark { flex-shrink: 0; }
.brand-logo { height: 36px; width: auto; max-width: 72px; object-fit: contain; flex-shrink: 0; }
.hero-logo { height: 96px; width: auto; max-width: 60%; object-fit: contain; margin-bottom: 12px; display: block; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent);
  background-image: repeating-linear-gradient(-45deg, transparent 0 5px, rgb(0 0 0 / 0.85) 5px 9px); }
.cart-btn { position: relative; display: flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 8px 12px; border-radius: 999px; background: rgb(255 255 255 / 0.1); }
.cart-btn:hover { background: rgb(255 255 255 / 0.18); }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-text);
  font-size: 0.8rem; font-weight: 700; display: inline-grid; place-items: center; }
@media (max-width: 420px) {
  .cart-btn span:not(.badge) { display: none; }
  .topbar { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .brand-mark { display: none; }
  .brand.has-logo #site-name { display: none; }
  .brand { font-size: 0.95rem; }
  .nav-link { padding: 8px; font-size: 0.95rem; }
  .cart-btn { padding: 8px 10px; }
}

.top-nav { display: flex; align-items: center; gap: 6px; }
.nav-link { text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.nav-link:hover, .nav-link[aria-current='page'] { background: rgb(255 255 255 / 0.12); }

/* pulsanti e campi */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-dark { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
input[type='text'], input[type='email'], input[type='tel'], input[type='search'], input[type='number'], input[type='password'], input[type='date'], input[type='url'], textarea, select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--field-border); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; width: 100%; }
/* Campi a una riga tutti alti uguali, qualunque tipo (testo, data, tendina). */
input[type='text'], input[type='email'], input[type='tel'], input[type='search'], input[type='number'], input[type='password'],
input[type='date'], input[type='url'], select { height: 46px; line-height: 1.2; padding-top: 0; padding-bottom: 0; }
input[type='date'] { display: block; -webkit-appearance: none; appearance: none; }
input[type='date']::-webkit-date-and-time-value { text-align: left; }
select { -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
input:focus, textarea:focus, select:focus, .btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 1px; }

/* home */
.hero { background: var(--topbar); color: var(--topbar-text); border-radius: 18px; padding: clamp(20px, 5vw, 44px); margin-bottom: 8px;
  position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, #111 14px 28px); }
.hero.has-bg { background: linear-gradient(90deg, rgb(10 10 11 / 0.88), rgb(10 10 11 / 0.55)), var(--hero-bg) center / cover no-repeat, var(--topbar); }
@media (max-width: 700px) { .hero.has-bg { background: linear-gradient(rgb(10 10 11 / 0.7), rgb(10 10 11 / 0.85)), var(--hero-bg) center / cover no-repeat, var(--topbar); } }
.hero p { color: #c9cbd1; margin: 0 0 6px; }
.hero .bib-search { margin-top: 14px; }
.bib-search { display: flex; gap: 8px; max-width: 520px; }
.bib-search input { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.04em; }
.bib-search .btn { flex-shrink: 0; }
.tiers { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.tiers li { background: rgb(255 204 0 / 0.14); color: var(--accent); border: 1px solid rgb(255 204 0 / 0.4);
  border-radius: 999px; padding: 4px 12px; font-size: 0.875rem; font-weight: 600; }
.race-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 12px; }
.race-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  text-decoration: none; display: flex; flex-direction: column; transition: transform 0.15s; }
.race-card:hover { transform: translateY(-2px); }
.race-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; background: var(--line); }
.race-card .body { padding: 12px 14px 14px; }
.race-card h3 { font-size: 1.05rem; margin: 0 0 4px; }
.race-card[hidden] { display: none; }
#race-filter { max-width: 300px; }
.disc { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  border-radius: 6px; padding: 2px 8px; margin-bottom: 6px; }
.disc-cx { background: rgb(255 204 0 / 0.2); color: var(--text); }
.disc-mtb { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--text); }

/* galleria */
.race-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.back { display: inline-block; margin-bottom: 8px; color: var(--muted); text-decoration: none; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filters input { max-width: 260px; font-weight: 700; }
.filters input.bib-field, .race-filters input.bib-field { width: 130px; flex: 0 0 130px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: inherit;
  font-size: 0.875rem; cursor: pointer; color: var(--text); min-height: 36px; }
.chip[aria-pressed='true'] { background: var(--text); color: var(--bg); border-color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 230px), 1fr)); gap: 10px; }
.tile { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: var(--line); aspect-ratio: 3 / 2; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.tile .bibs { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 4px; flex-wrap: wrap; pointer-events: none; }
.bib { background: rgb(0 0 0 / 0.72); color: #fff; font-weight: 700; font-size: 0.8rem; border-radius: 6px; padding: 1px 7px; }
.tile .pick { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff;
  background: rgb(0 0 0 / 0.6); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.tile.selected { outline: 4px solid var(--accent); outline-offset: -4px; }
.tile.selected .pick { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

/* barra carrello */
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--topbar); color: var(--topbar-text);
  padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -4px 20px rgb(0 0 0 / 0.2); }
.cart-bar .info { line-height: 1.3; }
.cart-bar .hint { color: var(--accent); font-size: 0.85rem; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: #000; color: #fff; display: grid;
  grid-template-rows: auto 1fr auto; }
.lightbox .lb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; gap: 8px; }
.lightbox .lb-img { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 8px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
/* Anteprime protette: niente salvataggio con pressione lunga, sfocatura e lente */
.tile img, .lightbox img, .cart-item img, .race-card img, .cal-main, .cal-thumbs img {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.tile img, .cart-item img { filter: blur(var(--grid-blur, 0px)); transform: scale(1.04); }
.lb-stage { position: relative; display: inline-block; max-width: 100%; max-height: 100%; touch-action: none; cursor: crosshair; overflow: hidden; }
.lb-stage img { display: block; max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
.lb-base { filter: blur(var(--blur)); transform: scale(1.03); }
.lb-lens { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0;
  -webkit-mask-image: radial-gradient(circle var(--r, 85px) at var(--x, 50%) var(--y, 50%), #000 97%, transparent 100%);
  mask-image: radial-gradient(circle var(--r, 85px) at var(--x, 50%) var(--y, 50%), #000 97%, transparent 100%); }
.lb-ring { position: absolute; left: var(--x, 50%); top: var(--y, 50%); width: calc(var(--r, 85px) * 2 + 56px); height: calc(var(--r, 85px) * 2 + 56px);
  transform: translate(-50%, -50%); pointer-events: none; opacity: 0; animation: lb-spin 14s linear infinite; }
.lb-ring circle { fill: none; stroke: rgb(255 255 255 / 0.85); stroke-width: 1.2; }
.lb-ring text { fill: #fff; font: 700 13px/1 system-ui, sans-serif; letter-spacing: 1px; paint-order: stroke; stroke: rgb(0 0 0 / 0.55); stroke-width: 2px; }
.lb-stage.revealing .lb-lens, .lb-stage.revealing .lb-ring { opacity: 1; }
@keyframes lb-spin { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lb-ring { animation: none; } }
.lb-hint { color: #c9cbd1; flex-basis: 100%; text-align: center; }
.lightbox .lb-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px;
  padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; border-radius: 10px;
  background: rgb(255 255 255 / 0.12); color: #fff; font-size: 1.8rem; cursor: pointer; }
.lb-nav.prev { left: 8px; } .lb-nav.next { right: 8px; }
.icon-btn { background: rgb(255 255 255 / 0.12); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 10px; font-size: 1.4rem; cursor: pointer; }
@media (hover: none) { .lightbox:not(:has(.lb-stage)) .lb-nav { display: none; } }

body.lb-open .cart-bar { display: none; }

/* carrello */
.cart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.cart-head h1 { margin: 0; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--danger); border-color: var(--danger); }
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 1fr 360px; align-items: start; } .summary { position: sticky; top: 76px; } }
.cart-list { display: flex; flex-direction: column; gap: 8px; }
.cart-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; background: var(--surface);
  border-radius: 10px; padding: 8px; box-shadow: var(--shadow); }
.cart-item img { width: 96px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; display: block; }
.cart-item .name { font-weight: 600; overflow-wrap: anywhere; }
.remove { background: none; border: 0; color: var(--muted); font-size: 1.4rem; cursor: pointer; width: 44px; height: 44px; }
.summary { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.row.total { font-size: 1.25rem; font-weight: 800; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.row.discount { color: var(--ok); font-weight: 600; }
.progress { margin: 12px 0; padding: 10px 12px; border-radius: 10px; background: rgb(255 204 0 / 0.16); font-size: 0.9rem; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.field label { font-weight: 600; font-size: 0.9rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; margin: 10px 0; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.pay { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.btn-paypal { background: #ffc439; border-color: #ffc439; color: #111; }
.alert { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); margin: 10px 0; }
.ok-box { padding: 14px; border-radius: 10px; background: color-mix(in srgb, var(--ok) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); margin: 10px 0 18px; }

/* calendario */
.cal-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin: 18px 0 0;
  border-left: 6px solid var(--accent); text-decoration: none; }
.cal-banner strong { font-size: 1.1rem; }
.cal-layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .cal-layout { grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr); align-items: start; } }
.cal-layout > * { min-width: 0; }
.cal-main { width: 100%; aspect-ratio: 4 / 3; max-height: 70vh; object-fit: contain; background: var(--surface); border-radius: var(--radius); display: block; }
.cal-placeholder { aspect-ratio: 4 / 3; border-radius: var(--radius); display: grid; place-items: center; font-size: 5rem;
  background: repeating-linear-gradient(-45deg, var(--surface) 0 18px, var(--bg) 18px 36px); }
.cal-thumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.cal-thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; flex: 0 0 auto; background: none; }
.cal-thumbs button[aria-current='true'] { border-color: var(--accent); }
.cal-thumbs img { width: 64px; height: 48px; object-fit: cover; display: block; }
.status { display: inline-block; font-weight: 700; font-size: 0.85rem; border-radius: 999px; padding: 4px 12px; margin-bottom: 10px;
  background: rgb(255 204 0 / 0.18); color: var(--text); }
.status.closed { background: var(--line); color: var(--muted); }
.deadline-box { display: inline-block; margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; font-size: 0.95rem;
  background: rgb(255 204 0 / 0.16); border: 1px solid rgb(255 204 0 / 0.45); }
.price-big { font-size: 1.8rem; font-weight: 800; margin: 4px 0 12px; }
.pickup { padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); margin: 14px 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

/* download */
.dl-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.dl-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface);
  padding: 8px 12px; border-radius: 10px; box-shadow: var(--shadow); }
.dl-item > span:first-child { overflow-wrap: anywhere; }
.dl-btns { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 520px) {
  .dl-item { flex-wrap: wrap; }
  .dl-item > span:first-child { flex: 1 1 100%; }
  .dl-btns { flex: 1 1 100%; }
  .dl-btns .btn { flex: 1; }
}
.dl-btns .btn { min-height: 38px; padding: 6px 12px; }
.dl-all { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-help { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; }
.prose { max-width: 720px; white-space: pre-wrap; }
.legal h2 { white-space: normal; margin: 22px 0 6px; font-size: 1.1rem; }

.footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 24px 16px 90px; color: var(--muted); font-size: 0.85rem; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .race-card { transition: none; } .spinner { animation-duration: 2s; } }

/* finestre di conferma del sito (al posto di quelle del browser) */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgb(0 0 0 / 0.6); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 20px; width: min(440px, 100%);
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.4); }
.modal p { margin: 0 0 14px; }
.modal-copy { margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.btn-danger { background: var(--danger-strong); border-color: var(--danger-strong); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); border-color: var(--danger-strong); }
.field-title { font-weight: 600; font-size: 0.9rem; }
.file-names { color: var(--muted); font-size: 0.9rem; }

/* pulsanti di pagamento: grigi finché non si accettano le condizioni, poi gialli */
.pay-btn { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.pay-btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.pay-btn.pay-paypal { background: #ffc439; border-color: #ffc439; }
.pay-btn:disabled, .pay-btn:disabled:hover { background: transparent; border-color: var(--line); color: var(--muted); opacity: 1; cursor: not-allowed; }
.pay-hint { margin: 8px 0 0; font-size: 0.85rem; color: var(--muted); }

/* pulsante tema chiaro / scuro nella barra in alto */
.theme-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: rgb(255 255 255 / 0.1); color: var(--topbar-text);
  font: inherit; font-weight: 600; font-size: 0.9rem; padding: 8px 12px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.theme-btn:hover { background: rgb(255 255 255 / 0.18); }
@media (max-width: 420px) { .theme-btn span { display: none; } .theme-btn { padding: 8px 10px; } }

/* testo di esempio dei campi: leggibile in entrambi i temi */
::placeholder { color: var(--muted); opacity: 1; }
output { color: inherit; }

/* finestra di ritaglio delle immagini */
.crop-modal { width: min(720px, 100%); }
.crop-help { color: var(--muted); font-size: 0.9rem; }
.crop-frame { position: relative; width: 100%; max-height: 60vh; overflow: hidden; border-radius: 8px; background: #000;
  cursor: grab; touch-action: none; outline: 2px solid var(--accent); outline-offset: -2px; }
.crop-frame:active { cursor: grabbing; }
.crop-frame img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; transform-origin: 0 0; }
.crop-checker { background: repeating-conic-gradient(#bbb 0 25%, #888 0 50%) 0 0 / 20px 20px; }
.crop-zoom { display: flex; align-items: center; gap: 10px; margin: 12px 0; font-weight: 600; font-size: 0.9rem; }
.crop-zoom input { flex: 1; accent-color: var(--accent); }
.crop-warn { color: var(--danger); font-size: 0.85rem; margin: 0 0 10px; }

#footer-text { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }

/* pulsanti di pagamento: carta (Stripe) nel suo viola, PayPal con il pulsante ufficiale */
.pay-btn.pay-stripe { background: #635bff; border-color: #635bff; color: #fff; gap: 8px; }
.pay-btn.pay-stripe:hover { background: #5249e6; border-color: #5249e6; }
.paypal-slot { min-height: 46px; transition: opacity 0.15s; }
.paypal-slot.is-off { opacity: 0.4; pointer-events: none; filter: grayscale(1); }
.pay-methods { margin: 6px 0 0; font-size: 0.8rem; color: var(--muted); text-align: center; }
.thanks-next { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 24px; }
/* Spento finché non si accettano le condizioni: grigio come il pulsante PayPal */
.pay-btn.pay-stripe:disabled, .pay-btn.pay-stripe:disabled:hover {
  background: #6b6b70; border-color: #6b6b70; color: rgb(255 255 255 / 0.75); opacity: 0.55; cursor: not-allowed; }
/* Stessa forma per i due pulsanti di pagamento: altezza 46 px e angoli arrotondati come gli altri pulsanti */
.pay-btn { min-height: 46px; border-radius: 10px; }
.paypal-slot { border-radius: 10px; overflow: hidden; height: 46px; line-height: 0; }
.paypal-slot .paypal-buttons { display: block; }
/* Pulsante carta: testo a sinistra, loghi dei metodi accettati a destra */
.pay-btn.pay-stripe { justify-content: space-between; padding-left: 16px; padding-right: 10px; }
.card-badges { display: inline-flex; gap: 4px; flex-shrink: 0; }
.card-badges svg { width: 34px; height: 22px; display: block; border-radius: 4px; }
.pay-btn.pay-stripe:disabled .card-badges { filter: grayscale(1); opacity: 0.6; }
@media (max-width: 360px) { .card-badges svg:nth-child(n + 3) { display: none; } }

/* Galleria visibile ma ancora senza foto: immagine del pannello con il messaggio sopra. */
.soon { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--line); display: grid; place-items: center; }
.soon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.soon span { position: relative; margin: 12px; padding: 8px 14px; border-radius: 10px; background: rgba(0, 0, 0, 0.62); color: #fff;
  font-weight: 700; text-align: center; line-height: 1.3; }
.soon-plain span { background: none; color: var(--text); }
.soon-big { border-radius: var(--radius); max-width: 900px; margin-top: 16px; }
.soon-big span { font-size: 1.25rem; padding: 12px 20px; }
