@import url("https://fonts.googleapis.com/css2?family=Handlee&family=Zen+Maru+Gothic:wght@400;500;700&family=Noto+Sans+JP:wght@400;500;700&display=swap");

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
:root {
	/* ── Background ── */
	--bg-main:    #FBF7F2;   /* 全体背景（生成り） */
	--bg-section: #F3EAE0;   /* セクション分割（ベージュ） */
	--bg-card:    #FFFFFF;   /* カード・コンテンツ */
	--bg-code:    #F5E6D0;   /* コードブロック */

	/* ── Header / Footer ── */
	--header-bg:  #FFF3E6;
	--footer-bg:  #1A3A5C;

	/* ── Brand ── */
	--color-main:      #F2994A;  /* オレンジ（主役） */
	--color-main-soft: #E38A3A;  /* くすみオレンジ（ロゴ） */
	--color-accent:    #6EC1E4;  /* 水色（最小限） */
	--color-accent-dk: #4AA8CC;

	/* ── Text ── */
	--text-main:    #4A3A2A;
	--text-sub:     #8C7A6B;
	--text-heading: #5A3E2B;
	--text-white:   #FFFFFF;
	--text-error:   #C0392B;

	/* ── UI ── */
	--btn-bg:    #F2994A;
	--btn-hover: #E07F2F;
	--link:      #F2994A;
	--link-hover: #E07F2F;
	--line:       #EDD9C0;

	/* ── Opacity ── */
	--opacity-tagline: 0.75;
	--opacity-copy:    0.55;
	--opacity-admin-shadow: 0.08;

	/* ── Shadows ── */
	--shadow-box:  0 8px 32px rgba(74, 58, 42, 0.10);
	--shadow-card: 0 8px 24px rgba(74, 58, 42, 0.08);
	--shadow-btn:  0 4px 16px rgba(242, 153, 74, 0.30);

	/* ── Decorations ── */
	--link-underline: rgba(242, 153, 74, 0.40);

	/* ── Typography ── */
	--font-logo:    'Handlee', cursive;
	--font-heading: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
	--font-body:    'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;

	/* ── Type Scale（html font-size: 14px 基準） ── */
	--text-xs:      0.75rem;   /* 10.5px  ラベル・補足最小 */
	--text-sm:      0.88rem;   /* 12.3px  meta・time・補足 */
	--text-base:    1rem;      /* 14px    UI・ボタン */
	--text-md:      1.125rem;  /* 15.75px 本文 */
	--text-eyebrow: 1.2rem;    /* 16.8px  eyebrow */
	--text-lg:      1.4rem;    /* 19.6px  h3 */
	--text-xl:      1.8rem;    /* 25.2px  h2 */
	--text-2xl:     2.4rem;    /* 33.6px  h1 */

	/* ── Legacy aliases（既存コードとの互換） ── */
	--accent:      var(--color-main);
	--accent-dark: var(--btn-hover);
	--sub:         var(--color-accent);
	--sub-dark:    var(--color-accent-dk);
	--ink:         var(--text-main);
	--muted:       var(--text-sub);
	--heading:     var(--text-heading);
	--paper:       var(--bg-card);
	--soft:        var(--bg-section);
	--bg:          var(--bg-main);
	--font-sans:   var(--font-body);
	--box-shadow:  var(--shadow-box);
}

/* ================================================================
   RESET / BASE
   ================================================================ */
* { box-sizing: border-box; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
	margin: 0;
	padding: 0;
	text-align: left;
	background-color: var(--bg-main);
	word-wrap: break-word;
	overflow-wrap: break-word;
	color: var(--text-main);
	font-family: var(--font-body);
	font-size: var(--text-md);
	line-height: 1.8;
}

main {
	width: 100%;
	max-width: none;
	margin: auto;
	padding: 0;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.5rem 0;
	color: var(--text-heading);
	font-family: var(--font-heading);
	line-height: 1.3;
}

