/* 萌香の憩いCAFE — 緑（茶）×ピンク（萌）。上にヘッダー（看板と店長）、その下にタブ、中身は 1 画面に収める */
:root {
  --bg: #F6FAF4; --panel: #FFFFFF; --ink: #333B35; --muted: #69736C;
  --green: #6BA368; --green-dark: #4E8A4B; --green-soft: #E3F0DF;
  --pink: #F8CBD8; --pink-dark: #EC9FB9; --pink-soft: #FDEEF3;
  --line: #E1EBDE; --shadow: 0 6px 20px rgba(78, 138, 75, .10);
  --board: #3f5a44;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", Meiryo, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.7; font-size: 15px; display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--green-dark); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* 舞う花びらと葉（文字の後ろ。ヘッダーと中身のパネルより下に描く） */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.petal { position: absolute; top: -40px; width: 18px; height: 18px; border-radius: 60% 0 60% 0; opacity: .6; animation: fall linear infinite; }
.petal.p { background: var(--pink-dark); }
.petal.g { background: var(--green); border-radius: 0 60% 0 60%; }
@keyframes fall { 0% { transform: translateY(-5vh) rotate(0deg); } 100% { transform: translateY(110vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .petal { display: none; } }
main.wrap, footer { position: relative; z-index: 1; }

/* ヘッダー: 日よけ → 看板（名前・店長のひとこと・店長の絵） → タブ */
header.top { flex: 0 0 auto; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(78,138,75,.08); position: relative; z-index: 2; }
.awning { height: 22px; background: repeating-linear-gradient(90deg, var(--green) 0 36px, #fff 36px 72px); position: relative; }
.awning::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; background: radial-gradient(circle at 18px -2px, transparent 16px, var(--green) 17px) 0 0 / 36px 10px repeat-x; }
.awning::after { background: radial-gradient(circle at 18px 0, var(--green) 10px, transparent 11px) 0 0 / 36px 10px repeat-x; }
.sign { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; height: 150px; padding-top: 12px; }
.sign-text { padding-bottom: 14px; }
.open { display: inline-block; font-size: 11px; letter-spacing: .3em; color: var(--pink-dark); border: 2px dashed var(--pink); border-radius: 999px; padding: 1px 12px; margin-bottom: 6px; transform: rotate(-3deg); }
.name { display: block; font-size: 30px; font-weight: 900; color: var(--green-dark); text-decoration: none; line-height: 1.2; }
.name:hover { color: var(--pink-dark); }
.bubble { position: relative; display: inline-block; margin: 10px 0 0; padding: 6px 14px; background: var(--pink-soft); border: 2px solid var(--pink); border-radius: 14px; color: var(--ink); font-size: 14px; }
.bubble::after { content: ""; position: absolute; right: -12px; top: 50%; border: 6px solid transparent; border-left-color: var(--pink); }
.chara { height: 165px; width: auto; align-self: flex-end; margin-bottom: -1px; filter: drop-shadow(0 6px 10px rgba(78,138,75,.2)); transition: transform .25s; }
.chara:hover { transform: translateY(-4px) rotate(2deg); }
.tabs { background: var(--green-soft); border-top: 1px solid var(--line); }
.tabs .wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: 0 0 auto; text-decoration: none; font-weight: 800; color: var(--green-dark); padding: 9px 18px; border-radius: 12px 12px 0 0; margin-top: 6px; white-space: nowrap; }
.tabs a.active { background: var(--panel); color: var(--ink); box-shadow: inset 0 3px 0 var(--pink-dark); }
.tabs a:hover:not(.active) { background: #fff8; }

/* 中身: 残りの高さに収める。はみ出す分（ツールの説明など）はこの中だけスクロール */
main.wrap { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-top: 14px; padding-bottom: 14px; }
.pane[hidden] { display: none !important; }
.pane.home { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
h2 { font-size: 1.05rem; margin: 6px 0 8px; font-weight: 900; color: var(--green-dark); display: flex; align-items: center; gap: 10px; }
h2::after { content: ""; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--pink) 0 6px, transparent 6px 12px); }
.panel { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 14px; }

.prose p { margin: 0 0 8px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 8px; }
.prose li { margin: 2px 0; }
.prose h2 { font-size: 1.1rem; margin: 20px 0 8px; }
.prose h2::after { display: none; }
.prose h3 { font-size: 1rem; margin: 16px 0 6px; }
.prose code { background: var(--green-soft); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.prose pre { background: #2b332d; color: #eef; padding: 12px; border-radius: 10px; overflow-x: auto; }
.prose figure { margin: 12px 0; }
.prose figure img { border-radius: 10px; border: 1px solid var(--line); max-height: 60vh; width: auto; }
.prose figcaption { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.prose blockquote { margin: 0 0 8px; padding: 6px 12px; border-left: 4px solid var(--green); background: var(--green-soft); border-radius: 0 10px 10px 0; }
.prose .row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin: 8px 0 12px; }
.prose .row > figure { flex: 1 1 300px; margin: 0; }
.prose .row > ol, .prose .row > ul { flex: 1 1 320px; margin: 0; }
.prose .row > figure img { max-height: none; width: auto; max-width: 100%; }
.prose .dl { margin: 6px 0 18px; }
.prose figure img { max-width: 100%; }
.prose.small { font-size: .92rem; color: var(--muted); }
.prose.small p { margin: 2px 0 0; }

.profile { overflow: hidden; }
.profile .face { float: left; margin: 2px 14px 6px 0; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--pink); }
.profile strong { display: block; font-size: 1.05rem; }
.profile p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.profile .links a { display: inline-block; margin: 4px 8px 0 0; padding: 1px 12px; border-radius: 999px; background: var(--green-soft); text-decoration: none; font-weight: 700; font-size: 13px; }
.profile .links a:hover { background: var(--pink-soft); color: var(--pink-dark); }

/* 更新履歴: 黒板のメニュー */
ul.board { list-style: none; margin: 0 0 14px; padding: 12px 16px; max-height: calc(100vh - 330px); min-height: 160px; overflow-y: auto; scrollbar-color: var(--pink) transparent; background: var(--board); color: #f3f6ee; border: 8px solid #b58a5a; border-radius: 6px; box-shadow: var(--shadow); }
ul.board li { padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.25); display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: baseline; font-size: .95rem; }
ul.board li:last-child { border-bottom: 0; }
ul.board time { color: var(--pink); font-variant-numeric: tabular-nums; font-size: .88rem; }
ul.board a { color: #fff; }
ul.board .new { font-style: normal; font-size: 10px; font-weight: 900; letter-spacing: .1em; color: var(--board); background: var(--pink); padding: 0 8px; border-radius: 999px; }

/* ツール: 画像つきカード */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card { position: relative; background: var(--panel); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; display: block; }
.card:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: 0 16px 36px rgba(78,138,75,.18); }
.card .thumb { aspect-ratio: 16 / 9; background: var(--green-soft) center/cover no-repeat; }
.card .body { padding: 14px 18px 16px; }
.badge { position: absolute; top: 12px; left: 12px; background: var(--pink-dark); color: #fff; font-size: 12px; font-weight: 900; padding: 3px 12px; border-radius: 999px; letter-spacing: .1em; }
.card h3 { margin: 0 0 4px; font-size: 1.1rem; color: var(--ink); }
.card p { margin: 0 0 8px; color: var(--muted); font-size: .93rem; }
.card .more { color: var(--pink-dark); font-weight: 800; }
.panel.soon { color: var(--muted); text-align: center; padding: 30px; }

/* ブログ・投稿の一覧 */
ul.list { list-style: none; padding: 0; margin: 0; }
ul.list li { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 18px; margin-bottom: 12px; transition: transform .15s; }
ul.list li:hover { transform: translateX(4px); }
ul.list time { display: inline-block; margin-right: 12px; color: var(--green-dark); font-weight: 700; font-size: .9rem; }
ul.list li a, ul.list li strong { font-weight: 800; font-size: 1.08rem; }
ul.list li p { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
ul.list .place { margin-left: 10px; color: var(--muted); font-size: .9rem; }

/* 目安箱のフォーム */
form.inbox { display: grid; gap: 10px; max-width: 640px; }
form.inbox label { display: grid; gap: 4px; font-weight: 700; font-size: .92rem; color: var(--green-dark); }
form.inbox input, form.inbox select, form.inbox textarea { font: inherit; font-weight: 500; color: var(--ink); padding: 8px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
form.inbox input:focus, form.inbox select:focus, form.inbox textarea:focus { outline: none; border-color: var(--pink-dark); }
form.inbox .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
form.inbox .actions { display: flex; align-items: center; gap: 14px; margin: 4px 0 0; }
form.inbox .status { color: var(--muted); font-size: .92rem; }
form.inbox button { border: 0; cursor: pointer; font: inherit; }
form.inbox button:disabled { opacity: .6; }

/* 個別ページ */
.article { padding: 16px 22px; }
.article h1 { font-size: 1.4rem; color: var(--green-dark); margin: 4px 0 6px; }
.article .lead { color: var(--muted); }
.article .crumb { margin: 0; font-size: .9rem; }
.btn { display: inline-block; padding: 8px 20px; border-radius: 999px; background: var(--green-dark); color: #fff; text-decoration: none; font-weight: 800; box-shadow: 0 4px 0 #3f7140; }
.btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 #3f7140; }
.btn.ghost { background: #fff; color: var(--green-dark); border: 2px solid var(--green); box-shadow: 0 4px 0 var(--green-soft); }

footer { flex: 0 0 auto; padding: 6px 16px; text-align: center; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); background: var(--panel); }

@media (max-width: 720px) {
  html, body { height: auto; min-height: auto; }
  main.wrap { overflow: visible; }
  .sign { height: auto; align-items: center; }
  .name { font-size: 22px; }
  .bubble { font-size: 13px; }
  .chara { height: 120px; }
  .pane.home { grid-template-columns: 1fr; }
  ul.board li { grid-template-columns: 1fr; gap: 0; }
}
