:root {
  --brand: #3E6B45;
  --brand-dark: #2C5033;
  --brand-50: #EEF5EC;
  --bg: #FFFFFF;      /* ページの地色（作品写真の色が正しく見えるよう白） */
  --surface: #FFFFFF; /* カード・入力欄など */
  --paper: #F6FAF4;   /* カード内などの淡い面 */
  --washi: #ECF2E8;
  --line: #E2EADF;
  --ink: #2E3730;
  --muted: #76817A;
  --gold: #8A9A4B;
  --shadow-soft: 0 1px 2px rgba(46, 55, 48, .04), 0 4px 16px -8px rgba(46, 55, 48, .08);
  --shadow-lift: 0 2px 4px rgba(46, 55, 48, .04), 0 18px 36px -16px rgba(62, 107, 69, .28);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.85;
  letter-spacing: 0.03em;
  animation: page-in .5s var(--ease) both;
}
h1, h2, h3, .font-mincho {
  font-family: "Shippori Mincho", "Yu Mincho", serif;
  letter-spacing: 0.06em;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-50); color: var(--brand-dark); }

/* ---------- 地紋・ヒーロー ---------- */
.bg-seigaiha {
  background-color: var(--washi);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20' viewBox='0 0 40 20'%3E%3Cg fill='none' stroke='%233E6B45' stroke-opacity='.07'%3E%3Cpath d='M0 20a20 20 0 0 1 40 0M6 20a14 14 0 0 1 28 0M12 20a8 8 0 0 1 16 0M-20 10a20 20 0 0 1 40 0M20 10a20 20 0 0 1 40 0M-14 10a14 14 0 0 1 28 0M26 10a14 14 0 0 1 28 0'/%3E%3C/g%3E%3C/svg%3E");
}

/* ヒーローの背景：水彩のきゅうり柄。中央（見出しと検索欄のあたり）ほど白を濃く重ねて文字を読みやすく */
.hero {
  background:
    radial-gradient(ellipse 60% 70% at 50% 50%, rgba(255, 255, 255, .82), rgba(255, 255, 255, .45)),
    url("/assets/img/hero-cucumber.jpg") center / 704px auto repeat,
    #FBFAF4;
}
/* ---------- ヒーローの下の区切り：きゅうりのつる ---------- */
/* 細い線の代わりに、つるを境目にまたがるように置く（横に繰り返し、上下反転して使う） */
:root { --vine: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='26' viewBox='0 0 160 26'%3E%3Cpath d='M0 13 Q20 5 40 13 T80 13 T120 13 T160 13' fill='none' stroke='%238DB37F' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M22 9.5 q-3 -6 3 -9 q4 5 -3 9z' fill='%23A9C99A'/%3E%3Cpath d='M30 10.5 q4 -4 8 -1 q-3 4 -8 1z' fill='%23BCD6AF'/%3E%3Cpath d='M102 16.5 q-3 6 3 9 q4 -5 -3 -9z' fill='%23A9C99A'/%3E%3Cpath d='M60 13 q2 -6 6 -5 q3 1 1 4 q-2 1 -3 -1' fill='none' stroke='%238DB37F' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M140 13 q-1 6 -6 6 q-3 -1 -1 -4 q2 -1 3 1' fill='none' stroke='%238DB37F' stroke-width='1' stroke-linecap='round'/%3E%3Ccircle cx='84' cy='11' r='1.6' fill='%23E3D27A'/%3E%3C/svg%3E"); }
.vine-bottom { position: relative; }
.vine-bottom::after {
  content: ""; position: absolute; left: 0; right: 0; height: 26px; pointer-events: none; z-index: 2;
  background: var(--vine) left center / 160px 26px repeat-x;
}
.vine-bottom::after { bottom: -13px; transform: scaleY(-1); background-position: 80px center; }

/* ---------- 見出し ---------- */

.section-head h2 { font-size: 1.45rem; font-weight: 700; line-height: 1.5; margin-top: .15rem; }

.section-title {
  display: flex; align-items: center; gap: .7rem;
  font-family: "Shippori Mincho", serif; font-weight: 700;
  font-size: 1.2rem; color: var(--ink);
}
.section-title::before {
  content: ""; width: 1.1rem; height: 1px; background: var(--gold);
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .5rem 1.2rem; border-radius: 9999px;
  font-weight: 500; font-size: .95rem; line-height: 1.2;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .25s, transform .15s, opacity .2s;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; border: 1px solid var(--brand); box-shadow: 0 6px 16px -8px rgba(62, 107, 69, .6); }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); box-shadow: 0 10px 22px -10px rgba(62, 107, 69, .7); }
