:root {
	color-scheme: light;
	font-family: "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
	color: #1c2030;
	background: #f4f2ed;
	font-synthesis: none;
	--ink: #1c2030;
	--muted: #54566a;
	--line: #cbc9c2;
	--blue: #303c84;
	--mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, fieldset label { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid #4759c7; outline-offset: 3px; }
[hidden] { display: none !important; }
a { color: var(--blue); text-underline-offset: .2em; }
.site-header, main { max-width: 1232px; margin: 0 auto; padding-inline: 36px; }
.site-header {
	min-height: 76px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	border-bottom: 1px solid var(--line);
}
.site-id { display: flex; align-items: center; gap: 10px; font: 700 16px var(--mono); }
.hash {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	background: #dafa75;
	border: 1px solid var(--ink);
	font-size: 22px;
}
.site-header a { font-size: 12px; font-weight: 700; text-decoration: none; }
.site-header a:hover { text-decoration: underline; }
.intro { margin: 44px 0 32px; }
.intro h1 {
	font-size: clamp(37px, 6.4vw, 80px);
	line-height: 1.2;
	letter-spacing: -.09em;
	margin: 0 0 12px;
}
.period { color: #4857aa; }
.intro p { margin: 0; color: var(--muted); font-size: 15px; }
.studio {
	display: grid;
	grid-template-columns: minmax(290px, 1fr) minmax(0, 1.84fr);
	gap: 36px;
	align-items: start;
	padding-block: 24px 36px;
	border-top: 1px solid var(--line);
}
.controls { min-width: 0; }
.control-section + .control-section { margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
h2 { font-size: 14px; font-weight: 800; margin: 0 0 15px; }
.inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inputs > div { min-width: 0; }
label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
label .optional { color: var(--muted); font-size: 11px; font-weight: 400; margin-left: 3px; }
input[type=text] {
	width: 100%;
	border: 1px solid #80818d;
	border-radius: 4px;
	background: #fffefa;
	min-height: 44px;
	padding: 9px 10px;
	font-size: 16px;
	color: var(--ink);
}
input::placeholder { color: #6c6f7c; opacity: 1; }
input[aria-invalid=true] { border-color: #a12835; }
.help, .error { margin: 8px 0 0; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.help { color: var(--muted); }
.error { color: #8c2030; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 13px; font-size: 11px; color: var(--muted); }
.examples > span { margin-right: 3px; }
.examples button {
	background: transparent;
	border: 1px solid #bcbcc4;
	border-radius: 3px;
	color: var(--ink);
	padding: 6px 9px;
	font-size: 12px;
	min-height: 32px;
}
.examples button:hover { background: #e7e8ed; }
#candidates { display: flex; flex-wrap: wrap; gap: 7px; }
.candidate {
	display: block;
	min-width: 54px;
	max-width: 100%;
	padding: 7px 9px;
	background: #fffefa;
	border: 1px solid #a8a9b1;
	border-radius: 4px;
	color: var(--ink);
	font: 700 16px/1.2 var(--mono);
	overflow-wrap: anywhere;
}
.candidate[aria-pressed=true] { background: #e2e5fa; border-color: var(--blue); color: #222b6a; }
#breakdown { min-height: 2.05em; }
.custom-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; margin-top: 14px; }
.custom-row label { margin: 0; }
.custom-row input { min-height: 40px; }
.output { min-width: 0; }
.output-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.output-meta h2 { margin: 0; }
#preview-label { color: var(--muted); font-size: 12px; }
canvas { display: block; width: 100%; height: auto; aspect-ratio: 8/5; border: 1px solid #27304b; border-radius: 7px; background: #1b2247; }
.output-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
fieldset { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset label { position: relative; display: grid; margin: 0; }
fieldset span { display: grid; place-items: center; padding: 10px 11px; min-height: 40px; border: 1px solid #a8a9b1; border-radius: 4px; }
fieldset input { position: absolute; width: 1px; height: 1px; opacity: 0; }
fieldset input:checked + span { border-color: var(--ink); color: #f9f8f3; background: var(--ink); }
fieldset input:focus-visible + span { outline: 3px solid #4759c7; outline-offset: 2px; }
#download {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	min-height: 44px;
	border: 1px solid var(--ink);
	border-radius: 4px;
	padding: 8px 13px;
	background: #dafa75;
	color: var(--ink);
	font-weight: 800;
	font-size: 13px;
}
#download:not(:disabled):hover { background: #e8ff96; }
#download span { font-size: 18px; }
#about { padding-block: 24px 34px; border-top: 1px solid var(--line); }
#about h2 { margin-bottom: 8px; }
.about-copy { max-width: 760px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.about-copy p { margin: 6px 0 0; }
.about-copy a { display: inline-block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 850px) {
	.site-header, main { padding-inline: 23px; }
	.studio { gap: 24px; grid-template-columns: minmax(250px, 1fr) minmax(0, 1.35fr); }
}
@media (max-width: 650px) {
	.site-header, main { padding-inline: 16px; }
	.site-header { min-height: 62px; }
	.intro { margin: 28px 0 21px; }
	.studio { grid-template-columns: minmax(0, 1fr); padding-block: 18px 26px; gap: 24px; }
}
@media (max-width: 365px) {
	fieldset span { padding-inline: 7px; }
	#download { gap: 7px; padding-inline: 8px; }
}
