/*
 * Iphoneteq Apple DB — frontend styles
 * Design language: Liquid Glass (Apple glassmorphism)
 *
 * SHARED DESIGN TOKENS — the future AFFINGER child theme for
 * iphoneteq.net MUST reuse these exact custom-property names so the
 * plugin and the theme stay visually in sync. Define overrides under
 * the same `.ipdb` scope (or a future theme-level scope agreed then);
 * do not rename tokens without updating both sides.
 *
 *   --ipdb-font-family        system font stack
 *   --ipdb-text               primary text colour
 *   --ipdb-text-secondary     secondary / muted text colour
 *   --ipdb-accent             accent colour (links, highlights)
 *   --ipdb-rumor-bg           warm amber glass bg (rumored products, §4.6)
 *   --ipdb-rumor-border       amber border (rumored badge / notice)
 *   --ipdb-rumor-text         amber text (rumored badge / notice)
 *   --ipdb-glass-bg           translucent glass background
 *   --ipdb-glass-bg-strong    denser glass background (hover / emphasis)
 *   --ipdb-glass-bg-solid     solid fallback background (no transparency)
 *   --ipdb-glass-border       1px light glass border colour
 *   --ipdb-glass-highlight    inner top highlight colour
 *   --ipdb-blur               backdrop blur radius
 *   --ipdb-saturate           backdrop saturation boost
 *   --ipdb-radius             default large radius (cards)
 *   --ipdb-radius-sm          smaller radius (badges, inner blocks)
 *   --ipdb-shadow             soft layered card shadow
 *   --ipdb-shadow-sm          lighter shadow for small elements
 *   --ipdb-spacing            base spacing unit
 */

.ipdb {
	--ipdb-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
		"Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
		"Noto Sans JP", "Yu Gothic UI", sans-serif;
	--ipdb-text: #1d1d1f;
	--ipdb-text-secondary: rgba(29, 29, 31, 0.62);
	--ipdb-accent: #0066cc;

	--ipdb-rumor-bg: rgba(255, 190, 60, 0.22);
	--ipdb-rumor-border: rgba(190, 120, 10, 0.55);
	--ipdb-rumor-text: #7a4a00;

	--ipdb-glass-bg: rgba(255, 255, 255, 0.55);
	--ipdb-glass-bg-strong: rgba(255, 255, 255, 0.72);
	--ipdb-glass-bg-solid: #ffffff;
	--ipdb-glass-border: rgba(255, 255, 255, 0.65);
	--ipdb-glass-highlight: rgba(255, 255, 255, 0.8);

	--ipdb-blur: 20px;
	--ipdb-saturate: 180%;

	--ipdb-radius: 24px;
	--ipdb-radius-sm: 14px;

	--ipdb-shadow: 0 8px 32px rgba(31, 38, 135, 0.12),
		0 2px 8px rgba(0, 0, 0, 0.06);
	--ipdb-shadow-sm: 0 4px 16px rgba(31, 38, 135, 0.1);

	--ipdb-spacing: 16px;

	font-family: var(--ipdb-font-family);
	color: var(--ipdb-text);
	-webkit-font-smoothing: antialiased;
}

/* Dark mode: darker glass, light text. */
@media (prefers-color-scheme: dark) {
	.ipdb {
		--ipdb-text: #f5f5f7;
		--ipdb-text-secondary: rgba(245, 245, 247, 0.62);
		--ipdb-accent: #2997ff;
		--ipdb-rumor-bg: rgba(255, 180, 40, 0.18);
		--ipdb-rumor-border: rgba(255, 190, 60, 0.55);
		--ipdb-rumor-text: #ffcf6e;
		--ipdb-glass-bg: rgba(28, 28, 30, 0.55);
		--ipdb-glass-bg-strong: rgba(44, 44, 46, 0.72);
		--ipdb-glass-bg-solid: #1c1c1e;
		--ipdb-glass-border: rgba(255, 255, 255, 0.18);
		--ipdb-glass-highlight: rgba(255, 255, 255, 0.12);
		--ipdb-shadow: 0 8px 32px rgba(0, 0, 0, 0.45),
			0 2px 8px rgba(0, 0, 0, 0.3);
		--ipdb-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
	}
}

