/* ==========================================================================
   LAB SKETCH 28.11.2026 — gift pages under «Подборки»:
   inner-cert.tpl (certificate in three steps) and inner-box.tpl (box builder).
   Kanon tokens only (x-theme.css): paper/ink, Forum + Onest, straight corners, one --ease.
   The only round things are physical: the jars in the box and the open tin on the card.
   ========================================================================== */

.g-page { padding-top: var(--space-5); }
.g-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.g-back, .g-enough__k, .g-bill__k, .g-field > span, .g-steps b {
	font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
}
.g-back { display: inline-flex; align-items: center; gap: 12px; color: var(--ink-2); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
.g-back__ic { flex: none; width: 22px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur) var(--ease); }
.g-back:hover { color: var(--ink); }
.g-back:hover .g-back__ic { transform: translateX(-4px); }

/* numbers set by hand like the «руб. / 100 г» badge: a space in Onest/Forum is ~.27em, too wide inside «15 000»,
   no gap at all is unreadable; so the thousands gap is an empty span (.17em) and «руб.» sits .2em off */
.g-th { display: inline-block; width: .17em; }
.g-cur { display: inline-block; width: .2em; }
.g-m { white-space: nowrap; }
.g-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.x-btn[disabled] { opacity: .35; cursor: not-allowed; pointer-events: none; }

@keyframes g-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes g-pop { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }

/* ============================== certificate ============================== */
.g-stage { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(340px, 400px); gap: var(--space-7); align-items: start; }

/* step list: a hairline rail, the current step gets the ink mark */
.g-steps { position: sticky; top: calc(var(--header-h) + 24px); border-left: 1px solid var(--line); }
.g-steps__item button {
	display: block; width: 100%; padding: 14px 0 14px 20px; margin-left: -1px; border: 0; border-left: 1px solid transparent;
	background: none; text-align: left; cursor: pointer; color: var(--ink-3); font-size: 15px;
	transition: color var(--dur-fast) var(--ease), border-color var(--dur) var(--ease);
}
.g-steps b { display: block; margin-bottom: 2px; color: inherit; }
.g-steps__item.is-done button { color: var(--ink-2); }
.g-steps__item.is-current button { color: var(--ink); border-left-color: var(--ink); }
.g-steps__item button:hover { color: var(--ink); }

