﻿:root {
	color-scheme: light dark;
	--bg: #f7faff;
	--bg-soft: #eef5ff;
	--panel: rgba(255,255,255,.88);
	--panel-solid: #ffffff;
	--panel-strong: #eef5ff;
	--text: #1a1b2e;
	--muted: #555770;
	--line: #dbe7f7;
	--accent: #2563eb;
	--lang-current-bg: #2563eb;
	--accent-deep: #0f3f8f;
	--accent-soft: #dbeafe;
	--accent-pale: #eef5ff;
	--link: #2563eb;
	--shadow: 0 4px 24px rgba(37,99,235,.08);
	--radius: 18px;
	--content-width: 980px;
	--sidebar-width: 286px;
	--header-height: 68px;
	--font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
}

html[data-theme="dark"] {
	--bg: #07111f;
	--bg-soft: #132642;
	--panel: rgba(13, 27, 47, .88);
	--panel-solid: #0d1b2f;
	--panel-strong: #132642;
	--text: #eaf2ff;
	--muted: #9fb7d9;
	--line: #1e3a5f;
	--accent: #0ea5e9;
	--lang-current-bg: #2563eb;
	--accent-deep: #9fcfff;
	--accent-soft: rgba(14, 165, 233, .20);
	--accent-pale: rgba(14, 165, 233, .12);
	--link: #9fcfff;
	--shadow: 0 4px 24px rgba(0,0,0,.3);
	--scrollbar-thumb: #0b3f7a;
	--scrollbar-thumb-hover: #115aa8;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

*::-webkit-scrollbar {
	width: auto;
	height: auto;
}

*::-webkit-scrollbar-track {
	background: var(--bg-soft);
	background: color-mix(in srgb, var(--bg-soft) 78%, transparent);
}

*::-webkit-scrollbar-thumb {
	border: 3px solid var(--bg-soft);
	border: 3px solid color-mix(in srgb, var(--bg-soft) 88%, transparent);
	border-radius: 999px;
	background: var(--accent);
	background: var(--scrollbar-thumb, color-mix(in srgb, var(--accent) 46%, var(--panel-solid)));
	background-image: none;
}

	*::-webkit-scrollbar-thumb:hover {
		background: var(--accent);
		background: var(--scrollbar-thumb-hover, color-mix(in srgb, var(--accent) 64%, var(--panel-solid)));
		background-image: none;
	}

*::-webkit-scrollbar-corner {
	background: transparent;
}

body {
	margin: 0;
	min-height: 100vh;
	color: var(--text);
	font-family: var(--font);
	line-height: 1.75;
	background: radial-gradient(circle at top left, rgba(37, 99, 235, .16), transparent 34rem), linear-gradient(145deg, var(--bg), var(--bg-soft));
}

a {
	color: var(--link);
	text-decoration: none;
}

	a:hover {
		text-decoration: underline;
	}

.help-shell {
	min-height: 100vh;
}

.help-topbar {
	position: sticky;
	top: 0;
	z-index: 50;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 18px;
	min-height: var(--header-height);
	padding: 10px 24px;
	padding: 10px clamp(14px, 3vw, 34px);
	border-bottom: 1px solid var(--line);
	background: var(--panel);
	background: color-mix(in srgb, var(--panel-solid) 88%, transparent);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.brand-mark {
	position: relative;
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border-radius: 999px;
	overflow: visible;
	background: transparent;
	box-shadow: none;
	flex: 0 0 auto;
	isolation: isolate;
}

	.brand-mark::before {
		content: "";
		position: absolute;
		inset: 2px;
		z-index: 0;
		border-radius: 999px;
		background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.78), rgba(238,245,255,.66) 68%, rgba(219,231,247,.58));
		border: 1px solid rgba(37, 99, 235, .20);
		box-shadow: 0 0 0 1px rgba(255,255,255,.54), 0 0 10px rgba(37, 99, 235, .14);
	}

	.brand-mark img {
		position: relative;
		z-index: 1;
		display: block;
		width: 100%;
		height: 100%;
		object-fit: contain;
		filter: none;
	}

html[data-theme="dark"] .brand-mark::before {
	display: none;
}

.brand-title {
	display: block;
	color: var(--text);
	font-size: 1.05rem;
	font-weight: 760;
	line-height: 1.15;
}

.brand-subtitle {
	display: block;
	color: var(--muted);
	font-size: .8rem;
	line-height: 1.2;
}

.topbar-search {
	position: relative;
	max-width: 520px;
	width: 100%;
	justify-self: center;
}

.search-input {
	width: 100%;
	height: 42px;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 0 42px 0 16px;
	color: var(--text);
	background: var(--panel);
	outline: none;
}

	.search-input:focus {
		border-color: var(--accent);
		border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
		box-shadow: 0 0 0 4px var(--accent-soft);
	}