/* Reduced transparency: drop the glass effect, use solid surfaces. */
@media (prefers-reduced-transparency: reduce) {
	.ipdb {
		--ipdb-glass-bg: var(--ipdb-glass-bg-solid);
		--ipdb-glass-bg-strong: var(--ipdb-glass-bg-solid);
		--ipdb-blur: 0px;
		--ipdb-saturate: 100%;
	}

	.ipdb .ipdb-card,
	.ipdb .ipdb-badge,
	.ipdb .ipdb-price-block,
	.ipdb .ipdb-rumor-notice {
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}

/* ------------------------------------------------------------------ */
/* Components                                                          */
/* ------------------------------------------------------------------ */

.ipdb .ipdb-card {
	background: var(--ipdb-glass-bg);
	-webkit-backdrop-filter: blur(var(--ipdb-blur)) saturate(var(--ipdb-saturate));
	backdrop-filter: blur(var(--ipdb-blur)) saturate(var(--ipdb-saturate));
	border: 1px solid var(--ipdb-glass-border);
	border-radius: var(--ipdb-radius);
	box-shadow: var(--ipdb-shadow),
		inset 0 1px 0 var(--ipdb-glass-highlight);
	padding: calc(var(--ipdb-spacing) * 1.25);
	margin-bottom: var(--ipdb-spacing);
}

.ipdb .ipdb-badge {
	display: inline-block;
	background: var(--ipdb-glass-bg-strong);
	-webkit-backdrop-filter: blur(var(--ipdb-blur)) saturate(var(--ipdb-saturate));
	backdrop-filter: blur(var(--ipdb-blur)) saturate(var(--ipdb-saturate));
	border: 1px solid var(--ipdb-glass-border);
	border-radius: 999px;
	box-shadow: var(--ipdb-shadow-sm);
	color: var(--ipdb-text-secondary);
	font-size: 0.78em;
	font-weight: 600;
	line-height: 1;
	padding: 6px 12px;
	white-space: nowrap;
}

.ipdb .ipdb-price-block {
	background: var(--ipdb-glass-bg);
	-webkit-backdrop-filter: blur(var(--ipdb-blur)) saturate(var(--ipdb-saturate));
	backdrop-filter: blur(var(--ipdb-blur)) saturate(var(--ipdb-saturate));
	border: 1px solid var(--ipdb-glass-border);
	border-radius: var(--ipdb-radius-sm);
	box-shadow: var(--ipdb-shadow-sm),
		inset 0 1px 0 var(--ipdb-glass-highlight);
	padding: var(--ipdb-spacing);
}

.ipdb .ipdb-price-block .ipdb-price-value {
	font-size: 1.5em;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.ipdb .ipdb-price-block .ipdb-price-meta {
	color: var(--ipdb-text-secondary);
	font-size: 0.82em;
}

.ipdb table.ipdb-spec-table,
.ipdb table.ipdb-compare-table,
.ipdb table.ipdb-variant-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--ipdb-glass-bg);
	-webkit-backdrop-filter: blur(var(--ipdb-blur)) saturate(var(--ipdb-saturate));
	backdrop-filter: blur(var(--ipdb-blur)) saturate(var(--ipdb-saturate));
	border: 1px solid var(--ipdb-glass-border);
	border-radius: var(--ipdb-radius);
	box-shadow: var(--ipdb-shadow);
	overflow: hidden;
}

.ipdb table.ipdb-spec-table th,
.ipdb table.ipdb-spec-table td,
.ipdb table.ipdb-compare-table th,
.ipdb table.ipdb-compare-table td,
.ipdb table.ipdb-variant-table th,
.ipdb table.ipdb-variant-table td {
	padding: 12px 16px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid rgba(127, 127, 135, 0.16);
}

