/**
 * /tableau-de-mariage/ — page CSS. The page language comes from product.css; the pieces of the
 * tableau redrawn here follow app/assets/css/dashboard/wedding/tableau.css, and the sheet follows
 * the A4 package of tableau-export.js. Only this page shows them, so they live here.
 */

/* ── Hero: the hall being seated, the last guest dropped on her seat while the page opens.
   It straddles the coloured field and the cream below, like the other product pages. ── */
.gw-tb-hero {
    --tb-overlap: clamp(5rem, 9vw, 8rem);
    --field-inset: 0 0 var(--tb-overlap);
}
.gw-tb-hero__grid { grid-template-columns: minmax(0, 23rem) minmax(0, 32rem); }
/* The hall is shorter than the copy: without the extra room the field would end right under the trust row. */
.gw-tb-hero__copy { margin-bottom: calc(var(--tb-overlap) + 3.5rem); }
.gw-tb-board { position: relative; display: flex; flex-direction: column; align-self: start; }
.gw-tb-board .gw-rp-tbws { box-shadow: 0 0 0 1px hsl(14 30% 40% / .12), 0 40px 80px -36px hsl(14 40% 22% / .45); }

/* ── The plan: tables and seats in cqi of the plan, a real hall scaled down ── */
.gw-rp-tbws {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.3;
    border-radius: 1rem;
    background: #d1d1d1;
    container-type: inline-size;
}
/* The printable sheet: a light graph paper, larger than the view as when zoomed in. */
.gw-rp-tbws__sheet {
    position: absolute;
    inset: 3.5cqi -20cqi -20cqi 3.5cqi;
    border: 2px dashed rgba(108, 93, 82, .45);
    background-color: #fff;
    background-image: linear-gradient(rgba(0, 0, 0, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .05) 1px, transparent 1px);
    background-size: 2.2cqi 2.2cqi;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 0, 0, .18);
}
.gw-rp-tbws > .gw-rp-tbplan { position: absolute; inset: 0; }

