/*
Theme Name: Ponkotsu AI Diary Original
Theme URI: http://adhd.local/
Author: S.Create
Description: ADHDグレーゾーン×AI仕事術メディア「ぽんこつ社長のAI日誌」用オリジナルテーマ。
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: ponkotsu-ai-original
*/

:root {
  --ink: #34424d;
  --heading: #42515c;
  --text: #3f464d;
  --muted: #75808a;
  --line: #e1e8e5;
  --soft: #f3faf7;
  --paper: #ffffff;
  --mint: #65bfa6;
  --mint-dark: #219474;
  --orange: #e89b6a;
  --orange-soft: #fff1e8;
  --cream: #fffaf2;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(39, 49, 61, 0.08);
  --container: 1120px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: inherit;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--mint);
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.global-nav,
.global-nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 700;
}

.global-nav a {
  color: var(--ink);
  text-decoration: none;
}

.global-nav a:hover,
.global-nav a:focus-visible {
  color: var(--mint-dark);
}

.hero {
  padding: 74px 0 54px;
  background:
    radial-gradient(circle at 84% 18%, rgba(101, 191, 166, 0.18), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--soft) 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 54px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--mint-dark);
  font-size: 13px;
  font-weight: 900;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: var(--mint);
}

.hero h1 {
  margin: 18px 0 0;
  color: var(--heading);
  font-size: clamp(40px, 6vw, 70px);
  font-weight: 700;
  line-height: 1.18;
}

.hero-lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
  text-decoration: none;
}

.button-primary,
.wp-block-button__link {
  background: var(--mint-dark);
  color: #fff;
}

.button-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.hero-visual,
.hero-card {
  min-height: 430px;
}

.hero-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-main-visual {
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 0;
  background: var(--cream);
}

.hero-main-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  object-position: center;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 34px 34px auto auto;
  width: 180px;
  height: 180px;
  background: var(--orange-soft);
  border-radius: 50%;
}

.hero-main-visual::before {
  display: none;
}

.hero-president,
.hero-kuraudo {
  position: absolute;
  bottom: 0;
  width: 58%;
  filter: drop-shadow(0 16px 24px rgba(39, 49, 61, 0.14));
}

.hero-president {
  left: -8px;
  z-index: 2;
}

.hero-kuraudo {
  right: -16px;
  z-index: 1;
}

.talk-chip {
  position: absolute;
  right: 22px;
  bottom: 24px;
  z-index: 3;
  width: min(88%, 330px);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(39, 49, 61, 0.1);
  font-size: 13px;
  line-height: 1.75;
}

.talk-chip p {
  margin: 0;
}

.talk-chip p + p {
  margin-top: 6px;
}

.talk-chip b,
.dialogue-box b,
.dialogue-box strong {
  color: var(--mint-dark);
}

.category-bar {
  padding: 20px 0;
  background: #fff;
  border-block: 1px solid var(--line);
}