.ipdb table.ipdb-spec-table tr:last-child th,
.ipdb table.ipdb-spec-table tr:last-child td,
.ipdb table.ipdb-compare-table tr:last-child th,
.ipdb table.ipdb-compare-table tr:last-child td,
.ipdb table.ipdb-variant-table tr:last-child th,
.ipdb table.ipdb-variant-table tr:last-child td {
	border-bottom: none;
}

.ipdb table.ipdb-spec-table th,
.ipdb table.ipdb-compare-table th {
	color: var(--ipdb-text-secondary);
	font-weight: 600;
	width: 34%;
}

.ipdb table.ipdb-compare-table .ipdb-diff-better {
	background: var(--ipdb-glass-bg-strong);
	border-radius: var(--ipdb-radius-sm);
	color: var(--ipdb-accent);
	font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Mobile: tables become stacked cards under 640px                     */
/* ------------------------------------------------------------------ */

@media (max-width: 640px) {
	.ipdb table.ipdb-spec-table,
	.ipdb table.ipdb-spec-table tbody,
	.ipdb table.ipdb-spec-table tr,
	.ipdb table.ipdb-spec-table th,
	.ipdb table.ipdb-spec-table td,
	.ipdb table.ipdb-compare-table,
	.ipdb table.ipdb-compare-table tbody,
	.ipdb table.ipdb-compare-table tr,
	.ipdb table.ipdb-compare-table th,
	.ipdb table.ipdb-compare-table td {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}

	.ipdb table.ipdb-spec-table tr,
	.ipdb table.ipdb-compare-table tr {
		padding: 8px 0;
		border-bottom: 1px solid rgba(127, 127, 135, 0.16);
	}

	.ipdb table.ipdb-spec-table tr:last-child,
	.ipdb table.ipdb-compare-table tr:last-child {
		border-bottom: none;
	}

	.ipdb table.ipdb-spec-table th,
	.ipdb table.ipdb-spec-table td,
	.ipdb table.ipdb-compare-table th,
	.ipdb table.ipdb-compare-table td {
		border-bottom: none;
		padding: 4px 16px;
	}
}

/* ------------------------------------------------------------------ */
/* v0.1.0: list / detail layout                                        */
/* ------------------------------------------------------------------ */

.ipdb .ipdb-breadcrumb {
	color: var(--ipdb-text-secondary);
	font-size: 0.85em;
	margin-bottom: var(--ipdb-spacing);
}

.ipdb .ipdb-page-title,
.ipdb .ipdb-product-name {
	letter-spacing: -0.01em;
	margin: 0 0 8px;
}

.ipdb .ipdb-product-name-en {
	color: var(--ipdb-text-secondary);
	margin: 0 0 var(--ipdb-spacing);
}

.ipdb .ipdb-lead {
	color: var(--ipdb-text-secondary);
	margin-bottom: calc(var(--ipdb-spacing) * 1.5);
}

.ipdb .ipdb-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: calc(var(--ipdb-spacing) * 1.5);
}

.ipdb .ipdb-tab {
	background: var(--ipdb-glass-bg);
	-webkit-backdrop-filter: blur(var(--ipdb-blur)) saturate(var(--ipdb-saturate));
	backdrop-filter: blur(var(--ipdb-blur)) saturate(var(--ipdb-saturate));
	border: 1px solid var(--ipdb-glass-border);
	border-radius: 999px;
	box-shadow: var(--ipdb-shadow-sm);
	color: var(--ipdb-text);
	font-size: 0.88em;
	font-weight: 600;
	padding: 8px 16px;
	text-decoration: none;
}

.ipdb .ipdb-tab-current {
	background: var(--ipdb-glass-bg-strong);
	color: var(--ipdb-accent);
}