.search-icon {
	position: absolute;
	right: 15px;
	top: 50%;
	translate: 0 -50%;
	color: var(--muted);
}

.search-results {
	display: none;
	position: absolute;
	inset-inline: 0;
	top: calc(100% + 8px);
	max-height: min(64vh, 560px);
	overflow: auto;
	padding: 8px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--panel-solid);
	box-shadow: var(--shadow);
}

	.search-results.is-open {
		display: block;
	}

.search-result {
	display: block;
	padding: 10px 12px;
	border-radius: 12px;
	color: var(--text);
}

	.search-result:hover {
		background: var(--accent-pale);
		text-decoration: none;
	}

.search-result-title {
	display: block;
	font-weight: 700;
}

.search-result-desc {
	display: block;
	color: var(--muted);
	font-size: .86rem;
	line-height: 1.45;
}

.topbar-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	justify-content: flex-end;
}

.pill-button {
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 8px 11px;
	color: var(--text);
	background: var(--panel);
	font-size: .88rem;
	line-height: 1;
	cursor: pointer;
}

.lang-toggle {
	display: flex;
	background: var(--panel-strong);
	border-radius: 20px;
	padding: 3px;
	gap: 2px;
	flex-shrink: 0;
}

.lang-btn {
	border: none;
	background: transparent;
	color: var(--muted);
	font-size: .8rem;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 16px;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
	font-family: inherit;
}

	.lang-btn.is-current {
		background: var(--lang-current-bg);
		color: #fff;
	}

	.pill-button:hover {
		background: var(--accent-pale);
	}

	.lang-btn:hover:not(.is-current) {
		color: var(--text);
		text-decoration: none;
	}

	.lang-btn.is-current:hover {
		background: var(--lang-current-bg);
		text-decoration: none;
	}

.mobile-menu-button {
	display: none;
}

.help-layout {
	display: grid;
	grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
	gap: 26px;
	width: min(100%, 1480px);
	margin: 0 auto;
	padding: 26px 24px 56px;
	padding: 26px clamp(14px, 3vw, 34px) 56px;
}

.help-sidebar {
	position: sticky;
	top: calc(var(--header-height) + 22px);
	align-self: start;
	max-height: calc(100vh - var(--header-height) - 44px);
	overflow: auto;
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	box-shadow: 0 10px 28px rgba(37,99,235,.08);
}

.sidebar-title {
	margin: 2px 8px 12px;
	color: var(--muted);
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.nav-group {
	margin: 10px 0 14px;
}

.nav-group-title {
	margin: 12px 8px 5px;
	color: var(--muted);
	font-size: .82rem;
	font-weight: 800;
}

.nav-link {
	display: block;
	padding: 8px 10px;
	border-radius: 12px;
	color: var(--text);
	line-height: 1.35;
}

	.nav-link:hover {
		background: var(--accent-pale);
		text-decoration: none;
	}

	.nav-link.is-active {
		color: var(--accent-deep);
		background: var(--accent-soft);
		font-weight: 760;
	}

.nav-link,
.nav-sublink {
	-webkit-tap-highlight-color: transparent;
}

	.nav-link:focus,
	.nav-sublink:focus {
		outline: none;
	}

	.nav-link:focus-visible,
	.nav-sublink:focus-visible {
		outline: 2px solid var(--accent);
		outline: 2px solid color-mix(in srgb, var(--accent) 44%, transparent);
		outline-offset: 2px;
	}

.nav-sublist {
	margin: 4px 0 8px 12px;
	padding: 3px 0 3px 12px;
	border-left: 2px solid var(--accent-soft);
	border-left: 2px solid color-mix(in srgb, var(--accent) 26%, transparent);
}

.nav-sublink {
	display: block;
	padding: 5px 9px;
	border-radius: 10px;
	color: var(--muted);
	font-size: .86rem;
	line-height: 1.35;
}

	.nav-sublink:hover {
		color: var(--accent-deep);
		background: var(--accent-pale);
		text-decoration: none;
	}

	.nav-link:active,
	.nav-sublink:active {
		background: var(--accent-pale);
	}

.help-main {
	min-width: 0;
}

.hero {
	position: relative;
	margin-bottom: 22px;
	padding: 32px;
	padding: clamp(22px, 4vw, 42px);
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 8px);
	background: linear-gradient(135deg, var(--panel-solid), var(--panel-strong));
	background: linear-gradient(135deg, color-mix(in srgb, var(--panel-solid), transparent 4%), color-mix(in srgb, var(--panel-strong), transparent 18%));
	box-shadow: var(--shadow);
	overflow: hidden;
}

	.hero::after {
		content: "";
		position: absolute;
		right: -4rem;
		top: -5rem;
		width: 18rem;
		height: 18rem;
		border-radius: 999px;
		background: radial-gradient(circle, var(--accent-soft), transparent 70%);
		background: radial-gradient(circle, color-mix(in srgb, var(--accent) 25%, transparent), transparent 70%);
		pointer-events: none;
	}

