/*
Theme Name:   Mochi Moon
Description:  GeneratePress child theme for a Japanese dessert shop. Palette,
              typography and spacing are set in theme.json; venue values and
              today's batch render through Block Bindings from nlv-core.
Author:       NovelLogic
Author URI:   https://novellogic.ca
Template:     generatepress
Version:      0.2.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  nlv-mochimoon
*/

/* ---------------------------------------------------------------------------
 * WHAT LIVES HERE AND WHAT LIVES IN theme.json
 *
 * theme.json is the single source of design truth: palette, type scale,
 * spacing, the content/wide measures, and the @font-face rules. Everything it
 * can express belongs there, because those values reach the block editor as
 * well as the front end, so an editor sees what a visitor will see.
 *
 * This file holds only what theme.json cannot express: the parent-theme
 * container reset, the visible hairline grid, the rounded photo card, the jump
 * rail, the sold-out treatment, and the per-field text colours that keep the
 * story beats readable.
 *
 * ASSET VERSIONING: do not add a hand-written version constant for this file.
 * functions.php versions it with filemtime(). Demo 1 shipped a hand-bumped
 * constant alongside Cache-Control: max-age=31536000 and a layout fix appeared
 * not to deploy for a year.
 * ------------------------------------------------------------------------ */


/* ===========================================================================
 * 1. PARENT CONTAINER RESET
 *
 * GeneratePress wraps the content in a white, padded, max-width container. The
 * full-bleed colour bands break OUT of it horizontally, but the container
 * itself still painted a white frame across the top of every page - so Story
 * and Visit read as two design systems fighting: a white document with
 * coloured panels punched through it.
 *
 * This site has no document frame. The page ground is `kinu` and the bands sit
 * on it edge to edge. Zeroing the padding and clearing the background is what
 * makes the bleed sections consistent from the first pixel down.
 *
 * Selectors are matched at GeneratePress's own specificity. `.one-container
 * .site-content` is (0,2,0) and beats a bare `.site-content`; demo 1 lost that
 * tie once already and the fix appeared not to work.
 * ======================================================================== */

body,
.site,
.site-content,
.one-container .site-content,
.separate-containers .site-main,
.separate-containers .inside-article,
.one-container .inside-article,
.inside-article,
.entry-content {
	background-color: transparent;
	box-shadow: none;
	border-radius: 0;
}

body {
	background-color: var(--wp--preset--color--kinu);
}

.one-container .site-content,
.separate-containers .site-main,
.separate-containers .inside-article,
.one-container .inside-article {
	padding: 0;
	margin: 0;
}

/* A full-bleed band that opens a page must meet the header, not float below a
 * residual strip of page background. */
.entry-content > .alignfull:first-child,
.entry-content > .wp-block-group.alignfull:first-child {
	margin-top: 0;
}

/* The parent theme's own page-title header. The real removal is the
 * `generate_show_title` filter in inc/layout.php - killing it there keeps it
 * out of the DOM, which matters because the hero display line is already the
 * page's h1 and a second one is an accessibility and SEO fault, not just a
 * visual one. This rule is a belt-and-braces visual fallback for the case
 * where the filter does not take. */
.page .entry-header .entry-title,
.page .page-header-content .page-title {
	display: none;
}


/* ===========================================================================
 * 1b. FULL-BLEED WITHOUT vw  -  the horizontal-scroll fix
 *
 * Every page scrolled horizontally. Two independent GeneratePress causes, both
 * measured in a headless render rather than inferred:
 *
 *   (a) .no-sidebar .entry-content .alignfull uses
 *       `margin-left: calc(-100vw / 2 + 100% / 2); max-width: 100vw`.
 *       100vw INCLUDES the classic scrollbar; the content box does not. Measured
 *       at 1920: the band computed 1920px wide inside a 1905px client width -
 *       15px of overflow, on every page that has a band, which is all of them.
 *
 *   (b) .entry-content .alignwide uses `width: calc(100% + 80px)` - GP's legacy
 *       assumption of 40px container padding, against this theme's
 *       clamp(20px, 5vw, 80px). Measured overflow 8px @1440, 16px @1280,
 *       40px @390, and it CLIPPED text: the Visit contact column ran past the
 *       viewport edge mid-sentence.
 *
 * THE FIX REMOVES vw FROM THE MATH ENTIRELY, by removing the reason it was
 * needed. The 1200px cap lives on the outer page wrapper `.site.grid-container`.
 * Free that, and .entry-content is already the full width of the viewport, so a
 * full-bleed band needs no negative margin at all - just `width: 100%`.
 *
 * The header, nav and footer are unaffected because each carries its OWN
 * .grid-container (.inside-header, .inside-navigation, .inside-site-info) with
 * its own 1200px cap. Verified in the markup before relying on it.
 *
 * NOT DONE, deliberately: `body { overflow-x: clip }`. It hides (a) and leaves
 * (b)'s clipped sentence clipped - the text would still be unreachable, just
 * without a scrollbar to prove it.
 *
 * REJECTED, Chrome's proposed
 *   .no-sidebar .entry-content .alignfull {
 *       margin-inline: calc(var(--wp--style--root--padding-left) * -1) }
 * The variable does resolve here (it inherits from body), so it would not fail
 * loudly - it would fail quietly. With the 1200px cap still in place the bands
 * would compute 1200 + 2x80 = 1360px wide instead of full-bleed, silently
 * un-bleeding every colour field on the site.
 *
 * Doubled class selectors are for specificity: GP's rules are (0,3,0) and
 * (0,2,0), and matching them exactly would leave the result to source order.
 * ======================================================================== */

.site.grid-container {
	max-width: none;
}

.entry-content .alignfull.alignfull {
	margin-left: 0;
	margin-right: 0;
	width: 100%;
	max-width: none;
}

.entry-content .alignwide.alignwide {
	width: auto;
	max-width: var(--wp--style--global--wide-size, 1360px);
	margin-inline: auto;
}


/* ===========================================================================
 * 2. TYPOGRAPHY
 *
 * The scale lives in theme.json. What is here is the handful of relationships
 * it cannot express.
 *
 * SYNE IS DISPLAY ONLY. It is an ExtraBold with wide, idiosyncratic lowercase
 * forms that stop being legible below roughly 24px - so it carries display
 * lines and section heads and nothing else. Navigation, body, buttons, labels,
 * the jump rail and every piece of UI text are Schibsted Grotesk. That split is
 * the reason the site ships two families rather than one.
 * ======================================================================== */

body,
.main-navigation a,
.main-navigation .menu-toggle,
button,
input,
select,
textarea,
.wp-element-button {
	font-family: var(--wp--preset--font-family--body);
}

body {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.65;
}

/* Nav is body face, not display: Syne at nav size is a legibility problem, and
 * a nav that is hard to read is a navigation problem. */
.main-navigation .main-nav ul li a {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.02em;
}

.site-footer,
.mm-fineprint,
.mm-item__note {
	font-size: var(--wp--preset--font-size--small);
}

/* Display lines. Lowercase, centred, tight. The negative tracking and the
 * sub-1 line-height are properties of the composition rather than of the size
 * token, so they are here rather than in theme.json's presets.
 *
 * ⚠️ WHY THE MAX-WIDTH AND THE overflow-wrap ARE BOTH REQUIRED
 *
 * The h1 was breaking mid-word - "made this morni / ng", "everythi / ng we
 * make". Two things combined:
 *
 *   1. PERMISSION. GeneratePress's main.min.css carries
 *      `.entry-header,.site-content{word-wrap:break-word}`, which inherits down
 *      to the heading. That is the legacy alias for overflow-wrap:break-word,
 *      which breaks a word ONLY when it cannot fit its line.
 *
 *   2. CAUSE. The heading is a child of an is-layout-constrained group, so WP
 *      capped it at contentSize - 720px - while Syne ExtraBold is very wide:
 *      "morning" measures 6.42em and "everything" 8.17em, so at the old 136px
 *      maximum they needed 873px and 1111px. The word could not fit, so rule 1
 *      broke it.
 *
 * Widening the measure alone is not enough, and shrinking the type alone is not
 * enough. Both are fixed, and overflow-wrap is reset to `normal` so that if a
 * word ever does exceed its line again it OVERFLOWS visibly instead of breaking
 * silently - a loud failure rather than a quiet one that reads as a typo.
 *
 * The selector is (0,2,0) deliberately: WP's constrained-layout rule is
 * `.is-layout-constrained > :where(…)`, where :where() contributes nothing, so
 * a single class would tie and lose on source order.
 *
 * Measured against the real font metrics, the narrowest headroom across every
 * display line at 1920 / 1440 / 1280 / 768 / 390 is 64px. */
