/* El Gresol — registre d'hostes (prototip «Registre d'hostes»). Només tokens. */
.h-page { display: flex; flex-direction: column; gap: var(--space-3); }
.h-page .h-grid2 { margin-top: var(--space-4); grid-template-columns: minmax(0, 1fr) 400px; gap: var(--space-8); }
.h-tit { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1.15; color: var(--ink); }
.h-eyb { margin: 0; font-family: var(--font-sans); font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-3); }
.h-box { display: flex; flex-direction: column; gap: var(--space-5); padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.h-narrow { max-width: 320px; }
.h-page a:focus-visible, .h-page button:focus-visible, .h-page summary:focus-visible, .h-modal :is(a, button):focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

/* ── Capçalera fosca ── */
.h-top { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: clamp(22px, 3vw, 30px); border-radius: 24px; background: var(--olive); color: var(--on-dark); }
.h-top__t { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.h-top__eyb { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; line-height: 1.5; color: rgba(246, 244, 238, .7); }
.h-top__h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(32px, 4vw, 44px); line-height: 1.05; color: var(--surface); }
.h-top__meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 17px; color: rgba(246, 244, 238, .9); }
.h-top__meta span { display: inline-flex; align-items: center; gap: 7px; }
.h-house { flex: none; display: block; width: 128px; height: 92px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: rgba(246, 244, 238, .12); box-shadow: 0 0 0 1px rgba(246, 244, 238, .22); }
.h-house__img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.h-house:focus-visible { outline: 2px solid var(--on-dark) !important; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .h-house:hover .h-house__img { transform: scale(1.06); } }
.h-prog { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding-top: 20px; border-top: 1px solid rgba(246, 244, 238, .14); }
.h-prog__l { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.h-prog__t { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 14.5px; color: var(--on-dark); }
.h-pips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.h-pip { position: relative; width: 46px; height: 46px; box-sizing: border-box; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; font: 800 14.5px var(--font-sans); color: var(--on-dark); text-decoration: none; transition: transform var(--dur-fast), box-shadow var(--dur-fast); }
.h-pip.is-done { background: var(--on-dark); color: var(--olive); }
.h-ring { position: absolute; inset: 0; border-radius: inherit; border: 1.5px dashed rgba(246, 244, 238, .6); pointer-events: none; }
.h-pip:focus-visible { outline: 2px solid var(--on-dark) !important; }
/* La targeta del cercle per sobre de tot (la llista i el lateral van després i també estan posicionats) */
.h-top { position: relative; z-index: 2; }
.h-pip:hover, .h-pip:focus-visible { z-index: 3; }
@media (hover: hover) {
	a.h-pip:hover { transform: translateY(-2px); box-shadow: 0 0 0 3px rgba(246, 244, 238, .35); }
	a.h-pip:hover .h-ring { border-color: rgba(246, 244, 238, .95); }
}
@media (prefers-reduced-motion: no-preference) {
	.h-ring { animation: h-spin 14s linear infinite; }
	a.h-pip:hover .h-ring { animation-duration: 5s; }
}
@keyframes h-spin { to { transform: rotate(360deg); } }
/* Targeta en passar per sobre d'un cercle */
.h-piptip { position: absolute; top: calc(100% + 12px); left: 50%; z-index: var(--z-menu); width: max-content; min-width: 180px; max-width: 240px; box-sizing: border-box; padding: 12px 14px; border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; box-shadow: var(--shadow-lg); font: 500 12.5px/1.45 var(--font-sans); display: flex; flex-direction: column; gap: 3px; opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity var(--dur-fast), transform var(--dur-fast), visibility var(--dur-fast); pointer-events: none; }
.h-piptip::before { content: ""; position: absolute; top: -6px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-bottom-color: var(--surface); border-top: 0; }
.h-pip:hover .h-piptip, .h-pip:focus-visible .h-piptip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.h-piptip b { font-size: 14px; font-weight: 800; }
.h-piptip .r { color: var(--ink-3); }
.h-piptip .st { margin-top: 4px; display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--warning); }
.h-piptip .st::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--warning-strong); }
.h-piptip .st[data-ok="true"] { color: var(--success); }
.h-piptip .st[data-ok="true"]::before { background: var(--success-strong); }
.h-piptip .h { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--surface-sunken); color: var(--ink-3); font-size: 12px; }
@media (hover: none) { .h-piptip { display: none; } }
.h-share { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid rgba(246, 244, 238, .45); border-radius: var(--radius-pill); color: var(--on-dark); text-decoration: none; font: 700 13.5px var(--font-sans); transition: background-color var(--dur-fast), border-color var(--dur-fast); }
.h-share:hover { background: rgba(246, 244, 238, .1); border-color: var(--on-dark); color: var(--on-dark); }
.h-share:focus-visible { outline-color: var(--on-dark) !important; }

