:root {
  --pfm-primary: #b65a04;
  --pfm-primary-dark: #7a3d05;
  --pfm-primary-soft: #fff4df;
  --pfm-accent: #e9a50d;
  --pfm-accent-dark: #b86f00;
  --pfm-text: #3a302a;
  --pfm-muted: #6e625a;
  --pfm-bg: #fffdf8;
  --pfm-surface: #fff;
  --pfm-border: #e8d8c3;
  --pfm-on-dark: #fffdf8;
  --pfm-on-dark-accent: #ffd77a;
  --pfm-modal-backdrop: rgba(28, 16, 7, .84);
  --pfm-shadow: 0 18px 48px rgba(122, 61, 5, .12);
}

.pfm-page,
.pfm-teaser {
  color: var(--pfm-text);
  font-family: "Zen Kaku Gothic Antique", "Noto Sans JP", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.9;
}

.pfm-page *,
.pfm-teaser * {
  box-sizing: border-box;
}

.pfm-manga-page .page-header,
.pfm-manga-page .entry-title {
  display: none !important;
}

.pfm-manga-page .site-main,
.pfm-manga-page .content-area,
.pfm-manga-page .page-content,
.pfm-manga-page article.page {
  margin: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}

.pfm-page {
  background: var(--pfm-bg);
  margin-left: 0;
  overflow: clip;
  width: 100%;
}

.pfm-shell {
  margin: 0 auto;
  max-width: 1120px;
  padding-left: 24px;
  padding-right: 24px;
  width: 100%;
}

.pfm-site-head {
  background: rgba(255, 253, 248, .96);
  border-bottom: 1px solid var(--pfm-border);
}

.pfm-site-head__inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 96px;
}

.pfm-brand {
  align-items: center;
  color: var(--pfm-primary-dark);
  display: inline-flex;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 18px;
  font-weight: 700;
  gap: 14px;
  text-decoration: none;
}

.pfm-brand img {
  height: auto;
  max-width: 188px;
}

.pfm-site-head__actions {
  align-items: center;
  display: flex;
  gap: 20px;
}

.pfm-phone {
  color: var(--pfm-primary-dark);
  display: grid;
  line-height: 1.2;
  text-align: right;
  text-decoration: none;
}

.pfm-phone small {
  font-size: 12px;
}

.pfm-phone strong {
  font-size: 22px;
}