html[data-theme="dark"] .hero::after {
	right: -6rem;
	top: -6rem;
	width: 16rem;
	height: 16rem;
	background: radial-gradient(circle, var(--accent-soft), transparent 74%);
	background: radial-gradient(circle, color-mix(in srgb, var(--accent) 10%, transparent), transparent 74%);
	opacity: .58;
}

.breadcrumb {
	margin: 0 0 10px;
	color: var(--muted);
	font-size: .9rem;
}

.hero h1 {
	position: relative;
	margin: 0;
	color: var(--accent-deep);
	font-size: 1.7rem;
	font-size: clamp(1.35rem, 2.55vw, 2.05rem);
	line-height: 1.18;
	letter-spacing: -.03em;
}

.hero p {
	position: relative;
	max-width: 760px;
	margin: 12px 0 0;
	color: var(--muted);
}

.content-card {
	padding: 26px;
	padding: clamp(18px, 3vw, 34px);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel-solid);
	box-shadow: 0 12px 32px rgba(37,99,235,.08);
}

/* Converted old content */
.contents-container {
	margin: 0 0 28px;
	padding: 0 0 24px;
	border-bottom: 1px solid var(--line);
}

	.contents-container:last-child {
		border-bottom: 0;
		margin-bottom: 0;
	}

.contents-title {
	margin: 0 0 14px;
	color: var(--accent-deep);
	font-size: 1.5rem;
	font-size: clamp(1.25rem, 2.3vw, 1.75rem);
	line-height: 1.35;
	letter-spacing: -.02em;
}

.contents {
	padding: 0;
}

.contens-text-container,
.contents-text-container {
	margin: .35em 0;
}

.contens-text,
.contents-text {
	color: var(--text);
}

.contents-update {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 7px 12px;
	border-radius: 999px;
	color: var(--muted);
	background: var(--accent-pale);
	font-size: .88rem;
}

.contents-image-container {
	margin: 18px 0 24px;
	text-align: center;
}

.contents-image {
	max-width: min(63%, 653px);
	height: auto;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--panel-strong);
	box-shadow: 0 12px 26px rgba(37,99,235,.12);
}

.contents-image-zoomable {
	cursor: zoom-in;
}

.contents-image-hint {
	display: inline-block;
	margin-top: 8px;
	color: var(--muted);
	font-size: .84rem;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 18px 0;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 14px;
}

th, td {
	padding: 10px 12px;
	border: 1px solid var(--line);
	vertical-align: top;
}

th {
	background: var(--accent-pale);
	color: var(--accent-deep);
}

ul, ol {
	padding-left: 1.35rem;
}

code {
	padding: .15em .35em;
	border-radius: 6px;
	background: var(--accent-pale);
}


/* Search specification: make each small heading breathe a little. */
.search-spec-heading {
	margin: 18px 0 6px;
	color: var(--accent-deep);
	font-weight: 800;
}

.contents-border-bottom:first-of-type .search-spec-heading {
	margin-top: 4px;
}

.search-spec-heading + .contens-text-indent,
.search-spec-heading + .contents-text-indent {
	display: none;
}

/* Landing */
.quick-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 14px;
	margin-top: 22px;
}

.quick-card {
	display: block;
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: 18px;
	color: var(--text);
	background: var(--panel-solid);
	box-shadow: 0 8px 22px rgba(37,99,235,.08);
}

	.quick-card:hover {
		text-decoration: none;
		transform: translateY(-1px);
		background: var(--accent-pale);
	}

	.quick-card strong {
		display: block;
		margin-bottom: 6px;
		color: var(--accent-deep);
	}

	.quick-card span {
		color: var(--muted);
		font-size: .92rem;
	}

/* Modal */
.image-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100;
	padding: 28px;
	background: rgba(0, 0, 0, .72);
}

	.image-modal.is-open {
		display: grid;
		place-items: center;
	}

	.image-modal img {
		max-width: min(100%, 1180px);
		max-height: 86vh;
		border-radius: 12px;
		background: #fff;
	}

	.image-modal button {
		position: fixed;
		top: 18px;
		right: 18px;
		border: 1px solid rgba(255,255,255,.35);
		border-radius: 999px;
		padding: 10px 14px;
		color: #fff;
		background: rgba(0,0,0,.35);
		cursor: pointer;
	}