.ipdb .ipdb-grid {
	display: grid;
	gap: var(--ipdb-spacing);
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.ipdb .ipdb-grid .ipdb-card {
	margin-bottom: 0;
}

.ipdb .ipdb-card-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.ipdb .ipdb-card-title {
	font-size: 1.15em;
	margin: 0 0 10px;
}

.ipdb .ipdb-card-title a,
.ipdb .ipdb-card-more a {
	color: var(--ipdb-accent);
	text-decoration: none;
}

.ipdb dl.ipdb-card-meta,
.ipdb dl.ipdb-header-meta {
	display: grid;
	gap: 6px 20px;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	margin: 0;
}

.ipdb dl.ipdb-card-meta dt,
.ipdb dl.ipdb-header-meta dt {
	color: var(--ipdb-text-secondary);
	font-size: 0.8em;
	font-weight: 600;
}

.ipdb dl.ipdb-card-meta dd,
.ipdb dl.ipdb-header-meta dd {
	margin: 0 0 6px;
}

.ipdb .ipdb-header-price {
	font-size: 1.25em;
	font-weight: 700;
}

.ipdb .ipdb-product-figure {
	margin: 0 0 var(--ipdb-spacing);
}

.ipdb .ipdb-product-image {
	border-radius: var(--ipdb-radius-sm);
	height: auto;
	max-width: 100%;
}

.ipdb .ipdb-credit {
	color: var(--ipdb-text-secondary);
	font-size: 0.8em;
	margin-top: 6px;
}

.ipdb .ipdb-section {
	margin-bottom: calc(var(--ipdb-spacing) * 1.5);
}

.ipdb .ipdb-section-title {
	margin: 0 0 var(--ipdb-spacing);
}

.ipdb .ipdb-lifecycle {
	margin: 0;
	padding-left: 1.2em;
}

.ipdb .ipdb-faq dt {
	font-weight: 700;
	margin-top: 14px;
}

.ipdb .ipdb-faq dd {
	margin: 4px 0 0;
}

.ipdb .ipdb-freshness {
	color: var(--ipdb-text-secondary);
	font-size: 0.88em;
}

/* ------------------------------------------------------------------ */
/* v0.1.2: rumored / unannounced products (spec §4.6)                  */
/* ------------------------------------------------------------------ */

.ipdb .ipdb-badge-rumored {
	background: var(--ipdb-rumor-bg);
	border-color: var(--ipdb-rumor-border);
	color: var(--ipdb-rumor-text);
}

.ipdb .ipdb-rumor-notice {
	background: var(--ipdb-rumor-bg);
	-webkit-backdrop-filter: blur(var(--ipdb-blur)) saturate(var(--ipdb-saturate));
	backdrop-filter: blur(var(--ipdb-blur)) saturate(var(--ipdb-saturate));
	border: 1px solid var(--ipdb-rumor-border);
	border-left: 6px solid var(--ipdb-rumor-border);
	border-radius: var(--ipdb-radius-sm);
	box-shadow: var(--ipdb-shadow-sm),
		inset 0 1px 0 var(--ipdb-glass-highlight);
	color: var(--ipdb-text);
	margin-bottom: var(--ipdb-spacing);
	padding: 14px 18px;
}

.ipdb .ipdb-rumor-notice p {
	margin: 0;
}

.ipdb .ipdb-rumor-notice strong {
	color: var(--ipdb-rumor-text);
}

.ipdb .ipdb-price-rumored {
	color: var(--ipdb-rumor-text);
	font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* v0.2.0: comparison pages (spec §6)                                  */
/* ------------------------------------------------------------------ */

.ipdb .ipdb-compare-products {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ipdb-spacing);
}

.ipdb .ipdb-compare-product {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	font-size: 1.05em;
	font-weight: 700;
	gap: 8px;
}

.ipdb .ipdb-compare-product a {
	color: var(--ipdb-accent);
	text-decoration: none;
}

.ipdb .ipdb-compare-product-meta {
	color: var(--ipdb-text-secondary);
	font-size: 0.82em;
	font-weight: 400;
}

.ipdb .ipdb-changed-list {
	margin: 0;
	padding-left: 1.2em;
}

.ipdb .ipdb-changed-list li {
	margin-bottom: 6px;
}

.ipdb .ipdb-changed-more {
	color: var(--ipdb-text-secondary);
	font-size: 0.88em;
	margin: 10px 0 0;
}

.ipdb .ipdb-picker-selects {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ipdb-spacing);
	margin-bottom: var(--ipdb-spacing);
}