.category-bar .container,
.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-bar a,
.category-list a {
  min-height: 40px;
  padding: 8px 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.section {
  padding: 64px 0 82px;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading p {
  margin: 0 0 8px;
  color: var(--mint-dark);
  font-size: 13px;
  font-weight: 900;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.35;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 36px;
  align-items: start;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.article-list-area {
  min-width: 0;
}

.post-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(39, 49, 61, 0.05);
}

.post-card-large {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
}

.thumb,
.article-eyecatch {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: end start;
  overflow: hidden;
  min-height: 190px;
  padding: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb span,
.article-eyecatch span {
  position: relative;
  z-index: 1;
  padding: 6px 11px;
  background: rgba(39, 49, 61, 0.72);
  border-radius: 999px;
}

.generated-eyecatch {
  isolation: isolate;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  align-content: space-between;
  align-items: stretch;
  justify-content: space-between;
  justify-items: stretch;
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.10) 1px, transparent 1px),
    linear-gradient(135deg, #263645 0%, #1f7f6a 52%, #f2a05f 100%);
  background-size: 22px 22px, 22px 22px, auto;
}

.generated-eyecatch::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(125deg, transparent 0 46%, rgba(255, 255, 255, 0.22) 46% 48%, transparent 48%),
    linear-gradient(315deg, transparent 0 62%, rgba(39, 49, 61, 0.22) 62% 64%, transparent 64%);
}

.generated-eyecatch-kicker,
.generated-eyecatch-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(39, 49, 61, 0.42);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.generated-eyecatch strong {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 95%;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.38;
  word-break: break-all;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 14px rgba(20, 25, 30, 0.30);
}

.generated-eyecatch-brand {
  justify-self: end;
  background: rgba(255, 255, 255, 0.18);
}

.generated-eyecatch-large {
  min-height: 340px;
  padding: 34px;
}

.generated-eyecatch-large strong {
  max-width: 900px;
  font-size: 34px;
  line-height: 1.45;
}

.generated-eyecatch-v1 {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.10) 1px, transparent 1px),
    linear-gradient(135deg, #2c4656 0%, #d88757 55%, #6fb7a0 100%);
  background-size: 22px 22px, 22px 22px, auto;
}

.generated-eyecatch-v2 {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.10) 1px, transparent 1px),
    linear-gradient(135deg, #34404c 0%, #7b9aa8 48%, #e6b36f 100%);
  background-size: 22px 22px, 22px 22px, auto;
}

.generated-eyecatch-v3 {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.10) 1px, transparent 1px),
    linear-gradient(135deg, #234c43 0%, #5b9a88 46%, #efbf70 100%);
  background-size: 22px 22px, 22px 22px, auto;
}

.generated-eyecatch-v4 {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.10) 1px, transparent 1px),
    linear-gradient(135deg, #39485b 0%, #b96f5c 50%, #78b5ad 100%);
  background-size: 22px 22px, 22px 22px, auto;
}

.generated-eyecatch-v5 {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.10) 1px, transparent 1px),
    linear-gradient(135deg, #2f5367 0%, #5fae97 44%, #d59664 100%);
  background-size: 22px 22px, 22px 22px, auto;
}

.thumb-work {
  background:
    linear-gradient(135deg, rgba(33, 148, 116, 0.86), rgba(39, 49, 61, 0.72)),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.28), transparent 24%),
    #65bfa6;
}

