/* ===========================================
   나랑노랑 (NarangNorang) - Styles
   Children's Education App
   =========================================== */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #FFB800;
  --primary-light: #FFF3D0;
  --primary-dark: #E5A600;
  --secondary: #4CAF50;
  --accent: #FF6B6B;
  --bg: #FFF9F0;
  --bg-white: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border: #E8E8E8;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --tab-height: 70px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-height: 56px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Noto Sans KR', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

/* ---------- App Shell ---------- */
.app {
  max-width: 428px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--header-height);
}

.app-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  position: relative;
}

.app-logo::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  opacity: 0.3;
}

/* ---------- Tab Content Area ---------- */
.tab-content-area {
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 8px);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Bottom Tab Bar ---------- */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 428px;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--tab-height);
  padding-bottom: var(--safe-bottom);
  z-index: 200;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px;
  min-height: 44px;
  position: relative;
}

.tab-btn .tab-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-btn .tab-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: fill 0.2s, transform 0.2s;
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active .tab-icon svg {
  transform: scale(1.1);
}

.tab-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}

.tab-btn span {
  font-size: 0.65rem;
  letter-spacing: -0.3px;
}

/* ===================================
   HOME TAB
   =================================== */

/* Banner Carousel */
.banner-carousel {
  position: relative;
  margin: 0 16px 16px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.banner-track {
  display: flex;
  transition: transform 0.4s ease;
}

.banner-slide {
  min-width: 100%;
  padding: 24px 20px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  color: var(--text-primary);
}

.banner-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.banner-slide .banner-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.banner-slide .banner-subtitle {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.banner-slide .banner-desc {
  font-size: 0.8rem;
  opacity: 0.85;
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

.banner-schedule-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

.banner-schedule-item {
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.7rem;
  text-align: center;
  line-height: 1.4;
}

.banner-schedule-item .branch-label {
  font-weight: 700;
  color: var(--primary-dark);
  display: block;
  margin-bottom: 2px;
}

.banner-fee {
  margin-top: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.banner-deco {
  position: absolute;
  font-size: 2rem;
  opacity: 0.3;
  z-index: 0;
}

.banner-deco.star1 { top: 10px; right: 15px; }
.banner-deco.star2 { bottom: 15px; left: 12px; }
.banner-deco.note1 { top: 20px; left: 20px; }

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
  background: var(--bg);
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}

.banner-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* Notice Bar */
.notice-bar {
  margin: 0 16px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.notice-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.notice-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--primary);
}

.notice-label {
  font-weight: 800;
  color: var(--primary);
  font-size: 0.8rem;
  white-space: nowrap;
}

.notice-text-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 1.4em;
}

.notice-text {
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--text-secondary);
  position: absolute;
  animation: scrollNotice 12s linear infinite;
}