.ipdb .ipdb-picker-label {
	display: grid;
	font-size: 0.85em;
	font-weight: 600;
	gap: 6px;
}

.ipdb .ipdb-picker-label select {
	background: var(--ipdb-glass-bg-strong);
	border: 1px solid var(--ipdb-glass-border);
	border-radius: var(--ipdb-radius-sm);
	color: var(--ipdb-text);
	font: inherit;
	font-weight: 400;
	max-width: 260px;
	padding: 8px 10px;
}

.ipdb .ipdb-picker-remove {
	margin: 0 0 var(--ipdb-spacing);
}

.ipdb .ipdb-picker-remove a,
.ipdb .ipdb-compare-table thead th a {
	color: var(--ipdb-accent);
	text-decoration: none;
}

.ipdb .ipdb-diff-toggle {
	align-items: center;
	cursor: pointer;
	display: inline-flex;
	font-weight: 600;
	gap: 8px;
}

.ipdb table.ipdb-compare-table thead th {
	color: var(--ipdb-text);
	width: auto;
}

.ipdb table.ipdb-compare-table tbody th {
	width: 22%;
}

.ipdb table.ipdb-compare-table thead .ipdb-badge {
	margin-bottom: 6px;
}

/* Differing rows get a subtle accent marker on the label cell. */
.ipdb table.ipdb-compare-table tr.ipdb-row-diff > th {
	box-shadow: inset 3px 0 0 var(--ipdb-accent);
	color: var(--ipdb-text);
}

/* "違う項目だけ表示" toggle: hide the non-diff rows. */
.ipdb .ipdb-compare-wrap.ipdb-diff-only table.ipdb-compare-table tbody tr.ipdb-row-same {
	display: none;
}

/* ------------------------------------------------------------------
   Hubs (v0.3.0): intro editorial block + match count.
   ------------------------------------------------------------------ */

.ipdb .ipdb-hub-intro {
	margin-bottom: var(--ipdb-spacing);
	padding: var(--ipdb-spacing);
}

.ipdb .ipdb-hub-intro p:last-child {
	margin-bottom: 0;
}

.ipdb .ipdb-hub-count {
	color: var(--ipdb-text-secondary);
	margin: 0 0 var(--ipdb-spacing);
}

/* ------------------------------------------------------------------
   Related news on the detail page (v0.3.0).
   ------------------------------------------------------------------ */

.ipdb .ipdb-news-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ipdb .ipdb-news-list li {
	border-top: 1px solid var(--ipdb-glass-border);
	padding: 8px 0;
}

.ipdb .ipdb-news-list li:first-child {
	border-top: none;
	padding-top: 0;
}

.ipdb .ipdb-news-list time {
	color: var(--ipdb-text-secondary);
	display: block;
	font-size: 0.85em;
}

.ipdb .ipdb-news-list a {
	color: var(--ipdb-accent);
	text-decoration: none;
}

/* ------------------------------------------------------------------
   [ipdb_card] embed inside articles (v0.3.0): a compact product
   card that reuses the glass tokens outside plugin routes.
   ------------------------------------------------------------------ */

.ipdb.ipdb-embed {
	margin: var(--ipdb-spacing) 0;
	max-width: 420px;
}

.ipdb .ipdb-embed-card {
	padding: var(--ipdb-spacing);
}

.ipdb .ipdb-embed-card .ipdb-card-title {
	margin: 6px 0 8px;
}