h1 { font-size: var(--text-2xl); font-weight: 700; }
h2 { font-size: var(--text-xl);  font-weight: 700; }
h3 { font-size: var(--text-lg); }

a       { color: var(--link); }
a:hover { color: var(--link-hover); }

p { margin-bottom: 1em; }

textarea { width: 100%; font-size: 16px; }
input    { font-size: 16px; }
table    { width: 100%; }

img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

code {
	padding: 2px 5px;
	background-color: var(--bg-code);
	border-radius: 2px;
}

pre { padding: 1.5em; border-radius: 8px; }
pre > code { all: unset; }

blockquote {
	border-left: 4px solid var(--color-main);
	padding: 0 0 0 20px;
	margin: 0;
	font-size: 1.1em;
}

hr {
	border: none;
	border-top: 1px solid var(--line);
}

/* ================================================================
   HEADER
   ================================================================ */
header {
	position: sticky;
	top: 0;
	z-index: 10;
	margin: 0;
	padding: 0;
	background-color: var(--header-bg);
	background-image: url('/images/header_wallpaper.png');
	background-repeat: repeat-x;
	background-size: auto auto;
	background-position: top left;
	border-bottom: 2px solid var(--line);
	backdrop-filter: blur(8px);
}

nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5em;
	min-height: 88px;
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 0 1.25em;
}

nav a {
	display: inline-block;
	padding: 0.9em 0.5em;
	color: var(--text-sub);
	border-bottom: 2px solid transparent;
	text-decoration: none;
	font-size: var(--text-sm);
	font-weight: 700;
	letter-spacing: 0.04em;
	transition: color 0.2s, border-color 0.2s;
}

nav a.active,
nav a:hover {
	border-bottom-color: var(--color-accent);
	color: var(--text-heading);
}

.header-brand {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.header-logo-link {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2rem;
	text-decoration: none;
}

.header-tagline {
	font-size: var(--text-sm);
	color: var(--text-sub);
	letter-spacing: 0.04em;
}

.header-logo {
	width: 174px;
	height: 40px;
	display: block;
	flex-shrink: 0;
}

.internal-links {
	display: flex;
	align-items: center;
	margin-left: auto;
}

/* ================================================================
   FOOTER
   ================================================================ */
footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5em;
	padding: 1.4em max(1.2em, calc((100vw - 1120px) / 2));
	background-image: url('/images/footer_wallpaper.png');
	background-repeat: repeat;
	background-size: auto auto;
	border-top: none;
	color: var(--text-white);
	font-size: var(--text-sm);
}

footer p { margin: 0; }

.footer-logo {
	width: 109px;
	height: 20px;
	display: block;
	border-radius: 0;
}

.footer-tagline {
	font-size: var(--text-sm);
	opacity: var(--opacity-tagline);
	margin-top: 0.2rem;
}

.insta-link {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	color: var(--text-white);
}

.insta-label {
	font-size: var(--text-sm);
	color: var(--text-white);
	opacity: var(--opacity-tagline);
	letter-spacing: 0.05em;
}

.insta-icon {
	display: block;
	border-radius: 0;
}

.copy {
	white-space: nowrap;
	opacity: var(--opacity-copy);
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
	padding-bottom: clamp(3rem, 7vw, 6rem);
	background:
		linear-gradient(to right,
			var(--bg-main) 0%,
			rgba(251, 247, 242, 0.55) 40%,
			rgba(251, 247, 242, 0.10) 65%,
			transparent 100%
		),
		linear-gradient(rgba(251, 247, 242, 0.65), rgba(251, 247, 242, 0.65)),
		url('/images/hero_background.png') center 30% / cover no-repeat;
}

.hero-inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: clamp(2rem, 5vw, 4rem) max(1.2rem, calc((100vw - 960px) / 2)) 0;
}

.hero-desc {
	color: var(--text-sub);
	font-size: var(--text-md);
	max-width: 560px;
	width: 100%;
	margin: 0 0 2rem;
	text-align: left;
}

/* ================================================================
   SHARED COMPONENTS
   ================================================================ */
