/* ==========================================================================
   Numbered-copy picker (Skye, 10 Nov 2026; simplified 23 Nov 2026, DESIGN
   batch 2: the grid first, one bar, the rest folded away).

   Order on every width: the dark sheet of all 250 (title, legend, count,
   grid), then "Need a little inspiration?" (Skye's card and four questions,
   always shown; revision 23 Nov), and one bar with the chosen number and
   Order, fixed to the bottom of the screen (page) or of the popup.
   Sizes from the reference (~/ek-reference/number-picker-reference); colours
   and fonts are the site's tokens:
     page paper  --ek-linen          ink           --ek-ink
     dark band   --ek-earth-dark     band rules    --ek-earth-mid
     gold lines  --ek-veld-gold (decorative; frame at --ek-veld-gold-a70)
     gold text   on paper --ek-gold-link (5.2:1), on dark --ek-gold-light (7.6:1)
     sage panel  --ek-sage-wash (About the book's Nature versus nurture band)
     muted       on paper --ek-picker-muted (7.3:1+), on dark --ek-picker-muted-dark (7.4:1)
     taken text  --ek-on-dark-legal on --ek-earth-mid (5.7:1; muted is 4.48:1)
   ========================================================================== */

.ek-picker {
	background: var(--ek-linen);
	color: var(--ek-ink);
	font-family: var(--ek-font-sans);
}
.ek-picker__main { margin: 0; }

/* --- The sheet: all 250 on the dark band, first ------------------------- */
.ek-picker__sheet {
	padding: 20px 0 28px;
	background: var(--ek-earth-dark);
	color: var(--ek-on-dark);
}
.ek-picker__sheet-inner {
	max-width: calc(var(--ek-grid) + 2 * var(--ek-edge));
	margin: 0 auto;
	padding: 0 var(--ek-edge);
}
/* One line on desktop: title, legend, count. Phones: title, then legend and count. */
.ek-picker__sheet-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 32px;
}
.ek-picker__sheet-title {
	flex: 1 1 100%;
	margin: 0;
	font-family: var(--ek-font-serif);
	font-weight: var(--ek-weight-medium);
	font-size: 30px;
	line-height: 1.1;
	color: var(--ek-on-dark);
}
.ek-picker__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	line-height: 20px;
	color: var(--ek-picker-muted-dark);
}
.ek-picker__legend li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ek-picker__swatch { display: inline-block; flex: 0 0 auto; box-sizing: border-box; width: 14px; height: 14px; }
.ek-picker__swatch--free { border: 1px solid var(--ek-on-dark-muted); }
.ek-picker__swatch--held { border: 1px dashed var(--ek-veld-gold); }
.ek-picker__swatch--selected { background: var(--ek-veld-gold); }
.ek-picker__swatch--taken { background: var(--ek-earth-mid); background-image: linear-gradient(var(--ek-on-dark-muted), var(--ek-on-dark-muted)); background-size: 100% 1px; background-position: 50% 50%; background-repeat: no-repeat; }
.ek-picker__count { margin: 0 0 0 auto; font-size: 14px; line-height: 20px; color: var(--ek-picker-muted-dark); white-space: nowrap; }
.ek-picker__count-n { font-size: 16px; color: var(--ek-gold-light); font-variant-numeric: tabular-nums; }
.ek-picker__sheet .ek-placeholder { color: var(--ek-gold-light); }