.mm-display {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	text-transform: lowercase;
	letter-spacing: -0.02em;
	line-height: 0.92;
	text-align: center;
	text-wrap: balance;
	margin-block: 0 0.25em;
}

.entry-content .mm-display,
.wp-block-group .mm-display {
	/* 1100px, not wideSize. The longest word on the site ("everything") renders
	 * 842px at its maximum size, so 1100 is ample - and the extra 260px that
	 * wideSize would have taken is exactly the margin the jump rail needs to
	 * sit beside the composition instead of inside it. A display line wide
	 * enough to touch the rail is wider than it needs to be. */
	max-width: 1100px;
	margin-inline: auto;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: manual;
}

/* A lead paragraph directly under a display line.
 *
 * On Story the intro sat at body size and contentSize width beneath a 104px
 * headline, which read as cramped rather than quiet. It is a lead, so it takes
 * the lead size, a looser line-height and a measure wide enough not to look
 * like a caption under the headline. The story beats keep their tighter 34ch
 * because `.mm-field p` is more specific. */
.entry-content .mm-display + p {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	max-width: 62ch;
	margin-inline: auto;
	text-wrap: pretty;
}

/* A spacer with nothing after it is dead weight. b_card() returns an empty
 * string until the photography exists, so the hero's trailing spacer is
 * currently padding a gap below nothing. */
.wp-block-group > .wp-block-spacer:last-child {
	display: none;
}

/* Section heads: display face, but uppercase and tracked OUT, which is the one
 * place Syne's width is an asset rather than a liability. */
.mm-menu-section > .wp-block-heading {
	font-family: var(--wp--preset--font-family--display);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.mm-subline {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--large);
	opacity: 0.72;
	margin-block: 0.25em 1.5em;
}

/* The story beats were reading as headlines with footnotes: a 136px line over
 * 19px body. The supporting line is a LEAD, not body copy, so it takes the
 * lead size and a measure that stops it running the full width of a band. */
.mm-field p {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	max-width: 34ch;
	margin-inline: auto;
	text-wrap: pretty;
}

.mm-eyebrow {
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
	opacity: 0.7;
}


/* ===========================================================================
 * 2b. THE HEADER LOCKUP
 *
 * The mark sits INSIDE GeneratePress's existing site-title link, beside the
 * wordmark - see the generate_site_title_output filter in inc/branding.php for
 * why it is one link and not two.
 *
 * THE WORDMARK IS STILL TEXT. Only the drawing is a graphic. It stays
 * selectable, translatable, searchable and restylable, and it is what a screen
 * reader announces; the SVG is aria-hidden.
 *
 * ⚠️ THE HEADER WRAPPERS ARE LOAD-BEARING NOW.
 *
 * Section 1b freed the 1200px cap on `.site.grid-container` so full-bleed bands
 * need no vw math. The header did not move, because it carries its OWN
 * .grid-container (.inside-header). Nothing here may touch that element's
 * width, padding or max-width - widen it and the bands and the header stop
 * agreeing about where the page edge is, which is the bug section 1b fixed.
 * Everything below styles the contents of the branding block and nothing else.
 *
 * VERIFIED, not assumed. Four pages x 11 widths (320 to 1920) x with-mark and
 * without, rendered against the live parent CSS with scrollbars ENABLED:
 * 88/88 clean on scrollWidth === clientWidth, .inside-header the same width to
 * the hundredth of a pixel in every pair, and .site-header still 100px tall -
 * the mark is 42px and the nav row was already taller than that, so the header
 * did not grow.
 *
 * ⚠️ 320px IS THE TIGHT ONE. The branding block goes from 150.6px to 200.1px,
 * which leaves 4.9px between it and the mobile toggle. It fits, and it still
 * fits in the fallback face before the webfont swaps in (5.6px, measured -
 * system-ui is fractionally narrower here than Schibsted). Anything that makes
 * this lockup wider - a longer site name, a bigger mark, more gap - spends that
 * 4.9px first. Re-measure at 320 before changing any of the three.
 *
 * SIZED IN em, NOT px. The em is .main-title's 25px. GeneratePress exposes that
 * as a customiser value, so a px mark would silently stop matching the wordmark
 * the first time anyone changed the title size - a second place holding the
 * same decision, which is the footgun --mm-header-h exists to avoid.
 * ======================================================================== */

/* THE HEADER GROUND.
 *
 * GeneratePress paints .site-header AND .main-navigation with var(--base-3),
 * which resolves to #ffffff. The page ground is kinu, so the header sat as a
 * white band across the top of a cream page - the same document-frame problem
 * section 1 removed from the content area, still present in the chrome.
 *
 * The mark made it impossible to ignore rather than causing it: the dome's
 * #F0EDE6 fill against #ffffff reads as a grey blob, and against kinu it does
 * not. Fixing the ground fixes the mark.
 *
 * ALL THREE elements, not just the header. This site is nav-float-right, so
 * .main-navigation is a child of .inside-header carrying its own background -
 * paint only .site-header and a white panel stays behind the menu. Submenu
 * backgrounds are left alone; this site's nav is four flat pages deep.
 *
 * .site-info was missed the first time and was then the ONLY near-white
 * element left in the document: a scan of every element on all four pages for
 * a background with R, G and B all above 245 returned exactly one hit. It is
 * worst on Home, where the white met the usagi band rather than kinu.
 *
 * Doubled classes for (0,2,0). GeneratePress emits these as inline CSS in the
 * head and this stylesheet happens to load after it today, so (0,1,0) would
 * win on source order - but that is an accident, not a rule, and it is a tie
 * this theme has already lost once. See section 1.
 */
.site-header.site-header,
.main-navigation.main-navigation,
.site-info.site-info {
	background-color: var(--wp--preset--color--kinu);
}

/* THE CURRENT AND HOVERED NAV ITEM.
 *
 * GeneratePress points both at var(--accent), which is its default #1E73BE -
 * a blue belonging to no part of this palette, on the one word in the header
 * that tells you where you are.
 *
 * ⚠️ IT IS ALSO AN ACCESSIBILITY FAILURE, not only a wrong colour. Measured
 * against the kinu ground: #1E73BE is 4.31:1, under the 4.5:1 WCAG AA floor
 * for normal text. ichigo is 5.23:1 and passes. The other nav links are
 * GP's --contrast #222222 at 13.89:1 and are left alone; moving those to sumi
 * is a separate decision and buys 1.9 points nobody needs.
 *
 * ichigo, not sumi, because sumi is what the other links already are - a
 * current item painted the same colour as its neighbours is not a current
 * item, and distinguishing it by weight instead would be a second rule and a
 * second decision.
 *
 * SPECIFICITY, COUNTED NOT GUESSED. GeneratePress's rules are:
 *   .main-navigation .main-nav ul li[class*="current-menu-"] > a       (0,3,3)
 *   .main-navigation .main-nav ul li:not([class*="…"]):hover > a       (0,4,3)
 * The :not() argument counts even though :not() itself does not, which is what
 * makes the hover rule the heavier of the two. Doubling .main-navigation adds
 * one, so these land at (0,4,3) and (0,5,3) and win outright rather than by
 * source order. Hovering the current item is covered by the first selector,
 * because GP excludes it from the second. */
.main-navigation.main-navigation .main-nav ul li[class*="current-menu-"] > a,
.main-navigation.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a,
.main-navigation.main-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a,
.main-navigation.main-navigation .main-nav ul li.sfHover:not([class*="current-menu-"]) > a {
	color: var(--wp--preset--color--ichigo);
}