/* Ajudes que surten en passar per sobre (només amb ratolí) */
.h-tipwrap { position: relative; display: inline-flex; }
.h-tipbox { position: absolute; right: 0; bottom: calc(100% + 10px); z-index: var(--z-menu); width: 280px; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); font: 500 12.5px/1.45 var(--font-sans); color: var(--ink); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity var(--dur-fast), transform var(--dur-fast), visibility var(--dur-fast); pointer-events: none; }
.h-tipbox--c { left: 50%; right: auto; width: 300px; margin-left: -150px; }
@media (hover: hover) { .h-tipwrap:hover .h-tipbox, .h-tipwrap:focus-within .h-tipbox { opacity: 1; visibility: visible; transform: none; } }
.h-tipbox .h-dib { display: block; width: 100%; height: auto; margin-bottom: 8px; }
.h-tipbox__m { display: block; margin-top: 4px; color: var(--ink-3); font-weight: 600; }

/* ── Llista d'hostes ── */
.h-list { display: flex; flex-direction: column; gap: 12px; }
.h-list .h-tit { margin-top: 4px; }
.h-rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.h-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; }
.h-row.is-done { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(44, 41, 37, .06); }
.h-row.is-todo { background: transparent; border: 1.5px dashed var(--ink-4); }
.h-dot { position: relative; flex: none; width: 34px; height: 34px; box-sizing: border-box; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
.is-done .h-dot { background: var(--success-soft); color: var(--success-strong); }
.is-todo .h-dot { border: 1.5px dashed var(--ink-4); color: var(--ink-3); }
.h-row__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.h-row__n { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.h-row__t strong { font-size: 16px; color: var(--ink); }
.h-row__t > span:last-child { font-size: 13.5px; color: var(--ink-3); }
.is-todo .h-row__t strong { font-weight: 600; color: var(--ink-3); }
.is-todo .h-row__t > span:last-child { font-style: italic; color: var(--ink-3); }
.h-fill { flex: none; min-height: 44px; padding: 0 16px; font-size: 13.5px; }
/* Tota la fila pendent és clicable (l'enllaç «Omple les dades» la cobreix) */
.h-row.is-link .h-fill::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
/* El botó cobreix tota la fila: si es mogués en passar-hi per sobre, la fila faria pampallugues */
.h-row.is-link .h-fill, .h-row.is-link .h-fill:hover { transform: none !important; }
.h-row.is-link .h-fill { position: static; }
.h-row.is-link { transition: border-color var(--dur-base) ease, background-color var(--dur-base) ease, box-shadow var(--dur-base) ease; }
/* Hover tranquil: sense moure la fila ni reflexos (feien pampallugues en passar el ratolí per la llista) */
@media (hover: hover) {
	.h-row.is-link:hover { background: var(--surface); border-color: var(--ink-3); box-shadow: 0 6px 18px -12px rgba(44, 41, 37, .35); }
	.h-row.is-link:hover .h-row__t strong { color: var(--ink-2); }
	.h-row.is-link:hover .h-dot { border-color: var(--ink-3); color: var(--ink-2); }
}
@media (prefers-reduced-motion: reduce) { .h-row.is-link { transition: none; } }
/* Icones de modificar i esborrar, amb el nom de l'acció en passar-hi per sobre */
.h-acts { flex: none; display: flex; align-items: center; gap: 8px; }
.h-ico { position: relative; width: 44px; height: 44px; box-sizing: border-box; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; list-style: none; transition: background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); }
.h-ico::-webkit-details-marker { display: none; }
.h-ico:hover { background: var(--olive-soft); border-color: var(--olive); color: var(--ink); }
.h-ico--del:hover { background: var(--terra-soft); border-color: var(--terra); color: var(--terra-hover); }
.h-del { display: contents; }
.h-del[open] > summary, .h-acts:has(.h-del[open]) > .h-ico { display: none; }
.h-del__f { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--terra-hover); }
.h-yes, .h-no { min-height: 44px; padding: 0 16px; border-radius: var(--radius-pill); font: 700 13.5px var(--font-sans); cursor: pointer; }
.h-yes { border: 0; background: var(--terra); color: var(--surface); }
.h-yes:hover { background: var(--terra-hover); }
.h-no { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.h-no:hover { background: var(--olive-soft); }
/* «Hoste addicional» */
.h-xchip { position: relative; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--radius-pill); background: var(--success-soft); color: var(--success); font: 800 11.5px var(--font-sans); letter-spacing: .3px; text-transform: none; cursor: help; outline: none; }
.h-xchip[data-tip]::after { width: 240px; padding: 9px 11px; border-radius: 10px; font: 500 12.5px/1.45 var(--font-sans); white-space: normal; text-align: left; letter-spacing: 0; }
.h-xchip:focus-visible { box-shadow: 0 0 0 2px var(--success-strong); }
.h-addw { display: block; }
.h-add { width: 100%; min-height: 56px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1.5px dashed var(--ink-4); border-radius: 16px; color: var(--ink-2); text-decoration: none; font: 700 14.5px var(--font-sans); transition: border-color .25s, background-color .25s, color .25s; }
.h-add:hover { border-color: var(--ink-3); background: rgba(239, 234, 225, .6); color: var(--ink); }

