/* Grownup Hanja Library v0.5: self-contained frontend design. */
.gwhl-dictionary,
.gwhl-dictionary * { box-sizing: border-box; }
.gwhl-dictionary {
  --gwhl-ink: #253b3b;
  --gwhl-muted: #627576;
  --gwhl-line: #e4e9e6;
  --gwhl-soft: #f4f7f5;
  --gwhl-accent: #24675f;
  --gwhl-cream: #fbf8f1;
  max-width: 1160px;
  margin: 0 auto 3rem;
  color: var(--gwhl-ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans KR', 'Malgun Gothic', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
.gwhl-dictionary a { color: var(--gwhl-accent); text-decoration: none; }
.gwhl-dictionary a:hover { text-decoration: underline; }
.gwhl-dictionary a:focus-visible,
.gwhl-dictionary input:focus-visible,
.gwhl-dictionary select:focus-visible,
.gwhl-dictionary button:focus-visible { outline: 3px solid #7cbbb1; outline-offset: 3px; }
.gwhl-hero {
  margin-bottom: 1.4rem;
  padding: clamp(1.6rem, 3.5vw, 3rem);
  border-radius: 18px;
  background: linear-gradient(125deg, #f9f6ee, #f1f7f2);
  border: 1px solid #eeeae0;
}
.gwhl-eyebrow {
  display: inline-block;
  color: #40736b;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: .65rem;
}
.gwhl-dictionary .gwhl-hero h2 {
  margin: 0 0 .65rem;
  padding: 0;
  border: 0;
  color: #23423b;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.35;
}
.gwhl-hero p { margin: 0; color: #526863; font-size: .98rem; }
.gwhl-search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.3rem;
  margin: 0 0 1.6rem;
  background: white;
  border: 1px solid var(--gwhl-line);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(25,50,48,.025);
}
.gwhl-search,
.gwhl-filter { display:flex; flex-direction:column; gap:.32rem; min-width:0; }
.gwhl-search>span,
.gwhl-filter>span { font-size:.8rem; font-weight:700; color:#506764; }
.gwhl-dictionary input[type='search'],
.gwhl-dictionary select {
  display:block;
  width:100%; min-width:0; height:46px;
  padding: 0 .8rem;
  border:1px solid #d8e3dc;
  border-radius:9px;
  color:var(--gwhl-ink);
  background:#fff;
  font:inherit;
  font-size:.93rem;
  box-shadow:none;
}
.gwhl-dictionary input[type='search'] { height:50px; font-size:1rem; }
.gwhl-filter-grid { display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap:.75rem; }
.gwhl-actions { display:flex; flex-wrap:wrap; align-items:center; gap:1rem; }
.gwhl-dictionary .gwhl-button {
  display:inline-flex; justify-content:center; align-items:center;
  min-height:44px;
  padding:.55rem 1.35rem;
  border:1px solid var(--gwhl-accent);
  border-radius:9px;
  font:inherit;
  font-size:.91rem; font-weight:700;
  color:white; background:var(--gwhl-accent);
  cursor:pointer;
}
.gwhl-dictionary .gwhl-button:hover { color:white; background:#154a42; text-decoration:none; }
.gwhl-reset { padding: .35rem .25rem; font-size:.89rem; font-weight:650; }
.gwhl-results-bar {
  display:flex; align-items:baseline; justify-content:space-between;
  gap:1rem; margin:1.5rem 0 .85rem;
  font-size:.93rem;
}
.gwhl-results-bar>span { color:var(--gwhl-muted); font-size:.86rem; }
.gwhl-grid { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:1rem; }
.gwhl-card {
  min-width:0;
  display:flex;
  flex-direction:column;
  padding: 1.45rem;
  border:1px solid var(--gwhl-line);
  border-radius:14px;
  background:#fff;
  box-shadow:0 4px 15px rgba(15,32,27,.025);
  transition:border-color .18s ease, transform .18s ease;
}
.gwhl-card:hover { border-color:#b2c9c1; transform:translateY(-2px); }
.gwhl-card-top { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.5rem; }
.gwhl-hanja {
  font-family:'Noto Serif CJK KR', 'Noto Serif KR','Source Han Serif K', 'Batang', 'SimSun',serif;
  font-size: clamp(1.45rem, 2.3vw, 2.05rem);
  font-weight:650;
  letter-spacing:.06em;
  line-height:1.5;
  color:#224d46;
  overflow-wrap:anywhere;
}
.gwhl-preview-chip, .gwhl-preview-tag {
  color:#8a5d1f;
  background:#fff3dc;
  font-size:.75rem;
  padding:.2rem .55rem;
  border-radius:6px;
}
.gwhl-dictionary .gwhl-card-title {
  margin:.5rem 0 .6rem;
  font-size:1.18rem; font-weight:800;
  letter-spacing:-.02em;
}
.gwhl-card-title a { color:var(--gwhl-ink); }
.gwhl-card-desc { color:#516361; font-size:.92rem; line-height:1.75; margin:0 0 1.1rem; flex:1; }
.gwhl-tags { display:flex; flex-wrap:wrap; gap:.35rem; margin-bottom:.85rem; }
.gwhl-tags>span { display:inline-flex; padding:.16rem .55rem; border:1px solid #e1ece7; border-radius:6px; color:#51736b; background:#f7faf8; font-size:.76rem; }
.gwhl-readmore { align-self:flex-start; font-size:.86rem; font-weight:700; }
.gwhl-empty { border:1px dashed #cddbd3; border-radius:12px; text-align:center; padding:3rem 1rem; background:#fafcfb; }
.gwhl-empty strong { font-size:1.05rem; }
.gwhl-empty p { margin:.5rem 0 0; color:var(--gwhl-muted); font-size:.9rem; }
.gwhl-pagination { margin:2rem 0; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:.45rem; }
.gwhl-pagination a, .gwhl-pagination span { display:inline-flex; justify-content:center; align-items:center; min-width:38px; min-height:38px; padding:.25rem .6rem; border:1px solid #dde6e1; border-radius:8px; font-size:.9rem; }
.gwhl-pagination .is-current { background:var(--gwhl-accent); border-color:var(--gwhl-accent); color:#fff; }
.gwhl-private-preview { padding:.85rem 1rem; background:#fff7e8; border-left:4px solid #dba45a; color:#734c23; border-radius:5px; font-size:.9rem; }
.gwhl-breadcrumb { display:flex; flex-wrap:wrap; gap:.5rem; margin:1.15rem 0 1.1rem; font-size:.88rem; color:var(--gwhl-muted); }
.gwhl-detail { border:1px solid var(--gwhl-line); border-radius:18px; background:#fff; overflow:hidden; }
.gwhl-detail-header { padding:clamp(1.5rem,4vw,3rem); background:var(--gwhl-cream); border-bottom:1px solid #ebe8e0; }
.gwhl-hanja-large { font-size:clamp(2.25rem,5vw,3.5rem); font-weight:650; margin:0 0 .25rem; }
.gwhl-detail .gwhl-detail-header h2 { margin:.25rem 0 .6rem; color:var(--gwhl-ink); font-size:clamp(1.45rem,2.8vw,2.1rem); font-weight:800; }
.gwhl-lead { margin:0 0 1.3rem; color:#425752; font-size:1.07rem; line-height:1.85; }
.gwhl-prose { padding:1.6rem clamp(1.4rem,4vw,3rem); border-bottom:1px solid #edf0ed; }
.gwhl-detail h3 { margin:0 0 .85rem; color:#274b43; font-size:1.15rem; font-weight:800; }
.gwhl-prose>p { margin:0; line-height:1.95; }
.gwhl-source-list { list-style:none; margin:0; padding:0; }
.gwhl-source { padding:1rem 0; border-bottom:1px solid var(--gwhl-line); }
.gwhl-source:last-child { border-bottom:0; }
.gwhl-source-title { font-weight:750; }
.gwhl-source-caption { margin-top:.15rem; color:var(--gwhl-muted); font-size:.82rem; }
.gwhl-source blockquote { margin:.65rem 0; padding:.6rem 1rem; color:#485a56; background:#f7f9f7; border-left:3px solid #c6d7ce; font-size:.94rem; }
.gwhl-source a { display:inline-block; margin-top:.4rem; font-size:.87rem; font-weight:650; }
.gwhl-resources,.gwhl-related { padding:1.6rem clamp(1.4rem,4vw,3rem); border-bottom:1px solid var(--gwhl-line); }
.gwhl-resource-grid { display:flex; flex-wrap:wrap; gap:.65rem; }
.gwhl-resource-link { display:inline-block; padding:.55rem .8rem; border:1px solid #cbded3; border-radius:8px; font-size:.9rem; font-weight:650; }
.gwhl-related ul { display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap:.65rem; list-style:none; margin:0; padding:0; }
.gwhl-related li a { display:flex; flex-direction:column; gap:.25rem; min-height:80px; padding:.75rem; border:1px solid var(--gwhl-line); border-radius:8px; }
.gwhl-related li span { font-family:'Noto Serif CJK KR','Batang',serif; font-size:1.08rem; }
.gwhl-related li strong { font-size:.87rem; }
.gwhl-back { padding:0 clamp(1.4rem,4vw,3rem) 1.5rem; margin:1.35rem 0 0; font-size:.92rem; font-weight:700; }
.gwhl-muted { color:var(--gwhl-muted); }
@media (max-width:900px) {
  .gwhl-filter-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .gwhl-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gwhl-related ul { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:620px) {
  .gwhl-search-form { padding:1rem; }
  .gwhl-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gwhl-grid { grid-template-columns:1fr; gap:.75rem; }
  .gwhl-card { padding:1.15rem; }
  .gwhl-hero { border-radius:12px; }
  .gwhl-related ul { grid-template-columns:1fr; }
  .gwhl-detail { border-radius:12px; }
  .gwhl-dictionary input[type='search'],.gwhl-dictionary select { font-size:16px; }
}
@media (prefers-reduced-motion:reduce) {
  .gwhl-card { transition:none; }
  .gwhl-card:hover { transform:none; }
}

/* v0.6: the WP Page title is the sole page heading. */
.gwhl-intro {
  margin: 0 0 1.35rem;
  padding: .95rem 1.35rem;
  border: 1px solid #e7ece7;
  border-radius: 12px;
  background: linear-gradient(120deg, #faf9f5, #f7faf7);
}
.gwhl-intro .gwhl-eyebrow { margin: 0 0 .2rem; }
.gwhl-intro p { margin: 0; color: #526863; font-size: .93rem; }
.gwhl-detail-header { padding: clamp(1.15rem, 2.8vw, 2rem); }
.gwhl-hanja-large { font-size: clamp(2.1rem, 4.2vw, 3.1rem); }
.gwhl-detail .gwhl-detail-header h2 { margin: .1rem 0 .55rem; }
.gwhl-lead { margin-bottom: .8rem; }
.gwhl-breadcrumb { margin: .15rem 0 .8rem; }
@media (max-width:620px) {
  .gwhl-intro { padding: .85rem 1rem; }
  .gwhl-detail-header { padding: 1.2rem; }
}


/* v0.8: optional narrative and a gentle reflection prompt. */
.gwhl-story { background: #fffefa; }
.gwhl-story h4 { margin: 0 0 1rem; color: #294d46; font-size: 1.06rem; font-weight: 750; }
.gwhl-story .gwhl-story-paragraph { margin: 0 0 1.05rem; line-height: 1.95; word-break: keep-all; overflow-wrap: break-word; }
.gwhl-story .gwhl-story-paragraph:last-of-type { margin-bottom: 0; }
.gwhl-story .gwhl-story-source { margin-top: 1.4rem; padding-top: .8rem; border-top: 1px dashed #dbe5db; color: #66736b; font-size: .84rem; line-height: 1.8; }
.gwhl-story-source strong { margin-right: .4rem; color: #3b645b; }
.gwhl-story .gwhl-story-question { margin-top: 1.35rem; padding: 1rem 1.2rem; background: #f4f8f5; border-left: 3px solid #89b2a1; border-radius: 0 9px 9px 0; }
.gwhl-story .gwhl-story-question h4 { font-size: .98rem; margin: 0 0 .35rem; }
.gwhl-story .gwhl-story-question p { margin: 0; line-height: 1.75; }
.gwhl-story .gwhl-story-private { margin: 0 0 .85rem; padding: .3rem .6rem; color: #865619; background: #fff1d9; border-radius: 5px; font-size: .8rem; }
@media (max-width:620px) {
  .gwhl-story .gwhl-story-question { padding: .85rem .9rem; }
}


/* v0.8.1: independent optional lesson placed between narrative and reflection. */
.gwhl-dictionary .gwhl-lesson { background: #f3f8f4; border-left: 4px solid #83a995; }
.gwhl-dictionary .gwhl-lesson h3 { color: #225e4f; margin-bottom: .85rem; }
.gwhl-dictionary .gwhl-lesson p { margin: 0 0 .75rem; line-height: 1.85; overflow-wrap: break-word; word-break: keep-all; }
.gwhl-dictionary .gwhl-lesson p:last-child { margin-bottom: 0; }
.gwhl-dictionary .gwhl-lesson .gwhl-story-private,
.gwhl-dictionary .gwhl-story-reflection .gwhl-story-private { background: #fff1d9; color: #865619; padding: .35rem .6rem; border-radius: 5px; font-size: .82rem; }
.gwhl-dictionary .gwhl-story-reflection { background: #fbfcf9; border-left: 3px solid #b4c7ba; }
.gwhl-dictionary .gwhl-story-reflection p { margin-bottom: 0; line-height: 1.85; }