.ek-picker__grid {
	display: grid;
	grid-template-columns: repeat(10, minmax(0, 1fr));
	margin-top: 16px;
	border-top: 1px solid var(--ek-earth-mid);
	border-left: 1px solid var(--ek-earth-mid);
}
.ek-picker__cell {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-right: 1px solid var(--ek-earth-mid);
	border-bottom: 1px solid var(--ek-earth-mid);
	border-radius: 0;
	background: transparent;
	color: var(--ek-on-dark);
	font-family: var(--ek-font-serif);
	font-size: 18px;
	font-variant-numeric: lining-nums;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--ek-duration-sm) ease, color var(--ek-duration-sm) ease;
}
/* Hover only with a mouse, so a tap never leaves a cell lit. */
@media (hover: hover) and (pointer: fine) {
	.ek-picker__cell[data-status="free"]:hover { background: var(--ek-veld-gold-a15); color: var(--ek-gold-light); }
}
.ek-picker__cell[data-status="held"] { color: var(--ek-gold-light); }
.ek-picker__cell[data-status="held"]::before {
	content: "";
	position: absolute;
	inset: 4px;
	border: 1px dashed var(--ek-veld-gold);
	animation: ek-picker-breathe 2.8s ease-in-out infinite;
	pointer-events: none;
}
.ek-picker__cell[data-status="taken"] {
	background: var(--ek-earth-mid);
	color: var(--ek-on-dark-legal);
	text-decoration: line-through;
	text-decoration-color: var(--ek-on-dark-muted);
	cursor: default;
}
.ek-picker__cell[data-status="held"] { cursor: default; }
.ek-picker__cell[data-status="reserved"] {
	color: var(--ek-on-dark-legal);
	font-style: italic;
	text-decoration: underline;
	text-decoration-color: var(--ek-veld-gold);
	text-underline-offset: 4px;
}
/* Selected: a gold block when free; otherwise a light, neutral one with the
   strike kept, so a taken number never looks like a choice. */
.ek-picker__cell[aria-pressed="true"] { font-weight: var(--ek-weight-semibold); font-style: normal; }
.ek-picker__cell[aria-pressed="true"][data-status="free"] { background: var(--ek-veld-gold); color: var(--ek-ink); }
.ek-picker__cell[aria-pressed="true"]:not([data-status="free"]) { background: var(--ek-on-dark-soft); color: var(--ek-ink); text-decoration-color: var(--ek-ink); }
.ek-picker__cell[aria-pressed="true"]::before { content: none; }
/* Keyboard focus: a light ring inside the cell; on the gold (chosen) cell an ink one. */
.ek-picker__cell:focus-visible { z-index: 1; outline: 2px solid var(--ek-on-dark); outline-offset: -3px; }
.ek-picker__cell[aria-pressed="true"]:focus-visible { outline-color: var(--ek-ink); }

/* Under the grid, quietly: price, hold, privacy. */
.ek-picker__notes { margin-top: 14px; }
.ek-picker__note,
.ek-picker__footnote { margin: 0; font-size: 14px; line-height: 20px; color: var(--ek-picker-muted-dark); }
.ek-picker__hold {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 6px 0;
	font-size: 14px;
	line-height: 20px;
	color: var(--ek-gold-light);
}
.ek-picker__hourglass {
	flex: 0 0 auto;
	margin-top: 2px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.3;
	stroke-linecap: round;
}
.ek-placeholder { color: var(--ek-brick); font-weight: var(--ek-weight-medium); }

@keyframes ek-picker-breathe {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

/* --- "Need a little inspiration?": Skye's card and questions, always shown --
   Secondary to the grid: paper, not the dark band; a serif heading one step
   below the grid's title. Desktop: the card beside the questions; phones:
   stacked, directly under the grid. */
.ek-picker__help { background: var(--ek-linen); }
.ek-picker__help-inner {
	max-width: calc(var(--ek-grid) + 2 * var(--ek-edge));
	margin: 0 auto;
	padding: 28px var(--ek-edge) 40px;
}
.ek-picker__help-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 16px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--ek-line);
}
.ek-picker__title {
	margin: 0;
	font-family: var(--ek-font-serif);
	font-weight: var(--ek-weight-medium);
	font-size: 28px;
	line-height: 1.15;
	color: var(--ek-ink);
}
.ek-picker__pull {
	margin: 0;
	font-family: var(--ek-font-serif);
	font-style: italic;
	font-size: 20px;
	line-height: 28px;
	color: var(--ek-picker-muted);
}
.ek-picker__help-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	padding-top: 28px;
}