.eyebrow {
	margin: 0 0 0.6rem;
	color: var(--color-accent-dk);
	font-size: var(--text-eyebrow);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 1.8rem;
	border: none;
	border-radius: 24px;
	background: var(--btn-bg);
	color: var(--text-white);
	font-size: var(--text-base);
	font-weight: 700;
	text-decoration: none;
	transition: background 0.2s, transform 0.15s;
	box-shadow: var(--shadow-btn);
}

.button:hover {
	background: var(--btn-hover);
	color: var(--text-white);
	transform: translateY(-1px);
}

.text-link {
	display: inline-flex;
	margin-top: 1.4rem;
	color: var(--link-hover);
	font-weight: 700;
	text-decoration-color: var(--link-underline);
	text-underline-offset: 0.28em;
}

/* ================================================================
   SECTIONS
   ================================================================ */
.section {
	padding: clamp(3.5rem, 8vw, 6rem) max(1.2rem, calc((100vw - 1120px) / 2));
	background: var(--bg-main);
}

.section:nth-child(even) {
	background: var(--bg-section);
}

.section-heading {
	max-width: 760px;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}


.section-heading.compact { margin-bottom: 1.6rem; }

/* ── About ── */
.about-grid {
	display: grid;
	grid-template-columns: minmax(200px, 0.65fr) minmax(260px, 1fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
}

.about-grid img {
	width: 100%;
	max-width: none;
	aspect-ratio: 1;
	max-height: 520px;
	object-fit: cover;
	object-position: center;
	box-shadow: var(--shadow-box);
	border-radius: 16px;
}

.about-text { color: var(--text-sub); font-size: var(--text-md); }

.lead { color: var(--text-sub); font-size: var(--text-md); }
.about-text p:last-child { margin-bottom: 0; }

/* ── News ── */
.news-list {
	display: grid;
	gap: 1px;
	border: 1px solid var(--line);
	background: var(--line);
	border-radius: 12px;
	overflow: hidden;
}

.news-list article {
	display: grid;
	grid-template-columns: 110px minmax(160px, 0.7fr) 1fr;
	gap: 1.5rem;
	padding: 1.25rem;
	background: var(--bg-card);
	position: relative;
	cursor: pointer;
	transition: background 0.15s;
}

.news-list article:hover { background: var(--bg-section); }

.news-list time {
	color: var(--color-accent-dk);
	font-size: var(--text-sm);
	font-weight: 700;
}

.news-list h3,
.news-list p,
.product-list h3,
.product-list p { margin: 0; }

.news-list h3 { font-size: var(--text-base); font-weight: 700; }

.news-list p,
.product-list p { color: var(--text-sub); font-size: var(--text-sm); }

/* ── Products ── */
.product-section {
	display: grid;
	grid-template-columns: minmax(260px, 0.85fr) minmax(280px, 1fr);
	gap: clamp(2rem, 6vw, 5rem);
	align-items: center;
}

.product-visual img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	box-shadow: var(--shadow-box);
	border-radius: 16px;
}

.product-list { display: grid; gap: 0.8rem; margin-top: 2rem; }

.product-list article {
	display: flex;
	justify-content: space-between;
	gap: 1.25rem;
	padding: 1rem 0;
	border-top: 1px solid var(--line);
	position: relative;
	cursor: pointer;
}

.product-list article:hover h3 { color: var(--color-main); }

.product-list span {
	flex: 0 0 auto;
	color: var(--btn-hover);
	font-size: var(--text-sm);
	font-weight: 700;
}

/* ── Links in lists ── */
.news-list h3 a,
.product-list h3 a,
.archive-list h2 a { color: inherit; text-decoration: none; }

.news-list h3 a:hover,
.product-list h3 a:hover,
.archive-list h2 a:hover { color: var(--color-main); }

/* stretched-link: <a> の ::after でカード全体をクリッカブルにする */
.stretched-link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* ================================================================
   INNER PAGES（全内部ページ共通レイアウト）
   ================================================================ */