.g-cert__visual { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.g-cert__h1 { align-self: stretch; margin-bottom: var(--space-6); }
.g-cert__note { margin-top: var(--space-5); max-width: 46ch; text-align: center; font-size: 14px; color: var(--ink-2); }

/* the card itself: front = the printed certificate, back = the note we write by hand */
.g-card {
	position: relative; width: min(100%, 560px); aspect-ratio: 1.586;
	transform-style: preserve-3d; transition: transform var(--dur-slow) var(--ease);
	container-type: inline-size;
}
.g-cert__visual { perspective: 1800px; }
.g-card.is-flipped { transform: rotateY(180deg); }
.g-card__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; padding: 7cqw 7.5cqw; display: flex; flex-direction: column; }
.g-card__front {
	background: radial-gradient(120% 90% at 78% 22%, #2a2a28 0%, #161615 55%, #0e0e0d 100%);
	color: #efeee9;
	box-shadow: 0 40px 70px -40px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .12);
}
.g-card__mark {
	width: 30cqw; height: 9cqw; background: #efeee9;
	-webkit-mask: url(../images/logo-mark.png) no-repeat 0 50% / contain; mask: url(../images/logo-mark.png) no-repeat 0 50% / contain;
}
.g-card__title { margin-top: auto; font-family: var(--font-display); font-size: 4.1cqw; line-height: 1.15; letter-spacing: .16em; text-transform: uppercase; color: #cfcdc5; }
.g-card__sum { display: flex; align-items: baseline; gap: 2.2cqw; margin: 1.6cqw 0 1.2cqw; font-family: var(--font-display); font-size: 12.5cqw; line-height: 1; overflow: hidden; }
.g-card__num { display: inline-block; font-variant-numeric: lining-nums; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.g-card__num.is-out { transform: translateY(-40%); opacity: 0; }
.g-card__num.is-in { transform: translateY(40%); opacity: 0; transition: none; }
/* the ruble is drawn (Forum has no ₽, the fallback looked foreign): cap height of the lining figures, same contrast */
.g-card__rub { flex: none; width: auto; height: .66em; fill: #cfcdc5; }
.g-card__fine { font-size: 2.3cqw; letter-spacing: .14em; text-transform: uppercase; color: #8d8b84; }

/* the open tin from the home hero, cut by the card edge like in the hero; it stays still when the nominal changes */
.g-card__front { overflow: hidden; }
.g-card__tin {
	/* pushed into the top right corner: the rim frames the title and the sum, the card edge cuts the tin twice */
	position: absolute; right: -24cqw; top: -30cqw; width: 76cqw; height: auto; max-width: none; pointer-events: none;
	filter: drop-shadow(0 2.4cqw 3.2cqw rgba(0, 0, 0, .65));
}
.g-card__front > :not(.g-card__tin) { position: relative; }

.g-card__back {
	transform: rotateY(180deg); background: #fbfaf7; color: var(--ink);
	box-shadow: 0 40px 70px -40px rgba(0, 0, 0, .35), 0 0 0 1px var(--line);
}
.g-card__to { font-family: var(--font-display); font-size: 5.4cqw; line-height: 1.1; }
.g-card__msg {
	--lh: 7.4cqw;
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
	height: calc(var(--lh) * 4); margin-top: 1.4cqw;
	font-family: var(--font-display); font-size: 3.7cqw; line-height: var(--lh); overflow-wrap: anywhere;
	/* one hairline under every line box, continuous to both edges */
	background: linear-gradient(var(--line), var(--line)) 0 0 / 100% var(--lh) repeat-y;
	background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--lh) - 1px), var(--line-strong) calc(var(--lh) - 1px) var(--lh));
	background-size: auto;
}
.g-card__msg.is-placeholder, .g-card__to.is-placeholder { color: var(--ink-3); }
.g-card__foot { position: relative; display: flex; align-items: baseline; justify-content: flex-end; gap: 4cqw; margin-top: auto; min-height: 5cqw; }
.g-card__foot.has-from { justify-content: space-between; }
.g-card__sign { font-size: 2.2cqw; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.g-card__from { font-family: var(--font-display); font-size: 4.6cqw; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(30%); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.g-card__foot.has-from .g-card__from { opacity: 1; transform: none; }

/* panel */
.g-pane.is-in { animation: g-in var(--dur) var(--ease) both; }
.g-pane__title { margin-bottom: var(--space-5); }
.g-nominals { border-top: 1px solid var(--line); }
.g-nom {
	position: relative; display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 12px 0 12px 26px;
	border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; text-align: left;
	color: var(--ink-3); transition: color var(--dur-fast) var(--ease);
}
.g-nom::before {
	content: ""; position: absolute; left: 2px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
	background: var(--ink); transform: scale(0); transition: transform var(--dur) var(--ease);
}
.g-nom__v { font-family: var(--font-display); font-size: clamp(1.9rem, 1.4rem + 1.2vw, 2.5rem); line-height: 1.1; font-variant-numeric: lining-nums; }
.g-nom__u { font-size: 14px; }
.g-nom:hover { color: var(--ink-2); }
.g-nom[aria-checked="true"] { color: var(--ink); }
.g-nom[aria-checked="true"]::before { transform: none; }

.g-enough { margin-top: var(--space-5); padding: 18px 20px; background: var(--paper-2); }
.g-enough__k { margin-bottom: 10px; color: var(--ink-3); }
.g-enough__list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 0; font-size: 14px; line-height: 1.3; }
.g-enough__list li.is-in { animation: g-in var(--dur) var(--ease) both; }
.g-enough__list img, .g-enough__list > li > i { display: block; width: 40px; height: 40px; object-fit: contain; mix-blend-mode: var(--tile-blend, multiply); }
.g-enough__list a { text-decoration: none; }
.g-enough__list a:hover { text-decoration: underline; }
.g-enough__list b { font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.g-enough__sum { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.g-next { width: 100%; margin-top: var(--space-5); }

.g-seg { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: var(--space-5); }
.g-seg input { position: absolute; opacity: 0; pointer-events: none; }
.g-seg span {
	display: flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid var(--line-strong); cursor: pointer;
	font-size: 14px; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.g-seg label + label span { border-left: 0; }
.g-seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.g-seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.g-fields { display: grid; gap: var(--space-4); transition: opacity var(--dur) var(--ease); }
.g-fields.is-off { opacity: .35; pointer-events: none; }
.g-field { position: relative; display: grid; gap: 6px; }
.g-field > span { color: var(--ink-3); }
.g-field input, .g-field textarea {
	width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 0; background: var(--paper);
	font: inherit; font-size: 16px; color: var(--ink); resize: none; transition: border-color var(--dur-fast) var(--ease);
}
.g-field input:focus, .g-field textarea:focus { outline: none; border-color: var(--ink); }
.g-field em { position: absolute; right: 0; top: 0; font-style: normal; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.g-hint { font-size: 14px; color: var(--ink-2); }
.g-qty { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--line); font-size: 15px; }
.g-stepper { display: inline-grid; grid-template-columns: 44px 44px 44px; border: 1px solid var(--ink); }
.g-stepper button { height: 42px; border: 0; background: none; cursor: pointer; font-size: 18px; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.g-stepper button:hover { background: var(--ink); color: var(--paper); }
.g-stepper output { display: grid; place-items: center; font-variant-numeric: tabular-nums; }

.g-ways { border-top: 1px solid var(--line); margin-bottom: var(--space-3); }
.g-ways li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.g-ways b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; }
.g-ways span { font-size: 15px; color: var(--ink-2); }
.g-sum { margin-top: var(--space-5); font-size: 15px; }
.g-sum__row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.g-sum__row > span:first-child { color: var(--ink-2); flex: none; }
.g-sum__row > span:last-child { text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.g-sum__row small { display: block; font-size: 14px; color: var(--ink-2); }
.g-sum__total { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--ink); font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.g-buy { margin-top: var(--space-5); }
/* the cart button: one element, two labels; «add» slides out, «in the cart — checkout» slides in, the fill inverts.
   The state changes on click (the request runs behind it), so there is no wait and no second button popping in. */
.g-cta { position: relative; width: 100%; overflow: hidden; }
.g-cta__a, .g-cta__b { transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.g-cta__b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform: translateY(100%); opacity: 0; }
.g-cta.is-done { background: var(--paper); border-color: var(--ink); color: var(--ink); }
.g-cta.is-done .g-cta__a { transform: translateY(-100%); opacity: 0; }
.g-cta.is-done .g-cta__b { transform: none; opacity: 1; }
@media (hover: hover) { .g-cta.is-done:hover { background: var(--ink); color: var(--paper); } }
.g-cta[aria-disabled="true"] { opacity: .35; pointer-events: none; }

/* rules: the home FAQ item as is (x-base.css .x-faq__*, opened by the FAQ script in inc.footer.tpl) */
.g-rules { margin-top: var(--space-8); border-bottom: 1px solid var(--line); }
.g-rules .x-faq__a { max-width: 80ch; }
.g-rules .x-prose { font-size: 15px; }

@media (max-width: 1100px) {
	.g-stage { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
	.g-steps { position: static; display: grid; grid-template-columns: repeat(3, 1fr); border-left: 0; border-bottom: 1px solid var(--line); order: -1; }
	.g-steps__item button { padding: 10px 0 12px; margin: 0 0 -1px; border-left: 0; border-bottom: 1px solid transparent; }
	.g-steps__item.is-current button { border-bottom-color: var(--ink); }
	.g-cert__h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
	.g-cert__note { margin-top: var(--space-4); }
	.g-panel { max-width: 560px; width: 100%; margin: 0 auto; }
}

/* ============================== box builder ============================== */
.g-box__head { margin-bottom: var(--space-6); }
.g-box__head .x-h1 { margin-bottom: var(--space-3); }
.g-box__stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: var(--space-7); align-items: start; }

/* ---- the box, seen from above: the white mailer we really pack in, wood wool inside, five places (2 + 3) ---- */
.g-crate { width: 100%; max-width: 720px; justify-self: center; }
.g-boxv { position: relative; aspect-ratio: 1.3; container-type: inline-size; perspective: 2400px; transform-origin: 50% 50%; }
.g-boxv__body {
	position: absolute; inset: 0; padding: 2.4cqw; border-radius: .5cqw;
	background: linear-gradient(160deg, #ffffff 0%, #f3f1ec 100%);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 5cqw 7cqw -5cqw rgba(45, 32, 18, .5), 0 1.2cqw 2cqw -1.2cqw rgba(0, 0, 0, .18);
}
/* the inner walls are the border: four trapezoids, each lit a little differently */
.g-boxv__well {
	position: relative; height: 100%; overflow: hidden; background: #6f522e;
	border: 2.6cqw solid; border-color: #f0eee9 #e2dfd8 #d3cfc6 #e9e6e0;
}
.g-straw { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the walls' shadow falling on the straw */
.g-boxv__well::after {
	content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	box-shadow: inset 0 3cqw 3cqw -1.6cqw rgba(45, 28, 8, .5), inset 2.2cqw 0 3cqw -2cqw rgba(45, 28, 8, .32),
		inset -2.2cqw 0 3cqw -2cqw rgba(45, 28, 8, .32), inset 0 -1.6cqw 2.6cqw -1.6cqw rgba(45, 28, 8, .25);
}

.g-slot {
	position: absolute; z-index: 2; width: 26%; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer;
	display: grid; place-items: center; transform: translate(-50%, -50%); -webkit-tap-highlight-color: transparent;
}
.g-slot[data-slot="0"] { left: 35%; top: 31%; }
.g-slot[data-slot="1"] { left: 65%; top: 31%; }
.g-slot[data-slot="2"] { left: 19%; top: 70%; z-index: 3; }
.g-slot[data-slot="3"] { left: 50%; top: 70%; z-index: 3; }
.g-slot[data-slot="4"] { left: 81%; top: 70%; z-index: 3; }
/* a nest pressed into the straw: shows where a jar goes, and under a jar it is its contact shadow */
.g-slot::before {
	content: ""; position: absolute; inset: 8%; border-radius: 50%; pointer-events: none;
	background: radial-gradient(closest-side, rgba(40, 24, 6, .5), rgba(40, 24, 6, .22) 62%, rgba(40, 24, 6, 0));
	transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.g-slot.is-full::before { inset: 14% 10% 4%; opacity: .95; }
.g-slot__plus {
	position: relative; width: clamp(34px, 7cqw, 50px); aspect-ratio: 1; background: rgba(255, 255, 255, .94); color: var(--ink);
	box-shadow: 0 .8cqw 1.6cqw -.6cqw rgba(30, 18, 4, .55), 0 0 0 1px rgba(20, 20, 20, .08);
	transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur) var(--ease);
}
.g-slot__plus::before, .g-slot__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 38%; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.g-slot__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
@media (hover: hover) {
	.g-slot:hover .g-slot__plus { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
}
.g-slot:focus-visible { outline: none; }
.g-slot:focus-visible .g-slot__plus, .g-slot.is-full:focus-visible .g-slot__jar { outline: 2px solid var(--focus, #fff); outline-offset: 3px; }

.g-slot__jar { position: absolute; left: 50%; top: 50%; width: 142%; transform: translate(-50%, -53%); pointer-events: none; transition: transform var(--dur) var(--ease); }
.g-slot__jar img {
	display: block; width: 100%; height: auto;
	filter: drop-shadow(0 1.1cqw .9cqw rgba(40, 24, 6, .42)) drop-shadow(0 .25cqw .25cqw rgba(40, 24, 6, .35));
	transition: filter var(--dur) var(--ease);
}
@media (hover: hover) {
	.g-slot.is-full:hover .g-slot__jar { transform: translate(-50%, -57%); }
	.g-slot.is-full:hover .g-slot__jar img { filter: drop-shadow(0 2cqw 1.6cqw rgba(40, 24, 6, .38)) drop-shadow(0 .4cqw .4cqw rgba(40, 24, 6, .3)); }
}
.g-slot.is-new .g-slot__jar { animation: g-drop .62s cubic-bezier(.2, .75, .3, 1) both; }
@keyframes g-drop {
	from { opacity: 0; transform: translate(-50%, -78%) scale(1.14); }
	55% { opacity: 1; }
	to { opacity: 1; transform: translate(-50%, -53%); }
}
.g-slot__name {
	position: absolute; left: 50%; bottom: -6%; z-index: 4; max-width: 160%; padding: 5px 9px;
	background: rgba(20, 20, 20, .86); color: #fff; font-size: 12px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	opacity: 0; transform: translate(-50%, 4px); pointer-events: none; transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
@media (hover: hover) { .g-slot.is-full:hover .g-slot__name { opacity: 1; transform: translate(-50%, 0); } }
.g-slot.is-full:focus-visible .g-slot__name { opacity: 1; transform: translate(-50%, 0); }

/* lid: hinged on the far edge; open = lying back flat (kraft inside up), shut = white face with the logo */
.g-lid { position: absolute; inset: 0; z-index: 6; transform-origin: 50% 0; transform-style: preserve-3d; transform: rotateX(178deg); visibility: hidden; pointer-events: none; }
.g-lid.is-on { visibility: visible; }
.g-lid.is-shut { transform: none; }
.g-lid__in, .g-lid__out { position: absolute; inset: 0; border-radius: .5cqw; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.g-lid__in {
	transform: rotateX(180deg);
	background: repeating-linear-gradient(0deg, rgba(90, 58, 22, .07) 0 1px, transparent 1px .8cqw), linear-gradient(180deg, #d1ae80, #c19a6a);
	box-shadow: inset 0 0 0 1px rgba(80, 50, 20, .25);
}
.g-lid__out {
	overflow: hidden; background: linear-gradient(165deg, #ffffff 0%, #f5f3ef 100%);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 5cqw 7cqw -5cqw rgba(45, 32, 18, .5), inset 0 -.5cqw 1cqw -.4cqw rgba(0, 0, 0, .08);
}
.g-lid__logo {
	position: absolute; left: 50%; top: 26%; width: 40%; aspect-ratio: 900 / 296; transform: translate(-50%, -50%); background: #161616;
	-webkit-mask: url(../images/gift-lid-logo.png) center / contain no-repeat; mask: url(../images/gift-lid-logo.png) center / contain no-repeat;
}
/* the sleeve (обечайка): the top face of the real print; slides on from the near edge */
.g-lid__band {
	position: absolute; left: 0; right: 0; top: 52%; aspect-ratio: 1400 / 392; transform: translateY(140%);
	background: #3a1f1f url(../images/gift-sleeve.webp) center / 100% 100% no-repeat;
	box-shadow: 0 -.35cqw .7cqw -.2cqw rgba(0, 0, 0, .3), 0 .35cqw .7cqw -.2cqw rgba(0, 0, 0, .3);
}
.g-lid.is-sleeved .g-lid__band { transform: none; }
.g-lid__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .38)); opacity: 0; pointer-events: none; }

/* after packing: the closed box stays sharp (it is the result), the next step appears under it */
.g-done { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: var(--space-6); text-align: center; }
.g-done[hidden] { display: none; }
.g-done > * { animation: g-in var(--dur-slow) var(--ease) both; }
.g-done > :nth-child(2) { animation-delay: 70ms; }
.g-done > :nth-child(3) { animation-delay: 140ms; }
.g-done > :nth-child(4) { animation-delay: 210ms; }
.g-done.is-out { opacity: 0; transition: opacity var(--dur) var(--ease); }
.g-done__k { font-family: var(--font-display); font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); line-height: 1.05; }
.g-done__t { margin-bottom: 10px; font-size: 15px; color: var(--ink-2); }
.g-done__go { min-width: min(260px, 100%); }
.g-done__new {
	padding: 10px; border: 0; background: none; cursor: pointer; font-size: 15px; color: var(--ink-2);
	text-decoration: underline; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}
.g-done__new:hover { color: var(--ink); }

.g-box__stage.is-packed { grid-template-columns: minmax(0, 1fr); }
.g-box__stage.is-packed .g-bill { display: none; }
.g-box__stage.is-packing .g-crate__hint { visibility: hidden; }
.g-box__stage.is-packed .g-crate__hint { display: none; }

.g-crate__hint { margin-top: var(--space-5); text-align: center; font-size: 14px; color: var(--ink-2); min-height: 1.55em; }

.g-bill { position: sticky; top: calc(var(--header-h) + 24px); padding: 24px; background: var(--paper-2); }
.g-bill__k { color: var(--ink-3); margin-bottom: 6px; }
.g-bill__title { font-family: var(--font-display); font-size: 1.55rem; line-height: 1.15; margin-bottom: var(--space-4); }
.g-bill__lines { counter-reset: g; border-top: 1px solid var(--line); }
.g-bill__lines li {
	display: grid; grid-template-columns: minmax(0, 1fr) auto 24px; gap: 10px; align-items: baseline;
	padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.35; color: var(--ink-2);
}
.g-bill__lines li.is-empty { color: var(--ink-3); }
.g-bill__lines li.is-new { animation: g-in var(--dur) var(--ease) both; }
.g-bill__lines b { font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.g-bill__x { position: relative; width: 24px; height: 18px; border: 0; background: none; cursor: pointer; color: var(--ink-3); transition: color var(--dur-fast) var(--ease); }
.g-bill__x::before, .g-bill__x::after { content: ""; position: absolute; left: 6px; top: 50%; width: 12px; height: 1px; background: currentColor; transform: rotate(45deg); }
.g-bill__x::after { transform: rotate(-45deg); }
.g-bill__x:hover { color: var(--ink); }
.g-bill__extra, .g-bill__total { display: flex; justify-content: space-between; gap: 12px; }
.g-bill__extra { padding: 10px 0; font-size: 14px; color: var(--ink-2); }
.g-bill__extra b, .g-bill__total b { font-weight: 400; font-variant-numeric: tabular-nums; }
.g-bill__total { padding-top: 12px; border-top: 1px solid var(--ink); font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; margin-bottom: var(--space-4); }
.g-bill__clear { display: block; margin: 14px auto 0; border: 0; background: none; cursor: pointer; font-size: 14px; color: var(--ink-2); text-decoration: underline; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.g-bill__clear:hover { color: var(--ink); }

.g-ready { margin-top: var(--space-8); }
.g-ready__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-4); }
.g-set { display: flex; flex-direction: column; min-width: 0; outline: 1px solid transparent; outline-offset: 6px; transition: outline-color var(--dur) var(--ease); }
.g-set.is-on { outline-color: var(--ink); }
.g-set__img { aspect-ratio: 1402 / 1122; background: var(--tile); overflow: hidden; }
.g-set__img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: var(--tile-blend, multiply); transition: transform var(--dur-slow) var(--ease); }
.g-set:hover .g-set__img img { transform: scale(1.03); }
.g-set__name { margin-top: 12px; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.15; }
.g-set__d { order: 3; margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--ink-2); flex: 1; }
.g-set__price { order: 4; margin-top: 10px; font-size: 17px; font-variant-numeric: tabular-nums; }
.g-set .x-btn { order: 5; width: 100%; margin-top: 10px; }
.g-set__img { order: 1; }
.g-set__name { order: 2; }

/* picker dialog */
html.g-lock { overflow: hidden; }
.g-pick {
	width: min(980px, calc(100vw - 32px)); max-width: none; max-height: min(86vh, 860px); padding: 0; border: 0; border-radius: 0;
	background: var(--paper); color: var(--ink); display: none; flex-direction: column;
	box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45);
}
.g-pick[open] { display: flex; animation: g-in var(--dur) var(--ease) both; }
.g-pick.is-closing { animation: g-in var(--dur) var(--ease) reverse both; }
.g-pick::backdrop { background: rgba(20, 20, 20, .45); }
.g-pick__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px 14px; }
.g-pick__x { position: relative; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; }
.g-pick__x::before, .g-pick__x::after { content: ""; position: absolute; left: 10px; top: 50%; width: 20px; height: 1px; background: var(--ink); transform: rotate(45deg); }
.g-pick__x::after { transform: rotate(-45deg); }
.g-pick__tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 28px 16px; border-bottom: 1px solid var(--line); }
.g-pick__tabs button {
	padding: 8px 12px; border: 1px solid var(--line-strong); background: none; cursor: pointer;
	font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
	transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.g-pick__tabs button:hover { border-color: var(--ink); }
.g-pick__tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.g-pick__grid { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 20px 28px 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 20px 16px; align-content: start; }
.g-pick__grid li.is-in { animation: g-in var(--dur) var(--ease) both; }
.g-item { display: flex; flex-direction: column; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; font-size: 14px; line-height: 1.35; }
.g-item__img { aspect-ratio: 1; background: var(--tile); display: grid; place-items: center; margin-bottom: 8px; outline: 1px solid transparent; outline-offset: -1px; transition: outline-color var(--dur-fast) var(--ease); }
.g-item__img img { width: 82%; height: 82%; object-fit: contain; mix-blend-mode: var(--tile-blend, multiply); }
.g-item__price { margin-top: 4px; font-size: 15px; font-variant-numeric: tabular-nums; }
.g-item:hover .g-item__img { outline-color: var(--ink); }
.g-item.is-here .g-item__img { outline: 2px solid var(--ink); outline-offset: -2px; }

@media (max-width: 1200px) {
	.g-ready__list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(230px, 30%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
	.g-set { scroll-snap-align: start; }
}
@media (max-width: 960px) {
	.g-box__stage { grid-template-columns: minmax(0, 1fr); }
	.g-bill { position: static; }
}
@media (max-width: 640px) {
	.g-ready__list { grid-auto-columns: 72%; }
	.g-done__t { font-size: 14px; margin-bottom: 4px; }
	.g-done__go { min-height: 44px; }
	.g-pick { width: 100vw; max-height: 92vh; margin: auto 0 0; }
	.g-pick__head, .g-pick__tabs { padding-inline: 16px; }
	.g-pick__tabs { flex-wrap: nowrap; overflow-x: auto; }
	.g-pick__tabs button { flex: none; }
	.g-pick__grid { padding: 16px; grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.g-card, .g-card__num, .g-card__tin, .g-card__sign, .g-card__from, .g-cta__a, .g-cta__b, .g-pane.is-in, .g-slot__jar, .g-pick[open], .g-set__img img, .g-lid, .g-lid__band, .g-done > * { transition: none !important; animation: none !important; }
}
