/*
Theme Name: fairydoll
Theme URI: https://fairydoll.site/
Author: Codex
Author URI: https://example.com
Description: A simple WordPress theme for illustration gallery sites.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fairydoll
Tags: portfolio, blog, grid-layout, custom-logo, featured-images
*/

:root {
  --ka-bg: #fffafc;
  --ka-surface: #ffffff;
  --ka-ink: #3e3440;
  --ka-muted: #746875;
  --ka-pink: #ff8fb4;
  --ka-pink-soft: #ffd7e5;
  --ka-mint: #a9e7d4;
  --ka-lemon: #ffe79a;
  --ka-lilac: #d9c7ff;
  --ka-line: #f1dce6;
  --ka-shadow: 0 16px 40px rgba(122, 82, 106, 0.13);
  --ka-radius: 8px;
  --ka-width: 1120px;
  --ka-font: "Nunito", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ka-ink);
  background:
    radial-gradient(circle at top left, rgba(255, 215, 229, 0.55), transparent 28rem),
    radial-gradient(circle at 85% 10%, rgba(169, 231, 212, 0.38), transparent 22rem),
    var(--ka-bg);
  font-family: var(--ka-font);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 143, 180, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 143, 180, 0.09) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 72%);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: #de598c;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(241, 220, 230, 0.82);
  background: rgba(255, 250, 252, 0.88);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  width: min(var(--ka-width), calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-branding {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-logo-link img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.site-title {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.site-title a {
  text-decoration: none;
}

.site-description {
  margin: 4px 0 0;
  color: var(--ka-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.main-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ka-muted);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--ka-ink);
  background: #fff;
  box-shadow: 0 8px 18px rgba(255, 143, 180, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ka-line);
  border-radius: 999px;
  color: var(--ka-ink);
  background: #fff;
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

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

.hero {
  padding: clamp(46px, 9vw, 92px) 0 clamp(30px, 7vw, 70px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(300px, 1.06fr);
  align-items: center;
  gap: clamp(28px, 6vw, 70px);
}

.hero__grid--brand {
  grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1.3fr);
}

.eyebrow {
  margin: 0 0 14px;
  color: #d95c91;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.page-title {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.15rem, 5.2vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.hero p {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--ka-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.brand-mark {
  display: inline-block;
  font-size: clamp(3rem, 9vw, 6.8rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
}

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

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #ff75a8;
  box-shadow: 0 12px 24px rgba(255, 117, 168, 0.25);
  font-family: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button--ghost {
  color: var(--ka-ink);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ka-line);
}

.hero-art {
  position: relative;
  min-height: 430px;
}

.hero-art__frame {
  position: absolute;
  overflow: hidden;
  border: 10px solid #fff;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--ka-shadow);
}

.hero-art__frame svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-art__frame--main {
  inset: 18px 8% 24px 10%;
  transform: rotate(-1.8deg);
}

.hero-art__frame--small {
  right: 0;
  bottom: 0;
  width: 42%;
  aspect-ratio: 1 / 1;
  transform: rotate(4deg);
}

.hero-art__frame--tiny {
  top: 0;
  left: 0;
  width: 35%;
  aspect-ratio: 4 / 5;
  transform: rotate(-6deg);
}

.sparkle {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #ff75a8;
  background: #fff;
  box-shadow: 0 14px 30px rgba(122, 82, 106, 0.13);
}

.sparkle svg {
  width: 24px;
  height: 24px;
}

.sparkle--one {
  top: 10%;
  right: 8%;
}

.sparkle--two {
  left: 18%;
  bottom: 4%;
  color: #78cdb7;
}

.recommended-panel {
  align-self: stretch;
  min-height: 0;
  max-height: 320px;
  padding: clamp(16px, 2.5vw, 22px);
  border: 1px solid var(--ka-line);
  border-radius: var(--ka-radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--ka-shadow);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.recommended-panel__heading {
  margin-bottom: 12px;
}

.recommended-panel__heading h2 {
  font-size: clamp(1.5rem, 3vw, 2.45rem);
}

.recommended-list {
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: 226px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #ff9ec2 #fff3f8;
}

.recommended-list::-webkit-scrollbar,
.sidebar-links::-webkit-scrollbar {
  width: 8px;
}

.recommended-list::-webkit-scrollbar-track,
.sidebar-links::-webkit-scrollbar-track {
  background: #fff3f8;
  border-radius: 999px;
}

.recommended-list::-webkit-scrollbar-thumb,
.sidebar-links::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #ff9ec2;
}

.recommended-link {
  min-height: 44px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--ka-line);
  border-radius: var(--ka-radius);
  color: inherit;
  background:
    linear-gradient(135deg, rgba(255, 215, 229, 0.58), transparent 46%),
    #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(122, 82, 106, 0.07);
}

.recommended-link:hover,
.recommended-link:focus-visible {
  color: var(--ka-ink);
  border-color: #ffc0d6;
  transform: translateY(-1px);
}

.recommended-link span {
  color: #d95c91;
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.recommended-link strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.95rem;
  line-height: 1.32;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommended-link--empty {
  color: var(--ka-muted);
}

.section {
  padding: clamp(38px, 7vw, 76px) 0;
}

.section--white {
  background: rgba(255, 255, 255, 0.64);
  border-block: 1px solid rgba(241, 220, 230, 0.72);
}

.section-heading {
  margin-bottom: 26px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--ka-muted);
}

.site-layout {
  padding: clamp(34px, 6vw, 68px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  align-items: start;
  gap: clamp(18px, 3vw, 28px);
}

.site-layout__main {
  min-width: 0;
  display: grid;
  gap: clamp(32px, 5vw, 58px);
}

.site-layout__main .section {
  padding: 0;
}

.site-layout__main .section--white {
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid rgba(241, 220, 230, 0.72);
  border-radius: var(--ka-radius);
  background: rgba(255, 255, 255, 0.64);
}

.site-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
}

.sidebar-widget {
  padding: 17px;
  border: 1px solid var(--ka-line);
  border-radius: var(--ka-radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(122, 82, 106, 0.07);
}

.sidebar-widget h2 {
  margin: 0 0 12px;
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.ad-slot {
  min-height: 240px;
  display: grid;
  place-items: center;
  border: 1px dashed #ffc0d6;
  border-radius: var(--ka-radius);
  color: #d95c91;
  background: #fff5f9;
  font-size: 0.9rem;
  font-weight: 900;
}

.sidebar-links {
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  display: grid;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: #ff9ec2 #fff3f8;
}

.sidebar-link {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--ka-line);
  border-radius: var(--ka-radius);
  color: inherit;
  background: #fff;
  text-decoration: none;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  color: var(--ka-ink);
  border-color: #ffc0d6;
}

.sidebar-link span {
  color: #d95c91;
  font-size: 0.72rem;
  font-weight: 900;
}

.sidebar-link strong {
  font-size: 0.92rem;
  line-height: 1.38;
  letter-spacing: 0;
}

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

.art-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ka-line);
  border-radius: var(--ka-radius);
  background: var(--ka-surface);
  box-shadow: 0 12px 28px rgba(122, 82, 106, 0.08);
}

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

.art-card__image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #fff;
}