/* Registre complet i enviat */
.h-done { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 26px 24px 22px; border: 1px solid var(--success-soft); border-radius: 20px; background: linear-gradient(135deg, var(--success-soft) 0%, var(--surface) 70%); }
.h-done p { margin: 0; font-size: 15.5px; line-height: 1.6; }
.h-done strong { color: var(--ink); }
.h-done .gr-btn { align-self: flex-start; }
.h-done__head { display: flex; align-items: center; gap: 14px; }
.h-done__ico { flex: none; width: 52px; height: 52px; border-radius: var(--radius-pill); background: var(--success-strong); color: var(--surface); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px var(--success-soft); }
.h-done__k { font: 800 12.5px var(--font-sans) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--success-strong); }
.h-done__t { margin-top: 2px !important; font-family: var(--font-display); font-size: 28px !important; line-height: 1.15 !important; color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
	.h-done.is-new .h-done__ico { animation: h-pop .55s cubic-bezier(.34, 1.56, .64, 1) both; }
	.h-done.is-new .h-done__path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: h-draw .45s .35s ease-out forwards; }
	.h-conf { position: absolute; inset: 0; pointer-events: none; }
	.h-conf i { position: absolute; top: -10px; width: 7px; height: 11px; border-radius: 2px; opacity: 0; animation: h-fall 1.6s ease-out .2s forwards; }
	.h-conf i:nth-child(1) { left: 8%; background: var(--success-strong); animation-delay: .15s; }
	.h-conf i:nth-child(2) { left: 20%; background: var(--warning-strong); animation-delay: .3s; }
	.h-conf i:nth-child(3) { left: 33%; background: var(--sage); animation-delay: .05s; }
	.h-conf i:nth-child(4) { left: 47%; background: var(--terra); animation-delay: .4s; }
	.h-conf i:nth-child(5) { left: 60%; background: var(--success-strong); animation-delay: .2s; }
	.h-conf i:nth-child(6) { left: 72%; background: var(--warning); animation-delay: .35s; }
	.h-conf i:nth-child(7) { left: 84%; background: var(--sage); animation-delay: .1s; }
	.h-conf i:nth-child(8) { left: 93%; background: var(--terra); animation-delay: .45s; }
}
.h-conf { display: none; }
@media (prefers-reduced-motion: no-preference) { .h-conf { display: block; } }
@keyframes h-pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes h-draw { to { stroke-dashoffset: 0; } }
@keyframes h-fall { 0% { opacity: 0; transform: translateY(0) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(150px) rotate(320deg); } }
.h-sent { gap: 12px; padding: 22px 24px; }
.h-sent p { margin: 0; font-size: 15.5px; line-height: 1.6; }
.h-sent .gr-btn { align-self: flex-start; }
.h-sent__t { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px !important; color: var(--ink); }
.h-sent__t > span { flex: none; width: 32px; height: 32px; border-radius: var(--radius-pill); background: var(--success-soft); color: var(--success-strong); display: flex; align-items: center; justify-content: center; }

