/* hidden 속성은 언제나 숨긴다(버튼에 준 display 값이 덮어쓰지 않게) */
[hidden] { display: none !important; }

:root {
  /* 메인 월과 같은 톤: 따뜻한 검정 · 크림색 글자 · 빨간 빛 하나 */
  --red: #e62b1e;
  --bg: #0d0a08;
  --cream: #eadcc2;
  --cream-2: rgba(234, 220, 194, 0.62);
  --cream-3: rgba(234, 220, 194, 0.3);
  --line: rgba(234, 220, 194, 0.14);
  --card-bg: rgba(38, 31, 26, 0.62);
  --card-line: var(--line);
  --ink: var(--cream);
  --ink-2: var(--cream-2);
  --plum-900: var(--bg); /* 예전 이름(wall-classic 호환) */
  /* 폰트는 public/fonts에 직접 호스팅(npm run fonts). 모든 화면 Pretendard 하나로 */
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --serif: var(--sans);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html.fonts-pending body { opacity: 0; }
body {
  transition: opacity 0.35s;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--plum-900);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
/* iOS Safari: 16px 미만 입력칸에 초점이 가면 페이지가 확대돼 화면이 깨져 보인다 — 모든 입력칸 16px 이상 */
input, textarea, select { font-size: max(16px, 1em); }

.logo { display: inline-flex; align-items: baseline; font-weight: 800; letter-spacing: -0.02em; }
.logo .ted { color: var(--red); }
.logo .ted sup { font-size: 0.55em; vertical-align: 0.7em; margin-left: 0.02em; }
.logo .brand { color: var(--ink); }

/* 카드 — 크기는 부모가 --u(화면 단위)로 정한다 */
.card {
  --u: 10px;
  width: calc(var(--u) * 17);
  padding: calc(var(--u) * 0.95) calc(var(--u) * 1.05) calc(var(--u) * 1.1);
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  border-radius: calc(var(--u) * 0.7);
}
.card-head { display: flex; align-items: center; gap: calc(var(--u) * 0.7); }
.card .av { width: calc(var(--u) * 3); height: calc(var(--u) * 3); flex: none; }
.who { min-width: 0; }
.name {
  font-weight: 700;
  letter-spacing: -0.015em;
  font-size: calc(var(--u) * 1.15);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sub {
  font-size: calc(var(--u) * 0.8);
  color: var(--ink-2);
  margin-top: 0.15em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wish {
  font-family: var(--sans);
  font-weight: 350;
  letter-spacing: -0.015em;
  font-size: calc(var(--u) * 1.02);
  line-height: 1.32;
  margin: calc(var(--u) * 0.85) 0 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.av { display: block; border-radius: 50%; object-fit: cover; background: rgba(234, 220, 194, 0.12); }
/* 사진이 없을 때: 평면 단색 원 위에 짧은 이름(그라데이션·광택 없음) */
.av-name { display: grid; place-items: center; container-type: size; overflow: hidden; color: var(--cream); background: rgba(234, 220, 194, 0.14); }
.av-name span { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; padding-top: 0.04em; }

/* 필름 그레인(메인 월과 같은 질감) — <div class="grain"> */
.grain {
  position: fixed; inset: -50%; z-index: 0; pointer-events: none; opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* 공통 헤더(참가·모든 소원·관리) — shared.js mountHeader() */
.site-header {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 20px 14px; background: rgba(13, 10, 8, 0.86);
  border-bottom: 1px solid var(--line);
}
.sh-brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; min-width: 0; }
.sh-brand .logo { font-size: 19px; }
.sh-event { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream-2); white-space: nowrap; }
.sh-nav { display: flex; gap: 16px; }
.sh-nav a { font-size: 13px; color: var(--cream-2); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; white-space: nowrap; }
.sh-nav a:hover { color: var(--cream); }
.sh-nav a[aria-current='page'] { color: var(--cream); border-bottom-color: var(--cream); }
@media (max-width: 560px) { .sh-event { display: none; } .sh-nav { gap: 12px; } }