/* --- The card -------------------------------------------------------- */
.ek-picker__card {
	background: var(--ek-earth-dark);
	padding: 12px;
	box-shadow: 0 24px 48px -28px var(--ek-book-shadow-a55);
}
.ek-picker__frame {
	border: 1px solid var(--ek-veld-gold-a70);
	padding: 40px 32px 32px;
	color: var(--ek-on-dark);
	text-align: center;
}
.ek-picker__label {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ek-gold-light);
}
/* Nº and the digits share one baseline: the row aligns on baselines, and the
   number's baseline comes from its (invisible) sizer text, not from the
   clipped digit windows laid over it. */
.ek-picker__number-row {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 8px;
	margin-top: 32px;
}
.ek-picker__no {
	font-family: var(--ek-font-serif);
	font-style: italic;
	font-size: 36px;
	line-height: 1;
	color: var(--ek-gold-light);
}
.ek-picker__number {
	position: relative;
	display: inline-block;
	font-family: var(--ek-font-serif);
	font-weight: var(--ek-weight-medium);
	font-size: 112px;
	line-height: 1.05;
	font-variant-numeric: lining-nums tabular-nums;
	color: var(--ek-on-dark);
	transition: color var(--ek-duration) ease;
}
.ek-picker__number[data-status]:not([data-status="free"]) { color: var(--ek-picker-muted-dark); }
.ek-picker__sizer { visibility: hidden; }
.ek-picker__digits { position: absolute; inset: 0; display: flex; }
.ek-picker__window { flex: 1 1 0; height: 1.05em; overflow: hidden; }
.ek-picker__reel {
	display: flex;
	flex-direction: column;
	transition: transform 900ms var(--ek-ease);
}
.ek-picker__reel > span { display: block; height: 1.05em; text-align: center; }
.ek-picker__window:nth-child(2) .ek-picker__reel { transition-delay: 90ms; }
.ek-picker__window:nth-child(3) .ek-picker__reel { transition-delay: 180ms; }
.ek-picker__reel[data-d="1"] { transform: translateY(-10%); }
.ek-picker__reel[data-d="2"] { transform: translateY(-20%); }
.ek-picker__reel[data-d="3"] { transform: translateY(-30%); }
.ek-picker__reel[data-d="4"] { transform: translateY(-40%); }
.ek-picker__reel[data-d="5"] { transform: translateY(-50%); }
.ek-picker__reel[data-d="6"] { transform: translateY(-60%); }
.ek-picker__reel[data-d="7"] { transform: translateY(-70%); }
.ek-picker__reel[data-d="8"] { transform: translateY(-80%); }
.ek-picker__reel[data-d="9"] { transform: translateY(-90%); }

