/* ===================================================
   CareTalk - Global Care Translation Platform
   CSS Variables + Day/Night Theme System
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── CSS Variables ─── */
:root {
  --bg: #F5F7FA;
  --bg-secondary: #EEF2F7;
  --section-bg: #F1F5F9;
  --card-bg: #FFFFFF;
  --text: #1A1F3A;
  --text-secondary: #5A6478;
  --text-muted: #8B95A8;
  --card: #FFFFFF;
  --card-hover: #F8FAFC;
  --border: #E2E8F0;
  --border-light: #EDF2F7;
  --primary: #0F172A;
  --primary-hover: #1E293B;
  --secondary: #14B8A6;
  --secondary-hover: #0D9488;
  --accent: #FF6B00;
  --accent-hover: #E55A00;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --nav-height: 64px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="night"] {
  --bg: #0B1120;
  --bg-secondary: #111827;
  --text: #E8EDF5;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --card: #111827;
  --card-hover: #1A2436;
  --border: #1E2D45;
  --border-light: #172133;
  --primary: #14B8A6;
  --primary-hover: #0D9488;
  --secondary: #14B8A6;
  --secondary-hover: #0D9488;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
}

/* ─── Global Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

html { scroll-behavior: smooth; font-size: 18px; }

body {
  font-family: 'Pretendard', 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, textarea, select {
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  outline: none;
  width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
img { max-width: 100%; }
ul { list-style: none; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
p { color: var(--text-secondary); line-height: 1.8; font-size: 1rem; }

/* ─── Navigation ─── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1760px;
  width: calc(100% - 48px);
  margin: 0 auto;
  height: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.5px;
  flex-shrink: 0;
  margin-right: 32px;
}

.nav-logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #14B8A6, #0F172A);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(20,184,166,0.3);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-menu a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: var(--bg-secondary);
  color: var(--text);
}

.nav-menu a.active {
  color: var(--secondary);
  font-weight: 600;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.theme-toggle:hover {
  background: var(--border);
  color: var(--text);
}

/* Language Selector */
.lang-selector {
  position: relative;
}

.lang-selector select {
  padding: 9px 34px 9px 14px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  transition: var(--transition);
}

.lang-selector::after {
  content: '▾';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.lang-selector select:hover { border-color: var(--secondary); }

/* ─── Mobile Nav Bottom Bar ─── */
#mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--card);
  border-top: 1px solid var(--border);
  z-index: 999;
}

.mobile-nav-inner {
  display: flex;
  height: 100%;
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  padding: 6px 4px;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
  color: var(--secondary);
}

.mobile-nav-item svg { width: 24px; height: 24px; stroke-width: 1.75; }

/* ─── Main Content ─── */
main {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.page { display: none; }
.page.active { display: block; }

/* ─── Section & Container ─── */
.container {
  max-width: 1760px;
  width: calc(100% - 64px);
  margin: 0 auto;
  padding: 0;
}

.section {
  padding: 40px 0;
}

/* ─── Cards ─── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-body { padding: 20px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  transition: var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  min-height: 48px;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: var(--secondary);
  color: #FFFFFF;
  border-color: var(--secondary);
}
.btn-secondary:hover { background: var(--secondary-hover); }

.btn-accent {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text); }

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-kakao {
  background: #FEE500;
  color: #3A1D1D;
  border-color: #FEE500;
}
.btn-kakao:hover { background: #F0D800; }

.btn-telegram {
  background: #229ED9;
  color: white;
  border-color: #229ED9;
}
.btn-telegram:hover { background: #1A86BC; }

.btn-sm { padding: 8px 18px; font-size: 0.9rem; min-height: 40px; }
.btn-lg { padding: 18px 34px; font-size: 1.2rem; border-radius: 18px; min-height: 58px; }
.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── Form Elements ─── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.form-control {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
  transition: var(--transition);
  min-height: 48px;
}

.form-control:focus {
  border-color: var(--secondary);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ─── Badge ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-primary { background: rgba(15,23,42,0.1); color: var(--primary); }
.badge-secondary { background: rgba(20,184,166,0.12); color: var(--secondary); }
.badge-accent { background: rgba(255,107,0,0.12); color: var(--accent); }
.badge-success { background: rgba(16,185,129,0.12); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.12); color: var(--danger); }

[data-theme="night"] .badge-primary { background: rgba(20,184,166,0.15); color: var(--secondary); }

/* ─── Page Header ─── */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, #1E3A5F 100%);
  padding: 36px 0 32px;
  margin-bottom: 0;
}

