/* ==========================================================================
   soma game studio
   색과 형태는 LA-PS3 v9 UI(game/say_v9_*.rpy, tokens.rpy)를 따른다.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* 바탕과 패널 */
  --bg: #0c0b0d;
  --bg-2: #111012;
  --panel: #1c1a1c;
  --panel-2: #232123;
  --panel-hover: #493526;
  --focus-row: rgba(104, 69, 41, 0.4);
  --line: #3a3632;
  --divider: #484246;
  --hairline: #262427;

  /* 글자 */
  --title: #e4d8bd;
  --text: #e9dfcb;
  --text-2: #c7baa5;
  --text-3: #b6aa99;
  --meta: #a69b8d;
  --label: #c6a476;

  /* 강조 */
  --amber: #d89058;
  --amber-name: #efbb7e;
  --amber-btn: #d6a368;
  --amber-btn-hover: #e2b47c;
  --amber-ink: #261c15;
  --amber-soft: rgba(216, 144, 88, 0.14);
  --mint: #b4d6c3;
  --cyan: #4fd8e8;

  --radius: 6px;
  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}

/* ---------- 기본 ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--title);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

p,
dl,
dd,
figure {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

::selection {
  background: var(--amber);
  color: var(--amber-ink);
}

/* ---------- 언어 전환: 현재 언어가 아닌 쪽을 숨긴다 ---------- */

html[data-lang="ko"] body [lang="en"],
html[data-lang="en"] body [lang="ko"] {
  display: none !important;
}

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

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--amber-btn);
  color: var(--amber-ink);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* 채워 넣어야 할 자리 표시 */
.todo {
  color: var(--text-2);
  background: var(--amber-soft);
  border-bottom: 1px dashed rgba(216, 144, 88, 0.7);
  border-radius: 3px;
  padding: 0 0.2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* 게임 화면의 'BAR-09' 같은 넓은 자간 표기 */
.label {
  display: block;
  color: var(--label);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* 넓은 자간은 로마자에만. 한글은 글자가 흩어져 보인다 */
.label [lang="ko"],
.subhead [lang="ko"],
.copy-block h3 [lang="ko"] {
  letter-spacing: 0.04em;
}

.code {
  color: var(--meta);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

/* ---------- 패널 ---------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

/* 'BAR-09 | 재생 목록' 같은 패널 머리 */
.panel-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--divider);
}

.panel-bar .label {
  color: #b8aa96;
  font-size: 12px;
  letter-spacing: 0.3em;
}

.panel-bar .sep {
  width: 1px;
  height: 18px;
  background: #716354;
}

.panel-bar strong {
  color: var(--title);
  font-size: 17px;
  font-weight: 700;
}

/* 화자 이름처럼 앞에 호박색 막대를 붙인 제목 */
.bar-title {
  position: relative;
  padding-left: 15px;
}

.bar-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 3px;
  background: var(--amber);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(12, 11, 13, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.site-header.is-scrolled {
  background: rgba(12, 11, 13, 0.92);
  border-bottom-color: var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  width: auto;
  height: 26px;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-3);
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--panel-2);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 게임 우상단 '메뉴' 버튼과 같은 모양 */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--meta);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.lang-toggle:hover {
  background: var(--panel-hover);
}

html[data-lang="ko"] .lang-opt[data-opt="ko"],
html[data-lang="en"] .lang-opt[data-opt="en"] {
  color: var(--text);
}

.lang-sep {
  opacity: 0.5;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s ease, top 0.2s ease;
}

.menu-toggle span:first-child {
  top: 15px;
}

.menu-toggle span:last-child {
  top: 23px;
}

.nav-open .menu-toggle span:first-child {
  top: 19px;
  transform: rotate(45deg);
}

.nav-open .menu-toggle span:last-child {
  top: 19px;
  transform: rotate(-45deg);
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-block;
  }

  .header-tools {
    margin-left: auto;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    margin: 0;
    background: rgba(12, 11, 13, 0.98);
    border-bottom: 1px solid var(--divider);
  }

  .nav-open .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    padding: 8px var(--gutter) 20px;
  }

  .site-nav a {
    padding: 12px 8px;
    font-size: 17px;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--amber-btn);
  color: var(--amber-ink);
}

.btn-primary:hover {
  background: var(--amber-btn-hover);
}

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