/* THE RESTING NAV LINKS AND THE TOGGLE, AT EVERY WIDTH.
 *
 * GeneratePress paints both var(--contrast), its stock #222222 - the last GP
 * grey in the header. Sumi is 15.81:1 on kinu against #222's 13.89; the ratio
 * was never the problem, the stray value was.
 *
 * SPECIFICITY, COUNTED. GP's rules are
 *   .main-navigation .main-nav ul li a, .main-navigation .menu-toggle   (0,2,2) / (0,2,0)
 *   button.menu-toggle:hover, button.menu-toggle:focus                  (0,2,1)
 * so these land at (0,3,2) and (0,3,0) and win on weight. They stay BELOW the
 * current/hover rule above, (0,4,3) and (0,5,3), which is what keeps the ichigo
 * current item ichigo - that ordering is load-bearing, not incidental. */
.main-navigation.main-navigation .main-nav ul li a,
.main-navigation.main-navigation .menu-toggle {
	color: var(--wp--preset--color--sumi);
}

.main-title a {
	display: inline-flex;
	align-items: center;
	/* Optical, not geometric. The artwork carries 49/512 of its own side
	 * padding - 9.6%, about 4px at this size - so the drawn gap is this value
	 * PLUS that. 0.3em here reads as roughly 12px between dome and M. */
	gap: 0.3em;
}

/* The wordmark half of the lockup. min-width:0 so that when the header gets
 * narrow this is what gives, rather than the flex row refusing to shrink and
 * pushing the mobile toggle off the end. */
.mm-lockup__text {
	min-width: 0;
}

/* ⚠️ THE BOX IS NOT THE MARK.
 *
 * mochi-moon-full-colour.svg draws into a 512 viewBox but its ink occupies only
 * x[49..462] y[68..408] - measured by rasterising it and scanning the alpha
 * channel, not estimated. So the drawing is 80.9% of the box wide and 66.6% of
 * it tall, and a "44px mark" is really a 29px one.
 *
 * 1.68em of a 25px title = 42px box = 28px of actual ink. Rendered and
 * measured against the wordmark beside it: 28px of mark to 21px of ascender,
 * a ratio of 1.33, and an optical gap of 12px from dome edge to the M.
 * Re-derive the 1.68 if the artwork is ever reframed; do not keep the number
 * and change the drawing.
 *
 * The viewBox is deliberately unchanged. There is no clipping: the ink clears
 * every edge by 49 at the sides, 68 at the top and 103 at the bottom. And the
 * whole brand set shares that framing - the favicon cut has the same 512 box,
 * and favicon-16/32/48.png were rasterised from it, so re-cropping the SVG
 * would leave the tab icon and its own PNG fallbacks framed differently.
 * The bottom-heavy padding is handled below, where it costs something. */
.mm-mark {
	flex: none;
	width: 1.68em;
	height: 1.68em;
	/* The one thing the framing does cost. Padding is 68 above the ink and 103
	 * below it, so centring the BOX leaves the ink sitting 18/512 = 3.5% high.
	 * Measured against the wordmark's rendered ink, not guessed: with this nudge
	 * the two ink centres agree to within 0.5px at 1440 and at 390. */
	transform: translateY(3.5%);
}

/* GeneratePress sets .main-title{word-wrap:break-word}. With the mark taking
 * 42px off the line, a narrow header can now run out of room - and the break
 * must land between the two words, never inside one. "Moon" is ~60px at 25px
 * and always fits its own line, so normal wrapping is enough and break-word
 * only ever fires as a last resort we do not want. */
.main-title {
	overflow-wrap: normal;
	word-break: normal;
}


/* ===========================================================================
 * 2c. THE MOBILE MENU PANEL - an ink drop-down, not an overlay
 *
 * WHAT WAS WRONG. Below the breakpoint GeneratePress paints the open panel AND
 * the toggle with a hard-coded rgba(0, 0, 0, 0.02):
 *
 *   .mobile-menu-control-wrapper .menu-toggle{,:hover,:focus},
 *   .has-inline-mobile-toggle #site-navigation.toggled        (1,2,0)
 *
 * Over the kinu header that composites to #EFEAE1 - a panel and a button two
 * percent greyer than the page, which reads as a rendering fault rather than as
 * a surface. Section 2b's kinu rule is (0,2,0) and loses to the id outright.
 *
 * WHAT IT IS NOW. The toggle rests transparent. Open, it becomes a sumi square
 * and the panel hangs off its bottom edge with no gap, so the button reads as
 * the tab of the panel it opened. Links are the display face: Syne is legible
 * from ~24px (section 2) and these are 28px.
 *
 * ⚠️ 980 IS NLV_MM_NAV_BREAKPOINT, WRITTEN OUT BY HAND. A media query cannot read
 * a PHP constant. assets/js/mobile-nav.js repeats it too, for Escape and
 * focus-out; functions.php carries the warning. Change all three or none. Scoped because GeneratePress does not clear .toggled on resize - an
 * unscoped rule would leave an ink bar across the desktop header for anyone who
 * opened the menu and then widened the window.
 *
 * THE DESKTOP RULES ARE NOT TOUCHED. Everything below is inside the query AND
 * keyed on #mobile-menu-control-wrapper or #site-navigation.toggled, neither of
 * which exists as a painted surface above 980.
 *
 * CONTRAST ON SUMI, measured:
 *     kinu text         15.81
 *     tsuki underline   10.45   (tsuki is banned on kinu at 1.51 - never let a
 *                                rule here leak onto the light header)
 *     ichigo dot         3.03   non-text, >= 3:1 for a state indicator
 *                                (WCAG 1.4.11). Never text: ichigo on sumi is a
 *                                banned TEXT pairing - see section 3.
 * ======================================================================== */