.btn-ghost { background: var(--surface); color: var(--brand); border: 1px solid var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-50); }
.btn-danger { background: var(--surface); color: #A3312F; border: 1px solid #EBC9C6; }
.btn-danger:hover:not(:disabled) { background: #FBEDEC; }
.btn-sm { min-height: 36px; padding: .3rem .9rem; font-size: .85rem; }

/* ---------- フォーム ---------- */
.label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .35rem; }
.hint { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: .55rem .9rem;
  border: 1px solid var(--line); border-radius: .75rem; background: var(--surface);
  font-size: 1rem; /* iOS のズーム防止 */ color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 8rem; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(62, 107, 69, .1);
}

/* 検索ボックス（ボタン内蔵） */
.search-box {
  display: flex; align-items: center; gap: .25rem;
  background: var(--surface); border-radius: 9999px; padding: .3rem .3rem .3rem 1.2rem;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px -16px rgba(62, 107, 69, .3);
  transition: box-shadow .25s;
}
.search-box:focus-within { box-shadow: 0 0 0 4px rgba(62, 107, 69, .1), 0 12px 32px -14px rgba(62, 107, 69, .35); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 1rem; min-height: 44px; }

/* ---------- カード ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; }
.card-hover { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: rgba(62, 107, 69, .25); }
.card-hover .zoom { transition: transform .8s var(--ease); }
.card-hover:hover .zoom { transform: scale(1.06); }

/* 日付タイル（イベント） */
.date-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 3.6rem; height: 3.9rem; border-radius: .9rem; flex-shrink: 0;
  background: var(--brand-50); color: var(--brand); line-height: 1.1;
}
.date-tile:has(.y) { height: auto; padding: .35rem 0; }
.date-tile .y { font-size: .58rem; letter-spacing: .08em; opacity: .75; }
.date-tile .m { font-size: .65rem; letter-spacing: .1em; }
.date-tile .d { font-family: "Shippori Mincho", serif; font-size: 1.5rem; font-weight: 700; }
.date-tile .w { font-size: .6rem; opacity: .8; }