.ek-picker__horizon {
	height: 1px;
	background: var(--ek-veld-gold-a70);
}
.ek-picker__of {
	margin: 12px 0 0;
	font-family: var(--ek-font-serif);
	font-style: italic;
	font-size: 24px;
	line-height: 32px;
}
.ek-picker__sigline {
	display: block;
	width: 120px;
	height: 1px;
	margin: 31px auto 0; /* 31 + 1 + 8 = the 40px "signed" always had: the line sits in it */
	background: var(--ek-veld-gold-a70);
}
.ek-picker__signed {
	margin: 8px 0 0;
	font-family: var(--ek-font-serif);
	font-style: italic;
	font-size: 18px;
	line-height: 28px;
	color: var(--ek-picker-muted-dark);
}
/* Under the card: what the chosen number means (or "Choose your number"). */
.ek-picker__status {
	margin: 16px 0 0;
	font-size: 16px;
	line-height: 24px;
	color: var(--ek-ink);
}
.ek-picker__status[data-status]:not([data-status="free"]) { color: var(--ek-picker-muted); }
/* No number chosen yet: Skye's sample 014, quiet. */
.ek-picker__number[data-empty] { opacity: 0.35; }
/* Card option A: the EK seal, following the number's state. */
.ek-picker__seal { display: block; margin: 16px auto 0; overflow: visible; }
.ek-picker__seal circle { fill: var(--ek-gold-light); fill-opacity: 0; stroke: var(--ek-gold-light); transition: fill-opacity 250ms ease, stroke 250ms ease; }
.ek-picker__seal .ek-picker__seal-fill,
.ek-picker__seal .ek-picker__seal-half { stroke: none; }
.ek-picker__seal-ring { stroke-width: 1; }
.ek-picker__seal-inner { stroke-width: 0.75; stroke-opacity: 0.7; }
.ek-picker__seal-mono {
	font-family: var(--ek-font-serif);
	font-weight: var(--ek-weight-medium);
	font-size: 15px;
	letter-spacing: 0.04em;
	fill: var(--ek-gold-light);
	transition: fill 250ms ease;
}
.ek-picker__card[data-status="held"] .ek-picker__seal-half { fill-opacity: 0.5; }
.ek-picker__card[data-status="held"] .ek-picker__seal-ring { stroke-dasharray: 3 2.4; }
.ek-picker__card[data-status="taken"] .ek-picker__seal-fill { fill-opacity: 1; }
.ek-picker__card[data-status="taken"] .ek-picker__seal-inner { stroke: var(--ek-earth-dark); stroke-opacity: 1; }
.ek-picker__card[data-status="taken"] .ek-picker__seal-mono { fill: var(--ek-earth-dark); }
.ek-picker__card[data-status="reserved"] .ek-picker__seal-inner { stroke-dasharray: 1.5 2; stroke-opacity: 1; }
.ek-picker__card[data-status="reserved"] .ek-picker__seal-mono { font-style: italic; }

/* Card option B: a strip of the official cover along the frame's bottom (CSS crop only). */
.ek-picker__strip { height: 64px; margin: 24px -32px -32px; overflow: hidden; }
.ek-picker__strip-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; }
/* --- The questions --------------------------------------------------- */
/* "Start with one": four choices that read as buttons (Skye, 10 Nov):
   always two by two, both rows the same height, a 1px border each, a
   radio-style marker on the right; the active one is sage with a 2px gold
   bar along its top and a filled gold marker. */
.ek-picker__start {
	margin: 0;
	font-family: var(--ek-font-sans);
	font-size: 14px;
	line-height: 20px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ek-picker-muted);
}
.ek-picker__questions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: 1fr;
	gap: 8px;
	margin-top: 12px;
}
.ek-picker__question {
	position: relative;
	display: block;
	margin: 0;
	padding: 16px 40px 16px 16px; /* the marker sits in the right padding */
	border: 1px solid var(--ek-field-border);
	border-radius: 0;
	background: var(--ek-linen);
	color: var(--ek-picker-muted);
	font-family: var(--ek-font-serif);
	font-size: 20px;
	line-height: 1.25;
	text-align: left;
	cursor: pointer;
	transition: background-color var(--ek-duration) ease, border-color var(--ek-duration) ease, color var(--ek-duration) ease;
}
.ek-picker__q-text { display: block; }
.ek-picker__q-mark {
	position: absolute;
	top: 21px;
	right: 16px;
	box-sizing: border-box;
	width: 14px;
	height: 14px;
	border: 1.5px solid var(--ek-field-border);
	border-radius: 50%;
	transition: background-color var(--ek-duration) ease, border-color var(--ek-duration) ease;
}
.ek-picker__question:hover { background: var(--ek-sage-wash-light); border-color: var(--ek-veld-gold); }
.ek-picker__question[aria-pressed="true"] { background: var(--ek-sage-wash); color: var(--ek-ink); }
.ek-picker__question[aria-pressed="true"]::before {
	content: "";
	position: absolute;
	top: -1px;
	right: -1px;
	left: -1px;
	height: 2px;
	background: var(--ek-veld-gold);
}
.ek-picker__question[aria-pressed="true"] .ek-picker__q-mark { border-color: var(--ek-veld-gold); background: var(--ek-veld-gold); }

