/* GalaxyIDX front end. A guest in the host theme: type and ink are inherited, colours are derived
 * from the theme's own text colour, and only structure, rhythm and hierarchy are the plugin's.
 * Themes can opt in to a brand colour with --galaxyidx-accent (+ --galaxyidx-accent-ink),
 * --galaxyidx-surface, --galaxyidx-radius and --galaxyidx-display-font.
 * MLS rule: photos are object-fit: contain on a neutral wash, never cropped, nothing drawn over them. */

/* Ink is the inherited text colour (currentColor). Filled controls keep their text colour = ink and
 * paint the label with -webkit-text-fill-color, so the fill can stay currentColor. */
.gidx {
	--gidx-ink: currentColor;
	--gidx-muted: color-mix(in srgb, var(--gidx-ink) 74%, transparent);
	--gidx-line: color-mix(in srgb, var(--gidx-ink) 16%, transparent);
	--gidx-line-strong: color-mix(in srgb, var(--gidx-ink) 34%, transparent);
	--gidx-wash: color-mix(in srgb, var(--gidx-ink) 6%, transparent);
	--gidx-surface: var(--galaxyidx-surface, var(--wp--preset--color--base, var(--wp--preset--color--white, #fff)));
	--gidx-accent: var(--galaxyidx-accent, currentColor);
	--gidx-on-accent: var(--galaxyidx-accent-ink, var(--gidx-surface));
	--gidx-display: var(--galaxyidx-display-font, var(--wp--preset--font-family--display, var(--wp--preset--font-family--heading)));
	--gidx-r: var(--galaxyidx-radius, 4px);
	--gidx-pad: clamp(16px, 2.5vw, 24px);
	max-width: var(--wp--style--global--wide-size, 1240px);
	margin: 0 auto;
	padding: 24px var(--gidx-pad) 72px;
	box-sizing: border-box;
	font-size: inherit;
}
.gidx *, .gidx *::before, .gidx *::after { box-sizing: border-box; }
.gidx-main { display: block; }
.gidx [hidden] { display: none !important; }
.gidx-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.gidx .gidx-h1 { font-size: clamp(1.75rem, 1.15rem + 2vw, 2.75rem); line-height: 1.08; margin: 0; letter-spacing: -.01em; }
.gidx .gidx-h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem); line-height: 1.2; margin: 0 0 16px; }
.gidx-note { color: var(--gidx-muted); font-size: .9375em; margin: 10px 0 0; }
.gidx .gidx-link { color: inherit; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; display: inline-flex; align-items: center; min-height: 44px; }
.gidx .gidx-link:hover { text-decoration-thickness: 2px; }
.gidx :focus-visible { outline: 2px solid var(--gidx-ink); outline-offset: 3px; }

/* ---------- buttons: square-ish like the hosts' own, never pills ---------- */
.gidx .gidx-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; margin: 0; padding: 10px 20px; border: 1px solid var(--gidx-line-strong); border-radius: var(--gidx-r);
	background: transparent; color: inherit; font: inherit; font-weight: 600; line-height: 1.2; text-align: center;
	text-decoration: none; text-transform: none; letter-spacing: normal; cursor: pointer; box-shadow: none;
	transition: background-color .15s ease, border-color .15s ease;
}
.gidx .gidx-btn:hover { border-color: var(--gidx-ink); background: var(--gidx-wash); }
.gidx .gidx-btn--primary, .gidx-pager [aria-current], .gidx-chip input:checked + span {
	background: var(--gidx-accent); border-color: var(--gidx-accent); -webkit-text-fill-color: var(--gidx-on-accent);
}
.gidx .gidx-btn--primary:hover { background: color-mix(in srgb, var(--gidx-accent) 84%, var(--gidx-on-accent)); border-color: var(--gidx-accent); }
.gidx .gidx-btn--quiet { border-color: transparent; font-weight: 500; padding-inline: 10px; }
.gidx .gidx-btn--quiet:hover { border-color: transparent; }
.gidx .gidx-btn--block { width: 100%; }
.gidx .gidx-btn[disabled] { opacity: .6; cursor: progress; }
.gidx .gidx-btn[aria-pressed="true"] { font-weight: 600; }
.gidx-heart { font-size: 1.15em; line-height: 1; }