[data-theme="night"] .page-header {
  background: linear-gradient(135deg, #0F1F38 0%, #0A1628 100%);
  border-bottom: 1px solid var(--border);
}

.page-header h1 { color: #FFFFFF; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.page-header p { color: rgba(255,255,255,0.8); font-size: 1.05rem; margin-top: 8px; }

/* ─── Tab System ─── */
.tab-list {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tab-list::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 12px 22px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Grid ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* ─── HOME PAGE ─── */
.hero {
  background: linear-gradient(135deg, #0F172A 0%, #1a3a5c 40%, #0F172A 100%);
  min-height: 520px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  /* 상단 파트너 버튼(54px) + 여백(28px) 확보 → 기존 56px → 110px */
  padding: 110px 0 56px;
  width: 100%;
}

[data-theme="night"] .hero {
  background: linear-gradient(135deg, #050C1A 0%, #0A1628 50%, #050C1A 100%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(20,184,166,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,107,0,0.08) 0%, transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1760px;
  width: calc(100% - 64px);
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.hero-text { }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20,184,166,0.15);
  color: #14B8A6;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  border: 1px solid rgba(20,184,166,0.25);
}

.hero-title {
  font-size: clamp(3.2rem, 5vw, 5.8rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 22px;
  white-space: pre-line;
}

.hero-title span { color: #14B8A6; }

.hero-desc {
  font-size: 1.45rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.8;
  margin-bottom: 36px;
  white-space: pre-line;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.12);
  flex-wrap: wrap;
}

.hero-stat { }
.hero-stat-num {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
}

.hero-stat-label {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  margin-top: 5px;
  opacity: 0.85;
}

.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.hero-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-3px);
}

.hero-card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  font-size: 26px;
}

.hero-card h4 {
  color: rgba(255,255,255,0.95);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.hero-card p {
  color: rgba(255,255,255,0.65);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Feature Section */
.features-section {
  padding: 60px 0;
  background: var(--bg);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-tag {
  display: inline-block;
  background: rgba(20,184,166,0.1);
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover::before { opacity: 1; }
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.feature-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}

.feature-icon svg { width: 26px; height: 26px; stroke-width: 1.75; }

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── INTERPRETER PAGE ─── */
.interpreter-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.interp-panel {
  padding: 24px;
}

.interp-panel:first-child {
  border-right: 1px solid var(--border);
}

.interp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.interp-lang-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
}

.interp-textarea {
  width: 100%;
  min-height: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 1rem;
  color: var(--text);
  resize: none;
  line-height: 1.6;
}

.interp-textarea:focus {
  border-color: var(--secondary);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.1);
}

.interp-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.interp-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.swap-btn {
  width: 42px; height: 42px;
  border-radius: var(--radius-full);
  background: var(--secondary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(20,184,166,0.3);
}

.swap-btn:hover { background: var(--secondary-hover); transform: rotate(180deg); }
.swap-btn svg { width: 20px; height: 20px; }

/* Mode selector */
.mode-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.mode-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.mode-btn.active {
  background: var(--card);
  color: var(--secondary);
  box-shadow: var(--shadow-sm);
}

/* Voice recording button */
.record-btn {
  width: 60px; height: 60px;
  border-radius: var(--radius-full);
  background: var(--secondary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(20,184,166,0.35);
}

.record-btn:hover { background: var(--secondary-hover); transform: scale(1.05); }
.record-btn.recording {
  background: var(--danger);
  animation: pulse-record 1.5s infinite;
  box-shadow: 0 4px 14px rgba(239,68,68,0.35);
}

.record-btn svg { width: 26px; height: 26px; }

@keyframes pulse-record {
  0%, 100% { box-shadow: 0 4px 14px rgba(239,68,68,0.35); }
  50% { box-shadow: 0 4px 20px rgba(239,68,68,0.6); transform: scale(1.08); }
}

/* Translation History */
.history-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--bg-secondary);
}

.history-item:hover {
  border-color: var(--secondary);
  background: var(--card);
}

/* ─── CARE LOG PAGE ─── */
.care-log-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.care-log-form .card-body {
  padding: 24px;
}

.status-selector {
  display: flex;
  gap: 8px;
}

.status-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.status-btn.good.active { background: rgba(16,185,129,0.12); color: var(--success); border-color: var(--success); }
.status-btn.normal.active { background: rgba(245,158,11,0.12); color: var(--warning); border-color: var(--warning); }
.status-btn.bad.active { background: rgba(239,68,68,0.12); color: var(--danger); border-color: var(--danger); }

/* ─── OCR PAGE ─── */
.ocr-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-secondary);
  position: relative;
}

.ocr-upload-zone:hover,
.ocr-upload-zone.drag-over {
  border-color: var(--secondary);
  background: rgba(20,184,166,0.04);
}

.ocr-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-lg);
  background: rgba(20,184,166,0.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: var(--secondary);
}

