/*
 * Origin Matcha — base styles (spec 7).
 * Colors are tokens on :root. Light (washi paper) only: no dark mode,
 * whatever the reader's device setting (decided 2026-11-02).
 */

/* ---------- Tokens ---------- */
:root {
	--c-matcha: #4f6f2f;
	--c-matcha-soft: #e7edda;
	--c-paper: #f7f4ec;
	--c-card: #ffffff;
	--c-ink: #2b2b28;
	--c-muted: #6b6a63;
	--c-gold: #a8843c;
	--c-line: #e2ddcf;
	--c-on-matcha: #ffffff;

	--font-heading: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
	--font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--lh-body: 1.7;
	--heading-weight: 600;

	--fs-body: 1rem;
	--fs-small: .875rem;
	--fs-h1: 1.75rem;
	--fs-h2: 1.375rem;
	--fs-h3: 1.1875rem;

	--w-prose: 720px;
	--w-article: 720px;  /* Article column; wider for CJK below. */
	--w-wide: 1200px;
	--gutter: 16px;
	--radius: 10px;
	--shadow: 0 1px 2px rgb(43 43 40 / 6%), 0 6px 20px rgb(43 43 40 / 6%);
	--header-h: 64px;

	/* Keep form controls and scrollbars light even on dark-mode devices. */
	color-scheme: light;
}

@media (min-width: 768px) {
	:root {
		--fs-body: 1.0625rem;
		--fs-h1: 2.5rem;
		--fs-h2: 1.75rem;
		--fs-h3: 1.375rem;
		--gutter: 32px;
	}
}

/* Per-language fonts and line heights (spec 7-2, 8). Body text for CJK
   uses the device's fonts; only headings load a web font. */
.font-ja {
	--font-heading: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
	--font-body: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
	--lh-body: 1.9;
}
.font-tc {
	--font-heading: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
	--font-body: system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
	--lh-body: 1.9;
}
.font-sc {
	--font-heading: "Noto Serif SC", "Songti SC", "SimSun", serif;
	--font-body: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	--lh-body: 1.9;
}
.font-kr {
	--font-heading: "Noto Serif KR", "AppleMyungjo", "Batang", serif;
	--font-body: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
	--lh-body: 1.9;
}
.font-thai {
	--font-heading: "Noto Serif Thai", "Noto Sans Thai", serif;
	--font-body: "Noto Sans Thai", "Thonburi", "Leelawadee UI", Tahoma, sans-serif;
	--lh-body: 2;
}
/* Latin script headings are a display serif; give them a little more size. */
.font-latin { --heading-weight: 600; }

/* Full-width scripts read well at about 48 characters a line (820px at 17px). */
.font-ja, .font-tc, .font-sc, .font-kr { --w-article: 820px; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 64px); }

body {
	margin: 0;
	background: var(--c-paper);
	color: var(--c-ink);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	overflow-wrap: anywhere;
	word-break: normal;
	-webkit-font-smoothing: antialiased;
}

/* Thai and CJK break inside words; Latin scripts should not. */
.font-latin body, body.font-latin { overflow-wrap: break-word; hyphens: auto; }

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--c-matcha); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 {
	font-family: var(--font-heading);
	font-weight: var(--heading-weight);
	line-height: 1.35;
	margin: 0;
	letter-spacing: .01em;
}
.font-latin h1, .font-latin h2, .font-latin h3 { letter-spacing: 0; line-height: 1.2; }

button { font: inherit; color: inherit; }

.om-visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.om-skip {
	position: absolute; left: 8px; top: -48px; z-index: 100;
	padding: 8px 16px; background: var(--c-matcha); color: var(--c-on-matcha); border-radius: var(--radius);
}
.om-skip:focus { top: 8px; }

.om-icon { flex: none; }