.btn-ghost:hover {
  background: var(--panel-hover);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.text-link:hover {
  color: var(--amber-name);
}

/* ---------- 히어로: 메인 메뉴 화면을 옮겨 왔다 ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: min(calc(100vh - var(--header-h)), 860px);
  overflow: hidden;
  background: var(--bg);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 11, 13, 0.96) 0%, rgba(12, 11, 13, 0.9) 30%, rgba(12, 11, 13, 0.35) 62%, rgba(12, 11, 13, 0.05) 100%),
    linear-gradient(0deg, rgba(12, 11, 13, 0.9) 0%, rgba(12, 11, 13, 0) 28%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(48px, 8vh, 96px);
  padding-bottom: clamp(48px, 8vh, 96px);
}

.hero .label {
  color: #c1b298;
  letter-spacing: 0.22em;
}

.hero-title {
  margin-top: 18px;
  color: var(--title);
  font-size: clamp(68px, 9.5vw, 136px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.title-rule {
  display: block;
  width: 58px;
  height: 2px;
  margin-top: 28px;
  background: var(--amber);
}

.hero-sub {
  margin-top: 22px;
  color: var(--text-2);
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero-lead {
  max-width: 30em;
  margin-top: 14px;
  color: var(--text-3);
  font-size: clamp(16px, 1.4vw, 18px);
}

.hero-note {
  margin-top: 22px;
  font-size: 15px;
}

/* 메인 메뉴 목록: 첫 항목이 선택된 상태로 시작한다 */
.hero-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(340px, 100%);
  margin-top: 36px;
}

.hero-menu a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  padding: 0 18px 0 22px;
  border-radius: 2px;
  color: var(--title);
  font-size: 19px;
  font-weight: 500;
  transition: background-color 0.12s ease;
}

.hero-menu a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--amber);
  opacity: 0;
}

.hero-menu .arrow {
  color: var(--amber);
  opacity: 0;
}

.hero-menu a:hover,
.hero-menu a:focus-visible,
.hero-menu:not(:hover):not(:focus-within) a:first-child {
  background: var(--focus-row);
}

.hero-menu a:hover::before,
.hero-menu a:focus-visible::before,
.hero-menu:not(:hover):not(:focus-within) a:first-child::before,
.hero-menu a:hover .arrow,
.hero-menu a:focus-visible .arrow,
.hero-menu:not(:hover):not(:focus-within) a:first-child .arrow {
  opacity: 1;
}

.hero-menu a:focus-visible {
  outline: none;
}

/* 대사 창 아래 '수신' 줄 */
.ticker {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--divider);
  background: rgba(28, 26, 28, 0.94);
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 46px;
  font-size: 14px;
}

.ticker-label {
  flex-shrink: 0;
  color: var(--amber);
}

.ticker-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #cfc2ad;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-meta {
  flex-shrink: 0;
  color: var(--text-3);
  font-size: 12px;
  letter-spacing: 0.06em;
}

@media (max-width: 760px) {
  .hero {
    min-height: 0;
  }

  .hero-media {
    position: relative;
    aspect-ratio: 4 / 3;
    max-height: 52vh;
    width: 100%;
  }

  .hero-media img {
    object-position: 78% center;
  }

  .hero-media::after {
    background: linear-gradient(0deg, var(--bg) 0%, rgba(12, 11, 13, 0.4) 45%, rgba(12, 11, 13, 0) 100%);
  }

  .hero-inner {
    margin-top: -72px;
    padding-top: 0;
    padding-bottom: 48px;
  }

  .hero-menu {
    width: 100%;
  }

  .ticker-meta {
    display: none;
  }
}

/* ---------- 섹션 공통 ---------- */

.section {
  padding: clamp(72px, 10vw, 128px) 0;
  border-top: 1px solid var(--hairline);
}

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

/* 장소 안내 카드처럼 왼쪽에 호박색 막대 */
.section-head {
  position: relative;
  max-width: 780px;
  margin-bottom: clamp(36px, 5vw, 56px);
  padding-left: 22px;
}

.section-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 6px;
  width: 3px;
  background: var(--amber);
}

.section-head .label {
  margin-bottom: 14px;
}

.section-head h2 {
  color: #eee1ca;
  font-size: clamp(30px, 4.2vw, 46px);
}

.lead {
  margin-top: 16px;
  color: #bdb19f;
  font-size: clamp(17px, 1.5vw, 19px);
}

.section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: none;
}