.thumb-orange {
  background: linear-gradient(135deg, #e89b6a, #27313d);
}

.thumb-green {
  background: linear-gradient(135deg, #65bfa6, #219474);
}

.thumb-slate {
  background: linear-gradient(135deg, #8995a1, #27313d);
}

.post-card-body {
  padding: 22px;
}

.post-meta,
.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.category-label,
.post-categories a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  background: #e8f7f2;
  border: 1px solid #d3eee6;
  border-radius: 999px;
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.post-categories {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card h3 {
  margin: 12px 0 0;
  color: var(--heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
}

.post-card-large h3 {
  font-size: 23px;
}

.post-card h3 a {
  color: inherit;
  text-decoration: none;
}

.post-card h3 a:hover {
  color: var(--mint-dark);
}

.post-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.section-more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.sidebar {
  display: grid;
  gap: 20px;
}

.side-card,
.widget {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(39, 49, 61, 0.05);
}

.side-card h2,
.widget-title,
.widget h2,
.widget h3 {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.side-card p,
.widget p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.search-form,
.search-card form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

input[type="search"],
input[type="text"],
input[type="email"],
textarea {
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
}

button[type="submit"],
input[type="submit"],
.search-submit {
  min-height: 42px;
  padding: 8px 14px;
  background: var(--mint-dark);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.profile-card {
  text-align: center;
}

.profile-card img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  object-position: top center;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.side-label {
  color: var(--mint-dark) !important;
  font-size: 12px !important;
  font-weight: 900;
}

.profile-card a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--mint-dark);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.ranking,
.widget ol,
.widget ul {
  display: grid;
  gap: 13px;
  margin: 0;
  padding-left: 1.4em;
}

.ranking li::marker,
.widget li::marker {
  color: var(--mint-dark);
  font-weight: 900;
}

.ranking a,
.tag-cloud a,
.widget a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
  text-decoration: none;
}

.tag-cloud,
.wp-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-cloud a,
.wp-tag-cloud a,
.post-tags a {
  padding: 5px 11px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mint-dark);
  font-size: 12px !important;
  font-weight: 800;
  text-decoration: none;
}

.site-footer {
  padding: 34px 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
}

.footer-inner p {
  margin: 0;
  font-weight: 900;
}

.footer-inner nav,
.footer-inner ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-inner a {
  color: #fff;
  font-size: 13px;
  text-decoration: none;
}

.article-page,
.page-wrap {
  padding: 32px 0 84px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.article-shell,
.page-shell {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.article-header {
  padding: 46px 48px 30px;
}

.article-header h1 {
  margin: 18px 0 0;
  color: var(--heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.38;
}

.article-lead {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 2;
}

.article-eyecatch {
  place-items: center;
  min-height: 340px;
  margin: 0;
  color: #fff;
  font-size: 18px;
}

.article-eyecatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-strip {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 30px 48px 0;
  padding: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.author-strip img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: top center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.author-strip p,
.author-strip strong,
.author-strip span {
  display: block;
  margin: 0;
}

.author-strip p {
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 900;
}

.author-strip strong {
  color: var(--ink);
  font-size: 17px;
}

.author-strip span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.toc-box {
  margin: 30px 48px 0;
  padding: 24px 28px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.toc-box h2,
.related-box h2 {
  margin: 0 0 14px;
  color: var(--heading);
  font-size: 21px;
  line-height: 1.45;
}

.toc-box ol,
.sticky-toc ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.25em;
}

.toc-box a,
.sticky-toc a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.toc-box a:hover,
.sticky-toc a:hover {
  color: var(--mint-dark);
}

.side-related-list {
  display: grid;
  gap: 10px;
}

.side-related-list a {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.side-related-list a:first-child {
  padding-top: 0;
}

.side-related-list a:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.side-related-list span,
.side-related-list strong {
  display: block;
}

.side-related-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.side-related-list strong {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
}

.side-related-list a:hover strong,
.side-related-list a:focus-visible strong {
  color: var(--mint-dark);
}

.article-body,
.page-body {
  padding: 24px 48px 20px;
}

.article-body p,
.page-body p {
  margin: 0 0 1.5em;
}

.article-body h2,
.page-body h2 {
  position: relative;
  margin: 2.4em 0 1em;
  padding-bottom: 0.72em;
  border-bottom: 2px solid var(--line);
  color: var(--heading);
  font-size: clamp(25px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.48;
}

.article-body h2::after,
.page-body h2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 78px;
  height: 2px;
  background: var(--mint);
}

.article-body h3,
.page-body h3 {
  margin: 1.9em 0 0.8em;
  padding-left: 15px;
  border-left: 5px solid var(--mint);
  color: var(--heading);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.55;
}

.article-body ul,
.article-body ol,
.page-body ul,
.page-body ol {
  margin: 1.3em 0 1.8em;
  padding: 22px 24px 22px 2.4em;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.article-body li,
.page-body li {
  margin-bottom: 0.45em;
}

.article-body li::marker,
.page-body li::marker {
  color: var(--mint-dark);
}

.article-body table,
.page-body table {
  width: 100%;
  margin: 1.6em 0 2em;
  border-collapse: collapse;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 14px;
}

.article-body th,
.article-body td,
.page-body th,
.page-body td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-body th,
.page-body th {
  background: var(--soft);
  color: var(--heading);
  font-weight: 850;
}

.profile-hero-image {
  overflow: hidden;
  margin: 0 0 2.4em;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.profile-hero-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1672 / 941;
  object-fit: cover;
  object-position: center;
}

.character-profile {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 1.4em 0 1.7em;
  padding: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.character-profile img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  object-position: top center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.character-profile figcaption,
.character-profile strong,
.character-profile span {
  display: block;
}

.character-profile strong {
  color: var(--heading);
  font-size: 18px;
}

.character-profile span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.dialogue-box,
.note-box,
.prompt-box {
  margin: 2em 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.dialogue-box {
  display: grid;
  gap: 18px;
  background: #f7fbf9;
  border-color: #dce8e4;
}

.dialogue-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.dialogue-right {
  grid-template-columns: minmax(0, 1fr) 68px;
}

.dialogue-right .dialogue-avatar {
  grid-column: 2;
}

.dialogue-right .dialogue-bubble {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
}

.dialogue-avatar {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.dialogue-avatar img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  object-position: top center;
  background: #fff;
  border: 2px solid #e4eee9;
  border-radius: 50%;
}

.dialogue-avatar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
}

.dialogue-bubble {
  position: relative;
  width: fit-content;
  max-width: min(100%, 620px);
  padding: 14px 17px;
  background: #fff;
  border: 1px solid #dce8e4;
  border-radius: 16px;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.75;
  box-shadow: 0 8px 20px rgba(39, 49, 61, 0.05);
}

.dialogue-left .dialogue-bubble {
  border-top-left-radius: 5px;
}

.dialogue-right .dialogue-bubble {
  background: #fff1e8;
  border-color: #f0d7c6;
  border-top-right-radius: 5px;
}

.dialogue-bubble::before,
.dialogue-bubble::after {
  content: "";
  position: absolute;
  top: 18px;
  border-style: solid;
}

.dialogue-left .dialogue-bubble::before {
  left: -9px;
  border-width: 8px 10px 8px 0;
  border-color: transparent #dce8e4 transparent transparent;
}

.dialogue-left .dialogue-bubble::after {
  left: -7px;
  border-width: 7px 9px 7px 0;
  border-color: transparent #fff transparent transparent;
}

.dialogue-right .dialogue-bubble::before {
  right: -9px;
  border-width: 8px 0 8px 10px;
  border-color: transparent transparent transparent #f0d7c6;
}

.dialogue-right .dialogue-bubble::after {
  right: -7px;
  border-width: 7px 0 7px 9px;
  border-color: transparent transparent transparent #fff1e8;
}

.prompt-box {
  background: #f8fbfa;
}

.prompt-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.prompt-box-header span {
  display: inline-flex;
  color: var(--mint-dark);
  font-size: 13px;
  font-weight: 900;
}

.prompt-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.prompt-copy-button:hover,
.prompt-copy-button:focus-visible {
  border-color: #b8dcd2;
  color: var(--mint-dark);
}

.prompt-copy-button.is-copied {
  background: var(--mint-dark);
  border-color: var(--mint-dark);
  color: #fff;
}

.prompt-box pre,
.article-body pre,
.page-body pre {
  overflow-x: auto;
  margin: 0 0 1.5em;
  padding: 20px;
  background: #27313d;
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  line-height: 1.78;
  white-space: pre-wrap;
}

.note-box {
  background: #eaf7f3;
}

.note-box strong {
  color: var(--mint-dark);
}

.related-box,
.post-taxonomy {
  margin: 20px 48px 46px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.related-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(39, 49, 61, 0.05);
}

.related-card .thumb {
  min-height: 132px;
  padding: 14px;
}

.related-card .generated-eyecatch-kicker,
.related-card .generated-eyecatch-brand {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 10px;
}

.related-card .generated-eyecatch strong {
  max-width: 100%;
  font-size: 15px;
  line-height: 1.45;
}

.related-card-body {
  padding: 15px;
}

.related-card h3 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.related-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.related-card h3 a:hover,
.related-card h3 a:focus-visible {
  color: var(--mint-dark);
}

.related-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.related-empty-link {
  display: block;
  min-height: 96px;
  padding: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.sticky-toc {
  position: sticky;
  top: 96px;
}

.cta-side {
  background: var(--ink);
  color: #fff;
}

.cta-side h2,
.cta-side p {
  color: #fff;
}

.cta-side p {
  opacity: 0.78;
}

.cta-setup {
  background: #fff1e8;
  border-color: #f0d7c6;
  color: var(--ink);
}

.cta-setup h2 {
  color: var(--heading);
}

.cta-setup p {
  color: var(--text);
  opacity: 1;
}

.cta-setup .side-label {
  color: #b45c24;
}

.cta-setup .button-primary {
  background: var(--orange);
  color: #fff;
}

.nav-links,
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.nav-links a,
.nav-links span,
.page-numbers {
  padding: 8px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.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;
}

@media (max-width: 980px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .global-nav,
  .global-nav ul {
    gap: 14px;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 2px;
    white-space: nowrap;
  }

  .hero-inner,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 48px;
  }

  .sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sticky-toc {
    position: static;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .hero-visual,
  .hero-card {
    min-height: 360px;
  }

  .hero-main-visual img {
    min-height: 360px;
  }

  .article-grid,
  .post-card-large,
  .related-grid,
  .sidebar {
    grid-template-columns: 1fr;
  }

  .post-card-large h3 {
    font-size: 20px;
  }

  .article-header,
  .article-body,
  .page-body {
    padding-inline: 22px;
  }

  .author-strip,
  .toc-box,
  .related-box,
  .post-taxonomy {
    margin-inline: 22px;
  }

  .article-eyecatch {
    min-height: 230px;
  }

  .generated-eyecatch {
    gap: 14px;
    padding: 18px;
  }

  .generated-eyecatch strong {
    width: min(100%, calc(100vw - 72px));
    max-width: 100%;
    font-size: 19px;
    line-height: 1.45;
    white-space: normal;
  }

  .generated-eyecatch-large {
    width: 100%;
    max-width: calc(100vw - 32px);
    min-height: 250px;
    padding: 22px;
  }

  .generated-eyecatch-large strong {
    width: min(100%, calc(100vw - 76px));
    font-size: 25px;
    line-height: 1.42;
  }

  .profile-hero-image img {
    aspect-ratio: 4 / 3;
    object-position: center top;
  }

  .author-strip {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author-strip img {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .hero-actions,
  .footer-inner,
  .footer-inner nav,
  .footer-inner ul {
    flex-direction: column;
  }

  .button,
  .wp-block-button__link {
    width: 100%;
  }

  .hero-card::before {
    width: 130px;
    height: 130px;
  }

  .talk-chip {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
  }

  .character-profile {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .character-profile img {
    margin: 0 auto;
  }

  .dialogue-box {
    padding: 16px;
  }

  .dialogue-row,
  .dialogue-right {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 9px;
  }

  .dialogue-right .dialogue-avatar {
    grid-column: 1;
  }

  .dialogue-right .dialogue-bubble {
    grid-column: 2;
    justify-self: start;
  }

  .dialogue-avatar img {
    width: 46px;
    height: 46px;
  }

  .dialogue-avatar span {
    font-size: 10px;
  }

  .dialogue-bubble {
    max-width: 100%;
    padding: 12px 14px;
    font-size: 14px;
  }

  .dialogue-right .dialogue-bubble {
    border-top-left-radius: 5px;
    border-top-right-radius: 16px;
  }

  .dialogue-right .dialogue-bubble::before {
    left: -9px;
    right: auto;
    border-width: 8px 10px 8px 0;
    border-color: transparent #f0d7c6 transparent transparent;
  }

  .dialogue-right .dialogue-bubble::after {
    left: -7px;
    right: auto;
    border-width: 7px 9px 7px 0;
    border-color: transparent #fff1e8 transparent transparent;
  }
}