/* ---------- status: sentence-case text with a dot, always outside the photo ---------- */
.gidx-badge { display: inline-flex; align-items: center; gap: .45em; font-size: .875em; font-weight: 500; line-height: 1.3; color: var(--gidx-muted); white-space: nowrap; }
.gidx-badge::before { content: ""; flex: none; width: .55em; height: .55em; border-radius: 50%; background: #2e8b57; }
.gidx-badge--uc::before { background: #d08a12; }
.gidx-badge--other::before { background: var(--gidx-line-strong); }

/* ---------- fields ---------- */
.gidx-field { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.gidx-field label, .gidx-sort label { font-size: .8125em; font-weight: 600; color: var(--gidx-muted); }
.gidx select, .gidx input[type="text"], .gidx input[type="email"], .gidx input[type="tel"], .gidx input[type="number"], .gidx textarea {
	width: 100%; min-height: 48px; margin: 0; padding: 10px 12px; border: 1px solid var(--gidx-line-strong); border-radius: var(--gidx-r);
	background-color: var(--gidx-surface); color: var(--gidx-ink); font: inherit; font-size: max(16px, .9375em); line-height: 1.3; box-shadow: none;
}
.gidx select {
	appearance: none; padding-right: 36px; cursor: pointer; text-overflow: ellipsis;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.gidx select:hover, .gidx input:hover, .gidx textarea:hover { border-color: var(--gidx-ink); }

/* ---------- search ---------- */
.gidx-search__head { margin: 8px 0 24px; }
.gidx-filters { margin: 0 0 28px; padding: 20px 0 8px; border-top: 1px solid var(--gidx-line); border-bottom: 1px solid var(--gidx-line); }
.gidx-filters__main { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; align-items: end; }
.gidx-field--actions { justify-content: flex-end; }
.gidx-filters__foot { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 24px; margin-top: 4px; }
.gidx-filters__more { flex: 1 1 auto; }
.gidx-filters__more > summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; list-style: none; }
.gidx-filters__more > summary::-webkit-details-marker { display: none; }
.gidx-filters__more > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s ease; }
.gidx-filters__more[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.gidx-filters__extra { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 220px)); gap: 12px; padding: 4px 0 12px; }
.gidx-results__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin: 0 0 24px; }
.gidx-count { margin: 0; font-weight: 600; font-variant-numeric: lining-nums; }
.gidx-count__page { font-weight: 400; color: var(--gidx-muted); }
.gidx-sort { display: flex; align-items: center; gap: 10px; }
.gidx .gidx-sort select { width: auto; min-width: 200px; }
.gidx-empty { max-width: 40em; padding: 32px 0 8px; }
.gidx-empty p { margin: 0 0 16px; }
@media (max-width: 599px) {
	.gidx-filters__main { grid-template-columns: 1fr 1fr; }
	.gidx-field--actions { grid-column: 1 / -1; }
	.gidx-field--actions:nth-child(even) { grid-column: auto; } /* sits beside an odd last field */
	.gidx-field--actions .gidx-btn { width: 100%; }
	.gidx-sort { flex: 1 1 100%; }
	.gidx .gidx-sort select { flex: 1; min-width: 0; }
}

