/* peer-nanda-design 스킬 토큰 기반 - skills/peer-nanda-design/SKILL.md 참고
   2026-08 업데이트: 배경을 은은한 미스트 그라데이션 + 종이 질감으로,
   서체를 Noto Sans KR 기반 미니멀 톤으로 리프레시. 로고 컬러(남색/하늘색)는 그대로 유지. */
:root {
  --pn-primary: #3855A5;
  --pn-secondary: #4E7BC7;
  --pn-muted: #5C6690;
  --pn-caption: #555555;
  --pn-bg: #FFFEFA;
  --pn-on-primary: #FFFFFF;
  --pn-border: #E1E4EA;
  --pn-danger-bg: #FBEAEA;
  --pn-danger-text: #A03B3B;
}

/* 메인 헤드라인 전용 손글씨 폰트 (어비 세현체, 상업적 이용 무료) */
@font-face {
  font-family: 'UhBeeSe_hyun';
  src: url('https://cdn.jsdelivr.net/gh/fontbee/font@main/Uhbeefont/UhBeeSe_hyun.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--pn-muted);
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  background: radial-gradient(130% 90% at 50% -10%, #eef1f8 0%, #f4f6fb 30%, #faf9f6 60%, var(--pn-bg) 100%);
}

/* 은은한 종이/그레인 질감 - 배경이 너무 밋밋하지 않게 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 20px 20px 40px;
  display: flex;
  flex-direction: column;
}

/* 로고는 브랜드 관습대로 작게, 우상단 고정 위치 */
.pn-corner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 12px;
}
.pn-corner-header img {
  width: 28px;
  height: auto;
  opacity: 0.92;
}
.pn-logout-link {
  background: none;
  border: none;
  color: #9AA0B4;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 2px;
}
.pn-logout-link:hover { color: var(--pn-danger-text); }

.pn-nickname-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--pn-muted);
  padding: 0 0 14px;
}
.pn-nickname-row #nickname-display {
  font-weight: 600;
  color: var(--pn-secondary);
}

.pn-pill {
  display: inline-block;
  background: var(--pn-primary);
  color: var(--pn-on-primary);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 16px;
  border-radius: 999px;
  margin: 0 auto 16px;
  text-align: center;
}

.pn-title {
  font-family: 'UhBeeSe_hyun', 'Noto Sans KR', sans-serif;
  font-size: 28px;
  font-weight: normal;
  color: var(--pn-primary);
  text-align: center;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.pn-lead {
  font-size: 14.5px;
  font-weight: 300;
  color: var(--pn-caption);
  text-align: left;
  line-height: 1.75;
  letter-spacing: 0.01em;
  margin: 0 0 26px;
}

.pn-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(217, 222, 234, 0.7);
  border-radius: 16px;
  padding: 18px 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(56, 85, 165, 0.03), 0 10px 24px rgba(56, 85, 165, 0.05);
  transition: box-shadow 0.2s ease;
}

.pn-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--pn-primary);
  margin: 0 0 10px;
}

.pn-card p, .pn-card li {
  font-size: 13.5px;
  font-weight: 300;
  color: var(--pn-muted);
  line-height: 1.7;
}

.pn-card ul { margin: 0; padding-left: 18px; }

.pn-safety {
  background: rgba(251, 234, 234, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid #EFC9C9;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.pn-safety h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--pn-danger-text);
  margin: 0 0 8px;
}
.pn-safety p {
  font-size: 13px;
  font-weight: 300;
  color: var(--pn-danger-text);
  line-height: 1.7;
  margin: 0 0 4px;
}
.pn-safety a { color: var(--pn-danger-text); font-weight: 600; }

.pn-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--pn-muted);
  margin-top: 12px;
}
.pn-check-row input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }

.pn-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  margin-bottom: 10px;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}
.pn-btn:active { transform: scale(0.985); }
.pn-btn-primary {
  background: var(--pn-primary);
  color: var(--pn-on-primary);
}
.pn-btn-primary:hover:not(:disabled) { background: #2f4890; }
.pn-btn-primary:disabled {
  background: #B7C0DB;
  cursor: not-allowed;
}
.pn-btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--pn-primary);
  border: 1.5px solid var(--pn-primary);
}
.pn-btn-secondary:hover { background: #F3F6FC; }

.pn-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--pn-border);
  background: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 400;
  color: var(--pn-caption);
  margin-bottom: 12px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}
.pn-input:focus { outline: none; border-color: var(--pn-secondary); }

.pn-room-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--pn-border);
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 13.5px;
  background: rgba(255, 255, 255, 0.5);
}
.pn-room-thumb {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  object-fit: contain;
  background: #EEF1F9;
  border-radius: 10px;
  padding: 5px;
}
.pn-room-info {
  flex: 1;
  min-width: 0;
}
.pn-room-title {
  font-weight: 600;
  color: var(--pn-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pn-room-sub {
  font-size: 12px;
  font-weight: 300;
  color: var(--pn-muted);
  margin-top: 2px;
}
.pn-room-item span.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #5FAE6B;
  margin-right: 6px;
}
.pn-room-item button {
  background: var(--pn-primary);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.pn-empty {
  font-size: 13px;
  font-weight: 300;
  color: #9AA0B4;
  text-align: center;
  padding: 12px 0 4px;
}

.pn-record-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.pn-record-status {
  font-size: 13px;
  font-weight: 300;
  color: var(--pn-muted);
}

.pn-post-card {
  border: 1px solid var(--pn-border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.6);
}
.pn-post-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.pn-post-title {
  font-weight: 600;
  color: var(--pn-primary);
  font-size: 14px;
}
.pn-post-meta {
  font-size: 12px;
  font-weight: 300;
  color: #9AA0B4;
  margin-top: 2px;
}
.pn-post-delete {
  background: none;
  border: none;
  color: #B7BDCF;
  font-size: 11.5px;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}
.pn-post-delete:hover {
  color: var(--pn-danger-text);
}

.pn-comments {
  margin-top: 10px;
}
.pn-comment-row {
  font-size: 13px;
  font-weight: 300;
  color: var(--pn-muted);
  line-height: 1.6;
  padding: 4px 0;
  border-top: 1px solid #F1F2F6;
}
.pn-comment-row b {
  font-weight: 600;
  color: var(--pn-secondary);
  margin-right: 6px;
}

.pn-comment-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.pn-comment-input {
  margin-bottom: 0;
  flex: 1;
}
.pn-comment-btn {
  width: auto;
  margin-bottom: 0;
  padding: 10px 16px;
  white-space: nowrap;
}

.pn-footer-note {
  margin-top: auto;
  font-size: 11.5px;
  font-weight: 300;
  color: #9AA0B4;
  text-align: center;
  padding-top: 24px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* room.html 통화 화면 */
.call-wrap {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: radial-gradient(130% 90% at 50% -10%, #eef1f8 0%, #f4f6fb 30%, #faf9f6 60%, var(--pn-bg) 100%);
  display: flex;
  flex-direction: column;
}
.call-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pn-border);
}
.call-topbar .pn-pill { margin: 0; }
.call-topbar .leave-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--pn-danger-text);
  text-decoration: none;
}
.call-body {
  position: relative;
  flex: 1;
}
#call-frame {
  position: absolute;
  inset: 0;
  border: none;
  width: 100%;
  height: 100%;
}
.call-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--pn-muted);
  background: var(--pn-bg);
}