.subhead {
  margin: clamp(48px, 6vw, 72px) 0 18px;
  color: #b8aa96;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ---------- 이미지 ---------- */

.shot {
  overflow: hidden;
}

.shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.shot figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--divider);
  color: var(--text-2);
  font-size: 14px;
}

.shot figcaption .code {
  flex-shrink: 0;
}

.shot a {
  display: block;
}

.shot a:hover img {
  opacity: 0.92;
}

/* ---------- 게임 ---------- */

.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.facts dl {
  padding: 6px 22px 10px;
}

.fact {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
}

.fact + .fact {
  border-top: 1px solid var(--hairline);
}

.fact dt {
  color: var(--meta);
  font-size: 14px;
}

.fact dd {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mint);
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
}

@media (max-width: 900px) {
  .game-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 카드 ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cards--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  padding: 24px 26px 28px;
}

.card-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.card h3 {
  margin-bottom: 12px;
  color: var(--amber-name);
  font-size: 21px;
}

.card p {
  color: var(--text-3);
  font-size: 16px;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .cards,
  .shots {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 등장인물: 칵테일 제조 화면의 초상 칸 ---------- */

.cast-lead {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.char {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.char-portrait {
  position: relative;
  aspect-ratio: 480 / 628;
  background: #08070a;
}

.char-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.char-body {
  flex: 1;
  padding: 18px 20px 22px;
  border-top: 1px solid var(--divider);
}

.char-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.char h3 {
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
}

.char .role {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.char p.blurb {
  margin-top: 12px;
  color: var(--text-3);
  font-size: 15px;
  line-height: 1.7;
}

.cast-rest {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.char--row {
  flex-direction: row;
}

.char--row .char-portrait {
  flex-shrink: 0;
  width: 128px;
  aspect-ratio: auto;
}

.char--row .char-portrait img {
  object-position: center 18%;
}

.char--row .char-body {
  border-top: 0;
  border-left: 1px solid var(--divider);
  padding: 16px 18px 18px;
}

.char--row h3 {
  font-size: 20px;
}

.char--row p.blurb {
  margin-top: 8px;
  font-size: 14px;
}

.cast-note {
  margin-top: 20px;
  color: var(--meta);
  font-size: 14px;
}

@media (max-width: 1000px) {
  .cast-rest {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .cast-lead {
    grid-template-columns: minmax(0, 1fr);
  }

  .cast-lead .char {
    flex-direction: row;
  }

  .cast-lead .char-portrait {
    flex-shrink: 0;
    width: 132px;
    aspect-ratio: auto;
  }

  .cast-lead .char-portrait img {
    object-position: center 18%;
  }

  .cast-lead .char-body {
    border-top: 0;
    border-left: 1px solid var(--divider);
  }

  .cast-rest {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .char--row .char-portrait,
  .cast-lead .char-portrait {
    width: 104px;
  }
}

/* ---------- 스튜디오 ---------- */

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 6vw, 88px);
}

.studio-grid .section-head {
  margin-bottom: 0;
}

.mini-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
  padding: 22px 0 0 22px;
  border-top: 1px solid var(--hairline);
}

.mini-facts dt {
  color: var(--meta);
  font-size: 13px;
}

.mini-facts dd {
  margin-top: 4px;
  color: var(--text);
  font-weight: 600;
}

.member {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
}

.member + .member {
  margin-top: 12px;
}

.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px dashed var(--divider);
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--meta);
  font-size: 11px;
}

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

.avatar--mark {
  border-style: solid;
}

.avatar--mark img {
  width: 46%;
  height: 46%;
  object-fit: contain;
}

.member h3 {
  font-size: 18px;
}

.member .role {
  margin-top: 2px;
  color: var(--amber-name);
  font-size: 14px;
}

.member .bio {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 15px;
}

@media (max-width: 900px) {
  .studio-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .mini-facts {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- 개발 일지 목록: 뮤직 화면의 곡 목록 ---------- */

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--divider);
}

.post-item {
  border-bottom: 1px solid var(--divider);
}

.post-link {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 170px auto;
  align-items: baseline;
  gap: 20px;
  padding: 24px 16px;
  transition: background-color 0.12s ease;
}

.post-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--amber);
  opacity: 0;
}

.post-link:hover {
  background: var(--focus-row);
}

.post-link:hover::before {
  opacity: 1;
}

.post-no {
  color: var(--meta);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.post-title {
  display: block;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.post-summary {
  display: block;
  margin-top: 6px;
  color: var(--text-3);
  font-size: 16px;
}

.post-date {
  color: var(--meta);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.post-arrow {
  color: var(--meta);
  transition: transform 0.15s ease, color 0.15s ease;
}

.post-link:hover .post-arrow {
  color: var(--amber);
  transform: translateX(4px);
}

.notice {
  padding: 28px 16px;
  color: var(--meta);
  font-size: 15px;
}

@media (max-width: 700px) {
  .post-link {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 4px 14px;
    padding: 20px 12px;
  }

  .post-date {
    grid-column: 2 / 3;
    grid-row: 2;
  }
}

/* ---------- 연락처 ---------- */

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: clamp(28px, 5vw, 48px);
}

.contact-panel .section-head {
  margin-bottom: 0;
}

.mail-link {
  display: inline-block;
  margin-top: 20px;
  margin-left: 22px;
  color: var(--text);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  transition: color 0.15s ease;
}

.mail-link:hover {
  color: var(--amber-name);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 220px;
}

@media (max-width: 760px) {
  .contact-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-actions {
    min-width: 0;
  }
}

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

.site-footer {
  padding: 48px 0 40px;
  border-top: 1px solid var(--hairline);
  color: var(--meta);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand img {
  width: auto;
  height: 22px;
}

.footer-note {
  margin-top: 10px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-nav a {
  color: var(--text-3);
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 32px;
}

.footer-bottom::before {
  content: "";
  display: block;
  margin-bottom: 24px;
  border-top: 1px solid var(--hairline);
}

.footer-bottom p + p {
  margin-top: 4px;
}

/* ---------- 하위 페이지 ---------- */

.page-hero {
  padding: clamp(56px, 8vw, 104px) 0 clamp(36px, 5vw, 56px);
}

.page-hero .section-head {
  margin-bottom: 0;
}

.page-hero h1 {
  color: #eee1ca;
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -0.03em;
}

.page-body {
  padding-bottom: clamp(72px, 10vw, 128px);
}

/* ---------- 글 보기 ---------- */

.post {
  max-width: 760px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  margin-bottom: 32px;
}

.post-header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--divider);
}

.post-header h1 {
  margin-top: 10px;
  color: #eee1ca;
  font-size: clamp(30px, 4.4vw, 44px);
  letter-spacing: -0.03em;
}

.fallback-note {
  margin-bottom: 24px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text-3);
  font-size: 15px;
}

.prose {
  color: var(--text);
  font-size: 18px;
  line-height: 1.85;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2em;
  color: var(--amber-name);
  font-size: 24px;
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 20px;
}

.prose a {
  color: var(--amber-name);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose img,
.prose video {
  margin: 1.8em 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--amber);
  color: var(--text-3);
}

.prose code {
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: var(--panel-2);
  font-size: 0.88em;
}

.prose pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--divider);
}