.ek-picker__panel {
	margin-top: 8px;
	padding: 32px 24px;
	background: var(--ek-sage-wash);
}
.ek-picker__mode[hidden] { display: none; }
.ek-picker__hint {
	margin: 0;
	font-family: var(--ek-font-serif);
	font-style: italic;
	font-size: 20px;
	line-height: 28px;
	color: var(--ek-picker-muted);
}
.ek-picker__fields {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	margin-top: 24px;
}
.ek-picker__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 14px;
	line-height: 20px;
	color: var(--ek-picker-muted);
}
/* The site's form fields (Contact, sign-up): square, hairline, paper fill. */
.ek-picker__input {
	box-sizing: border-box;
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--ek-field-border);
	border-radius: 0;
	background: var(--ek-paper);
	color: var(--ek-ink);
	font-family: var(--ek-font-sans);
	font-size: 16px;
	transition: border-color var(--ek-duration) ease, background-color var(--ek-duration) ease;
}
.ek-picker__input:focus { border-color: var(--ek-gold-accent); background: var(--ek-white); }
.ek-picker__input--day { width: 80px; }
.ek-picker__input--house { width: 128px; }
.ek-picker__input--year { width: 112px; }
.ek-picker__input::placeholder { color: var(--ek-picker-muted); }
.ek-picker__select { position: relative; display: inline-block; }
.ek-picker__select select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 36px;
	cursor: pointer;
}
.ek-picker__select::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 14px;
	width: 7px;
	height: 7px;
	margin-top: -6px;
	border-right: 1.5px solid var(--ek-ink);
	border-bottom: 1.5px solid var(--ek-ink);
	transform: rotate(45deg);
	pointer-events: none;
}

/* Suggestions: one column of paper rows. */
.ek-picker__suggestions {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}
.ek-picker__empty { font-size: 16px; color: var(--ek-picker-muted); }
.ek-picker__row {
	display: flex;
	align-items: baseline;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	border: 1px solid transparent;
	border-radius: 0;
	background: var(--ek-linen);
	color: var(--ek-ink);
	font-family: var(--ek-font-sans);
	text-align: left;
	cursor: pointer;
	transition: border-color var(--ek-duration) ease;
}
.ek-picker__row:hover { border-color: var(--ek-veld-gold); }
.ek-picker__row[aria-pressed="true"] { border-color: var(--ek-ink); }
.ek-picker__row-n {
	flex: 0 0 56px;
	font-family: var(--ek-font-serif);
	font-weight: var(--ek-weight-medium);
	font-size: 30px;
	line-height: 36px;
	font-variant-numeric: lining-nums;
}
.ek-picker__row-n:not([data-status="free"]) { color: var(--ek-picker-muted); }
.ek-picker__row-n[data-status="taken"] { text-decoration: line-through; }
.ek-picker__row-why {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	font-size: 16px;
	line-height: 24px;
	color: var(--ek-picker-muted);
	white-space: nowrap;
	text-overflow: ellipsis;
}
.ek-picker__row-status {
	flex: 0 0 auto;
	font-size: 14px;
	line-height: 20px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--ek-picker-muted);
}
/* --- Buttons on paper (closest numbers) and focus ---------------------- */
.ek-picker__closest-btn {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 14px;
	border: 1px solid var(--ek-earth-mid);
	border-radius: 0;
	background: transparent;
	color: var(--ek-on-dark);
	font-family: var(--ek-font-sans);
	font-weight: var(--ek-weight-medium);
	font-size: 14px;
	cursor: pointer;
	transition: border-color var(--ek-duration) ease;
}
@media (hover: hover) and (pointer: fine) {
	.ek-picker__closest-btn:hover { border-color: var(--ek-veld-gold); }
}
.ek-picker__question:focus-visible,
.ek-picker__row:focus-visible,
.ek-picker__input:focus-visible {
	outline: 2px solid var(--ek-focus);
	outline-offset: 2px;
}
.ek-picker__question:focus-visible { outline-offset: -2px; }
.ek-picker__closest-btn:focus-visible,
.ek-picker__bar-reserve:focus-visible { outline: 2px solid var(--ek-on-dark); outline-offset: 2px; }

