/* POG広場 */
:root {
  --bg: #f6f3ec;
  --paper: #ffffff;
  --ink: #2a2723;
  --ink-2: #5d574e;
  --muted: #8a8378;
  --line: #e5dfd3;
  --turf: #1f5c3f;
  --turf-2: #2d7a55;
  --turf-soft: #e7f0ea;
  --accent: #aa5522;
  --accent-soft: #fbf1e8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(40, 30, 10, .06), 0 2px 8px rgba(40, 30, 10, .04);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 16px; line-height: 1.85; letter-spacing: .01em;
}
a { color: var(--turf-2); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px 10px; z-index: 10; }
.muted { color: var(--muted); }

/* header */
.site-header { background: var(--turf); color: #fff; border-bottom: 4px solid var(--accent); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { font-size: 30px; line-height: 1; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-size: 24px; font-weight: 800; letter-spacing: .08em; }
.brand-sub { font-size: 12px; opacity: .85; letter-spacing: .05em; }
.nav-toggle {
  display: none; background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff;
  border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer;
}
.site-nav { background: rgba(0,0,0,.14); }
.menu, .menu ul { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; flex-wrap: wrap; }
.menu > li { position: relative; }
.menu-season { display: block; padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: default; white-space: nowrap; }
.menu > li > ul {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px; z-index: 20;
  background: var(--paper); border-radius: 0 0 8px 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px 0;
}
.menu > li:hover > ul, .menu > li:focus-within > ul { display: block; }
.menu > li:hover > .menu-season { background: rgba(255,255,255,.12); }
.menu ul a { display: block; padding: 8px 16px; color: var(--ink); text-decoration: none; font-size: 14px; }
.menu ul a:hover { background: var(--turf-soft); color: var(--turf); }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; padding-top: 28px; padding-bottom: 48px; }
main { min-width: 0; }

