/* Le risorse sono caricate dal menu solo nelle pagine interessate. */
#contenuto.gm-layout {
  display:block !important; width:min(940px,calc(100% - 40px)) !important;
  margin-inline:auto !important; padding-block:clamp(22px,4vw,48px) !important;
}
.gm-layout .gm-intro {position:static !important; margin:0 0 22px; max-width:68ch}
.gm-layout .gm-intro img {display:none !important}
.gm-layout .gm-intro h1,.scelte .sc-intro h1,.gt27-main .gt27-intro h1,
body.svc-shop #gt254-title {font-size:clamp(2rem,4vw,3.2rem) !important; line-height:1.07 !important; letter-spacing:-.035em !important}
.gm-layout .gm-intro p {margin:8px 0 0 !important}
.gm-layout #gt-match {
  display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:22px 30px;
  max-width:none; padding:clamp(16px,3vw,32px) !important;
}
#gt-match > fieldset {min-width:0; margin:0 !important; padding:0}
#gt-match legend {margin-bottom:12px}
#gt-match > button {grid-column:1/-1; justify-self:start; margin:0 !important}
#gt-match .gm-checks {display:flex; flex-wrap:wrap; gap:7px; margin-top:12px}
#gt-match .gm-checks label {min-height:44px; display:inline-flex; align-items:center; padding:6px 12px; cursor:pointer}
#gt-match .gm-checks label:has(:checked) {background:#e2eee8; border-color:#245a4d; color:#123e34}
#gt-match .gm-checks label:focus-within {outline:2px solid #245a4d; outline-offset:2px}
.gmi-extra summary,.dimora-head details.dimora-accesso summary {cursor:pointer; color:#215749; font-weight:600; padding-block:10px}
.gmi-extra label {display:grid; gap:4px}
#gt-match .gmi-extra input {width:100%; min-height:44px}
body.svc-shop .svc-intro {padding-block:18px 26px !important}
body.svc-shop .gt254-step {display:none !important}
body.svc-shop .svc-intro-copy {max-width:65ch !important}
body.svc-shop #gt254-title {margin:0 0 8px !important; max-width:none !important}
body.svc-shop .svc-intro-links {margin-top:8px !important}
body.svc-shop .svc-intro-links .svc-primary {display:none}
body.svc-shop .gt254-section__head {display:block !important}
.svc-shop .gt254-service:has(.gt1031-service-check:checked) {border-color:#417768 !important}
.svc-shop .gmi-choice {padding:8px 14px; border:1px solid #376d5e; background:#fff; color:#215749; border-radius:5px; font:inherit; font-weight:600; min-height:44px; cursor:pointer}
.svc-shop .gmi-choice[aria-pressed="true"] {background:#e2eee8}
.svc-shop .gt254-service.gmi-service .gt254-check,
.svc-shop .gt254-service.gmi-service .gt1031-service-check {display:none !important}
.svc-shop .gt254-service.gmi-service .gt254-service__row label {display:flex !important; flex-wrap:wrap; align-items:center; gap:8px 14px}
.svc-shop .gt254-service.gmi-service .gt254-copy {flex:1 0 100%;min-width:0}
.svc-shop .gt254-service.gmi-service .gt254-price {margin:0 !important}
.svc-shop .gt254-service.gmi-service .gmi-choice {margin-left:auto}
.svc-shop .gmi-service:not(:has(.gt1031-service-check:checked)) .svc-quantity {display:none !important}
body.svc-shop .gmi-service .svc-counter button {min-width:44px; min-height:44px}
body.svc-shop .gt254-layout {padding-top:18px !important}
.scelte .sc-lead {padding-block:14px 22px !important; gap:clamp(16px,3vw,44px) !important;align-items:center}
.scelte .sc-intro h1 {max-width:20ch !important; margin-bottom:12px}
.scelte .sc-lead .sc-photo {margin:0 !important; aspect-ratio:2/1 !important; min-height:0 !important}
.scelte .sc-photo img {width:100%;height:100%;object-fit:cover;object-position:center 36%}
.gmi-benefits {display:flex; flex-wrap:wrap; gap:6px 22px; padding:12px 0; margin:0; list-style:none; border-top:1px solid #ced8d2; color:#215749; font-weight:600}
.tour-page main .tour-list-intro {min-height:0 !important; margin-bottom:0 !important}
.tour-page .tour-list-intro > div {padding:clamp(16px,2.4vw,32px) !important}
.tour-page .tour-list-intro .tour-list-photo {height:clamp(160px,17vw,224px) !important; min-height:0 !important; object-fit:cover}
.tour-page .tour-list-intro + #gt-prime-case-title {margin-top:0 !important; padding-top:18px !important}
.gt-dimora .dimora-head details.dimora-accesso {display:block; align-self:start; border:0; padding:0; margin:0}
.dimora-head details.dimora-accesso span {display:block}
.gt-dimora .gmi-beds {display:block; margin-top:6px;font-size:.95rem; line-height:1.4}
.gt-page-case-vacanza-baia-verde .gt260-section-head {max-width:none !important; width:100% !important;margin-inline:0 !important; padding-inline:0 !important; align-items:end}
.gt-page-case-vacanza-baia-verde .gt260-text-link {white-space:nowrap; flex-shrink:0}
.gt27-main .gt27-wrap {padding-block:clamp(20px,4vw,48px) !important; align-items:start}
.gt27-main .gt27-card-head img {display:none !important}
.gt27-main .gt27-card-head {display:block !important}
.gt27-main .gt27-card-head h2 {max-width:none !important; font-size:clamp(1.45rem,2.3vw,2rem) !important}
.gt27-main .gt27-card {padding:clamp(18px,3vw,34px) !important}
.gt27-intro .gt27-promise {margin-block:14px !important}
@media(min-width:761px) {
  .gt27-intro .gt27-cta-quick {display:none !important}
}
@media(max-width:760px) {
  #contenuto.gm-layout {width:calc(100% - 32px) !important}
  .gm-layout #gt-match {grid-template-columns:minmax(0,1fr); gap:18px}
  #gt-match > button {width:100%; justify-self:stretch}
  .gm-layout .gm-intro {margin-bottom:14px}
  #gt-match input,#gt-match select,.gt27-form input,.gt27-form select {font-size:16px !important; min-width:0}
  .tour-page .tour-list-intro .tour-list-photo {display:none !important}
  .scelte .sc-lead .sc-photo {aspect-ratio:2.6/1 !important}
  .gt27-main .gt27-wrap {display:flex !important; flex-direction:column; gap:14px}
  .gt27-main .gt27-intro,.gt27-main .gt27-card {width:100%; box-sizing:border-box}
  .gt27-main .gt27-after-form {margin:8px 0 0;width:100%}
  .gt27-main .gt27-cta-quick {display:none !important}
  .gt-page-case-vacanza-baia-verde .gt260-section-head {display:flex !important;flex-direction:column;align-items:flex-start;gap:8px}
  .gt-dimora .dimora-cover .dimora-strip {display:flex !important;overflow-x:auto;gap:6px;max-width:100%;min-width:0;scroll-snap-type:x proximity}
  .gt-dimora .dimora-strip > button {display:block !important; flex:0 0 38%;height:88px !important;scroll-snap-align:start}
  .gt-dimora .dimora-strip img {width:100%;height:100%;object-fit:cover}
  .svc-shop:has(.gmi-dock:not([hidden])) {padding-bottom:calc(90px + env(safe-area-inset-bottom)) !important}
  .svc-shop .gmi-dock:not([hidden]) {display:flex;align-items:center;justify-content:space-between;gap:12px;position:fixed;inset:auto 0 0;z-index:30;background:#fff;border-top:1px solid #bdcec5;padding:10px 16px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -4px 16px #173a2910}
  .svc-shop .gmi-dock a {min-height:44px;display:inline-flex;align-items:center;text-decoration:underline;color:#164e3e;font-weight:600}
  .svc-shop .gmi-service .gt248-media {max-width:80px}
}
.gmi-dock {display:none}
.svc-shop .gmi-service .gt254-service__row {display:flex !important;align-items:start;gap:12px;flex-wrap:wrap}
.svc-shop .gmi-service .gt254-service__row > label {flex:1 1 190px}
@media(max-width:600px) {
  .svc-shop .gmi-service .gt254-service__row > label {flex-basis:100%}
  .svc-shop .gmi-service .gt254-service__row .gmi-choice {margin-left:0}
}
body.svc-shop #gt254-app .svc-intro-links .svc-primary,
body.svc-shop main .svc-intro-links .svc-primary {display:none !important}
@media(max-width:760px) {
  html body.tour-page main#contenuto > section.tour-list-intro > img.tour-list-photo {display:none !important}
  body.gt-dimora main#contenuto.dimora .dimora-cover .dimora-strip {display:flex !important;grid-template-columns:none !important;overflow-x:auto !important}
  body.gt-dimora main#contenuto.dimora .dimora-cover .dimora-strip > button {min-width:38% !important; flex-shrink:0 !important}
  .gt27-main .gt27-intro .gt27-promise p {line-height:1.45}
}

/* Anteprime a pieno formato. Il visualizzatore conserva la foto intera. */
@layer gt-interni-foto {
  html body.gt-dimora main#contenuto .dimora-cover button.gallery-photo > img {
    object-fit:cover !important; object-position:50% 50% !important;
    width:100% !important; height:100% !important; max-width:none !important;
  }
}
html body.gt-dimora main#contenuto .dimora-cover button.gallery-photo > img {
  object-fit:cover !important;object-position:center !important;
}

/* Linguaggio visivo dei moduli: etichette leggibili, campi e stati coerenti. */
#gt-match, #gt254-form, .gt27-form {--form-ink:#193f36;--form-line:#a9bcb0;--form-accent:#205e4e}
#gt-match :is(select,input:not([type=checkbox],[type=hidden])),.gt27-form :is(select,input:not([type=checkbox],[type=file],[type=hidden])),#gt254-form :is(select,input[type=text],input[type=email],input[type=tel]) {
  border:1px solid var(--form-line) !important;background-color:#fffefa !important;color:var(--form-ink) !important;
  border-radius:8px !important;min-height:46px;font:inherit;box-sizing:border-box;
}
#gt-match select,.gt27-form select,#gt254-form select {
  appearance:none !important;padding-inline:12px 34px !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' stroke='%23205e4e' stroke-width='1.5'/%3E%3C/svg%3E") !important;
  background-position:right 12px center !important;background-repeat:no-repeat !important;background-size:16px !important;
}
:is(#gt-match,#gt254-form,.gt27-form) :is(input,select,button,summary):focus-visible {outline:3px solid #377f70 !important;outline-offset:3px}
#contenuto.gm-layout {max-width:1000px !important}
#contenuto.gm-layout .gm-intro {max-width:none !important;position:relative !important;overflow:hidden;background:#e8eee6;
  padding:clamp(20px,3vw,34px) !important;border-radius:12px;min-height:128px;isolation:isolate}
#contenuto.gm-layout .gm-intro img {display:block !important;position:absolute !important;inset:0 0 0 auto !important;width:35% !important;height:100% !important;object-fit:cover;border-radius:0 !important;margin:0 !important}
#contenuto.gm-layout .gm-intro :is(h1,p) {max-width:60% !important}
#contenuto.gm-layout .gm-intro h1 {margin:4px 0 8px !important}
#contenuto.gm-layout .gm-form {background:#fffefa !important;border:1px solid #cbd6cc !important;border-radius:12px !important;box-shadow:0 6px 24px #264d3e09 !important}
#gt-match fieldset {border:0}
#gt-match legend {color:#143d33 !important;font-size:1.55rem !important;letter-spacing:-.03em}
#gt-match .gmi-field-caption,#gt-match .gmi-count > label {display:block;color:#354b42;font-size:.92rem;font-weight:600;margin:0 0 7px}
#gt-match .gmi-party-options {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:6px 0 16px}
#gt-match .gmi-party-options button {display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;
  min-height:64px;width:auto;min-width:0;padding:7px 3px;border:1px solid #bdcabe;border-radius:8px;
  background:#fffefa;color:#274b3e;font:inherit;font-weight:600;font-size:.84rem;cursor:pointer}
#gt-match .gmi-party-options svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
#gt-match .gmi-party-options button[aria-pressed="true"],#gt-match .gm-checks label:has(input:checked) {background:#205746 !important;color:white !important;border-color:#205746 !important}
#gt-match .gmi-zone-row {display:block}
#gt-match label[hidden] {display:none !important}
#gt-match .gm-group-counts {display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:8px !important}
#gt-match .gmi-count-controls {display:grid;grid-template-columns:1fr .85fr 1fr;align-items:center;background:#f4f6ef;border:1px solid #bac8ba;border-radius:8px;overflow:hidden}
#gt-match .gmi-count-controls button {width:100%;height:44px;min-width:0;min-height:44px;background:transparent;color:#215144;border:0;border-radius:0;padding:0;cursor:pointer;font-size:1.25rem}
#gt-match .gmi-count-controls button:disabled {color:#909b93}
#gt-match .gmi-count-controls input[type=number] {appearance:textfield;min-width:0;width:100%;padding:0 !important;text-align:center;border:0 !important;border-radius:0 !important;background:transparent !important;min-height:40px !important;font-weight:650}
#gt-match .gmi-count-controls input::-webkit-inner-spin-button {appearance:none}
#gt-match .gm-checks input {width:1px;height:1px;position:absolute;opacity:0}
#gt-match .gm-checks label {position:relative;border:1px solid #b6c5b9 !important;border-radius:20px !important;padding:6px 14px !important;background:#f4f7f1;color:#274b3e}
#gt-match .gm-checks label:has(input:checked)::before {content:'✓';margin-right:4px}
#gt-match .stay-date-field > button {border-radius:8px !important;background:#fffefa !important}
#gt-match > button[type=submit] {justify-self:stretch;width:100%;min-height:48px !important;background:#194c3e !important;color:white !important;border-radius:8px !important}
@media(min-width:761px) {
  #gt-match fieldset + fieldset {border-left:1px solid #d5ded3;padding-left:28px}
}
@media(max-width:760px) {
  #contenuto.gm-layout .gm-intro {padding:17px !important}
  #contenuto.gm-layout .gm-intro img {width:28% !important}
  #contenuto.gm-layout .gm-intro :is(h1,p) {max-width:69% !important}
  #gt-match .gm-dates,.gm-layout #gt-match .gm-fields:not(.gmi-zone-row):has([name=style]) {grid-template-columns:1fr 1fr !important}
  #gt-match fieldset + fieldset {border-top:1px solid #d5ded3 !important;padding-top:12px}
  #gt-match .gm-group-counts {display:flex !important;flex-direction:column;gap:0 !important}
  #gt-match .gmi-count {display:flex;align-items:center;justify-content:space-between;padding:4px 0;border-bottom:1px solid #e4e9e0}
  #gt-match .gmi-count-controls {width:128px;grid-template-columns:44px 38px 44px}
  #gt-match .gmi-count > label {margin:0}
}
#gt-match .gmi-style-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#gt-match .gmi-style-options button {background:#fffefa;color:#2d4d42;border:1px solid #bdcabe;border-radius:8px;
  min-height:44px;padding:8px 11px;text-align:left;font:inherit;line-height:1.25;font-size:.92rem;cursor:pointer}
#gt-match .gmi-style-options button[aria-pressed="true"] {background:#e2eee6;color:#184d3c;border-color:#487861;box-shadow:inset 3px 0 #30634d;font-weight:650}
#gt-match .gmi-styles {margin-bottom:10px}
#gt-match .gm-fields:has(>label[hidden]:only-child) {display:none !important}
@layer gt-interni-foto {
  #gt-match .gm-checks label {border-radius:20px !important}
  #gt-match .gmi-count-controls input[type=number] {border:0 !important;background:transparent !important}
  body.tour-page #contenuto.gm-layout .gm-form {border-radius:12px !important}
  @media(max-width:760px) {
    html body.tour-page main#contenuto > section.tour-list-intro > img.tour-list-photo {display:none !important}
    body.svc-shop main .svc-intro-links .svc-primary {display:none !important}
  }
}

/* La foto originale della biancheria accompagna il titolo anche da telefono. */
@layer gt-interni-foto {
  body.svc-shop main section.svc-intro {display:grid !important;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) !important;align-items:center;gap:clamp(18px,4vw,48px)}
  body.svc-shop main section.svc-intro > img {display:block !important;visibility:visible !important;position:static !important;width:100% !important;height:auto !important;max-height:300px !important;aspect-ratio:1.75 !important;object-fit:cover !important;border-radius:8px}
  @media(max-width:700px) {
    body.svc-shop main section.svc-intro {grid-template-columns:minmax(0,1fr) !important;gap:14px}
    body.svc-shop main section.svc-intro > img {max-height:160px !important;aspect-ratio:2.5 !important}
  }
}
