/*
Theme Name: Mokae Lite
Theme URI: https://mokae.com
Author: Mokae
Description: A lightweight pastel editorial blog theme with a playful anime-inspired edge.
Version: 0.2.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: mokae-lite
*/

:root {
  --canvas: #fff8fb;
  --canvas-deep: #f5eaf5;
  --surface: #fffefd;
  --surface-tint: #f9f2ff;
  --ink: #29243d;
  --muted: #766f84;
  --line: #eadfeb;
  --plum: #6b4e8c;
  --plum-deep: #46335e;
  --pink: #e986ad;
  --peach: #f4a783;
  --mint: #b9ddd2;
  --yellow: #ffe5a1;
  --white: #ffffff;
  --shadow: 0 14px 34px rgba(70, 51, 94, .09);
  --shadow-hover: 0 20px 42px rgba(70, 51, 94, .15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--plum); }
button, input, textarea { font: inherit; }
img { max-width: 100%; height: auto; }
.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 {
  z-index: 100000;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  margin: 0;
  overflow: visible;
  clip: auto;
  background: var(--plum-deep);
  color: var(--white);
  border-radius: 8px;
}
:focus-visible { outline: 3px solid rgba(233, 134, 173, .55); outline-offset: 3px; }

.site-shell { width: min(1180px, calc(100% - 44px)); margin: 0 auto; }
.site-header { padding: 22px 0 0; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo-image { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px 12px 12px 4px; object-fit: cover; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 2px solid var(--plum-deep);
  border-radius: 14px 14px 14px 4px;
  background: var(--yellow);
  color: var(--plum-deep);
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--pink);
}
.brand-copy { display: grid; gap: 1px; line-height: 1.2; }
.brand-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Georgia, "Songti SC", serif; font-size: 1.24rem; }
.brand-copy small { color: var(--muted); font-size: .67rem; letter-spacing: .1em; text-transform: uppercase; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 20px; padding: 0; margin: 0; list-style: none; font-size: .86rem; }
.site-nav a { display: block; padding: 7px 0; color: var(--muted); }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--plum); }
.site-nav .current-menu-item > a, .site-nav .current_page_item > a { font-weight: 700; }
.header-search {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--plum);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.header-search:hover { border-color: var(--pink); color: var(--plum); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(70, 51, 94, .1); }
.header-search svg { width: 16px; height: 16px; }