@media (max-width: 980px) {

	/* The toggle at rest. (1,1,0) and (1,2,0) against GP's (0,2,0)/(0,3,0). */
	#mobile-menu-control-wrapper .menu-toggle,
	#mobile-menu-control-wrapper .menu-toggle:hover,
	#mobile-menu-control-wrapper .menu-toggle:focus {
		background-color: transparent;
		color: var(--wp--preset--color--sumi);
		border-radius: 0;
	}

	/* The toggle open. GP's menu.js sets aria-expanded on the button it was
	 * clicked from, so the state lives on the element being styled - no
	 * dependence on which ancestor GP decides to mark .toggled. Declared after
	 * the resting block so the (1,2,0) tie with :hover resolves to open. */
	#mobile-menu-control-wrapper .menu-toggle[aria-expanded="true"],
	#mobile-menu-control-wrapper .menu-toggle[aria-expanded="true"]:hover,
	#mobile-menu-control-wrapper .menu-toggle[aria-expanded="true"]:focus {
		background-color: var(--wp--preset--color--sumi);
		color: var(--wp--preset--color--kinu);
	}

	/* The global focus ring is currentColor. On the open toggle that is kinu,
	 * drawn OUTSIDE the button onto the kinu header - an invisible ring at the
	 * one moment a keyboard user needs it. Sumi in both states. */
	#mobile-menu-control-wrapper .menu-toggle:focus-visible {
		outline: 2px solid var(--wp--preset--color--sumi);
		outline-offset: 2px;
	}

	/* The panel. (1,3,0) beats GP's (1,2,0) background AND main.min.css's
	 * `margin-top: 1.5em` on the same selector - the margin is what opened a
	 * strip of header between the tab and the panel. Full width is GP's own
	 * flex-basis: 100% at this breakpoint; nothing here narrows it.
	 *
	 * THE 6px PADDING IS FOR THE FOCUS RING. The ring below is outset 2px + 2px
	 * wide, so it reaches 4px beyond its link. Without an inset the rows run
	 * edge to edge and the ring's sides, and the corners of the last row's
	 * ring past the 16px rounding, draw onto the kinu header - where tsuki is
	 * 1.51:1. 6px keeps the whole ring on sumi; with the links' 8px radius the
	 * last ring's corner arc sits ~1px inside the panel's. The dividers inset
	 * by the same 6px, which is also why they no longer meet the rounded
	 * corners. */
	.has-inline-mobile-toggle #site-navigation.main-navigation.toggled {
		background-color: var(--wp--preset--color--sumi);
		margin-top: 0;
		padding: 6px;
		border-radius: 0 0 16px 16px;
	}

	/* The links. (1,2,3) - the id is what beats the desktop current/hover rules
	 * at (0,4,3) and (0,5,3), so the current item is kinu in here rather than
	 * ichigo on sumi, which would fail. GP sets line-height: 60px on these; it
	 * is replaced with a real line-height plus padding so a two-line label, if
	 * one is ever added, does not render 120px tall. 28px x 1.2 + 24px = 57.6px
	 * tap target, over the 48px floor. */
	#site-navigation.toggled .main-nav ul li a {
		position: relative;
		display: flex;
		align-items: center;
		min-height: 48px;
		border-radius: 8px;
		padding: 0.75rem 20px;
		font-family: var(--wp--preset--font-family--display);
		font-weight: 800;
		font-size: 1.75rem;
		line-height: 1.2;
		letter-spacing: -0.01em;
		color: var(--wp--preset--color--kinu);
	}

	#site-navigation.toggled .main-nav ul li + li {
		border-top: 1px solid var(--wp--preset--color--hairline-d);
	}

	/* Hover and focus: a tsuki underline, text stays kinu. (1,3,3). */
	#site-navigation.toggled .main-nav ul li > a:hover,
	#site-navigation.toggled .main-nav ul li > a:focus {
		color: var(--wp--preset--color--kinu);
		text-decoration: underline;
		text-decoration-color: var(--wp--preset--color--tsuki);
		text-decoration-thickness: 2px;
		text-underline-offset: 0.18em;
	}

	/* Outset 2px. It stays on sumi only because of the panel's 6px padding
	 * above - remove that and the ring's sides land on the kinu header. The
	 * outline follows the link's 8px radius. */
	#site-navigation.toggled .main-nav ul li > a:focus-visible {
		outline: 2px solid var(--wp--preset--color--tsuki);
		outline-offset: 2px;
	}

	/* The current item: kinu like its neighbours, marked by an ichigo dot.
	 *
	 * ABSOLUTE, IN THE LEFT GUTTER. As an in-flow flex item the dot and its gap
	 * pushed "Home" 12px right of Menu, Story and Visit, so the four words had
	 * no common edge. Out of flow it sits centred in the link's 20px left
	 * padding - (20 - 8) / 2 = 6px - and moving the current page moves nothing
	 * else. */
	#site-navigation.toggled .main-nav ul li[class*="current-menu-"] > a::before {
		content: "";
		position: absolute;
		left: 6px;
		top: 50%;
		width: 8px;
		height: 8px;
		margin-top: -4px;
		border-radius: 50%;
		background: var(--wp--preset--color--ichigo);
	}
}


/* ===========================================================================
 * 3. COLOUR FIELDS - CONTRAST IS SET PER FIELD, NOT PER PALETTE
 *
 * b_story_beat() emits a background colour and no text colour, so every beat
 * inherited `sumi` body text. On the dark fields that produced near-black on
 * near-black: "then you cut it in half" and its closing line were effectively
 * invisible, and "then the paste" was dark on dark green.
 *
 * The fix derives the text colour from the field rather than loosening the
 * palette, because the palette values are measured and correct - it was the
 * pairing that was missing. Every combination below is >= 4.5:1:
 *
 *     field    text    ratio
 *     kinu     sumi    15.81
 *     usagi    sumi    13.74
 *     sumi     kinu    15.81
 *     matcha   kinu     8.45
 *     ichigo   kinu     5.23
 *
 * Banned pairings, for the record: ichigo on sumi (3.03) and tsuki on kinu
 * (1.51). Neither appears here and neither should be introduced.
 * ======================================================================== */

.mm-field--kinu,
.mm-field--usagi {
	color: var(--wp--preset--color--sumi);
}

.mm-field--sumi,
.mm-field--matcha,
.mm-field--ichigo {
	color: var(--wp--preset--color--kinu);
}

/* Headings inherit the field colour rather than the body default. */
.mm-field :is(h1, h2, h3, h4, h5, h6) {
	color: inherit;
}

/* Links on a dark field take the field's own text colour and lean on the
 * underline to distinguish themselves. Colouring them would mean auditing a
 * second ratio per field, and `ichigo` - the site's link colour - is 3.03:1 on
 * `sumi`, which fails. currentColor is AA by construction. */
.mm-field--sumi a,
.mm-field--matcha a,
.mm-field--ichigo a {
	color: inherit;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}


/* ===========================================================================
 * 4. THE GRID, MADE VISIBLE
 *
 * The ornament IS the grid. A repeating linear-gradient costs one paint and no
 * requests; the alternative is a background image of a grid, which is a
 * flattened picture of information - the same mistake as shipping a menu as a
 * PNG.
 *
 * Hairline colours are 1.47:1 (light) and 1.71:1 (dark). Decoration only; they
 * must never carry text.
 * ======================================================================== */

.mm-grid-rules {
	--mm-col-w: calc( 100% / 12 );
	background-image: repeating-linear-gradient(
		to right,
		var(--wp--preset--color--hairline-l) 0 1px,
		transparent 1px var(--mm-col-w)
	);
}

.mm-field--sumi .mm-grid-rules,
.mm-field--matcha .mm-grid-rules,
.mm-field--ichigo .mm-grid-rules {
	background-image: repeating-linear-gradient(
		to right,
		var(--wp--preset--color--hairline-d) 0 1px,
		transparent 1px var(--mm-col-w)
	);
}

.mm-rule,
.wp-block-separator.mm-rule {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--hairline-l);
	margin: 0;
	opacity: 1;
}


/* ===========================================================================
 * 5. THE PHOTO CARD
 *
 * Heavily rounded. Rounded corners are reserved for the photo card, the batch
 * tiles (16px) and batch chips (pills) in section 7, the mobile menu panel's
 * lower corners (16px, section 2c), and the /menu/ jump toggle (pill, section
 * 6); everything else stays square, and rules stay square and hairline-thin.
 * That contrast is what reads as architectural rather than soft - round
 * everything and it becomes cute, which the brief rules out.
 * ======================================================================== */

/* ⚠️ THE RATIO LIVES ON .mm-card, NOT ON .mm-slot. THAT IS THE FIX.
 *
 * It used to sit on .mm-slot, which only the RESERVED PLACEHOLDER carries. The
 * moment a photograph existed, b_card() emitted the real figure - classes
 * `wp-block-image alignwide size-full mm-card`, no mm-slot - and the reserved
 * ratio was silently dropped. The slot reserved 648px for the hero and the
 * delivered image painted 863px. Every vertical-rhythm judgement made against
 * those slots was made against a box the real image does not occupy.
 *
 * Both figures carry `mm-card`, so hanging the rule there makes the reserved
 * box and the delivered box the same box by construction rather than by two
 * rules agreeing.
 *
 * --mm-slot-ratio is a transitional alias: the builder still writes that name
 * on the placeholder branch until the run that renames it. Drop the inner
 * var() once b_card() emits --mm-card-ratio on both branches.
 *
 * ⚠️ object-fit: cover, NEVER fill. Every ratio shipped today is the source's
 * own, so nothing crops - but the default is `fill`, which means the first
 * person to set a non-native ratio would get a silently STRETCHED photograph
 * instead of a cropped one. This is here so that cannot happen. */
.mm-card {
	aspect-ratio: var(--mm-card-ratio, var(--mm-slot-ratio, auto));
}

