/*
Theme Name: OripaStats Blog
Theme URI: https://oripastats.com/blog/
Description: OripaStats のシンプルな2カラムブログテーマ。
Version: 0.1.17
Requires at least: 6.0
Requires PHP: 7.4
Author: OripaStats
Text Domain: oripa-blog
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --background: #f6f7f9;
  --surface: #fff;
  --text: #222;
  --muted: #626873;
  --border: #e1e4e9;
  --accent: #2456a6;
  --max-width: 1120px;
  --sidebar-width: 280px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; vertical-align: middle; }
iframe { max-width: 100%; }
.container { width: min(var(--max-width), calc(100% - 40px)); margin-inline: auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; justify-content: center; align-items: center; padding-block: 20px; }
.site-brand { min-width: 0; max-width: 100%; text-align: center; }
.site-logo { display: inline-block; max-width: 100%; }
.site-logo img { display: block; width: 300px; max-width: 100%; height: auto; }
.site-title { font-size: 24px; font-weight: 700; line-height: 1.3; margin: 0; }
.site-title a { color: var(--text); text-decoration: none; }
.site-description { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.custom-logo { max-height: 52px; width: auto; }
.site-nav ul, .footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-nav li ul, .footer-nav li ul { display: block; padding-left: 14px; }
.site-nav a, .footer-nav a { font-size: 14px; }
.site-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--sidebar-width)); align-items: start; gap: 28px; padding-block: 32px 48px; }
.site-main, .site-sidebar { min-width: 0; }
.content-panel, .post-card, .widget { background: var(--surface); border: 0px solid var(--border); padding: 24px; }
.content-panel { padding: 32px; }
.post-card { margin-bottom: 16px; }
.widget { margin: 0 0 16px; padding: 20px; }
.widget-title { font-size: 17px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.widget ul { padding-left: 20px; margin: 0; }
.widget li + li { margin-top: 8px; }
.widget p:last-child { margin-bottom: 0; }
.page-title { font-size: 25px; line-height: 1.45; margin: 0 0 20px; }
.entry-title { font-size: 28px; line-height: 1.5; margin: 0 0 48px; }
.post-card .entry-title { font-size: 21px; }
.entry-title a { color: var(--text); text-decoration: none; }
.entry-title a:hover { color: var(--accent); }
.entry-meta, .entry-taxonomy { font-size: 13px; color: var(--muted); margin: 8px 0 16px; text-align:right;}
.entry-taxonomy a { color: var(--muted); }
.entry-thumbnail { display: block; margin: 0 0 16px; }
.entry-thumbnail img { display: block; border-radius: 3px; }
.entry-content { display: flow-root; }
.entry-content p { margin: 0 0 1.25em; }
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  clear: both;
  background: transparent;
  line-height: 1.5;
  margin: 40px 0 24px;
}
.entry-content h1 { margin: 64px 0 32px; }
.entry-content h2 { font-size: 23px; margin: 64px 0 32px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.entry-content ul, .entry-content ol { padding-left: 1.6em; }
.entry-content blockquote { margin: 1.5em 0; padding: 10px 18px; border-left: 3px solid var(--border); background: var(--background); }
.entry-content pre { overflow-x: auto; padding: 16px; background: var(--background); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 9px; text-align: left; }
.entry-content th { background: var(--background); }
.wp-block-table { overflow-x: auto; }
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-size: 13px; color: var(--muted); }
.bypostauthor { border-left: 2px solid var(--border); }
.post-card .entry-summary p:last-child { margin-bottom: 0; }
.navigation { margin: 24px 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.pagination .nav-links { justify-content: center; }
.page-numbers { padding: 5px 12px; border: 1px solid var(--border); background: var(--surface); }
.page-numbers.current { background: var(--accent); color: #fff; }
.search-form { display: flex; gap: 6px; }
.search-form label { flex: 1; min-width: 0; }
.search-field { width: 100%; }
input, textarea, button, select { font: inherit; max-width: 100%; }
input:not([type=checkbox]):not([type=radio]), textarea, select { border: 1px solid var(--border); border-radius: 3px; padding: 8px; }
button, input[type=submit] { border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); color: #fff; padding: 8px 12px; cursor: pointer; }
/* Reader comments (not the article's character dialogue). */
.comments-area {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.comments-area > h2, .comments-area .comment-reply-title {
  margin: 0 0 20px;
  font-size: 20px;
  line-height: 1.5;
}
.comments-area .comment-list,
.comments-area .comment-list .children {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comments-area .comment-list li.comment,
.comments-area .comment-list li.pingback,
.comments-area .comment-list li.trackback {
  margin: 0;
  padding: 0;
  border: 0;
}
.comments-area .comment-list .children {
  margin-left: 16px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
}
.comments-area .comment-body {
  padding: 18px 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.comments-area .reader-comment-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 8px;
}
.comments-area .reader-comment-author {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}
.comments-area .reader-comment-date {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.comments-area .reader-comment-content {
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.comments-area .reader-comment-content p {
  margin: 0 0 .8em;
}
.comments-area .reader-comment-content > :last-child {
  margin-bottom: 0;
}
.comments-area .reader-comment-moderation {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.comments-area .reader-comment-actions {
  margin-top: 10px;
}
.comments-area .comment-reply-link,
.comments-area .comment-reply-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-decoration: none;
}
.comments-area .comment-reply-link::before,
.comments-area .comment-reply-login::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M21 11.5a8.5 8.5 0 0 1-8.5 8.5 9.3 9.3 0 0 1-3.6-.8L3 21l1.8-5.9a9.3 9.3 0 0 1-.8-3.6 8.5 8.5 0 0 1 8.5-8.5h.5a8.5 8.5 0 0 1 8 8v.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M21 11.5a8.5 8.5 0 0 1-8.5 8.5 9.3 9.3 0 0 1-3.6-.8L3 21l1.8-5.9a9.3 9.3 0 0 1-.8-3.6 8.5 8.5 0 0 1 8.5-8.5h.5a8.5 8.5 0 0 1 8 8v.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.comments-area .comment-reply-link:hover,
.comments-area .comment-reply-login:hover {
  color: var(--text);
  background: #f5f5f5;
}
.comments-area .comment-respond {
  margin-top: 28px;
}
.comments-area .comment-reply-title small {
  margin-left: 10px;
  font-size: 12px;
  font-weight: 400;
}
@media (max-width: 600px) {
  .comments-area .comment-list .children {
    margin-left: 4px;
    padding-left: 10px;
  }
  .comments-area .reader-comment-meta { gap: 2px 8px; }
}
.comment-form textarea { width: 100%; }
.comment-form .comment-form-author label,
.comment-form .comment-form-comment label { display: block; margin-bottom: 6px; font-weight: 700; }
.comment-form .comment-form-author input { width: 100%; max-width: 320px; }
.comment-form .required { color: var(--muted); }
.site-footer { background: var(--surface); border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; padding-block: 24px; }
.copyright { margin: 0; font-size: 13px; color: var(--muted); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { clip: auto; width: auto; height: auto; margin: 0; padding: 12px; background: #fff; z-index: 100000; top: 0; left: 0; }
@media (max-width: 800px) {
  .site-body { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 24px 36px; }
  .container { width: calc(100% - 28px); }
  .content-panel, .post-card { padding: 20px; }
  .entry-title { font-size: 24px; }
  .footer-inner { align-items: flex-start; }
}

/* Article components: dialogue, headings, summary lists and tables. */
.entry-content {
  --comment-bg: #f9f9f9;
  --nora-name-bg: #f8e0cc;
  --nora-border: #d3aa8d;
  --nora-name: #784a31;
  --kuro-name-bg: #344967;
  --kuro-border: #9caec6;
  --kuro-name: #fff;
}

/* Only article dialogue divs, not WordPress reader comments. */
.entry-content div.comment.nora,
.entry-content div.comment.kuro {
  position: relative;
  display: block;
  clear: both;
  min-width: 0;
  --speaker-gap: 20px;
  --speaker-offset: calc(var(--speaker-size) + var(--speaker-gap));
  min-height: calc(var(--speaker-size) + 2px);
  padding: 25px;
  margin-block: 0 32px;
  border: 0 solid var(--speaker-border);
  border-radius: 12px;
  background: var(--comment-bg);
  color: var(--text);
  line-height: 1.85;
  overflow-wrap: anywhere;
  text-align: start;
}
.entry-content div.comment.nora {
  --speaker-bg: var(--nora-name-bg);
  --speaker-border: var(--nora-border);
  --speaker-color: var(--nora-name);
  --speaker-size: 96px;
  margin-left: var(--speaker-offset);
  margin-right: 40px;
}
.entry-content div.comment.kuro {
  --speaker-bg: var(--kuro-name-bg);
  --speaker-border: var(--kuro-border);
  --speaker-color: var(--kuro-name);
  --speaker-size: 106px;
  margin-left: 40px;
  margin-right: var(--speaker-offset);
}

/* Character icons: transparent WebP images. */
.entry-content div.comment.nora::before,
.entry-content div.comment.kuro::before {
  position: absolute;
  top: 2px;
  display: block;
  width: var(--speaker-size);
  height: var(--speaker-size);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-color: transparent;
}
.entry-content div.comment.nora::before {
  content: "";
  content: "" / "のら";
  background-image: url("assets/images/nora.webp");
  left: calc(0px - var(--speaker-offset));
}
.entry-content div.comment.kuro::before {
  content: "";
  content: "" / "くろ";
  background-image: url("assets/images/kuro.webp");
  right: calc(0px - var(--speaker-offset));
}
.entry-content div.comment.nora::after,
.entry-content div.comment.kuro::after {
  content: "";
  position: absolute;
  top: 19px;
  width: 10px;
  height: 10px;
  background: var(--comment-bg);
  border: 0 solid var(--speaker-border);
  transform: rotate(45deg);
  pointer-events: none;
}
.entry-content div.comment.nora::after {
  left: -6px;
  border-top: 0;
  border-right: 0;
}
.entry-content div.comment.kuro::after {
  right: -6px;
  border-bottom: 0;
  border-left: 0;
}
.entry-content div.comment.nora > :last-child,
.entry-content div.comment.kuro > :last-child {
  margin-bottom: 0;
}
.entry-content div.comment.nora strong,
.entry-content div.comment.kuro strong {
  font-weight: 700;
  color: inherit;
}

/* Section and subsection headings. */
.entry-content h3,
.entry-content h4 {
  position: relative;
  clear: both;
  background: transparent;
}
.entry-content h3 {
  margin: 64px 0 64px;
  padding: 0 0 0 52px;
  min-height: 40px;
  border-left: 0;
  font-size: 20px;
  line-height: 1.55;
}
.entry-content h4 {
  margin: 48px 0 48px;
  padding: 0 0 9px 1.4em;
  border-bottom: 1px solid var(--border);
  font-size: 17px;
  line-height: 1.6;
}
.entry-content h3::before,
.entry-content h4::before {
  content: "";
  position: absolute;
  display: block;
  pointer-events: none;
}
.entry-content h3::before {
  top: .775em;
  left: 0;
  width: 48px;
  height: 48px;
  background: url("assets/images/heading-bulb.webp") center / contain no-repeat;
  transform: translateY(-50%);
}
.entry-content h4::before {
  top: .8em;
  left: .16em;
  width: .46em;
  height: .46em;
  border-top: 2px solid #7b8795;
  border-right: 2px solid #7b8795;
  transform: translateY(-50%) rotate(45deg);
}

/* Summary lists keep the HTML's native list semantics. */
.entry-content ul.normal,
.entry-content ol.normal {
  clear: both;
  margin: 20px 0 26px;
  padding: 15px 20px 15px 2.4em;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  list-style-position: outside;
}
.entry-content ul.normal { list-style-type: disc; }
.entry-content ol.normal { list-style-type: decimal; }
.entry-content .normal > li { padding-left: 2px; }
.entry-content .normal > li + li { margin-top: 10px; }
.entry-content .normal > li::marker { color: var(--accent); }

/* Wide comparison tables scroll inside their wrapper on narrow screens. */
.entry-content .scroll-box {
  clear: both;
  max-width: 100%;
  margin: 20px 0 26px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.entry-content table.table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.7;
}
.entry-content .scroll-box > table.table { min-width: 540px; }
.entry-content table.table th,
.entry-content table.table td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}
.entry-content table.table th {
  background: #f4f4f4;
  color: #26364c;
  font-weight: 700;
}
.entry-content table.table tr:nth-child(even) td { background: #fafafa:; }

@media (max-width: 600px) {
  .entry-content div.comment.nora,
  .entry-content div.comment.kuro {
    --speaker-gap: 12px;
    border-radius: 10px;
  }
  .entry-content div.comment.nora {
    --speaker-size: 72px;
    margin-right: 4px;
  }
  .entry-content div.comment.kuro {
    --speaker-size: 79px;
    margin-left: 4px;
  }
  .entry-content div.comment.nora::after,
  .entry-content div.comment.kuro::after { top: 15px; }
  .entry-content h3 { font-size: 18px; }
  .entry-content h4 { font-size: 16px; }
  .entry-content ul.normal,
  .entry-content ol.normal { padding: 12px 12px 12px 2em; }
  .entry-content table.table th,
  .entry-content table.table td { padding: 10px; }
}

/* Sidebar navigation: classic and block widgets. */
.site-sidebar .widget {
  border: 0;
  padding: 0;
  margin-bottom: 32px;
}
.site-sidebar .widget-title,
.site-sidebar .widget > h2,
.site-sidebar .widget > .wp-block-heading {
  margin: 0 0 8px;
  padding: 0 0 10px;
  border-bottom: 2px solid var(--border);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}
.site-sidebar :is(.widget_recent_entries, .widget_categories) ul,
.site-sidebar :is(.wp-block-latest-posts, .wp-block-categories) {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-sidebar :is(.widget_recent_entries, .widget_categories) li,
.site-sidebar :is(.wp-block-latest-posts, .wp-block-categories) li {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.65;
}
.site-sidebar :is(.widget_recent_entries, .widget_categories) li > a,
.site-sidebar :is(.wp-block-latest-posts, .wp-block-categories) li > a {
  display: block;
  padding: 11px 8px;
  color: var(--text);
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.site-sidebar :is(.widget_recent_entries, .widget_categories) li > a:hover,
.site-sidebar :is(.wp-block-latest-posts, .wp-block-categories) li > a:hover {
  background: #f6f8fb;
  color: var(--accent);
}
.site-sidebar :is(.widget_recent_entries, .widget_categories) ul ul,
.site-sidebar :is(.wp-block-latest-posts, .wp-block-categories) ul {
  padding-left: 16px;
}
.site-sidebar :is(.widget_recent_entries, .widget_categories) .children > li:last-child,
.site-sidebar .wp-block-categories .children > li:last-child {
  border-bottom: 0;
}
.site-sidebar :is(.post-date, .wp-block-latest-posts__post-date) {
  display: block;
  padding: 0 8px 8px;
  color: var(--muted);
  font-size: 12px;
}

/* Blog home: compact, text-only article list. */
.home-posts .home-posts-title {
  margin: 0;
  padding: 6px 0 18px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.5;
}
.home-post-list {
  border-top: 1px solid var(--border);
}
.home-post-list .home-post-item {
  margin: 0;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.home-post-list .home-post-title {
  margin: 0 0 9px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .015em;
}
.home-post-title a {
  color: var(--text);
  text-decoration: none;
  transition: color .15s ease;
}
.home-post-title a:hover,
.home-post-title a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}
.home-post-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.home-post-meta time {
  font-variant-numeric: tabular-nums;
  letter-spacing: .025em;
  white-space: nowrap;
}
.home-post-categories {
  border-left: 1px solid var(--border);
  padding-left: 14px;
}
.home-post-categories a {
  color: var(--muted);
  text-decoration: none;
}
.home-post-categories a:hover,
.home-post-categories a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}
.home-posts .pagination {
  margin-top: 32px;
}
.home-posts .page-numbers {
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
}
@media (max-width: 600px) {
  .home-posts .home-posts-title { font-size: 19px; padding-bottom: 14px; }
  .home-post-list .home-post-item { padding: 18px 0; }
  .home-post-list .home-post-title { font-size: 17px; margin-bottom: 7px; }
  .home-post-meta { gap: 4px 10px; }
  .home-post-categories { padding-left: 10px; }
}

/* Decorative artwork for H1 headings (not H2 post-list titles). */
.site-main h1 {
  position: relative;
  padding-right: 144px;
  min-height: 128px;
  align-content: center;
}
.site-main h1::before {
  content: "";
  position: absolute;
  display: block;
  pointer-events: none;
  top: 50%;
  right: 0;
  width: 128px;
  height: 128px;
  background: url("assets/images/heading-card.webp") center / contain no-repeat;
  transform: translateY(-50%);
}
@media (max-width: 600px) {
  .site-main h1 { padding-right: 92px; min-height: 80px; }
  .site-main h1::before { width: 80px; height: 80px; }
  .entry-content h3 { padding-left: 44px; min-height: 32px; }
  .entry-content h3::before { width: 48px; height: 48px; left: -10px;}
}