/* ── Fitxa d'un hoste ── */
.h-form-card { gap: 24px; }
.h-fhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.h-fhead__l { display: flex; align-items: center; gap: 16px; min-width: 0; }
.h-fhead__l > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.h-kick { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-3); }
.h-ava { position: relative; flex: none; width: 56px; height: 56px; box-sizing: border-box; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; background: var(--surface-sunken); color: var(--ink-4); border: 1.5px dashed var(--line-strong); overflow: hidden; }
.h-ava__ini { display: none; }
.h-ava.has-ini { border: 0; background: var(--olive); }
.h-ava.has-ini svg { display: none; }
.h-ava.has-ini .h-ava__ini { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--on-dark); font: 800 19px var(--font-sans); letter-spacing: .5px; }
@media (prefers-reduced-motion: no-preference) { .h-ava.is-pop .h-ava__ini { animation: h-ava-pop .45s cubic-bezier(.2, 1.5, .4, 1) both; } }
@keyframes h-ava-pop { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.h-back { flex: none; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.h-back:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.h-back[data-tip]::after { white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) { .h-back svg { transition: transform var(--dur-fast) var(--ease-out); } .h-back:hover svg { transform: translateX(-2px); } }
.h-note { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--paper); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.h-note svg { flex: none; margin-top: 1px; }
.h-note--ok { background: var(--success-soft); color: var(--ink-2); }
.h-note--ok svg { color: var(--success-strong); }
.h-note strong { color: var(--ink); }
.h-form { display: flex; flex-direction: column; gap: 28px; }
.h-fs { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.h-fs[hidden], .h-form [data-show][hidden] { display: none !important; }
.h-legend { padding: 0; margin-bottom: 14px; font-size: 15px; font-weight: 800; color: var(--ink); }
.h-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.h-g--3 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.h-half { max-width: calc(50% - 8px); min-width: min(260px, 100%); }
.h-f { min-width: 0; }
.h-lb { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.h-lbrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.h-lbrow .h-lb { margin: 0; }
.h-fld { position: relative; display: block; }
.h-fld > .gr-input { padding-right: 42px; }
.h-form .gr-input, .h-form .gr-select { font-size: 16px; }
.h-ok { position: absolute; right: 12px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: var(--radius-pill); background: var(--success-soft); color: var(--success-strong); display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; transform: scale(.5); transition: opacity .18s, transform .18s cubic-bezier(.2, 1.4, .4, 1); }
.h-sel .gr-select { padding-right: 76px; }
.h-sel .h-ok { right: 42px; }
.h-ok--s { position: static; margin: 0; }
.is-ok .h-ok { opacity: 1; transform: scale(1); }
.is-ok .gr-input:not(:focus), .is-ok .gr-select:not(:focus) { border-color: var(--success-strong); }
@media (prefers-reduced-motion: reduce) { .h-ok { transition: none; } }
.h-err { margin: 6px 0 0; display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; line-height: 1.4; font-weight: 600; color: var(--danger); }
.h-err[hidden] { display: none; }
.h-err svg { flex: none; margin-top: 1px; }
.h-hint { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }
.h-birth { display: grid; grid-template-columns: 64px 64px 88px 24px; gap: 8px; align-items: center; }
.h-birth .gr-input { text-align: center; padding: 0 6px; }
.h-info { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px 0 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--olive); font: 700 12.5px var(--font-sans); cursor: pointer; position: relative; }
.h-info::before { content: ""; position: absolute; inset: -6px 0; }
.h-info:hover { background: var(--olive-soft); border-color: var(--olive); }
.h-tipbox--up { bottom: calc(100% + 10px); }
.h-same { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; font-size: 15px; color: var(--ink); cursor: pointer; }
.h-same input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--olive); }
.h-same__m { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.h-muted { font-size: 13px; color: var(--ink-3); }
.h-priv { margin: 0; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--paper); font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.h-priv > span:first-child { flex: none; width: 32px; height: 32px; border-radius: var(--radius-pill); background: var(--success-soft); color: var(--success-strong); display: flex; align-items: center; justify-content: center; }
.h-alert { margin: 0; padding: 12px 14px; border: 1px solid var(--warning-line); border-radius: 12px; background: var(--warning-soft); font-size: 14px; line-height: 1.5; color: var(--ink); }
.h-alert[hidden] { display: none; }
.h-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.h-next { border-color: var(--olive); }
.h-cancel { min-height: 50px; display: inline-flex; align-items: center; padding: 0 10px; color: var(--ink-2); font: 700 15px var(--font-sans); text-decoration: none; }
.h-cancel:hover { text-decoration: underline; text-underline-offset: 3px; }
.h-shake { animation: h-shake .5s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes h-shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-5px); } 40%, 60% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .h-shake { animation: none; } }
/* Dibuix del document */
.h-dib .d-bg { fill: var(--surface); stroke: var(--line-strong); stroke-width: 2; }
.h-dib .d-hd { fill: var(--olive-soft); }
.h-dib .d-ph { fill: var(--surface-sunken); }
.h-dib .d-l { fill: var(--line); }
.h-dib .d-hi { fill: var(--terra-soft); stroke: var(--terra); stroke-width: 2.5; }
.h-dib text { font-family: var(--font-sans); font-weight: 700; }
.h-dib .d-t { font-size: 12px; font-weight: 800; fill: var(--olive); }
.h-dib .d-k { font-size: 9.5px; fill: var(--terra-hover); }
.h-dib .d-v { font-family: var(--font-mono); font-size: 14px; fill: var(--ink); }