/* ------------------------------------------------------------------
   v0.6.0: sidebar layout support + display fixes.

   Layout: the templates now render inside the parent theme's
   standard structure (#content > #contentInner > main, with
   get_sidebar()), so the theme owns the page width and column
   layout. Nothing in this stylesheet sets viewport-wide widths;
   .ipdb simply fills the content column it is placed in.
   ------------------------------------------------------------------ */

/* Japanese line breaking: use the standard kinsoku-aware rules so
   units such as 「24インチ」 are not split mid-word on narrow cards
   (the parent theme's looser breaking allowed breaks like
   「24イ/ンチ」). line-break: strict applies the stricter JIS
   line-break rules. word-break: keep-all is deliberately NOT
   used — it is designed for Korean-style spaced words and makes
   Japanese text overflow instead of wrapping. Long unbroken
   latin tokens (model numbers, identifiers) still wrap via
   overflow-wrap on the title elements below. */
.ipdb {
	line-break: strict;
}

.ipdb .ipdb-card-title,
.ipdb .ipdb-page-title,
.ipdb .ipdb-product-name {
	overflow-wrap: break-word;
}

/* Product cards: equal height per grid row, with the price row
   and the "詳細を見る" link pinned to the bottom so price
   baselines line up across a row. */
.ipdb .ipdb-product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.ipdb .ipdb-product-card .ipdb-card-title {
	min-height: 2.8em; /* always reserve exactly two title lines */
}

.ipdb .ipdb-card-title {
	line-height: 1.4;
}

.ipdb .ipdb-card-title a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.ipdb .ipdb-product-card .ipdb-card-more {
	margin-top: auto;
}

/* Card price row: emphasised like the detail page's header price
   (bold, accent colour, （税込） appended in the markup), with a
   tidy placeholder for products that have no launch price. */
.ipdb .ipdb-card-price-row {
	align-items: baseline;
	border-top: 1px solid rgba(127, 127, 135, 0.16);
	display: flex;
	gap: 8px;
	margin: 12px 0 8px;
	padding-top: 10px;
}

.ipdb .ipdb-card-price-label {
	color: var(--ipdb-text-secondary);
	font-size: 0.8em;
	font-weight: 600;
	white-space: nowrap;
}

.ipdb .ipdb-card-price {
	color: var(--ipdb-accent);
	font-size: 1.15em;
	font-weight: 700;
	white-space: nowrap;
}

.ipdb .ipdb-card-price.ipdb-price-rumored {
	color: var(--ipdb-rumor-text);
}

.ipdb .ipdb-card-price.ipdb-card-price-none {
	color: var(--ipdb-text-secondary);
	font-size: 1em;
	font-weight: 400;
}

/* Variant table: its own column model. The shared spec-table
   rule (th width: 34%) crushed the price column to ~48px with
   prices wrapping one character per line; here the 構成 column
   flexes, value columns never wrap, headers never wrap, and the
   price column is right-aligned, bold and nowrap. The wrapper
   scrolls horizontally on narrow screens instead of crushing
   the columns. */
.ipdb .ipdb-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ipdb table.ipdb-variant-table {
	min-width: 500px;
}

.ipdb table.ipdb-variant-table thead th {
	color: var(--ipdb-text-secondary);
	font-weight: 600;
	white-space: nowrap;
	width: auto;
}

.ipdb table.ipdb-variant-table tbody td:not(:first-child) {
	white-space: nowrap;
}

.ipdb table.ipdb-variant-table th.ipdb-variant-price,
.ipdb table.ipdb-variant-table td.ipdb-variant-price {
	text-align: right;
}

.ipdb table.ipdb-variant-table td.ipdb-variant-price {
	font-weight: 700;
	min-width: 7em;
}

/* Compare table inside the (narrower) content column: scroll
   horizontally rather than crushing product columns. The
   min-width applies only above the mobile stacking breakpoint,
   where the table still renders as a table. */
.ipdb .ipdb-compare-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

@media (min-width: 641px) {
	.ipdb table.ipdb-compare-table {
		min-width: 540px;
	}
}