@keyframes scrollNotice {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Quick Actions */
.quick-actions {
  display: flex;
  justify-content: space-around;
  margin: 0 16px 20px;
  padding: 16px 0;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 80px;
  min-height: 44px;
}

.quick-action-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.quick-action-btn:active .quick-action-icon {
  transform: scale(0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.quick-action-icon svg {
  width: 26px;
  height: 26px;
  fill: var(--text-secondary);
}

.quick-action-btn span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Promo Cards */
.promo-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 16px 24px;
}

.promo-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

.promo-card:active {
  transform: scale(0.97);
}

.promo-card-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.promo-card-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

.promo-card-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.promo-card.yellow {
  background: linear-gradient(135deg, #FFF8E1, #FFE082);
}

.promo-card.green {
  background: linear-gradient(135deg, #E8F5E9, #A5D6A7);
}

/* Footer */
.home-footer {
  text-align: center;
  padding: 24px 16px;
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.7);
}

.home-footer .footer-en {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.9);
}

.home-footer .footer-kr {
  font-size: 0.75rem;
}

.home-footer .footer-brand {
  font-weight: 700;
  color: var(--primary);
}

/* ===================================
   PROGRAMS TAB
   =================================== */

.programs-header {
  padding: 0 16px;
  margin-bottom: 16px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: 30px;
  padding: 0 16px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.search-bar:focus-within {
  border-color: var(--primary);
}

.search-bar svg {
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 10px;
  background: transparent;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.branch-filter {
  position: relative;
  display: inline-block;
}

.branch-filter select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 36px 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s;
  min-width: 100px;
}

.branch-filter select:focus {
  border-color: var(--primary);
  outline: none;
}

.branch-filter::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--text-secondary);
  pointer-events: none;
}

/* Program Cards */
.program-list {
  padding: 0 16px;
}

.program-card {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.program-card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.program-card-name {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.program-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.program-category {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.program-category .cat-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.program-category .cat-icon svg {
  width: 14px;
  height: 14px;
  fill: white;
}

.program-age {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.program-age svg {
  width: 16px;
  height: 16px;
  fill: var(--secondary);
}

.program-branches {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Program Detail View */
.program-detail {
  display: none;
  animation: slideIn 0.3s ease;
}

.program-detail.active {
  display: block;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.detail-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
}

.detail-back svg {
  width: 18px;
  height: 18px;
  fill: var(--secondary);
}

.detail-info {
  margin: 0 16px 20px;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.detail-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-line;
}

.detail-branch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 16px;
}

.branch-tag {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Instructor Carousel */
.instructor-section {
  margin: 0 16px 20px;
}

.instructor-carousel {
  position: relative;
  overflow: hidden;
}

.instructor-track {
  display: flex;
  transition: transform 0.4s ease;
}

.instructor-card {
  min-width: 100%;
  padding: 20px;
  display: flex;
  gap: 20px;
}

.instructor-photo-wrapper {
  flex-shrink: 0;
  text-align: center;
}

.instructor-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 4px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
}

.instructor-photo svg {
  width: 60px;
  height: 60px;
  fill: var(--primary);
  opacity: 0.5;
}

.instructor-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.instructor-name-suffix {
  font-weight: 600;
  color: var(--text-secondary);
}

.instructor-program-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.instructor-career {
  flex: 1;
}

.instructor-career h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.instructor-career h4 span {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 4px;
}

.instructor-career ul {
  list-style: none;
}

.instructor-career li {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
  padding-left: 0;
}

.instructor-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
}

.instructor-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.instructor-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* Curriculum Button */
.curriculum-btn-wrapper {
  text-align: center;
  margin: 20px 16px 32px;
}

.curriculum-btn {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 12px 24px;
  cursor: pointer;
  min-height: 44px;
  line-height: 44px;
}

/* ===================================
   REGISTRATION TAB
   =================================== */

.registration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 16px;
  gap: 12px;
}

.reg-branch-select {
  flex: 1;
}

.reg-branch-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 36px 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.reg-branch-select {
  position: relative;
}

.reg-branch-select::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--text-secondary);
  pointer-events: none;
}

.reg-apply-btn {
  background: var(--text-primary);
  color: var(--bg-white);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  min-height: 44px;
  transition: background 0.2s;
}

.reg-apply-btn:active {
  background: #333;
}

/* Period Info */
.period-info {
  padding: 0 16px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.period-info strong {
  color: var(--text-primary);
}

/* Timetable */
.timetable-wrapper {
  margin: 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg-white);
}

.timetable {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.timetable th {
  background: var(--bg-white);
  padding: 10px 6px;
  font-weight: 700;
  text-align: center;
  border-bottom: 2px solid var(--border);
  font-size: 0.8rem;
  position: sticky;
  top: 0;
}

.timetable td {
  padding: 6px;
  vertical-align: top;
  border: 1px solid var(--border);
  min-width: 80px;
  text-align: center;
}

.timetable-cell {
  padding: 4px;
  margin-bottom: 4px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: transform 0.15s;
  line-height: 1.4;
}

.timetable-cell:active {
  transform: scale(0.95);
}

.timetable-cell:last-child {
  margin-bottom: 0;
}

.timetable-cell .cell-name {
  font-weight: 700;
  font-size: 0.72rem;
  display: block;
}

.timetable-cell .cell-time {
  color: var(--text-secondary);
  font-size: 0.65rem;
}

.timetable-cell .cell-age {
  color: var(--text-muted);
  font-size: 0.62rem;
}

.timetable td.day-empty {
  background: #FAFAFA;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  vertical-align: middle;
}

/* Registration Modal */
.reg-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.reg-modal-overlay.show {
  display: flex;
}

.reg-modal {
  background: var(--bg-white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 360px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  border-left: 6px solid var(--primary);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.reg-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-secondary);
  z-index: 1;
  min-width: 44px;
  min-height: 44px;
}

.reg-modal-body {
  padding: 24px 20px;
}

.reg-modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.reg-modal-sessions {
  display: inline-block;
  background: var(--primary);
  color: var(--bg-white);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.reg-modal-fee {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.reg-modal-branch {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.reg-modal-time-select {
  margin-bottom: 16px;
}

.reg-modal-time-select label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.85rem;
}

.reg-modal-time-select select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-white);
}

.reg-modal-notice {
  background: var(--primary-light);
  padding: 12px;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-align: center;
  font-weight: 600;
}

.reg-modal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.reg-modal-submit {
  background: var(--bg-white);
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  min-height: 44px;
  transition: background 0.2s;
}

.reg-modal-submit:active {
  background: var(--primary-light);
}

.reg-modal-bookmark {
  width: 44px;
  height: 44px;
  border: 2px solid var(--text-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.reg-modal-bookmark svg {
  width: 20px;
  height: 20px;
  fill: var(--text-secondary);
}

.reg-modal-terms {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.reg-modal-terms p {
  margin-bottom: 4px;
}

/* ===================================
   FAQ TAB
   =================================== */

.faq-header {
  padding: 0 16px;
  margin-bottom: 20px;
}

.faq-title {
  font-size: 1.3rem;
  font-weight: 800;
}

.faq-list {
  padding: 0 16px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  background: var(--bg-white);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  gap: 12px;
  -webkit-tap-highlight-color: transparent;
}

.faq-question span {
  flex: 1;
}

.faq-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-arrow svg {
  width: 20px;
  height: 20px;
  fill: var(--text-muted);
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 4px 16px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-line;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--primary);
  position: relative;
}

.faq-answer-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

/* ===================================
   MY PAGE TAB
   =================================== */

.mypage-content {
  padding: 0 16px;
}

.add-child-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  cursor: pointer;
  min-height: 44px;
}

.add-child-icon {
  width: 64px;
  height: 64px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-child-icon svg {
  width: 32px;
  height: 32px;
  fill: var(--text-muted);
}

.add-child-btn span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.mypage-btn {
  display: block;
  width: 100%;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-height: 44px;
}

.mypage-btn:active {
  background: var(--primary-light);
  border-color: var(--primary);
}

/* Login Modal */
.login-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-modal-overlay.show {
  display: flex;
}

.login-modal {
  background: var(--bg-white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 360px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border-left: 6px solid var(--primary);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-secondary);
  z-index: 1;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

.modal-body {
  padding: 24px 20px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-align: center;
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.88rem;
  min-width: 70px;
  flex-shrink: 0;
}

.form-group label .required {
  color: var(--accent);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  transition: border-color 0.2s;
  min-height: 44px;
}

.form-group input:focus {
  border-color: var(--primary);
  outline: none;
}

.form-validation-note {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: -8px;
  margin-bottom: 12px;
  padding-left: 82px;
}

/* Toggle Switches */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-height: 44px;
}

.toggle-switch {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  transition: background 0.3s;
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-item.active .toggle-switch {
  background: var(--primary);
}

.toggle-item.active .toggle-switch::after {
  transform: translateX(20px);
}

.toggle-item span {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Password Find Link */
.find-password {
  display: block;
  color: #2196F3;
  font-size: 0.82rem;
  text-decoration: underline;
  margin-bottom: 20px;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Modal Buttons Row */
.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.modal-btn {
  padding: 10px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  min-height: 44px;
  border: 2px solid var(--text-primary);
  background: var(--bg-white);
  color: var(--text-primary);
  transition: background 0.2s;
}

.modal-btn:active {
  background: var(--primary-light);
}

.modal-btn.primary {
  background: var(--text-primary);
  color: var(--bg-white);
}

.modal-btn.primary:active {
  background: #333;
}

/* Register Modal */
.register-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.register-modal-overlay.show {
  display: flex;
}

.register-modal {
  background: var(--bg-white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 360px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border-left: 6px solid var(--primary);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

.checkbox-group {
  margin-bottom: 16px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.checkbox-item.checked .custom-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-item.checked .custom-checkbox::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.checkbox-item span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex: 1;
}

.checkbox-item .terms-link {
  color: #2196F3;
  text-decoration: underline;
  cursor: pointer;
}

/* Alert Modal */
.alert-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 400;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.alert-overlay.show {
  display: flex;
}

.alert-box {
  background: var(--bg-white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 300px;
  padding: 32px 24px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

.alert-box .alert-text {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 20px;
}

.alert-box .alert-subtext {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.alert-ok-btn {
  color: #2196F3;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 10px 24px;
  min-height: 44px;
  cursor: pointer;
  border-top: 1px solid var(--border);
  display: block;
  width: 100%;
  margin-top: 8px;
  padding-top: 16px;
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* ===================================
   MY PAGE - Logged In State
   =================================== */
.mypage-user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.mypage-user-email {
  font-weight: 700;
  font-size: 0.95rem;
}
.mypage-btn-sm {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-white);
  color: var(--text-secondary);
  cursor: pointer;
}
.mypage-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.child-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.child-info strong { font-size: 0.9rem; }
.child-birth { font-size: 0.78rem; color: var(--text-muted); margin-left: 8px; }
.child-delete-btn {
  font-size: 1.2rem; color: var(--text-muted); cursor: pointer;
  background: none; border: none; padding: 4px 8px; min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.reg-card {
  padding: 14px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.reg-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.reg-card-header strong { font-size: 0.9rem; }
.reg-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
}
.status-pending { background: #FFF3CD; color: #856404; }
.status-confirmed { background: #D4EDDA; color: #155724; }
.status-cancelled { background: #F8D7DA; color: #721C24; }
.status-completed { background: #D1ECF1; color: #0C5460; }
.reg-card-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.reg-cancel-btn {
  font-size: 0.75rem; font-weight: 600;
  color: var(--accent); background: none; border: 1px solid var(--accent);
  border-radius: var(--radius-xs); padding: 4px 12px; cursor: pointer;
}
.empty-text {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===================================
   SCROLLBAR STYLING
   =================================== */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* ===================================
   RESPONSIVE ADJUSTMENTS
   =================================== */

@media (max-width: 340px) {
  .banner-slide {
    padding: 16px 12px;
    min-height: 180px;
  }

  .banner-slide .banner-title {
    font-size: 1.2rem;
  }

  .quick-action-icon {
    width: 44px;
    height: 44px;
  }

  .quick-action-icon svg {
    width: 22px;
    height: 22px;
  }

  .promo-card-title {
    font-size: 0.88rem;
  }

  .timetable {
    font-size: 0.65rem;
  }
}

@media (min-width: 429px) {
  .app {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
  }
}

/* Touch feedback */
@media (hover: none) {
  .program-card:active,
  .quick-action-btn:active .quick-action-icon,
  .promo-card:active,
  .mypage-btn:active,
  .timetable-cell:active {
    transition-duration: 0.1s;
  }
}
