/* ==========================================================================
   LKWM — shared redesign theme (Day / Evening / Night).
   Layout is identical in every theme; only the tokens + scenery change.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600;700;800&family=Noto+Sans+KR:wght@400;500;700&display=swap');

:root,
html[data-tod="day"] {
  --lk-page: #f7f4ff;
  --lk-page-2: #efeaff;
  --lk-surface: #ffffff;
  --lk-surface-2: #f6f2ff;
  --lk-line: #e9e2fb;
  --lk-ink: #241a4f;
  --lk-muted: #635783;
  --lk-accent: #6d3df5;
  --lk-accent-hover: #5b2be0;
  --lk-accent-soft: #efe9ff;
  --lk-accent-ink: #ffffff;
  --lk-shadow: 0 10px 30px rgba(76, 52, 160, .10);
  --lk-hero-ink: #2b1f5c;
  --lk-hero-eyebrow: #6d3df5;
  --lk-hero-title: linear-gradient(95deg, #4c1d95 0%, #6d3df5 60%, #8b5cf6 100%);
  --lk-hero-wash: linear-gradient(90deg, rgba(247,244,255,.94) 0%, rgba(247,244,255,.78) 34%, rgba(247,244,255,0) 62%);
  --lk-hero-wash-m: linear-gradient(180deg, rgba(247,244,255,.55) 0%, rgba(247,244,255,.92) 100%);
  --lk-footer-bg: #eae5fa;
  --lk-footer-ink: #3f2d80;
  --lk-footer-muted: #635783;
  --lk-footer-accent: #7c5ce6;
  --lk-footer-line: rgba(63, 45, 128, .14);
  --lk-scene-footer: url('img/day-footer.jpg');
  --lk-scene-river: url('img/day-river.jpg');
  --lk-scene-pagoda: url('img/day-pagoda.jpg');
  --lk-scene-campus: url('img/day-campus.jpg');
  --lk-scene-banner: url('img/day-banner.jpg');
  --lk-petal: #f9a8d4;
  color-scheme: light;
}
html[data-tod="evening"] {
  --lk-page: #fcf3f4;
  --lk-page-2: #f8e7ee;
  --lk-surface: #ffffff;
  --lk-surface-2: #fbf1f5;
  --lk-line: #f1dde6;
  --lk-ink: #3a1d44;
  --lk-muted: #7a5a78;
  --lk-accent: #8a3fc9;
  --lk-accent-hover: #7631b2;
  --lk-accent-soft: #f6e8f5;
  --lk-accent-ink: #ffffff;
  --lk-shadow: 0 10px 30px rgba(122, 60, 110, .12);
  --lk-hero-ink: #3a1d44;
  --lk-hero-eyebrow: #b2457f;
  --lk-hero-title: linear-gradient(95deg, #5b1f6e 0%, #9b3a8f 55%, #d0567f 100%);
  --lk-hero-wash: linear-gradient(90deg, rgba(255,240,240,.92) 0%, rgba(255,236,236,.72) 34%, rgba(255,236,236,0) 62%);
  --lk-hero-wash-m: linear-gradient(180deg, rgba(255,240,240,.5) 0%, rgba(255,240,240,.92) 100%);
  --lk-footer-bg: #725675;
  --lk-footer-ink: #ffffff;
  --lk-footer-muted: #ead7e8;
  --lk-footer-accent: #ffb3c7;
  --lk-footer-line: rgba(255, 255, 255, .18);
  --lk-scene-footer: url('img/evening-footer.jpg');
  --lk-scene-river: url('img/evening-river.jpg');
  --lk-scene-pagoda: url('img/evening-pagoda.jpg');
  --lk-scene-campus: url('img/evening-campus.jpg');
  --lk-scene-banner: url('img/evening-banner.jpg');
  --lk-petal: #fbb6c9;
}
html[data-tod="night"] {
  --lk-page: #eeecf9;
  --lk-page-2: #e3e0f5;
  --lk-surface: #ffffff;
  --lk-surface-2: #f3f1fd;
  --lk-line: #dcd7f3;
  --lk-ink: #1d1747;
  --lk-muted: #5a5389;
  --lk-accent: #6a4cf0;
  --lk-accent-hover: #5636dc;
  --lk-accent-soft: #ebe7ff;
  --lk-accent-ink: #ffffff;
  --lk-shadow: 0 10px 30px rgba(32, 25, 79, .16);
  --lk-hero-ink: #f1edff;
  --lk-hero-eyebrow: #c4b5fd;
  --lk-hero-title: linear-gradient(95deg, #ffffff 0%, #e2d8ff 55%, #c4b5fd 100%);
  --lk-hero-wash: linear-gradient(90deg, rgba(16,13,48,.86) 0%, rgba(20,16,58,.62) 36%, rgba(20,16,58,0) 64%);
  --lk-hero-wash-m: linear-gradient(180deg, rgba(16,13,48,.45) 0%, rgba(16,13,48,.86) 100%);
  --lk-footer-bg: #20194f;
  --lk-footer-ink: #ffffff;
  --lk-footer-muted: #cfcbff;
  --lk-footer-accent: #a99bff;
  --lk-footer-line: rgba(255, 255, 255, .14);
  --lk-scene-footer: url('img/night-footer.jpg');
  --lk-scene-river: url('img/night-river.jpg');
  --lk-scene-pagoda: url('img/night-pagoda.jpg');
  --lk-scene-campus: url('img/night-campus.jpg');
  --lk-scene-banner: url('img/night-banner.jpg');
  --lk-petal: #c4b5fd;
}

/* ---------- base ---------- */
body.lk-themed {
  margin: 0;
  background: linear-gradient(180deg, var(--lk-page) 0%, var(--lk-page-2) 100%);
  background-color: var(--lk-page);
  color: var(--lk-ink);
  font-family: 'Inter', 'Noto Sans KR', system-ui, sans-serif;
  transition: background-color .4s ease;
}
.lk-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lk-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--lk-accent); color: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.lk-skip:focus { top: 8px; }
.lk-themed :focus-visible { outline: 3px solid color-mix(in srgb, var(--lk-accent) 60%, white); outline-offset: 2px; }
.lk-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---------- header (floating glass pill) ---------- */
.lk-header { position: absolute; top: 0; left: 0; right: 0; z-index: 60; padding: 12px 16px 0; }
body.lk-themed { position: relative; }
body.homework-session .lk-header { display: none; }
.lk-nav {
  max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.8); border-radius: 20px; padding: 8px 10px 8px 16px;
  box-shadow: 0 8px 28px rgba(40, 28, 100, .14);
}
.lk-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: #2a1f6e; flex-shrink: 0; }
.lk-brand-mark { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #7c4dff, #5b2be0); color: #fff; font-size: 16px; box-shadow: 0 4px 12px rgba(109,61,245,.35); }
.lk-brand-word { font: 800 22px/1 'Inter', sans-serif; letter-spacing: -.02em; }
.lk-links { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.lk-links > a, .lk-more-btn {
  font: 600 13.5px/1 'Inter', sans-serif; color: #3b3366; text-decoration: none; padding: 10px 11px; border-radius: 10px;
  border: 0; background: none; cursor: pointer; white-space: nowrap; position: relative; display: inline-flex; align-items: center; gap: 6px;
}
.lk-links > a:hover, .lk-more-btn:hover { color: var(--lk-accent); background: var(--lk-accent-soft); }
.lk-links > a.is-active, .lk-more-btn.is-active { color: var(--lk-accent); }
.lk-links > a.is-active::after, .lk-more-btn.is-active::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 3px; height: 2.5px; border-radius: 2px; background: var(--lk-accent);
}
.lk-more-btn i { font-size: 10px; }
.lk-more { position: relative; }
.lk-more-menu, .lk-tod-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px; background: #fff; border: 1px solid #ece6fb;
  border-radius: 14px; box-shadow: 0 18px 40px rgba(40,28,100,.18); padding: 6px; z-index: 70;
}
.lk-more-menu a, .lk-tod-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: none;
  font: 600 14px/1.2 'Inter', sans-serif; color: #2f2766; text-decoration: none; cursor: pointer; text-align: left;
}
.lk-more-menu a i, .lk-tod-menu i { width: 16px; color: var(--lk-accent); }
.lk-more-menu a:hover, .lk-tod-menu button:hover, .lk-more-menu a.is-active { background: var(--lk-accent-soft); color: var(--lk-accent); }
.lk-tod-menu button[aria-checked="true"] { background: var(--lk-accent-soft); color: var(--lk-accent); }
.lk-tod-menu button[aria-checked="true"]::after { content: "\f00c"; font: 900 12px 'Font Awesome 6 Free'; margin-left: auto; }
.lk-nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lk-tod { position: relative; }
.lk-tod-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid #ece6fb; background: #fff; color: var(--lk-accent);
  cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; justify-content: center;
}
.lk-tod-btn:hover { background: var(--lk-accent-soft); }
/* the existing account widget (paywall/account-widget.js) mounts in .lk-nav-right */
#lkwm-acct a, #lkwm-acct button { font-family: 'Inter', sans-serif !important; }
#lkwm-acct > a[href*="login"] { background: var(--lk-accent) !important; padding: 10px 18px !important; box-shadow: 0 4px 14px rgba(109,61,245,.3) !important; }
.lk-burger { display: none; margin-left: auto; width: 40px; height: 40px; border-radius: 12px; border: 1px solid #ece6fb; background: #fff; color: #2f2766; font-size: 17px; cursor: pointer; }

@media (max-width: 1100px) {
  .lk-nav { flex-wrap: wrap; }
  .lk-burger { display: inline-flex; align-items: center; justify-content: center; order: 2; }
  .lk-nav-right { order: 1; margin-left: auto; }
  .lk-brand { order: 0; }
  .lk-links { order: 3; display: none; width: 100%; flex-direction: column; align-items: stretch; margin: 6px 0 4px; }
  .lk-links.is-open { display: flex; }
  .lk-links > a, .lk-more-btn { padding: 12px; font-size: 15px; }
  .lk-links > a.is-active::after, .lk-more-btn.is-active::after { display: none; }
  .lk-links > a.is-active { background: var(--lk-accent-soft); }
  .lk-more-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 10px; }
  .lk-more-btn { width: 100%; justify-content: space-between; }
}
@media (max-width: 480px) {
  .lk-wrap { padding: 0 10px; }
  .lk-header { padding: 8px 8px 0; }
  .lk-nav { padding: 6px 6px 6px 10px; gap: 8px; }
  .lk-brand-word { font-size: 19px; }
  #lkwm-acct a[href="/account.html"] { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
  #lkwm-acct button { display: none; }
}