.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 54px; padding: 58px 0 94px; }
.eyebrow { margin: 0 0 11px; color: var(--pink); font-size: .71rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.page-title, .hero-title { margin: 0; font-family: Georgia, "Songti SC", serif; font-weight: 700; line-height: 1.13; letter-spacing: -.02em; }
.page-title { font-size: clamp(2.1rem, 4vw, 4.2rem); }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(230px, .9fr); gap: 38px; align-items: end; padding-bottom: 50px; border-bottom: 1px solid var(--line); }
.hero-title { max-width: 720px; font-size: clamp(2.8rem, 6vw, 5.8rem); }
.hero-copy { max-width: 620px; margin: 17px 0 0; color: var(--muted); font-size: 1rem; }
.hero-note { position: relative; padding: 27px 26px 25px; background: var(--plum); color: var(--white); box-shadow: 8px 8px 0 var(--mint), var(--shadow); transform: rotate(1.1deg); }
.hero-note::before { content: ""; position: absolute; top: -8px; right: 22px; width: 28px; height: 13px; border: 1px solid rgba(70, 51, 94, .14); background: var(--pink); transform: rotate(4deg); }
.hero-note p { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 1.35rem; line-height: 1.42; }
.hero-note small { display: block; margin-top: 18px; color: #e9dff2; font-size: .72rem; letter-spacing: .04em; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 42px 0 18px; }
.section-heading h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 1.65rem; }
.section-heading a { color: var(--plum); font-size: .8rem; font-weight: 700; }
.section-heading a:hover { color: var(--pink); }
.post-list { display: grid; gap: 17px; }
.post-list-spaced { margin-top: 28px; }
.post-card {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 24px;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:not(.has-post-thumbnail) { grid-template-columns: minmax(0, 1fr); }
.post-card:not(.has-post-thumbnail) .post-thumb { display: none; }
.post-card:hover { border-color: #dec8e5; transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.post-thumb { min-height: 142px; overflow: hidden; border-radius: 8px; background: var(--canvas-deep); }
.post-thumb img { display: block; width: 100%; height: 100%; min-height: 142px; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-thumb img { transform: scale(1.035); }
.post-card-body { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.post-categories { color: var(--pink); font-size: .73rem; font-weight: 800; }
.post-categories a:hover { color: var(--plum); }
.post-card h3 { margin: 5px 0 7px; font-family: Georgia, "Songti SC", serif; font-size: 1.45rem; line-height: 1.28; }
.post-card h3 a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color .2s ease; }
.post-card h3 a:hover { color: var(--ink); text-decoration-color: var(--pink); }
.post-meta { color: var(--muted); font-size: .76rem; }
.post-excerpt { margin: 7px 0 0; color: var(--muted); font-size: .88rem; }
.post-card-arrow { display: inline-block; margin-top: 10px; color: var(--plum); font-size: .82rem; font-weight: 700; }

.sidebar { display: grid; align-content: start; gap: 18px; }
.sidebar-block { padding: 23px; background: var(--surface-tint); border: 1px solid var(--line); border-radius: 12px; }
.sidebar-block:first-child { background: var(--surface); border-top: 4px solid var(--mint); }
.sidebar-block h2 { margin: 0 0 12px; font-family: Georgia, "Songti SC", serif; font-size: 1.18rem; }
.sidebar-block p { margin: 0; color: var(--muted); font-size: .87rem; }
.sidebar ul { padding: 0; margin: 0; list-style: none; }
.sidebar li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.sidebar li:last-child { border-bottom: 0; padding-bottom: 0; }
.sidebar li a { display: block; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud a { padding: 4px 9px; border: 1px solid #ddcde5; border-radius: 999px; color: var(--muted); font-size: .75rem !important; line-height: 1.3; }
.tag-cloud a:hover { border-color: var(--pink); color: var(--plum); background: var(--surface); }

.pagination { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 27px; }
.pagination .page-numbers { min-width: 36px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: .8rem; text-align: center; }
.pagination .page-numbers:hover { border-color: var(--pink); color: var(--plum); }
.pagination .current { background: var(--plum); border-color: var(--plum); color: var(--white); }
.single-header { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.single-header .page-title { max-width: 860px; }
.single-header .post-meta { margin-top: 13px; }
.single-featured-wrap { max-width: 900px; margin: 28px 0 0; }
.single-featured { display: block; width: 100%; max-height: 520px; border-radius: 12px; object-fit: cover; }
.single-content { padding-top: 34px; font-family: Georgia, "Songti SC", serif; font-size: 1.08rem; }
.single-content > * { max-width: 760px; }
.single-content h2, .single-content h3 { color: var(--plum-deep); line-height: 1.3; }
.single-content h2 { margin-top: 2em; }
.single-content a { color: var(--plum); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.single-content a:hover { color: var(--pink); }
.single-content blockquote { margin: 28px 0; padding: 8px 22px; border-left: 4px solid var(--pink); color: var(--muted); }
.single-content pre { overflow: auto; padding: 19px; border-radius: 8px; background: var(--plum-deep); color: #f5edf9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.single-content code { padding: .12em .28em; border-radius: 4px; background: var(--canvas-deep); font-size: .88em; }
.single-content pre code { padding: 0; background: none; font-size: inherit; }
.single-content table { display: block; width: 100% !important; max-width: 100%; overflow-x: auto; table-layout: fixed; }
.single-content th, .single-content td { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.single-content p, .single-content li, .single-content a { overflow-wrap: anywhere; }
.single-content figure { margin: 28px 0; }
.single-content figcaption { color: var(--muted); font-family: sans-serif; font-size: .76rem; text-align: center; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; padding-top: 23px; border-top: 1px solid var(--line); }
.post-nav a { display: block; height: 100%; padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.post-nav a:hover { border-color: var(--pink); color: var(--ink); box-shadow: var(--shadow); }
.post-nav small { display: block; margin-bottom: 3px; color: var(--muted); font-size: .73rem; }
.comments-area { max-width: 760px; margin-top: 56px; padding-top: 27px; border-top: 1px solid var(--line); }
.comments-title { margin-top: 0; font-family: Georgia, "Songti SC", serif; }
.comment-list { padding: 0; list-style: none; }
.comment { padding: 17px 0; border-bottom: 1px solid var(--line); }
.comment-meta { color: var(--muted); font-size: .77rem; }
.comment-content { font-size: .91rem; }
.comment-form input, .comment-form textarea, .search-form input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); }
.comment-form input:focus, .comment-form textarea:focus, .search-form input:focus { border-color: var(--pink); outline: 2px solid rgba(233, 134, 173, .2); }
.comment-form .comment-form-author, .comment-form .comment-form-email { display: inline-block; width: calc(50% - 8px); }
.comment-form .comment-form-email { margin-left: 12px; }
.comment-form label { display: block; margin-bottom: 5px; color: var(--muted); font-size: .79rem; }
.comment-form .submit, .search-submit { margin-top: 14px; padding: 10px 17px; border: 0; border-radius: 7px; background: var(--plum); color: var(--white); cursor: pointer; font: inherit; font-size: .85rem; font-weight: 700; transition: background .2s ease, transform .2s ease; }
.comment-form .submit:hover, .search-submit:hover { background: var(--plum-deep); transform: translateY(-1px); }
.footer { padding: 29px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.not-found { padding: 70px 0 110px; }
.not-found .hero-copy a { color: var(--plum); font-weight: 700; }

@media (max-width: 850px) {
  .main-grid, .hero { grid-template-columns: 1fr; gap: 31px; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-note { max-width: 500px; }
  .header-inner { align-items: flex-start; }
  .site-nav ul { gap: 6px 15px; }
}
@media (max-width: 600px) {
  .site-shell { width: min(100% - 28px, 1180px); }
  .site-header { padding-top: 15px; }
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
  .site-nav { grid-column: 1 / -1; margin: 0; padding-top: 10px; border-top: 1px dashed var(--line); }
  .site-nav ul { justify-content: flex-start; gap: 3px 16px; }
  .header-search { grid-column: 2; grid-row: 1; }
  .main-grid { padding: 36px 0 72px; }
  .hero { padding-bottom: 38px; }
  .hero-note { transform: none; box-shadow: 5px 5px 0 var(--mint), var(--shadow); }
  .post-card { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
  .post-thumb, .post-thumb img { min-height: 180px; }
  .sidebar { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .comment-form .comment-form-author, .comment-form .comment-form-email { display: block; width: 100%; margin: 0 0 12px; }
  .footer-inner { display: block; }
  .footer-inner span { display: block; }
  .footer-inner span + span { margin-top: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