.art-card__image img,
.art-card__image svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.art-card:hover .art-card__image img,
.art-card:hover .art-card__image svg {
  transform: scale(1.035);
}

.art-card__body {
  padding: 15px;
}

.art-card__meta {
  margin: 0 0 6px;
  color: #d95c91;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.art-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.art-card__excerpt {
  margin: 9px 0 0;
  color: var(--ka-muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.tag-row,
.post-categories {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row a,
.post-categories a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #705d6a;
  background: #fff5f9;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-pill {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--ka-line);
  border-radius: var(--ka-radius);
  background: #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(122, 82, 106, 0.07);
}

.category-pill strong {
  display: block;
  font-size: 1.05rem;
}

.category-pill span {
  display: block;
  margin-top: 6px;
  color: var(--ka-muted);
  font-size: 0.9rem;
}

.category-pill__dot {
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--ka-pink-soft);
  box-shadow: 18px 0 0 var(--ka-mint), 36px 0 0 var(--ka-lemon);
}

.content-area {
  padding: clamp(34px, 7vw, 74px) 0;
}

.entry {
  max-width: 820px;
  margin: 0 auto;
}

.site-layout .entry {
  margin: 0;
}

.entry-header {
  margin-bottom: 24px;
}

.entry-title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.entry-meta,
.entry-footer {
  margin-top: 12px;
  color: var(--ka-muted);
  font-size: 0.92rem;
}

.entry-featured {
  overflow: hidden;
  margin: 26px 0;
  border: 10px solid #fff;
  border-radius: var(--ka-radius);
  background: #fff;
  box-shadow: var(--ka-shadow);
}

.entry-content {
  font-size: 1.05rem;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 2em;
  line-height: 1.25;
  letter-spacing: 0;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
  margin-block: 1.1em;
}

.entry-content img {
  border-radius: var(--ka-radius);
}

.pagination,
.nav-links {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-numbers,
.nav-links a,
.nav-links span {
  min-width: 38px;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff;
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--ka-line);
}

.page-numbers.current {
  color: #fff;
  background: #ff75a8;
  box-shadow: none;
}

.empty-state,
.not-found {
  max-width: 680px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--ka-line);
  border-radius: var(--ka-radius);
  background: #fff;
  box-shadow: var(--ka-shadow);
}

.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--ka-line);
  color: var(--ka-muted);
  background: #fff;
}

.site-footer__inner {
  width: min(var(--ka-width), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  font-weight: 800;
  text-decoration: none;
}

.preview-note {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  max-width: 260px;
  padding: 10px 12px;
  border: 1px solid var(--ka-line);
  border-radius: 8px;
  color: var(--ka-muted);
  background: #fff;
  box-shadow: 0 12px 30px rgba(122, 82, 106, 0.15);
  font-size: 0.82rem;
}

@media (max-width: 840px) {
  .site-header__inner {
    min-height: 66px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
  }

  .main-navigation {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    padding: 12px;
    border: 1px solid var(--ka-line);
    border-radius: var(--ka-radius);
    background: #fff;
    box-shadow: var(--ka-shadow);
    transform-origin: top;
    transform: scaleY(0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .main-navigation.is-open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .main-navigation ul {
    display: grid;
    gap: 4px;
    justify-content: stretch;
  }

  .main-navigation a {
    justify-content: center;
  }

  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 360px;
  }

  .recommended-panel {
    min-height: auto;
  }

  .site-layout {
    grid-template-columns: 1fr;
  }

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

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

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

@media (max-width: 560px) {
  .site-description {
    display: none;
  }

  .hero {
    padding-top: 34px;
  }

  .hero h1,
  .page-title {
    font-size: clamp(2rem, 9.5vw, 2.6rem);
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .hero-art {
    min-height: 300px;
  }

  .gallery-grid,
  .category-strip {
    grid-template-columns: 1fr;
  }

  .recommended-link {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .recommended-link strong {
    white-space: normal;
  }

  .site-sidebar {
    grid-template-columns: 1fr;
  }

  .art-card__image {
    aspect-ratio: 1 / 1;
  }

  .preview-note {
    position: static;
    max-width: none;
    margin: 20px 16px;
  }
}
