/*
Theme Name: Jowaph
Description: Dating and relationship guides for readers in the Philippines.
Version: 2.0.0
Text Domain: jowaph
*/

:root {
  --paper: #fcf8f4;
  --white: #fff;
  --ink: #2c202a;
  --muted: #615560;
  --wine: #85294e;
  --wine-dark: #64203d;
  --pink: #f5e3e9;
  --peach: #f5e3d5;
  --green: #e4ece3;
  --line: #e9dce1;
  --shadow: 0 12px 36px #5226380d;
  --serif: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--wine-dark); text-underline-offset: .2em; }
button, input, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #137497; outline-offset: 4px; }
h1, h2, h3, p { margin: 0 0 .75em; }
h1, h2, h3 { line-height: 1.14; }
h1, h2 { font-family: var(--serif); }
h1 { font-size: clamp(2.4rem, 5.5vw, 5rem); letter-spacing: -.05em; }
h2 { font-size: clamp(1.65rem, 3.3vw, 2.65rem); letter-spacing: -.035em; }
h3 { font-size: 1.2rem; }
ul, ol { padding-inline-start: 1.35em; }
li + li { margin-top: .45em; }
blockquote { margin: 0; }
.wp-caption { max-width: 100%; }

.jw-wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.jw-prose { max-width: 760px; margin-inline: auto; }
.jw-section { margin-block: clamp(36px, 6vw, 78px); }
.jw-section > :last-child, .jw-card > :last-child, .jw-panel > :last-child { margin-bottom: 0; }
.jw-muted { color: var(--muted); }
.jw-skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 20;
  background: white;
  padding: 10px 16px;
}
.jw-skip:focus { top: 12px; }

.jw-header { background: #fffdfb; border-bottom: 1px solid var(--line); }
.jw-head-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.jw-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--wine-dark);
  font: bold 2.12rem/1 var(--serif);
  letter-spacing: -.05em;
  text-decoration: none;
}
.jw-brand img { width: 138px; }
.jw-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.jw-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 650;
}
.jw-nav a:hover, .jw-nav a[aria-current="page"] { background: var(--pink); color: var(--wine-dark); }
.jw-menu { display: none; }
.jw-icon-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--wine-dark);
  background: white;
}
.jw-icon-button svg, .jw-float svg { width: 22px; height: 22px; }

.jw-drawer {
  width: min(390px, 92vw);
  max-width: none;
  height: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
  padding: 24px;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}
.jw-drawer::backdrop { background: #261626a6; }
body.jw-menu-open { overflow: hidden; }
.jw-drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.jw-drawer .jw-nav { display: grid; }
.jw-drawer .jw-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 49px;
  border-radius: 12px;
  font-size: 1rem;
}
.jw-drawer .jw-nav a::after { content: "›"; }

.jw-crumb { padding-top: 22px; font-size: .9rem; color: var(--muted); }
.jw-crumb span { margin-left: 8px; }
.jw-hero {
  display: grid;
  grid-template-columns: 1fr .9fr;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  margin-top: 18px;
  padding: clamp(22px, 4.5vw, 55px);
  border-radius: 30px;
  background: var(--pink);
}
.jw-hero-home { grid-template-columns: 1.06fr .94fr; margin-top: 32px; }
.jw-hero-peach { background: var(--peach); }
.jw-hero-green { background: var(--green); }
.jw-hero p { max-width: 52ch; color: var(--muted); font-size: 1.08rem; }
.jw-topic { display: block; margin-bottom: 12px; color: var(--wine-dark); font-size: .85rem; font-weight: 750; }
.jw-art { margin: 0; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 21px; }
.jw-art img { width: 100%; height: 100%; object-fit: cover; }
.jw-art-empty {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 75% 20%, #fff4dc, transparent 43%), linear-gradient(140deg, #eec9d6, #ad6886);
  color: #fff5f8;
}
.jw-art-empty svg { width: 36%; max-width: 145px; opacity: .85; }
.jw-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.jw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--wine);
  background: var(--wine);
  color: white;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
}
.jw-btn:hover { background: var(--wine-dark); color: white; }
.jw-btn-alt { background: transparent; color: var(--wine-dark); }

