:root {
	--bg: #f4f1ea;
	--panel: #fffdf8;
	--ink: #1f2a30;
	--muted: #6a7276;
	--line: #d9d1c3;
	--accent: #0b6e4f;
	--accent-soft: #d9efe7;
	--warn: #8c4a2f;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	padding: 24px;
	font-family: "M PLUS 1p", "Yu Gothic", sans-serif;
	color: var(--ink);
	background: radial-gradient(circle at 20% 10%, #f8f5ee, var(--bg) 60%);
}

h1,
h2,
p {
	margin: 0;
}

.public-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.eyebrow {
	margin-bottom: 4px;
	color: var(--accent);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0;
}

.public-header h1 {
	font-size: 2rem;
	line-height: 1.2;
}

.admin-link {
	color: var(--ink);
	text-decoration: none;
	border: 1px solid var(--line);
	background: #fff;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 0.9rem;
	cursor: pointer;
}

.admin-link:hover {
	border-color: var(--accent);
}

.public-layout {
	display: grid;
	gap: 20px;
}

.reaction-panel {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.5fr);
	gap: 18px 28px;
	align-items: center;
	padding: 20px;
	border: 1px solid #163f33;
	border-radius: 16px;
	color: #f8fff8;
	background: #174f3e;
	box-shadow: 0 10px 24px rgba(23, 79, 62, 0.18);
}

.reaction-label {
	margin-bottom: 6px;
	color: #bfe8d6;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.12em;
}

.reaction-panel h2 {
	font-size: clamp(1.35rem, 3vw, 2.1rem);
	line-height: 1.25;
}

.reaction-panel p {
	color: #d8eee5;
}

.reaction-panel h2 + p {
	margin-top: 8px;
}

.reaction-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.reaction-button {
	display: grid;
	gap: 4px;
	min-height: 86px;
	padding: 14px;
	border: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: 12px;
	color: #14342b;
	background: #f4fff8;
	cursor: pointer;
	font: inherit;
	text-align: left;
	transition: transform 120ms ease, box-shadow 120ms ease;
}

.reaction-button:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 7px 14px rgba(0, 0, 0, 0.16);
}

.reaction-button:focus-visible,
.detail-toggle:focus-visible {
	outline: 3px solid #f0c96a;
	outline-offset: 3px;
}

.reaction-button:disabled {
	cursor: wait;
	opacity: 0.68;
}

.reaction-button span {
	font-size: 1.25rem;
	font-weight: 900;
}

.reaction-button small {
	color: #537066;
}

.reaction-button-daily {
	background: #f6d77f;
}

.reaction-feedback {
	grid-column: 1 / -1;
	min-height: 1.3em;
	margin: -6px 0 0;
	font-size: 0.9rem;
}

.detail-toggle {
	display: none;
	width: 100%;
	padding: 11px;
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--ink);
	background: #fff;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.public-details {
	display: grid;
	gap: 20px;
}

.summary-hero,
.info-panel {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 18px;
	box-shadow: 0 8px 20px rgba(61, 54, 33, 0.08);
}

.summary-hero {
	display: grid;
	grid-template-columns: 2fr 3fr;
	gap: 20px;
	align-items: stretch;
}

.summary-kicker,
.summary-copy {
	color: var(--muted);
}

.summary-kicker {
	margin-bottom: 8px;
	font-weight: 700;
}

.summary-hero h2 {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: 3.2rem;
	line-height: 1;
	color: var(--ink);
}

.unit {
	font-size: 1.2rem;
}

.summary-copy {
	margin-top: 12px;
	font-size: 0.95rem;
	line-height: 1.6;
}

.hero-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	align-content: start;
}

.hero-stats div,
.current-year {
	border: 1px solid var(--line);
	background: var(--accent-soft);
	border-radius: 8px;
	padding: 12px;
}

.hero-stats span {
	display: block;
	font-size: 1.55rem;
	font-weight: 700;
	color: var(--ink);
}

.hero-stats small {
	color: var(--muted);
	font-weight: 700;
}

.detail-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.info-panel {
	padding: 18px;
}

.info-panel h2 {
	margin-bottom: 14px;
	font-size: 1.2rem;
}

.recent-list {
	display: grid;
	gap: 12px;
	margin: 0;
}

.recent-list div,
.monthly-row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	border-bottom: 1px solid var(--line);
	padding-bottom: 10px;
}

.recent-list div:last-child,
.monthly-row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

dt {
	color: var(--muted);
	font-weight: 700;
}

dd {
	margin: 0;
	font-weight: 800;
	text-align: right;
}

.current-year {
	display: grid;
	gap: 8px;
	color: var(--ink);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.6;
}

.section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.section-head h2 {
	margin: 0;
}

.section-head span {
	color: var(--muted);
	font-size: 0.9rem;
	font-weight: 700;
}

.monthly-list {
	display: grid;
	gap: 10px;
}

.monthly-row {
	align-items: center;
	padding: 0 0 10px;
}

.monthly-row strong {
	min-width: 7ch;
}

.monthly-meter {
	flex: 1;
	height: 8px;
	overflow: hidden;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--line);
}

.monthly-meter span {
	display: block;
	height: 100%;
	width: var(--meter-width, 0%);
	background: var(--accent);
}

.monthly-value {
	width: 9ch;
	text-align: right;
	font-weight: 800;
	color: var(--ink);
}

.empty-state {
	color: var(--muted);
	line-height: 1.7;
}

@media (max-width: 760px) {
	body {
		padding: 16px;
	}

	.public-header,
	.reaction-panel,
	.summary-hero,
	.detail-grid {
		grid-template-columns: 1fr;
	}

	.public-header {
		display: grid;
	}

	.hero-stats {
		grid-template-columns: 1fr;
	}

	.reaction-actions {
		grid-template-columns: 1fr 1fr;
	}

	.reaction-button {
		min-height: 76px;
		padding: 11px;
	}

	.reaction-button span {
		font-size: 1.05rem;
	}

	.detail-toggle {
		display: block;
	}

	.public-details {
		display: none;
	}

	.public-details.is-open {
		display: grid;
	}

	.monthly-row {
		display: grid;
		grid-template-columns: 7ch 1fr;
	}

	.monthly-meter,
	.monthly-value {
		grid-column: 1 / -1;
		width: 100%;
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	.reaction-button {
		transition: none;
	}
}
