/* =====================================================================
   BARODU 링크 허브 스타일
   색상은 BARODU 홈페이지(MainHome) 토큰을 기준으로, 하늘색을 포인트로 사용합니다.
   ===================================================================== */

:root {
  --bg: #f4f9ff;
  --surface: #ffffff;
  --text: #0e1627;
  --text-2: #465064;
  --text-3: #5b6577;
  --border: #dbe7f5;
  --border-strong: #b9d3f0;
  --sky: #2aa5ff;          /* 포인트 하늘색 (장식용) */
  --sky-soft: #e6f4ff;
  --brand: #1f63e0;        /* 텍스트·포커스용 (흰 배경 대비 확보) */
  --focus: 0 0 0 3px #fff, 0 0 0 5px var(--brand);
  --radius: 18px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 모바일 기준 폭으로 제한하고 PC 에서는 중앙 정렬 */
.page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

main {
  flex: 1;
}

/* ---------- 미리보기 안내 (로컬에서만 보임) ---------- */
.preview-note {
  margin: 0 0 20px;
  padding: 10px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}

.preview-note a {
  color: var(--brand);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- 상단 프로필 ---------- */
.profile {
  text-align: center;
  padding: 8px 0 28px;
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 72px;
}

/* 현재 로고 PNG 는 흰 배경이라 둥근 흰 타일로 감싸 앱 아이콘처럼 보이게 함.
   투명 배경 로고로 교체하면 background/border 를 지워도 됩니다. */
.logo-img {
  display: block;
  width: 72px;
  height: 72px;
  padding: 7px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
}

/* 로고 이미지가 없을 때의 임시 텍스트 로고 */
.logo-text {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 12px;
  background: var(--sky-soft);
  color: var(--brand);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* 로아 캐릭터 — 버튼보다 눈에 띄지 않도록 크기 제한 */
.character {
  margin: 14px auto 0;
  width: 120px;
  max-width: 40vw;
}

.character-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 140px;
  object-fit: contain;
}

.name {
  margin: 16px 0 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.name-ko {
  color: var(--brand);
  font-weight: 700;
}

.tagline {
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 8px;
  margin: 14px 0 0;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
}

.keywords .dot {
  color: var(--sky);
}

/* ---------- 링크 버튼 ---------- */
.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

a.link-card:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

a.link-card:active {
  background: #f7fbff;
}

.link-icon {
  flex: none;
  display: flex;
  width: 44px;
  height: 44px;
}

.link-icon svg {
  display: block;
}

.link-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.link-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.link-sub {
  margin-top: 1px;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.4;
}

.link-arrow {
  flex: none;
  color: #9aa6b8;
}

/* 미리보기 전용: URL 이 비어 있는 버튼 */
.link-card.is-empty {
  border-style: dashed;
  border-color: var(--border-strong);
  background: transparent;
  opacity: 0.75;
}

.empty-badge {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff3e0;
  color: #8a4f00;
  font-size: 12px;
  font-weight: 700;
}

.links-empty {
  margin: 8px 0 0;
  color: var(--text-3);
  text-align: center;
  font-size: 15px;
}

/* PC(마우스) 에서만 아주 가벼운 hover */
@media (hover: hover) and (pointer: fine) {
  a.link-card {
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  }

  a.link-card:hover {
    border-color: var(--sky);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(31, 99, 224, 0.08);
  }

  a.link-card:hover .link-arrow {
    color: var(--brand);
  }
}

@media (prefers-reduced-motion: reduce) {
  a.link-card {
    transition: none !important;
    transform: none !important;
  }
}

/* ---------- 하단 ---------- */
.footer {
  padding: 40px 0 8px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-2);
  text-decoration: none;
  padding: 4px 2px;
}

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

.footer-links a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.footer-name {
  margin: 0;
  color: var(--text-2);
  font-weight: 700;
  font-size: 14px;
}

.copyright {
  margin: 2px 0 0;
}

/* 아주 좁은 화면 (320px 대) */
@media (max-width: 350px) {
  .page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .link-card {
    gap: 12px;
    padding: 12px 14px;
  }

  .link-title {
    font-size: 16px;
  }
}