/* Print */
@media print {
	.help-topbar, .help-sidebar {
		display: none !important;
	}

	.help-layout {
		display: block;
		padding: 0;
	}

	.hero, .content-card {
		box-shadow: none;
		border: none;
	}

	body {
		background: #fff;
		color: #000;
	}

	a {
		color: #000;
		text-decoration: underline;
	}
}

@media (max-width: 980px) {
	.help-topbar {
		grid-template-columns: auto 1fr auto;
	}

	.topbar-search {
		grid-column: 1 / -1;
		max-width: none;
		order: 3;
	}

	.help-layout {
		grid-template-columns: 1fr;
	}

	.mobile-menu-button {
		display: inline-flex;
	}

	.help-sidebar {
		display: none;
		position: fixed;
		z-index: 80;
		left: 14px;
		right: 14px;
		top: calc(var(--header-height) + 76px);
		max-height: calc(100vh - 120px);
	}

	html.sidebar-open .help-sidebar {
		display: block;
	}
}

@media (max-width: 560px) {
	:root {
		--header-height: 62px;
	}

	.help-topbar {
		gap: 10px;
		padding: 10px 12px;
	}

	.brand-subtitle {
		display: none;
	}

	.brand-mark {
		width: 34px;
		height: 34px;
	}

	.topbar-actions {
		gap: 5px;
	}

	.pill-button {
		padding: 8px 9px;
		font-size: .82rem;
	}

	.lang-btn {
		padding: 4px 9px;
	}

	.help-layout {
		padding: 16px 10px 38px;
	}

	.content-card, .hero {
		border-radius: 16px;
	}
}

/* Fine tuning: keep page headers concise. */
.hero .breadcrumb,
.hero h1 + p {
	display: none;
}

.hero {
	padding-top: 24px;
	padding-bottom: 24px;
	padding-block: clamp(18px, 3vw, 30px);
}

/* Inline SVG icons converted from the old help should behave like text icons. */
.contents-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35em;
	height: 1.35em;
	margin: 0 .14em;
	color: var(--accent-deep);
	vertical-align: -0.22em;
	line-height: 1;
	flex: 0 0 auto;
}

	.contents-icon svg,
	.contents-icon img {
		display: block;
		width: 1.15em !important;
		height: 1.15em !important;
		max-width: 1.15em !important;
		max-height: 1.15em !important;
		min-width: 0 !important;
		min-height: 0 !important;
	}

	.contents-icon svg {
		fill: currentColor !important;
		color: currentColor;
	}

		.contents-icon svg path[fill="#000000"],
		.contents-icon svg rect[fill="#000000"],
		.contents-icon svg circle[fill="#000000"],
		.contents-icon svg polygon[fill="#000000"] {
			fill: currentColor !important;
		}

		.contents-icon svg [fill="none"] {
			fill: none !important;
		}

		.contents-icon svg [fill="transparent"] {
			fill: transparent !important;
		}

		.contents-icon svg * {
			max-width: 100%;
			max-height: 100%;
		}

/* License page: separate each license clearly and make anchor jumps readable. */
html {
	scroll-padding-top: calc(var(--header-height) + 18px);
}

[id] {
	scroll-margin-top: calc(var(--header-height) + 18px);
}

#license .contents > .contens-text-container[id] {
	margin: 30px 0 0;
	padding: 24px 0 0;
	border-top: 1px solid var(--line);
}

	#license .contents > .contens-text-container[id]:first-child {
		margin-top: 8px;
	}

#license .contens-text-bold {
	display: block;
	margin: 0 0 8px;
	color: var(--accent-deep);
	font-size: 1.1rem;
	font-weight: 800;
}

#license .contens-license {
	margin: 14px 0 8px;
	padding: 16px 18px;
	border: 1px solid var(--line);
	border-radius: 14px;
	color: var(--text);
	background: var(--accent-pale);
	white-space: pre-wrap;
	overflow-x: auto;
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
	font-size: .9rem;
	line-height: 1.65;
}

#license .contents-border-bottom {
	border-bottom: 1px solid var(--line);
}

#license .contens-text-indent {
	margin: .18em 0;
}

html[data-theme="dark"] #license .contens-license {
	background: rgba(7, 17, 31, .62);
}

/* Theme sample thumbnails */
.contents-image-thumb {
	width: min(30vw, 180px);
	max-width: 180px;
	margin: 6px 8px 10px 0;
	border-radius: 12px;
	vertical-align: top;
}

	.contents-image-thumb:hover {
		transform: translateY(-1px);
	}

@media (max-width: 640px) {
	.contents-image-thumb {
		width: min(42vw, 150px);
		max-width: 150px;
	}
}
