/* ===========================================================================
 * アプリ紹介ページ(/works/<slug>/)の見た目(2026-11-20)
 *
 * 組み立ては inc/apps.php、中身は data/apps.json。
 * 共通の骨組みの上に、アプリごとの配色と飾りを乗せる(.app--prism など)。
 *
 * 決まりごと(本人の好み。.agents/memory の feedback_blog_writing_style):
 *   - 点滅・揺れなど、動く飾りは使わない
 *   - 左側にだけ太い線が入る見出しやカードは使わない。区切りは、本の章扉のような「上の罫線と番号」
 *   - 指すと浮き上がって影が出るカードは使わない
 *   - 文字は地との差を大きく、行間はゆったり(読みやすさが先)
 * ========================================================================= */

.rimin-app-page {
	padding: 0;
	max-width: none;
}

/* ---------- 共通の骨組み ---------- */

.app {
	--bg: #f5f7fa;
	--ink: #1f2933;
	--sub: #52606d;
	--accent: #1f7a45;
	--line: #d9e0e7;
	--phone: #1f2933;
	background: var(--bg);
	color: var(--ink);
	line-height: 1.9;
	overflow-wrap: anywhere;
}

.app a {
	color: inherit;
}

.app-hero__inner,
.app-facts,
.app-section,
.app-back {
	max-width: 1080px;
	margin-inline: auto;
	padding-inline: 20px;
	box-sizing: border-box;
}

/* 先頭 */
.app-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
	gap: clamp(28px, 5vw, 72px);
	align-items: center;
	padding-block: clamp(44px, 8vw, 104px) clamp(36px, 6vw, 72px);
}

.app-hero__status {
	display: inline-block;
	margin: 0 0 1.2em;
	padding: 0.25em 0.9em;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	color: var(--sub);
}

.app-hero__name {
	margin: 0;
	font-size: clamp(2.5rem, 6.4vw, 4.4rem);
	line-height: 1.12;
	letter-spacing: 0.02em;
	font-weight: 700;
}

.app-hero__en {
	display: block;
	margin-top: 0.55em;
	font-family: "BIZ UDGothic", ui-monospace, monospace;
	font-size: 0.82rem;
	font-weight: 400;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--sub);
}

.app-hero__catch {
	margin: 0.4em 0 0.6em;
	font-size: clamp(1.35rem, 3.2vw, 1.9rem);
	font-weight: 700;
	line-height: 1.5;
	color: var(--accent);
}

.app-hero__lead {
	max-width: 34em;
	margin: 0;
	font-size: 1.02rem;
	line-height: 2;
}

.app-hero__cta {
	margin: 1.8em 0 0;
}

.app-hero__purpose {
	max-width: 34em;
	margin: 1em 0 0;
	line-height: 1.8;
}

/* アプリのアイコン(2026-11-25)。実物のアイコンと同じ角の丸みにそろえる */
.app-hero__icon {
	margin: 1.1em 0 0.6em;
}
.app-hero__icon img {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 22%;
	box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.6);
}

/* 作ったきっかけ(2026-11-25)。絵と文を横に並べ、狭い画面では縦に積む */
.app-story__body {
	display: grid;
	grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
	gap: clamp(24px, 5vw, 56px);
	align-items: center;
}
.app-story__art {
	margin: 0;
}
.app-story__art img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--line);
	border-radius: 10px;
}
.app-story__text {
	margin: 0;
	font-size: 1.08rem;
	line-height: 2;
}

/* 画面をもっと見る(2026-11-25)。横に流して見る一覧。指でも、つまみでも送れる */
.app-gallery__row {
	display: flex;
	gap: 22px;
	overflow-x: auto;
	padding: 4px 4px 18px;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	/* 暗い配色のページでスクロールの棒が白く浮かないよう、アプリの文字の薄い色に合わせる */
	scrollbar-color: var(--sub) transparent;
}
.app-phone--gallery {
	flex: 0 0 auto;
	width: 190px;
	scroll-snap-align: start;
}
.app-phone__caption {
	margin: 0.75em 0.2em 0.2em;
	font-size: 0.82rem;
	line-height: 1.5;
	text-align: center;
	color: var(--sub);
}
.app-phone--gallery .app-phone__caption {
	color: #e9edf4; /* 枠(--phone)はどのアプリでも暗い色なので、説明は明るい文字にする */
}

.app-button {
	display: inline-block;
	padding: 0.85em 1.7em;
	border-radius: 999px;
	background: var(--accent);
	color: var(--bg) !important;
	font-weight: 700;
	text-decoration: none;
	letter-spacing: 0.04em;
}