/* ---------- cards: no box; the photo and the type carry them ---------- */
.gidx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 264px), 1fr)); gap: 44px 28px; }
.gidx-grid--strip { grid-template-columns: 1fr; }
@media (min-width: 600px) { .gidx-grid--strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .gidx-grid--strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gidx-card { display: flex; flex-direction: column; min-width: 0; margin: 0; }
.gidx .gidx-card__link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; border-radius: var(--gidx-r); }
.gidx-card__media { aspect-ratio: 3 / 2; display: grid; place-items: center; overflow: hidden; border-radius: var(--gidx-r); background: var(--gidx-wash); }
.gidx .gidx-card__media img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; border: 0; border-radius: 0; object-fit: contain !important; }
.gidx-card__nophoto { color: var(--gidx-muted); font-size: .9375em; }
.gidx-card__body { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; }
.gidx .gidx-card__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin: 0; }
.gidx-card__price, .gidx-detail__price, .gidx-actions__price, .gidx-payment__total, .gidx-facts__v {
	font-family: var(--gidx-display); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.005em;
}
.gidx-card__price { font-size: 1.5em; line-height: 1.1; }
.gidx .gidx-card__facts { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 0; padding: 0; list-style: none; font-variant-numeric: lining-nums tabular-nums; }
.gidx .gidx-card__facts li { margin: 0; padding: 0; white-space: nowrap; }
.gidx-card__facts b { font-weight: 650; }
.gidx .gidx-card__title { margin: 4px 0 0; font: inherit; font-weight: 600; line-height: 1.3; letter-spacing: normal; text-transform: none; }
.gidx .gidx-card__loc { margin: 0; color: var(--gidx-muted); }
.gidx-card__link:hover .gidx-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.gidx .gidx-card__link:focus-visible { outline-offset: 6px; }
/* Attribution: the listing firm, at the size of the site's body text (never smaller). */
.gidx .gidx-attribution { margin: 0; padding: 0; font-size: 1em; line-height: 1.45; color: color-mix(in srgb, var(--gidx-ink) 84%, transparent); }
.gidx .gidx-card > .gidx-attribution { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--gidx-line); }
.gidx-attribution a { color: inherit; }

/* ---------- strip ---------- */
.gidx-strip { padding-top: clamp(40px, 6vw, 72px); }
.gidx-strip__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 24px; margin: 0 0 20px; }
.gidx .gidx-strip__head .gidx-h2 { margin: 0; }
.gidx-strip__more { margin: 20px 0 0; }

/* ---------- pager ---------- */
.gidx-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 56px 0 0; }
.gidx-pager__pages { display: flex; gap: 4px; }
.gidx-pager a, .gidx-pager [aria-current], .gidx-pager__gap {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px;
	border-radius: var(--gidx-r); color: inherit; text-decoration: none; font-variant-numeric: lining-nums tabular-nums;
}
.gidx-pager a:hover { background: var(--gidx-wash); }
.gidx-pager [aria-current] { font-weight: 600; }
.gidx .gidx-pager__step { border: 1px solid var(--gidx-line-strong); font-weight: 600; }

/* ---------- detail ---------- */
.gidx-crumbs { margin: 0 0 8px; font-size: .875em; color: var(--gidx-muted); }
.gidx-crumbs a { display: inline-block; padding: 10px 0; color: inherit; }

/* Gallery. Phones: one photo per swipe. Desktop, 5+ photos: a 1 + 4 mosaic of 3:2 cells, so the
 * photos fill the width with almost no letterboxing. Prev/next and the counter sit in the bar
 * BELOW the photos: nothing is drawn over an MLS photo. */