.mm-card img {
	border-radius: 32px;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (min-width: 900px) {
	.mm-card img {
		border-radius: 48px;
	}
}


/* ===========================================================================
 * 4b. ONE VERTICAL RHYTHM FOR THE FULL-BLEED BANDS
 *
 * Every band's padding was authored per block in post_content, so it drifted:
 * 80/48 on one hero, 80/28 on another, 28/48 on the batch strip, 80/80 on the
 * five story beats, 48/48 on the last band. Home read as three documents
 * stacked - a 76px transition at the top and 160px everywhere below it.
 *
 * ⚠️ AND THE SCALE WAS FIXED, WHICH IS THE BIGGER DEFECT. spacing|50 is 5rem,
 * so the padding measured IDENTICALLY at 390 and at 1440. A phone got 160px
 * between bands against band heights of 575-690px - a quarter of a band, spent
 * on nothing. The clamp is the fix for that, not just for the drift.
 *
 * ⚠️ THIS RULE IS INERT UNTIL THE BUILDER STOPS AUTHORING PADDING. An inline
 * style attribute beats any stylesheet rule, so shipping this first changes
 * nothing and the builder run then hands control over. That is why the two
 * halves can deploy in either order with no broken state in between.
 *
 * THE FOOTER GAP IS THE SAME RULE, NOT A SEPARATE PATCH. Measured, the last
 * block's box touched .site-info on ALL FOUR pages - the apparent gap was only
 * ever whichever bottom padding the last block happened to own, which is why it
 * looked like four different answers: 48px on Home, 80px on Visit, 0px on Menu
 * and Story. Putting the space on the footer means it no longer depends on what
 * the last block is - a padded band, a fineprint group or a bare photograph all
 * get the same air. /story/, where a 1360x765 photograph's bottom edge WAS the
 * band's top edge, is the case that proves it.
 *
 * TWO EXCEPTIONS, BOTH DELIBERATE - do not "fix" them into this system:
 *   - the /menu/ jump rail and toggle, which are chrome and not a band;
 *   - the 48px spacers between menu sections, which separate list sections
 *     INSIDE one band rather than band from band. Different rhythm, different
 *     job.
 * ======================================================================== */

:root {
	--mm-band: clamp( 48px, 6vw, 80px );
}

.entry-content > .alignfull {
	padding-block: var(--mm-band);
}

.site-info {
	padding-block-start: var(--mm-band);
}


/* ===========================================================================
 * 5b. THE RESERVED PHOTO SLOT
 *
 * b_card() renders this instead of nothing when a photograph has not been
 * uploaded yet: a hairline frame holding the shot slug, occupying exactly the
 * box the real image will occupy.
 *
 * ⚠️ IT IS SCAFFOLDING AND IT SHIPS. That is deliberate. Returning '' meant
 * every vertical-rhythm decision on this site was made against a composition
 * missing seven photographs, and would have had to be made again. A visible
 * frame is also self-reporting: it says WHICH shot is missing, to anyone
 * looking at the page, without opening the builder.
 *
 * It disappears by itself the moment the attachment exists. Nothing to remove.
 *
 * THE RATIO COMES FROM CONTENT, THE RULE LIVES HERE. b_card() writes
 * --mm-slot-ratio as an inline custom property because the crop is a property
 * of the photograph; aspect-ratio itself stays in the stylesheet. The fallback
 * in var() matches b_card()'s default, so a slot written before anyone set a
 * ratio still reserves a sane box rather than collapsing to nothing.
 *
 * Square corners, not the card's 32px. The frame is a rule, and section 5's
 * rule is that rules are square and hairline and only photographs are round -
 * so a rounded empty frame would read as a photograph that failed to load
 * rather than as a slot waiting for one.
 * ======================================================================== */

.mm-slot {
	/* aspect-ratio is NOT here any more - it is on .mm-card, which both the
	 * placeholder and the real figure carry. See section 5. */
	display: flex;
	align-items: center;
	justify-content: center;
	border: var(--wp--custom--hairline, 1px) solid var(--wp--preset--color--hairline-l);
	margin-inline: auto;
}

.mm-slot__slug {
	font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--sumi);
	opacity: 0.55;
}


/* ===========================================================================
 * 5c. THE MOON PHASE SECTION MARKERS
 *
 * The Story page says the phases mark the sections of the menu, full at the
 * top and waning as you go down. This is the half that makes that true.
 *
 * THE ORDINAL IS CONTENT, THE ARTWORK IS THEME. The builder writes
 * `mm-phase--3` and nothing else - see phase_for() and b_phase_marker() in
 * builders/mochimoon/build-content.php. Which drawing that is, what size it is
 * and where it sits are decided here. The same split as the photo card and the
 * batch chip, and the reason a redrawn marker is a deploy rather than a
 * database write to every page that carries one.
 *
 * ⚠️ THE ORDER IS 5 -> 1 AND IT IS NOT ARBITRARY. Daifuku, the first and
 * strongest section, takes phase-5-full. Boxes & Gifts takes phase-1-new,
 * which is a hollow ring - put that on the flagship section instead and it
 * reads as "nothing here yet" rather than as a marker.
 *
 * ⚠️ REFERENCED AS FILES, NOT INLINED - the opposite of the header mark, on
 * purpose. The mark is inlined because it is in the first paint of every page
 * and a 333-byte round trip in front of the site name is not worth it. These
 * are below the fold, on one page, and a data URI baked into style.css would
 * be a second copy of artwork that goes stale silently the first time a marker
 * is redrawn. One copy wins here; the round trip wins there.
 *
 * The URLs are relative to style.css, which sits at the theme root.
 *
 * COLOUR IS THE ARTWORK'S OWN. These are drawn in #C41E3C, which is not the
 * palette's ichigo #C0203A. That 4-point delta is below perceptual threshold,
 * the artwork is closed, and recolouring would mean a mask - which fails to a
 * solid crimson square where mask-image is unsupported. Left alone on purpose.
 * The markers are decorative and aria-hidden, so no contrast minimum applies.
 * ======================================================================== */

.mm-phase--1 { --mm-phase-img: url("assets/brand/phase-1-new.svg"); }
.mm-phase--2 { --mm-phase-img: url("assets/brand/phase-2-waxing.svg"); }
.mm-phase--3 { --mm-phase-img: url("assets/brand/phase-3-quarter.svg"); }
.mm-phase--4 { --mm-phase-img: url("assets/brand/phase-4-gibbous.svg"); }
.mm-phase--5 { --mm-phase-img: url("assets/brand/phase-5-full.svg"); }

/* The marker above a section head. A block of its own, centred like the
 * heading under it. The artwork is 100 units of ink in a 120 box, so a 30px
 * box draws 25px of moon - a little under the section head's cap height,
 * which keeps it a marker rather than a second headline. */
.mm-menu-section > .mm-phase {
	width: 30px;
	height: 30px;
	margin: 0 auto var(--wp--preset--spacing--20);
	background: var(--mm-phase-img) center / contain no-repeat;
}

/* The same ordinal in the jump rail, drawn as a bullet instead of a block.
 * --mm-phase-img is set on the <li> and inherits into the pseudo-element, so
 * the rail and the section head cannot drift apart - there is one mapping. */
.mm-jump .mm-phase > a::before {
	content: "";
	display: inline-block;
	width: 0.7em;
	height: 0.7em;
	margin-right: 0.55em;
	vertical-align: baseline;
	background: var(--mm-phase-img) center / contain no-repeat;
}


/* ===========================================================================
 * 6. MENU JUMP RAIL
 *
 * Fixed vertical rail on the left at desktop; a toggled panel below 1100px.
 * The <button> is injected by assets/js/jump-nav.js, which also drives the
 * active marker. Without JavaScript this is still a working list of in-page
 * links.
 * ======================================================================== */

.mm-jump ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mm-jump a {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 700;
	text-decoration: none;
	color: var(--wp--preset--color--sumi);
}

