/* ==========================================================================
   오늘입을 (TodayWear) — 사이트 스타일
   앱의 디자인 팔레트(보라 accent)와 앱 아이콘의 민트 톤을 함께 쓴다.
   ========================================================================== */

/* --- 토큰 ---------------------------------------------------------------- */

:root {
  --accent: #8b78da;
  --accent-strong: #6f59cf;
  --accent-soft: #ece8fe;
  --mint: #5ecfc4;

  --bg: #f9f8fe;
  --surface: #ffffff;
  --surface-alt: #f1eff6;
  --text: #1d1b28;
  --text-muted: #737182;
  --border: #e5e3ee;

  --shadow-sm: 0 1px 2px rgba(29, 27, 40, 0.06), 0 2px 8px rgba(29, 27, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(29, 27, 40, 0.08), 0 12px 32px rgba(29, 27, 40, 0.06);
  --shadow-lg: 0 12px 32px rgba(111, 89, 207, 0.14), 0 32px 64px rgba(29, 27, 40, 0.1);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --maxw: 1080px;
  --header-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
    "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #b9a9f6;
    --accent-strong: #cbbdff;
    --accent-soft: #2b2545;
    --mint: #6fded2;

    --bg: #121116;
    --surface: #1f1d25;
    --surface-alt: #2b2832;
    --text: #f2f1f6;
    --text-muted: #a5a3b1;
    --border: #3c3843;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
  }
}

/* --- 리셋 ---------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

/* display 를 지정한 요소는 hidden 속성만으로 감춰지지 않는다. */
[hidden] {
  display: none !important;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0;
  word-break: keep-all;
}

p {
  margin: 0;
  word-break: keep-all;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- 레이아웃 ------------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
}

.section--tight {
  padding: 56px 0;
}

.section--alt {
  background: var(--surface-alt);
}

.section-head {
  max-width: 620px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-muted);
}

/* --- 헤더 ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
}

.nav a:hover {
  background: var(--surface-alt);
  color: var(--text);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--accent-strong);
}

.nav .btn {
  margin-left: 8px;
}

/* .nav a 의 색이 버튼 색을 이기지 않도록 되돌린다. */
.nav a.btn--primary {
  color: #fff;
}

.nav a.btn:hover {
  background: var(--accent-strong);
}

/* 좁은 화면에서는 메뉴를 숨기는 대신 촘촘하게 줄여 그대로 보여 준다.
   더 좁아지면 브랜드 이름을 접어 링크 자리를 만든다. */
@media (max-width: 680px) {
  .wrap {
    padding: 0 16px;
  }

  .nav {
    gap: 0;
  }

  .nav a:not(.btn) {
    padding: 6px 8px;
    font-size: 0.85rem;
  }

  .nav .btn {
    margin-left: 6px;
    padding: 7px 13px;
    font-size: 0.85rem;
  }
}

@media (max-width: 460px) {
  .brand-name {
    display: none;
  }

  .nav a:not(.btn) {
    padding: 6px 6px;
    font-size: 0.8rem;
  }

  .nav .btn {
    margin-left: 4px;
    padding: 7px 11px;
    font-size: 0.8rem;
  }
}

/* --- 버튼 ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--accent-strong);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--accent-strong) 88%, #000);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--accent);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.88rem;
}

.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.btn[aria-disabled="true"]:hover {
  transform: none;
}

/* --- 히어로 -------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 72px 0 88px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -260px;
  left: 50%;
  width: 900px;
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(
      ellipse at 30% 40%,
      color-mix(in srgb, var(--accent) 30%, transparent),
      transparent 62%
    ),
    radial-gradient(
      ellipse at 72% 55%,
      color-mix(in srgb, var(--mint) 26%, transparent),
      transparent 62%
    );
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.2rem);
  margin-bottom: 18px;
}

.hero-copy h1 .accent {
  background: linear-gradient(100deg, var(--accent-strong), var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy .lead {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 44ch;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 28%, transparent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-note {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.hero-meta div {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.hero-meta strong {
  display: block;
  font-size: 1.02rem;
  color: var(--text);
}

@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-copy .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions,
  .hero-meta {
    justify-content: center;
  }
}

/* --- 폰 목업 ------------------------------------------------------------- */

.phone {
  position: relative;
  width: min(330px, 82vw);
  margin: 0 auto;
  aspect-ratio: 9 / 19.5;
  padding: 11px;
  border-radius: 46px;
  background: linear-gradient(160deg, #3a3646, #17161d);
  box-shadow: var(--shadow-lg);
}

.phone::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 26px;
  border-radius: 999px;
  background: #17161d;
  z-index: 3;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 스크린샷은 잘라내지 않고 전부 보여 준다.
   아래로 붙여 남는 여백을 위에 몰아 두면 노치가 앱 상단 바를 가리지 않는다. */
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  background: var(--surface);
}

.phone-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(
    170deg,
    color-mix(in srgb, var(--accent) 16%, var(--surface)),
    color-mix(in srgb, var(--mint) 14%, var(--surface))
  );
  width: 100%;
  height: 100%;
  justify-content: center;
}