/* ---------- チップ・タグ ---------- */
.chip {
  display: inline-flex; align-items: center; min-height: 36px;
  padding: .25rem .95rem; border-radius: 9999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: .875rem; cursor: pointer; user-select: none; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.chip:hover { border-color: rgba(62, 107, 69, .45); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-sm { min-height: 32px; padding: .15rem .75rem; font-size: .8rem; }

/* 絞り込みの枠（作家一覧）：見出しラベル＋説明、その下に選択肢 */
.filter-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 1rem; padding: .9rem 1rem 1rem; }
.filter-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .75rem; margin-bottom: .7rem; }
.filter-head p { font-size: .72rem; color: var(--muted); line-height: 1.5; }
.filter-label {
  display: inline-block; padding: .2rem .9rem; border: 1px solid var(--brand); border-radius: .5rem;
  background: var(--surface); color: var(--brand); font-size: .8rem; font-weight: 700; letter-spacing: .06em;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-chips .chip { min-width: 2.6rem; border-radius: .5rem; }

/* ページ送り */
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 .6rem; border-radius: 9999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .9rem;
  transition: border-color .15s, background-color .15s;
}
a.page-btn:hover { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.page-btn[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.page-btn[aria-disabled="true"] { opacity: .35; }

.tag {
  display: inline-block; padding: .05rem .6rem; border-radius: 9999px;
  background: var(--brand-50); color: var(--brand-dark); font-size: .72rem; line-height: 1.75;
}
.tag-muted { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

/* PR 表記 */
.pr-badge {
  display: inline-block; padding: 0 .45rem; border: 1px solid var(--gold); border-radius: 4px;
  color: var(--gold); background: var(--surface); font-size: .68rem; font-weight: 700; letter-spacing: .12em; line-height: 1.6;
}

/* ---------- 改行の整え（サイト全体） ----------
   対応ブラウザでは、日本語を語の途中で改行しない（例：「ご購／入」にならない）。
   非対応のブラウザでは従来どおりの改行になるだけで、表示が崩れることはない。 */
body { word-break: auto-phrase; }
/* 文章：最後の行に1〜2文字だけ残らないようにする */
p, li, dd, dt, label, summary, .hint { text-wrap: pretty; }
/* 見出し・中央寄せの文：各行の長さをそろえる */
h1, h2, h3, .section-title, .text-center p, p.text-center { text-wrap: balance; }
/* URL など区切りのない長い文字列は、はみ出さないよう折り返す */
p, li, dd { overflow-wrap: anywhere; }

/* 中央寄せの日本語文（個別指定用） */
.text-balance-ja { text-wrap: balance; word-break: auto-phrase; }

/* 改行を保持してプレーンテキストを表示 */
.pre-line { white-space: pre-line; overflow-wrap: anywhere; }

/* 規約ページ等の本文 */
.doc h2 { font-size: 1.15rem; font-weight: 700; margin: 2.2rem 0 .6rem; color: var(--brand-dark); }
.doc p, .doc li { font-size: .95rem; }
.doc ol { list-style: decimal; padding-left: 1.4rem; }
.doc ul { list-style: disc; padding-left: 1.4rem; }
.doc li { margin: .25rem 0; }

/* ---------- ヘッダー ---------- */
.site-header { transition: box-shadow .3s, background-color .3s; }
.site-header.scrolled { box-shadow: 0 6px 20px -16px rgba(46, 55, 48, .3); }

/* ---------- ドロップダウン ---------- */
/* ☰ メニュー：スマホは右からすべり出る、PC は上から小さく出る */
.menu-panel:not(.hidden) { animation: drawer-in .25s var(--ease); }
.menu-overlay:not(.hidden) { animation: fade-in .25s var(--ease); }
@media (min-width: 768px) { .menu-panel:not(.hidden) { animation: drop-in .18s var(--ease); transform-origin: top right; } }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- 作品の拡大表示 ---------- */
dialog.lightbox::backdrop { background: rgba(25, 40, 30, .6); backdrop-filter: blur(3px); }
dialog.lightbox[open] { animation: pop-in .35s var(--ease); }
dialog.lightbox[open]::backdrop { animation: fade-in .3s ease; }

/* ---------- トースト ---------- */
#toast {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%) translateY(150%);
  background: var(--ink); color: #fff; padding: .75rem 1.3rem; border-radius: 9999px;
  font-size: .9rem; z-index: 60; transition: transform .35s var(--ease); max-width: calc(100% - 2rem);
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .4);
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.error { background: #A3312F; }

/* ---------- 読み込み中のスケルトン ---------- */
.skeleton {
  background: linear-gradient(90deg, #E8EFE5 25%, #F4F8F1 50%, #E8EFE5 75%);
  background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: .6rem;
}

/* ---------- スクロールで現れる ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* ヒーローの登場 */
.fade-up { animation: fade-up .9s var(--ease) both; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .18s; }
.delay-3 { animation-delay: .28s; }
.delay-4 { animation-delay: .38s; }

@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* 動きを減らす設定の方には、アニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scroll-x { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { display: none; }