/* ---------- Layout ---------- */
.om-container {
	width: 100%;
	max-width: calc(var(--w-wide) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.om-container--narrow { max-width: calc(var(--w-prose) + var(--gutter) * 2); }

.om-main { display: block; min-height: 60vh; padding-bottom: 64px; }

.om-prose-wrap, .om-page-header { max-width: var(--w-article); margin-inline: auto; }

/* ---------- Two columns: main + sidebar (all pages except the tops) ---------- */
.om-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.om-primary { min-width: 0; container-type: inline-size; }
@media (min-width: 1024px) {
	/* Article 820 + gap 60 + sidebar 320 = 1200; all three shrink with the window. */
	.om-columns { grid-template-columns: minmax(0, 1fr) clamp(256px, 25vw, 320px); gap: clamp(48px, 4.7vw, 60px); align-items: start; }
	.om-primary .om-page-header,
	.om-primary .om-prose-wrap { margin-inline: 0; }
}

/* Cards follow the width of the column they sit in, not the window. */
@container (min-width: 520px) { .om-primary .om-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 820px) { .om-primary .om-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Sidebar ---------- */
.om-sidebar {
	padding: 20px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius);
}
@media (min-width: 1024px) {
	.om-sidebar {
		position: sticky; top: calc(var(--header-h) + 60px);
		max-height: calc(100vh - var(--header-h) - 80px); overflow-y: auto; overscroll-behavior: contain;
	}
}
.om-sidebar__title {
	font-size: 1.125rem; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--c-line);
	display: flex; align-items: center; gap: 10px;
}
.om-sidebar__title::before { content: ""; width: 16px; height: 2px; background: var(--c-gold); }
.om-side-cats, .om-side-subs { list-style: none; margin: 0; padding: 0; }
.om-side-cat + .om-side-cat { border-top: 1px dotted var(--c-line); }
.om-side-cat__head { display: flex; align-items: center; gap: 4px; }
.om-side-cat__link {
	flex: 1; min-width: 0; padding: 10px 0; color: var(--c-ink); text-decoration: none; font-weight: 600; line-height: 1.5;
}
.om-side-cat__link:hover { color: var(--c-matcha); }
.om-side-cat.is-current > .om-side-cat__head .om-side-cat__link { color: var(--c-matcha); }
.om-side-cat__link[aria-current="page"] { text-decoration: underline; text-underline-offset: .3em; }
.om-side-cat__toggle {
	flex: none; display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--c-muted);
	border-radius: 8px;
}
.om-side-cat__toggle:hover { color: var(--c-matcha); background: var(--c-matcha-soft); }
.om-side-cat__toggle .om-icon { transform: rotate(90deg); transition: transform .2s; }
.om-side-cat__toggle[aria-expanded="false"] .om-icon { transform: rotate(0deg); }
.om-side-subs { padding: 0 0 10px 12px; border-left: 2px solid var(--c-matcha-soft); margin-left: 2px; }
.om-side-subs[hidden] { display: none; }
.om-side-subs a {
	display: block; padding: 7px 8px; color: var(--c-ink); text-decoration: none; font-size: var(--fs-small); line-height: 1.5; border-radius: 6px;
}
.om-side-subs a:hover { color: var(--c-matcha); background: var(--c-matcha-soft); }
.om-side-subs a[aria-current] { color: var(--c-matcha); font-weight: 600; background: var(--c-matcha-soft); }

/* ---------- Header ---------- */
.om-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--c-paper);
	border-bottom: 1px solid var(--c-line);
}
/* The blur is desktop-only: backdrop-filter makes the header the containing
   block of position:fixed children, which would trap the phone menu inside
   the 64px header. */
@media (min-width: 1024px) {
	.om-header {
		background: color-mix(in srgb, var(--c-paper) 92%, transparent);
		backdrop-filter: saturate(1.2) blur(10px);
	}
}
.om-header__inner {
	display: flex; align-items: center; gap: 16px;
	max-width: calc(var(--w-wide) + var(--gutter) * 2);
	min-height: var(--header-h);
	margin-inline: auto; padding-inline: var(--gutter);
}

.om-logo {
	display: inline-flex; align-items: center; gap: 10px;
	color: var(--c-ink); text-decoration: none; margin: 0;
}
/* Logo image (assets/img/logo-horizontal.png, 430 x 100). */
.om-logo__img { display: block; width: auto; height: 36px; }
@media (min-width: 768px) { .om-logo__img { height: 44px; } }
.om-logo--footer .om-logo__img { height: 48px; }
.om-logo--large .om-logo__img { height: 72px; margin-inline: auto; }
@media (min-width: 640px) { .om-logo--large .om-logo__img { height: 96px; } }

.om-header__toggle {
	margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border: 1px solid var(--c-line); border-radius: var(--radius);
	background: var(--c-card); cursor: pointer;
}

.om-header__toggle .om-header__icon-close,
.om-header__toggle[aria-expanded="true"] .om-header__icon-open { display: none; }
.om-header__toggle[aria-expanded="true"] .om-header__icon-close { display: inline-flex; }
.om-header__icon-open, .om-header__icon-close { display: inline-flex; }