.gidx-gallery { margin: 0 calc(-1 * var(--gidx-pad)) 28px; }
.gidx-gallery--empty { aspect-ratio: 3 / 1; display: flex; align-items: center; justify-content: center; margin-inline: 0; border-radius: var(--gidx-r); background: var(--gidx-wash); color: var(--gidx-muted); }
.gidx-gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; background: var(--gidx-wash); }
.gidx-gallery__track::-webkit-scrollbar { display: none; }
.gidx-gallery__slide { flex: 0 0 100%; display: flex; margin: 0; aspect-ratio: 3 / 2; max-height: 72vh; scroll-snap-align: start; background: var(--gidx-wash); }
.gidx .gidx-gallery__open { all: unset; display: flex; width: 100%; height: 100%; cursor: zoom-in; }
.gidx .gidx-gallery__open:focus-visible { outline: 2px solid var(--gidx-ink); outline-offset: -2px; }
.gidx .gidx-gallery__slide img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 0; object-fit: contain !important; }
.gidx .gidx-gallery__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px var(--gidx-pad) 0; font-size: .9375em; }
.gidx-gallery__ctrl { display: inline-flex; align-items: center; gap: 12px; font-variant-numeric: lining-nums tabular-nums; }
.gidx .gidx-gallery__nav, .gidx .gidx-gallery__all {
	position: static; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 0; padding: 0 14px;
	border: 1px solid var(--gidx-line-strong); border-radius: var(--gidx-r); background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer;
}
.gidx .gidx-gallery__nav { padding: 0; font-size: 1.5em; line-height: 1; }
.gidx .gidx-gallery__all { margin-left: auto; }
.gidx .gidx-gallery__nav:hover, .gidx .gidx-gallery__all:hover { border-color: var(--gidx-ink); background: var(--gidx-wash); }
@media (max-width: 640px) { .gidx .gidx-gallery__nav { display: none; } }
@media (min-width: 900px) {
	.gidx-gallery { margin: 8px 0 36px; }
	.gidx-gallery__track { border-radius: calc(var(--gidx-r) * 1.5); }
	.gidx .gidx-gallery__bar { padding: 12px 0 0; }
	.gidx-gallery__track:has(> :nth-child(5)) {
		display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 6px; overflow: hidden; scroll-snap-type: none; background: transparent;
	}
	.gidx-gallery__track:has(> :nth-child(5)) > .gidx-gallery__slide { max-height: none; }
	.gidx-gallery__track:has(> :nth-child(5)) > .gidx-gallery__slide:first-child { grid-row: span 2; aspect-ratio: auto; }
	.gidx-gallery__track:has(> :nth-child(5)) > .gidx-gallery__slide:nth-child(n+6) { display: none; }
	.gidx-gallery:has(.gidx-gallery__track > :nth-child(5)) .gidx-gallery__ctrl { display: none; }
}

