@charset "utf-8";

@view-transition {
	navigation: auto;
}

:root {
	--ink: #2a2b2e;
	--ink-soft: #6b6f76;
	--bg: #faf9f6;
	--card-bg: #ffffff;
	--line: #e7e4dc;
	--accent: #2c4a7a;
	--accent-soft: #e6ecf5;
	--target: #8a6a1f;
	--target-bg: #f7efd9;
}

* {box-sizing: border-box;}
html,body {margin:0;padding:0;}
body {
	background: var(--bg);
	color: var(--ink);
	font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Kaku Gothic ProN","Noto Sans JP","Noto Sans",sans-serif;
	line-height: 1.7;
	font-size: 17px;
}
a {color: var(--accent); text-decoration: none;}
a:hover {text-decoration: underline;}

/* header */
.site-header {
	border-bottom: 1px solid var(--line);
	background: var(--card-bg);
}
.site-header-inner {
	max-width: 760px;
	margin: 0 auto;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}
.site-logo {
	font-weight: 700;
	font-size: 1.2em;
	color: var(--ink);
}

.site-main {max-width: 760px; margin: 0 auto; padding: 30px 20px 60px;}

/* home */
.hero {text-align: center; margin-bottom: 30px;}
.hero h1 {margin: 0 0 8px; font-size: 1.8em;}
.hero .tagline {color: var(--ink-soft); margin: 0;}

/* search */
.search-form {
	display: flex;
	gap: 8px;
	max-width: 480px;
	margin: 0 auto 34px;
}
.search-input {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 1em;
	background: var(--card-bg);
	color: var(--ink);
}
.search-button {
	padding: 10px 20px;
	border: none;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-size: 0.95em;
	cursor: pointer;
}
.search-button:hover {opacity: 0.9;}
.similar-link {margin-top: 24px; font-size: 0.9em;}

.filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 34px;
}
.filter-chip {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--card-bg);
	color: var(--ink-soft);
	font-size: 0.88em;
}
.filter-chip:hover {text-decoration: none; border-color: var(--accent);}
.filter-chip.active {background: var(--accent); border-color: var(--accent); color: #fff;}

.section-title {font-size: 1.1em; color: var(--ink-soft); margin: 0 0 16px; font-weight: 700;}

.empty-state {color: var(--ink-soft); text-align: center; padding: 40px 0;}

.card-list {display: flex; flex-direction: column; gap: 14px;}
.card {
	background: var(--card-bg);
	border: 1px solid var(--line);
	border-radius: 14px;
	transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover {box-shadow: 0 6px 20px rgba(0,0,0,.06); transform: translateY(-1px);}
.card-link {display: flex; align-items: center; gap: 16px; padding: 14px 20px; color: inherit;}
.card-link:hover {text-decoration: none;}
.card-thumb {width: 72px; height: 72px; flex: none; object-fit: contain;}
.card-text {min-width: 0;}
.card-title {margin: 8px 0 6px; font-size: 1.15em; color: var(--ink);}
.card-excerpt {margin: 0; color: var(--ink-soft); font-size: 0.92em;}

/* target-language badge, shared between cards and the topic page */
.target-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--target-bg);
	color: var(--target);
	font-size: 0.78em;
	font-weight: 700;
}

/* topic detail */
.breadcrumb {margin: 0 0 18px; font-size: 0.9em;}
.topic-hero {display: block; width: 100%; max-width: 320px; margin: 0 auto 20px; object-fit: contain;}
.topic-title {margin: 10px 0 20px; font-size: 1.6em; line-height: 1.4;}
.topic-body p {margin: 0 0 1.1em;}
.unavailable-notice {
	color: var(--ink-soft);
	background: var(--card-bg);
	border: 1px dashed var(--line);
	border-radius: 10px;
	padding: 18px;
}

.examples-list {
	margin: 28px 0 0;
	padding: 18px 20px;
	background: var(--card-bg);
	border: 1px solid var(--line);
	border-radius: 12px;
}
.examples-label {margin: 0 0 12px; font-size: 0.85em; font-weight: 700; color: var(--ink-soft);}
.example-item {margin: 0 0 14px;}
.example-item:last-child {margin-bottom: 0;}
.example-phrase {margin: 0 0 3px; font-weight: 700; color: var(--target);}
.example-meaning {margin: 0; color: var(--ink-soft); font-size: 0.92em;}

