/* 복음볼거리 2026-08 UI refresh */

.site-header,
.reader-topbar {
  transition: transform 180ms ease, box-shadow 180ms ease;
  will-change: transform;
}

.mobile-menu-toggle,
.ui-mobile-menu-link {
  display: none;
}

.episode-thumb::after,
.episode-thumb span {
  display: none;
}

.footer-community a {
  color: #2d2a20;
  background: #fff2a6;
  border-color: #eadb79;
  box-shadow: none;
}

.footer-community a:hover {
  background: #fff6bf;
  box-shadow: 0 4px 12px #0000001f;
}

.home-notice-line {
  border-top: 2px solid var(--navy);
  border-bottom: 1px solid var(--line);
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin-top: 28px;
  padding: 17px 4px;
  display: grid;
}

.home-notice-line > span {
  color: var(--navy);
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 950;
}

.home-notice-line p {
  color: #526273;
  word-break: keep-all;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.65;
}

.webtoon-library-new {
  z-index: 3;
  color: var(--navy-deep);
  letter-spacing: 0.04em;
  background: #ffe36d;
  border: 1px solid #ffffffb8;
  border-radius: 999px;
  padding: 6px 10px 5px;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  position: absolute;
  top: 13px;
  left: 13px;
  box-shadow: 0 4px 12px #0d2f4f2b;
}

.episode-row.is-read {
  color: #7d8791;
  background: #f5f6f7;
}

.episode-row.is-read .episode-thumb img {
  filter: grayscale(1);
  opacity: 0.58;
}

.episode-row.is-read .episode-info strong,
.episode-row.is-read .episode-info p,
.episode-row.is-read .read-label {
  color: #89929b;
}

.episode-row.is-last-read {
  background: #eef6ff;
  box-shadow: inset 3px 0 0 var(--clay);
}

.episode-row.is-last-read .episode-thumb img {
  filter: grayscale(0.55);
  opacity: 0.82;
}

.episode-row.is-last-read .episode-info strong,
.episode-row.is-last-read .read-label {
  color: var(--navy);
}

.reading-history-label {
  color: var(--navy);
  background: #dcecff;
  border-radius: 999px;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 8px;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
  display: block;
}

body.ui-reader-reading .site-header {
  transform: translateY(-110%);
}

body.ui-reader-reading .reader-topbar {
  transform: translateY(calc(-100% - 68px));
}

body.ui-reader-controls-visible .site-header,
body.ui-reader-controls-visible .reader-topbar {
  transform: translateY(0);
}

@media (max-width: 720px) {
  .header-inner {
    position: relative;
  }

  .header-actions {
    position: static;
    gap: 5px;
  }

  .main-nav a,
  .account-links .account-name,
  .account-links .account-login,
  .mobile-menu-toggle {
    min-height: 40px;
  }

  .main-nav a {
    display: grid;
    place-items: center;
    padding: 0 11px;
  }

  .account-links .account-name,
  .account-links .account-login {
    display: grid;
    place-items: center;
    max-width: 72px;
    padding: 0 10px;
  }

  .mobile-menu-toggle {
    color: var(--navy);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    place-items: center;
    min-width: 40px;
    padding: 0 9px;
    font: inherit;
    font-size: 0.66rem;
    font-weight: 850;
    display: grid;
  }

  .mobile-menu-toggle[aria-expanded="true"] {
    color: #fff;
    background: var(--navy);
    border-color: var(--navy);
  }

  .header-actions > .social-links {
    z-index: 90;
    border: 1px solid #cfdbe7;
    background: #fff;
    border-radius: 12px;
    grid-template-columns: 1fr;
    gap: 3px;
    width: 178px;
    padding: 7px;
    display: none !important;
    position: absolute;
    top: 49px;
    right: 0;
    box-shadow: 0 14px 34px #10263329;
  }

  .header-actions.ui-mobile-menu-open > .social-links {
    display: grid !important;
  }

  .header-actions.ui-mobile-menu-open > .social-links .social-link,
  .ui-mobile-menu-link {
    color: var(--navy-deep);
    background: transparent;
    border: 0;
    border-radius: 8px;
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
    padding: 0 11px;
    font-size: 0.76rem;
    font-weight: 800;
    display: flex;
  }

  .header-actions.ui-mobile-menu-open > .social-links .social-link:hover,
  .ui-mobile-menu-link:hover {
    background: #eff5fa;
  }

  .header-actions.ui-mobile-menu-open .social-label,
  .header-actions.ui-mobile-menu-open .social-link i {
    display: inline !important;
  }

  .header-actions.ui-mobile-menu-open .social-short {
    display: none !important;
  }

  .ui-mobile-menu-link {
    border-top: 1px solid #e6edf3;
  }

  .home-notice-line {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 12px;
    padding: 11px 2px 12px;
  }

  .home-notice-line > span {
    font-size: 0.6rem;
  }

  .home-notice-line p {
    font-size: 0.7rem;
    line-height: 1.52;
  }

  .webtoon-library-new {
    padding: 5px 8px 4px;
    font-size: 0.58rem;
    top: 8px;
    left: 8px;
  }

  .episode-row.is-read,
  .episode-row.is-last-read {
    border-radius: 7px;
    padding-right: 8px;
  }

  .reading-history-label {
    margin-top: 6px;
    font-size: 0.58rem;
  }

  .webtoon-library-section {
    padding-top: 10px;
  }

  .webtoon-library-section .catalog-heading {
    border-bottom-width: 2px;
    margin-bottom: 8px;
    padding-bottom: 10px;
  }

  .webtoon-library-section .catalog-heading p,
  .webtoon-library-section .catalog-heading > span {
    display: none;
  }

  .webtoon-library-section .catalog-heading h1,
  .webtoon-library-section .catalog-heading h2 {
    font-size: 1.18rem;
  }

  .episode-row {
    min-height: 108px;
  }

  .episode-thumb {
    background: #e8eef3;
    box-shadow: inset 0 0 0 1px #18344712;
  }

  .reader-topbar-inner {
    height: 44px;
  }

  .reader-topbar {
    top: 56px;
  }

  .reader-intro {
    padding: 14px 16px 16px;
  }

  .reader-ai-notice {
    border-radius: 7px;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    margin: 0 0 12px;
    padding: 7px 9px;
  }

  .reader-ai-notice > span {
    width: 24px;
    height: 24px;
    font-size: 0.54rem;
  }

  .reader-ai-notice p {
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.65rem;
    line-height: 1.35;
    overflow: hidden;
  }

  .reader-intro .passage {
    margin-bottom: 5px;
    font-size: 0.68rem;
  }

  .reader-intro h1 {
    font-size: 1.32rem;
  }

  .reader-intro .subtitle {
    display: none;
  }

  .reader-dock {
    background: #0d2f4ff7;
    border-radius: 12px;
    box-shadow: 0 12px 30px #081c2f52;
  }

  .reader-dock a,
  .reader-dock span {
    min-height: 44px;
    font-size: 0.68rem;
  }

  .footer-community {
    gap: 6px;
  }

  .footer-community a {
    background: #fff2a6;
    border-color: #eadb79;
    padding: 7px 10px;
    font-size: 0.65rem;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .reader-topbar,
  .reader-dock {
    transition: none !important;
  }
}