/* cards */
.cards { display: grid; gap: 14px; }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; position: relative; }
.card-title { font-size: 18px; line-height: 1.5; margin: 6px 0 6px; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card:hover { box-shadow: 0 2px 4px rgba(40,30,10,.08), 0 6px 18px rgba(40,30,10,.08); }
.card:hover .card-title a { color: var(--turf-2); }
.excerpt { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc { position: absolute; right: 18px; top: 16px; font-size: 12px; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); }
.meta time { font-variant-numeric: tabular-nums; }
.chip {
  position: relative; z-index: 1; display: inline-block; font-size: 12px; line-height: 1.6; padding: 1px 10px;
  border-radius: 999px; background: var(--turf-soft); color: var(--turf); text-decoration: none;
}
.chip:hover { background: var(--turf); color: #fff; }

.archive-head { margin-bottom: 18px; }
.archive-head h1 { font-size: 22px; margin: 0 0 4px; }
.archive-head p { margin: 4px 0; }
.month-links { display: flex; flex-wrap: wrap; gap: 6px; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0 0; }
.pager a, .pager span {
  min-width: 40px; padding: 6px 12px; text-align: center; border-radius: 8px; font-size: 14px;
  background: var(--paper); box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
}
.pager .cur { background: var(--turf); color: #fff; }
.pager .gap { background: none; box-shadow: none; }

/* single post */
.post { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px 32px; }
.post-head h1 { font-size: 26px; line-height: 1.45; margin: 10px 0 22px; padding-bottom: 16px; border-bottom: 2px solid var(--line); }
.entry { overflow-wrap: anywhere; }
.entry p { margin: 0 0 1.2em; }
.entry hr { border: 0; border-top: 1px dashed var(--line); margin: 1.5em 0; }
.entry blockquote { margin: 1em 0; padding: 12px 18px; background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 4px; }
.entry dt { font-weight: 700; margin-top: 1em; padding: 4px 10px; background: var(--turf-soft); border-radius: 4px; }
.entry dd { margin: 0 0 0 1em; }
.entry table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.entry td, .entry th { border: 1px solid var(--line); padding: 4px 8px; }
.entry div[style*="width"] { max-width: 100%; }
.embed { position: relative; aspect-ratio: 16 / 9; max-width: 640px; margin: 1em 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }
.tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; color: var(--ink-2); background: var(--bg); padding: 2px 10px; border-radius: 999px; text-decoration: none; }
.tag:hover { background: var(--accent-soft); color: var(--accent); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.post-nav a { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; text-decoration: none; color: var(--ink); font-size: 14px; line-height: 1.5; }
.post-nav a span { display: block; font-size: 12px; color: var(--muted); }
.post-nav .newer { text-align: right; grid-column: 2; }
.post-nav .older { grid-column: 1; }

/* comments */
.comments { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 32px 28px; }
.comments h2 { font-size: 19px; margin: 0 0 14px; }
.c-count:not(:empty) { display: inline-block; font-size: 13px; background: var(--turf); color: #fff; border-radius: 999px; padding: 0 9px; vertical-align: 2px; }
.comment-list, .comment-list ol { list-style: none; margin: 0; padding: 0; }
.comment { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.comment-list > .comment:first-child { border-top: 0; }
.comment-list ol { margin-left: 18px; padding-left: 14px; border-left: 3px solid var(--turf-soft); }
.comment-list ol .comment { border-top: 0; padding-top: 8px; }
.c-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.c-author { font-weight: 700; }
.c-head time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.c-badge { font-size: 11px; background: var(--accent); color: #fff; border-radius: 4px; padding: 0 6px; }
.c-body { margin: 4px 0 4px; overflow-wrap: anywhere; line-height: 1.75; }
.c-reply { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--turf-2); cursor: pointer; }
.c-reply:hover { text-decoration: underline; }
.comment.is-admin > .c-body { background: var(--accent-soft); padding: 8px 12px; border-radius: 6px; }

.comment-form { margin-top: 22px; padding-top: 18px; border-top: 2px solid var(--line); }
.comment-form h3 { font-size: 16px; margin: 0 0 10px; }
.replying { font-size: 13px; background: var(--turf-soft); padding: 6px 10px; border-radius: 6px; margin-bottom: 10px; }
.replying button { margin-left: 6px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .search-form input {
  width: 100%; font: inherit; font-size: 16px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf9;
}
.field input:focus, .field textarea:focus, .search-form input:focus { outline: 2px solid var(--turf-2); outline-offset: 0; border-color: transparent; }
.field textarea { min-height: 130px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-block; font: inherit; font-size: 15px; font-weight: 700; padding: 9px 22px; border-radius: 8px;
  border: 0; background: var(--turf); color: #fff; cursor: pointer;
}
.btn:hover { background: var(--turf-2); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.sub { background: var(--bg); color: var(--ink); }
.btn.danger { background: #b23a2a; }
.form-msg { margin-top: 10px; font-size: 14px; padding: 8px 12px; border-radius: 6px; }
.form-msg.ok { background: var(--turf-soft); color: var(--turf); }
.form-msg.err { background: #fdecea; color: #a12a1b; }

/* sidebar */
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.widget { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; font-size: 14px; }
.widget h2 { font-size: 14px; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--turf); color: var(--turf); letter-spacing: .05em; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 6px 0; border-bottom: 1px solid var(--line); line-height: 1.55; }
.widget li:last-child { border-bottom: 0; }
.widget li a { color: var(--ink); text-decoration: none; }
.widget li a:hover { color: var(--turf-2); text-decoration: underline; }
.widget time { display: block; font-size: 12px; color: var(--muted); }
.widget .count { float: right; font-size: 12px; color: var(--muted); }
.widget details summary { cursor: pointer; color: var(--turf-2); font-size: 13px; }
.widget details ul { max-height: 360px; overflow-y: auto; margin-top: 8px; }
.recent-comments .rc-author { font-weight: 700; }
.recent-comments .rc-text { display: block; color: var(--ink-2); font-size: 13px; }
.search-form { display: flex; gap: 6px; }
.search-form input { font-size: 15px; padding: 7px 10px; }
.search-form button { font: inherit; font-size: 14px; border: 0; background: var(--turf); color: #fff; border-radius: 8px; padding: 0 14px; cursor: pointer; white-space: nowrap; }
.search-form.big input { font-size: 17px; padding: 10px 14px; }
.hit mark { background: #ffe79a; padding: 0 1px; }

.notfound { background: var(--paper); border-radius: var(--radius); padding: 32px; text-align: center; }
.notfound .search-form { max-width: 440px; margin: 18px auto; }

.site-footer { background: #2a2723; color: #cfc8bc; font-size: 13px; padding: 22px 0; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.site-footer p { margin: 0; }
.site-footer a { color: #cfc8bc; }

/* admin */
.admin .sidebar { display: none; }
.admin .layout { grid-template-columns: 1fr; max-width: 900px; }
.admin-box { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.admin-tabs { display: flex; gap: 6px; margin: 12px 0 16px; flex-wrap: wrap; align-items: center; }
.admin-tabs .btn { font-size: 14px; padding: 6px 14px; }
.admin-tabs .btn:not(.active) { background: var(--bg); color: var(--ink); }
.admin-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.admin-item .ai-post { font-size: 13px; }
.admin-item .ai-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.admin-item .ai-actions .btn { font-size: 13px; padding: 5px 12px; }
.admin-item textarea { width: 100%; font: inherit; margin-top: 8px; padding: 8px; border-radius: 6px; border: 1px solid var(--line); min-height: 80px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .site-nav { display: none; }
  .site-nav.open { display: block; }
  .menu { flex-direction: column; padding: 6px 0; }
  .menu > li > ul { display: block; position: static; box-shadow: none; background: transparent; padding: 0 0 6px; }
  .menu-season { padding: 8px 0 2px; opacity: .8; font-size: 13px; }
  .menu ul a { color: #fff; padding: 6px 0 6px 12px; }
  .menu ul a:hover { background: rgba(255,255,255,.1); color: #fff; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .header-inner { min-height: 60px; }
  .brand-name { font-size: 20px; }
  .brand-mark { font-size: 24px; }
  .layout { padding-top: 16px; gap: 18px; }
  .post, .comments { padding: 20px 16px; border-radius: 0; margin: 0 -16px; }
  .post-head h1 { font-size: 21px; }
  .card { padding: 14px 16px; }
  .card-title { font-size: 16px; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .newer, .post-nav .older { grid-column: auto; text-align: left; }
}