.upload-icon svg { width: 32px; height: 32px; }

.ocr-warning {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
}

.ocr-warning svg { color: var(--danger); flex-shrink: 0; margin-top: 2px; }
.ocr-warning-text { font-size: 0.85rem; color: var(--danger); font-weight: 600; }
.ocr-warning-detail { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }

.ocr-notice {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.825rem;
  color: var(--warning);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

/* ─── COMMUNITY PAGE ─── */
.community-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--secondary);
}

.post-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2.5rem;
}

.post-card-body {
  padding: 20px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.post-card-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.post-card-detail {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-card-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { font-size: 1.3rem; font-weight: 700; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ─── CHAT WIDGET ─── */
.chat-widget {
  position: fixed;
  left: 20px;
  bottom: 80px;
  z-index: 1500;
}

@media (min-width: 769px) {
  .chat-widget { bottom: 24px; }
}

.chat-trigger {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(20,184,166,0.4);
  transition: var(--transition);
  font-size: 0.8rem;
  font-weight: 700;
}

.chat-trigger:hover { transform: scale(1.05) translateY(-2px); }
.chat-trigger svg { width: 26px; height: 26px; }

.chat-panel {
  position: absolute;
  bottom: 68px;
  left: 0;
  width: 360px;
  height: 500px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel.open { display: flex; }

.chat-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, #0F172A, #1E3A5F);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

[data-theme="night"] .chat-header {
  background: linear-gradient(135deg, #0A1628, #0D1E33);
  border-bottom: 1px solid var(--border);
}

.chat-header-avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.chat-header-info { flex: 1; }
.chat-header-name { font-size: 0.875rem; font-weight: 700; color: white; }
.chat-header-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: var(--radius-full);
  background: #10B981;
}

.chat-header-actions {
  display: flex;
  gap: 6px;
}

.chat-action-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: white;
  display: flex; align-items: center; justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.chat-action-btn:hover { background: rgba(255,255,255,0.2); }
.chat-action-btn svg { width: 15px; height: 15px; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
}

.chat-msg {
  display: flex;
  gap: 8px;
  max-width: 85%;
}

.chat-msg.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-avatar {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: white;
  flex-shrink: 0;
  font-weight: 700;
}

.chat-msg-body { }

.chat-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 100%;
  word-break: break-word;
}

.chat-msg.received .chat-msg-bubble {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
}

.chat-msg.sent .chat-msg-bubble {
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-msg-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

.chat-msg.received .chat-msg-time { text-align: left; }

.chat-toolbar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.chat-tool-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.chat-tool-btn:hover { background: var(--secondary); color: white; border-color: var(--secondary); }
.chat-tool-btn svg { width: 12px; height: 12px; }

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  align-items: flex-end;
  background: var(--card);
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  font-size: 0.875rem;
  color: var(--text);
  resize: none;
  max-height: 100px;
  min-height: 40px;
  line-height: 1.5;
}

.chat-input:focus {
  border-color: var(--secondary);
  background: var(--card);
  outline: none;
}

.chat-send-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  background: var(--secondary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-send-btn:hover { background: var(--secondary-hover); }
.chat-send-btn svg { width: 16px; height: 16px; }

/* ─── FAQ ROBOT WIDGET ─── */
.faq-widget {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 1500;
}

@media (min-width: 769px) {
  .faq-widget { bottom: 24px; }
}

.faq-trigger {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FF8A00, #FF5C00);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,107,0,0.4);
  transition: var(--transition);
  font-size: 0.8rem;
  font-weight: 700;
}

.faq-trigger:hover { transform: scale(1.05) translateY(-2px); }
.faq-trigger svg { width: 26px; height: 26px; }

.faq-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 380px;
  max-height: 520px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.faq-panel.open { display: flex; }

.faq-panel-header {
  padding: 16px 18px;
  background: linear-gradient(135deg, #FF8A00, #FF5C00);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.faq-panel-title { color: white; font-size: 1.1rem; font-weight: 700; }
.faq-panel-sub { color: rgba(255,255,255,0.8); font-size: 0.88rem; margin-top: 2px; }

.faq-close-btn {
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.2);
  color: white;
  display: flex; align-items: center; justify-content: center;
  border: none;
  cursor: pointer;
}

.faq-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--bg-secondary);
  transition: var(--transition);
}

.faq-item:hover { border-color: #FF8A00; }

.faq-question {
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 54px;
}

.faq-question:hover { color: #FF6B00; }
.faq-question.active { color: #FF6B00; }

.faq-chevron {
  flex-shrink: 0;
  width: 16px; height: 16px;
  transition: transform 0.3s;
  color: var(--text-muted);
}

.faq-question.active .faq-chevron { transform: rotate(180deg); color: #FF6B00; }

.faq-answer {
  display: none;
  padding: 14px 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  border-top: 1px solid var(--border-light);
  background: var(--card);
}

.faq-answer.open { display: block; }

/* ─── MAP ─── */
#map-container {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-secondary);
}

/* ─── Toast Notification ─── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  animation: slideInRight 0.3s ease;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--secondary); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(100%); }
}

/* ─── Loading Spinner ─── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Progress Bar ─── */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), #0D9488);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* ─── Utility ─── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 1rem; }
.text-xs { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }
.text-secondary-color { color: var(--secondary); }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }

/* ─── Responsive ─── */

/* PC (1024px ~ 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .container {
    max-width: 1400px;
    width: calc(100% - 64px);
  }
  .nav-inner {
    max-width: 1400px;
    width: calc(100% - 48px);
  }
  .hero-content {
    max-width: 1400px;
    width: calc(100% - 64px);
    grid-template-columns: 0.85fr 1.15fr;
    gap: 40px;
  }
  /* 빠른메뉴: 1024~1279px → 3열 유지 */
  .quick-menu-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* PC 와이드 (1280px ~ 1599px) */
@media (min-width: 1280px) and (max-width: 1599px) {
  .container {
    max-width: 1600px;
    width: calc(100% - 64px);
  }
  .nav-inner {
    max-width: 1600px;
    width: calc(100% - 48px);
  }
  .hero-content {
    max-width: 1600px;
    width: calc(100% - 64px);
    grid-template-columns: 0.85fr 1.15fr;
    gap: 48px;
  }
  /* 빠른메뉴: 1280~1599px → 3열 2행 유지 */
  .quick-menu-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* 초와이드 (1600px+) */
@media (min-width: 1600px) {
  .container {
    max-width: 1760px;
    width: calc(100% - 80px);
  }
  .nav-inner {
    max-width: 1760px;
    width: calc(100% - 64px);
  }
  .hero-content {
    max-width: 1760px;
    width: calc(100% - 80px);
    grid-template-columns: 0.85fr 1.15fr;
    gap: 64px;
  }
  .hero-visual { grid-template-columns: 1fr 1fr; }
  /* 빠른메뉴: 1600px+ → 6개를 3열 2행 유지 (4열이면 마지막 행 2개만 남아 불균형) */
  .quick-menu-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* 태블릿 (768px ~ 1023px) */
@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-content { gap: 32px; }
  .care-log-grid { grid-template-columns: 1fr; }
  .container {
    max-width: none;
    width: calc(100% - 40px);
  }
  /* 빠른메뉴: 태블릿 → 3열 유지 */
  .quick-menu-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* 모바일 (max 768px) */
@media (max-width: 768px) {
  /* 모바일 기준 font-size 확대 (중장년층 대응) */
  html { font-size: 19px; }

  /* Nav */
  .nav-menu { display: none; }
  #mobile-nav { display: flex; }
  .nav-inner {
    max-width: none;
    width: 100%;
    padding: 0 14px;
  }

  main { padding-top: var(--nav-height); padding-bottom: 76px; }

  /* Hero */
  .hero-content {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
    padding: 0 14px;
    gap: 24px;
  }
  .hero-visual { display: none; }
  /* 모바일: 파트너 버튼은 relative flow이므로 상단 padding 불필요 */
  .hero { min-height: auto; padding: 28px 0 32px; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .hero-title { font-size: clamp(2.4rem, 8vw, 3rem); line-height: 1.12; }
  .hero-desc { font-size: 1.15rem; }
  .hero-stat-num { font-size: 2rem; }
  .hero-stat-label { font-size: 0.9rem; }

  /* Grids */
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  /* 빠른메뉴: 모바일 → 2열 3행 */
  .quick-menu-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  /* Quick Menu + Notice 외부 2단 → 단일 컬럼 스택 */
  .quick-notice-outer { grid-template-columns: 1fr !important; }
  .interpreter-layout { grid-template-columns: 1fr; }
  .interp-panel:first-child { border-right: none; border-bottom: 1px solid var(--border); }

  /* 컨테이너 */
  .container {
    max-width: none;
    width: 100%;
    padding: 0 14px;
  }
  .section { padding: 24px 0; }

  /* Buttons */
  button { min-height: 52px; }
  .btn { min-height: 52px; font-size: 1rem; }
  .btn-sm { min-height: 44px; font-size: 0.95rem; }
  .btn-lg { padding: 16px 24px; font-size: 1.1rem; min-height: 58px; }

  /* Chat/FAQ panels */
  .chat-panel {
    position: fixed;
    left: 10px; right: 10px;
    bottom: 84px;
    width: auto;
    height: 70vh;
    border-radius: var(--radius-lg);
  }
  .faq-panel {
    position: fixed;
    left: 10px; right: 10px;
    bottom: 84px;
    width: auto;
    max-height: 70vh;
  }
  /* Chat/FAQ trigger 버튼 */
  .chat-trigger, .faq-trigger { width: 62px; height: 62px; }

  /* 모달 */
  .modal { margin: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 95vh; }
  .modal-overlay { align-items: flex-end; padding: 0; }

  /* 탭 버튼 모바일 */
  .tab-btn { padding: 10px 16px; font-size: 0.95rem; }

  /* 폼 컨트롤 */
  .form-control { min-height: 52px; font-size: 1rem; padding: 14px 16px; }
}

/* ─── Pretendard Font Fallback ─── */
@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
}

/* ═══════════════════════════════════════════════
   PARTNER LINK BUTTONS — Hero 상단 외부링크 8개
   ═══════════════════════════════════════════════ */

/* Hero 섹션: position relative 보장 */
.hero { position: relative; }

/* 버튼 래퍼 — PC: absolute 중앙 1줄 */
.partner-link-wrap {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(8, minmax(88px, 1fr));
  gap: 12px;
  /* 네비 우측 영역(테마·언어 드롭다운) 침범 방지: 우측 420px 제외 */
  width: min(900px, calc(100% - 440px));
  /* 좌측 로고 영역도 확보 — translateX(-50%) 기준이라 중앙 정렬 */
}

/* 개별 버튼 */
.partner-link-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 54px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
  background: #14B8A6;
  color: #000000;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow:
    0 10px 24px rgba(20, 184, 166, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}

.partner-link-button span {
  font-size: 12px;
  font-weight: 800;
  display: block;
}

.partner-link-button strong {
  font-size: 13px;
  font-weight: 900;
  display: block;
}

/* Hover */
.partner-link-button:hover {
  background: #19D3C0;
  color: #000000;
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 16px 32px rgba(20, 184, 166, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* Active / Click */
.partner-link-button:active,
.partner-link-button.active-click {
  background: #FF4D00;
  color: #FFFFFF;
  transform: scale(0.96);
  box-shadow:
    0 10px 28px rgba(255, 77, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

/* ── Aurora Border Flow (Conic Gradient 회전 테두리) ── */
.partner-link-button::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -2;
  background: conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0.1),
    #ffffff,
    #14b8a6,
    #ff4d00,
    #ffffff,
    rgba(255, 255, 255, 0.1)
  );
  border-radius: 16px;
  animation: aurora-spin 3s linear infinite;
}

.partner-link-button::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -1;
  background: #14B8A6;
  border-radius: 12px;
  transition: background-color 0.25s ease;
}

.partner-link-button:hover::after {
  background: #19D3C0;
}

.partner-link-button:active::after,
.partner-link-button.active-click::after {
  background: #FF4D00;
}

@keyframes aurora-spin {
  to { transform: rotate(360deg); }
}

/* ── 태블릿 (1025px ~ 1279px): 버튼 살짝 축소 ── */
@media (min-width: 1025px) and (max-width: 1279px) {
  .partner-link-wrap {
    width: min(820px, calc(100% - 380px));
    gap: 9px;
  }
  .partner-link-button {
    min-height: 50px;
    font-size: 12px;
    padding: 7px 8px;
  }
  .partner-link-button span  { font-size: 11px; }
  .partner-link-button strong { font-size: 12px; }
}

/* ── 모바일 / 좁은 화면 (max 1024px): 가로 스크롤 ── */
@media (max-width: 1024px) {
  .partner-link-wrap {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    /* hero-content 위로 올라오게 */
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0 14px 4px;
    margin-bottom: 20px;
  }
  .partner-link-wrap::-webkit-scrollbar { display: none; }

  .partner-link-button {
    min-width: 84px;
    min-height: 52px;
    font-size: 12px;
    flex-shrink: 0;
    padding: 8px 10px;
  }
  .partner-link-button span  { font-size: 11px; }
  .partner-link-button strong { font-size: 13px; }
}