/* ---------- 프레스 킷 ---------- */

.press-section {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px 40px;
  padding: 44px 0;
  border-top: 1px solid var(--hairline);
}

.press-section > h2 {
  font-size: 20px;
}

.fact-table > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline);
}

.fact-table > div:first-child {
  padding-top: 0;
}

.fact-table dt {
  color: var(--meta);
  font-size: 15px;
}

.fact-table a,
.inline-link {
  color: var(--amber-name);
}

.copy-blocks {
  display: grid;
  gap: 16px;
}

.copy-block {
  padding: 20px 24px;
}

.copy-block h3 {
  margin-bottom: 8px;
  color: var(--meta);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.copy-block p {
  color: var(--text);
}

.assets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.asset {
  overflow: hidden;
}

.asset-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: 24px;
  background: var(--bg);
}

.asset-preview--light {
  background: #ece2c8;
}

.asset-preview img {
  width: 74%;
  max-height: 100%;
  object-fit: contain;
}

.asset-preview img.is-mark {
  width: auto;
  height: 62%;
}

.asset-preview--shot {
  padding: 0;
}

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

.asset-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 16px;
  border-top: 1px solid var(--divider);
  font-size: 15px;
}

.asset-links {
  display: flex;
  gap: 12px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.asset-links a {
  color: var(--amber-name);
}

.asset-links a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .press-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .assets {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .fact-table > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h) - 160px);
  padding: 80px 0;
  text-align: center;
}

.not-found .label {
  margin-bottom: 18px;
}

.not-found p {
  margin: 14px 0 32px;
  color: var(--text-3);
}

/* ---------- 스크롤 등장 효과 ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

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

@media print {
  .site-header,
  .ticker {
    display: none;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
