/* ============================================
   레이아웃 — 헤더 / 탭 네비 / 본문 셸 / 푸터
   ============================================ */

.app-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.app-header__brand .icon { color: var(--primary); }

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 언어 선택 (우측 상단) */
.lang-select {
  appearance: none;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 28px 8px 12px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239B9B9B'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 18px;
}
.lang-select:hover { border-color: var(--primary); }
.lang-select:focus { outline: none; border-color: var(--primary); }

.app-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px 80px;
}

/* 탭 네비게이션 */
.tab-nav {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: 24px;
}
.tab-nav__item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--sub);
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}
.tab-nav__item .icon { width: 18px; height: 18px; }
.tab-nav__item:hover { color: var(--text); }
.tab-nav__item.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.app-footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px 40px;
  text-align: center;
}
.app-footer p { font-size: 12px; color: var(--sub); margin-bottom: 12px; }
.footer-nav { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.header-link {
  background: none;
  border: none;
  color: var(--sub);
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
}
.header-link:hover { color: var(--text); }

/* 반응형 */
@media (max-width: 480px) {
  .app-header { padding: 0 12px; }
  .app-header__brand span:last-child { display: none; }
  .tab-nav__item span:last-child { display: none; }
  .tab-nav__item { padding: 12px 4px; }
}

@media (min-width: 768px) {
  .app-shell { padding-top: 40px; }
}
