/* Generated artwork shared across the site. All controls remain native HTML. */
body.painted-site {
  --art-scene: url("/images/wuxia-ui/courtyard-light.webp");
  --art-paper: url("/images/wuxia-ui/paper-light.webp");
  --art-surface: #f6f0e3; --art-wash: #f6f0e3bd; --art-field: #faf6eb;
  --art-ink: #332e26; --art-muted: #706657; --art-accent: #853c2e;
  --art-edge: #aa936b; --art-rule: #9d88603d; --art-tint: #8b683610;
  --art-scene-wash: #f6f0e347; --art-shadow: #34251414;
  --art-frame: url("/images/wuxia-ui/brass-frame.webp");
  --art-brush: url("/images/wuxia-ui/cinnabar-brush.webp");
  --art-content-width: 1280px; --art-gutter: clamp(16px, 3vw, 40px);
}
html[data-theme="dark"] body.painted-site {
  --art-scene: url("/images/wuxia-ui/courtyard-dark.webp");
  --art-paper: url("/images/wuxia-ui/paper-dark.webp");
  --art-surface: #292e2f; --art-wash: #292e2fc4; --art-field: #23292b;
  --art-ink: #e8e0d0; --art-muted: #bcb3a2; --art-accent: #d7aa92;
  --art-edge: #867556; --art-rule: #bda87b38; --art-tint: #ceb2850c;
  --art-scene-wash: #111a2340; --art-shadow: #0003;
}
body.painted-site[data-art-scene="mountain"] { --art-scene: url("/images/yeon-wuxia-light-20260922.png"); }
html[data-theme="dark"] body.painted-site[data-art-scene="mountain"] { --art-scene: url("/images/yeon-wuxia-dark-20260922.png"); }
body.painted-site[data-art-scene="lake"] { --art-scene: url("/images/wuxia-ui/lake-light.webp"); }
html[data-theme="dark"] body.painted-site[data-art-scene="lake"] { --art-scene: url("/images/wuxia-ui/lake-dark.webp"); }
html body.painted-site {
  isolation: isolate; min-height: 100svh; color: var(--art-ink);
  background: var(--art-surface); background-blend-mode: normal;
}
html body.painted-site::before,
html[data-theme="dark"] body.painted-site::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--art-scene-wash), var(--art-scene-wash)), var(--art-scene) center / cover no-repeat;
}
/* Panel material and depth are shared; content grids keep their existing layout. */
html body.painted-site :is(
  .home-card, .hero-overview > section, .about-guides > .guide-panel,
  .notice-article, .coupon-quick, .coupon-item, .patch-note-item,
  .party-card, .board-news-card, .board-article, .board-poll-card,
  .board-gallery .board-photo-card, .board-list:not(.board-gallery):not(.board-news-feed),
  .music-catalog, .chat-panel, .record-form, .party-admin-card,
  .dashboard-post-card, .analytics-section, .stat-grid article,
  .board-comments, #board-compose-view, .board-poll-compose,
  .party-dialog, .board-prompt, .lyrics-dialog, .roster-item, .floating-banner,
  .banner-dialog, .guidance-version-dialog
) {
  border-color: var(--art-edge); border-radius: 2px;
  background-color: var(--art-surface);
  background-image: linear-gradient(var(--art-wash), var(--art-wash)), var(--art-paper);
  background-size: auto, 540px auto;
  box-shadow: 0 5px 18px var(--art-shadow), inset 0 0 0 3px var(--art-surface), inset 0 0 0 4px var(--art-rule);
}
html body.painted-site :is(
  .hero-overview > section, .about-guides > .guide-panel, .notice-article,
  .coupon-quick, .coupon-item, .patch-note-item, .party-card, .board-news-card,
  .board-article, .board-poll-card, .board-gallery .board-photo-card,
  .board-list:not(.board-gallery):not(.board-news-feed), .music-catalog, .chat-panel,
  .dashboard-post-card, .record-form, .party-admin-card, .analytics-section,
  .stat-grid article, .auth-panel, .music-library .music-player, .roster-item
)::after,
html body.painted-site .home-card::before {
  border: 20px solid transparent; border-image: var(--art-frame) 12% / 20px / 0 stretch;
  opacity: .58; pointer-events: none;
}
html[data-theme="dark"] body.painted-site :is(.home-card::before, .chat-panel::after, .roster-item::after) { opacity: .65; }
html body.painted-site .board-list:not(.board-gallery):not(.board-news-feed):empty { border: 0; background: none; box-shadow: none; }
html body.painted-site .board-list:not(.board-gallery):not(.board-news-feed):empty::after { content: none; }
html body.painted-site :is(.board-row, .track-row) { background: transparent; border-color: var(--art-rule); }
html body.painted-site :is(.board-row:hover, .track-row:hover, .track-row.is-active) { background-color: var(--art-tint); }
html body.painted-site :is(.board-comments, #board-compose-view) { padding: 24px; border: 1px solid var(--art-edge); margin-top: 18px; }
html body.painted-site :is(.board-editor, .board-editor-preview) { background: var(--art-field); border-color: var(--art-rule); }
html body.painted-site :is(.board-toolbar, .board-comment-form, .party-compose-section, .party-departure-fields) {
  background-color: var(--art-tint); border-color: var(--art-rule);
}
/* Generated paper is also used on secondary controls, never on color swatches. */
html body.painted-site :is(
  .roster-tabs button, .guide-tabs button, .coupon-toolbar button,
  .board-pagination button, .board-relationship-filter button, .board-editor-switch button,
  .board-list-tools button, .board-detail-actions button, .board-compose-heading button,
  .party-toolbar button, .party-card-apply, .coupon-copy, .coupon-use,
  .patch-pagination button, .heading-actions button, .view-heading button,
  .record-list button, .chat-color-actions button, .lyrics-button
) {
  border: 1px solid var(--art-edge); border-radius: 2px; color: var(--art-ink);
  background-color: var(--art-surface);
  background-image: linear-gradient(var(--art-wash), var(--art-wash)), var(--art-paper);
  background-size: auto, 300px auto; box-shadow: inset 0 0 0 2px var(--art-surface);
}
html body.painted-site :is(
  .board-primary, .party-submit, .party-apply-form button, .auth-form > button,
  .coupon-quick-copy, .coupon-copy-all, .chat-panel .chat-primary,
  .admin-main button.primary
) {
  border: 1px solid transparent; border-color: transparent !important; border-radius: 0;
  color: #fff4df; background: var(--art-brush) center / 100% 148% no-repeat !important;
  box-shadow: none; text-shadow: 0 1px 2px #32151066;
  padding-inline: 18px; font-weight: 700;
}
html body.painted-site :is(
  .roster-tabs button[aria-selected="true"], .guide-tabs button[aria-selected="true"],
  .coupon-toolbar button.is-active, .board-relationship-filter button[aria-pressed="true"],
  .board-editor-switch button[aria-pressed="true"], .chat-color-actions button[aria-pressed="true"]
) {
  color: var(--art-accent); border: 1px solid var(--art-edge); border-radius: 2px;
  background: linear-gradient(var(--art-wash), var(--art-wash)), var(--art-paper) center / 300px auto;
  box-shadow: inset 0 -2px var(--art-accent); font-weight: 700; text-shadow: none;
}
/* Compact repeated cards have quieter decoration than headings and feature panels. */
html body.painted-site.paper-design :is(.coupon-item, .party-card, .board-news-card, .board-gallery .board-photo-card, .patch-note-item)::after {
  border-width: 12px; border-image-width: 12px; opacity: .4;
}
html body.painted-site :is(.board-empty, .party-empty):not([hidden]) {
  padding: 30px 20px; margin: 18px 0; color: var(--art-muted); text-align: center;
  border: 1px solid var(--art-rule); border-radius: 2px;
  background: linear-gradient(var(--art-wash), var(--art-wash)), var(--art-paper) center / 500px auto;
}
html body.painted-site :is(.board-primary, .party-submit, .auth-form > button, .coupon-quick-copy, .chat-primary):hover { filter: brightness(1.09); }
html body.painted-site :is(button, a, input, textarea, select, [contenteditable]):focus-visible {
  outline: 2px solid var(--art-accent); outline-offset: 3px;
}
html body.painted-site :is(input:where(:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"])), textarea, select) {
  color: var(--art-ink); background-color: var(--art-field); border-color: var(--art-edge); border-radius: 2px;
}
/* Compact illustrated headings keep the reading area in the first screen. */
html body.painted-site :is(.board-heading, .music-heading, .about-heading, .info-content-heading, .roster-heading, .notice-intro, .view-heading) {
  position: relative; color: var(--art-ink); border-bottom: 1px solid var(--art-edge);
  background: linear-gradient(90deg, var(--art-wash), transparent 90%), var(--art-paper) center / 600px auto;
  box-shadow: 0 3px 12px var(--art-shadow);
}
html body.painted-site :is(.board-heading, .music-heading, .about-heading, .info-content-heading, .roster-heading, .view-heading)::after {
  content: ""; position: absolute; inset: 0; width: auto; height: auto; margin: 0;
  border: 16px solid transparent; border-image: var(--art-frame) 12% / 16px / 0 stretch;
  background: none; opacity: .55; pointer-events: none;
}
html body.painted-site :is(.music-heading, .about-heading, .info-content-heading, .view-heading) { padding: 18px 22px; margin-bottom: 20px; gap: 16px; }
html body.painted-site .board-heading { padding: 12px 18px; margin-bottom: 12px; min-height: 58px; }
html body.painted-site :is(.music-heading h1, .about-heading h1, .about-heading h2, .info-content-heading h2, .view-heading h1) {
  font: 700 clamp(24px, 2.2vw, 32px)/1.3 "Gowun Batang", "Noto Serif KR", serif; letter-spacing: .02em;
}
html body.painted-site .board-heading h1 { font-family: "Gowun Batang", "Noto Serif KR", serif; font-size: 22px; }
html body.painted-site :is(.home-card-heading h2, .music-list-heading h2, .chat-panel h2, .board-comment-heading h2) { color: var(--art-ink); }
/* Page widths share a baseline, with extra room for the editor and dashboard. */
html body.painted-site :is(.board-main, .music-main) { width: min(var(--art-content-width), calc(100% - var(--art-gutter) * 2)); max-width: none; padding-inline: 0; padding-top: calc(var(--site-header-height) + 24px); }
html body.painted-site .about-main { width: min(1440px, calc(100% - var(--art-gutter) * 2)); }
html body.painted-site .info-content { width: min(var(--art-content-width), calc(100% - var(--art-gutter) * 2)); padding-top: 24px; }
html body.painted-site .color-chat-main { width: min(1520px, calc(100% - var(--art-gutter) * 2)); padding-top: calc(var(--site-header-height) + 24px); }
html body.painted-site .info-hero { background: transparent; }
/* Notices remain a readable document, with the index clear of the sticky header. */
html body.painted-site .notice-main { width: min(var(--art-content-width), calc(100% - var(--art-gutter) * 2)); margin-inline: auto; padding: calc(var(--site-header-height) + 24px) 0 48px; }
html body.painted-site .notice-intro { grid-template-columns: minmax(200px, .8fr) minmax(0, 1.2fr); align-items: center; padding: 24px; gap: 12px 32px; }
html body.painted-site .notice-intro h1 { font-size: clamp(32px, 4vw, 50px); line-height: 1.2; }
html body.painted-site .notice-intro p { font-size: 14px; line-height: 1.9; color: var(--art-muted); }
html body.painted-site .notice-intro::after { content: none; }
html body.painted-site .notice-intro > a { padding: 4px 0; }
html body.painted-site .notice-layout { grid-template-columns: 175px minmax(0, 1fr); gap: 24px; padding-top: 24px; }
html body.painted-site .notice-index { top: calc(var(--site-header-scrolled-height) + 16px); padding: 8px 12px; background: linear-gradient(var(--art-wash), var(--art-wash)), var(--art-paper) center / 420px auto; border: 1px solid var(--art-edge); }
html body.painted-site .notice-article { scroll-margin-top: calc(var(--site-header-scrolled-height) + 20px); }
html body.painted-site .notice-article-heading { margin-bottom: 22px; gap: 12px; grid-template-columns: 38px minmax(0, 1fr); }
html body.painted-site .notice-article-heading h2 { font-size: 26px; }
/* Portraits retain their real artwork; the new frame surrounds each photo. */
html body.painted-site .roster { width: min(1440px, calc(100% - var(--art-gutter) * 2)); margin-inline: auto; padding: calc(var(--site-header-height) + 24px) 0 40px; background: transparent; }
html body.painted-site .roster-heading { display: grid; justify-content: start; text-align: left; gap: 4px; padding: 18px 24px; margin-bottom: 18px; }
html body.painted-site .roster-heading h1 { margin: 0; padding: 0; border: 0; font: 700 36px/1.25 "Gowun Batang", serif; }
html body.painted-site .roster-heading p { font-size: 12px; }
html body.painted-site .roster-tabs { justify-content: flex-start; margin-bottom: 18px; }
html body.painted-site .gallery-status { text-align: left; color: var(--art-muted); }
/* Night material on music and introduction panels remains legible in both themes. */
html body.painted-site :is(.music-library .music-player, .about-intro-banner, .auth-panel) {
  color: #eee4d1; border-color: #9b8054;
  background: linear-gradient(#202829c9, #202829df), url("/images/wuxia-ui/paper-dark.webp") center / 540px auto;
  box-shadow: 0 7px 22px #111b2430, inset 0 0 0 3px #202829, inset 0 0 0 4px #aa8d5f55;
}
html body.painted-site .about-intro-banner { background-image: linear-gradient(90deg, #1c272beb, #1c272b99), url("/images/wuxia-ui/lake-dark.webp"); background-size: cover; background-position: center 58%; }
html body.painted-site .music-artwork { background: url("/images/wuxia-ui/lake-dark.webp") 72% center / cover; border-color: #b79c6a77; }
html body.painted-site .music-artwork > span { color: #ddc496; text-shadow: 0 2px 10px #000; }
html body.painted-site .music-library .music-player .play-button { background: var(--art-brush) center / 150% 150% no-repeat; border: 1px solid #be967055; color: #fff1d8; }
html body.painted-site .music-library .music-player .lyrics-button { color: #eee4d1; border-color: #ad916266; background: transparent; }
/* Admin carries the same art without changing authorization or hiding controls. */
html body.painted-site .auth-shell { background: transparent; }
html body.painted-site .auth-panel { width: min(440px, 100%); }
html body.painted-site .auth-panel :is(label, .public-link) { color: #d5cbb9; }
html body.painted-site .auth-panel input { background: #182022; border-color: #85785e; color: #f3eadb; }
html body.painted-site .auth-tabs button { border-color: #8f7954; color: #cec2ac; }
html body.painted-site .auth-tabs button[aria-selected="true"] { color: #f5e5c6; background: #ab805321; }
html body.painted-site .admin-header { background: linear-gradient(#182022a8, #182022df), url("/images/yeon-nav-background-dark-20260922.png") left 40% / 960px auto; border-color: #88724e; }
html body.painted-site .admin-nav { background: linear-gradient(var(--art-wash), var(--art-wash)), var(--art-paper) center / 500px auto; border-color: var(--art-edge); }
html body.painted-site .admin-nav :is(button, a) { color: var(--art-ink); font-family: "Gowun Batang", serif; font-weight: 700; }
html body.painted-site .admin-nav button.is-active { color: #fff1d8; background: var(--art-brush) center / 100% 140% no-repeat; border-color: transparent; }
html body.painted-site .admin-main { padding-top: 24px; }
html body.painted-site .heading-actions { flex-wrap: wrap; align-items: center; }
html body.painted-site .heading-actions select { width: auto; min-width: 0; flex: 1 1 130px; }
html body.painted-site .heading-actions button { white-space: nowrap; flex-shrink: 0; }
html body.painted-site .analytics-section { min-width: 0; }
html body.painted-site .view-heading h1 { font-size: 30px; }
/* A translucent surface joins the footer and version line without an image. */
body.painted-site {
  --footer-glass: rgba(245, 239, 228, .65);
  --footer-ink: #332e26; --footer-muted: #625a4e; --footer-accent: #853c2e;
}
html[data-theme="dark"] body.painted-site {
  --footer-glass: rgba(28, 37, 40, .65);
  --footer-ink: #e8dfcf; --footer-muted: #bdb3a3; --footer-accent: #d6a78f;
}
html body.painted-site .site-footer-panel {
  position: relative; flex: 0 0 auto; color: var(--footer-ink); border-top: 1px solid var(--art-edge);
  background: var(--footer-glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
html body.painted-site .site-footer-panel > footer {
  color: var(--footer-ink); background: transparent; border: 0;
  padding-inline: max(24px, calc((100vw - 1280px) / 2));
}
html body.painted-site .site-footer-panel > footer:not(.site-footer) {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 72px; padding-block: 14px; font-size: 14px;
  padding-right: max(80px, calc((100vw - 1280px) / 2));
}
html body.painted-site .site-footer-panel :is(a, h2, .contact-names) { color: var(--footer-ink); }
html body.painted-site .site-footer-panel a { display: inline-flex; align-items: center; min-height: 40px; text-decoration-thickness: 1px; text-underline-offset: 4px; }
html body.painted-site .site-footer-panel a:hover { color: var(--footer-accent); text-decoration: underline; }
html body.painted-site .site-footer-panel :is(.footer-seal, footer > span, .site-footer > div:nth-child(2) > span) { color: var(--footer-accent); border-color: var(--footer-accent); }
html body.painted-site .site-footer-panel > .site-version {
  padding: 7px max(80px, calc((100vw - 1280px) / 2)) 7px 24px;
  color: var(--footer-muted); background: transparent; border-top: 1px solid var(--art-rule); font-size: 10px;
}
html.preview-hide-nav .site-footer-panel { display: none; }
html body.painted-site .back-to-top { color: var(--art-ink); border-color: var(--art-edge); background: var(--art-paper) center / 300px auto; }
@media (max-width: 850px) {
  html body.painted-site .notice-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  html body.painted-site .notice-index { position: static; }
  html body.painted-site .notice-intro { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 12px; }
  html body.painted-site .notice-intro > a { grid-column: 1; }
}
@media (max-width: 1000px) {
  html body.painted-site .analytics-grid { grid-template-columns: minmax(0, 1fr); }
  html body.painted-site .admin-nav {
    background: var(--footer-glass);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top-color: var(--art-edge);
  }
}
@media (max-width: 760px) {
  html body.painted-site .music-library .music-player { top: auto; }
}
@media (max-width: 700px) {
  html body.painted-site .site-footer-panel > footer { padding-inline: 20px; }
  html body.painted-site .site-footer-panel > footer:not(.site-footer) { min-height: 68px; }
  html body.painted-site :is(.board-heading-actions button, .board-list-tools button, .board-list-tools input, .board-list-tools select,
    .board-section-filter select, .board-relationship-filter button, .board-pagination button, .coupon-toolbar button,
    .coupon-copy, .coupon-use, .roster-tabs button, .party-card-apply, .party-toolbar button) { min-height: 40px; height: auto; }
  html body.painted-site #board-refresh { width: 40px; }
  html body.painted-site .party-dialog-close { width: 44px; height: 44px; }
  html body.painted-site .wuxia-header :is(.nav-toggle, .theme-toggle) { width: 42px; height: 42px; min-height: 42px; flex-basis: 42px; }
  html body.painted-site::before { background-position: center, 45% center; }
  html body.painted-site :is(.board-main, .music-main, .color-chat-main, .notice-main, .roster) { padding-top: calc(var(--site-header-height) + 16px); }
  html body.painted-site :is(.music-heading, .about-heading, .info-content-heading, .view-heading, .roster-heading) { padding: 14px 16px; margin-bottom: 16px; }
  html body.painted-site .board-heading { padding: 10px 12px; min-height: 52px; }
  html body.painted-site .board-heading h1 { font-size: 20px; }
  html body.painted-site :is(.board-comments, #board-compose-view) { padding: 16px; }
  html body.painted-site .notice-article-heading h2 { font-size: 22px; }
  html body.painted-site .roster-heading h1 { font-size: 30px; }
  html body.painted-site .auth-panel { padding: 28px 24px; }
  html body.painted-site .heading-actions select { flex-basis: 100%; }
  html body.painted-site .record-form { padding: 18px 16px; }
  html body.painted-site .home-card::before { border-image-width: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html body.painted-site :is(button, a) { transition: none; }
}

/* Page title banners are omitted; content headings and working controls remain. */
html body.painted-site.paper-design :is(.about-heading, .music-heading, .roster-heading, .info-content-heading) {
  display: none;
}
html body.painted-site.paper-design :is(.board-heading h1, .notice-intro > h1, .notice-intro > span, .view-heading > div:has(> h1)) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
html body.painted-site.paper-design :is(.board-heading, .view-heading, .notice-intro) {
  min-height: 0; padding: 0; border: 0; background: none; box-shadow: none;
}
html body.painted-site.paper-design :is(.board-heading, .view-heading)::after { content: none; }
html body.painted-site.paper-design .board-heading { display: none; }
html body.painted-site.paper-design .board-heading:has(.board-heading-actions > button:not([hidden])) {
  display: flex; justify-content: flex-end; margin-bottom: 8px;
}
html body.painted-site.paper-design .view-heading {
  justify-content: flex-end; align-items: center; margin-bottom: 16px;
}
html body.painted-site.paper-design .notice-intro {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 16px;
}
html body.painted-site.paper-design .notice-intro > p { flex: 1 1 300px; font-size: 13px; }
html body.painted-site.paper-design .notice-intro > a { flex: 0 0 auto; }
html body.painted-site.paper-design .notice-layout { padding-top: 0; }