/* Full-screen viewer: black for photos; controls in bars above and below the track. */
.gidx-viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; }
.gidx-viewer::backdrop { background: #000; }
.gidx-viewer__top { height: 64px; display: flex; align-items: center; justify-content: flex-end; padding: 0 16px; }
.gidx-viewer__track { display: flex; height: calc(100% - 128px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gidx-viewer__track::-webkit-scrollbar { display: none; }
.gidx-viewer__slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; margin: 0; scroll-snap-align: start; }
.gidx .gidx-viewer__slide img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain !important; }
.gidx-viewer__bar { height: 64px; display: flex; align-items: center; justify-content: center; gap: 20px; margin: 0; font-variant-numeric: lining-nums tabular-nums; }
.gidx .gidx-viewer__nav, .gidx .gidx-viewer__close {
	position: static; flex: 0 0 auto; width: 48px; height: 48px; margin: 0; padding: 0; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--gidx-r);
	background: transparent; color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
}
.gidx .gidx-viewer__nav:hover, .gidx .gidx-viewer__close:hover { border-color: #fff; }
.gidx-viewer :focus-visible { outline-color: #fff; }

.gidx-detail__grid { display: grid; gap: 48px; }
@media (min-width: 960px) {
	.gidx-detail__grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; }
	.gidx .gidx-detail__price { display: none; } /* the side panel carries it on wide screens */
}
.gidx-detail__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; }
.gidx-detail__id { min-width: 0; }
.gidx-detail__head .gidx-badge { margin-bottom: 10px; }
.gidx .gidx-detail__loc { margin: 6px 0 0; color: var(--gidx-muted); font-size: 1.0625em; }
.gidx .gidx-detail__price { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.05; }
.gidx .gidx-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 28px 0 0; padding: 18px 0; list-style: none; border-top: 1px solid var(--gidx-line); border-bottom: 1px solid var(--gidx-line); }
.gidx .gidx-facts li { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin: 0; padding: 0 16px; border-left: 1px solid var(--gidx-line); }
.gidx .gidx-facts li:first-child { padding-left: 0; border-left: 0; }
.gidx-facts__v { font-size: 1.5em; line-height: 1.15; }
.gidx-facts__k { font-size: .875em; color: var(--gidx-muted); }
@media (max-width: 599px) {
	.gidx .gidx-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 16px; }
	.gidx .gidx-facts li:nth-child(3n+1) { padding-left: 0; border-left: 0; }
}
.gidx-detail .gidx-attribution { margin-top: 16px; }
.gidx-section { margin-top: 56px; }
.gidx-remarks p { max-width: 68ch; margin: 0 0 1em; line-height: 1.7; }
.gidx-features { columns: 2 300px; column-gap: 48px; }
.gidx-features__group { break-inside: avoid; margin: 0 0 28px; }
.gidx .gidx-features h3 { margin: 0 0 4px; font: inherit; font-weight: 600; letter-spacing: normal; text-transform: none; }
.gidx-features dl, .gidx-payment__rows { margin: 0; }
.gidx-features dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--gidx-line); }
.gidx-payment__rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--gidx-line); }
.gidx-features dt, .gidx-payment__rows dt { color: var(--gidx-muted); }
.gidx-features dd, .gidx-payment__rows dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.gidx-payment__rows dd { text-align: right; font-variant-numeric: lining-nums tabular-nums; }
.gidx-vtour { margin-bottom: 0; }
.gidx-history table { width: 100%; border-collapse: collapse; font-variant-numeric: lining-nums tabular-nums; }
.gidx-history th, .gidx-history td { padding: 9px 8px 9px 0; text-align: left; border-bottom: 1px solid var(--gidx-line); }
.gidx-payment { padding: 24px; border: 1px solid var(--gidx-line-strong); border-radius: var(--gidx-r); }
.gidx-payment .gidx-h2 { font-size: 1.25em; }
.gidx .gidx-payment__total { margin: 0 0 8px; font-size: 2em; line-height: 1.1; }
.gidx-payment__label { font-size: .5em; font-weight: 500; color: var(--gidx-muted); }
.gidx-payment__down { flex-direction: row; align-items: center; gap: 10px; margin-top: 14px; }
.gidx .gidx-payment__down input { max-width: 100px; }
.gidx-map__addr { margin: 0 0 14px; color: var(--gidx-muted); }
.gidx-map__frame { display: flex; flex-wrap: wrap; gap: 10px; }
.gidx-map__frame:has(iframe) { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--gidx-r); background: var(--gidx-wash); }
.gidx-map__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.gidx-map__after { margin: 10px 0 0; }

/* Side panel: a rule in the theme's ink, not a floating white card. */
.gidx-actions { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 3px solid var(--gidx-ink); }
.gidx .gidx-actions__price { margin: 0; font-size: 2em; line-height: 1.05; }
.gidx .gidx-actions__addr { margin: 0 0 10px; color: var(--gidx-muted); }
.gidx-actions__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--gidx-line); }
.gidx .gidx-call { flex-wrap: wrap; column-gap: .35em; row-gap: 0; }
.gidx-phone { font-weight: 400; font-variant-numeric: lining-nums; white-space: nowrap; }
.gidx-actions .gidx-note { margin-top: 4px; font-size: .875em; }

.gidx-nearby { margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--gidx-line); }
.gidx-handoff { margin: 32px 0 0; }
.gidx .gidx-handoff a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: .22em; }
.gidx-gone { padding-top: 72px; padding-bottom: 96px; text-align: center; }
.gidx-gone p { margin: 16px 0 0; }