/* --- The bar: the chosen number and the one Order button --------------
   Every width. On the page it is fixed to the bottom of the screen; in the
   popup, pinned to the popup's bottom. */
.ek-picker__bar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 50;
	border-top: 1px solid var(--ek-earth-mid);
	background: var(--ek-earth-dark);
	color: var(--ek-on-dark);
}
.ek-picker__bar-inner {
	max-width: calc(var(--ek-grid) + 2 * var(--ek-edge));
	margin: 0 auto;
	padding: 12px var(--ek-edge) calc(12px + env(safe-area-inset-bottom, 0px));
}
.ek-picker__bar-preview,
.ek-picker__bar-mine { margin: 0 0 8px; font-size: 14px; line-height: 20px; color: var(--ek-on-dark); }
.ek-picker__bar-preview:empty,
.ek-picker__bar-mine[hidden] { display: none; }
.ek-picker__closest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.ek-picker__closest[hidden] { display: none; }
.ek-picker__closest-label { font-size: 14px; color: var(--ek-picker-muted-dark); }
.ek-picker__bar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; }
.ek-picker__bar-number { min-width: 0; margin: 0; font-size: 16px; }
.ek-picker__bar-prompt { font-family: var(--ek-font-serif); font-style: italic; font-size: 22px; line-height: 28px; color: var(--ek-on-dark); }
.ek-picker__bar-prompt[hidden],
.ek-picker__bar-chosen[hidden] { display: none; }
.ek-picker__bar-chosen { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.ek-picker__bar-no { font-family: var(--ek-font-serif); font-style: italic; font-size: 20px; color: var(--ek-gold-light); }
.ek-picker__bar-digits {
	font-family: var(--ek-font-serif);
	font-weight: var(--ek-weight-medium);
	font-size: 32px;
	line-height: 36px;
	font-variant-numeric: lining-nums tabular-nums;
}
.ek-picker__bar-status { margin-left: 6px; font-size: 14px; line-height: 20px; color: var(--ek-picker-muted-dark); }
.ek-picker__bar[data-status="free"] .ek-picker__bar-status { color: var(--ek-gold-light); }
.ek-picker__bar-reserve {
	flex: 0 0 auto;
	min-height: 48px;
	padding: 12px 28px;
	border: 1px solid var(--ek-veld-gold);
	border-radius: 0;
	background: var(--ek-veld-gold);
	color: var(--ek-ink);
	font-family: var(--ek-font-sans);
	font-weight: var(--ek-weight-medium);
	font-size: 14px;
	line-height: 20px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	/* Fill, text and border change together (enabled <-> disabled too), so the label never sits ink-on-dark mid-fade. */
	transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, transform 160ms var(--ek-ease);
}
@media (hover: hover) and (pointer: fine) {
	.ek-picker__bar-reserve:hover:not(:disabled) { background: var(--ek-gold-hover); border-color: var(--ek-gold-hover); }
}
.ek-picker__bar-reserve:active:not(:disabled) { transform: scale(0.98); }
/* Disabled reads as disabled, not as a faded gold button: no fill, a dashed
   muted outline and muted text; the reason sits beside the number. */
.ek-picker__bar-reserve:disabled {
	border-style: dashed;
	border-color: var(--ek-on-dark-muted);
	background: transparent;
	color: var(--ek-on-dark-muted);
	cursor: not-allowed;
}

/* The page leaves room for the bar; on phones the site's header scrolls away
   instead of sticking, so only one bar sticks. */
body.ek-picker-page { padding-bottom: var(--ek-picker-bar-space, 73px); }
/* Keyboard focus never lands under the bar (or the popup's top bar). */
html:has(body.ek-picker-page) { scroll-padding-bottom: var(--ek-picker-bar-space, 73px); }
.ek-picker-dialog { scroll-padding-top: var(--ek-picker-top-h); scroll-padding-bottom: var(--ek-picker-bar-space, 73px); }
@media (max-width: 1024px) {
	body.ek-picker-page .site-header[data-sticky] { position: relative; top: auto; transform: none; box-shadow: none; }
	html:has(body.ek-picker-page) { scroll-padding-top: 0; }
}

/* --- Popup (the order buttons, while the picker is switched on) -------
   A native <dialog> (showModal): the page behind is inert; the dialog
   scrolls inside. Desktop: centred, the site grid wide, 90% of the screen
   high, over the dimmed page. Phones: full screen. The bar is pinned to the
   popup's bottom. Opening and closing motion: assets/js/number-picker.js. */
.ek-picker-dialog {
	--ek-picker-top-h: 61px;
	box-sizing: border-box;
	width: min(calc(var(--ek-grid) + 2 * var(--ek-edge)), calc(100vw - 48px));
	max-width: none;
	height: 90vh;
	max-height: 90vh;
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--ek-linen);
	color: var(--ek-ink);
	overflow: auto;
	overscroll-behavior: contain;
	box-shadow: 0 24px 64px var(--ek-book-shadow-a45);
}
.ek-picker-dialog[open] { display: flex; flex-direction: column; }
.ek-picker-dialog::backdrop { background: var(--ek-ink-home-a64); }
html.ek-picker-locked { overflow: hidden; }
.ek-picker-dialog__top {
	position: sticky;
	top: 0;
	z-index: 3;
	box-sizing: border-box;
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--ek-picker-top-h);
	padding: 8px var(--ek-edge);
	border-bottom: 1px solid var(--ek-earth-mid);
	background: var(--ek-earth-dark);
}
.ek-picker-dialog__title {
	margin: 0;
	font-family: var(--ek-font-serif);
	font-weight: var(--ek-weight-medium);
	font-size: 26px;
	line-height: 1.15;
	color: var(--ek-on-dark);
}
.ek-picker-dialog__close {
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--ek-earth-mid);
	border-radius: 0;
	background: transparent;
	color: var(--ek-on-dark);
	font-family: var(--ek-font-sans);
	font-weight: var(--ek-weight-medium);
	font-size: 14px;
	cursor: pointer;
	transition: border-color var(--ek-duration) ease;
}
@media (hover: hover) and (pointer: fine) {
	.ek-picker-dialog__close:hover { border-color: var(--ek-veld-gold); }
}
.ek-picker-dialog__close:focus-visible { outline: 2px solid var(--ek-on-dark); outline-offset: 2px; }
.ek-picker--dialog { flex: 1 0 auto; }
/* In the popup the bar is fixed to the popup's bottom edge (phones: the
   screen's), so it comes right after the grid in keyboard order and still
   stays in view over Skye's helper. The popup keeps room for it. */