.jw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.jw-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jw-card, .jw-panel {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.jw-card { overflow: hidden; }
.jw-card .jw-art { aspect-ratio: 16 / 9; border-radius: 0; }
.jw-card-body, .jw-panel { padding: clamp(18px, 3vw, 28px); }
.jw-card-body p, .jw-panel p { color: var(--muted); }
.jw-card-body a { font-weight: 700; }
.jw-grid > :nth-child(2) .jw-art-empty { background: linear-gradient(145deg, #f1d5c0, #ad735d); }
.jw-grid > :nth-child(3) .jw-art-empty { background: linear-gradient(145deg, #dbeadb, #6b8977); }
.jw-feature {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 28px;
  align-items: center;
  padding: clamp(20px, 4vw, 38px);
  border-radius: 24px;
  background: var(--green);
}
.jw-feature .jw-art { aspect-ratio: 16 / 10; }
.jw-steps { counter-reset: steps; list-style: none; padding: 0; margin: 0; }
.jw-steps li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 13px;
  counter-increment: steps;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.jw-steps li::before {
  content: counter(steps);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pink);
  color: var(--wine-dark);
  font-weight: 750;
}
.jw-steps h3 { margin-bottom: 6px; }
.jw-steps p { margin-bottom: 0; }
.jw-quote { padding: 15px 18px; margin-block: 12px; border-left: 4px solid var(--wine); border-radius: 0 14px 14px 0; background: var(--pink); }
.jw-chat { display: grid; gap: 10px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.jw-chat p { margin: 0; padding: 11px 15px; max-width: 87%; background: var(--pink); border-radius: 15px; }
.jw-chat p:nth-child(even) { justify-self: end; background: var(--green); }
.jw-table { width: 100%; border-collapse: collapse; background: #fff; }
.jw-table th, .jw-table td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.jw-table th { background: var(--pink); }
.jw-faq { border-top: 1px solid var(--line); }
.jw-faq h2 { margin-top: 22px; }
.jw-faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.jw-faq summary { padding-block: 6px; font-weight: 700; }
.jw-faq p { margin: 8px 0 4px; }
.jw-back { margin-block: 30px 50px; }

.jw-form { display: grid; gap: 14px; }
.jw-form label { display: grid; gap: 5px; font-weight: 650; }
.jw-form input, .jw-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bba4b0;
  border-radius: 10px;
  background: white;
  color: var(--ink);
}
.jw-form textarea { min-height: 150px; resize: vertical; }
.jw-form button { justify-self: start; }

.jw-footer { background: #30222d; color: #f9eef4; padding: 48px 0 24px; }
.jw-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.jw-footer .jw-brand, .jw-footer a { color: #fff1f7; }
.jw-footer p { max-width: 34ch; color: #e4d1df; }
.jw-footer ul { margin: 0; padding: 0; list-style: none; }
.jw-footer-bottom { border-top: 1px solid #62515f; margin-top: 28px; padding-top: 16px; color: #e4d1df; }
.jw-float {
  position: fixed;
  z-index: 9;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
}
.jw-float a, .jw-float button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  box-shadow: 0 6px 20px #30222d38;
}
.jw-float a { background: #086f9e; }
.jw-float button { background: var(--wine-dark); }

@media (max-width: 900px) {
  .jw-head-row { flex-wrap: wrap; }
  .jw-header .jw-nav { width: 100%; padding-bottom: 8px; }
  .jw-menu:not([hidden]) { display: grid; }
}
@media (max-width: 680px) {
  .jw-wrap { width: calc(100% - 32px); }
  .jw-head-row { min-height: 64px; }
  .jw-hero, .jw-feature, .jw-grid, .jw-grid-two { grid-template-columns: 1fr; }
  .jw-hero { border-radius: 22px; gap: 16px; }
  .jw-hero-home { margin-top: 16px; }
  .jw-hero .jw-art { aspect-ratio: 16 / 10; }
  .jw-footer-grid { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .jw-footer-grid > :first-child { grid-column: 1 / -1; }
  .jw-footer { padding-right: 38px; padding-bottom: 75px; }
}
/* Jowaph — compact typography and card layout */

.jw-wrap {
  width: min(1120px, calc(100% - 48px));
}

.jw-prose {
  max-width: 720px;
}

.jw-section {
  margin-block: clamp(30px, 5vw, 58px);
}

.jw-section > h2 {
  margin-bottom: 16px;
  font-size: clamp(1.38rem, 2.6vw, 1.9rem);
  line-height: 1.24;
  letter-spacing: -.025em;
}

/* 首屏标题与封面 */

.jw-hero {
  gap: clamp(20px, 4vw, 42px);
  padding: clamp(22px, 4vw, 44px);
  border-radius: 24px;
}

.jw-hero h1 {
  margin-bottom: 14px;
  font-size: clamp(1.95rem, 3.9vw, 3.55rem);
  line-height: 1.09;
  letter-spacing: -.04em;
}

.jw-hero p {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.68;
}

.jw-topic {
  margin-bottom: 9px;
  font-size: .79rem;
}

.jw-hero .jw-art {
  aspect-ratio: 5 / 4;
  border-radius: 16px;
}

.jw-btn {
  min-height: 44px;
  padding: 8px 15px;
  font-size: .85rem;
}

/* 首页导览卡、约会点子卡、双栏内容卡 */

.jw-grid {
  gap: clamp(12px, 2vw, 20px);
  align-items: stretch;
}

.jw-card,
.jw-panel {
  min-width: 0;
  border-radius: 16px;
  border-color: #eadde2;
  box-shadow: 0 5px 18px #5226380a;
}

.jw-card {
  display: flex;
  flex-direction: column;
  padding: 8px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.jw-card > .jw-art {
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
}

.jw-card .jw-art-empty svg {
  width: 21%;
  max-width: 64px;
}

.jw-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 13px 9px 8px;
}

.jw-panel {
  padding: clamp(16px, 2.5vw, 22px);
}

.jw-card h3,
.jw-panel h3 {
  margin: 0 0 7px;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: -.012em;
}

.jw-panel h2 {
  margin: 0 0 9px;
  font-size: clamp(1.13rem, 2vw, 1.35rem);
  line-height: 1.26;
  letter-spacing: -.02em;
}

.jw-card-body p,
.jw-panel p,
.jw-panel li {
  font-size: .92rem;
  line-height: 1.65;
}

.jw-card-body p {
  margin: 0 0 10px;
}

.jw-card-body > :last-child,
.jw-panel > :last-child {
  margin-bottom: 0;
}

.jw-card-body > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  margin-top: auto;
  padding: 8px 0 1px;
  border-top: 1px solid #f0e5e9;
  color: var(--wine-dark);
  font-size: .85rem;
  line-height: 1.35;
  text-decoration: none;
}

.jw-card-body > a:hover {
  text-decoration: underline;
}

.jw-card-body > a span {
  flex: 0 0 auto;
  font-size: 1rem;
}

.jw-card:focus-within {
  border-color: #c68da3;
  box-shadow: 0 9px 25px #52263814;
}

@media (hover: hover) {
  .jw-card:hover {
    border-color: #c68da3;
    box-shadow: 0 9px 25px #52263814;
  }
}

/* 词义专题、对话和内页步骤 */

.jw-feature {
  gap: clamp(16px, 3vw, 30px);
  padding: clamp(16px, 3vw, 30px);
  border-radius: 20px;
}

.jw-feature .jw-art {
  border-radius: 12px;
}

.jw-feature h2 {
  margin-bottom: 8px;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.jw-feature p,
.jw-chat p,
.jw-steps p {
  font-size: .95rem;
}

.jw-steps h3,
.jw-faq summary {
  font-size: 1rem;
}

.jw-steps li {
  padding-block: 14px;
}

.jw-panel .jw-quote {
  margin: 8px 0 12px;
  padding: 10px 13px;
  font-size: .95rem;
  line-height: 1.6;
}

/* 顶部导航、手机抽屉和多栏页脚 */

.jw-head-row {
  min-height: 68px;
}

.jw-brand {
  font-size: 1.9rem;
}

.jw-brand img {
  width: 124px;
}

.jw-nav a {
  font-size: .86rem;
}

.jw-drawer {
  padding: max(20px, env(safe-area-inset-top)) 18px 20px;
}

.jw-drawer-top {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.jw-drawer .jw-nav {
  gap: 3px;
}

.jw-drawer .jw-nav a {
  min-height: 46px;
  padding: 8px 11px;
  font-size: .94rem;
}

.jw-footer {
  padding-top: 34px;
}

.jw-footer .jw-brand {
  margin-bottom: 9px;
}

.jw-footer h3 {
  margin-bottom: 9px;
  font-family: inherit;
  font-size: .95rem;
}

.jw-footer p,
.jw-footer li {
  font-size: .89rem;
  line-height: 1.6;
}

.jw-footer li + li {
  margin-top: .32rem;
}

.jw-footer-bottom {
  margin-top: 22px;
  padding-top: 13px;
}

/* 平板保留两张并排，手机小屏改为单列 */

@media (min-width: 541px) and (max-width: 780px) {
  .jw-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .jw-wrap {
    width: calc(100% - 32px);
  }

  .jw-head-row {
    min-height: 62px;
  }

  .jw-hero {
    padding: 18px;
    border-radius: 19px;
  }

  .jw-hero h1 {
    font-size: clamp(1.8rem, 7vw, 2.45rem);
  }

  .jw-hero .jw-art {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
  }

  .jw-footer-grid {
    gap: 18px 14px;
  }
}

@media (max-width: 540px) {
  .jw-grid,
  .jw-grid-two {
    grid-template-columns: minmax(0, 1fr);
  }

  .jw-card > .jw-art {
    aspect-ratio: 2 / 1;
  }

  .jw-card h3,
  .jw-panel h3 {
    font-size: .96rem;
  }

  .jw-card-body p,
  .jw-panel p {
    font-size: .9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jw-card {
    transition: none;
  }
}
/* Jowaph footer */

.jw-footer-refined {
  padding: 36px 0 20px;
  border-top: 1px solid #714454;
  background: radial-gradient(ellipse at top left, #442837, transparent 62%), #271c25;
  color: #fff4f8;
}

.jw-footer-refined .jw-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(18px, 4vw, 54px);
}

.jw-footer-refined .jw-footer-brand-block {
  min-width: 0;
}

.jw-footer-refined .jw-footer-logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 10px;
  color: #fff1df;
  text-decoration: none;
}

.jw-footer-refined .jw-footer-logo img {
  display: block;
  width: min(168px, 100%);
  height: auto;
  object-fit: contain;
}

.jw-footer-refined .jw-footer-logo span {
  font: 700 1.85rem/1 Georgia, serif;
  letter-spacing: -.035em;
}

.jw-footer-refined .jw-footer-brand-block p {
  max-width: 31ch;
  margin: 0;
  color: #e0ccd7;
  font-size: .875rem;
  line-height: 1.6;
}

.jw-footer-refined .jw-footer-group {
  min-width: 0;
}

.jw-footer-refined .jw-footer-group h2 {
  margin: 0 0 7px;
  color: #f4d2ab;
  font: 700 .9rem/1.4 system-ui, sans-serif;
  letter-spacing: 0;
}

.jw-footer-refined .jw-footer-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.jw-footer-refined .jw-footer-group li {
  margin: 0;
  font-size: .875rem;
  line-height: 1.4;
}

.jw-footer-refined .jw-footer-group a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 3px 0;
  color: #eddae4;
  text-decoration: none;
}

.jw-footer-refined .jw-footer-group a:hover,
.jw-footer-refined .jw-footer-bottom a:hover {
  color: #fff4df;
  text-decoration: underline;
  text-underline-offset: .23em;
}

.jw-footer-refined .jw-footer-telegram span {
  color: #9fdcff;
}

.jw-footer-refined .jw-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 22px;
  padding-top: 13px;
  border-top: 1px solid #6a4c59;
  color: #e0ccd7;
  font-size: .8rem;
}

.jw-footer-refined .jw-footer-bottom small {
  font-size: inherit;
}

.jw-footer-refined .jw-footer-bottom a {
  color: #e0ccd7;
  text-decoration: none;
}

@media (max-width: 680px) {
  .jw-footer-refined {
    padding: 27px 0 calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .jw-footer-refined .jw-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }

  .jw-footer-refined .jw-footer-brand-block {
    grid-column: 1 / -1;
    padding-bottom: 16px;
    border-bottom: 1px solid #6a4c59;
  }

  .jw-footer-refined .jw-footer-logo img {
    width: 142px;
  }

  .jw-footer-refined .jw-footer-bottom {
    margin-top: 16px;
  }
}
/* Jowaph FAQ */

.jw-faq {
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid #ebdce2;
  border-radius: 20px;
  background: #f8eff2;
}

.jw-faq > h2 {
  margin: 0 0 14px;
  color: #452736;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  line-height: 1.25;
  letter-spacing: -.02em;
}

.jw-faq > details {
  margin: 0;
  padding: 0;
  border: 1px solid #ebdee4;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 8px #52263808;
}

.jw-faq > details + details {
  margin-top: 8px;
}

.jw-faq > details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #392832;
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.45;
  list-style: none;
  overflow-wrap: anywhere;
}

.jw-faq > details > summary::-webkit-details-marker {
  display: none;
}

.jw-faq > details > summary::after {
  content: "";
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    linear-gradient(#85294e, #85294e) center / 10px 2px no-repeat,
    linear-gradient(#85294e, #85294e) center / 2px 10px no-repeat,
    #f5e3e9;
}

.jw-faq > details[open] {
  border-color: #d8b6c4;
}

.jw-faq > details[open] > summary {
  border-radius: 12px 12px 0 0;
  background: #fdf5f8;
  color: #64203d;
}

.jw-faq > details[open] > summary::after {
  background:
    linear-gradient(#fff, #fff) center / 10px 2px no-repeat,
    #85294e;
}

.jw-faq > details > p {
  margin: 0;
  padding: 11px 14px 14px;
  border-top: 1px solid #f0e4e9;
  color: #615560;
  font-size: .92rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.jw-faq > details > summary:focus-visible {
  outline: 2px solid #85294e;
  outline-offset: 2px;
}

@media (hover: hover) {
  .jw-faq > details:not([open]) > summary:hover {
    background: #fdf5f8;
  }
}

@media (max-width: 540px) {
  .jw-faq {
    padding: 13px;
    border-radius: 16px;
  }

  .jw-faq > details > summary {
    padding-inline: 11px;
  }

  .jw-faq > details > p {
    padding-inline: 11px;
  }
}
/* Logo inside the mobile menu */
.jw-drawer-top {
  gap: 14px;
}

.jw-drawer-top .jw-drawer-logo {
  min-width: 0;
  max-width: calc(100% - 60px);
  flex-shrink: 1;
}

.jw-drawer-top .jw-drawer-logo img {
  display: block;
  width: 148px;
  max-width: 100%;
  height: auto;
}

.jw-drawer-top > form {
  flex: 0 0 auto;
  margin: 0;
}