/* ---------- compliance: readable, not fine print ---------- */
.gidx-compliance { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 20px; align-items: start; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--gidx-line); color: var(--gidx-muted); font-size: .875em; line-height: 1.55; }
.gidx .gidx-compliance__logo { display: block; height: 40px; width: auto; max-width: none; margin: 0; object-fit: contain !important; }
.gidx-compliance p { margin: 0 0 4px; max-width: 80ch; }
@media (max-width: 599px) { .gidx-compliance { grid-template-columns: 1fr; } }

/* ---------- lead dialog (bottom sheet on phones) ---------- */
.gidx-dialog { width: min(540px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: calc(var(--gidx-r) * 2); background: var(--gidx-surface); color: var(--gidx-ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .28); }
.gidx-dialog::backdrop { background: rgba(10, 14, 12, .55); }
.gidx-form, .gidx-dialog__done { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.gidx-dialog .gidx-h2 { margin: 0; padding-right: 48px; font-family: var(--gidx-display); }
.gidx-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.gidx-form legend { margin-bottom: 10px; padding: 0; font-weight: 600; }
.gidx-form__intro { margin: -6px 0 4px; color: var(--gidx-muted); }
.gidx-form__row { display: flex; flex-direction: column; gap: 6px; }
.gidx-form__row label { font-size: .9375em; font-weight: 600; }
.gidx-form__row label span { font-weight: 400; color: var(--gidx-muted); }
.gidx-form [aria-invalid="true"] { border-color: #b42318; box-shadow: 0 0 0 1px #b42318; }
.gidx-form__error { margin: 0; color: #b42318; font-weight: 600; }
.gidx .gidx-dialog__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--gidx-line); border-radius: var(--gidx-r); background: transparent; color: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.gidx .gidx-dialog__close:hover { background: var(--gidx-wash); }
.gidx-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.gidx-chips--parts { margin-top: 8px; }
@media (min-width: 600px) {
	.gidx-chips:not(.gidx-chips--parts) { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; overflow: visible; }
	.gidx-chips:not(.gidx-chips--parts) .gidx-chip span { min-width: 0; width: 100%; padding-inline: 4px; }
}
.gidx-chip { position: relative; flex: 0 0 auto; }
.gidx-chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.gidx-chip span { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 62px; min-height: 56px; padding: 6px 12px; border: 1px solid var(--gidx-line-strong); border-radius: var(--gidx-r); font-size: .9375em; line-height: 1.2; font-variant-numeric: lining-nums; }
.gidx-chip span b { font-weight: 600; }
.gidx-chips--parts .gidx-chip span { flex-direction: row; min-height: 44px; }
.gidx-chip input:hover + span { border-color: var(--gidx-ink); }
.gidx-chip input:checked + span { font-weight: 600; }
.gidx-chip input:focus-visible + span { outline: 2px solid var(--gidx-ink); outline-offset: 2px; }
.gidx-check { display: flex; gap: 10px; align-items: flex-start; font-size: .9375em; cursor: pointer; }
.gidx-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gidx-accent); }
.gidx-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 599px) {
	.gidx-dialog { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: calc(var(--gidx-r) * 3) calc(var(--gidx-r) * 3) 0 0; }
	.gidx-form, .gidx-dialog__done { padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
}

/* ---------- sticky mobile action bar ---------- */
.gidx-sticky { display: none; }
@media (max-width: 959px) {
	.gidx-detail { padding-bottom: 104px; }
	.gidx-sticky {
		display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--gidx-surface); border-top: 1px solid var(--gidx-line);
		box-shadow: 0 -8px 24px rgba(0, 0, 0, .08);
	}
	.gidx .gidx-sticky .gidx-btn { flex: 1 1 0; min-width: 0; padding-inline: 8px; }
	.gidx .gidx-sticky .gidx-btn--primary { flex-grow: 1.6; }
	.gidx-actions { position: static; }
}

@media (prefers-reduced-motion: reduce) {
	.gidx *, .gidx *::before, .gidx *::after { transition: none !important; scroll-behavior: auto !important; }
}