.om-drawer {
	display: none;
	position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
	padding: 24px var(--gutter) 48px; overflow-y: auto;
	background: var(--c-paper);
	flex-direction: column; gap: 24px;
}
.om-drawer.is-open { display: flex; }

.om-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.om-nav__list a {
	display: block; padding: 12px 4px; color: var(--c-ink); text-decoration: none;
	border-bottom: 1px solid var(--c-line); font-weight: 600;
}
.om-nav__list a[aria-current="page"] { color: var(--c-matcha); }

/* Desktop: two rows — logo, search and language on top; the category
   navigation on its own row so it never wraps, whatever the number of
   category tops (the category structure is still undecided). */
@media (min-width: 1024px) {
	.om-header__toggle { display: none; }
	.om-header__inner { flex-wrap: wrap; row-gap: 0; }
	.om-drawer {
		display: contents; position: static; padding: 0; overflow: visible; background: none;
	}
	.om-drawer > .om-search { margin-left: auto; }
	.om-nav {
		order: 10; flex: 0 0 100%; margin: 0 calc(var(--gutter) * -1);
		padding: 0 var(--gutter); border-top: 1px solid var(--c-line);
		overflow-x: auto; scrollbar-width: none;
	}
	.om-nav::-webkit-scrollbar { display: none; }
	.om-nav__list { flex-direction: row; gap: 4px; flex-wrap: nowrap; }
	.om-nav__list a {
		border: 0; padding: 10px 12px; font-size: .9375rem; font-weight: 500; white-space: nowrap;
	}
	.om-nav__list a:hover { color: var(--c-matcha); }
	.om-nav__list a[aria-current="page"] { color: var(--c-matcha); box-shadow: inset 0 -2px 0 var(--c-matcha); }
}

/* Search */
.om-search { display: flex; align-items: stretch; max-width: 420px; }
.om-search input {
	flex: 1; min-width: 0; padding: 10px 14px; font: inherit; font-size: .9375rem;
	color: var(--c-ink); background: var(--c-card);
	border: 1px solid var(--c-line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius);
}
.om-search button {
	display: inline-flex; align-items: center; padding: 0 14px; cursor: pointer;
	background: var(--c-matcha); color: var(--c-on-matcha); border: 0; border-radius: 0 var(--radius) var(--radius) 0;
}
@media (min-width: 1024px) {
	/* Wide enough for the longest placeholder (Portuguese, about 200px at 1440px). */
	.om-header .om-search { width: clamp(220px, 20vw, 280px); }
	.om-header .om-search input { padding: 6px 12px; }
}

/* Language switcher */
.om-lang { position: relative; }
.om-lang__button {
	display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
	padding: 8px 12px; border: 1px solid var(--c-line); border-radius: var(--radius);
	background: var(--c-card); font-size: .9375rem; white-space: nowrap;
}
.om-lang__button::-webkit-details-marker { display: none; }
.om-lang__list {
	list-style: none; margin: 8px 0 0; padding: 8px;
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px;
	background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.om-lang__list a {
	display: block; padding: 8px 10px; border-radius: 6px; color: var(--c-ink); text-decoration: none; font-size: .9375rem;
}
.om-lang__list a:hover { background: var(--c-matcha-soft); }
.om-lang__list a[aria-current="true"] { background: var(--c-matcha); color: var(--c-on-matcha); }
.om-lang__list a.is-missing { color: var(--c-muted); }
@media (min-width: 1024px) {
	.om-lang__list { position: absolute; right: 0; width: 320px; z-index: 60; }
}

/* ---------- Breadcrumb ---------- */
.om-breadcrumb { margin: 20px 0 8px; font-size: var(--fs-small); color: var(--c-muted); }
.om-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.om-breadcrumb li { display: inline-flex; align-items: center; }
.om-breadcrumb li + li::before { content: "›"; margin: 0 8px; color: var(--c-line); }
.om-breadcrumb a { color: var(--c-muted); text-decoration: none; }
.om-breadcrumb a:hover { color: var(--c-matcha); text-decoration: underline; }
.om-breadcrumb [aria-current] { color: var(--c-ink); }
/* Phones: one line that scrolls sideways, so separators never start a line. */
@media (max-width: 767px) {
	.om-breadcrumb ol { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
	.om-breadcrumb ol::-webkit-scrollbar { display: none; }
}

/* ---------- Page header ---------- */
.om-page-header { padding: 16px 0 24px; }
.om-page-header__title { font-size: var(--fs-h1); }
.om-page-header__meta {
	display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 16px 0 0;
	font-size: var(--fs-small); color: var(--c-muted);
}
.om-page-header__author::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--c-matcha); vertical-align: middle; }
.om-page-header__image { margin: 24px 0 0; }
.om-page-header__image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }

.om-layout-hub .om-page-header,
.om-layout-hub .om-prose-wrap { max-width: var(--w-article); }

/* PR notice */
.om-pr {
	display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; padding: 8px 12px;
	font-size: var(--fs-small); background: var(--c-card); border: 1px solid var(--c-line); border-radius: 8px;
}
.om-pr__label { flex: none; white-space: nowrap; padding: 0 6px; font-size: .75rem; font-weight: 700; color: var(--c-card); background: var(--c-muted); border-radius: 4px; }

/* ---------- Table of contents ---------- */
.om-toc {
	position: relative; max-width: 640px; margin: 8px auto 56px; padding: 28px 24px 32px;
	background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.om-toc__title {
	margin: 0 0 16px; text-align: center; letter-spacing: .14em;
	font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 1.25rem;
}
.om-toc__title::after { content: ""; display: block; width: 32px; height: 2px; margin: 10px auto 0; background: var(--c-gold); }
.om-toc__list { margin: 0; padding: 0; list-style: none; counter-reset: om-toc; overflow: hidden; transition: max-height .4s ease; }
.om-toc__list ol { margin: 4px 0 0; padding: 0 0 0 2.4em; list-style: none; }
.om-toc__list ol:empty { display: none; }
/* Green dots on one line, like the path from tea field to bowl. */
.om-toc__list > li { position: relative; counter-increment: om-toc; padding: 0 0 18px 32px; }
.om-toc__list > li:not(:last-child)::before {
	content: ""; position: absolute; top: 10px; bottom: -10px; left: 7px; width: 2px; background: #c4d4a6;
}
.om-toc__list > li::after {
	content: ""; position: absolute; top: 6px; left: 0; width: 16px; height: 16px; background: var(--c-matcha); border-radius: 50%;
}
.om-toc__list a { color: var(--c-ink); text-decoration: none; line-height: 1.7; }
.om-toc__list a:hover { color: var(--c-matcha); text-decoration: underline; }
.om-toc__list > li > a { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); }
.om-toc__list > li > a::before {
	content: counter(om-toc, decimal-leading-zero); color: var(--c-gold);
	font-family: var(--font-heading); font-weight: var(--heading-weight);
}
.om-toc__list .is-sub { margin-top: 2px; font-size: .875em; }
.om-toc__list .is-sub a { color: var(--c-muted); }
/* Collapsed: the fifth entry fades out; the ones after it are not shown. */
.om-toc.is-collapsed .om-toc__list {
	-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--toc-fade, 60px) - 4px), rgb(0 0 0 / 45%) calc(100% - var(--toc-fade, 60px) + 6px), rgb(0 0 0 / 30%) calc(100% - var(--toc-fade, 60px) + 30px), transparent);
	mask-image: linear-gradient(to bottom, #000 calc(100% - var(--toc-fade, 60px) - 4px), rgb(0 0 0 / 45%) calc(100% - var(--toc-fade, 60px) + 6px), rgb(0 0 0 / 30%) calc(100% - var(--toc-fade, 60px) + 30px), transparent);
}
.om-toc__more {
	position: absolute; left: 50%; bottom: -22px; width: 44px; height: 44px; padding: 0; transform: translateX(-50%);
	color: var(--c-on-matcha); background: var(--c-matcha); border: 3px solid var(--c-paper); border-radius: 50%;
	cursor: pointer; transition: background .2s, box-shadow .2s;
}
.om-toc__more:hover { box-shadow: var(--shadow); background: #3f5a25; }
.om-toc__more:focus-visible { outline: 2px solid var(--c-matcha); outline-offset: 2px; }
.om-toc__more[hidden] { display: none; }
.om-toc__more::before, .om-toc__more::after {
	content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; margin: -1px 0 0 -8px;
	background: currentColor; border-radius: 1px; transition: transform .3s ease;
}
.om-toc__more::after { transform: rotate(90deg); }
.om-toc__more[aria-expanded="true"]::before { transform: rotate(45deg); }
.om-toc__more[aria-expanded="true"]::after { transform: rotate(135deg); }
@media (min-width: 768px) {
	.om-toc { padding: 32px 40px 36px; }
}

/* ---------- Prose (article body) ---------- */
.om-prose--intro { margin-bottom: 32px; }
/* Vertical rhythm. Margins live on the following element only; the
   selectors are kept at the same weight so a later element rule (like
   .om-prose p) cannot zero them out. */
.om-prose > * { margin-top: 0; margin-bottom: 0; }
.om-prose > * + * { margin-top: 1.25em; }
.om-prose > h2 + * { margin-top: 1.4em; }          /* H2 has a rule under it */
.om-prose > :is(h3, h4) + * { margin-top: 1.1em; }
.om-prose h2 {
	font-size: var(--fs-h2); margin-top: 2.4em; padding-bottom: .4em;
	border-bottom: 1px solid var(--c-line); position: relative;
}
.om-prose h2::after {
	content: ""; position: absolute; left: 0; bottom: -1px; width: 48px; height: 2px; background: var(--c-gold);
}
.om-prose h3 { font-size: var(--fs-h3); margin-top: 2em; padding-left: 12px; border-left: 3px solid var(--c-matcha); }
.om-prose h4 {
	position: relative; font-size: 1.0625em; margin-top: 1.6em; padding: 0 0 6px 22px;
	border-bottom: 1px dotted var(--c-line);
}
/* A small ring in the colours of the table of contents dots. */
.om-prose h4::before {
	content: ""; position: absolute; left: 2px; top: .45em; width: 8px; height: 8px;
	border: 2px solid var(--c-matcha); border-radius: 50%; background: var(--c-matcha-soft);
}
.om-prose ul, .om-prose ol { padding-left: 1.4em; }
.om-prose li + li { margin-top: .4em; }
.om-prose img { border-radius: var(--radius); }
.om-prose figure { margin-inline: 0; }
.om-prose figcaption { margin-top: 8px; font-size: var(--fs-small); color: var(--c-muted); text-align: center; }
.om-prose blockquote {
	margin-inline: 0; padding: 16px 20px; background: var(--c-matcha-soft); border-left: 3px solid var(--c-matcha); border-radius: 0 var(--radius) var(--radius) 0;
}
/* Tables: a card with quiet row lines. A table too wide for the column slides sideways. */
.om-prose .wp-block-table {
	margin-inline: 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
	background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.om-prose .wp-block-table:focus-visible { outline: 2px solid var(--c-matcha); outline-offset: 2px; }
.om-prose table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9375em; }
.om-prose th, .om-prose td { min-width: 6.5em; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.om-prose thead th {
	color: var(--c-matcha); background: var(--c-matcha-soft); border-bottom: 2px solid var(--c-matcha);
	font-family: var(--font-heading); font-weight: var(--heading-weight); white-space: nowrap;
}
.om-prose tbody tr:last-child > * { border-bottom: 0; }
.om-prose tr > * + * { border-left: 1px solid #e7e2d5; }
.om-prose thead tr > * + * { border-left-color: #cfdabb; }
.om-prose tbody tr:hover > * { background: #fbfaf5; }
.om-prose tbody td:first-child { font-weight: 600; }
/* The first column stays in view while the rest slides. */
.om-prose .is-scrollable tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--c-card); box-shadow: 1px 0 0 var(--c-line); }
.om-prose .is-scrollable thead tr > :first-child { background: var(--c-matcha-soft); }
.om-prose .wp-block-table figcaption { position: sticky; left: 0; margin: 0; padding: 8px 16px; border-top: 1px solid var(--c-line); }
.om-prose > .wp-block-table + .om-table-hint { margin: 6px 0 0; text-align: center; color: var(--c-muted); font-size: .75rem; opacity: .75; }
.om-prose hr { border: 0; height: 1px; background: var(--c-line); margin-block: 2.4em; }

/* "ひとことメモ" box: add the class om-note to a group/paragraph block. */
.om-prose .om-note {
	padding: 16px 20px; background: var(--c-card); border: 1px dashed var(--c-gold); border-radius: var(--radius);
}

/* ---------- Cards ---------- */
.om-cards {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 600px) { .om-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) {
	.om-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.om-cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.om-card {
	display: flex; flex-direction: column;
	background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius);
	overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.om-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.om-card__link { display: flex; flex-direction: column; color: inherit; text-decoration: none; flex: 1; }
.om-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-matcha-soft); }
.om-card__media img { width: 100%; height: 100%; object-fit: cover; }
.om-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.om-card__title { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 1.125rem; line-height: 1.45; }
.font-latin .om-card__title { font-size: 1.25rem; line-height: 1.25; }
.om-card__text { font-size: var(--fs-small); color: var(--c-muted); line-height: 1.7; }
.om-card__link:hover .om-card__title { color: var(--c-matcha); }
.om-card__children {
	list-style: none; margin: 0; padding: 4px 18px 16px; border-top: 1px solid var(--c-line);
	font-size: var(--fs-small);
}
.om-card__children li { border-bottom: 1px dotted var(--c-line); }
.om-card__children li:last-child { border-bottom: 0; }
.om-card__children a { display: block; padding: 8px 0; color: var(--c-ink); text-decoration: none; }
.om-card__children a::before { content: "›"; margin-right: 8px; color: var(--c-gold); }
.om-card__children a:hover { color: var(--c-matcha); }

.om-placeholder {
	display: block; width: 100%; height: 100%;
	background:
		radial-gradient(circle at 30% 30%, rgb(255 255 255 / 25%), transparent 40%),
		linear-gradient(135deg, #8fb15a, #4f6f2f 55%, #2f4a1a);
}
.om-placeholder--hero { aspect-ratio: auto; }

/* ---------- Blog card in the content ([card url="…"], inc/blog-card.php) ---------- */
.om-blogcard {
	display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start;
	padding: 12px; color: var(--c-ink); text-decoration: none;
	background: var(--c-card); border: 1px solid var(--c-line); border-left: 3px solid var(--c-matcha); border-radius: var(--radius);
	transition: box-shadow .2s, border-color .2s;
}
.om-blogcard:hover { box-shadow: var(--shadow); border-color: var(--c-matcha); }
.om-blogcard:focus-visible { outline: 2px solid var(--c-matcha); outline-offset: 2px; }
.om-blogcard__media { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: calc(var(--radius) - 4px); background: var(--c-matcha-soft); }
.om-blogcard__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.om-blogcard__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.om-blogcard__label { font-size: .75rem; color: var(--c-gold); letter-spacing: .04em; }
.om-blogcard__title {
	font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 1.0625rem; line-height: 1.45;
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.om-blogcard:hover .om-blogcard__title { color: var(--c-matcha); }
.om-blogcard__text {
	display: none; font-size: var(--fs-small); color: var(--c-muted); line-height: 1.7;
	-webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.om-blogcard__more { font-size: var(--fs-small); color: var(--c-matcha); }
.om-blogcard__more::after { content: " ›"; }
/* Wider column: landscape image and the summary. */
@container (min-width: 560px) {
	.om-blogcard { grid-template-columns: 200px minmax(0, 1fr); gap: 18px; padding: 14px; }
	.om-blogcard__media { aspect-ratio: 16 / 10; }
	.om-blogcard__title { font-size: 1.1875rem; }
	.om-blogcard__text { display: -webkit-box; }
}
.om-prose > .om-blogcard + .om-blogcard { margin-top: 12px; }

/* ---------- Sections ---------- */
.om-section { margin-top: 56px; }
.om-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.om-section__title {
	font-size: var(--fs-h2); margin-bottom: 20px;
	display: flex; align-items: center; gap: 12px;
}
.om-section__title::before { content: ""; width: 24px; height: 2px; background: var(--c-gold); flex: none; }
.om-section__more { font-size: var(--fs-small); white-space: nowrap; }
.om-section--band {
	padding: 32px var(--gutter); margin-inline: calc(var(--gutter) * -1);
	background: var(--c-matcha-soft);
}
.om-primary .om-section--band .om-cards { grid-template-columns: minmax(0, 1fr); }
@container (min-width: 520px) { .om-primary .om-section--band .om-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .om-section--band { border-radius: var(--radius); margin-inline: 0; } }

.om-back { margin: 32px 0 0; }
.om-back a::before { content: "‹ "; }
.om-empty { padding: 32px 0; color: var(--c-muted); }

/* ---------- List pages: search results, 404, archives ---------- */
.om-layout-list { padding-bottom: 72px; }
.om-layout-list > * + * { margin-top: 32px; }
.om-layout-list > .om-page-header { padding-bottom: 0; }
.om-layout-list .om-page-header__lead { margin: 12px 0 0; color: var(--c-muted); }
.om-layout-list > .om-section { margin-top: 56px; }
.om-layout-list > .om-search { max-width: 520px; }

/* Page numbers (the_posts_pagination). */
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.om-layout-list > .pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 16px;
	color: var(--c-ink); background: var(--c-card); border: 1px solid var(--c-line); border-radius: 999px;
	font-family: var(--font-heading); font-weight: var(--heading-weight); text-decoration: none;
	transition: border-color .2s, color .2s, background .2s;
}
.pagination a.page-numbers:hover { color: var(--c-matcha); border-color: var(--c-matcha); }
.pagination .page-numbers.current { color: var(--c-on-matcha); background: var(--c-matcha); border-color: var(--c-matcha); }
.pagination .page-numbers.dots { min-width: auto; padding: 0 4px; background: none; border: 0; }
.pagination .page-numbers:focus-visible { outline: 2px solid var(--c-matcha); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.om-button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 22px; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--c-matcha); color: var(--c-on-matcha); text-decoration: none; font-weight: 600;
}
.om-button:hover { filter: brightness(1.08); text-decoration: none; }
.om-linklike { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- Hero (language top) ---------- */
.om-hero { position: relative; min-height: min(68vh, 560px); display: grid; isolation: isolate; color: #fff; }
.om-hero__media, .om-hero__media img, .om-hero__media .om-placeholder {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
}
.om-hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(180deg, rgb(20 24 14 / 10%), rgb(20 24 14 / 65%));
}
.om-hero__body {
	align-self: end; width: 100%; max-width: calc(var(--w-wide) + var(--gutter) * 2);
	margin-inline: auto; padding: 48px var(--gutter);
}
.om-hero__brand {
	margin: 0 0 8px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.125rem; letter-spacing: .2em; text-transform: uppercase; opacity: .9;
}
.om-hero__title { font-size: clamp(1.75rem, 5vw, 3.25rem); max-width: 18em; text-wrap: balance; }

.om-intro { max-width: var(--w-prose); margin: 48px auto 0; font-size: 1.0625em; }

/* About CTA */
.om-about-cta {
	padding: 40px var(--gutter); text-align: center; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.om-about-cta .om-section__title { justify-content: center; }
.om-about-cta p { max-width: 36em; margin: 0 auto 24px; color: var(--c-muted); }

/* ---------- Author / share ---------- */
.om-share { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--c-line); }
.om-share__title { margin: 0 0 12px; font-weight: 600; }
.om-share ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.om-share__btn {
	display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; cursor: pointer;
	background: var(--c-card); color: var(--c-ink); border: 1px solid var(--c-line); border-radius: 999px;
	text-decoration: none; font-size: var(--fs-small);
}
.om-share__btn:hover { border-color: var(--c-matcha); color: var(--c-matcha); }

.om-author {
	display: flex; gap: 16px; align-items: flex-start; margin-top: 32px; padding: 20px;
	background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.om-author__mark { width: 48px; height: 48px; flex: none; }
.om-author__name { margin: 0; font-weight: 700; }
.om-author__text { margin: 6px 0 8px; font-size: var(--fs-small); color: var(--c-muted); }
.om-author__link { font-size: var(--fs-small); }

/* ---------- Shop / experience info ---------- */
.om-place {
	margin-top: 48px; padding: 24px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.om-place__title { font-size: var(--fs-h3); margin-bottom: 16px; }
.om-place__list { margin: 0; }
.om-place__list > div { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.om-place__list > div:last-child { border-bottom: 0; }
.om-place__list dt { color: var(--c-muted); font-size: var(--fs-small); }
.om-place__list dd { margin: 0; }
.om-place__reading { color: var(--c-muted); }
.om-place__checked { margin: 16px 0 0; font-size: var(--fs-small); color: var(--c-muted); }
.om-map { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.om-map iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); }
@media (max-width: 479px) { .om-place__list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------- Language selection (/) ---------- */
.is-language-select .om-main { padding: 0; }
.om-select {
	min-height: calc(100svh - 72px); display: grid; place-items: center; padding: 32px var(--gutter);
	background:
		linear-gradient(180deg, rgb(247 244 236 / 82%), rgb(247 244 236 / 92%)),
		var(--om-select-bg, linear-gradient(135deg, #8fb15a, #4f6f2f 55%, #2f4a1a)) center / cover;
}
.om-select__panel { width: 100%; max-width: 760px; text-align: center; }
.om-select__title { margin: 24px 0 8px; display: flex; flex-direction: column; gap: 4px; }
.om-select__title span:first-child { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(2rem, 6vw, 3rem); }
.om-select__title span:last-child { font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 1.125rem; color: var(--c-muted); font-weight: 500; }
.om-select__prompt { margin: 24px 0 16px; color: var(--c-muted); }
.om-select__list {
	list-style: none; margin: 0; padding: 0; display: grid; gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) { .om-select__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.om-select__list a {
	display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 12px;
	background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius);
	color: var(--c-ink); text-decoration: none; transition: border-color .2s, box-shadow .2s;
}
.om-select__list a:hover { border-color: var(--c-matcha); box-shadow: var(--shadow); }
.om-select__name { font-weight: 700; font-size: 1.0625rem; }
.om-select__hint { font-size: .8125rem; color: var(--c-muted); }
.om-select__list li.is-suggested { grid-column: 1 / -1; order: -1; }
.om-select__list li.is-suggested a { border-color: var(--c-matcha); box-shadow: inset 0 0 0 1px var(--c-matcha); }
.om-select__list li.is-suggested a::before {
	content: attr(data-om-suggest); font-size: .75rem; color: var(--c-matcha); font-weight: 600;
}

/* ---------- Footer ---------- */
.om-footer { margin-top: 32px; background: var(--c-card); border-top: 1px solid var(--c-line); font-size: .9375rem; }
.om-footer__inner {
	display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr);
	max-width: calc(var(--w-wide) + var(--gutter) * 2); margin-inline: auto; padding: 48px var(--gutter) 32px;
}
@media (min-width: 768px) { .om-footer__inner { grid-template-columns: 2fr 1fr 1fr; } }
.om-footer__tagline { margin: 12px 0 0; color: var(--c-muted); }
.om-footer__follow { margin: 20px 0 8px; font-size: var(--fs-small); color: var(--c-muted); }
.om-footer__heading { margin: 0 0 12px; font-weight: 700; }
.om-footer ul { list-style: none; margin: 0; padding: 0; }
.om-footer__col li + li { margin-top: 8px; }
.om-footer__col a { color: var(--c-ink); text-decoration: none; }
.om-footer__col a:hover { color: var(--c-matcha); text-decoration: underline; }
.om-sns { display: flex; gap: 8px; }
.om-sns a {
	display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
	border: 1px solid var(--c-line); border-radius: 50%; color: var(--c-ink);
}
.om-sns a:hover { color: var(--c-matcha); border-color: var(--c-matcha); }
.om-footer__copy {
	margin: 0; padding: 16px var(--gutter); text-align: center; font-size: .8125rem; color: var(--c-muted); border-top: 1px solid var(--c-line);
}

/* ---------- Contact Form 7 (docker/seed/contact-form-ja.php) ---------- */
.wpcf7 form > p { margin: 0; }
.om-form__field { display: block; margin-bottom: 20px; }
.om-form__label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 600; }
.om-form__required {
	padding: 1px 8px; font-size: .75rem; font-weight: 700; line-height: 1.6;
	color: #fff; background: var(--c-matcha); border-radius: 4px;
}
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 select, .wpcf7 textarea {
	width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem; /* 16px: no zoom on iPhone */
	color: var(--c-ink); background: var(--c-card); border: 1px solid var(--c-line); border-radius: 8px;
}
.wpcf7 textarea { height: 220px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { outline: 2px solid var(--c-matcha); outline-offset: 1px; border-color: var(--c-matcha); }
.om-form__consent { margin: 8px 0 24px; padding: 14px 16px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 8px; }
.om-form__consent .wpcf7-list-item { margin: 0; }
.om-form__consent label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.om-form__consent input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--c-matcha); }
.om-form__submit { position: relative; text-align: center; }
.wpcf7 input[type="submit"] {
	min-width: 240px; padding: 14px 32px; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--c-matcha); color: #fff; font: inherit; font-weight: 700;
}
.wpcf7 input[type="submit"]:hover { filter: brightness(1.08); }
.wpcf7 input[type="submit"]:disabled { opacity: .5; cursor: not-allowed; }
.wpcf7-not-valid-tip { margin-top: 6px; font-size: var(--fs-small); color: #b3261e; }
.wpcf7 form .wpcf7-response-output { margin: 20px 0 0; padding: 12px 16px; border-radius: 8px; font-size: var(--fs-small); }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--c-matcha); background: var(--c-matcha-soft); }
/* Out of the flow so the button stays centered. */
.om-form__submit .wpcf7-spinner { position: absolute; top: 50%; margin: -12px 0 0 12px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
	.om-card:hover { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