.app-button:hover,
.app-button:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* スマホの枠 */
.app-phone {
	margin: 0;
	padding: 7px;
	border-radius: 30px;
	background: var(--phone);
	box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.55);
}

.app-phone img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 23px;
}

.app-phone--hero {
	justify-self: center;
	width: min(100%, 300px);
}

/* 数字で見る3つの点 */
.app-facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0;
	margin-block: 0;
	list-style: none;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	padding-block: 0;
}

.app-facts li {
	padding: 1.6em 1.2em;
	text-align: center;
}

.app-facts li + li {
	border-inline-start: 1px solid var(--line);
}

.app-facts__num {
	font-family: "BIZ UDGothic", ui-monospace, monospace;
	font-size: clamp(2rem, 4.4vw, 2.9rem);
	font-weight: 700;
	line-height: 1.1;
	color: var(--accent);
}

.app-facts__unit {
	margin-inline-start: 0.15em;
	font-weight: 700;
}

.app-facts__text {
	display: block;
	margin-top: 0.4em;
	font-size: 0.9rem;
	color: var(--sub);
}

/* かたまり(章扉の形: 上に罫線、その下に見出し) */
.app-section {
	padding-block: clamp(48px, 7vw, 88px) 0;
}

.app-h2 {
	margin: 0 0 1.2em;
	padding-top: 0.7em;
	border-top: 2px solid var(--ink);
	font-size: clamp(1.45rem, 3vw, 1.95rem);
	line-height: 1.4;
	letter-spacing: 0.04em;
}

/* できること(画面写真と説明を、左右交互に) */
.app-feature {
	display: grid;
	grid-template-columns: 230px minmax(0, 1fr);
	gap: clamp(24px, 5vw, 64px);
	align-items: center;
	padding-block: 36px;
	border-top: 1px dashed var(--line);
}

.app-feature:first-of-type {
	border-top: none;
	padding-top: 0;
}

.app-feature:nth-of-type(even) {
	grid-template-columns: minmax(0, 1fr) 230px;
}

.app-feature:nth-of-type(even) .app-phone {
	order: 2;
}

.app-feature__num {
	margin: 0;
	font-family: "BIZ UDGothic", ui-monospace, monospace;
	font-size: 0.95rem;
	letter-spacing: 0.2em;
	color: var(--accent);
}

.app-feature__title {
	margin: 0.2em 0 0.6em;
	font-size: clamp(1.25rem, 2.6vw, 1.55rem);
	line-height: 1.5;
}

.app-feature__text p:last-child {
	margin: 0;
	max-width: 32em;
}

/* 守っていること・箇条書き */
.app-privacy ul,
.app-list ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.app-list ul {
	grid-template-columns: minmax(0, 1fr);
}

.app-privacy li,
.app-list li {
	position: relative;
	padding: 0.9em 1em 0.9em 2.6em;
	border: 1px solid var(--line);
	border-radius: 12px;
}

.app-privacy li::before,
.app-list li::before {
	content: "";
	position: absolute;
	top: 1.35em;
	left: 1em;
	width: 0.7em;
	height: 0.7em;
	border-radius: 3px;
	background: var(--accent);
}

/* 作った裏側 */
.app-stories ol {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: story;
	border-top: 1px solid var(--line);
}

.app-stories li {
	counter-increment: story;
	display: grid;
	grid-template-columns: 3em minmax(0, 1fr);
	padding: 0.9em 0;
	border-bottom: 1px solid var(--line);
}

.app-stories li::before {
	content: counter(story, decimal-leading-zero);
	font-family: "BIZ UDGothic", ui-monospace, monospace;
	color: var(--accent);
}

.app-stories a {
	text-underline-offset: 0.25em;
}

.app-back {
	padding-block: clamp(48px, 7vw, 80px) clamp(56px, 8vw, 96px);
	margin-block: 0;
}

/* 形式の一覧(プリズム) */
.app-formats__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 20px;
}

.app-formats__group h3 {
	margin: 0 0 0.6em;
	padding-top: 0.5em;
	border-top: 4px solid var(--c, var(--accent));
	font-size: 1.05rem;
}

.app-formats__group ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.app-formats__group li {
	padding: 0.15em 0.6em;
	border: 1px solid var(--line);
	border-radius: 6px;
	font-family: "BIZ UDGothic", ui-monospace, monospace;
	font-size: 0.88rem;
}

/* 読み上げの例(聴くラノベ) */
.app-examples__scroll {
	overflow-x: auto;
}