.pfm-button {
  align-items: center;
  background: var(--pfm-accent);
  border: 2px solid var(--pfm-accent);
  border-radius: 999px;
  color: #fff !important;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  line-height: 1.4;
  min-height: 58px;
  padding: 14px 30px;
  text-align: center;
  text-decoration: none !important;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.pfm-button:hover,
.pfm-button:focus-visible {
  background: var(--pfm-accent-dark);
  border-color: var(--pfm-accent-dark);
  color: #fff;
  transform: translateY(-2px);
}

.pfm-button--small {
  min-height: 48px;
  padding: 10px 24px;
}

.pfm-button--video {
  background: transparent;
  color: var(--pfm-primary-dark) !important;
}

.pfm-button--video:hover,
.pfm-button--video:focus-visible {
  background: var(--pfm-primary-dark);
  border-color: var(--pfm-primary-dark);
  color: var(--pfm-on-dark) !important;
}

.pfm-hero {
  background:
    radial-gradient(circle at 85% 14%, rgba(233, 165, 13, .2), transparent 23rem),
    linear-gradient(135deg, #fffdf8 0%, #fff6e6 100%);
  padding: clamp(64px, 9vw, 112px) 0;
}

.pfm-hero__grid {
  align-items: center;
  display: grid;
  gap: clamp(40px, 7vw, 88px);
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
}

.pfm-breadcrumb {
  align-items: center;
  color: var(--pfm-muted);
  display: flex;
  font-size: 13px;
  gap: 10px;
  margin-bottom: 40px;
}

.pfm-breadcrumb a {
  color: inherit;
}

.pfm-eyebrow {
  color: var(--pfm-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  margin: 0 0 18px;
}

.pfm-hero h1,
.pfm-after h2,
.pfm-school-info h2,
.pfm-teaser h2 {
  color: var(--pfm-primary);
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.35;
  margin: 0;
}

.pfm-hero h1 {
  font-size: clamp(38px, 6vw, 72px);
}

.pfm-lead {
  font-size: clamp(16px, 1.6vw, 19px);
  margin: 30px 0 36px;
  max-width: 650px;
}

.pfm-hero__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.pfm-hero__visual {
  background: #fff;
  border: 10px solid #fff;
  border-radius: 28px;
  box-shadow: var(--pfm-shadow);
  height: min(640px, 72vh);
  overflow: hidden;
  position: relative;
  transform: rotate(2deg);
}

.pfm-hero__visual img {
  height: 100%;
  object-fit: cover;
  object-position: top center;
  width: 100%;
}

.pfm-hero__visual span,
.pfm-teaser__visual > span {
  background: var(--pfm-primary);
  border-radius: 999px;
  bottom: 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 15px;
  position: absolute;
  right: 18px;
}

.pfm-toolbar {
  background: rgba(255, 253, 248, .94);
  border-bottom: 1px solid var(--pfm-border);
  border-top: 1px solid var(--pfm-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

body.admin-bar .pfm-toolbar {
  top: 32px;
}

.pfm-toolbar__inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 66px;
}

.pfm-toolbar__inner strong {
  color: var(--pfm-primary-dark);
  font-family: "Zen Maru Gothic", sans-serif;
}

.pfm-toolbar__inner span {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.pfm-progress {
  background: #f3e8d8;
  height: 4px;
}

.pfm-progress span {
  background: var(--pfm-accent);
  display: block;
  height: 100%;
  transform: scaleX(.0667);
  transform-origin: left center;
  transition: transform .25s ease;
}

.pfm-reader {
  margin: 0 auto;
  max-width: 900px;
  padding: 46px 24px clamp(72px, 9vw, 112px);
}

.pfm-reader__intro {
  color: var(--pfm-muted);
  font-size: 14px;
  margin-bottom: 28px;
  text-align: center;
}

.pfm-comic-page {
  background: #fff;
  border: 1px solid var(--pfm-border);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(70, 45, 20, .08);
  margin: 0 0 34px;
  overflow: hidden;
}

.pfm-comic-page picture,
.pfm-comic-page img {
  display: block;
  height: auto;
  width: 100%;
}

.pfm-comic-page figcaption {
  border-top: 1px solid var(--pfm-border);
  color: var(--pfm-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 10px 16px;
  text-align: right;
}

.pfm-after {
  background: var(--pfm-primary-soft);
  padding: clamp(72px, 10vw, 120px) 0;
}

.pfm-after__card {
  max-width: 900px;
  text-align: center;
}

.pfm-after h2,
.pfm-school-info h2 {
  font-size: clamp(30px, 4vw, 48px);
}

.pfm-after__card > p:not(.pfm-eyebrow) {
  margin: 24px auto 0;
  max-width: 680px;
}

.pfm-after__actions {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 42px;
}

.pfm-text-link {
  color: var(--pfm-primary-dark);
  font-weight: 700;
}

.pfm-school-info {
  background: var(--pfm-primary-dark);
  color: #fff;
  padding: 72px 0;
}

.pfm-school-info__grid {
  align-items: end;
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr 1fr;
}

.pfm-page .pfm-school-info h2,
.pfm-page .pfm-school-info .pfm-eyebrow {
  color: var(--pfm-on-dark);
}

.pfm-school-info p {
  margin: 0 0 12px;
}

.pfm-page .pfm-school-info a {
  color: var(--pfm-on-dark-accent);
  font-size: 24px;
  font-weight: 700;
}

.pfm-page .pfm-school-info a:hover,
.pfm-page .pfm-school-info a:focus-visible {
  color: var(--pfm-on-dark);
}

body.pfm-video-modal-open {
  overflow: hidden;
}

.pfm-video-modal[hidden] {
  display: none !important;
}

.pfm-video-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 100000;
}

.pfm-page .pfm-video-modal__backdrop {
  background: var(--pfm-modal-backdrop);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  inset: 0;
  padding: 0;
  position: absolute;
  width: 100%;
}

.pfm-page .pfm-video-modal__dialog {
  background: var(--pfm-bg);
  border-radius: 22px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .38);
  max-height: calc(100vh - 40px);
  max-width: 430px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.pfm-page .pfm-video-modal__header {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 16px 18px 14px;
}

.pfm-page .pfm-video-modal__header .pfm-eyebrow {
  margin-bottom: 3px;
}

.pfm-page .pfm-video-modal__header h2 {
  color: var(--pfm-text);
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: 20px;
  line-height: 1.35;
  margin: 0;
}

.pfm-page .pfm-video-modal__close {
  align-items: center;
  background: var(--pfm-primary-soft);
  border: 0;
  border-radius: 999px;
  color: var(--pfm-primary-dark);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 42px;
  font-size: 28px;
  height: 42px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 3px;
}

.pfm-page .pfm-video-modal__close:hover,
.pfm-page .pfm-video-modal__close:focus,
.pfm-page .pfm-video-modal__close:focus-visible {
  background: var(--pfm-primary-dark);
  color: var(--pfm-on-dark);
}

.pfm-page .pfm-video-modal__video {
  background: #111;
  display: block;
  max-height: calc(100vh - 126px);
  width: 100%;
}

.pfm-teaser {
  background: linear-gradient(135deg, #fff8e9, #fffdf8);
  padding: clamp(64px, 8vw, 96px) 24px;
}

.pfm-teaser__inner {
  align-items: center;
  display: grid;
  gap: clamp(36px, 6vw, 72px);
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1120px;
}

.pfm-teaser__visual {
  background: #fff;
  border: 8px solid #fff;
  border-radius: 24px;
  box-shadow: var(--pfm-shadow);
  display: block;
  height: 470px;
  overflow: hidden;
  position: relative;
}

.pfm-teaser__visual img {
  height: 100%;
  object-fit: cover;
  object-position: top center;
  width: 100%;
}

.pfm-teaser h2 {
  font-size: clamp(34px, 4.5vw, 54px);
}

.pfm-teaser__copy > p:not(.pfm-eyebrow) {
  margin: 24px 0 32px;
  max-width: 620px;
}

@media (max-width: 767px) {
  .pfm-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .pfm-site-head__inner {
    min-height: 76px;
  }

  .pfm-brand {
    font-size: 13px;
    gap: 8px;
  }

  .pfm-brand img {
    max-width: 118px;
  }

  .pfm-phone {
    display: none;
  }

  .pfm-button--small {
    font-size: 13px;
    min-height: 42px;
    padding: 8px 16px;
  }

  .pfm-hero {
    padding: 52px 0 64px;
  }

  .pfm-hero__grid,
  .pfm-school-info__grid,
  .pfm-teaser__inner {
    grid-template-columns: 1fr;
  }

  .pfm-hero__visual {
    height: 430px;
    margin: 8px 10px 0;
    transform: rotate(1deg);
  }

  .pfm-breadcrumb {
    margin-bottom: 30px;
  }

  .pfm-toolbar__inner {
    min-height: 58px;
  }

  .pfm-toolbar__inner strong {
    font-size: 13px;
  }

  body.admin-bar .pfm-toolbar {
    top: 46px;
  }

  .pfm-reader {
    padding: 32px 10px 72px;
  }

  .pfm-comic-page {
    border-radius: 12px;
    margin-bottom: 22px;
  }

  .pfm-after__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pfm-hero__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pfm-video-modal {
    padding: 10px;
  }

  .pfm-video-modal__dialog {
    border-radius: 16px;
    max-height: calc(100vh - 20px);
    max-width: min(100%, 390px);
  }

  .pfm-video-modal__video {
    max-height: calc(100vh - 104px);
  }

  .pfm-school-info__grid {
    align-items: start;
  }

  .pfm-teaser {
    padding: 64px 18px;
  }

  .pfm-teaser__visual {
    height: 330px;
    margin: 0 10px;
  }

  .pfm-teaser__copy {
    text-align: center;
  }

  .pfm-teaser__copy > p:not(.pfm-eyebrow) {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pfm-button,
  .pfm-progress span {
    transition: none;
  }
}