.page-banner {
	background: var(--bg-section);
	text-align: center;
	padding: clamp(2.5rem, 6vw, 4rem) max(1.2rem, calc((100vw - 960px) / 2));
}

.page-banner .lead {
	max-width: 580px;
	margin: 0.6rem auto 0;
}

.page-body {
	background: var(--bg-main);
	min-height: 40vh;
	padding: clamp(2.5rem, 6vw, 4rem) max(1.2rem, calc((100vw - 1120px) / 2));
}

.page-body.narrow {
	padding-left: max(1.2rem, calc((100vw - 760px) / 2));
	padding-right: max(1.2rem, calc((100vw - 760px) / 2));
}

/* ── Contact Form ── */
.contact-form {
	max-width: 560px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.contact-honeypot {
	position: absolute;
	left: -9999px;
	width: 0;
	height: 0;
	overflow: hidden;
	opacity: 0;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.form-group label {
	font-size: var(--text-sm);
	font-weight: 600;
	color: var(--text-main);
}

.required {
	color: var(--text-error);
	margin-left: 0.2em;
}

.form-group input,
.form-group textarea {
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: 4px;
	font-size: 16px; /* iOS zoom 防止のため px 固定 */
	font-family: inherit;
	background: var(--bg-card);
	transition: border-color 0.2s;
	width: 100%;
	box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--color-main);
}

.form-group textarea { resize: vertical; }

.form-status {
	font-size: var(--text-sm);
	min-height: 1.4em;
}

.form-status.success { color: #1a7a3a; }
.form-status.error { color: var(--text-error); }

#submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ================================================================
   ARCHIVE / LIST PAGES
   ================================================================ */
.archive-list {
	display: grid;
	gap: 1px;
	border: 1px solid var(--line);
	background: var(--line);
	border-radius: 12px;
	overflow: hidden;
}

.archive-list article {
	padding: clamp(1.2rem, 3vw, 2rem);
	background: var(--bg-main);
	position: relative;
	cursor: pointer;
	transition: background 0.15s;
}

.archive-list article:hover {
	background: var(--bg-section);
}

/* Stretched link: h2 a の ::after でカード全体をクリック可能に */
.archive-list article h2 a::after {
	content: '';
	position: absolute;
	inset: 0;
}

.archive-list h2 {
	margin-bottom: 0.45rem;
	font-size: var(--text-xl);
}

.archive-list time,
.archive-list span,
.markdown-meta {
	color: var(--color-accent-dk);
	font-size: var(--text-sm);
	font-weight: 700;
}

.archive-list p { max-width: 760px; margin: 0; color: var(--text-sub); }

/* ── Archive with thumbnail image ── */
.archive-list article.has-image {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 1.5rem;
	align-items: center;
}

.archive-item-text { min-width: 0; }

.archive-thumb {
	flex-shrink: 0;
	width: 120px;
	height: 90px;
}

.archive-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

@media (max-width: 520px) {
	.archive-list article.has-image {
		grid-template-columns: 1fr;
	}
	.archive-thumb {
		width: 100%;
		height: 180px;
	}
}

.media-list article {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 1.4rem;
	align-items: center;
}

.media-list img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.markdown-meta {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin-top: 1rem;
}

.markdown-hero {
	display: block;
	width: min(680px, 100%);
	margin: 0 auto 2.5rem;
	box-shadow: var(--shadow-box);
	border-radius: 12px;
}

.markdown-body { color: var(--text-sub); }

.markdown-body h2,
.markdown-body h3 { margin-top: 2em; color: var(--text-heading); }

.markdown-body ul,
.markdown-body ol { padding-left: 1.4rem; }

.markdown-body li + li { margin-top: 0.35rem; }

/* ================================================================
   ADMIN
   ================================================================ */
.admin-page {
	background: var(--bg-section);
	min-height: calc(100vh - 88px);
}

.admin-shell {
	width: min(1120px, calc(100% - 2rem));
	margin: 0 auto;
	padding: clamp(2rem, 6vw, 4rem) 0;
}

.admin-heading { margin-bottom: 1.5rem; }
.admin-heading p:not(.eyebrow) { max-width: 680px; color: var(--text-sub); }

.admin-login,
.admin-editor,
.admin-list-panel,
.admin-toolbar {
	border: 1px solid var(--line);
	background: var(--bg-card);
	box-shadow: var(--shadow-card);
}

.admin-login {
	display: grid;
	gap: 1rem;
	max-width: 440px;
	padding: 1.25rem;
	border-radius: 12px;
}

.admin-app { display: grid; gap: 1rem; }

.admin-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.8rem;
	border-radius: 12px;
}

.admin-tabs,
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.admin-tabs button,
.admin-actions button,
.admin-entry-button {
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--bg-card);
	color: var(--text-main);
	font: inherit;
	font-size: var(--text-sm);
	font-weight: 700;
	cursor: pointer;
}