.app-examples table {
	width: 100%;
	min-width: 520px;
	border-collapse: collapse;
}

.app-examples th,
.app-examples td {
	padding: 0.9em 0.8em;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.app-examples th {
	font-size: 0.85rem;
	color: var(--sub);
	font-weight: 400;
	letter-spacing: 0.06em;
}

.app-examples .is-wrong {
	color: var(--sub);
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}

.app-examples .is-right {
	color: var(--accent);
	font-weight: 700;
}

/* ---------- プリズム: 夜の暗さに、光が6色に分かれる ---------- */

.app--prism {
	--bg: #0d1017;
	--ink: #e9edf4;
	--sub: #9aa6b8;
	--accent: #8ccbff;
	--line: rgba(233, 237, 244, 0.14);
	--phone: #000;
}

.app--prism .app-hero {
	background:
		radial-gradient(60% 80% at 85% 20%, rgba(140, 203, 255, 0.12), transparent 70%),
		linear-gradient(170deg, #0d1017 55%, #131a27);
}

.app--prism .app-phone {
	outline: 1px solid rgba(233, 237, 244, 0.16);
}

/* 白い光が入って、扇形に6色へ分かれる帯 */
.app-decor--prism {
	display: grid;
	grid-template-columns: 22% repeat(6, 1fr);
	width: min(340px, 90%);
	height: 30px;
	margin: 1.1em 0 0.4em;
	clip-path: polygon(0 44%, 22% 44%, 100% 0, 100% 100%, 22% 56%, 0 56%);
}

.app-decor--prism::before {
	content: "";
	background: #f4f6fa;
}

.app-decor--prism span:nth-child(1) { background: #ff6b6b; }
.app-decor--prism span:nth-child(2) { background: #ffa94d; }
.app-decor--prism span:nth-child(3) { background: #ffe066; }
.app-decor--prism span:nth-child(4) { background: #69db7c; }
.app-decor--prism span:nth-child(5) { background: #4dabf7; }
.app-decor--prism span:nth-child(6) { background: #9775fa; }

/* 形式の見出しの線も、6色を順に使う */
.app--prism .app-formats__group:nth-child(1) { --c: #ff6b6b; }
.app--prism .app-formats__group:nth-child(2) { --c: #ffa94d; }
.app--prism .app-formats__group:nth-child(3) { --c: #ffe066; }
.app--prism .app-formats__group:nth-child(4) { --c: #69db7c; }
.app--prism .app-formats__group:nth-child(5) { --c: #4dabf7; }

.app--prism .app-h2 {
	border-top-color: #e9edf4;
}

/* ---------- 聴くラノベ: 夜の部屋で、灯りの下の縦書き ---------- */

.app--novel {
	--bg: #11152b;
	--ink: #efe8da;
	--sub: #aaa5ba;
	--accent: #f2c66d;
	--line: rgba(239, 232, 218, 0.15);
	--phone: #05060d;
}

.app--novel .app-hero {
	background: radial-gradient(70% 90% at 15% 0%, rgba(242, 198, 109, 0.1), transparent 70%), #11152b;
}

.app--novel .app-hero__catch {
	font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
	font-weight: 700;
	letter-spacing: 0.12em;
}

/* 声の波形(動かない) */
.app-decor--novel {
	display: flex;
	align-items: center;
	gap: 4px;
	height: 52px;
	margin: 1.1em 0 0.6em;
}

.app-decor--novel span {
	flex: 0 0 4px;
	height: var(--h);
	border-radius: 2px;
	background: var(--accent);
	opacity: 0.8;
}

/* 広い画面では、ひとことを縦書きにして、説明の左に立てる */
@media (min-width: 900px) {
	.app--novel .app-hero__text {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		column-gap: 2.4rem;
		align-items: start;
	}

	.app--novel .app-hero__text > * {
		grid-column: 2;
		justify-self: start;
	}

	.app--novel .app-hero__catch {
		grid-column: 1;
		grid-row: 1 / span 6;
		margin: 0;
		writing-mode: vertical-rl;
		font-size: 2.1rem;
		line-height: 1.6;
		padding-inline-start: 2.4rem;
		border-inline-start: 1px solid var(--line);
	}
}

.app--novel .app-h2 {
	border-top-color: #efe8da;
}

/* ---------- きらさない: 冷蔵庫のドアに貼った、買い物メモ ---------- */

.app--kirasanai {
	--bg: #f5f5f2;
	--ink: #1b1f1c;
	--sub: #5b635e;
	--accent: #1f7a4d;
	--line: #dcdcd5;
	--phone: #1b1f1c;
}

/* 先頭は罫線の入ったメモ用紙 */
.app--kirasanai .app-hero {
	background:
		repeating-linear-gradient(to bottom, transparent 0 35px, #e3e3dc 35px 36px),
		#fbfbf8;
	border-bottom: 1px solid var(--line);
}

/* チェックの入った四角が並ぶ、メモの行 */
.app-decor--kirasanai {
	display: grid;
	gap: 8px;
	margin: 1.1em 0 0.6em;
}

.app-decor--kirasanai span {
	display: flex;
	align-items: center;
	gap: 10px;
}

.app-decor--kirasanai span::before {
	content: "";
	flex: 0 0 16px;
	height: 16px;
	border: 2px solid var(--accent);
	border-radius: 4px;
	box-sizing: border-box;
}

/* チェック済みは、塗った四角に白いチェックの印 */
.app-decor--kirasanai span.is-done::before {
	content: "✓";
	display: grid;
	place-items: center;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	background: var(--accent);
}

.app-decor--kirasanai span::after {
	content: "";
	width: 140px;
	height: 3px;
	border-radius: 2px;
	background: #cfd6d1;
}

.app-decor--kirasanai span.is-done::after {
	background: var(--accent);
	opacity: 0.35;
}

/* 数字は、ドアに貼ったマグネットのように */
.app--kirasanai .app-facts {
	gap: 16px;
	border: none;
	padding-block: 28px 0;
}

.app--kirasanai .app-facts li {
	position: relative;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: #fff;
	padding-top: 2em;
}

.app--kirasanai .app-facts li + li {
	border-inline-start: 1px solid var(--line);
}

.app--kirasanai .app-facts li::before {
	content: "";
	position: absolute;
	top: 12px;
	left: 50%;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	border-radius: 50%;
	background: var(--accent);
}

/* ---------- ferti-mate: やわらかい紙に、2つの時期の線 ---------- */

.app--ferti {
	--bg: #fdf8f8;
	--ink: #3a2a2e;
	--sub: #7a6267;
	--accent: #c8173f;
	--accent2: #0d8a7f;
	--line: #eedde1;
	--phone: #3a2a2e;
}

.app--ferti .app-hero {
	background: linear-gradient(180deg, #fdf8f8, #fbecef);
}

.app-decor--ferti {
	display: block;
	width: min(300px, 90%);
	height: auto;
	margin: 1em 0 0.4em;
}

.app-decor--ferti polyline {
	fill: none;
	stroke: var(--accent);
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.app-decor--ferti .app-decor__divider {
	stroke: var(--accent2);
	stroke-width: 1.5;
	stroke-dasharray: 4 5;
}

.app--ferti .app-feature__num,
.app--ferti .app-stories li::before {
	color: var(--accent2);
}

/* 数字は、カレンダーのひとますのように(上に色の帯) */
.app--ferti .app-facts {
	gap: 16px;
	border: none;
	padding-block: 28px 0;
}

.app--ferti .app-facts li {
	border: 1px solid var(--line);
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
	padding-top: 0;
}

.app--ferti .app-facts li + li {
	border-inline-start: 1px solid var(--line);
}

.app--ferti .app-facts li::before {
	content: "";
	display: block;
	height: 8px;
	margin: 0 -1.2em 1.4em;
	background: var(--accent2);
	opacity: 0.75;
}

/* ---------- スマホの幅 ---------- */

@media (max-width: 760px) {
	.app-hero__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.app-phone--hero {
		width: min(72%, 260px);
	}

	.app-facts,
	.app--kirasanai .app-facts,
	.app--ferti .app-facts {
		grid-template-columns: minmax(0, 1fr);
	}

	.app-facts li + li {
		border-inline-start: none;
		border-top: 1px solid var(--line);
	}

	.app--kirasanai .app-facts li + li,
	.app--ferti .app-facts li + li {
		border-top: 1px solid var(--line);
		border-inline-start: 1px solid var(--line);
	}

	.app-feature,
	.app-feature:nth-of-type(even) {
		grid-template-columns: minmax(0, 1fr);
	}

	.app-feature .app-phone,
	.app-feature:nth-of-type(even) .app-phone {
		order: 0;
		width: min(64%, 230px);
		justify-self: center;
	}

	.app-privacy ul {
		grid-template-columns: minmax(0, 1fr);
	}

	.app-story__body {
		grid-template-columns: minmax(0, 1fr);
	}

	.app-phone--gallery {
		width: 160px;
	}
}