.mm-jump-toggle {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

@media (min-width: 1600px) {
	/* Anchored to the CONTENT COLUMN, not the window.
	 *
	 * Pinned to the viewport edge the rail read as orphaned - at 1920 it sat
	 * 600px from anything it referred to.
	 *
	 * It is anchored to the WIDEST thing on the page, not the narrowest. The
	 * first attempt used the 720px section column and put the rail at
	 * `50% - 520px`, which a headless render showed landing INSIDE the h1's
	 * box: the display line had just been widened in the same batch, so the two
	 * fixes collided. The reference is the 1100px display band - half of it is
	 * 550px, the rail is 10rem wide and sits 3rem clear, so its left edge is
	 * `50% - 758px`, with a 16px floor.
	 *
	 * 1600px is the breakpoint because that is where 1100px of display plus two
	 * 208px margins stops fitting. Below it there is genuinely no room beside
	 * the composition and the bottom sheet is the honest answer, not a rail
	 * squeezed into 40px. */
	.mm-jump {
		position: fixed;
		left: max( 16px, calc( 50% - 758px ) );
		top: 50%;
		transform: translateY( -50% );
		z-index: 30;
		width: 10rem;
	}

	.mm-jump a {
		line-height: 1.25;
	}

	.mm-jump li + li {
		margin-top: 0.6rem;
	}

	.mm-jump a {
		display: flex;
		align-items: center;
		gap: 0.6rem;
		opacity: 0.75;
		transition: opacity 0.15s ease;
	}

	/* The marker is a rule that grows, not a dot that moves - it belongs to the
	 * same hairline vocabulary as the rest of the page. */
	.mm-jump a::before {
		content: "";
		flex: 0 0 auto;
		width: 1.25rem;
		height: 1px;
		background: currentColor;
		transition: width 0.18s ease, height 0.18s ease;
	}

	.mm-jump a:hover,
	.mm-jump a:focus-visible {
		opacity: 1;
	}

	.mm-jump a[aria-current="location"] {
		opacity: 1;
	}

	.mm-jump a[aria-current="location"]::before {
		width: 2.5rem;
		height: 2px;
	}

	.mm-jump-toggle {
		display: none;
	}

	/* jump-nav.js sets `hidden` on the panel so its links leave the tab order
	 * while collapsed. On desktop the same element IS the rail and must stay
	 * visible, so the attribute is overridden here rather than branched in JS -
	 * one source of truth for "is this a rail or a sheet", and it is the media
	 * query. An author rule beats the UA's [hidden]{display:none}. */
	.mm-jump[hidden] {
		display: block;
	}
}

/* The toggle pill is fixed to the bottom-right, so without this it sits ON TOP
 * of page content - elementFromPoint under it returned menu copy. The class is
 * added by jump-nav.js only on pages that actually have a rail, so no page pays
 * for reserved space it does not need. */
@media (max-width: 1599px) {
	body.has-jump-toggle {
		padding-bottom: 5.5rem;
	}

	.mm-jump {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 40;
		background: var(--wp--preset--color--kinu);
		border-top: 1px solid var(--wp--preset--color--hairline-l);
		padding: 1rem clamp( 20px, 5vw, 40px ) 1.5rem;
		transform: translateY( 101% );
		transition: transform 0.2s ease;
		box-shadow: 0 -12px 32px rgb( 20 22 26 / 12% );
	}

	.mm-jump.is-open {
		transform: none;
	}

	.mm-jump ul {
		display: flex;
		flex-wrap: wrap;
		gap: 0.75rem 1.25rem;
	}

	.mm-jump a {
		display: inline-block;
		padding-block: 6px;
		min-height: 24px;
	}

	.mm-jump-toggle {
		position: fixed;
		right: clamp( 16px, 4vw, 28px );
		bottom: clamp( 16px, 4vw, 28px );
		z-index: 41;
		border: 1px solid var(--wp--preset--color--sumi);
		border-radius: 999px;
		background: var(--wp--preset--color--kinu);
		color: var(--wp--preset--color--sumi);
		padding: 0.7em 1.3em;
		cursor: pointer;
	}
}

/* ⚠️ BELOW 800px THE TOGGLE COMES OUT OF position: fixed.
 *
 * Fixed, it covered p.mm-item__note - the item descriptions, the actual selling
 * copy - at 320 and 375. Opaque kinu with a 1px border and no shadow, so the
 * text underneath was hidden outright, and because .mm-item__note runs the full
 * column width it recurred the whole length of /menu/.
 *
 * 800px is not a guess and it is NOT NLV_MM_NAV_BREAKPOINT. It is where the
 * content column stops being bounded by contentSize and starts being bounded by
 * the root padding: 720px contentSize + 2 x 5vw resolves at ~800px. Above it
 * there is a gutter for a floating control to sit in, and measurement agrees -
 * at 768, 1024 and 1440 the pill lands on gutter with no text under it. Below
 * it there is no gutter at all, so no fixed position exists that does not cover
 * body copy. Reserving a column instead would cost ~130px of a 335px measure on
 * every row, to protect the two rows that happen to be at the bottom.
 *
 * In flow it sits where the DOM already puts it, directly under the hero, so
 * this is position and margin only - no markup change and no JavaScript. The
 * cost is that it stops following the viewport on a phone; a control that
 * hides the product descriptions is the worse of the two.
 *
 * Must come AFTER the max-width: 1599px block, which is where the fixed
 * positioning is set. */
@media (max-width: 800px) {
	.mm-jump-toggle {
		position: static;
		display: block;
		margin: 0 auto var(--wp--preset--spacing--30);
	}
}


/* A jumped-to section must not land under the rail's toggle, or under a
 * sticky parent header if one is ever enabled. */
.mm-menu-section {
	scroll-margin-top: 2rem;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}


/* ===========================================================================
 * 7. TODAY'S BATCH
 *
 * A sold-out item KEEPS its cell and strikes its price. Hiding it reflows the
 * grid and makes the page look broken; showing it says the shop made the thing
 * and it went, which is the single most persuasive fact a dessert shop has.
 *
 * The same goes for NOT ON TODAY, which is a decision rather than a default:
 * nlv-core's admin copy says "off" hides an item, but the board shows it, and it
 * stays shown - styled as ABSENT (dashed, muted, hollow) rather than removed, so
 * the grid never reflows and the board still reads as the whole range.
 *
 * The states come from nlv-core's nlv/batch binding source. This is only their
 * appearance - the plugin decides what is true. The classes they are keyed on,
 * mm-batch-item--{available|sold-out|off} and mm-flavour--{slug}, are added to
 * each <li> by the post_class filter in inc/batch.php.
 *
 * REMOVED: .mm-item--sold-out and its two rules. Nothing emitted that class -
 * not the board, not /menu/'s b_item_row() - so they styled nothing.
 *
 * CONTRAST, every chip against the surface it actually sits on (the tile is
 * kinu, the available chip carries its own fill):
 *
 *     state        text            on                    ratio
 *     available    matcha #1F4D34  #C9CFC2 (20% mix)      6.08
 *     sold out     ichigo #C0203A  kinu #F4EFE6           5.23
 *     off          muted  #68635B  kinu                   5.20
 *     titles       sumi / GP #222  kinu            15.81 / 13.89
 *     off title    muted  #68635B  kinu                   5.20
 *
 * ⚠️ --mm-muted IS A REAL HEX, NOT AN OPACITY. Sumi at 55% on kinu is 3.85:1 and
 * at 45% is 2.89:1 - both fail AA - and an opacity-muted chip also fades its
 * border and dot unpredictably. #68635B sits clearly between sumi and the
 * hairline and holds 5.20:1, which leaves margin for the italic.
 * ======================================================================== */

.mm-batch {
	--mm-muted: #68635B;
}

/* THE GRID.
 *
 * core/post-template's grid is repeat(4, …) from a per-block container class,
 * and core block-library collapses it to ONE column at 600px with
 *   .wp-block-post-template-is-layout-grid[class*=columns-]:not(.has-native-responsive-grid)
 * which is (0,3,0). Between 601 and 980 nothing collapsed it at all, so tablets
 * and large phones got four 130px columns.
 *
 * (0,4,0) here, so it wins on weight rather than on stylesheet order.
 *
 * ⚠️ 980 IS NOT NLV_MM_NAV_BREAKPOINT. It is where four columns stop being
 * comfortable, and it matches the nav breakpoint today by coincidence.
 * Re-deriving the nav breakpoint must not move this.
 *
 * THE GRID IS AS WIDE AS THE HERO PHOTOGRAPH, NOT THE TEXT MEASURE.
 *
 * .mm-batch is an is-layout-constrained group, and core caps every child that
 * is not aligned with
 *   .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull))
 * at contentSize - 720px. The hero card directly above is alignwide, which
 * section 1b lets run to wideSize, so at 1280 the board sat 720px wide under
 * a ~1150px photograph: two measures stacked, reading as a layout fault.
 *
 * Widening the grid alone, in CSS, and leaving the heading and the pending
 * notice on the text measure where they belong. The alternative is setting
 * align:wide on the query block, which is a post_content rewrite. Both groups
 * carry the same root padding, so the same max-width resolves to the same edge
 * as the hero at every width; below ~800px the padding is the narrower bound
 * for both and this changes nothing.
 *
 * (0,2,0) against the core rule's (0,1,0) - :where() contributes nothing. */
.mm-batch > .mm-batch__grid {
	max-width: var(--wp--style--global--wide-size, 1360px);
}

@media (max-width: 600px) {
	.mm-batch__grid .wp-block-post-template.is-layout-grid.wp-block-post-template-is-layout-grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
		gap: 0.75rem;
	}
}