.phone-placeholder img {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

.phone-placeholder span {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- 기능 카드 ----------------------------------------------------------- */

.grid {
  display: grid;
  gap: 20px;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}

.card {
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.card .icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.card .icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.94rem;
  color: var(--text-muted);
}

/* --- 스크린샷 갤러리 ------------------------------------------------------ */

.shots {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 8px 4px 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.shots::-webkit-scrollbar {
  height: 8px;
}

.shots::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.shot {
  flex: 0 0 auto;
  width: 216px;
  scroll-snap-align: center;
  text-align: center;
}

.shot .frame {
  aspect-ratio: 9 / 19.5;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
}

.shot .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot .frame .empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 20px;
}

.shot figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* --- 스펙 테이블 --------------------------------------------------------- */

.specs {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.specs dl {
  margin: 0;
}

.specs .row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 15px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
}

.specs .row:last-child {
  border-bottom: 0;
}

.specs dt {
  color: var(--text-muted);
  font-weight: 600;
}

.specs dd {
  margin: 0;
}

@media (max-width: 520px) {
  .specs .row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* --- 다운로드 CTA -------------------------------------------------------- */

.cta {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 40px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--accent) 12%, var(--surface)),
    color-mix(in srgb, var(--mint) 10%, var(--surface))
  );
  box-shadow: var(--shadow-md);
}

.cta img.appicon {
  width: 84px;
  height: 84px;
  margin: 0 auto 20px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

.cta h2 {
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  margin-bottom: 10px;
}

.cta p {
  color: var(--text-muted);
  margin-bottom: 26px;
}

.cta .store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* --- 패치노트 ------------------------------------------------------------ */

.log-layout {
  display: grid;
  grid-template-columns: 208px 1fr;
  gap: 48px;
  align-items: start;
}

.log-side {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.log-side h2 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.log-side ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.log-side a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.log-side a:hover {
  background: var(--surface-alt);
  color: var(--text);
  text-decoration: none;
}

.log-side a .when {
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 500;
  opacity: 0.75;
}

.log-side a.is-latest {
  color: var(--accent-strong);
}

.release {
  position: relative;
  padding: 0 0 40px 30px;
  border-left: 2px solid var(--border);
}

.release:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.release::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--border);
}

.release.is-latest::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent);
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.release-head h2 {
  font-size: 1.5rem;
  margin: 0;
}

.tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.tag--latest {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: transparent;
}

.release-date {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.release-body {
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 860px) {
  .log-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .log-side {
    position: static;
  }

  .log-side ol {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* --- 공지사항 ------------------------------------------------------------ */

.notice-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.notice[open] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.notice summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}

.notice summary::-webkit-details-marker {
  display: none;
}

.notice summary:hover .notice-title {
  color: var(--accent-strong);
}

.notice-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.04rem;
  font-weight: 700;
  word-break: keep-all;
}

/* 펼침 표시. 열리면 위를 향한다. */
.notice-title::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.notice[open] .notice-title::after {
  transform: translateY(2px) rotate(-135deg);
}

.notice-date {
  flex: 0 0 auto;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.notice-body {
  margin: 0 22px 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* --- 마크다운 본문 ------------------------------------------------------- */

.md > *:first-child {
  margin-top: 0;
}

.md > *:last-child {
  margin-bottom: 0;
}

.md h1 {
  font-size: 1.4rem;
  margin: 28px 0 12px;
}

.md h2 {
  font-size: 1.12rem;
  margin: 26px 0 10px;
}

.md h3 {
  font-size: 0.98rem;
  margin: 22px 0 8px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.md p {
  margin: 0 0 14px;
}

.md ul,
.md ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.md li {
  margin-bottom: 6px;
}

.md li::marker {
  color: var(--accent);
}

.md a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.md strong {
  font-weight: 700;
}

.md code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-alt);
  font-family: var(--font-mono);
  font-size: 0.87em;
}

.md pre {
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.md pre code {
  padding: 0;
  background: none;
  font-size: 0.85rem;
  line-height: 1.6;
}

.md blockquote {
  margin: 0 0 16px;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}

.md hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.md table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.md th,
.md td {
  padding: 9px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.md th {
  background: var(--surface-alt);
  font-weight: 700;
}

/* --- 상태 표시 ----------------------------------------------------------- */

.state {
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.state--error {
  max-width: 620px;
  margin: 0 auto;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}

.state--error h3 {
  color: var(--text);
  margin-bottom: 8px;
}

.state--error code {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-alt);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* --- 관리자 화면 --------------------------------------------------------- */

.login-box {
  max-width: 400px;
  margin: 40px auto;
  padding: 36px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.login-box h1 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.login-box p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.login-box .btn {
  width: 100%;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
}

.field > span em {
  font-style: normal;
  font-weight: 500;
  opacity: 0.8;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.field input:focus,
.field textarea:focus,
.editor:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.form-error {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, #d9666a 14%, var(--surface));
  border: 1px solid color-mix(in srgb, #d9666a 40%, transparent);
  font-size: 0.88rem;
}

.form-note {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.admin-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.admin-bar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 216px 1fr;
  gap: 36px;
  align-items: start;
}

.admin-side h2 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.admin-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-side-head h2 {
  margin: 0;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
}

.admin-item:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.admin-item.is-on {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.admin-item .when {
  margin-left: auto;
  font-size: 0.74rem;
  font-weight: 500;
  opacity: 0.8;
}

.admin-empty {
  padding: 10px 12px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.admin-main {
  padding: 28px 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
}

.editor-head em {
  font-style: normal;
  font-weight: 500;
  opacity: 0.8;
}

.editor-tabs {
  display: flex;
  gap: 4px;
}

.chip {
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.chip.is-on {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-strong);
}

.editor {
  width: 100%;
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
}

.editor-preview {
  min-height: 200px;
  padding: 20px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

@media (max-width: 860px) {
  .admin-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-main {
    padding: 22px 20px;
  }
}

/* --- 푸터 ---------------------------------------------------------------- */

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

/* --- 등장 애니메이션 ----------------------------------------------------- */

/* .js 는 site.js 가 붙인다. 스크립트가 없거나 실패하면 본문이 그냥 보인다. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card:hover,
  .btn:hover {
    transform: none;
  }
}
