/* exitbasic 공유 UI — https://exitbasic.com/eb-ui/eb-ui.css */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --eb-primary: #2563eb;
  --eb-primary-dark: #1d4ed8;
  --eb-primary-light: #eff6ff;
  --eb-accent: #059669;
  --eb-bg: #f4f6f9;
  --eb-surface: #ffffff;
  --eb-border: #e5e7eb;
  --eb-text: #111827;
  --eb-text-muted: #6b7280;
  --eb-radius: 10px;
  --eb-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --eb-font: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --eb-max-w: 1200px;
}

.eb-shell {
  font-family: var(--eb-font);
  color: var(--eb-text);
  line-height: 1.55;
  background: var(--eb-bg);
}

.eb-embedded #eb-ui-topbar,
.eb-embedded #eb-ui-footer,
.eb-embedded .eb-mobile-nav {
  display: none !important;
}

/* ── 포털 iframe embed: 뷰포트 고정, 본문만 스크롤 ── */
html.eb-embedded {
  height: 100%;
  overflow: hidden;
}

html.eb-embedded,
html.eb-embedded body {
  min-height: 0 !important;
  height: 100%;
  overflow: hidden;
  margin: 0;
}

html.eb-embedded body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: transparent !important;
}

html.eb-embedded .reading-footer,
html.eb-embedded .reading-banner-wrap,
html.eb-embedded .eb-exitbasic-promo,
html.eb-embedded .eb-sub-hero,
html.eb-embedded body > footer:not(.eb-footer) {
  display: none !important;
}

html.eb-embedded main,
html.eb-embedded .dna-max-w-page,
html.eb-embedded .wordtest-container,
html.eb-embedded .container3,
html.eb-embedded #app {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

html.eb-embedded main.dna-max-w-page {
  width: 100%;
  max-width: none;
  padding: 12px 16px 16px;
}

html.eb-embedded .wordtest-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 20px 24px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

html.eb-embedded .container3 {
  width: calc(100% - 16px);
  max-width: 1000px;
  margin: 8px auto;
  padding: clamp(12px, 2vw, 20px);
}

html.eb-embedded .reading-main,
html.eb-embedded .reading-max-w-page {
  padding-bottom: 1rem;
}

html.eb-embedded #app {
  padding: 12px 20px 16px;
  max-width: none;
  margin: 0;
}

html.eb-embedded .timebar-wrap {
  position: sticky;
  bottom: 0;
}

.eb-topbar {
  background: var(--eb-surface);
  border-bottom: 1px solid var(--eb-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--eb-shadow);
}

.eb-topbar-inner {
  max-width: var(--eb-max-w);
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.eb-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.eb-brand {
  display: inline-flex;
  align-items: baseline;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}

.eb-brand-exit {
  color: #a31830;
}

.eb-brand-basic {
  color: #111827;
}

.eb-brand--footer .eb-brand-basic {
  color: #f3f4f6;
}

.eb-nav {
  display: none;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

@media (min-width: 900px) {
  .eb-nav {
    display: flex;
  }
}

.eb-nav a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--eb-text-muted);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.eb-nav a:hover,
.eb-nav a.is-active {
  background: var(--eb-primary-light);
  color: var(--eb-primary);
}

.eb-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.eb-nav-badge {
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--eb-primary-light);
  color: var(--eb-primary);
  font-weight: 700;
  border: 1px solid #bfdbfe;
}

.eb-nav-login {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--eb-radius);
  background: var(--eb-primary);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.eb-nav-login:hover {
  background: var(--eb-primary-dark) !important;
}

.eb-mobile-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 16px;
  border-bottom: 1px solid var(--eb-border);
  background: var(--eb-surface);
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 900px) {
  .eb-mobile-nav {
    display: none;
  }
}

.eb-mobile-nav a {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  color: var(--eb-text-muted);
  border: 1px solid var(--eb-border);
  text-decoration: none;
  flex-shrink: 0;
}

.eb-mobile-nav a.is-active {
  background: var(--eb-primary-light);
  color: var(--eb-primary);
  border-color: #bfdbfe;
}

.eb-footer {
  border-top: 1px solid var(--eb-border);
  background: #111827;
  color: #9ca3af;
}

.eb-footer-inner {
  max-width: var(--eb-max-w);
  margin: 0 auto;
  padding: 32px 20px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.eb-footer-brand .eb-brand {
  font-size: 1rem;
}

.eb-footer-tagline {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.eb-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.eb-footer-links a {
  font-size: 0.8rem;
  color: #6b7280;
  text-decoration: none;
  font-weight: 600;
}

.eb-footer-links a:hover {
  color: #d1d5db;
}

.eb-footer-copy {
  border-top: 1px solid #1f2937;
  padding: 14px 20px;
  text-align: center;
  font-size: 0.75rem;
  color: #4b5563;
}

.eb-card {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  border-radius: 12px;
  box-shadow: var(--eb-shadow);
}

.eb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--eb-radius);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  font-family: var(--eb-font);
}

.eb-btn-primary {
  background: var(--eb-primary);
  color: #fff;
}

.eb-btn-primary:hover {
  background: var(--eb-primary-dark);
}

.eb-btn-outline {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  color: var(--eb-text);
}

.eb-student-bar {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  padding: 8px 16px;
  font-size: 0.85rem;
  text-align: center;
}

.eb-student-bar strong {
  color: #92400e;
}

.eb-ad {
  margin: 16px auto;
  max-width: 728px;
  min-height: 90px;
  text-align: center;
}

.eb-ad-label {
  font-size: 0.65rem;
  color: var(--eb-text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* 서브 서비스 로컬 헤더 (읽기유창성 등) */
.eb-sub-hero {
  background-color: #f8fafc;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  border-bottom: 1px solid var(--eb-border);
  padding: 28px 20px;
  text-align: center;
}

.eb-sub-hero h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.eb-sub-hero p {
  margin: 0;
  color: var(--eb-text-muted);
  font-size: 0.9rem;
}

.eb-sub-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.eb-sub-actions a {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--eb-border);
  background: var(--eb-surface);
  color: var(--eb-text);
}

.eb-sub-actions a.primary {
  background: var(--eb-primary);
  color: #fff;
  border-color: var(--eb-primary);
}