/* ---------- scenic hero ---------- */
.lk-hero { position: relative; overflow: hidden; min-height: 400px; display: flex; align-items: center; padding: 104px 0 92px; isolation: isolate; }
.lk-hero.is-tall { min-height: 470px; }
.lk-hero.is-short { min-height: 330px; }
.lk-hero-art { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center right; background-color: var(--lk-page-2); transition: opacity .4s ease; }
.lk-hero[data-scene="river"] .lk-hero-art { background-image: var(--lk-scene-river); }
.lk-hero[data-scene="pagoda"] .lk-hero-art { background-image: var(--lk-scene-pagoda); }
.lk-hero[data-scene="campus"] .lk-hero-art { background-image: var(--lk-scene-campus); }
.lk-hero[data-scene="banner"] .lk-hero-art { background-image: var(--lk-scene-banner); }
.lk-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--lk-hero-wash); }
.lk-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; z-index: -1; background: linear-gradient(180deg, transparent, var(--lk-page)); }
.lk-hero-inner { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.lk-hero-copy { max-width: 640px; color: var(--lk-hero-ink); }
.lk-eyebrow { font: 700 13px/1.3 'Inter', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--lk-hero-eyebrow); margin: 0 0 12px; }
.lk-title {
  font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: clamp(40px, 5.6vw, 70px); line-height: 1.02; letter-spacing: -.01em; margin: 0 0 16px;
  background: var(--lk-hero-title); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lk-lead { font-size: 17px; line-height: 1.6; margin: 0; max-width: 470px; color: var(--lk-hero-ink); }
.lk-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.lk-petals { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.lk-petals i { position: absolute; top: -20px; width: 10px; height: 8px; border-radius: 80% 0 80% 0; background: var(--lk-petal); opacity: .8; animation: lk-fall linear infinite; }
.lk-petals i:nth-child(1) { left: 48%; animation-duration: 13s; animation-delay: -2s; }
.lk-petals i:nth-child(2) { left: 62%; animation-duration: 16s; animation-delay: -7s; transform: scale(.8); }
.lk-petals i:nth-child(3) { left: 74%; animation-duration: 12s; animation-delay: -4s; }
.lk-petals i:nth-child(4) { left: 86%; animation-duration: 18s; animation-delay: -11s; }
.lk-petals i:nth-child(5) { left: 55%; animation-duration: 20s; animation-delay: -15s; }
.lk-petals i:nth-child(6) { left: 92%; animation-duration: 14s; animation-delay: -9s; }
@keyframes lk-fall { 0% { transform: translate(0, 0) rotate(0); } 100% { transform: translate(-140px, 560px) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) {
  .lk-petals { display: none; }
  .lk-themed *, .lk-themed *::before, .lk-themed *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 760px) {
  .lk-hero { min-height: 0; padding: 96px 0 56px; }
  .lk-hero.is-tall, .lk-hero.is-short { min-height: 0; }
  .lk-hero::before { background: var(--lk-hero-wash-m); }
  .lk-hero-art { background-position: 72% center; }
  .lk-hero-inner { padding: 0 18px; }
  .lk-lead { font-size: 15.5px; }
}

/* ---------- shared building blocks ---------- */
.lk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; font: 700 15px/1 'Inter', sans-serif;
  padding: 14px 24px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.lk-btn-primary { background: var(--lk-accent); color: var(--lk-accent-ink); box-shadow: 0 8px 22px color-mix(in srgb, var(--lk-accent) 35%, transparent); }
.lk-btn-primary:hover { background: var(--lk-accent-hover); transform: translateY(-1px); }
.lk-btn-ghost { background: rgba(255,255,255,.88); color: var(--lk-accent); border-color: color-mix(in srgb, var(--lk-accent) 45%, white); }
.lk-btn-ghost:hover { background: #fff; transform: translateY(-1px); }
.lk-btn-sm { padding: 10px 16px; font-size: 13.5px; }
.lk-card { background: var(--lk-surface); border: 1px solid var(--lk-line); border-radius: 22px; box-shadow: var(--lk-shadow); }
.lk-panel { position: relative; z-index: 2; margin-top: -46px; }
.lk-h2 { font: 800 clamp(20px, 2.2vw, 24px)/1.25 'Inter', sans-serif; color: var(--lk-ink); margin: 0; letter-spacing: -.01em; }
.lk-serif { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; }
.lk-link { color: var(--lk-accent); font-weight: 700; font-size: 14px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.lk-link:hover { text-decoration: underline; }
.lk-pill { display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 'Inter', sans-serif; padding: 6px 11px; border-radius: 999px; background: var(--lk-accent-soft); color: var(--lk-accent); }
.lk-soon { background: linear-gradient(90deg, #7c4dff, #c084fc); color: #fff; }

/* ---------- footer ---------- */
.lk-footer { margin-top: 64px; position: relative; color: var(--lk-footer-ink); font-family: 'Inter', sans-serif; }
.lk-footer-scene { height: clamp(96px, 10vw, 150px); background: var(--lk-scene-footer) center bottom / cover no-repeat; }
.lk-footer-body { position: relative; background: var(--lk-footer-bg); padding: 22px 0 26px; transition: background-color .4s ease; }
.lk-footer-wave { position: absolute; left: 0; right: 0; top: -38px; width: 100%; height: 40px; display: block; fill: var(--lk-footer-bg); }
.lk-footer-inner { max-width: 1240px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 1.15fr 2.4fr 1.15fr; gap: 28px; align-items: start; }
.lk-footer .lk-brand { color: var(--lk-footer-ink); }
html[data-tod="day"] .lk-footer .lk-brand-mark { background: linear-gradient(135deg, #6d3df5, #4c1d95); }
html[data-tod="evening"] .lk-footer .lk-brand-mark, html[data-tod="night"] .lk-footer .lk-brand-mark { background: rgba(255,255,255,.14); box-shadow: none; }
.lk-footer-tag { color: var(--lk-footer-muted); font-size: 14px; line-height: 1.55; margin: 12px 0 0; max-width: 300px; }
.lk-footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.lk-fcol summary { list-style: none; font-weight: 700; font-size: 15px; color: var(--lk-footer-ink); margin-bottom: 10px; cursor: default; display: flex; justify-content: space-between; align-items: center; }
.lk-fcol summary::-webkit-details-marker { display: none; }
.lk-fcol summary i { display: none; font-size: 12px; }
.lk-fcol ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lk-fcol a { color: var(--lk-footer-muted); text-decoration: none; font-size: 14px; }
.lk-fcol a:hover { color: var(--lk-footer-ink); text-decoration: underline; text-decoration-color: var(--lk-footer-accent); text-underline-offset: 3px; }
.lk-footer-side { border-left: 1px solid var(--lk-footer-line); padding-left: 24px; }
.lk-footer-theme { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lk-footer-theme button {
  display: inline-flex; align-items: center; gap: 7px; font: 600 12.5px/1 'Inter', sans-serif; padding: 9px 10px; border-radius: 10px; cursor: pointer;
  color: var(--lk-footer-ink); background: transparent; border: 1px solid var(--lk-footer-line);
}
.lk-footer-theme button i { color: var(--lk-footer-accent); }
.lk-footer-theme button:hover { border-color: var(--lk-footer-accent); }
.lk-footer-theme button[aria-pressed="true"] { background: color-mix(in srgb, var(--lk-footer-accent) 22%, transparent); border-color: var(--lk-footer-accent); }
.lk-footer-copy { color: var(--lk-footer-muted); font-size: 12.5px; line-height: 1.6; margin: 14px 0 0; }
.lk-footer-copy a { color: var(--lk-footer-ink) !important; }
@media (max-width: 960px) {
  .lk-footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .lk-footer-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--lk-footer-line); padding-top: 18px; }
  .lk-footer-theme { grid-template-columns: repeat(4, auto); justify-content: start; }
}
@media (max-width: 767px) {
  .lk-footer-inner { padding: 0 18px; }
  .lk-footer-cols { grid-template-columns: 1fr; gap: 0; }
  .lk-fcol { border-bottom: 1px solid var(--lk-footer-line); }
  .lk-fcol summary { margin: 0; padding: 13px 0; cursor: pointer; }
  .lk-fcol summary i { display: inline; transition: transform .2s; }
  .lk-fcol[open] summary i { transform: rotate(180deg); }
  .lk-fcol ul { padding-bottom: 12px; }
  .lk-footer-theme { grid-template-columns: 1fr 1fr; }
}
@media print { .lk-header, .lk-footer, .lk-hero-art, .lk-petals { display: none !important; } }

/* Official LKWM social profiles. */
.lk-socials { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.lk-socials a { display:inline-flex; align-items:center; min-height:44px; padding:8px 13px; box-sizing:border-box; border:1px solid var(--lk-footer-line); border-radius:999px; color:var(--lk-footer-ink); font:600 13px/1.4 Inter,system-ui,sans-serif; text-decoration:none; }
.lk-socials a:hover { border-color:var(--lk-footer-accent); text-decoration:underline; text-underline-offset:3px; }
.lk-socials a:focus-visible { outline:2px solid var(--lk-footer-accent); outline-offset:3px; }