.tag-list {margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 8px;}
.tag {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.82em;
}
.tag:hover {text-decoration: none; opacity: 0.8;}

.lang-available {
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
}
.lang-available-label {margin: 0 0 8px; font-size: 0.85em; color: var(--ink-soft);}
.lang-available a {margin-right: 14px; font-size: 0.95em;}

/* footer */
.site-footer {
	text-align: center;
	color: var(--ink-soft);
	font-size: 0.85em;
	padding: 30px 20px 50px;
}
.footer-links {margin-top: 8px;}
.footer-links a {color: var(--ink-soft); text-decoration: underline;}

@media (max-width: 480px) {
	body {font-size: 16px;}
	.site-header-inner {flex-direction: column; align-items: flex-start;}
}

/* law site additions */
.site-nav {display: flex; gap: 6px 18px; font-size: 0.9em; flex-wrap: wrap;}
.site-nav a {color: var(--ink-soft);}
.list-lead {color: var(--ink-soft); margin: -8px 0 24px;}
.course-block {margin: 0 0 34px;}
.course-title {margin: 0 0 4px; font-size: 1.3em;}
.course-desc {margin: 0 0 14px; color: var(--ink-soft); font-size: 0.92em;}
.seq-badge {display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.78em; font-weight: 700;}
.meta-line {display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -8px 0 20px; font-size: 0.82em; color: var(--ink-soft);}
.verified {color: #2d7a4f; font-weight: 700;}
.verified::before {content: '\2713 ';}
.preview-banner {background: #fff4cc; border: 1px solid #e6cf7a; border-radius: 8px; padding: 8px 14px; font-size: 0.88em;}
.summary-box {background: var(--accent-soft); border-radius: 12px; padding: 14px 20px; margin: 0 0 26px;}
.summary-label {margin: 0 0 6px !important; font-size: 0.82em; font-weight: 700; color: var(--accent);}
.summary-box ul {margin: 0; padding-left: 1.3em;}
.topic-body h2 {font-size: 1.3em; margin: 1.8em 0 0.6em; padding-bottom: 4px; border-bottom: 2px solid var(--line);}
.topic-body h3 {font-size: 1.1em; margin: 1.5em 0 0.5em;}
.topic-body ul, .topic-body ol {margin: 0 0 1.1em; padding-left: 1.4em;}
.topic-body blockquote {margin: 0 0 1.1em; padding: 10px 18px; border-left: 4px solid var(--target); background: var(--target-bg); border-radius: 0 8px 8px 0;}
.topic-body blockquote p {margin: 0;}
.term-link {border-bottom: 1px dotted var(--accent);}
.term-link:hover {text-decoration: none; background: var(--accent-soft);}
.law-link {white-space: nowrap;}
.quiz, .sources, .related {margin-top: 32px;}
.quiz h2, .sources h2, .related h2 {font-size: 1.05em; color: var(--ink-soft);}
.quiz-item {background: var(--card-bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; margin: 0 0 10px;}
.quiz-item summary {cursor: pointer; font-weight: 700;}
.quiz-answer {margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);}
.quiz-answer p {margin: 0 0 0.6em;}
.sources ul, .related ul {padding-left: 1.3em; font-size: 0.92em;}
.prev-next {display: flex; justify-content: space-between; gap: 14px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.92em;}
.prev-next .next {margin-left: auto; text-align: right;}
.disclaimer {max-width: 560px; margin: 0 auto 14px; line-height: 1.6;}
.site-logo {display: inline-flex; align-items: center; gap: 10px;}
.site-logo:hover {text-decoration: none;}
.site-logo-mark {display: block; width: 30px; height: 30px;}
.site-logo-text, .hero h1 {font-family: "Zen Antique","Shippori Mincho","Yu Mincho","Hiragino Mincho ProN",serif; font-weight: 400; letter-spacing: 0.12em;}
.site-logo-text {font-size: 1.35em; color: var(--accent);}

/* 用語ノートの目印(朱印風の一文字)と分野ラベル */
.stamp {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 56px; height: 56px; border: 3px solid #c0392b; border-radius: 6px;
	color: #c0392b; background: rgba(192,57,43,.05);
	font-family: "Zen Antique","Hiragino Mincho ProN","Yu Mincho","MS Mincho",serif;
	font-size: 30px; font-weight: 700; line-height: 1; transform: rotate(-4deg);
	box-shadow: inset 0 0 0 2px rgba(255,255,255,.7), inset 0 0 0 3px rgba(192,57,43,.35);
}
.card-stamp {margin: 0 2px;}
.page-stamp {width: 64px; height: 64px; font-size: 34px;}
.term-head {display: flex; align-items: center; gap: 14px; margin: 6px 0 4px;}
.list-group {margin: 28px 0 12px; font-size: 1.1em; color: var(--ink-soft); border-bottom: 1px solid var(--line); padding-bottom: 6px;}
.list-group:first-child {margin-top: 0;}
.field-badge {display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.78em; font-weight: 700;}
.field-nyumon {background: #e7f2ea; color: #2f6b45;}
.field-minpo {background: #f7efd9; color: #8a6a1f;}
.field-keiho, .field-keiho-hanzai {background: #f6e6e6; color: #8a2f2f;}
.field-shoho-kaishaho {background: #e4eef7; color: #2f5d8a;}
.field-minji-tetsuzuki {background: #eee8f5; color: #5b3f8a;}

/* ---- やさしい解説(ねねとほおじいの掛け合いモーダル) ---- */
.help-slot {margin: -0.4em 0 1.3em;}
.help-btn {display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 5px 14px 5px 6px; border: 1px solid #c9d8c0; border-radius: 999px; background: #eef5ea; color: #2f5d2a; font: inherit; font-size: 0.86em; font-weight: 700; cursor: pointer; text-align: left;}
.help-btn:hover {background: #e2eeda;}
.help-btn:focus-visible {outline: 3px solid #8fb585; outline-offset: 2px;}
.help-btn-face {width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1px solid #c9d8c0; flex: none;}
.help-btn-text {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.help-overlay {position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(30, 36, 28, 0.55);}
.help-modal {position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fbfdf9; border: 2px solid #b8cfae; border-radius: 16px; padding: 18px 18px 16px;}
.help-close {position: sticky; top: 0; z-index: 5; float: right; margin: -6px -6px 0 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #e6efe0; color: #2f5d2a; font-size: 22px; line-height: 1; cursor: pointer;}
.help-close:focus-visible {outline: 3px solid #8fb585;}
.help-tag {display: inline-block; margin: 0 0 4px; padding: 1px 10px; border-radius: 999px; background: #e6efe0; color: #2f5d2a; font-size: 0.76em; font-weight: 700;}
.help-title {margin: 0 0 12px; font-size: 1.08em;}
.bubble {display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px;}
.bubble-right {flex-direction: row-reverse;}
.bubble-face {width: 64px; height: 64px; flex: none; border-radius: 50%; background: #fff; border: 2px solid #c9d8c0; object-fit: cover;}
.bubble-body {position: relative; max-width: calc(100% - 78px); padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px solid #d9dfd2;}
.bubble-left .bubble-body {background: #fff7e8; border-color: #ecd9b0;}
.bubble-right .bubble-body {background: #eef5ea; border-color: #c9d8c0;}
.bubble-who {display: block; margin-bottom: 1px; font-size: 0.74em; font-weight: 700; color: var(--ink-soft);}
.bubble-say {margin: 0; font-size: 0.95em; line-height: 1.65;}
.help-note {margin: 14px 0 0; padding-top: 10px; border-top: 1px dashed #c9d8c0; font-size: 0.8em; color: var(--ink-soft);}
@media (max-width: 480px) {
	.help-btn-text {white-space: normal;}
	.bubble-face {width: 52px; height: 52px;}
	.bubble-body {max-width: calc(100% - 64px);}
}

/* Androidアプリ(Google Play)の案内。バッジ画像はGoogle公式のものを無加工で表示する */
.app-promo {
	display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
	margin: 0 0 28px; padding: 14px 20px;
	background: var(--accent-soft); border: 1px solid var(--line); border-radius: 12px;
}
.app-promo-text {margin: 0; flex: 1 1 260px; font-size: 0.95em; color: var(--ink);}
.app-promo-link {display: inline-block; line-height: 0;}
.app-badge {height: 62px; width: auto; display: block;}
.footer-app {margin: 14px 0 6px; line-height: 0;}
.footer-app a {display: inline-block;}