@media (min-width: 601px) and (max-width: 980px) {
	.mm-batch__grid .wp-block-post-template.is-layout-grid.wp-block-post-template-is-layout-grid {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	}
}

/* THE TILE. A flex column so the chip can take margin-top: auto - grid rows
 * already stretch every tile in a row to one height, so the chips line up
 * along the bottom whether the title above them took one line or two. */
.mm-batch__grid .wp-block-post {
	display: flex;
	flex-direction: column;
	background-color: var(--wp--preset--color--kinu);
	border: 1px solid var(--wp--preset--color--hairline-l);
	border-radius: 16px;
	padding: 0.875rem;
}

/* THE TILE TITLE.
 *
 * ⚠️ BODY FACE, NOT SYNE - AT EVERY WIDTH. theme.json gives every heading the
 * display face, so these h3s were Syne ExtraBold at 19-22px: under the ~24px
 * floor section 2 sets for it, and far too wide for the cell. Measured from the
 * font files: "Strawberry" is 196px of Syne at 22px, in a 132px tile at desktop
 * - it was ALREADY breaking mid-word before any of this, because core's
 * block-library sets .wp-block-post-title { word-break: break-word }. In
 * Schibsted Bold it is 114px at 20px and 103px at 18px.
 *
 * THE SIZE NEEDS !important because the builder writes has-large-font-size,
 * and global styles emit every preset class with !important. The alternative
 * is a post_content rewrite for a type size.
 *
 * word-break and overflow-wrap go back to normal for the same reason as the
 * display lines in section 2: if a word ever outgrows its cell again it should
 * overflow visibly, not break silently into something that reads as a typo. */
.mm-batch__grid .wp-block-post-title {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.2;
	text-wrap: balance;
	word-break: normal;
	overflow-wrap: normal;
	hyphens: manual;
	margin-block: 0 0.75rem;
}

.mm-batch__grid .wp-block-post-title.has-large-font-size {
	font-size: 1.25rem !important;
}

/* 360px, two columns: 320px of measure, 12px gap, 0.75rem padding and a 1px
 * border leave 128px of text box. "Strawberry" at 18px is 103px and "Not on
 * today" as a chip is ~121px. At 0.875rem padding the chip would have had 3px
 * to spare, which a fallback face before the webfont swaps in can spend. */
@media (max-width: 600px) {
	.mm-batch__grid .wp-block-post {
		padding: 0.75rem;
	}
}

@media (max-width: 980px) {
	.mm-batch__grid .wp-block-post-title.has-large-font-size {
		font-size: 1.125rem !important;
	}
}

/* THE MOCHI DOT.
 *
 * A 14px sphere, not a bullet: the off-centre highlight is what makes it read
 * as a round thing with a surface. The 1px inset ring is for the pale fillings
 * - usagi, nerikiri, the yuzu yellows - which are otherwise nearly invisible on
 * kinu. Decorative: generated content with no text is not announced.
 *
 * ⚠️ ABOVE THE TITLE, NOT BESIDE IT. Inline, the dot and its gap cost 22px of
 * the line, and at 360px that leaves 106px for a 103px "Strawberry" - 3px of
 * headroom, gone the moment a fallback face renders first. Stacked, the title
 * keeps the full 128px.
 *
 * The fallback in var() is the hairline: a slug with no entry in the map below
 * gets a neutral dot rather than no dot, which is visible in a screenshot as
 * "somebody forgot one" rather than looking intentional. */
.mm-batch__grid .wp-block-post-title::before {
	content: "";
	display: block;
	width: 14px;
	height: 14px;
	margin-bottom: 0.5rem;
	border-radius: 50%;
	background:
		radial-gradient( circle at 34% 30%, rgb( 255 255 255 / 60% ) 0, rgb( 255 255 255 / 0% ) 55% ),
		var(--mm-flavour, var(--wp--preset--color--hairline-l));
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--hairline-l);
}

/* One colour per item, keyed on the post slug build-content.php upserts by.
 * The four that are palette colours reference the palette, so they move with
 * it; the rest are the filling's own colour and belong to nothing else. */