/* ── The guest sidebar: counters, search, and who is still to seat ── */
.gw-rp-tbside {
    position: relative;
    z-index: 1;
    width: min(19.5rem, 100%);
    margin: -4.5rem 0 0 -1.75rem;
    overflow: hidden;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 0 0 1px hsl(var(--gw-border) / .7), 0 24px 48px -24px hsl(14 40% 22% / .45);
    font-family: var(--gw-font-sans);
    font-size: .8125rem;
    color: hsl(var(--gw-fg));
}
.gw-rp-tbside__stats { display: flex; gap: .25rem; padding: .75rem 1rem; border-bottom: 1px solid hsl(30 20% 92%); }
.gw-rp-tbside__stats > span {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .125rem;
    min-width: 0;
    padding: .375rem .25rem;
    border: 1px solid hsl(30 20% 92%);
    border-radius: .5rem;
    background: hsl(var(--gw-wine) / .04);
    text-align: center;
}
.gw-rp-tbside__stats i { font-size: 1rem; color: hsl(var(--gw-wine)); }
.gw-rp-tbside__stats b { font-size: .9375rem; font-weight: 700; line-height: 1; transition: color .4s ease; }
.gw-rp-tbside__stats b.is-bumped { color: hsl(142 71% 36%); }
.gw-rp-tbside__stats small { max-width: 100%; overflow: hidden; font-size: .5625rem; white-space: nowrap; text-overflow: ellipsis; color: hsl(var(--gw-muted-fg)); }
.gw-rp-tbside__search { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: .4rem; padding: .5rem 1rem; border-bottom: 1px solid hsl(30 20% 92%); }
.gw-rp-tbside__search > span { display: flex; align-items: center; gap: .35rem; overflow: hidden; padding: .3rem .5rem; border: 1px solid hsl(var(--gw-border)); border-radius: .375rem; font-size: .72rem; white-space: nowrap; color: hsl(var(--gw-muted-fg)); }
.gw-rp-select { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.gw-rp-select::after { content: ''; flex: none; width: .4rem; height: .4rem; margin-right: .1rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-25%) rotate(45deg); }
.gw-rp-tbside__tabs { display: flex; border-bottom: 1px solid hsl(30 20% 92%); }
.gw-rp-tbside__tabs > * { flex: 1; display: flex; align-items: center; justify-content: center; gap: .375rem; padding: .5rem; border-bottom: 2px solid transparent; font-size: .75rem; font-weight: 600; color: hsl(var(--gw-muted-fg)); }
.gw-rp-tbside__tabs > b { border-bottom-color: hsl(var(--gw-wine)); color: hsl(var(--gw-wine)); }
.gw-rp-tbside__count { min-width: 1.25rem; padding: .0625rem .375rem; border-radius: 99px; background: hsl(var(--gw-wine) / .08); font-size: .625rem; font-weight: 700; text-align: center; color: hsl(var(--gw-wine)); }
.gw-rp-tbside__tabs > b .gw-rp-tbside__count { background: hsl(var(--gw-wine)); color: #fff; }
.gw-rp-tbside__body { display: grid; padding: .5rem 0; }
/* The household and the "all seated" line share one cell: the card keeps its height. */
.gw-rp-tbside__body > * { grid-area: 1 / 1; transition: opacity .4s ease, visibility .4s; }
.gw-rp-tbside__hh { margin: .25rem .75rem; overflow: hidden; border: 1px solid hsl(30 20% 92%); border-radius: .75rem; }
.gw-rp-tbside__hhead { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; background: hsl(var(--gw-wine) / .03); font-size: .8125rem; }
.gw-rp-tbside__hhead b { flex: 1; font-weight: 600; }
.gw-rp-tbside__hhead > i { font-size: .625rem; }
.gw-rp-tbside__row { display: flex; align-items: center; gap: .5rem; padding: .375rem 1rem .375rem 1.75rem; border-top: 1px solid hsl(30 20% 92%); transition: opacity .3s ease; }
.gw-rp-tbside__row.is-lifted { opacity: .3; }
.gw-rp-tbside__av { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; }
.gw-rp-tbside__av.is-yes { background: hsl(142 71% 45% / .12); color: hsl(142 71% 36%); }
.gw-rp-tbside__av > i { width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--avatar) center / contain no-repeat; mask: var(--avatar) center / contain no-repeat; }
.gw-rp-tbside__done { align-self: center; margin: 0; padding: 1rem; font-size: .8rem; text-align: center; color: hsl(var(--gw-muted-fg)); visibility: hidden; opacity: 0; }
.gw-tb-board.is-seated .gw-rp-tbside__hh { visibility: hidden; opacity: 0; }
.gw-tb-board.is-seated .gw-rp-tbside__done { visibility: visible; opacity: 1; }
/* The guest on her way from the list to the seat. */
.gw-tb-ghost {
    position: absolute;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .25rem .8rem .25rem .25rem;
    border-radius: 99px;
    background: #fff;
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .4), 0 0 0 1px hsl(var(--gw-wine) / .25);
    font: 600 .8125rem var(--gw-font-sans);
    white-space: nowrap;
    color: hsl(var(--gw-fg));
    pointer-events: none;
}