.ek-picker--dialog { padding-bottom: var(--ek-picker-bar-space, 73px); }
.ek-picker--dialog .ek-picker__sheet { padding-top: 16px; }

/* The numbered product page: the order button is a link to the picker. */
.woocommerce div.product .ek-picker-cart { display: flex; margin: var(--ek-space-2) 0 0; }
.woocommerce div.product .ek-picker-cart .single_add_to_cart_button { flex: 1 1 12rem; }

@media (max-width: 1024px) {
	.ek-picker-dialog {
		width: 100%;
		height: 100%;
		max-height: none;
		margin: 0;
		box-shadow: none;
	}
	.ek-picker-dialog__top { padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
}
/* Desktop popup: centred, 90vh high, so its bottom edge is 5vh up. */
@media (min-width: 1025px) {
	.ek-picker--dialog .ek-picker__bar {
		right: auto;
		bottom: 5vh;
		left: 50%;
		width: min(calc(var(--ek-grid) + 2 * var(--ek-edge)), calc(100vw - 48px));
		transform: translateX(-50%);
	}
}

/* Phones: two lines at most at 390 ("What happened" needs 124px); the bar's
   button keeps its room, the number's state wraps under it. */
@media (max-width: 767px) {
	.ek-picker__question { padding: 14px 28px 14px 12px; }
	.ek-picker__q-mark { top: 19px; right: 10px; }
	.ek-picker__sheet-title { font-size: 26px; }
	.ek-picker__legend { gap: 2px 14px; font-size: 13px; }
	.ek-picker__count { margin-left: 0; font-size: 13px; }
	.ek-picker__bar-inner { padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
	.ek-picker__bar-row { gap: 12px; }
	.ek-picker__bar-digits { font-size: 28px; line-height: 32px; }
	.ek-picker__bar-status { margin-left: 0; flex-basis: 100%; font-size: 13px; line-height: 18px; }
	.ek-picker__bar-prompt { font-size: 20px; }
	.ek-picker__bar-reserve { padding: 12px 18px; letter-spacing: 0.08em; }
	.ek-picker-dialog__title { font-size: 22px; }
	.ek-picker__title { font-size: 24px; }
	/* Skye's card, a little more compact so her questions follow sooner. */
	.ek-picker__frame { padding: 28px 20px 24px; }
	.ek-picker__number-row { margin-top: 20px; }
	.ek-picker__number { font-size: 88px; }
	.ek-picker__no { font-size: 30px; }
	.ek-picker__of { font-size: 21px; }
	.ek-picker__sigline { margin-top: 20px; }
	.ek-picker__help-body { gap: 28px; }
	.ek-picker__pull { font-size: 18px; line-height: 24px; }
}

@media (min-width: 768px) {
	.ek-picker__row { gap: 16px; }
	.ek-picker__row-n { flex-basis: 64px; }
	.ek-picker__row-status { letter-spacing: 0.12em; }
	.ek-picker__grid { grid-template-columns: repeat(25, minmax(0, 1fr)); }
	.ek-picker__cell { font-size: 16px; }
}

@media (min-width: 1025px) {
	.ek-picker__sheet-title { flex: 0 0 auto; font-size: 34px; }
	.ek-picker__cell { height: 42px; font-size: 18px; }
	.ek-picker__help-body { grid-template-columns: 340px minmax(0, 1fr); gap: 56px; align-items: start; }
	.ek-picker__number { font-size: 128px; }
}
/* Short laptop screens: the whole sheet and the bar in one view. */
@media (min-width: 1025px) and (max-height: 800px) {
	.ek-picker__cell { height: 38px; }
	.ek-picker__sheet { padding-top: 12px; padding-bottom: 20px; }
	.ek-picker__grid { margin-top: 12px; }
	.ek-picker__bar-inner { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}
/* A 720px laptop under the site's full header (about 250px): 34px rows keep
   all 25 x 10 above the bar. */
@media (min-width: 1025px) and (max-height: 760px) {
	.ek-picker__cell { height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
	.ek-picker__reel,
	.ek-picker__number,
	.ek-picker__seal circle,
	.ek-picker__seal-mono,
	.ek-picker__q-mark,
	.ek-picker__question,
	.ek-picker__row,
	.ek-picker__cell,
	.ek-picker__input,
	.ek-picker__bar-reserve { transition: none; }
	.ek-picker__bar-reserve:active:not(:disabled) { transform: none; }
	.ek-picker__cell[data-status="held"]::before { animation: none; }
}
