.home-page { padding-top: var(--site-header-height); }
/* A viewport-sized layer keeps the artwork proportional on long mobile pages. */
body.home-page, html[data-theme="dark"] body.home-page {
  isolation: isolate;
  background-color: #eee6d6;
  background-image: none;
}
html[data-theme="dark"] body.home-page { background-color: #111b26; }
body.home-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(180deg, #fff9ed0d, #f8f1e51f), url("/images/yeon-wuxia-light-20260922.png");
  background-size: cover;
  background-position: center var(--home-background-position, 0%);
  background-repeat: no-repeat;
}
html[data-theme="dark"] body.home-page::before {
  background-image: linear-gradient(180deg, #090f1614, #0d141c2b), url("/images/yeon-wuxia-dark-20260922.png");
}
/* Foreground follows the theme on headings outside the paper cards. */
body.home-page .home-about > .about-heading,
body.home-page .home-about .section-heading { color: var(--ink); }
body.home-page .home-about .about-heading p,
body.home-page .home-about .section-heading > span { color: var(--red-dark); }
body.home-page .home-about .about-back { color: #554b3c; border-color: #8b795c; }
body.home-page .home-about .about-back:hover { color: var(--red-dark); }
html[data-theme="dark"] body.home-page .home-about > .about-heading,
html[data-theme="dark"] body.home-page .home-about .section-heading { color: #f1e6d0; }
html[data-theme="dark"] body.home-page .home-about .about-heading p,
html[data-theme="dark"] body.home-page .home-about .section-heading > span { color: #d4ba8e; }
html[data-theme="dark"] body.home-page .home-about .about-back { color: #e0cfac; border-color: #a28a61; }
html[data-theme="dark"] body.home-page .home-about .about-back:hover { color: #fff1d4; }
@media (max-width: 700px) {
  body.home-page::before { background-position: 38% center; }
}
@media (prefers-reduced-motion: reduce) {
  body.home-page::before { background-position: center; }
}
.home-page.preview-hide-nav { padding-top: 0; }
.home-dashboard {
  --home-card-gap: 16px;
  --home-top-gap: 22px;
  --home-stage-height: clamp(580px, calc(100svh - var(--site-header-height) - var(--home-top-gap) - 20px), 860px);
  position: relative; isolation: isolate; width: min(1360px, calc(100% - clamp(48px, calc(45vw - 447px), 200px))); margin: var(--home-top-gap) auto 0;
}
.home-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--home-card-gap); padding-bottom: 20px; align-items: start; }
.home-column { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: var(--home-card-gap); min-width: 0; height: var(--home-stage-height); }
.home-column[data-home-column="sidebar"] { grid-template-rows: auto minmax(0, .85fr) minmax(0, 1.15fr); }
.home-column[data-home-column="highlights"] { order: 1; grid-template-rows: repeat(2, minmax(0, 1fr)); }
.home-column[data-home-column="community"] { order: 2; }
.home-column > section { min-width: 0; min-height: 0; margin: 0; }
.home-identity { --identity-text-center: calc(50% + min(19cqw, 38cqh)); position: relative; isolation: isolate; container-type: size; aspect-ratio: 1774 / 887; overflow: hidden; padding: 0; border: 0; background: #151511; color: #f1e6cc; box-shadow: 0 5px 18px #24231e18; }
.home-column > .home-identity { width: 100%; min-height: 0; }
.home-identity-art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
/* Preserve the saved heading key; the artwork carries the Chinese wordmark. */
.home-identity h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home-identity > .home-identity-name { position: absolute; top: calc(50% - 58px); left: var(--identity-text-center); transform: translateX(-50%); z-index: 1; display: flex; align-items: center; justify-content: center; width: max-content; height: 56px; margin: 0; padding-left: .22em; white-space: nowrap; color: #e8d1a4; font: 700 clamp(40px, min(12.5cqw, 25cqh), 56px)/1 "Gowun Batang", serif; letter-spacing: .22em; text-shadow: 0 2px 4px #000, 0 0 10px #000; }
.home-identity-name::before { content: ""; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); width: 28px; height: 1px; background: linear-gradient(90deg, transparent, #d4ab70 30% 70%, transparent); }
.home-identity-links { position: absolute; top: calc(50% + 16px); width: clamp(108px, min(32cqw, 64cqh), 140px); left: var(--identity-text-center); transform: translateX(-50%); z-index: 1; margin: 0; }
.home-identity-links a, html[data-theme="dark"] .home-identity-links a { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #a38b5b99; border-radius: 0; color: #e8d1a4; background: #151511d9; font: 700 14px/1.6 "Gowun Batang", serif; letter-spacing: .08em; white-space: nowrap; transition: background .15s, border-color .15s; }
.home-identity-links a::before { content: ""; position: absolute; inset: 2px; border: 1px solid #bba47726; pointer-events: none; }
.home-identity-links a span { color: #c2a773; font-size: 13px; }
.home-identity-links a:hover, html[data-theme="dark"] .home-identity-links a:hover { color: #f5dfb0; border-color: #d3b77b; background: #292316; }
.home-identity-links a:focus-visible { outline: 2px solid #efd8a6; outline-offset: 3px; }
.home-card { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid #b6aa95; border-radius: 0; padding: 16px 18px; background: radial-gradient(ellipse at top left, #aa875010, transparent 65%), var(--paper-light); box-shadow: 0 3px 12px #33291e08; }
.home-card::before { content: ""; position: absolute; inset: -1px; border: 16px solid transparent; border-image: url("/assets/branding/card-corners.svg?v=2") 20 / 16px / 0 stretch; pointer-events: none; }
html[data-theme="dark"] .home-card { border-color: #706758; }
.home-card-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; flex: 0 0 auto; gap: 8px 12px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.home-card-heading h2 { position: relative; margin: 0; padding-left: 15px; font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: .03em; }
.home-card-heading h2::before { content: ""; position: absolute; left: 0; top: .22em; width: 4px; height: .95em; border-radius: 2px; background: var(--red-dark); box-shadow: 1px 0 0 #893f2820; }
.home-card:not(.home-party):not(.home-news):not(.home-discussions):not(.home-weekly) .home-card-heading { justify-content: flex-end; margin-bottom: 8px; padding-bottom: 8px; }
.home-card:not(.home-party):not(.home-news):not(.home-discussions):not(.home-weekly) .home-card-heading h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home-card-heading a { flex: 0 0 auto; color: var(--muted); font: 500 11px/1.5 "Noto Sans KR", sans-serif; }
.home-card-heading a:hover { color: var(--red); }
.home-heading-links { display: flex; gap: 10px; }
.home-feed { flex: 1; min-height: 0; overflow-wrap: anywhere; }
.home-empty { display: grid; align-content: center; min-height: 70px; margin: 0; color: var(--muted); font: 400 12px/1.8 "Noto Sans KR", sans-serif; }
.home-empty strong { color: var(--muted); font-weight: 400; }
.home-retry { width: fit-content; margin-top: 8px; border: 0; border-bottom: 1px solid currentColor; background: transparent; padding: 2px 0; color: var(--red); font: inherit; cursor: pointer; }
.home-party-list, .home-post-list { display: grid; grid-auto-rows: minmax(0, 1fr); height: 100%; list-style: none; margin: 0; padding: 0; }
.home-party-list { height: auto; grid-auto-rows: minmax(50px, auto); }
.home-party-list > li, .home-post-list > li { min-width: 0; min-height: 0; }
.home-party-list li + li, .home-post-list li + li { border-top: 1px solid var(--line); }
.home-party-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; align-items: center; gap: 2px 8px; height: 100%; min-height: 50px; padding: 6px 0; font-family: "Noto Sans KR", sans-serif; line-height: 1.5; }
.home-party-title { grid-column: 1 / 3; grid-row: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 500; }
.home-party-category { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 10px; }
.home-party-time { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.home-party-count { grid-column: 3; grid-row: 1 / span 2; display: flex; align-items: baseline; gap: 3px; padding: 4px 6px; color: var(--red-dark); background: rgba(140,90,72,.08); border-radius: 3px; font-size: 11px; white-space: nowrap; }
.home-party-count strong { font-size: 13px; }
.home-party-link:hover .home-party-title, .home-post-link:hover .home-post-title { color: var(--red); }
.home-post-link { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 42px; height: 100%; padding: 7px 0; font-family: "Noto Sans KR", sans-serif; }
.home-post-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; line-height: 1.6; }
.home-post-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.home-post-category, .home-post-comments { color: var(--red-dark); }
.home-discussions .home-post-list { height: auto; grid-auto-rows: 44px; }
.home-discussions .home-post-link { gap: 2px; padding-block: 4px; }
.home-discussions .home-post-title { flex-shrink: 0; font-size: 12px; line-height: 1.5; }
.home-discussions .home-post-meta { flex-shrink: 0; }
.home-board-notice { max-height: 320px; }
.home-notice-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home-notice-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding-right: 8px; }
.home-notice .notice-board { border-top: 0; }
.home-notice .notice-board article { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px 0; }
.home-notice .notice-board article:first-child { padding-top: 0; }
.home-notice .notice-board article:last-child { padding-bottom: 4px; border-bottom: 0; }
.home-notice .notice-board article > div { min-width: 0; }
.home-notice-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.home-notice .home-notice-meta > span { font: 700 11px/1.6 "Noto Sans KR", sans-serif; }
.home-notice-meta::before { content: ""; flex: 0 0 3px; align-self: center; height: 12px; border-radius: 2px; background: var(--red-dark); }
.home-notice-meta > small { color: var(--muted); font: 400 11px/1.6 "Noto Sans KR", sans-serif; overflow-wrap: anywhere; }
.home-notice .notice-board article strong { font: 700 14px/1.65 "Noto Sans KR", sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
.home-notice .notice-board-body { margin-top: 12px; font: 400 12.5px/1.9 "Noto Sans KR", sans-serif; }
.home-notice .notice-board:empty::before { display: block; padding: 20px 0; color: var(--muted); font-size: 13px; content: "등록된 공지가 없습니다."; }
.home-card.home-notice:has(.notice-pagination:not([hidden])) { padding-bottom: 0; }
.home-notice .notice-pagination { order: 3; flex: 0 0 auto; gap: 2px; min-height: 24px; margin-top: 6px; margin-bottom: 0; }
.home-notice .notice-page-numbers { flex: 0 1 auto; flex-wrap: wrap; justify-content: center; gap: 2px; }
.home-notice .notice-pagination button { width: 24px; height: 24px; font-size: 11px; }
.home-notice .notice-pagination > button { font-size: 16px; }
.home-notice .notice-page-gap { width: 14px; height: 24px; font-size: 10px; }
.home-weekly-post h3 { margin: 6px 0 10px; font-size: 14px; line-height: 1.65; }
.home-weekly-post h3 a:hover { color: var(--red); }
.home-weekly-body { color: var(--ink); font: 400 12px/1.8 "Noto Sans KR", sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.home-weekly-body > :first-child { margin-top: 0; }
.home-weekly-body > :last-child { margin-bottom: 0; }
.home-weekly-body p { margin: 0 0 .75em; }
.home-weekly-body :is(h2, h3) { margin: 1em 0 .4em; font: 700 14px/1.6 "Noto Sans KR", sans-serif; }
.home-weekly-body :is(ul, ol) { margin: .7em 0; padding-left: 1.7em; white-space: normal; }
.home-weekly-body li { white-space: pre-wrap; }
.home-weekly-body blockquote { margin: .8em 0; padding-left: 10px; border-left: 2px solid var(--line); color: var(--muted); }
.home-weekly-body hr { margin: 1em 0; border: 0; border-top: 1px solid var(--line); }
.home-weekly-body a { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }
.home-weekly-body .board-media { margin: 12px 0; white-space: normal; }
.home-weekly-body .board-media img { display: block; max-width: 100%; height: auto; margin: auto; }
.home-weekly-body .board-media figcaption { padding-top: 4px; color: var(--muted); font-size: 11px; text-align: center; }
.home-weekly-body :is(.board-video-preview, iframe) { display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: var(--paper); }
.home-weekly-body .board-video-preview { position: relative; overflow: hidden; cursor: pointer; }
.home-weekly-body .board-thumbnail { display: block; height: 100%; }
.home-weekly-body .board-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.home-weekly-body .board-thumbnail-play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); padding: 4px 12px; border-radius: 4px; background: #181812cc; color: #fff; }
.home-weekly-more { display: inline-block; margin-top: 12px; color: var(--red-dark); font: 500 11px/1.5 "Noto Sans KR", sans-serif; }
@media (max-width: 1100px) { .home-notice-content { flex: 1 1 auto; max-height: 340px; } }
.home-news { padding: 16px 18px; }
.home-news .home-feed { flex: 0 0 auto; }
.home-card.home-news .home-card-heading { align-items: baseline; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.home-news .home-card-heading h2 { color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: .03em; }
.home-news-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; gap: 14px; height: auto; }
.home-news-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 0; }
.home-news-media { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 100%; height: auto; min-height: 0; aspect-ratio: 5 / 2; overflow: hidden; background: rgba(128,120,105,.12); }
.home-news-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.home-news-media img.is-loading { opacity: 0; }
.home-news-placeholder { color: var(--muted); font: 700 12px/1.3 "Gowun Batang", serif; }
.home-news-meta { display: flex; flex-wrap: wrap; flex-shrink: 0; gap: 3px 8px; color: var(--muted); font: 400 11px/1.4 "Noto Sans KR", sans-serif; }
.home-news-item h3 { flex-shrink: 0; min-height: 3.2em; margin: 0; font: 500 12px/1.5 "Noto Sans KR", sans-serif; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.home-news-item a:hover { color: var(--red); }
.home-news-item p { display: none; }
.home-news-open { display: inline-flex; flex-shrink: 0; align-self: flex-start; color: var(--red-dark); font: 500 12px/1.6 "Noto Sans KR", sans-serif; }
.home-card.home-photo-card { padding-block: 12px; }
.home-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.home-roster-photo:first-child { grid-column: 1 / -1; }
.home-roster-photo:nth-child(2):last-child { grid-column: 1 / -1; }
.home-roster-photo { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.home-photo-image { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 0; overflow: hidden; border-radius: 3px; background: rgba(128,120,105,.07); }
.home-photo-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.home-roster-photo:first-child .home-photo-image img { object-fit: contain; }
.home-photo-image img.is-loading { opacity: 0; }
.home-dashboard :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.home-about { margin: 0 0 40px; padding-top: 28px; scroll-margin-top: var(--site-header-height); }
.home-about #join { scroll-margin-top: calc(var(--site-header-height) + 16px); }
.home-page #guide { scroll-margin-top: 96px; }
@media (min-width: 1101px) {
  .home-column[data-home-column="sidebar"] { grid-template-rows: minmax(190px, 1fr) repeat(2, minmax(0, 280px)); }
  .home-board-notice { height: 100%; }
  .home-news .home-feed { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .home-news-list { height: 100%; grid-template-rows: minmax(0, 1fr); }
  .home-news-media { flex: 1 0 28px; aspect-ratio: auto; }
  .home-news-meta { flex-wrap: nowrap; gap: 5px; font-size: 10px; }
  .home-news-meta time { flex-shrink: 0; }
  .home-news-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .home-news-item h3 { height: 4.5em; min-height: 4.5em; -webkit-line-clamp: 3; }
  .home-news-open { font-size: 11px; }
  .home-column[data-home-column="highlights"] { grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .home-column[data-home-column="community"] { grid-template-rows: minmax(0, 1fr) auto; }
  :is(.home-discussions, .home-party) .home-feed { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .home-party .home-feed { flex: 1; max-height: none; }
  .home-party-list { height: 100%; grid-auto-rows: minmax(50px, 1fr); }
}
@media (min-width: 1101px) and (max-height: 740px) {
  .home-dashboard { --home-top-gap: 12px; --home-card-gap: 12px; --home-stage-height: max(580px, calc(100svh - var(--site-header-height) - var(--home-top-gap) - 20px)); }
  .home-card { padding: 12px 14px; }
  .home-card-heading { margin-bottom: 8px; padding-bottom: 6px; }
  .home-card-heading h2, .home-news .home-card-heading h2 { font-size: 17px; }
  .home-card.home-news .home-card-heading { margin-bottom: 8px; padding-bottom: 6px; }
  .home-news-item { gap: 4px; }
  .home-news-item h3 { height: 3em; min-height: 3em; font-size: 12px; -webkit-line-clamp: 2; }
  .home-party-link { padding-block: 5px; }
}
@media (max-width: 1100px) {
  .home-dashboard { width: calc(100% - 48px); --home-top-gap: 16px; }
  .home-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-column { height: auto; grid-template-rows: auto; }
  .home-column[data-home-column="sidebar"] { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
  .home-column[data-home-column="highlights"] { grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .home-column[data-home-column="community"] { align-content: start; }
  .home-identity { grid-column: 1 / -1; max-height: 300px; }
  .home-weekly { min-height: 260px; }
  .home-news .home-feed { flex-grow: 1; }
  .home-party-list, .home-post-list { height: auto; }
  .home-party-link { min-height: 54px; }
}
@media (max-width: 700px) {
  .home-dashboard { width: calc(100% - 28px); --home-top-gap: 12px; --home-card-gap: 12px; }
  .home-overview, .home-column[data-home-column="sidebar"] { grid-template-columns: minmax(0, 1fr); }
  .home-card { padding: 14px 16px; }
  .home-news-list { gap: 12px; }
  .home-news-item h3 { font-size: 12px; }
  .home-party-list, .home-post-list { grid-auto-rows: auto; }
  .home-party-link, .home-post-link { padding-block: 8px; }
  .home-about { padding-top: 24px; margin-bottom: 32px; }
}