.mm-flavour--ichigo-daifuku    { --mm-flavour: #E8798A; }
.mm-flavour--anko-daifuku      { --mm-flavour: #5A2A27; }
.mm-flavour--matcha-daifuku    { --mm-flavour: var(--wp--preset--color--matcha); }
.mm-flavour--kuro-goma-daifuku { --mm-flavour: #2B2A28; }
.mm-flavour--yuzu-daifuku      { --mm-flavour: var(--wp--preset--color--tsuki); }
.mm-flavour--kinako-daifuku    { --mm-flavour: #C9A46B; }
.mm-flavour--matcha-roll       { --mm-flavour: #4F7A4A; }
.mm-flavour--hojicha-cake      { --mm-flavour: #8B5A3C; }
.mm-flavour--butter-mochi      { --mm-flavour: #C98B3E; }
.mm-flavour--shortcake-mochi   { --mm-flavour: var(--wp--preset--color--usagi); }
.mm-flavour--warabi-mochi      { --mm-flavour: #A89A7A; }
.mm-flavour--dorayaki          { --mm-flavour: #A0612E; }
.mm-flavour--nerikiri          { --mm-flavour: #F2B8C6; }
.mm-flavour--matcha-latte      { --mm-flavour: #7FA06A; }
.mm-flavour--hojicha-latte     { --mm-flavour: #B08463; }
.mm-flavour--genmaicha         { --mm-flavour: #C4B27A; }
.mm-flavour--yuzu-soda         { --mm-flavour: #F0D66A; }

/* THE CHIP.
 *
 * 16px and sentence case: section 9's floor is 16px everywhere, and the chip
 * was the one thing on the site under it, at 14px uppercase. nlv-core's labels
 * are already sentence case, so dropping the transform is all it takes.
 *
 * The three states differ by FILL STYLE - filled, outlined, dashed - and not
 * by colour alone, so the board still reads in greyscale and to anyone who
 * cannot tell matcha from ichigo. */
.mm-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	max-width: 100%;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.02em;
	border: 1px solid currentColor;
	border-radius: 999px;
	padding: 0.2em 0.6em;
	margin: 0;
}

/* With no current batch the binding returns nothing and the paragraph renders
 * empty - which, with a border and padding, is a small empty pill under every
 * title. The pending notice above the grid already says why. */
.mm-chip:empty {
	display: none;
}

.mm-batch__grid .mm-chip {
	margin-top: auto;
	align-self: flex-start;
}

/* AVAILABLE: filled. 20%, not 10%: at 10% the fill was 1.17:1 against the
 * kinu tile and read as an outline with a smudge; at 20% it is 1.39:1 and
 * reads as filled, and matcha text on it still holds 6.08:1. The hex is the
 * fallback for a browser without color-mix(); it is the same 20% mix,
 * computed. */
.mm-batch__grid .mm-batch-item--available .mm-chip {
	color: var(--wp--preset--color--matcha);
	background-color: #C9CFC2;
	background-color: color-mix( in srgb, var(--wp--preset--color--matcha) 20%, var(--wp--preset--color--kinu) );
}

.mm-batch__grid .mm-batch-item--available .mm-chip::before {
	content: "";
	flex: none;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}

/* Gated the same way as smooth scrolling in section 6: motion is opted INTO,
 * so a reduced-motion setting gets a still dot rather than one that has to be
 * switched off. */
@media (prefers-reduced-motion: no-preference) {
	.mm-batch__grid .mm-batch-item--available .mm-chip::before {
		animation: mm-fresh 2.4s ease-in-out infinite;
	}
}

@keyframes mm-fresh {
	0%, 100% { opacity: 1; transform: scale( 1 ); }
	50%      { opacity: 0.4; transform: scale( 0.7 ); }
}

/* SOLD OUT: outlined, no fill. The title is struck, not faded - the tile stays
 * at full opacity because the name still has to be read at full contrast. */
.mm-batch__grid .mm-batch-item--sold-out .mm-chip {
	color: var(--wp--preset--color--ichigo);
}

.mm-batch__grid .mm-batch-item--sold-out .wp-block-post-title {
	text-decoration: line-through;
	text-decoration-color: var(--wp--preset--color--ichigo);
	text-decoration-thickness: 2px;
}

/* The dot keeps its flavour and fades. Greyscale made every sold-out dot the
 * same grey, which threw away the one thing the dot is for - which filling
 * went. */
.mm-batch__grid .mm-batch-item--sold-out .wp-block-post-title::before {
	opacity: 0.45;
}

/* NOT ON TODAY: dashed, muted, italic, and a hollow dot - present on the board,
 * absent from the counter. Weight 400 because the absent state should be the
 * quietest thing in the row, and because it buys "Not on today" 4px at 360.
 * The italic is synthesised - no italic face is shipped, and one chip label
 * does not justify a fourth font file. */
.mm-batch__grid .mm-batch-item--off .wp-block-post-title,
.mm-batch__grid .mm-batch-item--off .mm-chip {
	color: var(--mm-muted);
}

.mm-batch__grid .mm-batch-item--off .mm-chip {
	border-style: dashed;
	font-style: italic;
	font-weight: 400;
}

/* Hollow, stroked in the flavour - the outline of the thing that is not here.
 *
 * Three stacked inset shadows, first listed on top: the 1px hairline at the
 * outer edge, a 2px flavour band inside it, and a 1px hairline inside that.
 * The two hairlines are the existing pale-flavour ring kept on both sides of
 * the stroke, so an usagi or nerikiri ring still has an edge on kinu; on the
 * dark flavours they disappear into the stroke. */
.mm-batch__grid .mm-batch-item--off .wp-block-post-title::before {
	background: transparent;
	box-shadow:
		inset 0 0 0 1px var(--wp--preset--color--hairline-l),
		inset 0 0 0 3px var(--mm-flavour, var(--wp--preset--color--hairline-l)),
		inset 0 0 0 4px var(--wp--preset--color--hairline-l);
}

/* Item 2: the gap under the h1.
 *
 * Most of it closed itself once the heading stopped wrapping to four lines. The
 * rest was the sum of three stacked spaces: the heading's own bottom margin
 * (now 0.25em, was 0.5em), a trailing spacer that renders nothing (hidden
 * above), and this section's top padding, which sat at spacing-40 directly
 * beneath the hero group's spacing-40 bottom padding - 96px of stacked padding
 * between two things that should read as one movement.
 *
 * !important because the builder writes that padding as an INLINE style, and no
 * selector outranks one. The alternative is a post_content rewrite, i.e. a
 * database write, for a spacing judgement. */
.mm-batch {
	padding-top: var(--wp--preset--spacing--30) !important;
}

.mm-batch__notice {
	text-align: center;
	font-size: var(--wp--preset--font-size--large);
	opacity: 0.8;
}

/* Prices sit in their own column and align right, so the eye can scan a column
 * of numbers instead of hunting along each line. */
.mm-item {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	justify-content: space-between;
}

.mm-item__name,
.mm-item__price {
	margin-block: 0.35rem;
}

.mm-item__price {
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
	font-weight: 700;
}

.mm-item__note {
	margin-block: 0 0.9rem;
	opacity: 0.75;
	max-width: 52ch;
}


/* ===========================================================================
 * 8. THE ENQUIRY FORM
 *
 * ⚠️ THE HONEYPOT MUST NEVER BE VISIBLE.
 *
 * nlv-core emits it as a real, submittable text input inside
 * <p class="nlv-form__hp" aria-hidden="true"> with tabindex="-1". Its whole
 * mechanism is that a bot fills it in and a person cannot, so it has to stay in
 * the DOM and stay submittable - `display: none` would be the obvious fix and
 * some bots skip hidden fields, which blunts the trap.
 *
 * So it is clipped out of the viewport instead: present, submittable, zero
 * visible area, and the label goes with it because the whole <p> is clipped.
 * Left unstyled it renders a labelled "Leave this field empty" box on the page
 * a prospect reads most carefully.
 * ======================================================================== */

.nlv-form__hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	clip-path: inset( 50% );
	white-space: nowrap;
}

.nlv-form__row {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-block: 0 1rem;
}

.nlv-form__row label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

.nlv-form input[type="text"],
.nlv-form input[type="email"],
.nlv-form input[type="tel"],
.nlv-form input[type="date"],
.nlv-form input[type="number"],
.nlv-form select,
.nlv-form textarea {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	background: var(--wp--preset--color--kinu);
	border: 1px solid var(--wp--preset--color--sumi);
	border-radius: 4px;
	padding: 0.6em 0.75em;
	width: 100%;
	/* input[type=date] does not inherit colour from the form the way the other
	 * controls do - it computed rgb(0,0,0) while every sibling computed
	 * rgb(34,34,34). Two blacks in one form reads as a rendering fault. */
	color: inherit;
}

.nlv-form__grid {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 12rem, 1fr ) );
	gap: 0 1rem;
}

.nlv-form__notice {
	border-left: 3px solid currentColor;
	padding: 0.75rem 1rem;
	font-weight: 700;
}

.nlv-form__small {
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.75;
}


/* ===========================================================================
 * 9. ACCESSIBILITY FLOOR
 *
 * 16px is the minimum anywhere on this site, footer and allergen key included.
 * The benchmark's weakness was small low-contrast type, and half that fix is
 * size rather than colour.
 * ======================================================================== */

/* NOT :where(). :where() contributes zero specificity, so the focus ring could
 * be silently beaten by any later single-class rule that happens to set an
 * outline - and a focus indicator that disappears without anyone noticing is
 * the worst kind of accessibility regression. Plain selectors, real weight. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* THE SKIP LINK.
 *
 * ⚠️ THIS IS A BRAND FIX, NOT AN ACCESSIBILITY ONE, AND THE DIFFERENCE MATTERS
 * BECAUSE THE REVIEW THAT PROMPTED IT HAD IT WRONG.
 *
 * The report said a.skip-link renders #1E73BE on kinu at 4.31:1 and fails AA.
 * Measured with focus emulation on - headless Chrome does not match :focus at
 * all without it, which is how the resting state gets measured by mistake -
 * the focused link is GeneratePress's #21759B on GeneratePress's own #F1F1F1
 * panel at 4.55:1, and it PASSES. The #1E73BE is the resting colour of an
 * element that is 1px square and clipped, so there is nothing to read and
 * nothing to fail.
 *
 * It is repainted anyway because a GeneratePress blue is the last unbranded
 * colour on the site, and ichigo on that panel measures 5.30:1 - better than
 * what it replaces. GP's panel and shadow are deliberately left alone: they
 * are what makes the chip visible against kinu, and painting it kinu would
 * leave a skip link that is nearly invisible at the exact moment it matters.
 *
 * (0,3,1) against GeneratePress's (0,2,0), so it wins on weight. */
a.skip-link.skip-link:focus {
	color: var(--wp--preset--color--ichigo);
}


/* Touch targets: WCAG 2.5.8 wants 24x24 CSS pixels minimum, and a thumb is not
 * a mouse pointer. */
.site-footer a,
.mm-jump a {
	display: inline-block;
	min-height: 24px;
}