.admin-tabs button,
.admin-actions button { min-height: 40px; padding: 0 1rem; }

.admin-tabs button.active {
	border-color: var(--color-main);
	background: var(--color-main);
	color: var(--text-white);
}

.admin-grid {
	display: grid;
	grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.4fr);
	gap: 1rem;
	align-items: start;
}

.admin-list-panel { padding: 1rem; border-radius: 12px; }
.admin-list-panel h2 { font-size: var(--text-md); }
.admin-entry-list { display: grid; gap: 0.6rem; }

.admin-entry-button {
	display: grid;
	width: 100%;
	padding: 0.8rem 0.9rem;
	border-radius: 8px;
	text-align: left;
}

.admin-entry-button span { color: var(--text-sub); font-size: var(--text-xs); }

.admin-editor {
	display: grid;
	gap: 1rem;
	padding: 1rem;
	border-radius: 12px;
}

.admin-editor label,
.admin-login label {
	display: grid;
	gap: 0.35rem;
	color: var(--text-main);
	font-size: var(--text-sm);
	font-weight: 700;
}

.admin-editor input,
.admin-editor textarea,
.admin-login input {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--bg-card);
	color: var(--text-main);
	font: inherit;
	font-size: var(--text-base);
}

.admin-editor input,
.admin-login input { min-height: 44px; padding: 0 0.8rem; }

.admin-editor textarea { padding: 0.8rem; resize: vertical; }

.admin-preview {
	width: min(280px, 100%);
	aspect-ratio: 4 / 3;
	object-fit: cover;
	box-shadow: var(--shadow-box);
	border-radius: 8px;
}

.admin-preview[hidden],
.admin-app[hidden],
.admin-login[hidden],
.admin-editor label[hidden] { display: none; }

.admin-editor-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.admin-message { min-height: 1.4em; margin: 0; color: var(--color-accent-dk); font-weight: 700; }
.admin-message.error { color: var(--text-error); }

/* ================================================================
   CONTACT
   ================================================================ */
.sr-only {
	border: 0;
	padding: 0;
	margin: 0;
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 840px) {
	.about-grid,
	.product-section { grid-template-columns: 1fr; }

	.product-visual { order: 2; }

	.news-list article { grid-template-columns: 1fr; gap: 0.3rem; }
}

@media (max-width: 720px) {
	main { padding: 0; }
	header { padding: 0; }

	nav {
		align-items: flex-start;
		flex-direction: column;
		gap: 0;
		padding: 0.4em 1em;
		min-height: auto;
	}

	.header-tagline { display: none; }
	.internal-links { display: flex; flex-wrap: wrap; gap: 0.45em 0.8em; }
	nav a { padding: 0.2em 0; }

	footer { align-items: flex-start; flex-direction: column; }
	.copy { white-space: normal; }

	.media-list article,
	.admin-grid { grid-template-columns: 1fr; }

	.admin-toolbar { align-items: stretch; flex-direction: column; }
	.admin-tabs button,
	.admin-actions button { flex: 1 1 auto; }
}

@media (max-width: 520px) {
	.product-list article { flex-direction: column; gap: 0.45rem; }
}
