/* ============================================================
 * common.css — 본채/그룹 공통 CSS
 * 테마 색상(--gold, --bg 등)은 각 페이지에서 별도 정의
 * ============================================================ */

/* ───────────────────────────────────────────
 * 공통 레이아웃 변수 (테마 중립)
 * ─────────────────────────────────────────── */
:root {
  --app-width: 430px;
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* ───────────────────────────────────────────
 * 유틸리티 클래스
 * ─────────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ───────────────────────────────────────────
 * 토스트 (common.js에서 동적 생성)
 * ─────────────────────────────────────────── */
.saju-common-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 20, 10, 0.92);
  color: rgba(200, 180, 120, 0.7);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-family: "Noto Sans KR", sans-serif;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-all;
}

.saju-common-toast.show {
  opacity: 1;
}

/* ───────────────────────────────────────────
 * 복채 배지 (SajuCommon.ui.renderTokenBadge)
 * ─────────────────────────────────────────── */
.sc-token-badge {
  position: fixed; top: 16px; right: 16px; z-index: 800;
  font-family: 'Noto Sans KR', sans-serif; font-size: 12px; font-weight: 300;
  color: var(--gold, rgba(200,180,120,0.7));
  background: rgba(10,10,15,0.85); backdrop-filter: blur(8px);
  border: 1px solid rgba(139,125,60,0.15); border-radius: 20px;
  padding: 6px 14px;
  opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}
.sc-token-badge.visible { opacity: 1; pointer-events: auto; cursor: pointer; }
.sc-token-badge:active { transform: scale(0.95); }
.sc-token-badge .sc-token-count { font-weight: 500; margin-left: 2px; }

/* ───────────────────────────────────────────
 * 설정 메뉴 (SajuCommon.ui.renderSettingsMenu)
 * ─────────────────────────────────────────── */
.sc-settings-btn {
  position: fixed; top: 16px; left: 16px; z-index: 110;
  font-size: 20px; color: var(--text-dim, rgba(200,196,188,0.5));
  cursor: pointer; opacity: 0; transition: opacity 0.5s;
  padding: 4px 8px; line-height: 1;
  background: none; border: none;
}
.sc-settings-btn.visible { opacity: 0.6; }
.sc-settings-btn:hover { opacity: 1 !important; }
.sc-settings-overlay {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.sc-settings-overlay.active { opacity: 1; pointer-events: auto; }
.sc-settings-panel {
  position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 111;
  background: rgba(14,14,20,0.97); backdrop-filter: blur(12px);
  border-right: 1px solid rgba(139,125,60,0.1);
  transform: translateX(-100%); transition: transform 0.3s ease;
  padding: 60px 24px 24px; display: flex; flex-direction: column; gap: 8px;
}
.sc-settings-panel.active { transform: translateX(0); }
.sc-settings-title {
  font-family: 'Noto Sans KR', sans-serif; font-size: 14px; font-weight: 400;
  color: var(--text-dim, rgba(200,196,188,0.5)); margin-bottom: 16px; letter-spacing: 1px;
}
.sc-settings-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  font-family: 'Gowun Batang', serif; font-size: 16px;
  color: var(--text, rgba(200,196,188,0.85));
  padding: 12px 0; cursor: pointer;
  border-bottom: 1px solid rgba(139,125,60,0.08);
}
.sc-settings-item:hover { color: var(--text-bright, #e8e4d0); }
.sc-settings-item.danger { color: #a85454; }
.sc-settings-item.danger:hover { color: #c45454; }
.sc-settings-item.ghost {
  color: var(--text-dim, rgba(200,196,188,0.5));
  font-size: 14px; border-bottom: none; margin-top: auto;
}

/* ───────────────────────────────────────────
 * 푸터 (SajuCommon.ui.renderFooter)
 * ─────────────────────────────────────────── */
.sc-footer {
  text-align: center; padding: 32px 16px 24px;
  font-family: 'Noto Sans KR', sans-serif; font-size: 10px;
  color: rgba(200,196,188,0.2);
  line-height: 1.8;
  word-break: keep-all;
}
.sc-footer a {
  color: rgba(200,196,188,0.2);
  text-decoration: none;
}
.sc-footer a:hover { text-decoration: underline; color: rgba(200,196,188,0.35); }
.sc-footer-biz {
  margin-top: 10px; line-height: 1.8;
  color: rgba(200,196,188,0.4);
}
.sc-footer-disc {
  display: block; margin-top: 4px; font-size: 9px;
  color: rgba(200,196,188,0.13);
}