/* ── The shapes: one of each on a sheet, and the window that adds them ── */
.gw-rp-tbsheet {
    overflow: hidden;
    border-radius: 1rem;
    background-color: #fff;
    background-image: linear-gradient(rgba(0, 0, 0, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .05) 1px, transparent 1px);
    background-size: 1.1rem 1.1rem;
    box-shadow: 0 0 0 1px hsl(var(--gw-border)), 0 30px 60px -34px hsl(14 40% 22% / .35);
}
.gw-rp-tbsheet > .gw-rp-tbplan { aspect-ratio: 1.3; }
.gw-rp-tbadd__body { display: flex; flex-direction: column; gap: .65rem; padding: 1rem 1.2rem; font-size: .8rem; }
.gw-rp-tbadd__type { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid hsl(var(--gw-border)); border-radius: .5rem; font-size: .78rem; font-weight: 600; }
.gw-rp-tbadd__type > * { display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .45rem; color: hsl(var(--gw-muted-fg)); }
.gw-rp-tbadd__type > b { background: hsl(var(--gw-wine)); color: #fff; }
.gw-rp-tbadd__label { font-size: .68rem; font-weight: 600; color: hsl(var(--gw-muted-fg)); }
.gw-rp-tbadd__shapes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; margin-top: -.3rem; }
.gw-rp-tbadd__shapes > span { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem .1rem; border: 1px solid hsl(var(--gw-border)); border-radius: .5rem; font-size: .6rem; font-weight: 600; color: hsl(var(--gw-muted-fg)); }
.gw-rp-tbadd__shapes > span.is-on { border-color: hsl(var(--gw-wine)); background: hsl(var(--gw-wine) / .06); color: hsl(var(--gw-wine)); }
.gw-rp-tbadd__shapes svg { width: 2.2rem; height: auto; fill: none; stroke: currentColor; stroke-width: 1.6; }
.gw-rp-tbadd__shapes svg .d { fill: currentColor; stroke: none; }
.gw-rp-tbadd__colors { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: -.3rem; }
.gw-rp-tbadd__colors i { width: 1.1rem; height: 1.1rem; border: 2px solid transparent; border-radius: 50%; }
.gw-rp-tbadd__colors i.is-on { border-color: hsl(var(--gw-fg)); box-shadow: inset 0 0 0 2px #fff; }
.gw-rp-tbadd__seats { width: 6rem; }

/* ── The half-moon the visitor builds: one table on a sheet that never changes size, in the units
   of the editor. The world is scaled to the sheet, so whatever stays one size on screen divides by --k. ── */
.gw-rp-tbwave { position: relative; aspect-ratio: 1.4; }
.gw-rp-tbwave__view { position: absolute; inset: 0 0 var(--wave-overlap, 0); }
.gw-rp-tbwave__world { position: absolute; top: 0; left: 0; width: 0; height: 0; transform-origin: 0 0; font-family: var(--gw-font-sans); }
.gw-rp-tbwave__world.is-live { transition: transform .35s cubic-bezier(.4, 0, .2, 1); }
.gw-rp-tbwave__svg { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: visible; }
.gw-rp-tbwave__halo { fill: none; stroke: hsl(var(--gw-wine) / .2); stroke-width: calc(5px / var(--k)); stroke-linejoin: round; }
.gw-rp-tbwave__body { fill: #fff; stroke: hsl(var(--gw-wine)); stroke-width: calc(1.5px / var(--k)); stroke-linejoin: round; }
.gw-rp-tbwave .gw-rp-tb-seat { --s: 88px; border-width: calc(1px / var(--k)); box-shadow: 0 0 0 calc(1px / var(--k)) #fff; }
.gw-rp-tbwave__name { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1.1; white-space: nowrap; transform: translate(-50%, -50%); pointer-events: none; }
.gw-rp-tbwave__name b { font-size: var(--name); font-weight: 700; color: hsl(var(--gw-wine)); }
.gw-rp-tbwave__name small { font-size: calc(var(--name) * .7); font-weight: 500; color: rgba(0, 0, 0, .5); }
.gw-rp-tbwave__world.is-tight .gw-rp-tbwave__base,
.gw-rp-tbwave__world.is-tight .gw-rp-tbwave__name small { display: none; }
.gw-rp-tbwave__flip {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1.5px solid hsl(var(--gw-wine));
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    font-size: 1rem;
    color: hsl(var(--gw-wine));
    cursor: pointer;
    transform: translate(-50%, -50%) scale(calc(1 / var(--k)));
}
.gw-rp-tbwave__flip::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.gw-rp-tbwave__flip:focus-visible { outline: 2px solid hsl(var(--gw-wine)); outline-offset: 2px; }
@media (hover: hover) {
    .gw-rp-tbwave__flip:hover { background: hsl(var(--gw-wine)); color: #fff; }
}
/* Until the first gesture the joints breathe: nothing else on the page says this one can be touched. */
[data-gw-wave]:not(.is-touched) .gw-rp-tbwave__flip { animation: gw-wave-hint 2.2s ease-in-out infinite; }
@keyframes gw-wave-hint {
    0%, 100% { box-shadow: 0 1px 4px rgba(0, 0, 0, .2), 0 0 0 0 hsl(var(--gw-wine) / .3); }
    50% { box-shadow: 0 1px 4px rgba(0, 0, 0, .2), 0 0 0 7px hsl(var(--gw-wine) / .12); }
}
.gw-rp-tbwave__panel { position: relative; align-self: flex-end; width: min(23rem, 100%); margin: -2.5rem -1.5rem 0 0; }
.gw-rp-ui__field .gw-rp-tbwave__step { display: flex; align-items: center; justify-content: space-between; padding: .1rem; }
.gw-rp-tbwave__step b { font-weight: 600; }
.gw-rp-tbwave__step button { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0; border: 0; border-radius: .4rem; background: none; font-size: .9rem; color: hsl(var(--gw-wine)); cursor: pointer; }
.gw-rp-tbwave__step button:disabled { color: hsl(var(--gw-muted-fg)); opacity: .4; cursor: default; }
.gw-rp-tbwave__step button:focus-visible { outline: 2px solid hsl(var(--gw-wine)); outline-offset: -2px; }
.gw-rp-ui__field .gw-rp-tbwave__seats { display: flex; align-items: center; min-height: 2.45rem; }
@media (hover: hover) {
    .gw-rp-tbwave__step button:not(:disabled):hover { background: hsl(var(--gw-wine) / .08); }
    .gw-rp-tbwave__sides button:not(.is-on):hover { background: hsl(var(--gw-wine) / .06); }
}
.gw-rp-tbwave__sides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; margin-top: -.3rem; border: 1px solid hsl(var(--gw-border)); border-radius: .5rem; }
.gw-rp-tbwave__sides button { min-height: 2.4rem; padding: .3rem .2rem; border: 0; background: #fff; font-size: .72rem; font-weight: 600; line-height: 1.2; color: hsl(var(--gw-muted-fg)); cursor: pointer; }
.gw-rp-tbwave__sides button + button { border-left: 1px solid hsl(var(--gw-border)); }
.gw-rp-tbwave__sides button.is-on { background: hsl(var(--gw-wine)); color: #fff; }
.gw-rp-tbwave__sides button:focus-visible { outline: 2px solid hsl(var(--gw-wine)); outline-offset: -2px; }
.gw-rp-tbwave__sides button.is-on:focus-visible { outline-color: #fff; }
.gw-rp-tbwave__names { display: flex; align-items: center; gap: .55rem; min-height: 1.6rem; margin: 0; padding: 0; }
.gw-rp-tbwave__names .form-check-input { flex: none; float: none; margin: 0; cursor: pointer; }
.gw-rp-tbwave__names .form-check-input:disabled ~ .form-check-label { opacity: .5; }
.gw-rp-tbwave__names .form-check-label { font-size: .8rem; font-weight: 500; cursor: pointer; }
/* The three hints share one cell: changing one never moves the page. */
.gw-rp-tbwave__hints { display: grid; font-size: .74rem; line-height: 1.4; color: hsl(var(--gw-muted-fg)); }
.gw-rp-tbwave__hints small { grid-area: 1 / 1; font-size: inherit; visibility: hidden; }
.gw-rp-tbwave__hints small.is-on { visibility: visible; }

/* ── Up close: seats in the menu colours, the rings, the post-its ── */
.gw-tb-close__stage { max-width: 46rem; margin: clamp(2rem, 4vw, 3rem) auto 0; }
.gw-rp-tbclose {
    --tb-name: 3.2cqi;
    --tb-cap: 2.3cqi;
    --tb-label: 2.3cqi;
    aspect-ratio: 100 / 64;
    border-radius: 1rem;
    background-color: #fff;
    background-image: linear-gradient(rgba(0, 0, 0, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .05) 1px, transparent 1px);
    background-size: 3.6cqi 3.6cqi;
    box-shadow: 0 0 0 1px hsl(var(--gw-border)), 0 30px 60px -34px hsl(14 40% 22% / .35);
}
.gw-rp-tbclose .gw-rp-tb-table { border-width: 2px; }
.gw-rp-tbclose__wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gw-rp-tbclose__wires path { fill: none; stroke: #6c5d52; stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.gw-rp-tbnote {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: .45em;
    max-width: 31cqi;
    padding: .6em .8em;
    border: 2px solid #6c5d52;
    border-radius: .5em;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    font: 500 2.3cqi/1.3 var(--gw-font-sans);
    color: #2a2520;
}
.gw-rp-tbnote > span { display: flex; align-items: flex-start; gap: .5em; }
.gw-rp-tbnote > span > i { flex: none; margin-top: .1em; line-height: 1; }
.gw-rp-tbnote .is-intol > i { color: hsl(38 92% 50%); }
.gw-rp-tbnote .is-note > i { color: hsl(245 70% 45%); }
.gw-rp-tbnote__x { position: absolute; top: -.55em; right: -.55em; display: grid; place-items: center; width: 1.5em; height: 1.5em; border: 2px solid #fff; border-radius: 50%; background: #6c5d52; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); font-size: .85em; color: #fff; }
.gw-tb-close__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.25rem; margin: 1.25rem 0 0; font-size: .85rem; color: hsl(var(--gw-muted-fg)); }
.gw-tb-close__legend span { display: inline-flex; align-items: center; gap: .45rem; }
.gw-tb-close__legend i { width: .8rem; height: .8rem; border-radius: 50%; }
.gw-tb-close__legend i.is-intol { border: 2px dashed hsl(38 92% 50%); }
.gw-tb-close__legend i.is-note { border: 2px solid hsl(245 70% 45%); }

/* ── More layouts: the tab bar, a tab's menu, the new-layout window ── */
.gw-rp-tbapp { position: relative; border-radius: 1rem; background: #fff; box-shadow: 0 0 0 1px hsl(var(--gw-border)), 0 30px 60px -34px hsl(14 40% 22% / .35); font-family: var(--gw-font-sans); color: hsl(var(--gw-fg)); }
.gw-rp-tbbar { display: flex; align-items: stretch; border-bottom: 1px solid hsl(30 20% 92%); }
.gw-rp-tbbar__tab { display: flex; align-items: center; gap: .35rem; min-width: 0; padding: .5rem .75rem .45rem .875rem; border-bottom: 2px solid transparent; font-size: .8125rem; color: hsl(var(--gw-muted-fg)); }
.gw-rp-tbbar__tab > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.gw-rp-tbbar__tab b { overflow: hidden; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.gw-rp-tbbar__tab small { font-size: .6875rem; opacity: .75; }
.gw-rp-tbbar__tab > i { font-size: .8rem; }
.gw-rp-tbbar__tab.is-on { border-bottom-color: hsl(var(--gw-wine)); color: hsl(var(--gw-wine)); }
.gw-rp-tbbar__tab.is-on b { font-weight: 700; }
.gw-rp-tbbar__add { flex: none; align-self: center; display: grid; place-items: center; width: 28px; height: 28px; margin: 0 .6rem; border: 1px dashed hsl(var(--gw-border)); border-radius: .4rem; color: hsl(var(--gw-muted-fg)); }
.gw-rp-tbws--far { aspect-ratio: 1.7; border-radius: 0 0 1rem 1rem; }
.gw-rp-tbmenu { position: absolute; top: 3.1rem; left: 5.5rem; z-index: 2; min-width: 12.5rem; background: #fff; font-size: .8rem; }
.gw-rp-tbmenu span.is-danger { border-top: 1px solid hsl(30 20% 92%); color: hsl(0 70% 50%); }
.gw-rp-tbmenu span.is-danger i { color: inherit; }
.gw-rp-tblayout__body { display: flex; flex-direction: column; gap: .65rem; padding: 1rem 1.2rem; font-size: .8rem; }
.gw-rp-tblayout__orient { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: -.3rem; }
.gw-rp-tblayout__orient > span { display: grid; grid-template-rows: 4.4rem auto; place-items: center; gap: .5rem; padding: .75rem .5rem .6rem; border: 1px solid hsl(var(--gw-border)); border-radius: .75rem; font-size: .76rem; font-weight: 600; color: hsl(var(--gw-muted-fg)); }
.gw-rp-tblayout__orient > span.is-on { border-color: hsl(var(--gw-wine)); background: hsl(var(--gw-wine) / .05); color: hsl(var(--gw-wine)); }
/* A little sheet of paper with a ruler line and a few tables as dots. */
.gw-rp-tblayout__orient i {
    display: block;
    background:
        linear-gradient(currentColor, currentColor) 50% 16% / 60% 1.5px no-repeat,
        radial-gradient(circle, currentColor 32%, transparent 36%) 50% 70% / 33% 38%,
        #fff;
    box-shadow: 0 0 0 1px hsl(var(--gw-border)), 0 2px 6px rgba(0, 0, 0, .08);
    opacity: .7;
}
.gw-rp-tblayout__orient i.is-land { width: 4.2rem; height: 3rem; }
.gw-rp-tblayout__orient i.is-port { width: 3rem; height: 4.2rem; }
.gw-rp-tblayout__orient .is-on i { opacity: 1; }
.gw-rp-tblayout__hint { font-size: .72rem; line-height: 1.4; color: hsl(var(--gw-muted-fg)); }

/* ── The sheet for the hall: page 2 of the A4 package ── */
.gw-rp-pdf {
    max-height: 27rem;
    overflow: hidden;
    padding: 1.4rem 1.5rem 0;
    border-radius: .35rem;
    background: #fff;
    box-shadow: 0 0 0 1px hsl(var(--gw-border)), 0 30px 60px -30px hsl(14 40% 22% / .4);
    font: .74rem/1.35 Arial, Helvetica, sans-serif;
    color: #222;
    -webkit-mask-image: linear-gradient(#000 72%, transparent);
    mask-image: linear-gradient(#000 72%, transparent);
}
.gw-rp-pdf__banner { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .8rem; padding-bottom: .55rem; border-bottom: 2px solid #9E4563; }
.gw-rp-pdf__banner b { font-size: 1.05rem; font-style: italic; letter-spacing: .04em; color: #9E4563; }
.gw-rp-pdf__banner span { font-size: .72rem; color: #666; }
.gw-rp-pdf__summary { display: flex; margin-bottom: 1rem; padding: .45rem .3rem; border-radius: 10px; background: #F6E8EB; }
.gw-rp-pdf__summary > span { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-width: 0; padding: 0 .3rem; text-align: center; }
.gw-rp-pdf__summary > span + span { border-left: 1px solid rgba(158, 69, 99, .25); }
.gw-rp-pdf__summary small { font-size: .52rem; font-weight: 700; line-height: 1.15; letter-spacing: .02em; text-transform: uppercase; color: #7a4a57; }
.gw-rp-pdf__summary b { font-size: .8rem; color: #9E4563; }
.gw-rp-pdf__summary .is-total b { font-size: .98rem; }
.gw-rp-pdf__blocks { display: flex; flex-direction: column; gap: .8rem; }
.gw-rp-pdf__block { border: 1px solid rgb(200, 180, 185); }
.gw-rp-pdf__head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .35rem .55rem; background: #9E4563; color: #fff; }
.gw-rp-pdf__head b { font-size: .86rem; }
.gw-rp-pdf__head span { font-size: .66rem; white-space: nowrap; }
.gw-rp-pdf__cols,
.gw-rp-pdf__row { display: grid; grid-template-columns: 6% 21% 21% 30% 22%; }
.gw-rp-pdf__cols { background: #F6E8EB; font-size: .64rem; font-weight: 700; color: #7a4a57; }
.gw-rp-pdf__cols > span,
.gw-rp-pdf__row > span { min-width: 0; padding: .28rem .4rem; }
.gw-rp-pdf__row { border-top: 1px solid rgb(220, 200, 205); }
.gw-rp-pdf__row em { display: block; font-size: .64rem; font-weight: 700; color: #286E3C; }
.gw-rp-pdf__n { display: grid; place-items: center; padding-inline: 0 !important; font-weight: 700; color: #fff; background: #9E4563; }
.gw-rp-pdf__n.is-intol { background: #FFC107; color: #222; }
.gw-rp-pdf__n.is-note { background: #0DCAF0; color: #222; }
.gw-rp-pdf__note { font-size: .66rem; font-style: italic; color: #555; }

/* Small pieces for the three steps. */
.gw-rp-tbadd__shapes--mini { margin: 0; }
.gw-rp-tbfab { display: flex; align-items: center; justify-content: center; gap: .45rem; height: 2.6rem; border-radius: 99px; background: hsl(142 71% 36%); box-shadow: 0 6px 16px -8px hsl(142 71% 25% / .6); font-weight: 600; color: #fff; }
.gw-rp-tbpdf { display: flex; align-items: center; gap: .45rem; align-self: flex-start; padding: .45rem .7rem; border: 1px solid hsl(var(--gw-wine) / .3); border-radius: .75rem; font-weight: 600; color: hsl(var(--gw-wine)); }
.gw-rp-ui--list .gw-rp-tbside__hhead { border-radius: .5rem; }
.gw-rp-ui--list .gw-rp-tbside__row { padding-left: 1rem; border-top: 0; }

/* ── Sections with copy beside a replica ── */
.gw-tb-shapes,
.gw-tb-waves,
.gw-tb-layouts,
.gw-tb-export { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.gw-tb-waves { padding-top: 0; }
@media (min-width: 768px) {
    .gw-tb-close { padding-block: clamp(3rem, 6vw, 5rem); }
}
.gw-tb-shapes__grid,
.gw-tb-waves__grid,
.gw-tb-layouts__grid,
.gw-tb-export__grid { display: grid; column-gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.gw-tb-shapes__grid,
.gw-tb-export__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); }
.gw-tb-waves__grid,
.gw-tb-layouts__grid { grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); }
.gw-tb-shapes__show,
.gw-tb-export__show { display: flex; flex-direction: column; justify-self: end; width: min(100%, 32rem); }
.gw-tb-waves__show,
.gw-tb-layouts__show { display: flex; flex-direction: column; justify-self: start; width: min(100%, 33rem); }
.gw-tb-waves__show { --wave-overlap: 2.5rem; }
/* Each window leans on the lower edge of what it acts on, never over the part that matters. */
.gw-rp-tbadd { position: relative; align-self: flex-end; width: min(24rem, 100%); margin: -3rem -1.5rem 0 0; }
.gw-rp-tblayout { position: relative; align-self: flex-end; width: min(19rem, 100%); margin: -4.5rem -1.5rem 0 0; }
.gw-rp-tbexp { position: relative; align-self: flex-end; width: min(20rem, 100%); margin: -7rem -1.5rem 0 0; }

/* The container has no spare margin here: a window leaning out would be cut by the page edge. */
@media (max-width: 1099.98px) {
    .gw-rp-tbwave__panel,
    .gw-rp-tblayout { margin-right: 0; }
}
@media (max-width: 991.98px) {
    .gw-tb-hero__grid,
    .gw-tb-shapes__grid,
    .gw-tb-waves__grid,
    .gw-tb-layouts__grid,
    .gw-tb-export__grid { grid-template-columns: minmax(0, 1fr); row-gap: 2.25rem; }
    .gw-tb-hero__copy { margin-bottom: 0; }
    .gw-tb-hero { --tb-overlap: 14rem; }
    .gw-tb-board { width: 100%; max-width: 34rem; justify-self: center; }
    .gw-rp-tbside { margin-left: 0; }
    .gw-tb-shapes__show,
    .gw-tb-waves__show,
    .gw-tb-layouts__show,
    .gw-tb-export__show { width: 100%; max-width: 36rem; justify-self: center; }
    .gw-tb-shapes__copy,
    .gw-tb-export__copy { order: -1; }
    .gw-rp-tbadd,
    .gw-rp-tbwave__panel,
    .gw-rp-tblayout,
    .gw-rp-tbexp { margin-right: 0; }
}
@media (max-width: 767.98px) {
    .gw-tb-hero { padding-bottom: 2.25rem; }
    .gw-tb-shapes,
    .gw-tb-waves,
    .gw-tb-layouts,
    .gw-tb-export { padding-block: 2.25rem; }
    .gw-tb-waves { padding-top: 0; }
}
@media (max-width: 575.98px) {
    .gw-tb-hero__cta { display: block; text-align: center; }
    /* A phone zooms in: the whole hall would be too small to read, so the view closes on Tavolo 2. */
    .gw-tb-board .gw-rp-tbws > .gw-rp-tbplan { inset: auto; left: -48cqi; top: -28cqi; width: 160%; height: 100%; }
    .gw-tb-board .gw-rp-tbws__sheet { inset: -10cqi; }
    .gw-rp-tbside { width: calc(100% - 1.5rem); margin-top: -1rem; }
    .gw-rp-tbws--far { aspect-ratio: 1.15; }
    .gw-rp-pdf__summary { flex-wrap: wrap; row-gap: .45rem; }
    .gw-rp-pdf__summary > span { flex: 1 0 25%; }
    .gw-rp-pdf__summary > span:nth-child(5) { border-left: 0; }
    .gw-rp-pdf__cols > span:last-child,
    .gw-rp-pdf__note { display: none; }
    .gw-rp-tbadd,
    .gw-rp-tblayout,
    .gw-rp-tbexp { width: calc(100% - 1.5rem); margin-top: -1.5rem; }
    .gw-rp-tbadd__shapes:not(.gw-rp-tbadd__shapes--mini) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    /* On a phone the controls are what the thumb is on: full width, right under the sheet, nothing over it. */
    .gw-tb-waves__show { --wave-overlap: 0px; }
    .gw-rp-tbwave { aspect-ratio: 1.15; }
    .gw-rp-tbwave__panel { width: 100%; margin-top: .75rem; }
    .gw-rp-tbwave__flip { width: 28px; height: 28px; font-size: .85rem; }
    .gw-rp-tbwave__flip::after { inset: -8px; }
    .gw-rp-tbwave__world.is-tight .gw-rp-tbwave__flip { width: 24px; height: 24px; font-size: .75rem; }
    .gw-rp-tbwave__step button { width: 2.75rem; height: 2.75rem; }
    .gw-rp-ui__field .gw-rp-tbwave__seats { min-height: 3.05rem; }
    .gw-rp-tbwave__sides button { min-height: 2.75rem; }
    .gw-rp-tbclose { --tb-label: 3cqi; --tb-name: 3.8cqi; --tb-cap: 2.8cqi; }
    .gw-rp-tbnote { max-width: 34cqi; font-size: 3cqi; }
    .gw-rp-tbbar__tab { padding-inline: .6rem .45rem; }
    .gw-rp-tbbar__tab:nth-child(3) { display: none; }
    .gw-rp-tbmenu { left: 2.5rem; }
    .gw-rp-pdf { padding-inline: 1rem; }
    .gw-rp-pdf__cols,
    .gw-rp-pdf__row { grid-template-columns: 9% 26% 26% 39%; }
    .gw-rp-pdf__head span { font-size: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
    .gw-rp-tbside__body > *, .gw-rp-tbside__row, .gw-rp-tbside__stats b { transition: none; }
    .gw-rp-tb-seat.is-ping::before { animation: none; opacity: 0; }
    .gw-rp-tbwave__world.is-live { transition: none; }
    [data-gw-wave]:not(.is-touched) .gw-rp-tbwave__flip { animation: none; }
}