/* ------------------------------------------------------------------
   v0.6.1: card foot block, title wrapping, pills, detail H1.

   1. Card price alignment: in v0.6.0 the price row and the
   詳細を見る link were separate flex children and only the link
   carried margin-top: auto, so a card missing a meta row (e.g.
   AirPods has no 対応OS row) showed its price ~50px higher than
   its row neighbours while the links still aligned. The markup
   now wraps price row + link in one .ipdb-card-foot block and
   the auto margin lives on that block, so the whole bottom
   block is pinned to the card's bottom edge and prices line up
   across a row regardless of missing meta rows.
   ------------------------------------------------------------------ */

.ipdb .ipdb-product-card .ipdb-card-foot {
	margin-top: auto;
}

/* Inside the foot block the link no longer needs the auto margin
   it carried as a direct flex child in v0.6.0 (the lineage mini
   cards on the detail page still use that rule). */
.ipdb .ipdb-card-foot .ipdb-card-more {
	margin-top: 0;
}

/* 2. Product-name wrapping: line-break: strict (v0.6.0) only
   tightens kinsoku — punctuation and small-kana rules. It does
   NOT prohibit a break between digits and a following kana unit,
   so names still split as "14" / "インチ" or right after the
   comma in "(M5 Max, 2026)". Card titles are product names —
   mostly Latin words, digits and units separated by spaces —
   so keep-all is the right tool HERE (unlike container-wide,
   where it would break Japanese prose): breaks happen at
   spaces, never inside a word or a digit/unit run.
   overflow-wrap: anywhere stays as the overflow fallback so a
   single unbreakable segment longer than the card still wraps
   instead of overflowing. */
.ipdb .ipdb-card-title,
.ipdb .ipdb-card-title a {
	word-break: keep-all;
	overflow-wrap: anywhere;
}

/* Category pills and card badges never wrap their label
   ("Apple Watch" split over two lines in the tab row). The
   badge rule restates v0.1.0's nowrap alongside the tabs so the
   pair stays together. */
.ipdb .ipdb-badge,
.ipdb .ipdb-tab {
	white-space: nowrap;
}

/* 3. Detail H1: the product name inherited the theme's reset
   sizing and rendered small and non-bold, reading as body text.
   Style it as the page title it is; badges above and the meta
   list below are untouched.
   v0.6.2: the selector must be the compound .ipdb.ipdb-single —
   the template puts both classes on the SAME wrapper element,
   so the v0.6.1 descendant form (.ipdb .ipdb-single ...) never
   matched anything and the theme's header h1 reset (12px,
   normal weight) won by default. Verified by cascade simulation
   against the live page's full stylesheet set. */
.ipdb.ipdb-single .ipdb-product-name {
	color: var(--ipdb-text);
	font-size: 2em;
	font-weight: 700;
	line-height: 1.3;
	margin: 2px 0 10px;
}

/* 4. Category widget (v0.6.3): the same product cards in a compact
   grid for front-page and sidebar widget areas. Column width is
   capped by the container so a narrow sidebar stays one column. */
.ipdb .ipdb-widget-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
	gap: 16px;
	/* v0.6.4: widget shelves only — do not stretch cards to the row
	   height. On the hub grids the equal-height cards with the foot
	   pinned to the bottom are deliberate (prices line up across a
	   row), but in a widget shelf the meta rows vary more, so the
	   stretch left a large empty gap above the price. Natural
	   height keeps each shelf compact; hub grids are untouched. */
	align-items: start;
}

/* v0.6.5: align-items alone was not enough — .ipdb-product-card
   carries height:100% (hub design: equal-height cards), and an
   explicit height beats the grid's align-items, so widget cards
   still stretched and the bottom-pinned foot left the same gap.
   Widget cards opt out of the forced height; hub cards keep it. */
.ipdb .ipdb-widget-card {
	height: auto;
}

.ipdb .ipdb-widget-more {
	margin: 14px 2px 0;
	text-align: right;
}