/* ── Lateral ── */
.h-side { top: calc(var(--header-h) + var(--space-6)); }
.h-com { gap: 14px; padding: 22px; }
.h-com ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.h-com li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.h-com strong { color: var(--ink); }
.h-step { flex: none; width: 28px; height: 28px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; background: var(--surface-sunken); color: var(--ink-3); }
.h-step.is-1 { background: var(--olive); color: var(--on-dark); }
.h-step.is-2 { background: var(--success-soft); color: var(--success-strong); }
.h-why { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 20px; background: var(--surface-sunken); font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.h-why h2 { margin: 0; display: flex; align-items: center; gap: 8px; font: 800 15px var(--font-sans); color: var(--ink); }
.h-why p { margin: 0; }
.h-why a { align-self: flex-start; font-weight: 700; color: var(--olive); }
.h-hutt { margin: 2px 0 0; padding: 0 4px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.h-hutt strong { color: var(--ink-2); }

/* ── Diàlegs ── */
.h-modal { width: min(440px, calc(100vw - 32px)); }
.h-modal p { margin: 0; }
.h-pm[open] { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 28px; }
.h-x { position: absolute; top: 14px; right: 14px; margin: 0; }
.h-pm__ini { width: 72px; height: 72px; border-radius: var(--radius-pill); background: var(--olive); color: var(--on-dark); display: flex; align-items: center; justify-content: center; font: 800 24px var(--font-sans); letter-spacing: .5px; }
.h-pm > div { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.h-pm [hidden] { display: none !important; }
.h-pm .h-tit { font-size: 24px; }
.h-pm__sub { font-size: 13.5px; color: var(--ink-3); }
.h-pm__ok { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--success-soft); color: var(--success); font-size: 13.5px; font-weight: 700; }
.h-pm__q { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.h-pm__btns { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.h-pm__btns form { margin: 0; }
.h-pm__del { align-self: center; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--terra-hover); font: 700 14px var(--font-sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.h-pm__del:hover { text-decoration: underline; text-underline-offset: 3px; }
.h-pm__conf { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--terra-soft); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.h-pm__conf[hidden] { display: none; }
.h-pm__conf p { font-size: 14px; font-weight: 700; color: var(--terra-hover); }
.h-pm__conf div { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.h-supd { width: min(520px, calc(100vw - 32px)); }
.h-supd[open] { display: flex; flex-direction: column; gap: 16px; }
.h-supd__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.h-supd__h form { margin: 0; }
.h-supd .h-tit { font-size: 22px; }
.h-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.h-tabs button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); font: 700 14px var(--font-sans); cursor: pointer; }
.h-tabs button[aria-selected="true"] { background: var(--olive); border-color: var(--olive); color: var(--on-dark); }
.h-supd [role="tabpanel"] { display: flex; flex-direction: column; gap: 12px; }
.h-supd [role="tabpanel"][hidden] { display: none; }
.h-supd .h-dib { width: 100%; max-width: 360px; height: auto; align-self: center; }
.h-supd ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.h-supd ul strong { color: var(--ink); }
.h-supd__n { font-size: 13px; color: var(--ink-3); }
.h-supd > form { margin: 0; }
.h-leave[open] { display: flex; flex-direction: column; gap: 12px; }
.h-leave p { font-size: 15px; line-height: 1.55; }
.h-leave__b { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.h-leave__b form { margin: 0; }
.h-fotos { width: min(920px, calc(100vw - 32px)); }
.h-fotos[open] { display: flex; flex-direction: column; gap: 16px; }
.h-fotos .h-tit { font-size: 22px; }
.h-fotos .h-tit span { font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--ink-3); }
/* Mosaic de 3 fotos: la façana gran a l'esquerra i dues a la dreta, una sobre l'altra (al mòbil: gran a dalt i dues a sota). */
.h-fotos__g { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; aspect-ratio: 16 / 8; }
.h-fotos__g figure { margin: 0; position: relative; min-height: 0; border-radius: 12px; overflow: hidden; background: var(--surface-sunken); }
.h-fotos__g figure:first-child { grid-row: 1 / -1; }
.h-fotos__img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Si en falta alguna: dues fotos, una al costat de l'altra; una sola, sencera. */
.h-fotos__g:has(> figure:nth-child(2):last-child) { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.h-fotos__g:has(> figure:only-child) { grid-template-columns: 1fr; grid-template-rows: 1fr; }
@media (max-width: 760px) {
	.h-fotos__g { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; aspect-ratio: auto; }
	.h-fotos__g figure:first-child { grid-row: auto; grid-column: 1 / -1; }
	.h-fotos__g figure:first-child .h-fotos__img { aspect-ratio: 4 / 3; }
	.h-fotos__g figure:not(:first-child) .h-fotos__img { aspect-ratio: 1; }
}
.h-fotos__g figcaption { position: absolute; left: 10px; bottom: 8px; padding: 3px 8px; border-radius: var(--radius-pill); background: rgba(20, 18, 15, .55); color: var(--on-dark); font-size: 12px; font-weight: 700; }

@media (max-width: 1099px) {
	.h-page .h-grid2 { grid-template-columns: minmax(0, 1fr); }
	.h-side { position: static; max-width: none; }
}
@media (max-width: 760px) {
	.h-house { display: none; }
	.h-fhead__l { gap: 12px; }
	.h-fhead .h-ava { width: 44px; height: 44px; }
	.h-fhead .h-ava.has-ini .h-ava__ini { font-size: 16px; }
	.h-fhead .h-tit { font-size: 24px; }
	.h-box { padding: 20px; }
	.h-half { max-width: none; }
	.h-acts { gap: 6px; }
	.h-row { padding: 12px; gap: 12px; }
	.h-fill { padding: 0 14px; }
	.h-btns .gr-btn { flex: 1 1 100%; }
	.h-cancel { flex: 1 1 100%; justify-content: center; }
	.h-del__f { flex-basis: 100%; justify-content: flex-start; }
	.h-row:has(.h-del[open]) { flex-wrap: wrap; }
}

/* Guia de la reserva (vista antiga) */
.gr-card.g-arr { background: var(--olive); border-color: transparent; color: var(--on-dark); }
.g-arr .r-h2, .g-arr strong { color: var(--on-dark); }
.g-arr .gr-eyebrow, .g-arr .gr-eyebrow a { color: rgba(246, 244, 238, .8); }
.g-arr .m-n { background: rgba(246, 244, 238, .16); color: var(--on-dark); }
.g-arr .gr-btn--olive { background: var(--on-dark); color: var(--olive); }
.g-reg p, .g-arr p, .g-fact p { margin: 0; }
.g-code { font-family: var(--font-mono); font-size: 1.1em; letter-spacing: 1px; }
.g-facts { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: var(--space-4); }
.g-fact { gap: var(--space-2); }
.g-fact .gr-btn, .g-fact .m-link { align-self: flex-start; }
.g-big { font-family: var(--font-display); font-weight: 600; font-size: 24px; color: var(--ink); }
.g-video { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.g-video video { width: 100%; max-height: 70vh; border-radius: var(--radius-lg); background: var(--ink); }
.g-video figcaption { font-size: 14px; color: rgba(246, 244, 238, .85); }
.g-soon { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: rgba(246, 244, 238, .12); }
.h-fotos { overflow: auto; }
/* Municipi omplert sol a partir del codi postal */
@media (prefers-reduced-motion: no-preference) { .h-fill-anim .gr-input { animation: h-fill 1.2s ease-out; } }
@keyframes h-fill { 0% { background: var(--success-soft); } 100% { background: var(--surface); } }

/* «A quina hora arribareu?» a la capçalera fosca (obre el diàleg de la guia). */
.h-hora { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border: 1px solid rgba(246, 244, 238, .55); border-radius: var(--radius-pill); background: rgba(246, 244, 238, .12); color: var(--on-dark); font: 700 15px/1.2 var(--font-sans); cursor: pointer; }
.h-hora:hover { background: rgba(246, 244, 238, .2); }
.h-hora:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 2px; }
.h-hora.is-set { border-color: transparent; background: rgba(246, 244, 238, .16); font-weight: 600; }
.h-page .b-dlg { width: min(520px, calc(100vw - 2 * var(--space-4))); }
.h-page .b-dlg__in { display: flex; flex-direction: column; gap: var(--space-3); }
.h-page .b-dlg__btns { display: flex; flex-wrap: wrap; gap: var(--space-2); }
