:root {
  --gl-canvas: #fbf9f5;
  --gl-surface: #ffffff;
  --gl-surface-soft: #f3f0ea;
  --gl-ink: #1a1733;
  --gl-ink-soft: #504b67;
  --gl-muted: #625d72;
  --gl-line: rgba(31, 27, 58, 0.12);
  --gl-night: #17142f;
  --gl-night-deep: #0e1027;
  --gl-forest: #174b38;
  --gl-coral: #ff6b67;
  --gl-amber: #ffbd59;
  --gl-violet: #9568ff;
  --gl-cyan: #35c6d8;
  --gl-gradient: linear-gradient(110deg, var(--gl-coral) 0%, var(--gl-amber) 34%, var(--gl-violet) 68%, var(--gl-cyan) 100%);
  --gl-radius-sm: 12px;
  --gl-radius: 20px;
  --gl-radius-lg: 30px;
  --gl-shadow-sm: 0 8px 24px rgba(26, 20, 51, 0.07);
  --gl-shadow: 0 18px 48px rgba(26, 20, 51, 0.1);
  --gl-focus: 0 0 0 4px rgba(53, 198, 216, 0.28);

  /* 기존 사용자 화면의 변수도 같은 브랜드 체계로 연결합니다. */
  --primary-color: var(--gl-forest);
  --secondary-color: #2d6b53;
  --accent-color: var(--gl-coral);
  --bg-gradient-start: var(--gl-canvas);
  --bg-gradient-end: #f3f1f8;
  --text-dark: var(--gl-ink);
  --text-light: var(--gl-muted);
  --button-gradient-start: #2b6650;
  --button-gradient-end: var(--gl-forest);
  --header-bg: rgba(23, 20, 47, 0.96);
  --footer-bg: var(--gl-night);
  --card-border: var(--gl-line);
  --shadow-color: rgba(26, 20, 51, 0.09);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--gl-canvas);
  color: var(--gl-ink);
  font-family: "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: none;
  box-shadow: var(--gl-focus);
}

::selection {
  background: rgba(149, 104, 255, 0.24);
  color: var(--gl-ink);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  transform: translateY(-180%);
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  color: var(--gl-ink);
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(100% - 40px, 1180px);
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1050;
  min-height: 76px;
  background: var(--gl-night);
}

.site-nav {
  min-height: 76px;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(16, 16, 39, 0.94);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.site-nav__inner {
  min-height: 76px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
}

.site-brand:hover {
  color: #fff;
}

.site-brand__mark {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.site-brand__logo {
  display: block;
  width: 64px;
  height: 64px;
  max-width: none;
  transform: translate(-10px, -2px);
}

.site-brand__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.site-brand__copy strong {
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.site-brand__copy small {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-family: "Manrope", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__link,
.site-nav__action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.91rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.site-nav__link {
  margin: 0;
  padding: 8px 14px;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.site-nav__action {
  margin-left: 10px;
  padding: 8px 18px;
  background: #fff;
  color: var(--gl-night);
}

.site-nav__action:hover {
  color: var(--gl-night);
  transform: translateY(-1px);
}

.site-nav__action--ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #fff;
}

.site-nav__action--ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.site-nav__toggle {
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: none !important;
}

.site-nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: #fff;
}

.site-nav__toggle:focus-visible {
  box-shadow: var(--gl-focus) !important;
}

.site-main {
  flex: 1 0 auto;
  min-height: 54vh;
  padding: 0;
  background: var(--gl-canvas);
}

.site-flashes {
  position: relative;
  z-index: 20;
  padding-top: 18px;
}

.site-flashes .alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 840px;
  margin: 0 auto 10px;
  padding: 14px 52px 14px 18px;
  border: 1px solid var(--gl-line);
  background: #fff;
  color: var(--gl-ink);
}

.site-main > .container:first-child,
.site-main > .mypage-container,
.site-main > .premium-container,
.site-main > .create-container {
  margin-top: clamp(28px, 5vw, 64px);
  margin-bottom: clamp(48px, 7vw, 92px);
}

.site-main .alert {
  border: 0;
  border-radius: 14px;
  box-shadow: var(--gl-shadow-sm);
}

.site-main .card {
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-radius);
  box-shadow: var(--gl-shadow-sm);
}

.site-main .btn-primary {
  border: 0;
  background: var(--gl-forest);
  box-shadow: 0 10px 24px rgba(23, 75, 56, 0.18);
}

.site-main .btn-primary:hover {
  background: #0f3e2d;
}

.site-footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 64px 0 max(92px, calc(24px + env(safe-area-inset-bottom)));
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 16%, rgba(53, 198, 216, 0.12), transparent 27%),
    radial-gradient(circle at 18% 94%, rgba(149, 104, 255, 0.15), transparent 31%),
    var(--gl-night-deep);
  color: rgba(255, 255, 255, 0.68);
  box-shadow: none;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

.site-footer .container {
  position: relative;
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(150px, 0.6fr) minmax(250px, 0.85fr);
  gap: 64px;
  padding-bottom: 40px;
}

.site-footer__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.site-footer__brand span {
  font-family: "Manrope", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
}

.site-footer__intro p {
  max-width: 330px;
  margin: 20px 0 0;
  line-height: 1.8;
}

.site-footer__links,
.site-footer__contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.site-footer__links strong,
.site-footer__contact strong {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.62);
  font-family: "Manrope", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
}

.site-footer__links a,
.site-footer__contact a {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__contact a:hover {
  color: #fff;
}

.site-footer__contact p {
  margin: 0;
}

.site-footer__company {
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  line-height: 1.75;
}

.site-footer__company p {
  margin: 0;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  font-family: "Manrope", "Noto Sans KR", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.site-footer__bottom a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  text-decoration: none;
}

.kakao-channel-float {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 1040;
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border: 1px solid rgba(25, 22, 10, 0.12);
  border-radius: 999px;
  background: #fee500;
  color: #191600;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 16px 38px rgba(26, 20, 51, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kakao-channel-float:hover {
  transform: translateY(-2px);
  color: #191600;
  box-shadow: 0 20px 46px rgba(26, 20, 51, 0.3);
}

.kakao-channel-float i {
  font-size: 1.15rem;
}

@media (max-width: 991.98px) {
  .site-nav,
  .site-nav__inner {
    min-height: 68px;
  }

  .site-nav .navbar-collapse {
    margin: 12px 0 18px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
  }

  .site-nav__links {
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
  }

  .site-nav__link,
  .site-nav__action {
    justify-content: flex-start;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding-inline: 14px;
  }

  .site-nav__action {
    justify-content: center;
    margin-top: 8px;
  }

  .site-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 42px 28px;
  }

  .site-footer__intro {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .site-brand__mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 10px;
  }

  .site-brand__logo {
    width: 55px;
    height: 55px;
    transform: translate(-8px, -2px);
  }

  .site-brand__copy strong {
    font-size: 1.08rem;
  }

  .site-brand__copy small {
    font-size: 0.54rem;
  }

  .site-footer {
    padding-top: 48px;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .site-footer__intro {
    grid-column: auto;
  }

  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .kakao-channel-float {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    min-width: 52px;
    min-height: 52px;
    padding: 11px 14px;
    font-size: 0.86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
